diff --git a/java-document-ai/README.md b/java-document-ai/README.md index 78545d09b0e1..9ab8c5c983d5 100644 --- a/java-document-ai/README.md +++ b/java-document-ai/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-document-ai - 2.9.0 + 2.10.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-document-ai:2.9.0' +implementation 'com.google.cloud:google-cloud-document-ai:2.10.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-document-ai" % "2.9.0" +libraryDependencies += "com.google.cloud" % "google-cloud-document-ai" % "2.10.0" ``` ## Authentication @@ -159,16 +159,16 @@ Java is a registered trademark of Oracle and/or its affiliates. [product-docs]: https://cloud.google.com/compute/docs/documentai/ [javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-document-ai/latest/overview -[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-document-ai/java7.svg -[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-document-ai/java7.html -[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-document-ai/java8.svg -[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-document-ai/java8.html -[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-document-ai/java8-osx.svg -[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-document-ai/java8-osx.html -[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-document-ai/java8-win.svg -[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-document-ai/java8-win.html -[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-document-ai/java11.svg -[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-document-ai/java11.html +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-document-ai.svg [maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-document-ai&core=gav @@ -180,9 +180,9 @@ Java is a registered trademark of Oracle and/or its affiliates. [create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects [cloud-sdk]: https://cloud.google.com/sdk/ [troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting -[contributing]: https://github.com/googleapis/java-document-ai/blob/main/CONTRIBUTING.md -[code-of-conduct]: https://github.com/googleapis/java-document-ai/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct -[license]: https://github.com/googleapis/java-document-ai/blob/main/LICENSE +[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE [enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing [enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=documentai.googleapis.com [libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java index 291c0dbd1003..ae698fdcc990 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java @@ -267,7 +267,10 @@ public final ProcessResponse processDocument(ResourceName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (DocumentProcessorServiceClient documentProcessorServiceClient = * DocumentProcessorServiceClient.create()) { - * String name = HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); + * String name = + * EvaluationName.of( + * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]", "[EVALUATION]") + * .toString(); * ProcessResponse response = documentProcessorServiceClient.processDocument(name); * } * } @@ -401,7 +404,10 @@ public final UnaryCallable processDocumentCalla * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (DocumentProcessorServiceClient documentProcessorServiceClient = * DocumentProcessorServiceClient.create()) { - * String name = HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); + * String name = + * EvaluationName.of( + * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]", "[EVALUATION]") + * .toString(); * BatchProcessResponse response = * documentProcessorServiceClient.batchProcessDocumentsAsync(name).get(); * } @@ -1121,6 +1127,191 @@ public final UnaryCallable getProcessorCallable( return stub.getProcessorCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Trains a new processor version. Operation metadata is returned as + * cloud_documentai_core.TrainProcessorVersionMetadata. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   ProcessorName parent = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+   *   ProcessorVersion processorVersion = ProcessorVersion.newBuilder().build();
+   *   TrainProcessorVersionResponse response =
+   *       documentProcessorServiceClient.trainProcessorVersionAsync(parent, processorVersion).get();
+   * }
+   * }
+ * + * @param parent Required. The parent (project, location and processor) to create the new version + * for. Format: `projects/{project}/locations/{location}/processors/{processor}`. + * @param processorVersion Required. The processor version to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + trainProcessorVersionAsync(ProcessorName parent, ProcessorVersion processorVersion) { + TrainProcessorVersionRequest request = + TrainProcessorVersionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setProcessorVersion(processorVersion) + .build(); + return trainProcessorVersionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Trains a new processor version. Operation metadata is returned as + * cloud_documentai_core.TrainProcessorVersionMetadata. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   String parent = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
+   *   ProcessorVersion processorVersion = ProcessorVersion.newBuilder().build();
+   *   TrainProcessorVersionResponse response =
+   *       documentProcessorServiceClient.trainProcessorVersionAsync(parent, processorVersion).get();
+   * }
+   * }
+ * + * @param parent Required. The parent (project, location and processor) to create the new version + * for. Format: `projects/{project}/locations/{location}/processors/{processor}`. + * @param processorVersion Required. The processor version to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + trainProcessorVersionAsync(String parent, ProcessorVersion processorVersion) { + TrainProcessorVersionRequest request = + TrainProcessorVersionRequest.newBuilder() + .setParent(parent) + .setProcessorVersion(processorVersion) + .build(); + return trainProcessorVersionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Trains a new processor version. Operation metadata is returned as + * cloud_documentai_core.TrainProcessorVersionMetadata. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   TrainProcessorVersionRequest request =
+   *       TrainProcessorVersionRequest.newBuilder()
+   *           .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+   *           .setProcessorVersion(ProcessorVersion.newBuilder().build())
+   *           .setDocumentSchema(DocumentSchema.newBuilder().build())
+   *           .setInputData(TrainProcessorVersionRequest.InputData.newBuilder().build())
+   *           .setBaseProcessorVersion("baseProcessorVersion337709271")
+   *           .build();
+   *   TrainProcessorVersionResponse response =
+   *       documentProcessorServiceClient.trainProcessorVersionAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + trainProcessorVersionAsync(TrainProcessorVersionRequest request) { + return trainProcessorVersionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Trains a new processor version. Operation metadata is returned as + * cloud_documentai_core.TrainProcessorVersionMetadata. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   TrainProcessorVersionRequest request =
+   *       TrainProcessorVersionRequest.newBuilder()
+   *           .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+   *           .setProcessorVersion(ProcessorVersion.newBuilder().build())
+   *           .setDocumentSchema(DocumentSchema.newBuilder().build())
+   *           .setInputData(TrainProcessorVersionRequest.InputData.newBuilder().build())
+   *           .setBaseProcessorVersion("baseProcessorVersion337709271")
+   *           .build();
+   *   OperationFuture future =
+   *       documentProcessorServiceClient
+   *           .trainProcessorVersionOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   TrainProcessorVersionResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + TrainProcessorVersionRequest, + TrainProcessorVersionResponse, + TrainProcessorVersionMetadata> + trainProcessorVersionOperationCallable() { + return stub.trainProcessorVersionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Trains a new processor version. Operation metadata is returned as + * cloud_documentai_core.TrainProcessorVersionMetadata. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   TrainProcessorVersionRequest request =
+   *       TrainProcessorVersionRequest.newBuilder()
+   *           .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+   *           .setProcessorVersion(ProcessorVersion.newBuilder().build())
+   *           .setDocumentSchema(DocumentSchema.newBuilder().build())
+   *           .setInputData(TrainProcessorVersionRequest.InputData.newBuilder().build())
+   *           .setBaseProcessorVersion("baseProcessorVersion337709271")
+   *           .build();
+   *   ApiFuture future =
+   *       documentProcessorServiceClient.trainProcessorVersionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + trainProcessorVersionCallable() { + return stub.trainProcessorVersionCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a processor version detail. @@ -2684,6 +2875,509 @@ public final UnaryCallable reviewDocumentCalla return stub.reviewDocumentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Evaluates a ProcessorVersion against annotated documents, producing an Evaluation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   ProcessorVersionName processorVersion =
+   *       ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]");
+   *   EvaluateProcessorVersionResponse response =
+   *       documentProcessorServiceClient.evaluateProcessorVersionAsync(processorVersion).get();
+   * }
+   * }
+ * + * @param processorVersion Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to evaluate. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + evaluateProcessorVersionAsync(ProcessorVersionName processorVersion) { + EvaluateProcessorVersionRequest request = + EvaluateProcessorVersionRequest.newBuilder() + .setProcessorVersion(processorVersion == null ? null : processorVersion.toString()) + .build(); + return evaluateProcessorVersionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Evaluates a ProcessorVersion against annotated documents, producing an Evaluation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   String processorVersion =
+   *       ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+   *           .toString();
+   *   EvaluateProcessorVersionResponse response =
+   *       documentProcessorServiceClient.evaluateProcessorVersionAsync(processorVersion).get();
+   * }
+   * }
+ * + * @param processorVersion Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to evaluate. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + evaluateProcessorVersionAsync(String processorVersion) { + EvaluateProcessorVersionRequest request = + EvaluateProcessorVersionRequest.newBuilder().setProcessorVersion(processorVersion).build(); + return evaluateProcessorVersionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Evaluates a ProcessorVersion against annotated documents, producing an Evaluation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   EvaluateProcessorVersionRequest request =
+   *       EvaluateProcessorVersionRequest.newBuilder()
+   *           .setProcessorVersion(
+   *               ProcessorVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+   *                   .toString())
+   *           .setEvaluationDocuments(BatchDocumentsInputConfig.newBuilder().build())
+   *           .build();
+   *   EvaluateProcessorVersionResponse response =
+   *       documentProcessorServiceClient.evaluateProcessorVersionAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + evaluateProcessorVersionAsync(EvaluateProcessorVersionRequest request) { + return evaluateProcessorVersionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Evaluates a ProcessorVersion against annotated documents, producing an Evaluation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   EvaluateProcessorVersionRequest request =
+   *       EvaluateProcessorVersionRequest.newBuilder()
+   *           .setProcessorVersion(
+   *               ProcessorVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+   *                   .toString())
+   *           .setEvaluationDocuments(BatchDocumentsInputConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       documentProcessorServiceClient
+   *           .evaluateProcessorVersionOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   EvaluateProcessorVersionResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + EvaluateProcessorVersionRequest, + EvaluateProcessorVersionResponse, + EvaluateProcessorVersionMetadata> + evaluateProcessorVersionOperationCallable() { + return stub.evaluateProcessorVersionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Evaluates a ProcessorVersion against annotated documents, producing an Evaluation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   EvaluateProcessorVersionRequest request =
+   *       EvaluateProcessorVersionRequest.newBuilder()
+   *           .setProcessorVersion(
+   *               ProcessorVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+   *                   .toString())
+   *           .setEvaluationDocuments(BatchDocumentsInputConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       documentProcessorServiceClient.evaluateProcessorVersionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + evaluateProcessorVersionCallable() { + return stub.evaluateProcessorVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a specific evaluation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   EvaluationName name =
+   *       EvaluationName.of(
+   *           "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]", "[EVALUATION]");
+   *   Evaluation response = documentProcessorServiceClient.getEvaluation(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the + * [Evaluation][google.cloud.documentai.v1beta3.Evaluation] to get. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Evaluation getEvaluation(EvaluationName name) { + GetEvaluationRequest request = + GetEvaluationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getEvaluation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a specific evaluation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   String name =
+   *       EvaluationName.of(
+   *               "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]", "[EVALUATION]")
+   *           .toString();
+   *   Evaluation response = documentProcessorServiceClient.getEvaluation(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the + * [Evaluation][google.cloud.documentai.v1beta3.Evaluation] to get. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Evaluation getEvaluation(String name) { + GetEvaluationRequest request = GetEvaluationRequest.newBuilder().setName(name).build(); + return getEvaluation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a specific evaluation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   GetEvaluationRequest request =
+   *       GetEvaluationRequest.newBuilder()
+   *           .setName(
+   *               EvaluationName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[PROCESSOR]",
+   *                       "[PROCESSOR_VERSION]",
+   *                       "[EVALUATION]")
+   *                   .toString())
+   *           .build();
+   *   Evaluation response = documentProcessorServiceClient.getEvaluation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Evaluation getEvaluation(GetEvaluationRequest request) { + return getEvaluationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a specific evaluation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   GetEvaluationRequest request =
+   *       GetEvaluationRequest.newBuilder()
+   *           .setName(
+   *               EvaluationName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[PROCESSOR]",
+   *                       "[PROCESSOR_VERSION]",
+   *                       "[EVALUATION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       documentProcessorServiceClient.getEvaluationCallable().futureCall(request);
+   *   // Do something.
+   *   Evaluation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getEvaluationCallable() { + return stub.getEvaluationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a set of evaluations for a given processor version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   ProcessorVersionName parent =
+   *       ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]");
+   *   for (Evaluation element :
+   *       documentProcessorServiceClient.listEvaluations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to list evaluations + * for. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEvaluationsPagedResponse listEvaluations(ProcessorVersionName parent) { + ListEvaluationsRequest request = + ListEvaluationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listEvaluations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a set of evaluations for a given processor version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   String parent =
+   *       ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+   *           .toString();
+   *   for (Evaluation element :
+   *       documentProcessorServiceClient.listEvaluations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the + * [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to list evaluations + * for. + * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEvaluationsPagedResponse listEvaluations(String parent) { + ListEvaluationsRequest request = ListEvaluationsRequest.newBuilder().setParent(parent).build(); + return listEvaluations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a set of evaluations for a given processor version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   ListEvaluationsRequest request =
+   *       ListEvaluationsRequest.newBuilder()
+   *           .setParent(
+   *               ProcessorVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Evaluation element :
+   *       documentProcessorServiceClient.listEvaluations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEvaluationsPagedResponse listEvaluations(ListEvaluationsRequest request) { + return listEvaluationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a set of evaluations for a given processor version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   ListEvaluationsRequest request =
+   *       ListEvaluationsRequest.newBuilder()
+   *           .setParent(
+   *               ProcessorVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       documentProcessorServiceClient.listEvaluationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Evaluation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEvaluationsPagedCallable() { + return stub.listEvaluationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a set of evaluations for a given processor version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+   *     DocumentProcessorServiceClient.create()) {
+   *   ListEvaluationsRequest request =
+   *       ListEvaluationsRequest.newBuilder()
+   *           .setParent(
+   *               ProcessorVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListEvaluationsResponse response =
+   *         documentProcessorServiceClient.listEvaluationsCallable().call(request);
+   *     for (Evaluation element : response.getEvaluationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEvaluationsCallable() { + return stub.listEvaluationsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. @@ -3116,6 +3810,83 @@ protected ListProcessorVersionsFixedSizeCollection createCollection( } } + public static class ListEvaluationsPagedResponse + extends AbstractPagedListResponse< + ListEvaluationsRequest, + ListEvaluationsResponse, + Evaluation, + ListEvaluationsPage, + ListEvaluationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListEvaluationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListEvaluationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListEvaluationsPagedResponse(ListEvaluationsPage page) { + super(page, ListEvaluationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListEvaluationsPage + extends AbstractPage< + ListEvaluationsRequest, ListEvaluationsResponse, Evaluation, ListEvaluationsPage> { + + private ListEvaluationsPage( + PageContext context, + ListEvaluationsResponse response) { + super(context, response); + } + + private static ListEvaluationsPage createEmptyPage() { + return new ListEvaluationsPage(null, null); + } + + @Override + protected ListEvaluationsPage createPage( + PageContext context, + ListEvaluationsResponse response) { + return new ListEvaluationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListEvaluationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListEvaluationsRequest, + ListEvaluationsResponse, + Evaluation, + ListEvaluationsPage, + ListEvaluationsFixedSizeCollection> { + + private ListEvaluationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListEvaluationsFixedSizeCollection createEmptyCollection() { + return new ListEvaluationsFixedSizeCollection(null, 0); + } + + @Override + protected ListEvaluationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListEvaluationsFixedSizeCollection(pages, collectionSize); + } + } + public static class ListLocationsPagedResponse extends AbstractPagedListResponse< ListLocationsRequest, diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceSettings.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceSettings.java index 02d5311a19d1..ff65daeb83a0 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceSettings.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.documentai.v1beta3; +import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListEvaluationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListLocationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse; @@ -131,6 +132,23 @@ public UnaryCallSettings getProcessorSettings() return ((DocumentProcessorServiceStubSettings) getStubSettings()).getProcessorSettings(); } + /** Returns the object with the settings used for calls to trainProcessorVersion. */ + public UnaryCallSettings + trainProcessorVersionSettings() { + return ((DocumentProcessorServiceStubSettings) getStubSettings()) + .trainProcessorVersionSettings(); + } + + /** Returns the object with the settings used for calls to trainProcessorVersion. */ + public OperationCallSettings< + TrainProcessorVersionRequest, + TrainProcessorVersionResponse, + TrainProcessorVersionMetadata> + trainProcessorVersionOperationSettings() { + return ((DocumentProcessorServiceStubSettings) getStubSettings()) + .trainProcessorVersionOperationSettings(); + } + /** Returns the object with the settings used for calls to getProcessorVersion. */ public UnaryCallSettings getProcessorVersionSettings() { @@ -268,6 +286,35 @@ public UnaryCallSettings reviewDocumentSetting .reviewDocumentOperationSettings(); } + /** Returns the object with the settings used for calls to evaluateProcessorVersion. */ + public UnaryCallSettings + evaluateProcessorVersionSettings() { + return ((DocumentProcessorServiceStubSettings) getStubSettings()) + .evaluateProcessorVersionSettings(); + } + + /** Returns the object with the settings used for calls to evaluateProcessorVersion. */ + public OperationCallSettings< + EvaluateProcessorVersionRequest, + EvaluateProcessorVersionResponse, + EvaluateProcessorVersionMetadata> + evaluateProcessorVersionOperationSettings() { + return ((DocumentProcessorServiceStubSettings) getStubSettings()) + .evaluateProcessorVersionOperationSettings(); + } + + /** Returns the object with the settings used for calls to getEvaluation. */ + public UnaryCallSettings getEvaluationSettings() { + return ((DocumentProcessorServiceStubSettings) getStubSettings()).getEvaluationSettings(); + } + + /** Returns the object with the settings used for calls to listEvaluations. */ + public PagedCallSettings< + ListEvaluationsRequest, ListEvaluationsResponse, ListEvaluationsPagedResponse> + listEvaluationsSettings() { + return ((DocumentProcessorServiceStubSettings) getStubSettings()).listEvaluationsSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -438,6 +485,21 @@ public UnaryCallSettings.Builder getProcessorSet return getStubSettingsBuilder().getProcessorSettings(); } + /** Returns the builder for the settings used for calls to trainProcessorVersion. */ + public UnaryCallSettings.Builder + trainProcessorVersionSettings() { + return getStubSettingsBuilder().trainProcessorVersionSettings(); + } + + /** Returns the builder for the settings used for calls to trainProcessorVersion. */ + public OperationCallSettings.Builder< + TrainProcessorVersionRequest, + TrainProcessorVersionResponse, + TrainProcessorVersionMetadata> + trainProcessorVersionOperationSettings() { + return getStubSettingsBuilder().trainProcessorVersionOperationSettings(); + } + /** Returns the builder for the settings used for calls to getProcessorVersion. */ public UnaryCallSettings.Builder getProcessorVersionSettings() { @@ -564,6 +626,33 @@ public UnaryCallSettings.Builder reviewDocumen return getStubSettingsBuilder().reviewDocumentOperationSettings(); } + /** Returns the builder for the settings used for calls to evaluateProcessorVersion. */ + public UnaryCallSettings.Builder + evaluateProcessorVersionSettings() { + return getStubSettingsBuilder().evaluateProcessorVersionSettings(); + } + + /** Returns the builder for the settings used for calls to evaluateProcessorVersion. */ + public OperationCallSettings.Builder< + EvaluateProcessorVersionRequest, + EvaluateProcessorVersionResponse, + EvaluateProcessorVersionMetadata> + evaluateProcessorVersionOperationSettings() { + return getStubSettingsBuilder().evaluateProcessorVersionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getEvaluation. */ + public UnaryCallSettings.Builder getEvaluationSettings() { + return getStubSettingsBuilder().getEvaluationSettings(); + } + + /** Returns the builder for the settings used for calls to listEvaluations. */ + public PagedCallSettings.Builder< + ListEvaluationsRequest, ListEvaluationsResponse, ListEvaluationsPagedResponse> + listEvaluationsSettings() { + return getStubSettingsBuilder().listEvaluationsSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/gapic_metadata.json b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/gapic_metadata.json index 1fb9b4c89758..a40984a91cc2 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/gapic_metadata.json +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/gapic_metadata.json @@ -31,9 +31,15 @@ "EnableProcessor": { "methods": ["enableProcessorAsync", "enableProcessorOperationCallable", "enableProcessorCallable"] }, + "EvaluateProcessorVersion": { + "methods": ["evaluateProcessorVersionAsync", "evaluateProcessorVersionAsync", "evaluateProcessorVersionAsync", "evaluateProcessorVersionOperationCallable", "evaluateProcessorVersionCallable"] + }, "FetchProcessorTypes": { "methods": ["fetchProcessorTypes", "fetchProcessorTypes", "fetchProcessorTypes", "fetchProcessorTypesCallable"] }, + "GetEvaluation": { + "methods": ["getEvaluation", "getEvaluation", "getEvaluation", "getEvaluationCallable"] + }, "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, @@ -43,6 +49,9 @@ "GetProcessorVersion": { "methods": ["getProcessorVersion", "getProcessorVersion", "getProcessorVersion", "getProcessorVersionCallable"] }, + "ListEvaluations": { + "methods": ["listEvaluations", "listEvaluations", "listEvaluations", "listEvaluationsPagedCallable", "listEvaluationsCallable"] + }, "ListLocations": { "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] }, @@ -64,6 +73,9 @@ "SetDefaultProcessorVersion": { "methods": ["setDefaultProcessorVersionAsync", "setDefaultProcessorVersionOperationCallable", "setDefaultProcessorVersionCallable"] }, + "TrainProcessorVersion": { + "methods": ["trainProcessorVersionAsync", "trainProcessorVersionAsync", "trainProcessorVersionAsync", "trainProcessorVersionOperationCallable", "trainProcessorVersionCallable"] + }, "UndeployProcessorVersion": { "methods": ["undeployProcessorVersionAsync", "undeployProcessorVersionAsync", "undeployProcessorVersionAsync", "undeployProcessorVersionOperationCallable", "undeployProcessorVersionCallable"] } diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStub.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStub.java index bed484470b6e..b1c2e67cd9f3 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStub.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStub.java @@ -16,6 +16,7 @@ package com.google.cloud.documentai.v1beta3.stub; +import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListEvaluationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListLocationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse; @@ -42,10 +43,17 @@ import com.google.cloud.documentai.v1beta3.EnableProcessorMetadata; import com.google.cloud.documentai.v1beta3.EnableProcessorRequest; import com.google.cloud.documentai.v1beta3.EnableProcessorResponse; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse; +import com.google.cloud.documentai.v1beta3.Evaluation; import com.google.cloud.documentai.v1beta3.FetchProcessorTypesRequest; import com.google.cloud.documentai.v1beta3.FetchProcessorTypesResponse; +import com.google.cloud.documentai.v1beta3.GetEvaluationRequest; import com.google.cloud.documentai.v1beta3.GetProcessorRequest; import com.google.cloud.documentai.v1beta3.GetProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.ListEvaluationsRequest; +import com.google.cloud.documentai.v1beta3.ListEvaluationsResponse; import com.google.cloud.documentai.v1beta3.ListProcessorTypesRequest; import com.google.cloud.documentai.v1beta3.ListProcessorTypesResponse; import com.google.cloud.documentai.v1beta3.ListProcessorVersionsRequest; @@ -62,6 +70,9 @@ import com.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionMetadata; import com.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionRequest; import com.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionResponse; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse; import com.google.cloud.documentai.v1beta3.UndeployProcessorVersionMetadata; import com.google.cloud.documentai.v1beta3.UndeployProcessorVersionRequest; import com.google.cloud.documentai.v1beta3.UndeployProcessorVersionResponse; @@ -134,6 +145,19 @@ public UnaryCallable getProcessorCallable() { throw new UnsupportedOperationException("Not implemented: getProcessorCallable()"); } + public OperationCallable< + TrainProcessorVersionRequest, + TrainProcessorVersionResponse, + TrainProcessorVersionMetadata> + trainProcessorVersionOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: trainProcessorVersionOperationCallable()"); + } + + public UnaryCallable trainProcessorVersionCallable() { + throw new UnsupportedOperationException("Not implemented: trainProcessorVersionCallable()"); + } + public UnaryCallable getProcessorVersionCallable() { throw new UnsupportedOperationException("Not implemented: getProcessorVersionCallable()"); } @@ -243,6 +267,33 @@ public UnaryCallable reviewDocumentCallable() throw new UnsupportedOperationException("Not implemented: reviewDocumentCallable()"); } + public OperationCallable< + EvaluateProcessorVersionRequest, + EvaluateProcessorVersionResponse, + EvaluateProcessorVersionMetadata> + evaluateProcessorVersionOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: evaluateProcessorVersionOperationCallable()"); + } + + public UnaryCallable + evaluateProcessorVersionCallable() { + throw new UnsupportedOperationException("Not implemented: evaluateProcessorVersionCallable()"); + } + + public UnaryCallable getEvaluationCallable() { + throw new UnsupportedOperationException("Not implemented: getEvaluationCallable()"); + } + + public UnaryCallable + listEvaluationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEvaluationsPagedCallable()"); + } + + public UnaryCallable listEvaluationsCallable() { + throw new UnsupportedOperationException("Not implemented: listEvaluationsCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStubSettings.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStubSettings.java index 7b16e6f3400d..7a57bde05454 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStubSettings.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStubSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.documentai.v1beta3.stub; +import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListEvaluationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListLocationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse; @@ -67,10 +68,17 @@ import com.google.cloud.documentai.v1beta3.EnableProcessorMetadata; import com.google.cloud.documentai.v1beta3.EnableProcessorRequest; import com.google.cloud.documentai.v1beta3.EnableProcessorResponse; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse; +import com.google.cloud.documentai.v1beta3.Evaluation; import com.google.cloud.documentai.v1beta3.FetchProcessorTypesRequest; import com.google.cloud.documentai.v1beta3.FetchProcessorTypesResponse; +import com.google.cloud.documentai.v1beta3.GetEvaluationRequest; import com.google.cloud.documentai.v1beta3.GetProcessorRequest; import com.google.cloud.documentai.v1beta3.GetProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.ListEvaluationsRequest; +import com.google.cloud.documentai.v1beta3.ListEvaluationsResponse; import com.google.cloud.documentai.v1beta3.ListProcessorTypesRequest; import com.google.cloud.documentai.v1beta3.ListProcessorTypesResponse; import com.google.cloud.documentai.v1beta3.ListProcessorVersionsRequest; @@ -88,6 +96,9 @@ import com.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionMetadata; import com.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionRequest; import com.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionResponse; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse; import com.google.cloud.documentai.v1beta3.UndeployProcessorVersionMetadata; import com.google.cloud.documentai.v1beta3.UndeployProcessorVersionRequest; import com.google.cloud.documentai.v1beta3.UndeployProcessorVersionResponse; @@ -166,6 +177,13 @@ public class DocumentProcessorServiceStubSettings ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse> listProcessorsSettings; private final UnaryCallSettings getProcessorSettings; + private final UnaryCallSettings + trainProcessorVersionSettings; + private final OperationCallSettings< + TrainProcessorVersionRequest, + TrainProcessorVersionResponse, + TrainProcessorVersionMetadata> + trainProcessorVersionOperationSettings; private final UnaryCallSettings getProcessorVersionSettings; private final PagedCallSettings< @@ -215,6 +233,17 @@ public class DocumentProcessorServiceStubSettings private final OperationCallSettings< ReviewDocumentRequest, ReviewDocumentResponse, ReviewDocumentOperationMetadata> reviewDocumentOperationSettings; + private final UnaryCallSettings + evaluateProcessorVersionSettings; + private final OperationCallSettings< + EvaluateProcessorVersionRequest, + EvaluateProcessorVersionResponse, + EvaluateProcessorVersionMetadata> + evaluateProcessorVersionOperationSettings; + private final UnaryCallSettings getEvaluationSettings; + private final PagedCallSettings< + ListEvaluationsRequest, ListEvaluationsResponse, ListEvaluationsPagedResponse> + listEvaluationsSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -338,6 +367,45 @@ public Iterable extractResources( } }; + private static final PagedListDescriptor< + ListEvaluationsRequest, ListEvaluationsResponse, Evaluation> + LIST_EVALUATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListEvaluationsRequest injectToken( + ListEvaluationsRequest payload, String token) { + return ListEvaluationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListEvaluationsRequest injectPageSize( + ListEvaluationsRequest payload, int pageSize) { + return ListEvaluationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListEvaluationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListEvaluationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListEvaluationsResponse payload) { + return payload.getEvaluationsList() == null + ? ImmutableList.of() + : payload.getEvaluationsList(); + } + }; + private static final PagedListDescriptor LIST_LOCATIONS_PAGE_STR_DESC = new PagedListDescriptor() { @@ -436,6 +504,23 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListEvaluationsRequest, ListEvaluationsResponse, ListEvaluationsPagedResponse> + LIST_EVALUATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListEvaluationsRequest, ListEvaluationsResponse, ListEvaluationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListEvaluationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_EVALUATIONS_PAGE_STR_DESC, request, context); + return ListEvaluationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> LIST_LOCATIONS_PAGE_STR_FACT = @@ -494,6 +579,21 @@ public UnaryCallSettings getProcessorSettings() return getProcessorSettings; } + /** Returns the object with the settings used for calls to trainProcessorVersion. */ + public UnaryCallSettings + trainProcessorVersionSettings() { + return trainProcessorVersionSettings; + } + + /** Returns the object with the settings used for calls to trainProcessorVersion. */ + public OperationCallSettings< + TrainProcessorVersionRequest, + TrainProcessorVersionResponse, + TrainProcessorVersionMetadata> + trainProcessorVersionOperationSettings() { + return trainProcessorVersionOperationSettings; + } + /** Returns the object with the settings used for calls to getProcessorVersion. */ public UnaryCallSettings getProcessorVersionSettings() { @@ -618,6 +718,33 @@ public UnaryCallSettings reviewDocumentSetting return reviewDocumentOperationSettings; } + /** Returns the object with the settings used for calls to evaluateProcessorVersion. */ + public UnaryCallSettings + evaluateProcessorVersionSettings() { + return evaluateProcessorVersionSettings; + } + + /** Returns the object with the settings used for calls to evaluateProcessorVersion. */ + public OperationCallSettings< + EvaluateProcessorVersionRequest, + EvaluateProcessorVersionResponse, + EvaluateProcessorVersionMetadata> + evaluateProcessorVersionOperationSettings() { + return evaluateProcessorVersionOperationSettings; + } + + /** Returns the object with the settings used for calls to getEvaluation. */ + public UnaryCallSettings getEvaluationSettings() { + return getEvaluationSettings; + } + + /** Returns the object with the settings used for calls to listEvaluations. */ + public PagedCallSettings< + ListEvaluationsRequest, ListEvaluationsResponse, ListEvaluationsPagedResponse> + listEvaluationsSettings() { + return listEvaluationsSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -743,6 +870,9 @@ protected DocumentProcessorServiceStubSettings(Builder settingsBuilder) throws I listProcessorTypesSettings = settingsBuilder.listProcessorTypesSettings().build(); listProcessorsSettings = settingsBuilder.listProcessorsSettings().build(); getProcessorSettings = settingsBuilder.getProcessorSettings().build(); + trainProcessorVersionSettings = settingsBuilder.trainProcessorVersionSettings().build(); + trainProcessorVersionOperationSettings = + settingsBuilder.trainProcessorVersionOperationSettings().build(); getProcessorVersionSettings = settingsBuilder.getProcessorVersionSettings().build(); listProcessorVersionsSettings = settingsBuilder.listProcessorVersionsSettings().build(); deleteProcessorVersionSettings = settingsBuilder.deleteProcessorVersionSettings().build(); @@ -767,6 +897,11 @@ protected DocumentProcessorServiceStubSettings(Builder settingsBuilder) throws I settingsBuilder.setDefaultProcessorVersionOperationSettings().build(); reviewDocumentSettings = settingsBuilder.reviewDocumentSettings().build(); reviewDocumentOperationSettings = settingsBuilder.reviewDocumentOperationSettings().build(); + evaluateProcessorVersionSettings = settingsBuilder.evaluateProcessorVersionSettings().build(); + evaluateProcessorVersionOperationSettings = + settingsBuilder.evaluateProcessorVersionOperationSettings().build(); + getEvaluationSettings = settingsBuilder.getEvaluationSettings().build(); + listEvaluationsSettings = settingsBuilder.listEvaluationsSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -791,6 +926,13 @@ public static class Builder ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse> listProcessorsSettings; private final UnaryCallSettings.Builder getProcessorSettings; + private final UnaryCallSettings.Builder + trainProcessorVersionSettings; + private final OperationCallSettings.Builder< + TrainProcessorVersionRequest, + TrainProcessorVersionResponse, + TrainProcessorVersionMetadata> + trainProcessorVersionOperationSettings; private final UnaryCallSettings.Builder getProcessorVersionSettings; private final PagedCallSettings.Builder< @@ -846,6 +988,17 @@ public static class Builder private final OperationCallSettings.Builder< ReviewDocumentRequest, ReviewDocumentResponse, ReviewDocumentOperationMetadata> reviewDocumentOperationSettings; + private final UnaryCallSettings.Builder + evaluateProcessorVersionSettings; + private final OperationCallSettings.Builder< + EvaluateProcessorVersionRequest, + EvaluateProcessorVersionResponse, + EvaluateProcessorVersionMetadata> + evaluateProcessorVersionOperationSettings; + private final UnaryCallSettings.Builder getEvaluationSettings; + private final PagedCallSettings.Builder< + ListEvaluationsRequest, ListEvaluationsResponse, ListEvaluationsPagedResponse> + listEvaluationsSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -900,6 +1053,8 @@ protected Builder(ClientContext clientContext) { listProcessorTypesSettings = PagedCallSettings.newBuilder(LIST_PROCESSOR_TYPES_PAGE_STR_FACT); listProcessorsSettings = PagedCallSettings.newBuilder(LIST_PROCESSORS_PAGE_STR_FACT); getProcessorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + trainProcessorVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + trainProcessorVersionOperationSettings = OperationCallSettings.newBuilder(); getProcessorVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listProcessorVersionsSettings = PagedCallSettings.newBuilder(LIST_PROCESSOR_VERSIONS_PAGE_STR_FACT); @@ -920,6 +1075,10 @@ protected Builder(ClientContext clientContext) { setDefaultProcessorVersionOperationSettings = OperationCallSettings.newBuilder(); reviewDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); reviewDocumentOperationSettings = OperationCallSettings.newBuilder(); + evaluateProcessorVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + evaluateProcessorVersionOperationSettings = OperationCallSettings.newBuilder(); + getEvaluationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listEvaluationsSettings = PagedCallSettings.newBuilder(LIST_EVALUATIONS_PAGE_STR_FACT); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -931,6 +1090,7 @@ protected Builder(ClientContext clientContext) { listProcessorTypesSettings, listProcessorsSettings, getProcessorSettings, + trainProcessorVersionSettings, getProcessorVersionSettings, listProcessorVersionsSettings, deleteProcessorVersionSettings, @@ -942,6 +1102,9 @@ protected Builder(ClientContext clientContext) { disableProcessorSettings, setDefaultProcessorVersionSettings, reviewDocumentSettings, + evaluateProcessorVersionSettings, + getEvaluationSettings, + listEvaluationsSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -958,6 +1121,9 @@ protected Builder(DocumentProcessorServiceStubSettings settings) { listProcessorTypesSettings = settings.listProcessorTypesSettings.toBuilder(); listProcessorsSettings = settings.listProcessorsSettings.toBuilder(); getProcessorSettings = settings.getProcessorSettings.toBuilder(); + trainProcessorVersionSettings = settings.trainProcessorVersionSettings.toBuilder(); + trainProcessorVersionOperationSettings = + settings.trainProcessorVersionOperationSettings.toBuilder(); getProcessorVersionSettings = settings.getProcessorVersionSettings.toBuilder(); listProcessorVersionsSettings = settings.listProcessorVersionsSettings.toBuilder(); deleteProcessorVersionSettings = settings.deleteProcessorVersionSettings.toBuilder(); @@ -981,6 +1147,11 @@ protected Builder(DocumentProcessorServiceStubSettings settings) { settings.setDefaultProcessorVersionOperationSettings.toBuilder(); reviewDocumentSettings = settings.reviewDocumentSettings.toBuilder(); reviewDocumentOperationSettings = settings.reviewDocumentOperationSettings.toBuilder(); + evaluateProcessorVersionSettings = settings.evaluateProcessorVersionSettings.toBuilder(); + evaluateProcessorVersionOperationSettings = + settings.evaluateProcessorVersionOperationSettings.toBuilder(); + getEvaluationSettings = settings.getEvaluationSettings.toBuilder(); + listEvaluationsSettings = settings.listEvaluationsSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -992,6 +1163,7 @@ protected Builder(DocumentProcessorServiceStubSettings settings) { listProcessorTypesSettings, listProcessorsSettings, getProcessorSettings, + trainProcessorVersionSettings, getProcessorVersionSettings, listProcessorVersionsSettings, deleteProcessorVersionSettings, @@ -1003,6 +1175,9 @@ protected Builder(DocumentProcessorServiceStubSettings settings) { disableProcessorSettings, setDefaultProcessorVersionSettings, reviewDocumentSettings, + evaluateProcessorVersionSettings, + getEvaluationSettings, + listEvaluationsSettings, listLocationsSettings, getLocationSettings); } @@ -1064,6 +1239,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .trainProcessorVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .getProcessorVersionSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -1119,6 +1299,21 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .evaluateProcessorVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getEvaluationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listEvaluationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -1153,6 +1348,32 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .trainProcessorVersionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + TrainProcessorVersionResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + TrainProcessorVersionMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder .deleteProcessorVersionOperationSettings() .setInitialCallSettings( @@ -1354,6 +1575,32 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .evaluateProcessorVersionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + EvaluateProcessorVersionResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + EvaluateProcessorVersionMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -1417,6 +1664,23 @@ public UnaryCallSettings.Builder getProcessorSet return getProcessorSettings; } + /** Returns the builder for the settings used for calls to trainProcessorVersion. */ + public UnaryCallSettings.Builder + trainProcessorVersionSettings() { + return trainProcessorVersionSettings; + } + + /** Returns the builder for the settings used for calls to trainProcessorVersion. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + TrainProcessorVersionRequest, + TrainProcessorVersionResponse, + TrainProcessorVersionMetadata> + trainProcessorVersionOperationSettings() { + return trainProcessorVersionOperationSettings; + } + /** Returns the builder for the settings used for calls to getProcessorVersion. */ public UnaryCallSettings.Builder getProcessorVersionSettings() { @@ -1559,6 +1823,35 @@ public UnaryCallSettings.Builder reviewDocumen return reviewDocumentOperationSettings; } + /** Returns the builder for the settings used for calls to evaluateProcessorVersion. */ + public UnaryCallSettings.Builder + evaluateProcessorVersionSettings() { + return evaluateProcessorVersionSettings; + } + + /** Returns the builder for the settings used for calls to evaluateProcessorVersion. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + EvaluateProcessorVersionRequest, + EvaluateProcessorVersionResponse, + EvaluateProcessorVersionMetadata> + evaluateProcessorVersionOperationSettings() { + return evaluateProcessorVersionOperationSettings; + } + + /** Returns the builder for the settings used for calls to getEvaluation. */ + public UnaryCallSettings.Builder getEvaluationSettings() { + return getEvaluationSettings; + } + + /** Returns the builder for the settings used for calls to listEvaluations. */ + public PagedCallSettings.Builder< + ListEvaluationsRequest, ListEvaluationsResponse, ListEvaluationsPagedResponse> + listEvaluationsSettings() { + return listEvaluationsSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceStub.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceStub.java index 8ff51cc980fa..81867eda9194 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceStub.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceStub.java @@ -16,6 +16,7 @@ package com.google.cloud.documentai.v1beta3.stub; +import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListEvaluationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListLocationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse; @@ -46,10 +47,17 @@ import com.google.cloud.documentai.v1beta3.EnableProcessorMetadata; import com.google.cloud.documentai.v1beta3.EnableProcessorRequest; import com.google.cloud.documentai.v1beta3.EnableProcessorResponse; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse; +import com.google.cloud.documentai.v1beta3.Evaluation; import com.google.cloud.documentai.v1beta3.FetchProcessorTypesRequest; import com.google.cloud.documentai.v1beta3.FetchProcessorTypesResponse; +import com.google.cloud.documentai.v1beta3.GetEvaluationRequest; import com.google.cloud.documentai.v1beta3.GetProcessorRequest; import com.google.cloud.documentai.v1beta3.GetProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.ListEvaluationsRequest; +import com.google.cloud.documentai.v1beta3.ListEvaluationsResponse; import com.google.cloud.documentai.v1beta3.ListProcessorTypesRequest; import com.google.cloud.documentai.v1beta3.ListProcessorTypesResponse; import com.google.cloud.documentai.v1beta3.ListProcessorVersionsRequest; @@ -66,6 +74,9 @@ import com.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionMetadata; import com.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionRequest; import com.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionResponse; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse; import com.google.cloud.documentai.v1beta3.UndeployProcessorVersionMetadata; import com.google.cloud.documentai.v1beta3.UndeployProcessorVersionRequest; import com.google.cloud.documentai.v1beta3.UndeployProcessorVersionResponse; @@ -158,6 +169,17 @@ public class GrpcDocumentProcessorServiceStub extends DocumentProcessorServiceSt .setResponseMarshaller(ProtoUtils.marshaller(Processor.getDefaultInstance())) .build(); + private static final MethodDescriptor + trainProcessorVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.documentai.v1beta3.DocumentProcessorService/TrainProcessorVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(TrainProcessorVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor getProcessorVersionMethodDescriptor = MethodDescriptor.newBuilder() @@ -280,6 +302,40 @@ public class GrpcDocumentProcessorServiceStub extends DocumentProcessorServiceSt .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + evaluateProcessorVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.documentai.v1beta3.DocumentProcessorService/EvaluateProcessorVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(EvaluateProcessorVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getEvaluationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.documentai.v1beta3.DocumentProcessorService/GetEvaluation") + .setRequestMarshaller( + ProtoUtils.marshaller(GetEvaluationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Evaluation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listEvaluationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.documentai.v1beta3.DocumentProcessorService/ListEvaluations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEvaluationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEvaluationsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -313,6 +369,13 @@ public class GrpcDocumentProcessorServiceStub extends DocumentProcessorServiceSt private final UnaryCallable listProcessorsPagedCallable; private final UnaryCallable getProcessorCallable; + private final UnaryCallable + trainProcessorVersionCallable; + private final OperationCallable< + TrainProcessorVersionRequest, + TrainProcessorVersionResponse, + TrainProcessorVersionMetadata> + trainProcessorVersionOperationCallable; private final UnaryCallable getProcessorVersionCallable; private final UnaryCallable @@ -361,6 +424,18 @@ public class GrpcDocumentProcessorServiceStub extends DocumentProcessorServiceSt private final OperationCallable< ReviewDocumentRequest, ReviewDocumentResponse, ReviewDocumentOperationMetadata> reviewDocumentOperationCallable; + private final UnaryCallable + evaluateProcessorVersionCallable; + private final OperationCallable< + EvaluateProcessorVersionRequest, + EvaluateProcessorVersionResponse, + EvaluateProcessorVersionMetadata> + evaluateProcessorVersionOperationCallable; + private final UnaryCallable getEvaluationCallable; + private final UnaryCallable + listEvaluationsCallable; + private final UnaryCallable + listEvaluationsPagedCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -474,6 +549,17 @@ protected GrpcDocumentProcessorServiceStub( return params.build(); }) .build(); + GrpcCallSettings + trainProcessorVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(trainProcessorVersionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); GrpcCallSettings getProcessorVersionTransportSettings = GrpcCallSettings.newBuilder() @@ -591,6 +677,39 @@ protected GrpcDocumentProcessorServiceStub( return params.build(); }) .build(); + GrpcCallSettings + evaluateProcessorVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(evaluateProcessorVersionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "processor_version", String.valueOf(request.getProcessorVersion())); + return params.build(); + }) + .build(); + GrpcCallSettings getEvaluationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getEvaluationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listEvaluationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEvaluationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -650,6 +769,17 @@ protected GrpcDocumentProcessorServiceStub( this.getProcessorCallable = callableFactory.createUnaryCallable( getProcessorTransportSettings, settings.getProcessorSettings(), clientContext); + this.trainProcessorVersionCallable = + callableFactory.createUnaryCallable( + trainProcessorVersionTransportSettings, + settings.trainProcessorVersionSettings(), + clientContext); + this.trainProcessorVersionOperationCallable = + callableFactory.createOperationCallable( + trainProcessorVersionTransportSettings, + settings.trainProcessorVersionOperationSettings(), + clientContext, + operationsStub); this.getProcessorVersionCallable = callableFactory.createUnaryCallable( getProcessorVersionTransportSettings, @@ -748,6 +878,26 @@ protected GrpcDocumentProcessorServiceStub( settings.reviewDocumentOperationSettings(), clientContext, operationsStub); + this.evaluateProcessorVersionCallable = + callableFactory.createUnaryCallable( + evaluateProcessorVersionTransportSettings, + settings.evaluateProcessorVersionSettings(), + clientContext); + this.evaluateProcessorVersionOperationCallable = + callableFactory.createOperationCallable( + evaluateProcessorVersionTransportSettings, + settings.evaluateProcessorVersionOperationSettings(), + clientContext, + operationsStub); + this.getEvaluationCallable = + callableFactory.createUnaryCallable( + getEvaluationTransportSettings, settings.getEvaluationSettings(), clientContext); + this.listEvaluationsCallable = + callableFactory.createUnaryCallable( + listEvaluationsTransportSettings, settings.listEvaluationsSettings(), clientContext); + this.listEvaluationsPagedCallable = + callableFactory.createPagedCallable( + listEvaluationsTransportSettings, settings.listEvaluationsSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -816,6 +966,20 @@ public UnaryCallable getProcessorCallable() { return getProcessorCallable; } + @Override + public UnaryCallable trainProcessorVersionCallable() { + return trainProcessorVersionCallable; + } + + @Override + public OperationCallable< + TrainProcessorVersionRequest, + TrainProcessorVersionResponse, + TrainProcessorVersionMetadata> + trainProcessorVersionOperationCallable() { + return trainProcessorVersionOperationCallable; + } + @Override public UnaryCallable getProcessorVersionCallable() { return getProcessorVersionCallable; @@ -939,6 +1103,37 @@ public UnaryCallable reviewDocumentCallable() return reviewDocumentOperationCallable; } + @Override + public UnaryCallable + evaluateProcessorVersionCallable() { + return evaluateProcessorVersionCallable; + } + + @Override + public OperationCallable< + EvaluateProcessorVersionRequest, + EvaluateProcessorVersionResponse, + EvaluateProcessorVersionMetadata> + evaluateProcessorVersionOperationCallable() { + return evaluateProcessorVersionOperationCallable; + } + + @Override + public UnaryCallable getEvaluationCallable() { + return getEvaluationCallable; + } + + @Override + public UnaryCallable listEvaluationsCallable() { + return listEvaluationsCallable; + } + + @Override + public UnaryCallable + listEvaluationsPagedCallable() { + return listEvaluationsPagedCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/HttpJsonDocumentProcessorServiceStub.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/HttpJsonDocumentProcessorServiceStub.java index 0e2527fcd1be..5c2172f8d6d6 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/HttpJsonDocumentProcessorServiceStub.java +++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/HttpJsonDocumentProcessorServiceStub.java @@ -16,6 +16,7 @@ package com.google.cloud.documentai.v1beta3.stub; +import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListEvaluationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListLocationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse; @@ -53,10 +54,17 @@ import com.google.cloud.documentai.v1beta3.EnableProcessorMetadata; import com.google.cloud.documentai.v1beta3.EnableProcessorRequest; import com.google.cloud.documentai.v1beta3.EnableProcessorResponse; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse; +import com.google.cloud.documentai.v1beta3.Evaluation; import com.google.cloud.documentai.v1beta3.FetchProcessorTypesRequest; import com.google.cloud.documentai.v1beta3.FetchProcessorTypesResponse; +import com.google.cloud.documentai.v1beta3.GetEvaluationRequest; import com.google.cloud.documentai.v1beta3.GetProcessorRequest; import com.google.cloud.documentai.v1beta3.GetProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.ListEvaluationsRequest; +import com.google.cloud.documentai.v1beta3.ListEvaluationsResponse; import com.google.cloud.documentai.v1beta3.ListProcessorTypesRequest; import com.google.cloud.documentai.v1beta3.ListProcessorTypesResponse; import com.google.cloud.documentai.v1beta3.ListProcessorVersionsRequest; @@ -73,6 +81,9 @@ import com.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionMetadata; import com.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionRequest; import com.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionResponse; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse; import com.google.cloud.documentai.v1beta3.UndeployProcessorVersionMetadata; import com.google.cloud.documentai.v1beta3.UndeployProcessorVersionRequest; import com.google.cloud.documentai.v1beta3.UndeployProcessorVersionResponse; @@ -111,12 +122,16 @@ public class HttpJsonDocumentProcessorServiceStub extends DocumentProcessorServi .add(UndeployProcessorVersionResponse.getDescriptor()) .add(DisableProcessorResponse.getDescriptor()) .add(ReviewDocumentOperationMetadata.getDescriptor()) + .add(EvaluateProcessorVersionResponse.getDescriptor()) + .add(EvaluateProcessorVersionMetadata.getDescriptor()) + .add(TrainProcessorVersionMetadata.getDescriptor()) .add(BatchProcessMetadata.getDescriptor()) .add(Empty.getDescriptor()) .add(UndeployProcessorVersionMetadata.getDescriptor()) .add(DeleteProcessorMetadata.getDescriptor()) .add(ReviewDocumentResponse.getDescriptor()) .add(EnableProcessorResponse.getDescriptor()) + .add(TrainProcessorVersionResponse.getDescriptor()) .add(DeleteProcessorVersionMetadata.getDescriptor()) .add(SetDefaultProcessorVersionResponse.getDescriptor()) .build(); @@ -342,6 +357,46 @@ public class HttpJsonDocumentProcessorServiceStub extends DocumentProcessorServi .build()) .build(); + private static final ApiMethodDescriptor + trainProcessorVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.documentai.v1beta3.DocumentProcessorService/TrainProcessorVersion") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta3/{parent=projects/*/locations/*/processors/*}/processorVersions:train", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (TrainProcessorVersionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor getProcessorVersionMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -769,6 +824,120 @@ public class HttpJsonDocumentProcessorServiceStub extends DocumentProcessorServi HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + evaluateProcessorVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.documentai.v1beta3.DocumentProcessorService/EvaluateProcessorVersion") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta3/{processorVersion=projects/*/locations/*/processors/*/processorVersions/*}:evaluateProcessorVersion", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "processorVersion", request.getProcessorVersion()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", + request.toBuilder().clearProcessorVersion().build(), + false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (EvaluateProcessorVersionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getEvaluationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.documentai.v1beta3.DocumentProcessorService/GetEvaluation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta3/{name=projects/*/locations/*/processors/*/processorVersions/*/evaluations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Evaluation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listEvaluationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.documentai.v1beta3.DocumentProcessorService/ListEvaluations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta3/{parent=projects/*/locations/*/processors/*/processorVersions/*}/evaluations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListEvaluationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -851,6 +1020,13 @@ public class HttpJsonDocumentProcessorServiceStub extends DocumentProcessorServi private final UnaryCallable listProcessorsPagedCallable; private final UnaryCallable getProcessorCallable; + private final UnaryCallable + trainProcessorVersionCallable; + private final OperationCallable< + TrainProcessorVersionRequest, + TrainProcessorVersionResponse, + TrainProcessorVersionMetadata> + trainProcessorVersionOperationCallable; private final UnaryCallable getProcessorVersionCallable; private final UnaryCallable @@ -899,6 +1075,18 @@ public class HttpJsonDocumentProcessorServiceStub extends DocumentProcessorServi private final OperationCallable< ReviewDocumentRequest, ReviewDocumentResponse, ReviewDocumentOperationMetadata> reviewDocumentOperationCallable; + private final UnaryCallable + evaluateProcessorVersionCallable; + private final OperationCallable< + EvaluateProcessorVersionRequest, + EvaluateProcessorVersionResponse, + EvaluateProcessorVersionMetadata> + evaluateProcessorVersionOperationCallable; + private final UnaryCallable getEvaluationCallable; + private final UnaryCallable + listEvaluationsCallable; + private final UnaryCallable + listEvaluationsPagedCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -986,6 +1174,12 @@ protected HttpJsonDocumentProcessorServiceStub( .setMethodDescriptor(getProcessorMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + trainProcessorVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(trainProcessorVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings getProcessorVersionTransportSettings = HttpJsonCallSettings.newBuilder() @@ -1048,6 +1242,23 @@ protected HttpJsonDocumentProcessorServiceStub( .setMethodDescriptor(reviewDocumentMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + evaluateProcessorVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(evaluateProcessorVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getEvaluationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getEvaluationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listEvaluationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listEvaluationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -1098,6 +1309,17 @@ protected HttpJsonDocumentProcessorServiceStub( this.getProcessorCallable = callableFactory.createUnaryCallable( getProcessorTransportSettings, settings.getProcessorSettings(), clientContext); + this.trainProcessorVersionCallable = + callableFactory.createUnaryCallable( + trainProcessorVersionTransportSettings, + settings.trainProcessorVersionSettings(), + clientContext); + this.trainProcessorVersionOperationCallable = + callableFactory.createOperationCallable( + trainProcessorVersionTransportSettings, + settings.trainProcessorVersionOperationSettings(), + clientContext, + httpJsonOperationsStub); this.getProcessorVersionCallable = callableFactory.createUnaryCallable( getProcessorVersionTransportSettings, @@ -1196,6 +1418,26 @@ protected HttpJsonDocumentProcessorServiceStub( settings.reviewDocumentOperationSettings(), clientContext, httpJsonOperationsStub); + this.evaluateProcessorVersionCallable = + callableFactory.createUnaryCallable( + evaluateProcessorVersionTransportSettings, + settings.evaluateProcessorVersionSettings(), + clientContext); + this.evaluateProcessorVersionOperationCallable = + callableFactory.createOperationCallable( + evaluateProcessorVersionTransportSettings, + settings.evaluateProcessorVersionOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getEvaluationCallable = + callableFactory.createUnaryCallable( + getEvaluationTransportSettings, settings.getEvaluationSettings(), clientContext); + this.listEvaluationsCallable = + callableFactory.createUnaryCallable( + listEvaluationsTransportSettings, settings.listEvaluationsSettings(), clientContext); + this.listEvaluationsPagedCallable = + callableFactory.createPagedCallable( + listEvaluationsTransportSettings, settings.listEvaluationsSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -1219,6 +1461,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(listProcessorTypesMethodDescriptor); methodDescriptors.add(listProcessorsMethodDescriptor); methodDescriptors.add(getProcessorMethodDescriptor); + methodDescriptors.add(trainProcessorVersionMethodDescriptor); methodDescriptors.add(getProcessorVersionMethodDescriptor); methodDescriptors.add(listProcessorVersionsMethodDescriptor); methodDescriptors.add(deleteProcessorVersionMethodDescriptor); @@ -1230,6 +1473,9 @@ public static List getMethodDescriptors() { methodDescriptors.add(disableProcessorMethodDescriptor); methodDescriptors.add(setDefaultProcessorVersionMethodDescriptor); methodDescriptors.add(reviewDocumentMethodDescriptor); + methodDescriptors.add(evaluateProcessorVersionMethodDescriptor); + methodDescriptors.add(getEvaluationMethodDescriptor); + methodDescriptors.add(listEvaluationsMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -1289,6 +1535,20 @@ public UnaryCallable getProcessorCallable() { return getProcessorCallable; } + @Override + public UnaryCallable trainProcessorVersionCallable() { + return trainProcessorVersionCallable; + } + + @Override + public OperationCallable< + TrainProcessorVersionRequest, + TrainProcessorVersionResponse, + TrainProcessorVersionMetadata> + trainProcessorVersionOperationCallable() { + return trainProcessorVersionOperationCallable; + } + @Override public UnaryCallable getProcessorVersionCallable() { return getProcessorVersionCallable; @@ -1412,6 +1672,37 @@ public UnaryCallable reviewDocumentCallable() return reviewDocumentOperationCallable; } + @Override + public UnaryCallable + evaluateProcessorVersionCallable() { + return evaluateProcessorVersionCallable; + } + + @Override + public OperationCallable< + EvaluateProcessorVersionRequest, + EvaluateProcessorVersionResponse, + EvaluateProcessorVersionMetadata> + evaluateProcessorVersionOperationCallable() { + return evaluateProcessorVersionOperationCallable; + } + + @Override + public UnaryCallable getEvaluationCallable() { + return getEvaluationCallable; + } + + @Override + public UnaryCallable listEvaluationsCallable() { + return listEvaluationsCallable; + } + + @Override + public UnaryCallable + listEvaluationsPagedCallable() { + return listEvaluationsPagedCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClientHttpJsonTest.java b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClientHttpJsonTest.java index 617076b54a84..28db2daf2f41 100644 --- a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClientHttpJsonTest.java +++ b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClientHttpJsonTest.java @@ -16,6 +16,7 @@ package com.google.cloud.documentai.v1beta3; +import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListEvaluationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListLocationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse; @@ -668,6 +669,110 @@ public void getProcessorExceptionTest2() throws Exception { } } + @Test + public void trainProcessorVersionTest() throws Exception { + TrainProcessorVersionResponse expectedResponse = + TrainProcessorVersionResponse.newBuilder() + .setProcessorVersion("processorVersion-1941143578") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("trainProcessorVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ProcessorName parent = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + ProcessorVersion processorVersion = ProcessorVersion.newBuilder().build(); + + TrainProcessorVersionResponse actualResponse = + client.trainProcessorVersionAsync(parent, processorVersion).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void trainProcessorVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProcessorName parent = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + ProcessorVersion processorVersion = ProcessorVersion.newBuilder().build(); + client.trainProcessorVersionAsync(parent, processorVersion).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void trainProcessorVersionTest2() throws Exception { + TrainProcessorVersionResponse expectedResponse = + TrainProcessorVersionResponse.newBuilder() + .setProcessorVersion("processorVersion-1941143578") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("trainProcessorVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-3198/locations/location-3198/processors/processor-3198"; + ProcessorVersion processorVersion = ProcessorVersion.newBuilder().build(); + + TrainProcessorVersionResponse actualResponse = + client.trainProcessorVersionAsync(parent, processorVersion).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void trainProcessorVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-3198/locations/location-3198/processors/processor-3198"; + ProcessorVersion processorVersion = ProcessorVersion.newBuilder().build(); + client.trainProcessorVersionAsync(parent, processorVersion).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void getProcessorVersionTest() throws Exception { ProcessorVersion expectedResponse = @@ -677,6 +782,7 @@ public void getProcessorVersionTest() throws Exception { "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]") .toString()) .setDisplayName("displayName1714148973") + .setDocumentSchema(DocumentSchema.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") .setKmsKeyVersionName("kmsKeyVersionName-1798811307") @@ -732,6 +838,7 @@ public void getProcessorVersionTest2() throws Exception { "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]") .toString()) .setDisplayName("displayName1714148973") + .setDocumentSchema(DocumentSchema.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") .setKmsKeyVersionName("kmsKeyVersionName-1798811307") @@ -1640,6 +1747,330 @@ public void reviewDocumentExceptionTest2() throws Exception { } } + @Test + public void evaluateProcessorVersionTest() throws Exception { + EvaluateProcessorVersionResponse expectedResponse = + EvaluateProcessorVersionResponse.newBuilder().setEvaluation("evaluation858523452").build(); + Operation resultOperation = + Operation.newBuilder() + .setName("evaluateProcessorVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ProcessorVersionName processorVersion = + ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]"); + + EvaluateProcessorVersionResponse actualResponse = + client.evaluateProcessorVersionAsync(processorVersion).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void evaluateProcessorVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProcessorVersionName processorVersion = + ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]"); + client.evaluateProcessorVersionAsync(processorVersion).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void evaluateProcessorVersionTest2() throws Exception { + EvaluateProcessorVersionResponse expectedResponse = + EvaluateProcessorVersionResponse.newBuilder().setEvaluation("evaluation858523452").build(); + Operation resultOperation = + Operation.newBuilder() + .setName("evaluateProcessorVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String processorVersion = + "projects/project-7729/locations/location-7729/processors/processor-7729/processorVersions/processorVersion-7729"; + + EvaluateProcessorVersionResponse actualResponse = + client.evaluateProcessorVersionAsync(processorVersion).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void evaluateProcessorVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String processorVersion = + "projects/project-7729/locations/location-7729/processors/processor-7729/processorVersions/processorVersion-7729"; + client.evaluateProcessorVersionAsync(processorVersion).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getEvaluationTest() throws Exception { + Evaluation expectedResponse = + Evaluation.newBuilder() + .setName( + EvaluationName.of( + "[PROJECT]", + "[LOCATION]", + "[PROCESSOR]", + "[PROCESSOR_VERSION]", + "[EVALUATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDocumentCounters(Evaluation.Counters.newBuilder().build()) + .setAllEntitiesMetrics(Evaluation.MultiConfidenceMetrics.newBuilder().build()) + .putAllEntityMetrics(new HashMap()) + .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyVersionName("kmsKeyVersionName-1798811307") + .build(); + mockService.addResponse(expectedResponse); + + EvaluationName name = + EvaluationName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]", "[EVALUATION]"); + + Evaluation actualResponse = client.getEvaluation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getEvaluationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + EvaluationName name = + EvaluationName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]", "[EVALUATION]"); + client.getEvaluation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEvaluationTest2() throws Exception { + Evaluation expectedResponse = + Evaluation.newBuilder() + .setName( + EvaluationName.of( + "[PROJECT]", + "[LOCATION]", + "[PROCESSOR]", + "[PROCESSOR_VERSION]", + "[EVALUATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDocumentCounters(Evaluation.Counters.newBuilder().build()) + .setAllEntitiesMetrics(Evaluation.MultiConfidenceMetrics.newBuilder().build()) + .putAllEntityMetrics(new HashMap()) + .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyVersionName("kmsKeyVersionName-1798811307") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6701/locations/location-6701/processors/processor-6701/processorVersions/processorVersion-6701/evaluations/evaluation-6701"; + + Evaluation actualResponse = client.getEvaluation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getEvaluationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6701/locations/location-6701/processors/processor-6701/processorVersions/processorVersion-6701/evaluations/evaluation-6701"; + client.getEvaluation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEvaluationsTest() throws Exception { + Evaluation responsesElement = Evaluation.newBuilder().build(); + ListEvaluationsResponse expectedResponse = + ListEvaluationsResponse.newBuilder() + .setNextPageToken("") + .addAllEvaluations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProcessorVersionName parent = + ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]"); + + ListEvaluationsPagedResponse pagedListResponse = client.listEvaluations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEvaluationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listEvaluationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProcessorVersionName parent = + ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]"); + client.listEvaluations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEvaluationsTest2() throws Exception { + Evaluation responsesElement = Evaluation.newBuilder().build(); + ListEvaluationsResponse expectedResponse = + ListEvaluationsResponse.newBuilder() + .setNextPageToken("") + .addAllEvaluations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-1781/locations/location-1781/processors/processor-1781/processorVersions/processorVersion-1781"; + + ListEvaluationsPagedResponse pagedListResponse = client.listEvaluations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEvaluationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listEvaluationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-1781/locations/location-1781/processors/processor-1781/processorVersions/processorVersion-1781"; + client.listEvaluations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClientTest.java b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClientTest.java index bc43a4243d0f..7e8f34c5e521 100644 --- a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClientTest.java +++ b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClientTest.java @@ -16,6 +16,7 @@ package com.google.cloud.documentai.v1beta3; +import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListEvaluationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListLocationsPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse; import static com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse; @@ -609,6 +610,108 @@ public void getProcessorExceptionTest2() throws Exception { } } + @Test + public void trainProcessorVersionTest() throws Exception { + TrainProcessorVersionResponse expectedResponse = + TrainProcessorVersionResponse.newBuilder() + .setProcessorVersion("processorVersion-1941143578") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("trainProcessorVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDocumentProcessorService.addResponse(resultOperation); + + ProcessorName parent = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + ProcessorVersion processorVersion = ProcessorVersion.newBuilder().build(); + + TrainProcessorVersionResponse actualResponse = + client.trainProcessorVersionAsync(parent, processorVersion).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentProcessorService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TrainProcessorVersionRequest actualRequest = + ((TrainProcessorVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(processorVersion, actualRequest.getProcessorVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void trainProcessorVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentProcessorService.addException(exception); + + try { + ProcessorName parent = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + ProcessorVersion processorVersion = ProcessorVersion.newBuilder().build(); + client.trainProcessorVersionAsync(parent, processorVersion).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void trainProcessorVersionTest2() throws Exception { + TrainProcessorVersionResponse expectedResponse = + TrainProcessorVersionResponse.newBuilder() + .setProcessorVersion("processorVersion-1941143578") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("trainProcessorVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDocumentProcessorService.addResponse(resultOperation); + + String parent = "parent-995424086"; + ProcessorVersion processorVersion = ProcessorVersion.newBuilder().build(); + + TrainProcessorVersionResponse actualResponse = + client.trainProcessorVersionAsync(parent, processorVersion).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentProcessorService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TrainProcessorVersionRequest actualRequest = + ((TrainProcessorVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(processorVersion, actualRequest.getProcessorVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void trainProcessorVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentProcessorService.addException(exception); + + try { + String parent = "parent-995424086"; + ProcessorVersion processorVersion = ProcessorVersion.newBuilder().build(); + client.trainProcessorVersionAsync(parent, processorVersion).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void getProcessorVersionTest() throws Exception { ProcessorVersion expectedResponse = @@ -618,6 +721,7 @@ public void getProcessorVersionTest() throws Exception { "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]") .toString()) .setDisplayName("displayName1714148973") + .setDocumentSchema(DocumentSchema.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") .setKmsKeyVersionName("kmsKeyVersionName-1798811307") @@ -667,6 +771,7 @@ public void getProcessorVersionTest2() throws Exception { "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]") .toString()) .setDisplayName("displayName1714148973") + .setDocumentSchema(DocumentSchema.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") .setKmsKeyVersionName("kmsKeyVersionName-1798811307") @@ -1509,6 +1614,296 @@ public void reviewDocumentExceptionTest2() throws Exception { } } + @Test + public void evaluateProcessorVersionTest() throws Exception { + EvaluateProcessorVersionResponse expectedResponse = + EvaluateProcessorVersionResponse.newBuilder().setEvaluation("evaluation858523452").build(); + Operation resultOperation = + Operation.newBuilder() + .setName("evaluateProcessorVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDocumentProcessorService.addResponse(resultOperation); + + ProcessorVersionName processorVersion = + ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]"); + + EvaluateProcessorVersionResponse actualResponse = + client.evaluateProcessorVersionAsync(processorVersion).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentProcessorService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + EvaluateProcessorVersionRequest actualRequest = + ((EvaluateProcessorVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(processorVersion.toString(), actualRequest.getProcessorVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void evaluateProcessorVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentProcessorService.addException(exception); + + try { + ProcessorVersionName processorVersion = + ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]"); + client.evaluateProcessorVersionAsync(processorVersion).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void evaluateProcessorVersionTest2() throws Exception { + EvaluateProcessorVersionResponse expectedResponse = + EvaluateProcessorVersionResponse.newBuilder().setEvaluation("evaluation858523452").build(); + Operation resultOperation = + Operation.newBuilder() + .setName("evaluateProcessorVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDocumentProcessorService.addResponse(resultOperation); + + String processorVersion = "processorVersion-1941143578"; + + EvaluateProcessorVersionResponse actualResponse = + client.evaluateProcessorVersionAsync(processorVersion).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentProcessorService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + EvaluateProcessorVersionRequest actualRequest = + ((EvaluateProcessorVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(processorVersion, actualRequest.getProcessorVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void evaluateProcessorVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentProcessorService.addException(exception); + + try { + String processorVersion = "processorVersion-1941143578"; + client.evaluateProcessorVersionAsync(processorVersion).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getEvaluationTest() throws Exception { + Evaluation expectedResponse = + Evaluation.newBuilder() + .setName( + EvaluationName.of( + "[PROJECT]", + "[LOCATION]", + "[PROCESSOR]", + "[PROCESSOR_VERSION]", + "[EVALUATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDocumentCounters(Evaluation.Counters.newBuilder().build()) + .setAllEntitiesMetrics(Evaluation.MultiConfidenceMetrics.newBuilder().build()) + .putAllEntityMetrics(new HashMap()) + .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyVersionName("kmsKeyVersionName-1798811307") + .build(); + mockDocumentProcessorService.addResponse(expectedResponse); + + EvaluationName name = + EvaluationName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]", "[EVALUATION]"); + + Evaluation actualResponse = client.getEvaluation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentProcessorService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEvaluationRequest actualRequest = ((GetEvaluationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEvaluationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentProcessorService.addException(exception); + + try { + EvaluationName name = + EvaluationName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]", "[EVALUATION]"); + client.getEvaluation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEvaluationTest2() throws Exception { + Evaluation expectedResponse = + Evaluation.newBuilder() + .setName( + EvaluationName.of( + "[PROJECT]", + "[LOCATION]", + "[PROCESSOR]", + "[PROCESSOR_VERSION]", + "[EVALUATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDocumentCounters(Evaluation.Counters.newBuilder().build()) + .setAllEntitiesMetrics(Evaluation.MultiConfidenceMetrics.newBuilder().build()) + .putAllEntityMetrics(new HashMap()) + .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyVersionName("kmsKeyVersionName-1798811307") + .build(); + mockDocumentProcessorService.addResponse(expectedResponse); + + String name = "name3373707"; + + Evaluation actualResponse = client.getEvaluation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentProcessorService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEvaluationRequest actualRequest = ((GetEvaluationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEvaluationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentProcessorService.addException(exception); + + try { + String name = "name3373707"; + client.getEvaluation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEvaluationsTest() throws Exception { + Evaluation responsesElement = Evaluation.newBuilder().build(); + ListEvaluationsResponse expectedResponse = + ListEvaluationsResponse.newBuilder() + .setNextPageToken("") + .addAllEvaluations(Arrays.asList(responsesElement)) + .build(); + mockDocumentProcessorService.addResponse(expectedResponse); + + ProcessorVersionName parent = + ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]"); + + ListEvaluationsPagedResponse pagedListResponse = client.listEvaluations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEvaluationsList().get(0), resources.get(0)); + + List actualRequests = mockDocumentProcessorService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEvaluationsRequest actualRequest = ((ListEvaluationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEvaluationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentProcessorService.addException(exception); + + try { + ProcessorVersionName parent = + ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]"); + client.listEvaluations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEvaluationsTest2() throws Exception { + Evaluation responsesElement = Evaluation.newBuilder().build(); + ListEvaluationsResponse expectedResponse = + ListEvaluationsResponse.newBuilder() + .setNextPageToken("") + .addAllEvaluations(Arrays.asList(responsesElement)) + .build(); + mockDocumentProcessorService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListEvaluationsPagedResponse pagedListResponse = client.listEvaluations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEvaluationsList().get(0), resources.get(0)); + + List actualRequests = mockDocumentProcessorService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEvaluationsRequest actualRequest = ((ListEvaluationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEvaluationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentProcessorService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listEvaluations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentProcessorServiceImpl.java b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentProcessorServiceImpl.java index 2d348b26dd59..5085ce89f4ab 100644 --- a/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentProcessorServiceImpl.java +++ b/java-document-ai/google-cloud-document-ai/src/test/java/com/google/cloud/documentai/v1beta3/MockDocumentProcessorServiceImpl.java @@ -187,6 +187,27 @@ public void getProcessor( } } + @Override + public void trainProcessorVersion( + TrainProcessorVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method TrainProcessorVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void getProcessorVersion( GetProcessorVersionRequest request, StreamObserver responseObserver) { @@ -418,4 +439,67 @@ public void reviewDocument( Exception.class.getName()))); } } + + @Override + public void evaluateProcessorVersion( + EvaluateProcessorVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method EvaluateProcessorVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getEvaluation( + GetEvaluationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Evaluation) { + requests.add(request); + responseObserver.onNext(((Evaluation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetEvaluation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Evaluation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listEvaluations( + ListEvaluationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListEvaluationsResponse) { + requests.add(request); + responseObserver.onNext(((ListEvaluationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListEvaluations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListEvaluationsResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-document-ai/grpc-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceGrpc.java b/java-document-ai/grpc-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceGrpc.java index 6cd9101920e6..01711f238624 100644 --- a/java-document-ai/grpc-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceGrpc.java +++ b/java-document-ai/grpc-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceGrpc.java @@ -334,6 +334,58 @@ private DocumentProcessorServiceGrpc() {} return getGetProcessorMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest, + com.google.longrunning.Operation> + getTrainProcessorVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "TrainProcessorVersion", + requestType = com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest, + com.google.longrunning.Operation> + getTrainProcessorVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest, + com.google.longrunning.Operation> + getTrainProcessorVersionMethod; + if ((getTrainProcessorVersionMethod = + DocumentProcessorServiceGrpc.getTrainProcessorVersionMethod) + == null) { + synchronized (DocumentProcessorServiceGrpc.class) { + if ((getTrainProcessorVersionMethod = + DocumentProcessorServiceGrpc.getTrainProcessorVersionMethod) + == null) { + DocumentProcessorServiceGrpc.getTrainProcessorVersionMethod = + getTrainProcessorVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "TrainProcessorVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DocumentProcessorServiceMethodDescriptorSupplier( + "TrainProcessorVersion")) + .build(); + } + } + } + return getTrainProcessorVersionMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.documentai.v1beta3.GetProcessorVersionRequest, com.google.cloud.documentai.v1beta3.ProcessorVersion> @@ -886,6 +938,154 @@ private DocumentProcessorServiceGrpc() {} return getReviewDocumentMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest, + com.google.longrunning.Operation> + getEvaluateProcessorVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "EvaluateProcessorVersion", + requestType = com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest, + com.google.longrunning.Operation> + getEvaluateProcessorVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest, + com.google.longrunning.Operation> + getEvaluateProcessorVersionMethod; + if ((getEvaluateProcessorVersionMethod = + DocumentProcessorServiceGrpc.getEvaluateProcessorVersionMethod) + == null) { + synchronized (DocumentProcessorServiceGrpc.class) { + if ((getEvaluateProcessorVersionMethod = + DocumentProcessorServiceGrpc.getEvaluateProcessorVersionMethod) + == null) { + DocumentProcessorServiceGrpc.getEvaluateProcessorVersionMethod = + getEvaluateProcessorVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "EvaluateProcessorVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DocumentProcessorServiceMethodDescriptorSupplier( + "EvaluateProcessorVersion")) + .build(); + } + } + } + return getEvaluateProcessorVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.documentai.v1beta3.GetEvaluationRequest, + com.google.cloud.documentai.v1beta3.Evaluation> + getGetEvaluationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetEvaluation", + requestType = com.google.cloud.documentai.v1beta3.GetEvaluationRequest.class, + responseType = com.google.cloud.documentai.v1beta3.Evaluation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.documentai.v1beta3.GetEvaluationRequest, + com.google.cloud.documentai.v1beta3.Evaluation> + getGetEvaluationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.documentai.v1beta3.GetEvaluationRequest, + com.google.cloud.documentai.v1beta3.Evaluation> + getGetEvaluationMethod; + if ((getGetEvaluationMethod = DocumentProcessorServiceGrpc.getGetEvaluationMethod) == null) { + synchronized (DocumentProcessorServiceGrpc.class) { + if ((getGetEvaluationMethod = DocumentProcessorServiceGrpc.getGetEvaluationMethod) + == null) { + DocumentProcessorServiceGrpc.getGetEvaluationMethod = + getGetEvaluationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEvaluation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.documentai.v1beta3.GetEvaluationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.documentai.v1beta3.Evaluation.getDefaultInstance())) + .setSchemaDescriptor( + new DocumentProcessorServiceMethodDescriptorSupplier("GetEvaluation")) + .build(); + } + } + } + return getGetEvaluationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest, + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse> + getListEvaluationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEvaluations", + requestType = com.google.cloud.documentai.v1beta3.ListEvaluationsRequest.class, + responseType = com.google.cloud.documentai.v1beta3.ListEvaluationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest, + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse> + getListEvaluationsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest, + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse> + getListEvaluationsMethod; + if ((getListEvaluationsMethod = DocumentProcessorServiceGrpc.getListEvaluationsMethod) + == null) { + synchronized (DocumentProcessorServiceGrpc.class) { + if ((getListEvaluationsMethod = DocumentProcessorServiceGrpc.getListEvaluationsMethod) + == null) { + DocumentProcessorServiceGrpc.getListEvaluationsMethod = + getListEvaluationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEvaluations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DocumentProcessorServiceMethodDescriptorSupplier("ListEvaluations")) + .build(); + } + } + } + return getListEvaluationsMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static DocumentProcessorServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -1030,6 +1230,22 @@ public void getProcessor( getGetProcessorMethod(), responseObserver); } + /** + * + * + *
+     * Trains a new processor version.
+     * Operation metadata is returned as
+     * cloud_documentai_core.TrainProcessorVersionMetadata.
+     * 
+ */ + public void trainProcessorVersion( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getTrainProcessorVersionMethod(), responseObserver); + } + /** * * @@ -1194,6 +1410,51 @@ public void reviewDocument( getReviewDocumentMethod(), responseObserver); } + /** + * + * + *
+     * Evaluates a ProcessorVersion against annotated documents, producing an
+     * Evaluation.
+     * 
+ */ + public void evaluateProcessorVersion( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getEvaluateProcessorVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves a specific evaluation.
+     * 
+ */ + public void getEvaluation( + com.google.cloud.documentai.v1beta3.GetEvaluationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetEvaluationMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves a set of evaluations for a given processor version.
+     * 
+ */ + public void listEvaluations( + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListEvaluationsMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -1237,6 +1498,12 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.documentai.v1beta3.GetProcessorRequest, com.google.cloud.documentai.v1beta3.Processor>(this, METHODID_GET_PROCESSOR))) + .addMethod( + getTrainProcessorVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest, + com.google.longrunning.Operation>(this, METHODID_TRAIN_PROCESSOR_VERSION))) .addMethod( getGetProcessorVersionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1307,6 +1574,26 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.documentai.v1beta3.ReviewDocumentRequest, com.google.longrunning.Operation>(this, METHODID_REVIEW_DOCUMENT))) + .addMethod( + getEvaluateProcessorVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest, + com.google.longrunning.Operation>(this, METHODID_EVALUATE_PROCESSOR_VERSION))) + .addMethod( + getGetEvaluationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.documentai.v1beta3.GetEvaluationRequest, + com.google.cloud.documentai.v1beta3.Evaluation>( + this, METHODID_GET_EVALUATION))) + .addMethod( + getListEvaluationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest, + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse>( + this, METHODID_LIST_EVALUATIONS))) .build(); } } @@ -1436,6 +1723,24 @@ public void getProcessor( responseObserver); } + /** + * + * + *
+     * Trains a new processor version.
+     * Operation metadata is returned as
+     * cloud_documentai_core.TrainProcessorVersionMetadata.
+     * 
+ */ + public void trainProcessorVersion( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getTrainProcessorVersionMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1621,6 +1926,57 @@ public void reviewDocument( request, responseObserver); } + + /** + * + * + *
+     * Evaluates a ProcessorVersion against annotated documents, producing an
+     * Evaluation.
+     * 
+ */ + public void evaluateProcessorVersion( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getEvaluateProcessorVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves a specific evaluation.
+     * 
+ */ + public void getEvaluation( + com.google.cloud.documentai.v1beta3.GetEvaluationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetEvaluationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves a set of evaluations for a given processor version.
+     * 
+ */ + public void listEvaluations( + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListEvaluationsMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -1726,6 +2082,21 @@ public com.google.cloud.documentai.v1beta3.Processor getProcessor( getChannel(), getGetProcessorMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Trains a new processor version.
+     * Operation metadata is returned as
+     * cloud_documentai_core.TrainProcessorVersionMetadata.
+     * 
+ */ + public com.google.longrunning.Operation trainProcessorVersion( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getTrainProcessorVersionMethod(), getCallOptions(), request); + } + /** * * @@ -1874,6 +2245,46 @@ public com.google.longrunning.Operation reviewDocument( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getReviewDocumentMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Evaluates a ProcessorVersion against annotated documents, producing an
+     * Evaluation.
+     * 
+ */ + public com.google.longrunning.Operation evaluateProcessorVersion( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getEvaluateProcessorVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves a specific evaluation.
+     * 
+ */ + public com.google.cloud.documentai.v1beta3.Evaluation getEvaluation( + com.google.cloud.documentai.v1beta3.GetEvaluationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetEvaluationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves a set of evaluations for a given processor version.
+     * 
+ */ + public com.google.cloud.documentai.v1beta3.ListEvaluationsResponse listEvaluations( + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListEvaluationsMethod(), getCallOptions(), request); + } } /** @@ -1985,6 +2396,22 @@ protected DocumentProcessorServiceFutureStub build( getChannel().newCall(getGetProcessorMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Trains a new processor version.
+     * Operation metadata is returned as
+     * cloud_documentai_core.TrainProcessorVersionMetadata.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + trainProcessorVersion( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getTrainProcessorVersionMethod(), getCallOptions()), request); + } + /** * * @@ -2142,6 +2569,49 @@ protected DocumentProcessorServiceFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getReviewDocumentMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Evaluates a ProcessorVersion against annotated documents, producing an
+     * Evaluation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + evaluateProcessorVersion( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getEvaluateProcessorVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves a specific evaluation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.documentai.v1beta3.Evaluation> + getEvaluation(com.google.cloud.documentai.v1beta3.GetEvaluationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetEvaluationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves a set of evaluations for a given processor version.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse> + listEvaluations(com.google.cloud.documentai.v1beta3.ListEvaluationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListEvaluationsMethod(), getCallOptions()), request); + } } private static final int METHODID_PROCESS_DOCUMENT = 0; @@ -2150,17 +2620,21 @@ protected DocumentProcessorServiceFutureStub build( private static final int METHODID_LIST_PROCESSOR_TYPES = 3; private static final int METHODID_LIST_PROCESSORS = 4; private static final int METHODID_GET_PROCESSOR = 5; - private static final int METHODID_GET_PROCESSOR_VERSION = 6; - private static final int METHODID_LIST_PROCESSOR_VERSIONS = 7; - private static final int METHODID_DELETE_PROCESSOR_VERSION = 8; - private static final int METHODID_DEPLOY_PROCESSOR_VERSION = 9; - private static final int METHODID_UNDEPLOY_PROCESSOR_VERSION = 10; - private static final int METHODID_CREATE_PROCESSOR = 11; - private static final int METHODID_DELETE_PROCESSOR = 12; - private static final int METHODID_ENABLE_PROCESSOR = 13; - private static final int METHODID_DISABLE_PROCESSOR = 14; - private static final int METHODID_SET_DEFAULT_PROCESSOR_VERSION = 15; - private static final int METHODID_REVIEW_DOCUMENT = 16; + private static final int METHODID_TRAIN_PROCESSOR_VERSION = 6; + private static final int METHODID_GET_PROCESSOR_VERSION = 7; + private static final int METHODID_LIST_PROCESSOR_VERSIONS = 8; + private static final int METHODID_DELETE_PROCESSOR_VERSION = 9; + private static final int METHODID_DEPLOY_PROCESSOR_VERSION = 10; + private static final int METHODID_UNDEPLOY_PROCESSOR_VERSION = 11; + private static final int METHODID_CREATE_PROCESSOR = 12; + private static final int METHODID_DELETE_PROCESSOR = 13; + private static final int METHODID_ENABLE_PROCESSOR = 14; + private static final int METHODID_DISABLE_PROCESSOR = 15; + private static final int METHODID_SET_DEFAULT_PROCESSOR_VERSION = 16; + private static final int METHODID_REVIEW_DOCUMENT = 17; + private static final int METHODID_EVALUATE_PROCESSOR_VERSION = 18; + private static final int METHODID_GET_EVALUATION = 19; + private static final int METHODID_LIST_EVALUATIONS = 20; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2217,6 +2691,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_TRAIN_PROCESSOR_VERSION: + serviceImpl.trainProcessorVersion( + (com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_GET_PROCESSOR_VERSION: serviceImpl.getProcessorVersion( (com.google.cloud.documentai.v1beta3.GetProcessorVersionRequest) request, @@ -2276,6 +2755,24 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.documentai.v1beta3.ReviewDocumentRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_EVALUATE_PROCESSOR_VERSION: + serviceImpl.evaluateProcessorVersion( + (com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_EVALUATION: + serviceImpl.getEvaluation( + (com.google.cloud.documentai.v1beta3.GetEvaluationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_EVALUATIONS: + serviceImpl.listEvaluations( + (com.google.cloud.documentai.v1beta3.ListEvaluationsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -2346,6 +2843,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListProcessorTypesMethod()) .addMethod(getListProcessorsMethod()) .addMethod(getGetProcessorMethod()) + .addMethod(getTrainProcessorVersionMethod()) .addMethod(getGetProcessorVersionMethod()) .addMethod(getListProcessorVersionsMethod()) .addMethod(getDeleteProcessorVersionMethod()) @@ -2357,6 +2855,9 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDisableProcessorMethod()) .addMethod(getSetDefaultProcessorVersionMethod()) .addMethod(getReviewDocumentMethod()) + .addMethod(getEvaluateProcessorVersionMethod()) + .addMethod(getGetEvaluationMethod()) + .addMethod(getListEvaluationsMethod()) .build(); } } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Barcode.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Barcode.java index 09971da4e65c..037dc46ad7a3 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Barcode.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Barcode.java @@ -77,20 +77,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Format of a barcode.
    * The supported formats are:
-   *   CODE_128: Code 128 type.
-   *   CODE_39: Code 39 type.
-   *   CODE_93: Code 93 type.
-   *   CODABAR: Codabar type.
-   *   DATA_MATRIX: 2D Data Matrix type.
-   *   ITF: ITF type.
-   *   EAN_13: EAN-13 type.
-   *   EAN_8: EAN-8 type.
-   *   QR_CODE: 2D QR code type.
-   *   UPC_A: UPC-A type.
-   *   UPC_E: UPC-E type.
-   *   PDF417: PDF417 type.
-   *   AZTEC: 2D Aztec code type.
-   *   DATABAR: GS1 DataBar code type.
+   * - `CODE_128`: Code 128 type.
+   * - `CODE_39`: Code 39 type.
+   * - `CODE_93`: Code 93 type.
+   * - `CODABAR`: Codabar type.
+   * - `DATA_MATRIX`: 2D Data Matrix type.
+   * - `ITF`: ITF type.
+   * - `EAN_13`: EAN-13 type.
+   * - `EAN_8`: EAN-8 type.
+   * - `QR_CODE`: 2D QR code type.
+   * - `UPC_A`: UPC-A type.
+   * - `UPC_E`: UPC-E type.
+   * - `PDF417`: PDF417 type.
+   * - `AZTEC`: 2D Aztec code type.
+   * - `DATABAR`: GS1 DataBar code type.
    * 
* * string format = 1; @@ -115,20 +115,20 @@ public java.lang.String getFormat() { *
    * Format of a barcode.
    * The supported formats are:
-   *   CODE_128: Code 128 type.
-   *   CODE_39: Code 39 type.
-   *   CODE_93: Code 93 type.
-   *   CODABAR: Codabar type.
-   *   DATA_MATRIX: 2D Data Matrix type.
-   *   ITF: ITF type.
-   *   EAN_13: EAN-13 type.
-   *   EAN_8: EAN-8 type.
-   *   QR_CODE: 2D QR code type.
-   *   UPC_A: UPC-A type.
-   *   UPC_E: UPC-E type.
-   *   PDF417: PDF417 type.
-   *   AZTEC: 2D Aztec code type.
-   *   DATABAR: GS1 DataBar code type.
+   * - `CODE_128`: Code 128 type.
+   * - `CODE_39`: Code 39 type.
+   * - `CODE_93`: Code 93 type.
+   * - `CODABAR`: Codabar type.
+   * - `DATA_MATRIX`: 2D Data Matrix type.
+   * - `ITF`: ITF type.
+   * - `EAN_13`: EAN-13 type.
+   * - `EAN_8`: EAN-8 type.
+   * - `QR_CODE`: 2D QR code type.
+   * - `UPC_A`: UPC-A type.
+   * - `UPC_E`: UPC-E type.
+   * - `PDF417`: PDF417 type.
+   * - `AZTEC`: 2D Aztec code type.
+   * - `DATABAR`: GS1 DataBar code type.
    * 
* * string format = 1; @@ -157,18 +157,18 @@ public com.google.protobuf.ByteString getFormatBytes() { * Value format describes the format of the value that a barcode * encodes. * The supported formats are: - * CONTACT_INFO: Contact information. - * EMAIL: Email address. - * ISBN: ISBN identifier. - * PHONE: Phone number. - * PRODUCT: Product. - * SMS: SMS message. - * TEXT: Text string. - * URL: URL address. - * WIFI: Wifi information. - * GEO: Geo-localization. - * CALENDAR_EVENT: Calendar event. - * DRIVER_LICENSE: Driver's license. + * - `CONTACT_INFO`: Contact information. + * - `EMAIL`: Email address. + * - `ISBN`: ISBN identifier. + * - `PHONE`: Phone number. + * - `PRODUCT`: Product. + * - `SMS`: SMS message. + * - `TEXT`: Text string. + * - `URL`: URL address. + * - `WIFI`: Wifi information. + * - `GEO`: Geo-localization. + * - `CALENDAR_EVENT`: Calendar event. + * - `DRIVER_LICENSE`: Driver's license. * * * string value_format = 2; @@ -194,18 +194,18 @@ public java.lang.String getValueFormat() { * Value format describes the format of the value that a barcode * encodes. * The supported formats are: - * CONTACT_INFO: Contact information. - * EMAIL: Email address. - * ISBN: ISBN identifier. - * PHONE: Phone number. - * PRODUCT: Product. - * SMS: SMS message. - * TEXT: Text string. - * URL: URL address. - * WIFI: Wifi information. - * GEO: Geo-localization. - * CALENDAR_EVENT: Calendar event. - * DRIVER_LICENSE: Driver's license. + * - `CONTACT_INFO`: Contact information. + * - `EMAIL`: Email address. + * - `ISBN`: ISBN identifier. + * - `PHONE`: Phone number. + * - `PRODUCT`: Product. + * - `SMS`: SMS message. + * - `TEXT`: Text string. + * - `URL`: URL address. + * - `WIFI`: Wifi information. + * - `GEO`: Geo-localization. + * - `CALENDAR_EVENT`: Calendar event. + * - `DRIVER_LICENSE`: Driver's license. * * * string value_format = 2; @@ -232,7 +232,7 @@ public com.google.protobuf.ByteString getValueFormatBytes() { * *
    * Raw value encoded in the barcode.
-   * For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.
+   * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
    * 
* * string raw_value = 3; @@ -256,7 +256,7 @@ public java.lang.String getRawValue() { * *
    * Raw value encoded in the barcode.
-   * For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.
+   * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
    * 
* * string raw_value = 3; @@ -656,20 +656,20 @@ public Builder mergeFrom( *
      * Format of a barcode.
      * The supported formats are:
-     *   CODE_128: Code 128 type.
-     *   CODE_39: Code 39 type.
-     *   CODE_93: Code 93 type.
-     *   CODABAR: Codabar type.
-     *   DATA_MATRIX: 2D Data Matrix type.
-     *   ITF: ITF type.
-     *   EAN_13: EAN-13 type.
-     *   EAN_8: EAN-8 type.
-     *   QR_CODE: 2D QR code type.
-     *   UPC_A: UPC-A type.
-     *   UPC_E: UPC-E type.
-     *   PDF417: PDF417 type.
-     *   AZTEC: 2D Aztec code type.
-     *   DATABAR: GS1 DataBar code type.
+     * - `CODE_128`: Code 128 type.
+     * - `CODE_39`: Code 39 type.
+     * - `CODE_93`: Code 93 type.
+     * - `CODABAR`: Codabar type.
+     * - `DATA_MATRIX`: 2D Data Matrix type.
+     * - `ITF`: ITF type.
+     * - `EAN_13`: EAN-13 type.
+     * - `EAN_8`: EAN-8 type.
+     * - `QR_CODE`: 2D QR code type.
+     * - `UPC_A`: UPC-A type.
+     * - `UPC_E`: UPC-E type.
+     * - `PDF417`: PDF417 type.
+     * - `AZTEC`: 2D Aztec code type.
+     * - `DATABAR`: GS1 DataBar code type.
      * 
* * string format = 1; @@ -693,20 +693,20 @@ public java.lang.String getFormat() { *
      * Format of a barcode.
      * The supported formats are:
-     *   CODE_128: Code 128 type.
-     *   CODE_39: Code 39 type.
-     *   CODE_93: Code 93 type.
-     *   CODABAR: Codabar type.
-     *   DATA_MATRIX: 2D Data Matrix type.
-     *   ITF: ITF type.
-     *   EAN_13: EAN-13 type.
-     *   EAN_8: EAN-8 type.
-     *   QR_CODE: 2D QR code type.
-     *   UPC_A: UPC-A type.
-     *   UPC_E: UPC-E type.
-     *   PDF417: PDF417 type.
-     *   AZTEC: 2D Aztec code type.
-     *   DATABAR: GS1 DataBar code type.
+     * - `CODE_128`: Code 128 type.
+     * - `CODE_39`: Code 39 type.
+     * - `CODE_93`: Code 93 type.
+     * - `CODABAR`: Codabar type.
+     * - `DATA_MATRIX`: 2D Data Matrix type.
+     * - `ITF`: ITF type.
+     * - `EAN_13`: EAN-13 type.
+     * - `EAN_8`: EAN-8 type.
+     * - `QR_CODE`: 2D QR code type.
+     * - `UPC_A`: UPC-A type.
+     * - `UPC_E`: UPC-E type.
+     * - `PDF417`: PDF417 type.
+     * - `AZTEC`: 2D Aztec code type.
+     * - `DATABAR`: GS1 DataBar code type.
      * 
* * string format = 1; @@ -730,20 +730,20 @@ public com.google.protobuf.ByteString getFormatBytes() { *
      * Format of a barcode.
      * The supported formats are:
-     *   CODE_128: Code 128 type.
-     *   CODE_39: Code 39 type.
-     *   CODE_93: Code 93 type.
-     *   CODABAR: Codabar type.
-     *   DATA_MATRIX: 2D Data Matrix type.
-     *   ITF: ITF type.
-     *   EAN_13: EAN-13 type.
-     *   EAN_8: EAN-8 type.
-     *   QR_CODE: 2D QR code type.
-     *   UPC_A: UPC-A type.
-     *   UPC_E: UPC-E type.
-     *   PDF417: PDF417 type.
-     *   AZTEC: 2D Aztec code type.
-     *   DATABAR: GS1 DataBar code type.
+     * - `CODE_128`: Code 128 type.
+     * - `CODE_39`: Code 39 type.
+     * - `CODE_93`: Code 93 type.
+     * - `CODABAR`: Codabar type.
+     * - `DATA_MATRIX`: 2D Data Matrix type.
+     * - `ITF`: ITF type.
+     * - `EAN_13`: EAN-13 type.
+     * - `EAN_8`: EAN-8 type.
+     * - `QR_CODE`: 2D QR code type.
+     * - `UPC_A`: UPC-A type.
+     * - `UPC_E`: UPC-E type.
+     * - `PDF417`: PDF417 type.
+     * - `AZTEC`: 2D Aztec code type.
+     * - `DATABAR`: GS1 DataBar code type.
      * 
* * string format = 1; @@ -766,20 +766,20 @@ public Builder setFormat(java.lang.String value) { *
      * Format of a barcode.
      * The supported formats are:
-     *   CODE_128: Code 128 type.
-     *   CODE_39: Code 39 type.
-     *   CODE_93: Code 93 type.
-     *   CODABAR: Codabar type.
-     *   DATA_MATRIX: 2D Data Matrix type.
-     *   ITF: ITF type.
-     *   EAN_13: EAN-13 type.
-     *   EAN_8: EAN-8 type.
-     *   QR_CODE: 2D QR code type.
-     *   UPC_A: UPC-A type.
-     *   UPC_E: UPC-E type.
-     *   PDF417: PDF417 type.
-     *   AZTEC: 2D Aztec code type.
-     *   DATABAR: GS1 DataBar code type.
+     * - `CODE_128`: Code 128 type.
+     * - `CODE_39`: Code 39 type.
+     * - `CODE_93`: Code 93 type.
+     * - `CODABAR`: Codabar type.
+     * - `DATA_MATRIX`: 2D Data Matrix type.
+     * - `ITF`: ITF type.
+     * - `EAN_13`: EAN-13 type.
+     * - `EAN_8`: EAN-8 type.
+     * - `QR_CODE`: 2D QR code type.
+     * - `UPC_A`: UPC-A type.
+     * - `UPC_E`: UPC-E type.
+     * - `PDF417`: PDF417 type.
+     * - `AZTEC`: 2D Aztec code type.
+     * - `DATABAR`: GS1 DataBar code type.
      * 
* * string format = 1; @@ -798,20 +798,20 @@ public Builder clearFormat() { *
      * Format of a barcode.
      * The supported formats are:
-     *   CODE_128: Code 128 type.
-     *   CODE_39: Code 39 type.
-     *   CODE_93: Code 93 type.
-     *   CODABAR: Codabar type.
-     *   DATA_MATRIX: 2D Data Matrix type.
-     *   ITF: ITF type.
-     *   EAN_13: EAN-13 type.
-     *   EAN_8: EAN-8 type.
-     *   QR_CODE: 2D QR code type.
-     *   UPC_A: UPC-A type.
-     *   UPC_E: UPC-E type.
-     *   PDF417: PDF417 type.
-     *   AZTEC: 2D Aztec code type.
-     *   DATABAR: GS1 DataBar code type.
+     * - `CODE_128`: Code 128 type.
+     * - `CODE_39`: Code 39 type.
+     * - `CODE_93`: Code 93 type.
+     * - `CODABAR`: Codabar type.
+     * - `DATA_MATRIX`: 2D Data Matrix type.
+     * - `ITF`: ITF type.
+     * - `EAN_13`: EAN-13 type.
+     * - `EAN_8`: EAN-8 type.
+     * - `QR_CODE`: 2D QR code type.
+     * - `UPC_A`: UPC-A type.
+     * - `UPC_E`: UPC-E type.
+     * - `PDF417`: PDF417 type.
+     * - `AZTEC`: 2D Aztec code type.
+     * - `DATABAR`: GS1 DataBar code type.
      * 
* * string format = 1; @@ -838,18 +838,18 @@ public Builder setFormatBytes(com.google.protobuf.ByteString value) { * Value format describes the format of the value that a barcode * encodes. * The supported formats are: - * CONTACT_INFO: Contact information. - * EMAIL: Email address. - * ISBN: ISBN identifier. - * PHONE: Phone number. - * PRODUCT: Product. - * SMS: SMS message. - * TEXT: Text string. - * URL: URL address. - * WIFI: Wifi information. - * GEO: Geo-localization. - * CALENDAR_EVENT: Calendar event. - * DRIVER_LICENSE: Driver's license. + * - `CONTACT_INFO`: Contact information. + * - `EMAIL`: Email address. + * - `ISBN`: ISBN identifier. + * - `PHONE`: Phone number. + * - `PRODUCT`: Product. + * - `SMS`: SMS message. + * - `TEXT`: Text string. + * - `URL`: URL address. + * - `WIFI`: Wifi information. + * - `GEO`: Geo-localization. + * - `CALENDAR_EVENT`: Calendar event. + * - `DRIVER_LICENSE`: Driver's license. * * * string value_format = 2; @@ -874,18 +874,18 @@ public java.lang.String getValueFormat() { * Value format describes the format of the value that a barcode * encodes. * The supported formats are: - * CONTACT_INFO: Contact information. - * EMAIL: Email address. - * ISBN: ISBN identifier. - * PHONE: Phone number. - * PRODUCT: Product. - * SMS: SMS message. - * TEXT: Text string. - * URL: URL address. - * WIFI: Wifi information. - * GEO: Geo-localization. - * CALENDAR_EVENT: Calendar event. - * DRIVER_LICENSE: Driver's license. + * - `CONTACT_INFO`: Contact information. + * - `EMAIL`: Email address. + * - `ISBN`: ISBN identifier. + * - `PHONE`: Phone number. + * - `PRODUCT`: Product. + * - `SMS`: SMS message. + * - `TEXT`: Text string. + * - `URL`: URL address. + * - `WIFI`: Wifi information. + * - `GEO`: Geo-localization. + * - `CALENDAR_EVENT`: Calendar event. + * - `DRIVER_LICENSE`: Driver's license. * * * string value_format = 2; @@ -910,18 +910,18 @@ public com.google.protobuf.ByteString getValueFormatBytes() { * Value format describes the format of the value that a barcode * encodes. * The supported formats are: - * CONTACT_INFO: Contact information. - * EMAIL: Email address. - * ISBN: ISBN identifier. - * PHONE: Phone number. - * PRODUCT: Product. - * SMS: SMS message. - * TEXT: Text string. - * URL: URL address. - * WIFI: Wifi information. - * GEO: Geo-localization. - * CALENDAR_EVENT: Calendar event. - * DRIVER_LICENSE: Driver's license. + * - `CONTACT_INFO`: Contact information. + * - `EMAIL`: Email address. + * - `ISBN`: ISBN identifier. + * - `PHONE`: Phone number. + * - `PRODUCT`: Product. + * - `SMS`: SMS message. + * - `TEXT`: Text string. + * - `URL`: URL address. + * - `WIFI`: Wifi information. + * - `GEO`: Geo-localization. + * - `CALENDAR_EVENT`: Calendar event. + * - `DRIVER_LICENSE`: Driver's license. * * * string value_format = 2; @@ -945,18 +945,18 @@ public Builder setValueFormat(java.lang.String value) { * Value format describes the format of the value that a barcode * encodes. * The supported formats are: - * CONTACT_INFO: Contact information. - * EMAIL: Email address. - * ISBN: ISBN identifier. - * PHONE: Phone number. - * PRODUCT: Product. - * SMS: SMS message. - * TEXT: Text string. - * URL: URL address. - * WIFI: Wifi information. - * GEO: Geo-localization. - * CALENDAR_EVENT: Calendar event. - * DRIVER_LICENSE: Driver's license. + * - `CONTACT_INFO`: Contact information. + * - `EMAIL`: Email address. + * - `ISBN`: ISBN identifier. + * - `PHONE`: Phone number. + * - `PRODUCT`: Product. + * - `SMS`: SMS message. + * - `TEXT`: Text string. + * - `URL`: URL address. + * - `WIFI`: Wifi information. + * - `GEO`: Geo-localization. + * - `CALENDAR_EVENT`: Calendar event. + * - `DRIVER_LICENSE`: Driver's license. * * * string value_format = 2; @@ -976,18 +976,18 @@ public Builder clearValueFormat() { * Value format describes the format of the value that a barcode * encodes. * The supported formats are: - * CONTACT_INFO: Contact information. - * EMAIL: Email address. - * ISBN: ISBN identifier. - * PHONE: Phone number. - * PRODUCT: Product. - * SMS: SMS message. - * TEXT: Text string. - * URL: URL address. - * WIFI: Wifi information. - * GEO: Geo-localization. - * CALENDAR_EVENT: Calendar event. - * DRIVER_LICENSE: Driver's license. + * - `CONTACT_INFO`: Contact information. + * - `EMAIL`: Email address. + * - `ISBN`: ISBN identifier. + * - `PHONE`: Phone number. + * - `PRODUCT`: Product. + * - `SMS`: SMS message. + * - `TEXT`: Text string. + * - `URL`: URL address. + * - `WIFI`: Wifi information. + * - `GEO`: Geo-localization. + * - `CALENDAR_EVENT`: Calendar event. + * - `DRIVER_LICENSE`: Driver's license. * * * string value_format = 2; @@ -1012,7 +1012,7 @@ public Builder setValueFormatBytes(com.google.protobuf.ByteString value) { * *
      * Raw value encoded in the barcode.
-     * For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.
+     * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
      * 
* * string raw_value = 3; @@ -1035,7 +1035,7 @@ public java.lang.String getRawValue() { * *
      * Raw value encoded in the barcode.
-     * For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.
+     * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
      * 
* * string raw_value = 3; @@ -1058,7 +1058,7 @@ public com.google.protobuf.ByteString getRawValueBytes() { * *
      * Raw value encoded in the barcode.
-     * For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.
+     * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
      * 
* * string raw_value = 3; @@ -1080,7 +1080,7 @@ public Builder setRawValue(java.lang.String value) { * *
      * Raw value encoded in the barcode.
-     * For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.
+     * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
      * 
* * string raw_value = 3; @@ -1098,7 +1098,7 @@ public Builder clearRawValue() { * *
      * Raw value encoded in the barcode.
-     * For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.
+     * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
      * 
* * string raw_value = 3; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BarcodeOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BarcodeOrBuilder.java index 89bd490c9136..7a499515f411 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BarcodeOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BarcodeOrBuilder.java @@ -29,20 +29,20 @@ public interface BarcodeOrBuilder *
    * Format of a barcode.
    * The supported formats are:
-   *   CODE_128: Code 128 type.
-   *   CODE_39: Code 39 type.
-   *   CODE_93: Code 93 type.
-   *   CODABAR: Codabar type.
-   *   DATA_MATRIX: 2D Data Matrix type.
-   *   ITF: ITF type.
-   *   EAN_13: EAN-13 type.
-   *   EAN_8: EAN-8 type.
-   *   QR_CODE: 2D QR code type.
-   *   UPC_A: UPC-A type.
-   *   UPC_E: UPC-E type.
-   *   PDF417: PDF417 type.
-   *   AZTEC: 2D Aztec code type.
-   *   DATABAR: GS1 DataBar code type.
+   * - `CODE_128`: Code 128 type.
+   * - `CODE_39`: Code 39 type.
+   * - `CODE_93`: Code 93 type.
+   * - `CODABAR`: Codabar type.
+   * - `DATA_MATRIX`: 2D Data Matrix type.
+   * - `ITF`: ITF type.
+   * - `EAN_13`: EAN-13 type.
+   * - `EAN_8`: EAN-8 type.
+   * - `QR_CODE`: 2D QR code type.
+   * - `UPC_A`: UPC-A type.
+   * - `UPC_E`: UPC-E type.
+   * - `PDF417`: PDF417 type.
+   * - `AZTEC`: 2D Aztec code type.
+   * - `DATABAR`: GS1 DataBar code type.
    * 
* * string format = 1; @@ -56,20 +56,20 @@ public interface BarcodeOrBuilder *
    * Format of a barcode.
    * The supported formats are:
-   *   CODE_128: Code 128 type.
-   *   CODE_39: Code 39 type.
-   *   CODE_93: Code 93 type.
-   *   CODABAR: Codabar type.
-   *   DATA_MATRIX: 2D Data Matrix type.
-   *   ITF: ITF type.
-   *   EAN_13: EAN-13 type.
-   *   EAN_8: EAN-8 type.
-   *   QR_CODE: 2D QR code type.
-   *   UPC_A: UPC-A type.
-   *   UPC_E: UPC-E type.
-   *   PDF417: PDF417 type.
-   *   AZTEC: 2D Aztec code type.
-   *   DATABAR: GS1 DataBar code type.
+   * - `CODE_128`: Code 128 type.
+   * - `CODE_39`: Code 39 type.
+   * - `CODE_93`: Code 93 type.
+   * - `CODABAR`: Codabar type.
+   * - `DATA_MATRIX`: 2D Data Matrix type.
+   * - `ITF`: ITF type.
+   * - `EAN_13`: EAN-13 type.
+   * - `EAN_8`: EAN-8 type.
+   * - `QR_CODE`: 2D QR code type.
+   * - `UPC_A`: UPC-A type.
+   * - `UPC_E`: UPC-E type.
+   * - `PDF417`: PDF417 type.
+   * - `AZTEC`: 2D Aztec code type.
+   * - `DATABAR`: GS1 DataBar code type.
    * 
* * string format = 1; @@ -85,18 +85,18 @@ public interface BarcodeOrBuilder * Value format describes the format of the value that a barcode * encodes. * The supported formats are: - * CONTACT_INFO: Contact information. - * EMAIL: Email address. - * ISBN: ISBN identifier. - * PHONE: Phone number. - * PRODUCT: Product. - * SMS: SMS message. - * TEXT: Text string. - * URL: URL address. - * WIFI: Wifi information. - * GEO: Geo-localization. - * CALENDAR_EVENT: Calendar event. - * DRIVER_LICENSE: Driver's license. + * - `CONTACT_INFO`: Contact information. + * - `EMAIL`: Email address. + * - `ISBN`: ISBN identifier. + * - `PHONE`: Phone number. + * - `PRODUCT`: Product. + * - `SMS`: SMS message. + * - `TEXT`: Text string. + * - `URL`: URL address. + * - `WIFI`: Wifi information. + * - `GEO`: Geo-localization. + * - `CALENDAR_EVENT`: Calendar event. + * - `DRIVER_LICENSE`: Driver's license. * * * string value_format = 2; @@ -111,18 +111,18 @@ public interface BarcodeOrBuilder * Value format describes the format of the value that a barcode * encodes. * The supported formats are: - * CONTACT_INFO: Contact information. - * EMAIL: Email address. - * ISBN: ISBN identifier. - * PHONE: Phone number. - * PRODUCT: Product. - * SMS: SMS message. - * TEXT: Text string. - * URL: URL address. - * WIFI: Wifi information. - * GEO: Geo-localization. - * CALENDAR_EVENT: Calendar event. - * DRIVER_LICENSE: Driver's license. + * - `CONTACT_INFO`: Contact information. + * - `EMAIL`: Email address. + * - `ISBN`: ISBN identifier. + * - `PHONE`: Phone number. + * - `PRODUCT`: Product. + * - `SMS`: SMS message. + * - `TEXT`: Text string. + * - `URL`: URL address. + * - `WIFI`: Wifi information. + * - `GEO`: Geo-localization. + * - `CALENDAR_EVENT`: Calendar event. + * - `DRIVER_LICENSE`: Driver's license. * * * string value_format = 2; @@ -136,7 +136,7 @@ public interface BarcodeOrBuilder * *
    * Raw value encoded in the barcode.
-   * For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.
+   * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
    * 
* * string raw_value = 3; @@ -149,7 +149,7 @@ public interface BarcodeOrBuilder * *
    * Raw value encoded in the barcode.
-   * For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.
+   * For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
    * 
* * string raw_value = 3; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDocumentsInputConfig.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDocumentsInputConfig.java index 45b782772a46..3dd593b9aed1 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDocumentsInputConfig.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDocumentsInputConfig.java @@ -117,7 +117,7 @@ public SourceCase getSourceCase() { * * *
-   * The set of documents that match the specified Cloud Storage [gcs_prefix].
+   * The set of documents that match the specified Cloud Storage `gcs_prefix`.
    * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; @@ -132,7 +132,7 @@ public boolean hasGcsPrefix() { * * *
-   * The set of documents that match the specified Cloud Storage [gcs_prefix].
+   * The set of documents that match the specified Cloud Storage `gcs_prefix`.
    * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; @@ -150,7 +150,7 @@ public com.google.cloud.documentai.v1beta3.GcsPrefix getGcsPrefix() { * * *
-   * The set of documents that match the specified Cloud Storage [gcs_prefix].
+   * The set of documents that match the specified Cloud Storage `gcs_prefix`.
    * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; @@ -638,7 +638,7 @@ public Builder clearSource() { * * *
-     * The set of documents that match the specified Cloud Storage [gcs_prefix].
+     * The set of documents that match the specified Cloud Storage `gcs_prefix`.
      * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; @@ -653,7 +653,7 @@ public boolean hasGcsPrefix() { * * *
-     * The set of documents that match the specified Cloud Storage [gcs_prefix].
+     * The set of documents that match the specified Cloud Storage `gcs_prefix`.
      * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; @@ -678,7 +678,7 @@ public com.google.cloud.documentai.v1beta3.GcsPrefix getGcsPrefix() { * * *
-     * The set of documents that match the specified Cloud Storage [gcs_prefix].
+     * The set of documents that match the specified Cloud Storage `gcs_prefix`.
      * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; @@ -700,7 +700,7 @@ public Builder setGcsPrefix(com.google.cloud.documentai.v1beta3.GcsPrefix value) * * *
-     * The set of documents that match the specified Cloud Storage [gcs_prefix].
+     * The set of documents that match the specified Cloud Storage `gcs_prefix`.
      * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; @@ -720,7 +720,7 @@ public Builder setGcsPrefix( * * *
-     * The set of documents that match the specified Cloud Storage [gcs_prefix].
+     * The set of documents that match the specified Cloud Storage `gcs_prefix`.
      * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; @@ -752,7 +752,7 @@ public Builder mergeGcsPrefix(com.google.cloud.documentai.v1beta3.GcsPrefix valu * * *
-     * The set of documents that match the specified Cloud Storage [gcs_prefix].
+     * The set of documents that match the specified Cloud Storage `gcs_prefix`.
      * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; @@ -777,7 +777,7 @@ public Builder clearGcsPrefix() { * * *
-     * The set of documents that match the specified Cloud Storage [gcs_prefix].
+     * The set of documents that match the specified Cloud Storage `gcs_prefix`.
      * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; @@ -789,7 +789,7 @@ public com.google.cloud.documentai.v1beta3.GcsPrefix.Builder getGcsPrefixBuilder * * *
-     * The set of documents that match the specified Cloud Storage [gcs_prefix].
+     * The set of documents that match the specified Cloud Storage `gcs_prefix`.
      * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; @@ -809,7 +809,7 @@ public com.google.cloud.documentai.v1beta3.GcsPrefixOrBuilder getGcsPrefixOrBuil * * *
-     * The set of documents that match the specified Cloud Storage [gcs_prefix].
+     * The set of documents that match the specified Cloud Storage `gcs_prefix`.
      * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDocumentsInputConfigOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDocumentsInputConfigOrBuilder.java index d657d2f613dc..4469a1a1294d 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDocumentsInputConfigOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchDocumentsInputConfigOrBuilder.java @@ -27,7 +27,7 @@ public interface BatchDocumentsInputConfigOrBuilder * * *
-   * The set of documents that match the specified Cloud Storage [gcs_prefix].
+   * The set of documents that match the specified Cloud Storage `gcs_prefix`.
    * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; @@ -39,7 +39,7 @@ public interface BatchDocumentsInputConfigOrBuilder * * *
-   * The set of documents that match the specified Cloud Storage [gcs_prefix].
+   * The set of documents that match the specified Cloud Storage `gcs_prefix`.
    * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; @@ -51,7 +51,7 @@ public interface BatchDocumentsInputConfigOrBuilder * * *
-   * The set of documents that match the specified Cloud Storage [gcs_prefix].
+   * The set of documents that match the specified Cloud Storage `gcs_prefix`.
    * 
* * .google.cloud.documentai.v1beta3.GcsPrefix gcs_prefix = 1; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java index c60c129c70c2..baea8fe35d0b 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java @@ -428,7 +428,7 @@ public interface IndividualProcessStatusOrBuilder * * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation - * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=417 + * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=465 * @return The humanReviewOperation. */ @java.lang.Deprecated @@ -447,7 +447,7 @@ public interface IndividualProcessStatusOrBuilder * * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation - * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=417 + * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=465 * @return The bytes for humanReviewOperation. */ @java.lang.Deprecated @@ -710,7 +710,7 @@ public com.google.protobuf.ByteString getOutputGcsDestinationBytes() { * * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation - * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=417 + * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=465 * @return The humanReviewOperation. */ @java.lang.Override @@ -740,7 +740,7 @@ public java.lang.String getHumanReviewOperation() { * * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation - * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=417 + * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=465 * @return The bytes for humanReviewOperation. */ @java.lang.Override @@ -1700,7 +1700,7 @@ public Builder setOutputGcsDestinationBytes(com.google.protobuf.ByteString value * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=417 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=465 * @return The humanReviewOperation. */ @java.lang.Deprecated @@ -1730,7 +1730,7 @@ public java.lang.String getHumanReviewOperation() { * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=417 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=465 * @return The bytes for humanReviewOperation. */ @java.lang.Deprecated @@ -1760,7 +1760,7 @@ public com.google.protobuf.ByteString getHumanReviewOperationBytes() { * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=417 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=465 * @param value The humanReviewOperation to set. * @return This builder for chaining. */ @@ -1789,7 +1789,7 @@ public Builder setHumanReviewOperation(java.lang.String value) { * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=417 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=465 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1814,7 +1814,7 @@ public Builder clearHumanReviewOperation() { * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=417 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=465 * @param value The bytes for humanReviewOperation to set. * @return This builder for chaining. */ diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java index 6870dab720f2..32932c3d3042 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java @@ -1768,7 +1768,7 @@ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig * * * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=378 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=426 * @return Whether the outputConfig field is set. */ @java.lang.Override @@ -1788,7 +1788,7 @@ public boolean hasOutputConfig() { * * * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=378 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=426 * @return The outputConfig. */ @java.lang.Override @@ -3048,7 +3048,7 @@ public Builder removeInputConfigs(int index) { * * * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=378 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=426 * @return Whether the outputConfig field is set. */ @java.lang.Deprecated @@ -3067,7 +3067,7 @@ public boolean hasOutputConfig() { * * * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=378 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=426 * @return The outputConfig. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java index 85de93de517a..26839fbc0537 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java @@ -144,7 +144,7 @@ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig getInpu * * * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=378 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=426 * @return Whether the outputConfig field is set. */ @java.lang.Deprecated @@ -161,7 +161,7 @@ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig getInpu * * * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=378 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=426 * @return The outputConfig. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java index 1c4ff28891d1..9d04eef55dad 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java @@ -1054,6 +1054,33 @@ public interface StyleOrBuilder * .google.cloud.documentai.v1beta3.Document.Style.FontSize font_size = 7; */ com.google.cloud.documentai.v1beta3.Document.Style.FontSizeOrBuilder getFontSizeOrBuilder(); + + /** + * + * + *
+     * Font family such as `Arial`, `Times New Roman`.
+     * https://www.w3schools.com/cssref/pr_font_font-family.asp
+     * 
+ * + * string font_family = 8; + * + * @return The fontFamily. + */ + java.lang.String getFontFamily(); + /** + * + * + *
+     * Font family such as `Arial`, `Times New Roman`.
+     * https://www.w3schools.com/cssref/pr_font_font-family.asp
+     * 
+ * + * string font_family = 8; + * + * @return The bytes for fontFamily. + */ + com.google.protobuf.ByteString getFontFamilyBytes(); } /** * @@ -1079,6 +1106,7 @@ private Style() { fontWeight_ = ""; textStyle_ = ""; textDecoration_ = ""; + fontFamily_ = ""; } @java.lang.Override @@ -2198,6 +2226,57 @@ public com.google.cloud.documentai.v1beta3.Document.Style.FontSize getFontSize() return getFontSize(); } + public static final int FONT_FAMILY_FIELD_NUMBER = 8; + private volatile java.lang.Object fontFamily_; + /** + * + * + *
+     * Font family such as `Arial`, `Times New Roman`.
+     * https://www.w3schools.com/cssref/pr_font_font-family.asp
+     * 
+ * + * string font_family = 8; + * + * @return The fontFamily. + */ + @java.lang.Override + public java.lang.String getFontFamily() { + java.lang.Object ref = fontFamily_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fontFamily_ = s; + return s; + } + } + /** + * + * + *
+     * Font family such as `Arial`, `Times New Roman`.
+     * https://www.w3schools.com/cssref/pr_font_font-family.asp
+     * 
+ * + * string font_family = 8; + * + * @return The bytes for fontFamily. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFontFamilyBytes() { + java.lang.Object ref = fontFamily_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fontFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2233,6 +2312,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (fontSize_ != null) { output.writeMessage(7, getFontSize()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontFamily_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, fontFamily_); + } getUnknownFields().writeTo(output); } @@ -2263,6 +2345,9 @@ public int getSerializedSize() { if (fontSize_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getFontSize()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontFamily_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, fontFamily_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2298,6 +2383,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFontSize()) { if (!getFontSize().equals(other.getFontSize())) return false; } + if (!getFontFamily().equals(other.getFontFamily())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2331,6 +2417,8 @@ public int hashCode() { hash = (37 * hash) + FONT_SIZE_FIELD_NUMBER; hash = (53 * hash) + getFontSize().hashCode(); } + hash = (37 * hash) + FONT_FAMILY_FIELD_NUMBER; + hash = (53 * hash) + getFontFamily().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2502,6 +2590,8 @@ public Builder clear() { fontSize_ = null; fontSizeBuilder_ = null; } + fontFamily_ = ""; + return this; } @@ -2552,6 +2642,7 @@ public com.google.cloud.documentai.v1beta3.Document.Style buildPartial() { } else { result.fontSize_ = fontSizeBuilder_.build(); } + result.fontFamily_ = fontFamily_; onBuilt(); return result; } @@ -2628,6 +2719,10 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Document.Style othe if (other.hasFontSize()) { mergeFontSize(other.getFontSize()); } + if (!other.getFontFamily().isEmpty()) { + fontFamily_ = other.fontFamily_; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2697,6 +2792,12 @@ public Builder mergeFrom( break; } // case 58 + case 66: + { + fontFamily_ = input.readStringRequireUtf8(); + + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3783,6 +3884,117 @@ public Builder clearFontSize() { return fontSizeBuilder_; } + private java.lang.Object fontFamily_ = ""; + /** + * + * + *
+       * Font family such as `Arial`, `Times New Roman`.
+       * https://www.w3schools.com/cssref/pr_font_font-family.asp
+       * 
+ * + * string font_family = 8; + * + * @return The fontFamily. + */ + public java.lang.String getFontFamily() { + java.lang.Object ref = fontFamily_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fontFamily_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Font family such as `Arial`, `Times New Roman`.
+       * https://www.w3schools.com/cssref/pr_font_font-family.asp
+       * 
+ * + * string font_family = 8; + * + * @return The bytes for fontFamily. + */ + public com.google.protobuf.ByteString getFontFamilyBytes() { + java.lang.Object ref = fontFamily_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fontFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Font family such as `Arial`, `Times New Roman`.
+       * https://www.w3schools.com/cssref/pr_font_font-family.asp
+       * 
+ * + * string font_family = 8; + * + * @param value The fontFamily to set. + * @return This builder for chaining. + */ + public Builder setFontFamily(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fontFamily_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Font family such as `Arial`, `Times New Roman`.
+       * https://www.w3schools.com/cssref/pr_font_font-family.asp
+       * 
+ * + * string font_family = 8; + * + * @return This builder for chaining. + */ + public Builder clearFontFamily() { + + fontFamily_ = getDefaultInstance().getFontFamily(); + onChanged(); + return this; + } + /** + * + * + *
+       * Font family such as `Arial`, `Times New Roman`.
+       * https://www.w3schools.com/cssref/pr_font_font-family.asp
+       * 
+ * + * string font_family = 8; + * + * @param value The bytes for fontFamily to set. + * @return This builder for chaining. + */ + public Builder setFontFamilyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fontFamily_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -4635,6 +4847,48 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode getDetectedBar com.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcodeOrBuilder getDetectedBarcodesOrBuilder(int index); + /** + * + * + *
+     * Image Quality Scores.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + * + * @return Whether the imageQualityScores field is set. + */ + boolean hasImageQualityScores(); + /** + * + * + *
+     * Image Quality Scores.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + * + * @return The imageQualityScores. + */ + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores getImageQualityScores(); + /** + * + * + *
+     * Image Quality Scores.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScoresOrBuilder + getImageQualityScoresOrBuilder(); + /** * * @@ -4642,10 +4896,15 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode getDetectedBar * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.provenance is deprecated. See + * google/cloud/documentai/v1beta3/document.proto;l=463 * @return Whether the provenance field is set. */ + @java.lang.Deprecated boolean hasProvenance(); /** * @@ -4654,10 +4913,15 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode getDetectedBar * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.provenance is deprecated. See + * google/cloud/documentai/v1beta3/document.proto;l=463 * @return The provenance. */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(); /** * @@ -4666,8 +4930,11 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode getDetectedBar * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); } /** @@ -7443,7 +7710,7 @@ public interface LayoutOrBuilder *
        * Confidence of the current [Layout][google.cloud.documentai.v1beta3.Document.Page.Layout] within context of the object this
        * layout is for. e.g. confidence can be for a single token, a table,
-       * a visual element, etc. depending on context. Range [0, 1].
+       * a visual element, etc. depending on context. Range `[0, 1]`.
        * 
* * float confidence = 2; @@ -7832,7 +8099,7 @@ public com.google.cloud.documentai.v1beta3.Document.TextAnchor getTextAnchor() { *
        * Confidence of the current [Layout][google.cloud.documentai.v1beta3.Document.Page.Layout] within context of the object this
        * layout is for. e.g. confidence can be for a single token, a table,
-       * a visual element, etc. depending on context. Range [0, 1].
+       * a visual element, etc. depending on context. Range `[0, 1]`.
        * 
* * float confidence = 2; @@ -8563,7 +8830,7 @@ public Builder clearTextAnchor() { *
          * Confidence of the current [Layout][google.cloud.documentai.v1beta3.Document.Page.Layout] within context of the object this
          * layout is for. e.g. confidence can be for a single token, a table,
-         * a visual element, etc. depending on context. Range [0, 1].
+         * a visual element, etc. depending on context. Range `[0, 1]`.
          * 
* * float confidence = 2; @@ -8580,7 +8847,7 @@ public float getConfidence() { *
          * Confidence of the current [Layout][google.cloud.documentai.v1beta3.Document.Page.Layout] within context of the object this
          * layout is for. e.g. confidence can be for a single token, a table,
-         * a visual element, etc. depending on context. Range [0, 1].
+         * a visual element, etc. depending on context. Range `[0, 1]`.
          * 
* * float confidence = 2; @@ -8600,7 +8867,7 @@ public Builder setConfidence(float value) { *
          * Confidence of the current [Layout][google.cloud.documentai.v1beta3.Document.Page.Layout] within context of the object this
          * layout is for. e.g. confidence can be for a single token, a table,
-         * a visual element, etc. depending on context. Range [0, 1].
+         * a visual element, etc. depending on context. Range `[0, 1]`.
          * 
* * float confidence = 2; @@ -9080,10 +9347,15 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage getDetectedLa * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Block.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=195 * @return Whether the provenance field is set. */ + @java.lang.Deprecated boolean hasProvenance(); /** * @@ -9092,10 +9364,15 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage getDetectedLa * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Block.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=195 * @return The provenance. */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(); /** * @@ -9104,8 +9381,11 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage getDetectedLa * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); } /** @@ -9300,11 +9580,16 @@ public int getDetectedLanguagesCount() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Block.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=195 * @return Whether the provenance field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasProvenance() { return provenance_ != null; } @@ -9315,11 +9600,16 @@ public boolean hasProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Block.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=195 * @return The provenance. */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { return provenance_ == null ? com.google.cloud.documentai.v1beta3.Document.Provenance.getDefaultInstance() @@ -9332,9 +9622,12 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder() { return getProvenance(); @@ -10412,10 +10705,15 @@ public Builder removeDetectedLanguages(int index) { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Block.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=195 * @return Whether the provenance field is set. */ + @java.lang.Deprecated public boolean hasProvenance() { return provenanceBuilder_ != null || provenance_ != null; } @@ -10426,10 +10724,15 @@ public boolean hasProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Block.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=195 * @return The provenance. */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { if (provenanceBuilder_ == null) { return provenance_ == null @@ -10446,8 +10749,11 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance value) { if (provenanceBuilder_ == null) { @@ -10469,8 +10775,11 @@ public Builder setProvenance( * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance.Builder builderForValue) { if (provenanceBuilder_ == null) { @@ -10489,8 +10798,11 @@ public Builder setProvenance( * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder mergeProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance value) { if (provenanceBuilder_ == null) { @@ -10516,8 +10828,11 @@ public Builder mergeProvenance( * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder clearProvenance() { if (provenanceBuilder_ == null) { provenance_ = null; @@ -10536,8 +10851,11 @@ public Builder clearProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder getProvenanceBuilder() { @@ -10551,8 +10869,11 @@ public Builder clearProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder() { if (provenanceBuilder_ != null) { @@ -10570,7 +10891,9 @@ public Builder clearProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta3.Document.Provenance, @@ -10766,10 +11089,15 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage getDetectedLa * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Paragraph.provenance is + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=207 * @return Whether the provenance field is set. */ + @java.lang.Deprecated boolean hasProvenance(); /** * @@ -10778,10 +11106,15 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage getDetectedLa * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Paragraph.provenance is + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=207 * @return The provenance. */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(); /** * @@ -10790,8 +11123,11 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage getDetectedLa * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); } /** @@ -10985,11 +11321,16 @@ public int getDetectedLanguagesCount() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Paragraph.provenance is + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=207 * @return Whether the provenance field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasProvenance() { return provenance_ != null; } @@ -11000,11 +11341,16 @@ public boolean hasProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Paragraph.provenance is + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=207 * @return The provenance. */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { return provenance_ == null ? com.google.cloud.documentai.v1beta3.Document.Provenance.getDefaultInstance() @@ -11017,9 +11363,12 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder() { return getProvenance(); @@ -12099,10 +12448,15 @@ public Builder removeDetectedLanguages(int index) { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Paragraph.provenance is + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=207 * @return Whether the provenance field is set. */ + @java.lang.Deprecated public boolean hasProvenance() { return provenanceBuilder_ != null || provenance_ != null; } @@ -12113,10 +12467,15 @@ public boolean hasProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Paragraph.provenance is + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=207 * @return The provenance. */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { if (provenanceBuilder_ == null) { return provenance_ == null @@ -12133,8 +12492,11 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance value) { if (provenanceBuilder_ == null) { @@ -12156,8 +12518,11 @@ public Builder setProvenance( * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance.Builder builderForValue) { if (provenanceBuilder_ == null) { @@ -12176,8 +12541,11 @@ public Builder setProvenance( * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder mergeProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance value) { if (provenanceBuilder_ == null) { @@ -12203,8 +12571,11 @@ public Builder mergeProvenance( * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder clearProvenance() { if (provenanceBuilder_ == null) { provenance_ = null; @@ -12223,8 +12594,11 @@ public Builder clearProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder getProvenanceBuilder() { @@ -12238,8 +12612,11 @@ public Builder clearProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder() { if (provenanceBuilder_ != null) { @@ -12257,7 +12634,9 @@ public Builder clearProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta3.Document.Provenance, @@ -12456,10 +12835,15 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage getDetectedLa * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Line.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=220 * @return Whether the provenance field is set. */ + @java.lang.Deprecated boolean hasProvenance(); /** * @@ -12468,10 +12852,15 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage getDetectedLa * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Line.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=220 * @return The provenance. */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(); /** * @@ -12480,8 +12869,11 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage getDetectedLa * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); } /** @@ -12676,11 +13068,16 @@ public int getDetectedLanguagesCount() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Line.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=220 * @return Whether the provenance field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasProvenance() { return provenance_ != null; } @@ -12691,11 +13088,16 @@ public boolean hasProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Line.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=220 * @return The provenance. */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { return provenance_ == null ? com.google.cloud.documentai.v1beta3.Document.Provenance.getDefaultInstance() @@ -12708,9 +13110,12 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder() { return getProvenance(); @@ -13788,10 +14193,15 @@ public Builder removeDetectedLanguages(int index) { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Line.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=220 * @return Whether the provenance field is set. */ + @java.lang.Deprecated public boolean hasProvenance() { return provenanceBuilder_ != null || provenance_ != null; } @@ -13802,10 +14212,15 @@ public boolean hasProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Line.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=220 * @return The provenance. */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { if (provenanceBuilder_ == null) { return provenance_ == null @@ -13822,8 +14237,11 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance value) { if (provenanceBuilder_ == null) { @@ -13845,8 +14263,11 @@ public Builder setProvenance( * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance.Builder builderForValue) { if (provenanceBuilder_ == null) { @@ -13865,8 +14286,11 @@ public Builder setProvenance( * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder mergeProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance value) { if (provenanceBuilder_ == null) { @@ -13892,8 +14316,11 @@ public Builder mergeProvenance( * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder clearProvenance() { if (provenanceBuilder_ == null) { provenance_ = null; @@ -13912,8 +14339,11 @@ public Builder clearProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder getProvenanceBuilder() { @@ -13927,8 +14357,11 @@ public Builder clearProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder() { if (provenanceBuilder_ != null) { @@ -13946,7 +14379,9 @@ public Builder clearProvenance() { * The history of this annotation. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta3.Document.Provenance, @@ -14181,35 +14616,48 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage getDetectedLa * * *
-       * The  history of this annotation.
+       * The history of this annotation.
        * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Token.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=256 * @return Whether the provenance field is set. */ + @java.lang.Deprecated boolean hasProvenance(); /** * * *
-       * The  history of this annotation.
+       * The history of this annotation.
        * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Token.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=256 * @return The provenance. */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(); /** * * *
-       * The  history of this annotation.
+       * The history of this annotation.
        * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); } /** @@ -15298,14 +15746,19 @@ public int getDetectedLanguagesCount() { * * *
-       * The  history of this annotation.
+       * The history of this annotation.
        * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Token.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=256 * @return Whether the provenance field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasProvenance() { return provenance_ != null; } @@ -15313,14 +15766,19 @@ public boolean hasProvenance() { * * *
-       * The  history of this annotation.
+       * The history of this annotation.
        * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Token.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=256 * @return The provenance. */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { return provenance_ == null ? com.google.cloud.documentai.v1beta3.Document.Provenance.getDefaultInstance() @@ -15330,12 +15788,15 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { * * *
-       * The  history of this annotation.
+       * The history of this annotation.
        * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder() { return getProvenance(); @@ -16658,13 +17119,18 @@ public Builder removeDetectedLanguages(int index) { * * *
-         * The  history of this annotation.
+         * The history of this annotation.
          * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Token.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=256 * @return Whether the provenance field is set. */ + @java.lang.Deprecated public boolean hasProvenance() { return provenanceBuilder_ != null || provenance_ != null; } @@ -16672,13 +17138,18 @@ public boolean hasProvenance() { * * *
-         * The  history of this annotation.
+         * The history of this annotation.
          * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.Token.provenance is deprecated. + * See google/cloud/documentai/v1beta3/document.proto;l=256 * @return The provenance. */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { if (provenanceBuilder_ == null) { return provenance_ == null @@ -16692,11 +17163,14 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { * * *
-         * The  history of this annotation.
+         * The history of this annotation.
          * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance value) { if (provenanceBuilder_ == null) { @@ -16715,11 +17189,14 @@ public Builder setProvenance( * * *
-         * The  history of this annotation.
+         * The history of this annotation.
          * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance.Builder builderForValue) { if (provenanceBuilder_ == null) { @@ -16735,11 +17212,14 @@ public Builder setProvenance( * * *
-         * The  history of this annotation.
+         * The history of this annotation.
          * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder mergeProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance value) { if (provenanceBuilder_ == null) { @@ -16762,11 +17242,14 @@ public Builder mergeProvenance( * * *
-         * The  history of this annotation.
+         * The history of this annotation.
          * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder clearProvenance() { if (provenanceBuilder_ == null) { provenance_ = null; @@ -16782,11 +17265,14 @@ public Builder clearProvenance() { * * *
-         * The  history of this annotation.
+         * The history of this annotation.
          * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder getProvenanceBuilder() { @@ -16797,11 +17283,14 @@ public Builder clearProvenance() { * * *
-         * The  history of this annotation.
+         * The history of this annotation.
          * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder() { if (provenanceBuilder_ != null) { @@ -16816,10 +17305,12 @@ public Builder clearProvenance() { * * *
-         * The  history of this annotation.
+         * The history of this annotation.
          * 
* - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 4 [deprecated = true]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta3.Document.Provenance, @@ -20103,6 +20594,41 @@ com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage getDetectedLa */ com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder(int index); + + /** + * + * + *
+       * The history of this table.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + * + * @return Whether the provenance field is set. + */ + boolean hasProvenance(); + /** + * + * + *
+       * The history of this table.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + * + * @return The provenance. + */ + com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(); + /** + * + * + *
+       * The history of this table.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + */ + com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); } /** * @@ -23126,6 +23652,55 @@ public int getDetectedLanguagesCount() { return detectedLanguages_.get(index); } + public static final int PROVENANCE_FIELD_NUMBER = 5; + private com.google.cloud.documentai.v1beta3.Document.Provenance provenance_; + /** + * + * + *
+       * The history of this table.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + * + * @return Whether the provenance field is set. + */ + @java.lang.Override + public boolean hasProvenance() { + return provenance_ != null; + } + /** + * + * + *
+       * The history of this table.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + * + * @return The provenance. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { + return provenance_ == null + ? com.google.cloud.documentai.v1beta3.Document.Provenance.getDefaultInstance() + : provenance_; + } + /** + * + * + *
+       * The history of this table.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + return getProvenance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -23152,6 +23727,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < detectedLanguages_.size(); i++) { output.writeMessage(4, detectedLanguages_.get(i)); } + if (provenance_ != null) { + output.writeMessage(5, getProvenance()); + } getUnknownFields().writeTo(output); } @@ -23175,6 +23753,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 4, detectedLanguages_.get(i)); } + if (provenance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getProvenance()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -23198,6 +23779,10 @@ public boolean equals(final java.lang.Object obj) { if (!getHeaderRowsList().equals(other.getHeaderRowsList())) return false; if (!getBodyRowsList().equals(other.getBodyRowsList())) return false; if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (hasProvenance() != other.hasProvenance()) return false; + if (hasProvenance()) { + if (!getProvenance().equals(other.getProvenance())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -23225,6 +23810,10 @@ public int hashCode() { hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; hash = (53 * hash) + getDetectedLanguagesList().hashCode(); } + if (hasProvenance()) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -23393,6 +23982,12 @@ public Builder clear() { detectedLanguagesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); + if (provenanceBuilder_ == null) { + provenance_ = null; + } else { + provenance_ = null; + provenanceBuilder_ = null; + } return this; } @@ -23453,6 +24048,11 @@ public com.google.cloud.documentai.v1beta3.Document.Page.Table buildPartial() { } else { result.detectedLanguages_ = detectedLanguagesBuilder_.build(); } + if (provenanceBuilder_ == null) { + result.provenance_ = provenance_; + } else { + result.provenance_ = provenanceBuilder_.build(); + } onBuilt(); return result; } @@ -23589,6 +24189,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Document.Page.Table } } } + if (other.hasProvenance()) { + mergeProvenance(other.getProvenance()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -23666,6 +24269,12 @@ public Builder mergeFrom( } break; } // case 34 + case 42: + { + input.readMessage(getProvenanceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -25113,6 +25722,196 @@ public Builder removeDetectedLanguages(int index) { return detectedLanguagesBuilder_; } + private com.google.cloud.documentai.v1beta3.Document.Provenance provenance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.Provenance, + com.google.cloud.documentai.v1beta3.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder> + provenanceBuilder_; + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + * + * @return Whether the provenance field is set. + */ + public boolean hasProvenance() { + return provenanceBuilder_ != null || provenance_ != null; + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + * + * @return The provenance. + */ + public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { + if (provenanceBuilder_ == null) { + return provenance_ == null + ? com.google.cloud.documentai.v1beta3.Document.Provenance.getDefaultInstance() + : provenance_; + } else { + return provenanceBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + */ + public Builder setProvenance( + com.google.cloud.documentai.v1beta3.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + provenance_ = value; + onChanged(); + } else { + provenanceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + */ + public Builder setProvenance( + com.google.cloud.documentai.v1beta3.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + provenance_ = builderForValue.build(); + onChanged(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + */ + public Builder mergeProvenance( + com.google.cloud.documentai.v1beta3.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (provenance_ != null) { + provenance_ = + com.google.cloud.documentai.v1beta3.Document.Provenance.newBuilder(provenance_) + .mergeFrom(value) + .buildPartial(); + } else { + provenance_ = value; + } + onChanged(); + } else { + provenanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + */ + public Builder clearProvenance() { + if (provenanceBuilder_ == null) { + provenance_ = null; + onChanged(); + } else { + provenance_ = null; + provenanceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + */ + public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder + getProvenanceBuilder() { + + onChanged(); + return getProvenanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + */ + public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + return provenance_ == null + ? com.google.cloud.documentai.v1beta3.Document.Provenance.getDefaultInstance() + : provenance_; + } + } + /** + * + * + *
+         * The history of this table.
+         * 
+ * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.Provenance, + com.google.cloud.documentai.v1beta3.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.Provenance, + com.google.cloud.documentai.v1beta3.Document.Provenance.Builder, + com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder>( + getProvenance(), getParentForChildren(), isClean()); + provenance_ = null; + } + return provenanceBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -29573,7 +30372,7 @@ public interface DetectedLanguageOrBuilder * * *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
        * information, see
        * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
        * 
@@ -29587,7 +30386,7 @@ public interface DetectedLanguageOrBuilder * * *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
        * information, see
        * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
        * 
@@ -29602,7 +30401,7 @@ public interface DetectedLanguageOrBuilder * * *
-       * Confidence of detected language. Range [0, 1].
+       * Confidence of detected language. Range `[0, 1]`.
        * 
* * float confidence = 2; @@ -29666,7 +30465,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
        * information, see
        * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
        * 
@@ -29691,7 +30490,7 @@ public java.lang.String getLanguageCode() { * * *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
        * information, see
        * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
        * 
@@ -29719,7 +30518,7 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-       * Confidence of detected language. Range [0, 1].
+       * Confidence of detected language. Range `[0, 1]`.
        * 
* * float confidence = 2; @@ -30068,18 +30867,1792 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: + case 10: + { + languageCode_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 21: + { + confidence_ = input.readFloat(); + + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+         * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
+         * information, see
+         * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+         * 
+ * + * string language_code = 1; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
+         * information, see
+         * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+         * 
+ * + * string language_code = 1; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
+         * information, see
+         * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+         * 
+ * + * string language_code = 1; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
+         * information, see
+         * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+         * 
+ * + * string language_code = 1; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+         * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
+         * information, see
+         * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+         * 
+ * + * string language_code = 1; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private float confidence_; + /** + * + * + *
+         * Confidence of detected language. Range `[0, 1]`.
+         * 
+ * + * float confidence = 2; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + * + * + *
+         * Confidence of detected language. Range `[0, 1]`.
+         * 
+ * + * float confidence = 2; + * + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Confidence of detected language. Range `[0, 1]`.
+         * 
+ * + * float confidence = 2; + * + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage) + private static final com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage(); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedLanguage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ImageQualityScoresOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The overall quality score. Range `[0, 1]` where 1 is perfect quality.
+       * 
+ * + * float quality_score = 1; + * + * @return The qualityScore. + */ + float getQualityScore(); + + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + java.util.List< + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect> + getDetectedDefectsList(); + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + getDetectedDefects(int index); + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + int getDetectedDefectsCount(); + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder> + getDetectedDefectsOrBuilderList(); + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefectOrBuilder + getDetectedDefectsOrBuilder(int index); + } + /** + * + * + *
+     * Image Quality Scores for the page image
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores} + */ + public static final class ImageQualityScores extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores) + ImageQualityScoresOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageQualityScores.newBuilder() to construct. + private ImageQualityScores(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageQualityScores() { + detectedDefects_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageQualityScores(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.class, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.Builder.class); + } + + public interface DetectedDefectOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Name of the defect type. Supported values are:
+         * - `quality/defect_blurry`
+         * - `quality/defect_noisy`
+         * - `quality/defect_dark`
+         * - `quality/defect_faint`
+         * - `quality/defect_text_too_small`
+         * - `quality/defect_document_cutoff`
+         * - `quality/defect_text_cutoff`
+         * - `quality/defect_glare`
+         * 
+ * + * string type = 1; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+         * Name of the defect type. Supported values are:
+         * - `quality/defect_blurry`
+         * - `quality/defect_noisy`
+         * - `quality/defect_dark`
+         * - `quality/defect_faint`
+         * - `quality/defect_text_too_small`
+         * - `quality/defect_document_cutoff`
+         * - `quality/defect_text_cutoff`
+         * - `quality/defect_glare`
+         * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+         * Confidence of detected defect. Range `[0, 1]` where 1 indicates
+         * strong confidence of that the defect exists.
+         * 
+ * + * float confidence = 2; + * + * @return The confidence. + */ + float getConfidence(); + } + /** + * + * + *
+       * Image Quality Defects
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect} + */ + public static final class DetectedDefect extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect) + DetectedDefectOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedDefect.newBuilder() to construct. + private DetectedDefect(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DetectedDefect() { + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DetectedDefect(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_DetectedDefect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_DetectedDefect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect.class, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object type_; + /** + * + * + *
+         * Name of the defect type. Supported values are:
+         * - `quality/defect_blurry`
+         * - `quality/defect_noisy`
+         * - `quality/defect_dark`
+         * - `quality/defect_faint`
+         * - `quality/defect_text_too_small`
+         * - `quality/defect_document_cutoff`
+         * - `quality/defect_text_cutoff`
+         * - `quality/defect_glare`
+         * 
+ * + * string type = 1; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+         * Name of the defect type. Supported values are:
+         * - `quality/defect_blurry`
+         * - `quality/defect_noisy`
+         * - `quality/defect_dark`
+         * - `quality/defect_faint`
+         * - `quality/defect_text_too_small`
+         * - `quality/defect_document_cutoff`
+         * - `quality/defect_text_cutoff`
+         * - `quality/defect_glare`
+         * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + * + * + *
+         * Confidence of detected defect. Range `[0, 1]` where 1 indicates
+         * strong confidence of that the defect exists.
+         * 
+ * + * float confidence = 2; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, confidence_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + other = + (com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect) + obj; + + if (!getType().equals(other.getType())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Image Quality Defects
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect) + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_DetectedDefect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_DetectedDefect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect.class, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = ""; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_DetectedDefect_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + build() { + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + buildPartial() { + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + result = + new com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect(this); + result.type_ = type_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 21: + { + confidence_ = input.readFloat(); + + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+           * Name of the defect type. Supported values are:
+           * - `quality/defect_blurry`
+           * - `quality/defect_noisy`
+           * - `quality/defect_dark`
+           * - `quality/defect_faint`
+           * - `quality/defect_text_too_small`
+           * - `quality/defect_document_cutoff`
+           * - `quality/defect_text_cutoff`
+           * - `quality/defect_glare`
+           * 
+ * + * string type = 1; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Name of the defect type. Supported values are:
+           * - `quality/defect_blurry`
+           * - `quality/defect_noisy`
+           * - `quality/defect_dark`
+           * - `quality/defect_faint`
+           * - `quality/defect_text_too_small`
+           * - `quality/defect_document_cutoff`
+           * - `quality/defect_text_cutoff`
+           * - `quality/defect_glare`
+           * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Name of the defect type. Supported values are:
+           * - `quality/defect_blurry`
+           * - `quality/defect_noisy`
+           * - `quality/defect_dark`
+           * - `quality/defect_faint`
+           * - `quality/defect_text_too_small`
+           * - `quality/defect_document_cutoff`
+           * - `quality/defect_text_cutoff`
+           * - `quality/defect_glare`
+           * 
+ * + * string type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Name of the defect type. Supported values are:
+           * - `quality/defect_blurry`
+           * - `quality/defect_noisy`
+           * - `quality/defect_dark`
+           * - `quality/defect_faint`
+           * - `quality/defect_text_too_small`
+           * - `quality/defect_document_cutoff`
+           * - `quality/defect_text_cutoff`
+           * - `quality/defect_glare`
+           * 
+ * + * string type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+           * Name of the defect type. Supported values are:
+           * - `quality/defect_blurry`
+           * - `quality/defect_noisy`
+           * - `quality/defect_dark`
+           * - `quality/defect_faint`
+           * - `quality/defect_text_too_small`
+           * - `quality/defect_document_cutoff`
+           * - `quality/defect_text_cutoff`
+           * - `quality/defect_glare`
+           * 
+ * + * string type = 1; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private float confidence_; + /** + * + * + *
+           * Confidence of detected defect. Range `[0, 1]` where 1 indicates
+           * strong confidence of that the defect exists.
+           * 
+ * + * float confidence = 2; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + * + * + *
+           * Confidence of detected defect. Range `[0, 1]` where 1 indicates
+           * strong confidence of that the defect exists.
+           * 
+ * + * float confidence = 2; + * + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Confidence of detected defect. Range `[0, 1]` where 1 indicates
+           * strong confidence of that the defect exists.
+           * 
+ * + * float confidence = 2; + * + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect) + private static final com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect(); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedDefect parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int QUALITY_SCORE_FIELD_NUMBER = 1; + private float qualityScore_; + /** + * + * + *
+       * The overall quality score. Range `[0, 1]` where 1 is perfect quality.
+       * 
+ * + * float quality_score = 1; + * + * @return The qualityScore. + */ + @java.lang.Override + public float getQualityScore() { + return qualityScore_; + } + + public static final int DETECTED_DEFECTS_FIELD_NUMBER = 2; + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect> + detectedDefects_; + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect> + getDetectedDefectsList() { + return detectedDefects_; + } + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder> + getDetectedDefectsOrBuilderList() { + return detectedDefects_; + } + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + @java.lang.Override + public int getDetectedDefectsCount() { + return detectedDefects_.size(); + } + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + getDetectedDefects(int index) { + return detectedDefects_.get(index); + } + /** + * + * + *
+       * A list of detected defects.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder + getDetectedDefectsOrBuilder(int index) { + return detectedDefects_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(qualityScore_) != 0) { + output.writeFloat(1, qualityScore_); + } + for (int i = 0; i < detectedDefects_.size(); i++) { + output.writeMessage(2, detectedDefects_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(qualityScore_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, qualityScore_); + } + for (int i = 0; i < detectedDefects_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, detectedDefects_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores other = + (com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores) obj; + + if (java.lang.Float.floatToIntBits(getQualityScore()) + != java.lang.Float.floatToIntBits(other.getQualityScore())) return false; + if (!getDetectedDefectsList().equals(other.getDetectedDefectsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + QUALITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getQualityScore()); + if (getDetectedDefectsCount() > 0) { + hash = (37 * hash) + DETECTED_DEFECTS_FIELD_NUMBER; + hash = (53 * hash) + getDetectedDefectsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Image Quality Scores for the page image
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores) + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScoresOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.class, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.Builder + .class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + qualityScore_ = 0F; + + if (detectedDefectsBuilder_ == null) { + detectedDefects_ = java.util.Collections.emptyList(); + } else { + detectedDefects_ = null; + detectedDefectsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores build() { + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores buildPartial() { + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores result = + new com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores(this); + int from_bitField0_ = bitField0_; + result.qualityScore_ = qualityScore_; + if (detectedDefectsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + detectedDefects_ = java.util.Collections.unmodifiableList(detectedDefects_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.detectedDefects_ = detectedDefects_; + } else { + result.detectedDefects_ = detectedDefectsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .getDefaultInstance()) return this; + if (other.getQualityScore() != 0F) { + setQualityScore(other.getQualityScore()); + } + if (detectedDefectsBuilder_ == null) { + if (!other.detectedDefects_.isEmpty()) { + if (detectedDefects_.isEmpty()) { + detectedDefects_ = other.detectedDefects_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDetectedDefectsIsMutable(); + detectedDefects_.addAll(other.detectedDefects_); + } + onChanged(); + } + } else { + if (!other.detectedDefects_.isEmpty()) { + if (detectedDefectsBuilder_.isEmpty()) { + detectedDefectsBuilder_.dispose(); + detectedDefectsBuilder_ = null; + detectedDefects_ = other.detectedDefects_; + bitField0_ = (bitField0_ & ~0x00000001); + detectedDefectsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDetectedDefectsFieldBuilder() + : null; + } else { + detectedDefectsBuilder_.addAllMessages(other.detectedDefects_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { - languageCode_ = input.readStringRequireUtf8(); + qualityScore_ = input.readFloat(); break; - } // case 10 - case 21: + } // case 13 + case 18: { - confidence_ = input.readFloat(); - + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect + m = + input.readMessage( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect.parser(), + extensionRegistry); + if (detectedDefectsBuilder_ == null) { + ensureDetectedDefectsIsMutable(); + detectedDefects_.add(m); + } else { + detectedDefectsBuilder_.addMessage(m); + } break; - } // case 21 + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -30097,172 +32670,499 @@ public Builder mergeFrom( return this; } - private java.lang.Object languageCode_ = ""; + private int bitField0_; + + private float qualityScore_; /** * * *
-         * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-         * information, see
-         * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+         * The overall quality score. Range `[0, 1]` where 1 is perfect quality.
          * 
* - * string language_code = 1; + * float quality_score = 1; * - * @return The languageCode. + * @return The qualityScore. */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; + @java.lang.Override + public float getQualityScore() { + return qualityScore_; + } + /** + * + * + *
+         * The overall quality score. Range `[0, 1]` where 1 is perfect quality.
+         * 
+ * + * float quality_score = 1; + * + * @param value The qualityScore to set. + * @return This builder for chaining. + */ + public Builder setQualityScore(float value) { + + qualityScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The overall quality score. Range `[0, 1]` where 1 is perfect quality.
+         * 
+ * + * float quality_score = 1; + * + * @return This builder for chaining. + */ + public Builder clearQualityScore() { + + qualityScore_ = 0F; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect> + detectedDefects_ = java.util.Collections.emptyList(); + + private void ensureDetectedDefectsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + detectedDefects_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect>(detectedDefects_); + bitField0_ |= 0x00000001; } } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + .Builder, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder> + detectedDefectsBuilder_; + /** * * *
-         * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-         * information, see
-         * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+         * A list of detected defects.
          * 
* - * string language_code = 1; + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect> + getDetectedDefectsList() { + if (detectedDefectsBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedDefects_); + } else { + return detectedDefectsBuilder_.getMessageList(); + } + } + /** * - * @return The bytes for languageCode. + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * */ - public com.google.protobuf.ByteString getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - languageCode_ = b; - return b; + public int getDetectedDefectsCount() { + if (detectedDefectsBuilder_ == null) { + return detectedDefects_.size(); } else { - return (com.google.protobuf.ByteString) ref; + return detectedDefectsBuilder_.getCount(); } } /** * * *
-         * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-         * information, see
-         * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+         * A list of detected defects.
          * 
* - * string language_code = 1; + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + getDetectedDefects(int index) { + if (detectedDefectsBuilder_ == null) { + return detectedDefects_.get(index); + } else { + return detectedDefectsBuilder_.getMessage(index); + } + } + /** * - * @param value The languageCode to set. - * @return This builder for chaining. + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * */ - public Builder setLanguageCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setDetectedDefects( + int index, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + value) { + if (detectedDefectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedDefectsIsMutable(); + detectedDefects_.set(index, value); + onChanged(); + } else { + detectedDefectsBuilder_.setMessage(index, value); } - - languageCode_ = value; - onChanged(); return this; } /** * * *
-         * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-         * information, see
-         * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+         * A list of detected defects.
          * 
* - * string language_code = 1; + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public Builder setDetectedDefects( + int index, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + .Builder + builderForValue) { + if (detectedDefectsBuilder_ == null) { + ensureDetectedDefectsIsMutable(); + detectedDefects_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedDefectsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** * - * @return This builder for chaining. + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); + public Builder addDetectedDefects( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + value) { + if (detectedDefectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedDefectsIsMutable(); + detectedDefects_.add(value); + onChanged(); + } else { + detectedDefectsBuilder_.addMessage(value); + } return this; } /** * * *
-         * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-         * information, see
-         * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+         * A list of detected defects.
          * 
* - * string language_code = 1; + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public Builder addDetectedDefects( + int index, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + value) { + if (detectedDefectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedDefectsIsMutable(); + detectedDefects_.add(index, value); + onChanged(); + } else { + detectedDefectsBuilder_.addMessage(index, value); + } + return this; + } + /** * - * @param value The bytes for languageCode to set. - * @return This builder for chaining. + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * */ - public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder addDetectedDefects( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + .Builder + builderForValue) { + if (detectedDefectsBuilder_ == null) { + ensureDetectedDefectsIsMutable(); + detectedDefects_.add(builderForValue.build()); + onChanged(); + } else { + detectedDefectsBuilder_.addMessage(builderForValue.build()); } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); return this; } - - private float confidence_; /** * * *
-         * Confidence of detected language. Range [0, 1].
+         * A list of detected defects.
          * 
* - * float confidence = 2; + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public Builder addDetectedDefects( + int index, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + .Builder + builderForValue) { + if (detectedDefectsBuilder_ == null) { + ensureDetectedDefectsIsMutable(); + detectedDefects_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedDefectsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** * - * @return The confidence. + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * */ - @java.lang.Override - public float getConfidence() { - return confidence_; + public Builder addAllDetectedDefects( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect> + values) { + if (detectedDefectsBuilder_ == null) { + ensureDetectedDefectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedDefects_); + onChanged(); + } else { + detectedDefectsBuilder_.addAllMessages(values); + } + return this; } /** * * *
-         * Confidence of detected language. Range [0, 1].
+         * A list of detected defects.
          * 
* - * float confidence = 2; + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public Builder clearDetectedDefects() { + if (detectedDefectsBuilder_ == null) { + detectedDefects_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + detectedDefectsBuilder_.clear(); + } + return this; + } + /** * - * @param value The confidence to set. - * @return This builder for chaining. + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); + public Builder removeDetectedDefects(int index) { + if (detectedDefectsBuilder_ == null) { + ensureDetectedDefectsIsMutable(); + detectedDefects_.remove(index); + onChanged(); + } else { + detectedDefectsBuilder_.remove(index); + } return this; } /** * * *
-         * Confidence of detected language. Range [0, 1].
+         * A list of detected defects.
          * 
* - * float confidence = 2; + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + .Builder + getDetectedDefectsBuilder(int index) { + return getDetectedDefectsFieldBuilder().getBuilder(index); + } + /** * - * @return This builder for chaining. + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * */ - public Builder clearConfidence() { + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder + getDetectedDefectsOrBuilder(int index) { + if (detectedDefectsBuilder_ == null) { + return detectedDefects_.get(index); + } else { + return detectedDefectsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder> + getDetectedDefectsOrBuilderList() { + if (detectedDefectsBuilder_ != null) { + return detectedDefectsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedDefects_); + } + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + .Builder + addDetectedDefectsBuilder() { + return getDetectedDefectsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect.getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + .Builder + addDetectedDefectsBuilder(int index) { + return getDetectedDefectsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect.getDefaultInstance()); + } + /** + * + * + *
+         * A list of detected defects.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect detected_defects = 2; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + .Builder> + getDetectedDefectsBuilderList() { + return getDetectedDefectsFieldBuilder().getBuilderList(); + } - confidence_ = 0F; - onChanged(); - return this; + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect + .Builder, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder> + getDetectedDefectsFieldBuilder() { + if (detectedDefectsBuilder_ == null) { + detectedDefectsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefect.Builder, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .DetectedDefectOrBuilder>( + detectedDefects_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + detectedDefects_ = null; + } + return detectedDefectsBuilder_; } @java.lang.Override @@ -30277,26 +33177,27 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage) + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores) } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage) - private static final com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores) + private static final com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage(); + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores(); } - public static com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage + public static com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public DetectedLanguage parsePartialFrom( + public ImageQualityScores parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -30316,17 +33217,17 @@ public DetectedLanguage parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -31366,6 +34267,64 @@ public com.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode getDete return detectedBarcodes_.get(index); } + public static final int IMAGE_QUALITY_SCORES_FIELD_NUMBER = 17; + private com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + imageQualityScores_; + /** + * + * + *
+     * Image Quality Scores.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + * + * @return Whether the imageQualityScores field is set. + */ + @java.lang.Override + public boolean hasImageQualityScores() { + return imageQualityScores_ != null; + } + /** + * + * + *
+     * Image Quality Scores.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + * + * @return The imageQualityScores. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + getImageQualityScores() { + return imageQualityScores_ == null + ? com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .getDefaultInstance() + : imageQualityScores_; + } + /** + * + * + *
+     * Image Quality Scores.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScoresOrBuilder + getImageQualityScoresOrBuilder() { + return getImageQualityScores(); + } + public static final int PROVENANCE_FIELD_NUMBER = 16; private com.google.cloud.documentai.v1beta3.Document.Provenance provenance_; /** @@ -31375,11 +34334,16 @@ public com.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode getDete * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.provenance is deprecated. See + * google/cloud/documentai/v1beta3/document.proto;l=463 * @return Whether the provenance field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasProvenance() { return provenance_ != null; } @@ -31390,11 +34354,16 @@ public boolean hasProvenance() { * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.provenance is deprecated. See + * google/cloud/documentai/v1beta3/document.proto;l=463 * @return The provenance. */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { return provenance_ == null ? com.google.cloud.documentai.v1beta3.Document.Provenance.getDefaultInstance() @@ -31407,9 +34376,12 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder() { return getProvenance(); @@ -31477,6 +34449,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (provenance_ != null) { output.writeMessage(16, getProvenance()); } + if (imageQualityScores_ != null) { + output.writeMessage(17, getImageQualityScores()); + } getUnknownFields().writeTo(output); } @@ -31536,6 +34511,10 @@ public int getSerializedSize() { if (provenance_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getProvenance()); } + if (imageQualityScores_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(17, getImageQualityScores()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -31576,6 +34555,10 @@ public boolean equals(final java.lang.Object obj) { if (!getFormFieldsList().equals(other.getFormFieldsList())) return false; if (!getSymbolsList().equals(other.getSymbolsList())) return false; if (!getDetectedBarcodesList().equals(other.getDetectedBarcodesList())) return false; + if (hasImageQualityScores() != other.hasImageQualityScores()) return false; + if (hasImageQualityScores()) { + if (!getImageQualityScores().equals(other.getImageQualityScores())) return false; + } if (hasProvenance() != other.hasProvenance()) return false; if (hasProvenance()) { if (!getProvenance().equals(other.getProvenance())) return false; @@ -31649,6 +34632,10 @@ public int hashCode() { hash = (37 * hash) + DETECTED_BARCODES_FIELD_NUMBER; hash = (53 * hash) + getDetectedBarcodesList().hashCode(); } + if (hasImageQualityScores()) { + hash = (37 * hash) + IMAGE_QUALITY_SCORES_FIELD_NUMBER; + hash = (53 * hash) + getImageQualityScores().hashCode(); + } if (hasProvenance()) { hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; hash = (53 * hash) + getProvenance().hashCode(); @@ -31890,6 +34877,12 @@ public Builder clear() { detectedBarcodesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000400); + if (imageQualityScoresBuilder_ == null) { + imageQualityScores_ = null; + } else { + imageQualityScores_ = null; + imageQualityScoresBuilder_ = null; + } if (provenanceBuilder_ == null) { provenance_ = null; } else { @@ -32039,6 +35032,11 @@ public com.google.cloud.documentai.v1beta3.Document.Page buildPartial() { } else { result.detectedBarcodes_ = detectedBarcodesBuilder_.build(); } + if (imageQualityScoresBuilder_ == null) { + result.imageQualityScores_ = imageQualityScores_; + } else { + result.imageQualityScores_ = imageQualityScoresBuilder_.build(); + } if (provenanceBuilder_ == null) { result.provenance_ = provenance_; } else { @@ -32405,6 +35403,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Document.Page other } } } + if (other.hasImageQualityScores()) { + mergeImageQualityScores(other.getImageQualityScores()); + } if (other.hasProvenance()) { mergeProvenance(other.getProvenance()); } @@ -32620,6 +35621,13 @@ public Builder mergeFrom( break; } // case 130 + case 138: + { + input.readMessage( + getImageQualityScoresFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 138 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -37603,6 +40611,220 @@ public Builder removeDetectedBarcodes(int index) { return detectedBarcodesBuilder_; } + private com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + imageQualityScores_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.Builder, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScoresOrBuilder> + imageQualityScoresBuilder_; + /** + * + * + *
+       * Image Quality Scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + * + * @return Whether the imageQualityScores field is set. + */ + public boolean hasImageQualityScores() { + return imageQualityScoresBuilder_ != null || imageQualityScores_ != null; + } + /** + * + * + *
+       * Image Quality Scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + * + * @return The imageQualityScores. + */ + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + getImageQualityScores() { + if (imageQualityScoresBuilder_ == null) { + return imageQualityScores_ == null + ? com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .getDefaultInstance() + : imageQualityScores_; + } else { + return imageQualityScoresBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Image Quality Scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + public Builder setImageQualityScores( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores value) { + if (imageQualityScoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageQualityScores_ = value; + onChanged(); + } else { + imageQualityScoresBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Image Quality Scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + public Builder setImageQualityScores( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.Builder + builderForValue) { + if (imageQualityScoresBuilder_ == null) { + imageQualityScores_ = builderForValue.build(); + onChanged(); + } else { + imageQualityScoresBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Image Quality Scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + public Builder mergeImageQualityScores( + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores value) { + if (imageQualityScoresBuilder_ == null) { + if (imageQualityScores_ != null) { + imageQualityScores_ = + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.newBuilder( + imageQualityScores_) + .mergeFrom(value) + .buildPartial(); + } else { + imageQualityScores_ = value; + } + onChanged(); + } else { + imageQualityScoresBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Image Quality Scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + public Builder clearImageQualityScores() { + if (imageQualityScoresBuilder_ == null) { + imageQualityScores_ = null; + onChanged(); + } else { + imageQualityScores_ = null; + imageQualityScoresBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Image Quality Scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.Builder + getImageQualityScoresBuilder() { + + onChanged(); + return getImageQualityScoresFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Image Quality Scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + public com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScoresOrBuilder + getImageQualityScoresOrBuilder() { + if (imageQualityScoresBuilder_ != null) { + return imageQualityScoresBuilder_.getMessageOrBuilder(); + } else { + return imageQualityScores_ == null + ? com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores + .getDefaultInstance() + : imageQualityScores_; + } + } + /** + * + * + *
+       * Image Quality Scores.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores image_quality_scores = 17; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.Builder, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScoresOrBuilder> + getImageQualityScoresFieldBuilder() { + if (imageQualityScoresBuilder_ == null) { + imageQualityScoresBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.Builder, + com.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScoresOrBuilder>( + getImageQualityScores(), getParentForChildren(), isClean()); + imageQualityScores_ = null; + } + return imageQualityScoresBuilder_; + } + private com.google.cloud.documentai.v1beta3.Document.Provenance provenance_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta3.Document.Provenance, @@ -37616,10 +40838,15 @@ public Builder removeDetectedBarcodes(int index) { * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.provenance is deprecated. See + * google/cloud/documentai/v1beta3/document.proto;l=463 * @return Whether the provenance field is set. */ + @java.lang.Deprecated public boolean hasProvenance() { return provenanceBuilder_ != null || provenance_ != null; } @@ -37630,10 +40857,15 @@ public boolean hasProvenance() { * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * * + * @deprecated google.cloud.documentai.v1beta3.Document.Page.provenance is deprecated. See + * google/cloud/documentai/v1beta3/document.proto;l=463 * @return The provenance. */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { if (provenanceBuilder_ == null) { return provenance_ == null @@ -37650,8 +40882,11 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance() { * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setProvenance(com.google.cloud.documentai.v1beta3.Document.Provenance value) { if (provenanceBuilder_ == null) { if (value == null) { @@ -37672,8 +40907,11 @@ public Builder setProvenance(com.google.cloud.documentai.v1beta3.Document.Proven * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance.Builder builderForValue) { if (provenanceBuilder_ == null) { @@ -37692,8 +40930,11 @@ public Builder setProvenance( * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder mergeProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance value) { if (provenanceBuilder_ == null) { @@ -37719,8 +40960,11 @@ public Builder mergeProvenance( * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder clearProvenance() { if (provenanceBuilder_ == null) { provenance_ = null; @@ -37739,8 +40983,11 @@ public Builder clearProvenance() { * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder getProvenanceBuilder() { @@ -37754,8 +41001,11 @@ public Builder clearProvenance() { * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder() { if (provenanceBuilder_ != null) { @@ -37773,7 +41023,9 @@ public Builder clearProvenance() { * The history of this page. * * - * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16; + * + * .google.cloud.documentai.v1beta3.Document.Provenance provenance = 16 [deprecated = true]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta3.Document.Provenance, @@ -37934,8 +41186,7 @@ public interface EntityOrBuilder * * *
-     * 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.
+     * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
      * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -37947,8 +41198,7 @@ public interface EntityOrBuilder * * *
-     * 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.
+     * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
      * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -37986,7 +41236,7 @@ public interface EntityOrBuilder * * *
-     * Optional. Confidence of detected Schema entity. Range [0, 1].
+     * Optional. Confidence of detected Schema entity. Range `[0, 1]`.
      * 
* * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -41079,8 +44329,7 @@ public com.google.protobuf.ByteString getTypeBytes() { * * *
-     * 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.
+     * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
      * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -41103,8 +44352,7 @@ public java.lang.String getMentionText() { * * *
-     * 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.
+     * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
      * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -41179,7 +44427,7 @@ public com.google.protobuf.ByteString getMentionIdBytes() { * * *
-     * Optional. Confidence of detected Schema entity. Range [0, 1].
+     * Optional. Confidence of detected Schema entity. Range `[0, 1]`.
      * 
* * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -42504,8 +45752,7 @@ public Builder setTypeBytes(com.google.protobuf.ByteString value) { * * *
-       * 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.
+       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
        * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -42527,8 +45774,7 @@ public java.lang.String getMentionText() { * * *
-       * 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.
+       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
        * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -42550,8 +45796,7 @@ public com.google.protobuf.ByteString getMentionTextBytes() { * * *
-       * 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.
+       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
        * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -42572,8 +45817,7 @@ public Builder setMentionText(java.lang.String value) { * * *
-       * 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.
+       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
        * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -42590,8 +45834,7 @@ public Builder clearMentionText() { * * *
-       * 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.
+       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
        * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -42721,7 +45964,7 @@ public Builder setMentionIdBytes(com.google.protobuf.ByteString value) { * * *
-       * Optional. Confidence of detected Schema entity. Range [0, 1].
+       * Optional. Confidence of detected Schema entity. Range `[0, 1]`.
        * 
* * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -42736,7 +45979,7 @@ public float getConfidence() { * * *
-       * Optional. Confidence of detected Schema entity. Range [0, 1].
+       * Optional. Confidence of detected Schema entity. Range `[0, 1]`.
        * 
* * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -42754,7 +45997,7 @@ public Builder setConfidence(float value) { * * *
-       * Optional. Confidence of detected Schema entity. Range [0, 1].
+       * Optional. Confidence of detected Schema entity. Range `[0, 1]`.
        * 
* * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -47241,7 +50484,7 @@ public interface PageRefOrBuilder * * * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=599 + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=637 * @return The layoutId. */ @java.lang.Deprecated @@ -47257,7 +50500,7 @@ public interface PageRefOrBuilder * * * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=599 + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=637 * @return The bytes for layoutId. */ @java.lang.Deprecated @@ -47308,7 +50551,7 @@ public interface PageRefOrBuilder * * *
-       * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+       * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
        * 
* * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -47717,7 +50960,7 @@ public int getLayoutTypeValue() { * * * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=599 + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=637 * @return The layoutId. */ @java.lang.Override @@ -47744,7 +50987,7 @@ public java.lang.String getLayoutId() { * * * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=599 + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=637 * @return The bytes for layoutId. */ @java.lang.Override @@ -47821,7 +51064,7 @@ public com.google.cloud.documentai.v1beta3.BoundingPolyOrBuilder getBoundingPoly * * *
-       * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+       * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
        * 
* * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -48461,7 +51704,7 @@ public Builder clearLayoutType() { * * * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=599 + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=637 * @return The layoutId. */ @java.lang.Deprecated @@ -48487,7 +51730,7 @@ public java.lang.String getLayoutId() { * * * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=599 + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=637 * @return The bytes for layoutId. */ @java.lang.Deprecated @@ -48513,7 +51756,7 @@ public com.google.protobuf.ByteString getLayoutIdBytes() { * * * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=599 + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=637 * @param value The layoutId to set. * @return This builder for chaining. */ @@ -48538,7 +51781,7 @@ public Builder setLayoutId(java.lang.String value) { * * * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=599 + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=637 * @return This builder for chaining. */ @java.lang.Deprecated @@ -48559,7 +51802,7 @@ public Builder clearLayoutId() { * * * @deprecated google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=599 + * deprecated. See google/cloud/documentai/v1beta3/document.proto;l=637 * @param value The bytes for layoutId to set. * @return This builder for chaining. */ @@ -48785,7 +52028,7 @@ public com.google.cloud.documentai.v1beta3.BoundingPoly.Builder getBoundingPolyB * * *
-         * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+         * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
          * 
* * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -48800,7 +52043,7 @@ public float getConfidence() { * * *
-         * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+         * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
          * 
* * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -48818,7 +52061,7 @@ public Builder setConfidence(float value) { * * *
-         * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+         * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
          * 
* * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -49845,7 +53088,7 @@ 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=663 + * google/cloud/documentai/v1beta3/document.proto;l=701 * @return The id. */ @java.lang.Deprecated @@ -50281,7 +53524,7 @@ 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=629 + * See google/cloud/documentai/v1beta3/document.proto;l=667 * @return The id. */ @java.lang.Deprecated @@ -50384,7 +53627,7 @@ 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=629 + * See google/cloud/documentai/v1beta3/document.proto;l=667 * @return The id. */ @java.lang.Override @@ -50896,7 +54139,7 @@ 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=629 + * See google/cloud/documentai/v1beta3/document.proto;l=667 * @return The id. */ @java.lang.Override @@ -50914,7 +54157,7 @@ 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=629 + * See google/cloud/documentai/v1beta3/document.proto;l=667 * @param value The id to set. * @return This builder for chaining. */ @@ -50935,7 +54178,7 @@ 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=629 + * See google/cloud/documentai/v1beta3/document.proto;l=667 * @return This builder for chaining. */ @java.lang.Deprecated @@ -51044,7 +54287,7 @@ 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=663 + * google/cloud/documentai/v1beta3/document.proto;l=701 * @return The id. */ @java.lang.Override @@ -51686,7 +54929,7 @@ 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=663 + * google/cloud/documentai/v1beta3/document.proto;l=701 * @return The id. */ @java.lang.Override @@ -51705,7 +54948,7 @@ 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=663 + * google/cloud/documentai/v1beta3/document.proto;l=701 * @param value The id to set. * @return This builder for chaining. */ @@ -51727,7 +54970,7 @@ 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=663 + * google/cloud/documentai/v1beta3/document.proto;l=701 * @return This builder for chaining. */ @java.lang.Deprecated @@ -52406,7 +55649,7 @@ public interface RevisionOrBuilder * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1beta3/document.proto;l=701 + * google/cloud/documentai/v1beta3/document.proto;l=739 * @return A list containing the parent. */ @java.lang.Deprecated @@ -52423,7 +55666,7 @@ public interface RevisionOrBuilder * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1beta3/document.proto;l=701 + * google/cloud/documentai/v1beta3/document.proto;l=739 * @return The count of parent. */ @java.lang.Deprecated @@ -52440,7 +55683,7 @@ public interface RevisionOrBuilder * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1beta3/document.proto;l=701 + * google/cloud/documentai/v1beta3/document.proto;l=739 * @param index The index of the element to return. * @return The parent at the given index. */ @@ -53742,7 +56985,7 @@ public com.google.protobuf.ByteString getIdBytes() { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1beta3/document.proto;l=701 + * google/cloud/documentai/v1beta3/document.proto;l=739 * @return A list containing the parent. */ @java.lang.Override @@ -53762,7 +57005,7 @@ public java.util.List getParentList() { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1beta3/document.proto;l=701 + * google/cloud/documentai/v1beta3/document.proto;l=739 * @return The count of parent. */ @java.lang.Deprecated @@ -53781,7 +57024,7 @@ public int getParentCount() { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1beta3/document.proto;l=701 + * google/cloud/documentai/v1beta3/document.proto;l=739 * @param index The index of the element to return. * @return The parent at the given index. */ @@ -54961,7 +58204,7 @@ private void ensureParentIsMutable() { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1beta3/document.proto;l=701 + * google/cloud/documentai/v1beta3/document.proto;l=739 * @return A list containing the parent. */ @java.lang.Deprecated @@ -54982,7 +58225,7 @@ public java.util.List getParentList() { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1beta3/document.proto;l=701 + * google/cloud/documentai/v1beta3/document.proto;l=739 * @return The count of parent. */ @java.lang.Deprecated @@ -55001,7 +58244,7 @@ public int getParentCount() { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1beta3/document.proto;l=701 + * google/cloud/documentai/v1beta3/document.proto;l=739 * @param index The index of the element to return. * @return The parent at the given index. */ @@ -55021,7 +58264,7 @@ public int getParent(int index) { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1beta3/document.proto;l=701 + * google/cloud/documentai/v1beta3/document.proto;l=739 * @param index The index to set the value at. * @param value The parent to set. * @return This builder for chaining. @@ -55045,7 +58288,7 @@ public Builder setParent(int index, int value) { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1beta3/document.proto;l=701 + * google/cloud/documentai/v1beta3/document.proto;l=739 * @param value The parent to add. * @return This builder for chaining. */ @@ -55068,7 +58311,7 @@ public Builder addParent(int value) { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1beta3/document.proto;l=701 + * google/cloud/documentai/v1beta3/document.proto;l=739 * @param values The parent to add. * @return This builder for chaining. */ @@ -55091,7 +58334,7 @@ public Builder addAllParent(java.lang.Iterable valu * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1beta3/document.proto;l=701 + * google/cloud/documentai/v1beta3/document.proto;l=739 * @return This builder for chaining. */ @java.lang.Deprecated @@ -55824,8 +59067,11 @@ public interface TextChangeOrBuilder * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated java.util.List getProvenanceList(); /** * @@ -55834,8 +59080,11 @@ public interface TextChangeOrBuilder * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(int index); /** * @@ -55844,8 +59093,11 @@ public interface TextChangeOrBuilder * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated int getProvenanceCount(); /** * @@ -55854,8 +59106,11 @@ public interface TextChangeOrBuilder * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated java.util.List getProvenanceOrBuilderList(); /** @@ -55865,8 +59120,11 @@ public interface TextChangeOrBuilder * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder( int index); } @@ -56039,9 +59297,12 @@ public com.google.protobuf.ByteString getChangedTextBytes() { * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public java.util.List getProvenanceList() { return provenance_; @@ -56053,9 +59314,12 @@ public com.google.protobuf.ByteString getChangedTextBytes() { * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public java.util.List< ? extends com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder> getProvenanceOrBuilderList() { @@ -56068,9 +59332,12 @@ public com.google.protobuf.ByteString getChangedTextBytes() { * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public int getProvenanceCount() { return provenance_.size(); } @@ -56081,9 +59348,12 @@ public int getProvenanceCount() { * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(int index) { return provenance_.get(index); } @@ -56094,9 +59364,12 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(int * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder( int index) { return provenance_.get(index); @@ -56898,8 +60171,11 @@ private void ensureProvenanceIsMutable() { * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public java.util.List getProvenanceList() { if (provenanceBuilder_ == null) { @@ -56915,8 +60191,11 @@ private void ensureProvenanceIsMutable() { * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public int getProvenanceCount() { if (provenanceBuilder_ == null) { return provenance_.size(); @@ -56931,8 +60210,11 @@ public int getProvenanceCount() { * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(int index) { if (provenanceBuilder_ == null) { return provenance_.get(index); @@ -56947,8 +60229,11 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance getProvenance(int * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setProvenance( int index, com.google.cloud.documentai.v1beta3.Document.Provenance value) { if (provenanceBuilder_ == null) { @@ -56970,8 +60255,11 @@ public Builder setProvenance( * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setProvenance( int index, com.google.cloud.documentai.v1beta3.Document.Provenance.Builder builderForValue) { @@ -56991,8 +60279,11 @@ public Builder setProvenance( * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder addProvenance(com.google.cloud.documentai.v1beta3.Document.Provenance value) { if (provenanceBuilder_ == null) { if (value == null) { @@ -57013,8 +60304,11 @@ public Builder addProvenance(com.google.cloud.documentai.v1beta3.Document.Proven * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder addProvenance( int index, com.google.cloud.documentai.v1beta3.Document.Provenance value) { if (provenanceBuilder_ == null) { @@ -57036,8 +60330,11 @@ public Builder addProvenance( * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder addProvenance( com.google.cloud.documentai.v1beta3.Document.Provenance.Builder builderForValue) { if (provenanceBuilder_ == null) { @@ -57056,8 +60353,11 @@ public Builder addProvenance( * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder addProvenance( int index, com.google.cloud.documentai.v1beta3.Document.Provenance.Builder builderForValue) { @@ -57077,8 +60377,11 @@ public Builder addProvenance( * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder addAllProvenance( java.lang.Iterable values) { @@ -57098,8 +60401,11 @@ public Builder addAllProvenance( * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder clearProvenance() { if (provenanceBuilder_ == null) { provenance_ = java.util.Collections.emptyList(); @@ -57117,8 +60423,11 @@ public Builder clearProvenance() { * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder removeProvenance(int index) { if (provenanceBuilder_ == null) { ensureProvenanceIsMutable(); @@ -57136,8 +60445,11 @@ public Builder removeProvenance(int index) { * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder getProvenanceBuilder( int index) { return getProvenanceFieldBuilder().getBuilder(index); @@ -57149,8 +60461,11 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder getProven * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder getProvenanceOrBuilder(int index) { if (provenanceBuilder_ == null) { @@ -57166,8 +60481,11 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder getProven * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public java.util.List< ? extends com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder> getProvenanceOrBuilderList() { @@ -57184,8 +60502,11 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder getProven * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder addProvenanceBuilder() { return getProvenanceFieldBuilder() @@ -57199,8 +60520,11 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder getProven * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder addProvenanceBuilder( int index) { return getProvenanceFieldBuilder() @@ -57215,8 +60539,11 @@ public com.google.cloud.documentai.v1beta3.Document.Provenance.Builder addProven * The history of this annotation. * * - * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3; + * + * repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public java.util.List getProvenanceBuilderList() { return getProvenanceFieldBuilder().getBuilderList(); @@ -57871,9 +61198,9 @@ public com.google.cloud.documentai.v1beta3.Document.EntityRelation getEntityRela * * *
-   * Placeholder.  A list of text corrections made to [Document.text].  This is
-   * usually used for annotating corrections to OCR mistakes.  Text changes for
-   * a given revision may not overlap with each other.
+   * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+   * is usually used for annotating corrections to OCR mistakes.  Text changes
+   * for a given revision may not overlap with each other.
    * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -57887,9 +61214,9 @@ public com.google.cloud.documentai.v1beta3.Document.EntityRelation getEntityRela * * *
-   * Placeholder.  A list of text corrections made to [Document.text].  This is
-   * usually used for annotating corrections to OCR mistakes.  Text changes for
-   * a given revision may not overlap with each other.
+   * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+   * is usually used for annotating corrections to OCR mistakes.  Text changes
+   * for a given revision may not overlap with each other.
    * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -57903,9 +61230,9 @@ public com.google.cloud.documentai.v1beta3.Document.EntityRelation getEntityRela * * *
-   * Placeholder.  A list of text corrections made to [Document.text].  This is
-   * usually used for annotating corrections to OCR mistakes.  Text changes for
-   * a given revision may not overlap with each other.
+   * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+   * is usually used for annotating corrections to OCR mistakes.  Text changes
+   * for a given revision may not overlap with each other.
    * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -57918,9 +61245,9 @@ public int getTextChangesCount() { * * *
-   * Placeholder.  A list of text corrections made to [Document.text].  This is
-   * usually used for annotating corrections to OCR mistakes.  Text changes for
-   * a given revision may not overlap with each other.
+   * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+   * is usually used for annotating corrections to OCR mistakes.  Text changes
+   * for a given revision may not overlap with each other.
    * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -57933,9 +61260,9 @@ public com.google.cloud.documentai.v1beta3.Document.TextChange getTextChanges(in * * *
-   * Placeholder.  A list of text corrections made to [Document.text].  This is
-   * usually used for annotating corrections to OCR mistakes.  Text changes for
-   * a given revision may not overlap with each other.
+   * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+   * is usually used for annotating corrections to OCR mistakes.  Text changes
+   * for a given revision may not overlap with each other.
    * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -60992,9 +64319,9 @@ private void ensureTextChangesIsMutable() { * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61011,9 +64338,9 @@ private void ensureTextChangesIsMutable() { * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61029,9 +64356,9 @@ public int getTextChangesCount() { * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61047,9 +64374,9 @@ public com.google.cloud.documentai.v1beta3.Document.TextChange getTextChanges(in * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61072,9 +64399,9 @@ public Builder setTextChanges( * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61095,9 +64422,9 @@ public Builder setTextChanges( * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61119,9 +64446,9 @@ public Builder addTextChanges(com.google.cloud.documentai.v1beta3.Document.TextC * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61144,9 +64471,9 @@ public Builder addTextChanges( * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61166,9 +64493,9 @@ public Builder addTextChanges( * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61189,9 +64516,9 @@ public Builder addTextChanges( * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61212,9 +64539,9 @@ public Builder addAllTextChanges( * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61233,9 +64560,9 @@ public Builder clearTextChanges() { * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61254,9 +64581,9 @@ public Builder removeTextChanges(int index) { * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61269,9 +64596,9 @@ public com.google.cloud.documentai.v1beta3.Document.TextChange.Builder getTextCh * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61288,9 +64615,9 @@ public com.google.cloud.documentai.v1beta3.Document.TextChangeOrBuilder getTextC * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61308,9 +64635,9 @@ public com.google.cloud.documentai.v1beta3.Document.TextChangeOrBuilder getTextC * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61323,9 +64650,9 @@ public com.google.cloud.documentai.v1beta3.Document.TextChange.Builder addTextCh * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -61340,9 +64667,9 @@ public com.google.cloud.documentai.v1beta3.Document.TextChange.Builder addTextCh * * *
-     * Placeholder.  A list of text corrections made to [Document.text].  This is
-     * usually used for annotating corrections to OCR mistakes.  Text changes for
-     * a given revision may not overlap with each other.
+     * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+     * is usually used for annotating corrections to OCR mistakes.  Text changes
+     * for a given revision may not overlap with each other.
      * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiEvaluation.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiEvaluation.java new file mode 100644 index 000000000000..91a1d135ef93 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiEvaluation.java @@ -0,0 +1,220 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/evaluation.proto + +package com.google.cloud.documentai.v1beta3; + +public final class DocumentAiEvaluation { + private DocumentAiEvaluation() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Evaluation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Evaluation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Evaluation_Counters_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Evaluation_Counters_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Evaluation_Metrics_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Evaluation_Metrics_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Evaluation_ConfidenceLevelMetrics_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Evaluation_ConfidenceLevelMetrics_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Evaluation_MultiConfidenceMetrics_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Evaluation_MultiConfidenceMetrics_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Evaluation_EntityMetricsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Evaluation_EntityMetricsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/documentai/v1beta3/evalua" + + "tion.proto\022\037google.cloud.documentai.v1be" + + "ta3\032\031google/api/resource.proto\032\037google/p" + + "rotobuf/timestamp.proto\"\215\016\n\nEvaluation\022\014" + + "\n\004name\030\001 \001(\t\022/\n\013create_time\030\002 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022O\n\021document_counte" + + "rs\030\005 \001(\01324.google.cloud.documentai.v1bet" + + "a3.Evaluation.Counters\022`\n\024all_entities_m" + + "etrics\030\003 \001(\0132B.google.cloud.documentai.v" + + "1beta3.Evaluation.MultiConfidenceMetrics" + + "\022V\n\016entity_metrics\030\004 \003(\0132>.google.cloud." + + "documentai.v1beta3.Evaluation.EntityMetr" + + "icsEntry\022\024\n\014kms_key_name\030\006 \001(\t\022\034\n\024kms_ke" + + "y_version_name\030\007 \001(\t\032\215\001\n\010Counters\022\035\n\025inp" + + "ut_documents_count\030\001 \001(\005\022\037\n\027invalid_docu" + + "ments_count\030\002 \001(\005\022\036\n\026failed_documents_co" + + "unt\030\003 \001(\005\022!\n\031evaluated_documents_count\030\004" + + " \001(\005\032\315\002\n\007Metrics\022\021\n\tprecision\030\001 \001(\002\022\016\n\006r" + + "ecall\030\002 \001(\002\022\020\n\010f1_score\030\003 \001(\002\022#\n\033predict" + + "ed_occurrences_count\030\004 \001(\005\022&\n\036ground_tru" + + "th_occurrences_count\030\005 \001(\005\022 \n\030predicted_" + + "document_count\030\n \001(\005\022#\n\033ground_truth_doc" + + "ument_count\030\013 \001(\005\022\034\n\024true_positives_coun" + + "t\030\006 \001(\005\022\035\n\025false_positives_count\030\007 \001(\005\022\035" + + "\n\025false_negatives_count\030\010 \001(\005\022\035\n\025total_d" + + "ocuments_count\030\t \001(\005\032x\n\026ConfidenceLevelM" + + "etrics\022\030\n\020confidence_level\030\001 \001(\002\022D\n\007metr" + + "ics\030\002 \001(\01323.google.cloud.documentai.v1be" + + "ta3.Evaluation.Metrics\032\200\004\n\026MultiConfiden" + + "ceMetrics\022d\n\030confidence_level_metrics\030\001 " + + "\003(\0132B.google.cloud.documentai.v1beta3.Ev" + + "aluation.ConfidenceLevelMetrics\022j\n\036confi" + + "dence_level_metrics_exact\030\004 \003(\0132B.google" + + ".cloud.documentai.v1beta3.Evaluation.Con" + + "fidenceLevelMetrics\022\r\n\005auprc\030\002 \001(\002\022#\n\033es" + + "timated_calibration_error\030\003 \001(\002\022\023\n\013auprc" + + "_exact\030\005 \001(\002\022)\n!estimated_calibration_er" + + "ror_exact\030\006 \001(\002\022d\n\014metrics_type\030\007 \001(\0162N." + + "google.cloud.documentai.v1beta3.Evaluati" + + "on.MultiConfidenceMetrics.MetricsType\":\n" + + "\013MetricsType\022\034\n\030METRICS_TYPE_UNSPECIFIED" + + "\020\000\022\r\n\tAGGREGATE\020\001\032x\n\022EntityMetricsEntry\022" + + "\013\n\003key\030\001 \001(\t\022Q\n\005value\030\002 \001(\0132B.google.clo" + + "ud.documentai.v1beta3.Evaluation.MultiCo" + + "nfidenceMetrics:\0028\001:\251\001\352A\245\001\n$documentai.g" + + "oogleapis.com/Evaluation\022}projects/{proj" + + "ect}/locations/{location}/processors/{pr" + + "ocessor}/processorVersions/{processor_ve" + + "rsion}/evaluations/{evaluation}B\361\001\n#com." + + "google.cloud.documentai.v1beta3B\024Documen" + + "tAiEvaluationP\001ZIgoogle.golang.org/genpr" + + "oto/googleapis/cloud/documentai/v1beta3;" + + "documentai\252\002\037Google.Cloud.DocumentAI.V1B" + + "eta3\312\002\037Google\\Cloud\\DocumentAI\\V1beta3\352\002" + + "\"Google::Cloud::DocumentAI::V1beta3b\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_documentai_v1beta3_Evaluation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_documentai_v1beta3_Evaluation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Evaluation_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "DocumentCounters", + "AllEntitiesMetrics", + "EntityMetrics", + "KmsKeyName", + "KmsKeyVersionName", + }); + internal_static_google_cloud_documentai_v1beta3_Evaluation_Counters_descriptor = + internal_static_google_cloud_documentai_v1beta3_Evaluation_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_Evaluation_Counters_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Evaluation_Counters_descriptor, + new java.lang.String[] { + "InputDocumentsCount", + "InvalidDocumentsCount", + "FailedDocumentsCount", + "EvaluatedDocumentsCount", + }); + internal_static_google_cloud_documentai_v1beta3_Evaluation_Metrics_descriptor = + internal_static_google_cloud_documentai_v1beta3_Evaluation_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_documentai_v1beta3_Evaluation_Metrics_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Evaluation_Metrics_descriptor, + new java.lang.String[] { + "Precision", + "Recall", + "F1Score", + "PredictedOccurrencesCount", + "GroundTruthOccurrencesCount", + "PredictedDocumentCount", + "GroundTruthDocumentCount", + "TruePositivesCount", + "FalsePositivesCount", + "FalseNegativesCount", + "TotalDocumentsCount", + }); + internal_static_google_cloud_documentai_v1beta3_Evaluation_ConfidenceLevelMetrics_descriptor = + internal_static_google_cloud_documentai_v1beta3_Evaluation_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_documentai_v1beta3_Evaluation_ConfidenceLevelMetrics_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Evaluation_ConfidenceLevelMetrics_descriptor, + new java.lang.String[] { + "ConfidenceLevel", "Metrics", + }); + internal_static_google_cloud_documentai_v1beta3_Evaluation_MultiConfidenceMetrics_descriptor = + internal_static_google_cloud_documentai_v1beta3_Evaluation_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_documentai_v1beta3_Evaluation_MultiConfidenceMetrics_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Evaluation_MultiConfidenceMetrics_descriptor, + new java.lang.String[] { + "ConfidenceLevelMetrics", + "ConfidenceLevelMetricsExact", + "Auprc", + "EstimatedCalibrationError", + "AuprcExact", + "EstimatedCalibrationErrorExact", + "MetricsType", + }); + internal_static_google_cloud_documentai_v1beta3_Evaluation_EntityMetricsEntry_descriptor = + internal_static_google_cloud_documentai_v1beta3_Evaluation_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_documentai_v1beta3_Evaluation_EntityMetricsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Evaluation_EntityMetricsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessor.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessor.java index 5fdd89f2fc30..adba887268b3 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessor.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessor.java @@ -51,48 +51,51 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n/google/cloud/documentai/v1beta3/proces" + "sor.proto\022\037google.cloud.documentai.v1bet" + "a3\032\037google/api/field_behavior.proto\032\031goo" - + "gle/api/resource.proto\032\037google/protobuf/" - + "timestamp.proto\"\232\006\n\020ProcessorVersion\022\014\n\004" - + "name\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022F\n\005stat" - + "e\030\006 \001(\01627.google.cloud.documentai.v1beta" - + "3.ProcessorVersion.State\022/\n\013create_time\030" - + "\007 \001(\0132\032.google.protobuf.Timestamp\022\024\n\014kms" - + "_key_name\030\t \001(\t\022\034\n\024kms_key_version_name\030" - + "\n \001(\t\022\026\n\016google_managed\030\013 \001(\010\022[\n\020depreca" - + "tion_info\030\r \001(\0132A.google.cloud.documenta" - + "i.v1beta3.ProcessorVersion.DeprecationIn" - + "fo\032\237\001\n\017DeprecationInfo\0224\n\020deprecation_ti" - + "me\030\001 \001(\0132\032.google.protobuf.Timestamp\022V\n\035" - + "replacement_processor_version\030\002 \001(\tB/\372A," - + "\n*documentai.googleapis.com/ProcessorVer" - + "sion\"\204\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n" - + "\010DEPLOYED\020\001\022\r\n\tDEPLOYING\020\002\022\016\n\nUNDEPLOYED" - + "\020\003\022\017\n\013UNDEPLOYING\020\004\022\014\n\010CREATING\020\005\022\014\n\010DEL" - + "ETING\020\006\022\n\n\006FAILED\020\007:\226\001\352A\222\001\n*documentai.g" - + "oogleapis.com/ProcessorVersion\022dprojects" - + "/{project}/locations/{location}/processo" - + "rs/{processor}/processorVersions/{proces" - + "sor_version}\"\262\004\n\tProcessor\022\024\n\004name\030\001 \001(\t" - + "B\006\340A\005\340A\003\022\014\n\004type\030\002 \001(\t\022\024\n\014display_name\030\003" - + " \001(\t\022D\n\005state\030\004 \001(\01620.google.cloud.docum" - + "entai.v1beta3.Processor.StateB\003\340A\003\022R\n\031de" - + "fault_processor_version\030\t \001(\tB/\372A,\n*docu" - + "mentai.googleapis.com/ProcessorVersion\022 " - + "\n\020process_endpoint\030\006 \001(\tB\006\340A\003\340A\005\022/\n\013crea" - + "te_time\030\007 \001(\0132\032.google.protobuf.Timestam" - + "p\022\024\n\014kms_key_name\030\010 \001(\t\"~\n\005State\022\025\n\021STAT" - + "E_UNSPECIFIED\020\000\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED" - + "\020\002\022\014\n\010ENABLING\020\003\022\r\n\tDISABLING\020\004\022\014\n\010CREAT" - + "ING\020\005\022\n\n\006FAILED\020\006\022\014\n\010DELETING\020\007:h\352Ae\n#do" - + "cumentai.googleapis.com/Processor\022>proje" - + "cts/{project}/locations/{location}/proce" - + "ssors/{processor}B\360\001\n#com.google.cloud.d" - + "ocumentai.v1beta3B\023DocumentAiProcessorP\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" + + "gle/api/resource.proto\0325google/cloud/doc" + + "umentai/v1beta3/document_schema.proto\032\037g" + + "oogle/protobuf/timestamp.proto\"\344\006\n\020Proce" + + "ssorVersion\022\014\n\004name\030\001 \001(\t\022\024\n\014display_nam" + + "e\030\002 \001(\t\022H\n\017document_schema\030\014 \001(\0132/.googl" + + "e.cloud.documentai.v1beta3.DocumentSchem" + + "a\022F\n\005state\030\006 \001(\01627.google.cloud.document" + + "ai.v1beta3.ProcessorVersion.State\022/\n\013cre" + + "ate_time\030\007 \001(\0132\032.google.protobuf.Timesta" + + "mp\022\024\n\014kms_key_name\030\t \001(\t\022\034\n\024kms_key_vers" + + "ion_name\030\n \001(\t\022\026\n\016google_managed\030\013 \001(\010\022[" + + "\n\020deprecation_info\030\r \001(\0132A.google.cloud." + + "documentai.v1beta3.ProcessorVersion.Depr" + + "ecationInfo\032\237\001\n\017DeprecationInfo\0224\n\020depre" + + "cation_time\030\001 \001(\0132\032.google.protobuf.Time" + + "stamp\022V\n\035replacement_processor_version\030\002" + + " \001(\tB/\372A,\n*documentai.googleapis.com/Pro" + + "cessorVersion\"\204\001\n\005State\022\025\n\021STATE_UNSPECI" + + "FIED\020\000\022\014\n\010DEPLOYED\020\001\022\r\n\tDEPLOYING\020\002\022\016\n\nU" + + "NDEPLOYED\020\003\022\017\n\013UNDEPLOYING\020\004\022\014\n\010CREATING" + + "\020\005\022\014\n\010DELETING\020\006\022\n\n\006FAILED\020\007:\226\001\352A\222\001\n*doc" + + "umentai.googleapis.com/ProcessorVersion\022" + + "dprojects/{project}/locations/{location}" + + "/processors/{processor}/processorVersion" + + "s/{processor_version}\"\262\004\n\tProcessor\022\024\n\004n" + + "ame\030\001 \001(\tB\006\340A\005\340A\003\022\014\n\004type\030\002 \001(\t\022\024\n\014displ" + + "ay_name\030\003 \001(\t\022D\n\005state\030\004 \001(\01620.google.cl" + + "oud.documentai.v1beta3.Processor.StateB\003" + + "\340A\003\022R\n\031default_processor_version\030\t \001(\tB/" + + "\372A,\n*documentai.googleapis.com/Processor" + + "Version\022 \n\020process_endpoint\030\006 \001(\tB\006\340A\003\340A" + + "\005\022/\n\013create_time\030\007 \001(\0132\032.google.protobuf" + + ".Timestamp\022\024\n\014kms_key_name\030\010 \001(\t\"~\n\005Stat" + + "e\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007ENABLED\020\001\022\014\n" + + "\010DISABLED\020\002\022\014\n\010ENABLING\020\003\022\r\n\tDISABLING\020\004" + + "\022\014\n\010CREATING\020\005\022\n\n\006FAILED\020\006\022\014\n\010DELETING\020\007" + + ":h\352Ae\n#documentai.googleapis.com/Process" + + "or\022>projects/{project}/locations/{locati" + + "on}/processors/{processor}B\360\001\n#com.googl" + + "e.cloud.documentai.v1beta3B\023DocumentAiPr" + + "ocessorP\001ZIgoogle.golang.org/genproto/go" + + "ogleapis/cloud/documentai/v1beta3;docume" + + "ntai\252\002\037Google.Cloud.DocumentAI.V1Beta3\312\002" + + "\037Google\\Cloud\\DocumentAI\\V1beta3\352\002\"Googl" + + "e::Cloud::DocumentAI::V1beta3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -100,6 +103,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.documentai.v1beta3.DocumentAiDocumentSchema.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_documentai_v1beta3_ProcessorVersion_descriptor = @@ -110,6 +114,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "DisplayName", + "DocumentSchema", "State", "CreateTime", "KmsKeyName", @@ -151,6 +156,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.documentai.v1beta3.DocumentAiDocumentSchema.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java index 51df45e7298f..037c08754f5a 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java @@ -183,6 +183,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta3_SetDefaultProcessorVersionMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta3_SetDefaultProcessorVersionMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_InputData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_InputData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_DatasetValidation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_DatasetValidation_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1beta3_ReviewDocumentRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -195,6 +215,30 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta3_ReviewDocumentOperationMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta3_ReviewDocumentOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_GetEvaluationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_GetEvaluationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_ListEvaluationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_ListEvaluationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_ListEvaluationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_ListEvaluationsResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -213,291 +257,367 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "v1beta3/document.proto\0321google/cloud/doc" + "umentai/v1beta3/document_io.proto\0325googl" + "e/cloud/documentai/v1beta3/document_sche" - + "ma.proto\0328google/cloud/documentai/v1beta" - + "3/operation_metadata.proto\032/google/cloud" - + "/documentai/v1beta3/processor.proto\0324goo" - + "gle/cloud/documentai/v1beta3/processor_t" - + "ype.proto\032#google/longrunning/operations" - + ".proto\032 google/protobuf/field_mask.proto" - + "\032\037google/protobuf/timestamp.proto\032\027googl" - + "e/rpc/status.proto\"\313\002\n\016ProcessRequest\022D\n" - + "\017inline_document\030\004 \001(\0132).google.cloud.do" - + "cumentai.v1beta3.DocumentH\000\022D\n\014raw_docum" - + "ent\030\005 \001(\0132,.google.cloud.documentai.v1be" - + "ta3.RawDocumentH\000\022\027\n\004name\030\001 \001(\tB\t\340A\002\372A\003\n" - + "\001*\022?\n\010document\030\002 \001(\0132).google.cloud.docu" - + "mentai.v1beta3.DocumentB\002\030\001\022\031\n\021skip_huma" - + "n_review\030\003 \001(\010\022.\n\nfield_mask\030\006 \001(\0132\032.goo" - + "gle.protobuf.FieldMaskB\010\n\006source\"\363\001\n\021Hum" - + "anReviewStatus\022G\n\005state\030\001 \001(\01628.google.c" - + "loud.documentai.v1beta3.HumanReviewStatu" - + "s.State\022\025\n\rstate_message\030\002 \001(\t\022\036\n\026human_" - + "review_operation\030\003 \001(\t\"^\n\005State\022\025\n\021STATE" - + "_UNSPECIFIED\020\000\022\013\n\007SKIPPED\020\001\022\025\n\021VALIDATIO" - + "N_PASSED\020\002\022\017\n\013IN_PROGRESS\020\003\022\t\n\005ERROR\020\004\"\303" - + "\001\n\017ProcessResponse\022;\n\010document\030\001 \001(\0132).g" - + "oogle.cloud.documentai.v1beta3.Document\022" - + "\"\n\026human_review_operation\030\002 \001(\tB\002\030\001\022O\n\023h" - + "uman_review_status\030\003 \001(\01322.google.cloud." - + "documentai.v1beta3.HumanReviewStatus\"\253\004\n" - + "\023BatchProcessRequest\022\027\n\004name\030\001 \001(\tB\t\340A\002\372" - + "A\003\n\001*\022`\n\rinput_configs\030\002 \003(\0132E.google.cl" - + "oud.documentai.v1beta3.BatchProcessReque" - + "st.BatchInputConfigB\002\030\001\022a\n\routput_config" - + "\030\003 \001(\0132F.google.cloud.documentai.v1beta3" - + ".BatchProcessRequest.BatchOutputConfigB\002" - + "\030\001\022S\n\017input_documents\030\005 \001(\0132:.google.clo" - + "ud.documentai.v1beta3.BatchDocumentsInpu" - + "tConfig\022U\n\026document_output_config\030\006 \001(\0132" - + "5.google.cloud.documentai.v1beta3.Docume" - + "ntOutputConfig\022\031\n\021skip_human_review\030\004 \001(" - + "\010\032=\n\020BatchInputConfig\022\022\n\ngcs_source\030\001 \001(" - + "\t\022\021\n\tmime_type\030\002 \001(\t:\002\030\001\0320\n\021BatchOutputC" - + "onfig\022\027\n\017gcs_destination\030\001 \001(\t:\002\030\001\"\026\n\024Ba" - + "tchProcessResponse\"\262\005\n\024BatchProcessMetad" - + "ata\022J\n\005state\030\001 \001(\0162;.google.cloud.docume" - + "ntai.v1beta3.BatchProcessMetadata.State\022" - + "\025\n\rstate_message\030\002 \001(\t\022/\n\013create_time\030\003 " - + "\001(\0132\032.google.protobuf.Timestamp\022/\n\013updat" - + "e_time\030\004 \001(\0132\032.google.protobuf.Timestamp" - + "\022r\n\033individual_process_statuses\030\005 \003(\0132M." - + "google.cloud.documentai.v1beta3.BatchPro" - + "cessMetadata.IndividualProcessStatus\032\354\001\n" - + "\027IndividualProcessStatus\022\030\n\020input_gcs_so" - + "urce\030\001 \001(\t\022\"\n\006status\030\002 \001(\0132\022.google.rpc." - + "Status\022\036\n\026output_gcs_destination\030\003 \001(\t\022\"" - + "\n\026human_review_operation\030\004 \001(\tB\002\030\001\022O\n\023hu" - + "man_review_status\030\005 \001(\01322.google.cloud.d" - + "ocumentai.v1beta3.HumanReviewStatus\"r\n\005S" - + "tate\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007WAITING\020\001" - + "\022\013\n\007RUNNING\020\002\022\r\n\tSUCCEEDED\020\003\022\016\n\nCANCELLI" - + "NG\020\004\022\r\n\tCANCELLED\020\005\022\n\n\006FAILED\020\006\"]\n\032Fetch" - + "ProcessorTypesRequest\022?\n\006parent\030\001 \001(\tB/\340" - + "A\002\372A)\022\'documentai.googleapis.com/Process" - + "orType\"f\n\033FetchProcessorTypesResponse\022G\n" - + "\017processor_types\030\001 \003(\0132..google.cloud.do" - + "cumentai.v1beta3.ProcessorType\"\203\001\n\031ListP" - + "rocessorTypesRequest\022?\n\006parent\030\001 \001(\tB/\340A" - + "\002\372A)\022\'documentai.googleapis.com/Processo" - + "rType\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" - + " \001(\t\"~\n\032ListProcessorTypesResponse\022G\n\017pr" - + "ocessor_types\030\001 \003(\0132..google.cloud.docum" - + "entai.v1beta3.ProcessorType\022\027\n\017next_page" - + "_token\030\002 \001(\t\"{\n\025ListProcessorsRequest\022;\n" - + "\006parent\030\001 \001(\tB+\340A\002\372A%\022#documentai.google" - + "apis.com/Processor\022\021\n\tpage_size\030\002 \001(\005\022\022\n" - + "\npage_token\030\003 \001(\t\"q\n\026ListProcessorsRespo" - + "nse\022>\n\nprocessors\030\001 \003(\0132*.google.cloud.d" - + "ocumentai.v1beta3.Processor\022\027\n\017next_page" - + "_token\030\002 \001(\t\"P\n\023GetProcessorRequest\0229\n\004n" - + "ame\030\001 \001(\tB+\340A\002\372A%\n#documentai.googleapis" - + ".com/Processor\"^\n\032GetProcessorVersionReq" - + "uest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*documentai.g" - + "oogleapis.com/ProcessorVersion\"\211\001\n\034ListP" - + "rocessorVersionsRequest\022B\n\006parent\030\001 \001(\tB" - + "2\340A\002\372A,\022*documentai.googleapis.com/Proce" - + "ssorVersion\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_t" - + "oken\030\003 \001(\t\"\207\001\n\035ListProcessorVersionsResp" - + "onse\022M\n\022processor_versions\030\001 \003(\01321.googl" - + "e.cloud.documentai.v1beta3.ProcessorVers" - + "ion\022\027\n\017next_page_token\030\002 \001(\t\"a\n\035DeletePr" - + "ocessorVersionRequest\022@\n\004name\030\001 \001(\tB2\340A\002" - + "\372A,\n*documentai.googleapis.com/Processor" - + "Version\"s\n\036DeleteProcessorVersionMetadat" - + "a\022Q\n\017common_metadata\030\001 \001(\01328.google.clou" - + "d.documentai.v1beta3.CommonOperationMeta" - + "data\"a\n\035DeployProcessorVersionRequest\022@\n" - + "\004name\030\001 \001(\tB2\340A\002\372A,\n*documentai.googleap" - + "is.com/ProcessorVersion\" \n\036DeployProcess" - + "orVersionResponse\"s\n\036DeployProcessorVers" + + "ma.proto\0320google/cloud/documentai/v1beta" + + "3/evaluation.proto\0328google/cloud/documen" + + "tai/v1beta3/operation_metadata.proto\032/go" + + "ogle/cloud/documentai/v1beta3/processor." + + "proto\0324google/cloud/documentai/v1beta3/p" + + "rocessor_type.proto\032#google/longrunning/" + + "operations.proto\032 google/protobuf/field_" + + "mask.proto\032\037google/protobuf/timestamp.pr" + + "oto\032\027google/rpc/status.proto\"\313\002\n\016Process" + + "Request\022D\n\017inline_document\030\004 \001(\0132).googl" + + "e.cloud.documentai.v1beta3.DocumentH\000\022D\n" + + "\014raw_document\030\005 \001(\0132,.google.cloud.docum" + + "entai.v1beta3.RawDocumentH\000\022\027\n\004name\030\001 \001(" + + "\tB\t\340A\002\372A\003\n\001*\022?\n\010document\030\002 \001(\0132).google." + + "cloud.documentai.v1beta3.DocumentB\002\030\001\022\031\n" + + "\021skip_human_review\030\003 \001(\010\022.\n\nfield_mask\030\006" + + " \001(\0132\032.google.protobuf.FieldMaskB\010\n\006sour" + + "ce\"\363\001\n\021HumanReviewStatus\022G\n\005state\030\001 \001(\0162" + + "8.google.cloud.documentai.v1beta3.HumanR" + + "eviewStatus.State\022\025\n\rstate_message\030\002 \001(\t" + + "\022\036\n\026human_review_operation\030\003 \001(\t\"^\n\005Stat" + + "e\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007SKIPPED\020\001\022\025\n" + + "\021VALIDATION_PASSED\020\002\022\017\n\013IN_PROGRESS\020\003\022\t\n" + + "\005ERROR\020\004\"\303\001\n\017ProcessResponse\022;\n\010document" + + "\030\001 \001(\0132).google.cloud.documentai.v1beta3" + + ".Document\022\"\n\026human_review_operation\030\002 \001(" + + "\tB\002\030\001\022O\n\023human_review_status\030\003 \001(\01322.goo" + + "gle.cloud.documentai.v1beta3.HumanReview" + + "Status\"\253\004\n\023BatchProcessRequest\022\027\n\004name\030\001" + + " \001(\tB\t\340A\002\372A\003\n\001*\022`\n\rinput_configs\030\002 \003(\0132E" + + ".google.cloud.documentai.v1beta3.BatchPr" + + "ocessRequest.BatchInputConfigB\002\030\001\022a\n\rout" + + "put_config\030\003 \001(\0132F.google.cloud.document" + + "ai.v1beta3.BatchProcessRequest.BatchOutp" + + "utConfigB\002\030\001\022S\n\017input_documents\030\005 \001(\0132:." + + "google.cloud.documentai.v1beta3.BatchDoc" + + "umentsInputConfig\022U\n\026document_output_con" + + "fig\030\006 \001(\01325.google.cloud.documentai.v1be" + + "ta3.DocumentOutputConfig\022\031\n\021skip_human_r" + + "eview\030\004 \001(\010\032=\n\020BatchInputConfig\022\022\n\ngcs_s" + + "ource\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(\t:\002\030\001\0320\n\021Ba" + + "tchOutputConfig\022\027\n\017gcs_destination\030\001 \001(\t" + + ":\002\030\001\"\026\n\024BatchProcessResponse\"\262\005\n\024BatchPr" + + "ocessMetadata\022J\n\005state\030\001 \001(\0162;.google.cl" + + "oud.documentai.v1beta3.BatchProcessMetad" + + "ata.State\022\025\n\rstate_message\030\002 \001(\t\022/\n\013crea" + + "te_time\030\003 \001(\0132\032.google.protobuf.Timestam" + + "p\022/\n\013update_time\030\004 \001(\0132\032.google.protobuf" + + ".Timestamp\022r\n\033individual_process_statuse" + + "s\030\005 \003(\0132M.google.cloud.documentai.v1beta" + + "3.BatchProcessMetadata.IndividualProcess" + + "Status\032\354\001\n\027IndividualProcessStatus\022\030\n\020in" + + "put_gcs_source\030\001 \001(\t\022\"\n\006status\030\002 \001(\0132\022.g" + + "oogle.rpc.Status\022\036\n\026output_gcs_destinati" + + "on\030\003 \001(\t\022\"\n\026human_review_operation\030\004 \001(\t" + + "B\002\030\001\022O\n\023human_review_status\030\005 \001(\01322.goog" + + "le.cloud.documentai.v1beta3.HumanReviewS" + + "tatus\"r\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n" + + "\007WAITING\020\001\022\013\n\007RUNNING\020\002\022\r\n\tSUCCEEDED\020\003\022\016" + + "\n\nCANCELLING\020\004\022\r\n\tCANCELLED\020\005\022\n\n\006FAILED\020" + + "\006\"]\n\032FetchProcessorTypesRequest\022?\n\006paren" + + "t\030\001 \001(\tB/\340A\002\372A)\022\'documentai.googleapis.c" + + "om/ProcessorType\"f\n\033FetchProcessorTypesR" + + "esponse\022G\n\017processor_types\030\001 \003(\0132..googl" + + "e.cloud.documentai.v1beta3.ProcessorType" + + "\"\203\001\n\031ListProcessorTypesRequest\022?\n\006parent" + + "\030\001 \001(\tB/\340A\002\372A)\022\'documentai.googleapis.co" + + "m/ProcessorType\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npa" + + "ge_token\030\003 \001(\t\"~\n\032ListProcessorTypesResp" + + "onse\022G\n\017processor_types\030\001 \003(\0132..google.c" + + "loud.documentai.v1beta3.ProcessorType\022\027\n" + + "\017next_page_token\030\002 \001(\t\"{\n\025ListProcessors" + + "Request\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#documen" + + "tai.googleapis.com/Processor\022\021\n\tpage_siz" + + "e\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"q\n\026ListProce" + + "ssorsResponse\022>\n\nprocessors\030\001 \003(\0132*.goog" + + "le.cloud.documentai.v1beta3.Processor\022\027\n" + + "\017next_page_token\030\002 \001(\t\"P\n\023GetProcessorRe" + + "quest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#documentai." + + "googleapis.com/Processor\"^\n\032GetProcessor" + + "VersionRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*do" + + "cumentai.googleapis.com/ProcessorVersion" + + "\"\211\001\n\034ListProcessorVersionsRequest\022B\n\006par" + + "ent\030\001 \001(\tB2\340A\002\372A,\022*documentai.googleapis" + + ".com/ProcessorVersion\022\021\n\tpage_size\030\002 \001(\005" + + "\022\022\n\npage_token\030\003 \001(\t\"\207\001\n\035ListProcessorVe" + + "rsionsResponse\022M\n\022processor_versions\030\001 \003" + + "(\01321.google.cloud.documentai.v1beta3.Pro" + + "cessorVersion\022\027\n\017next_page_token\030\002 \001(\t\"a" + + "\n\035DeleteProcessorVersionRequest\022@\n\004name\030" + + "\001 \001(\tB2\340A\002\372A,\n*documentai.googleapis.com" + + "/ProcessorVersion\"s\n\036DeleteProcessorVers" + "ionMetadata\022Q\n\017common_metadata\030\001 \001(\01328.g" + "oogle.cloud.documentai.v1beta3.CommonOpe" - + "rationMetadata\"c\n\037UndeployProcessorVersi" - + "onRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*documen" - + "tai.googleapis.com/ProcessorVersion\"\"\n U" - + "ndeployProcessorVersionResponse\"u\n Undep" - + "loyProcessorVersionMetadata\022Q\n\017common_me" - + "tadata\030\001 \001(\01328.google.cloud.documentai.v" - + "1beta3.CommonOperationMetadata\"\231\001\n\026Creat" - + "eProcessorRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A" - + "%\022#documentai.googleapis.com/Processor\022B" - + "\n\tprocessor\030\002 \001(\0132*.google.cloud.documen" - + "tai.v1beta3.ProcessorB\003\340A\002\"S\n\026DeleteProc" - + "essorRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#docu" - + "mentai.googleapis.com/Processor\"l\n\027Delet" - + "eProcessorMetadata\022Q\n\017common_metadata\030\005 " - + "\001(\01328.google.cloud.documentai.v1beta3.Co" - + "mmonOperationMetadata\"S\n\026EnableProcessor" - + "Request\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#documenta" - + "i.googleapis.com/Processor\"\031\n\027EnableProc" - + "essorResponse\"l\n\027EnableProcessorMetadata" - + "\022Q\n\017common_metadata\030\005 \001(\01328.google.cloud" - + ".documentai.v1beta3.CommonOperationMetad" - + "ata\"T\n\027DisableProcessorRequest\0229\n\004name\030\001" - + " \001(\tB+\340A\002\372A%\n#documentai.googleapis.com/" - + "Processor\"\032\n\030DisableProcessorResponse\"m\n" - + "\030DisableProcessorMetadata\022Q\n\017common_meta" - + "data\030\005 \001(\01328.google.cloud.documentai.v1b" - + "eta3.CommonOperationMetadata\"\272\001\n!SetDefa" - + "ultProcessorVersionRequest\022>\n\tprocessor\030" - + "\001 \001(\tB+\340A\002\372A%\n#documentai.googleapis.com" - + "/Processor\022U\n\031default_processor_version\030" - + "\002 \001(\tB2\340A\002\372A,\n*documentai.googleapis.com" - + "/ProcessorVersion\"$\n\"SetDefaultProcessor" - + "VersionResponse\"w\n\"SetDefaultProcessorVe" - + "rsionMetadata\022Q\n\017common_metadata\030\001 \001(\01328" + + "rationMetadata\"a\n\035DeployProcessorVersion" + + "Request\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*documenta" + + "i.googleapis.com/ProcessorVersion\" \n\036Dep" + + "loyProcessorVersionResponse\"s\n\036DeployPro" + + "cessorVersionMetadata\022Q\n\017common_metadata" + + "\030\001 \001(\01328.google.cloud.documentai.v1beta3" + + ".CommonOperationMetadata\"c\n\037UndeployProc" + + "essorVersionRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A" + + ",\n*documentai.googleapis.com/ProcessorVe" + + "rsion\"\"\n UndeployProcessorVersionRespons" + + "e\"u\n UndeployProcessorVersionMetadata\022Q\n" + + "\017common_metadata\030\001 \001(\01328.google.cloud.do" + + "cumentai.v1beta3.CommonOperationMetadata" + + "\"\231\001\n\026CreateProcessorRequest\022;\n\006parent\030\001 " + + "\001(\tB+\340A\002\372A%\022#documentai.googleapis.com/P" + + "rocessor\022B\n\tprocessor\030\002 \001(\0132*.google.clo" + + "ud.documentai.v1beta3.ProcessorB\003\340A\002\"S\n\026" + + "DeleteProcessorRequest\0229\n\004name\030\001 \001(\tB+\340A" + + "\002\372A%\n#documentai.googleapis.com/Processo" + + "r\"l\n\027DeleteProcessorMetadata\022Q\n\017common_m" + + "etadata\030\005 \001(\01328.google.cloud.documentai." + + "v1beta3.CommonOperationMetadata\"S\n\026Enabl" + + "eProcessorRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n" + + "#documentai.googleapis.com/Processor\"\031\n\027" + + "EnableProcessorResponse\"l\n\027EnableProcess" + + "orMetadata\022Q\n\017common_metadata\030\005 \001(\01328.go" + + "ogle.cloud.documentai.v1beta3.CommonOper" + + "ationMetadata\"T\n\027DisableProcessorRequest" + + "\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#documentai.googl" + + "eapis.com/Processor\"\032\n\030DisableProcessorR" + + "esponse\"m\n\030DisableProcessorMetadata\022Q\n\017c" + + "ommon_metadata\030\005 \001(\01328.google.cloud.docu" + + "mentai.v1beta3.CommonOperationMetadata\"\272" + + "\001\n!SetDefaultProcessorVersionRequest\022>\n\t" + + "processor\030\001 \001(\tB+\340A\002\372A%\n#documentai.goog" + + "leapis.com/Processor\022U\n\031default_processo" + + "r_version\030\002 \001(\tB2\340A\002\372A,\n*documentai.goog" + + "leapis.com/ProcessorVersion\"$\n\"SetDefaul" + + "tProcessorVersionResponse\"w\n\"SetDefaultP" + + "rocessorVersionMetadata\022Q\n\017common_metada" + + "ta\030\001 \001(\01328.google.cloud.documentai.v1bet" + + "a3.CommonOperationMetadata\"\305\004\n\034TrainProc" + + "essorVersionRequest\022B\n\006parent\030\001 \001(\tB2\340A\002" + + "\372A,\022*documentai.googleapis.com/Processor" + + "Version\022Q\n\021processor_version\030\002 \001(\01321.goo" + + "gle.cloud.documentai.v1beta3.ProcessorVe" + + "rsionB\003\340A\002\022M\n\017document_schema\030\n \001(\0132/.go" + + "ogle.cloud.documentai.v1beta3.DocumentSc" + + "hemaB\003\340A\001\022`\n\ninput_data\030\004 \001(\0132G.google.c" + + "loud.documentai.v1beta3.TrainProcessorVe" + + "rsionRequest.InputDataB\003\340A\001\022#\n\026base_proc" + + "essor_version\030\010 \001(\tB\003\340A\001\032\267\001\n\tInputData\022V" + + "\n\022training_documents\030\003 \001(\0132:.google.clou" + + "d.documentai.v1beta3.BatchDocumentsInput" + + "Config\022R\n\016test_documents\030\004 \001(\0132:.google." + + "cloud.documentai.v1beta3.BatchDocumentsI" + + "nputConfig\":\n\035TrainProcessorVersionRespo" + + "nse\022\031\n\021processor_version\030\001 \001(\t\"\206\004\n\035Train" + + "ProcessorVersionMetadata\022Q\n\017common_metad" + + "ata\030\001 \001(\01328.google.cloud.documentai.v1be" + + "ta3.CommonOperationMetadata\022u\n\033training_" + + "dataset_validation\030\002 \001(\0132P.google.cloud." + + "documentai.v1beta3.TrainProcessorVersion" + + "Metadata.DatasetValidation\022q\n\027test_datas" + + "et_validation\030\003 \001(\0132P.google.cloud.docum" + + "entai.v1beta3.TrainProcessorVersionMetad" + + "ata.DatasetValidation\032\247\001\n\021DatasetValidat" + + "ion\022\034\n\024document_error_count\030\003 \001(\005\022\033\n\023dat" + + "aset_error_count\030\004 \001(\005\022+\n\017document_error" + + "s\030\001 \003(\0132\022.google.rpc.Status\022*\n\016dataset_e" + + "rrors\030\002 \003(\0132\022.google.rpc.Status\"\336\003\n\025Revi" + + "ewDocumentRequest\022D\n\017inline_document\030\004 \001" + + "(\0132).google.cloud.documentai.v1beta3.Doc" + + "umentH\000\022P\n\023human_review_config\030\001 \001(\tB3\340A" + + "\002\372A-\n+documentai.googleapis.com/HumanRev" + + "iewConfig\022?\n\010document\030\002 \001(\0132).google.clo" + + "ud.documentai.v1beta3.DocumentB\002\030\001\022 \n\030en" + + "able_schema_validation\030\003 \001(\010\022Q\n\010priority" + + "\030\005 \001(\0162?.google.cloud.documentai.v1beta3" + + ".ReviewDocumentRequest.Priority\022H\n\017docum" + + "ent_schema\030\006 \001(\0132/.google.cloud.document" + + "ai.v1beta3.DocumentSchema\"#\n\010Priority\022\013\n" + + "\007DEFAULT\020\000\022\n\n\006URGENT\020\001B\010\n\006source\"\326\001\n\026Rev" + + "iewDocumentResponse\022\027\n\017gcs_destination\030\001" + + " \001(\t\022L\n\005state\030\002 \001(\0162=.google.cloud.docum" + + "entai.v1beta3.ReviewDocumentResponse.Sta" + + "te\022\030\n\020rejection_reason\030\003 \001(\t\";\n\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n\010REJECTED\020\001\022\r\n\tSU" + + "CCEEDED\020\002\"\300\003\n\037ReviewDocumentOperationMet" + + "adata\022U\n\005state\030\001 \001(\0162F.google.cloud.docu" + + "mentai.v1beta3.ReviewDocumentOperationMe" + + "tadata.State\022\025\n\rstate_message\030\002 \001(\t\022/\n\013c" + + "reate_time\030\003 \001(\0132\032.google.protobuf.Times" + + "tamp\022/\n\013update_time\030\004 \001(\0132\032.google.proto" + + "buf.Timestamp\022Q\n\017common_metadata\030\005 \001(\01328" + ".google.cloud.documentai.v1beta3.CommonO" - + "perationMetadata\"\336\003\n\025ReviewDocumentReque" - + "st\022D\n\017inline_document\030\004 \001(\0132).google.clo" - + "ud.documentai.v1beta3.DocumentH\000\022P\n\023huma" - + "n_review_config\030\001 \001(\tB3\340A\002\372A-\n+documenta" - + "i.googleapis.com/HumanReviewConfig\022?\n\010do" - + "cument\030\002 \001(\0132).google.cloud.documentai.v" - + "1beta3.DocumentB\002\030\001\022 \n\030enable_schema_val" - + "idation\030\003 \001(\010\022Q\n\010priority\030\005 \001(\0162?.google" - + ".cloud.documentai.v1beta3.ReviewDocument" - + "Request.Priority\022H\n\017document_schema\030\006 \001(" - + "\0132/.google.cloud.documentai.v1beta3.Docu" - + "mentSchema\"#\n\010Priority\022\013\n\007DEFAULT\020\000\022\n\n\006U" - + "RGENT\020\001B\010\n\006source\"\326\001\n\026ReviewDocumentResp" - + "onse\022\027\n\017gcs_destination\030\001 \001(\t\022L\n\005state\030\002" - + " \001(\0162=.google.cloud.documentai.v1beta3.R" - + "eviewDocumentResponse.State\022\030\n\020rejection" - + "_reason\030\003 \001(\t\";\n\005State\022\025\n\021STATE_UNSPECIF" - + "IED\020\000\022\014\n\010REJECTED\020\001\022\r\n\tSUCCEEDED\020\002\"\300\003\n\037R" - + "eviewDocumentOperationMetadata\022U\n\005state\030" - + "\001 \001(\0162F.google.cloud.documentai.v1beta3." - + "ReviewDocumentOperationMetadata.State\022\025\n" - + "\rstate_message\030\002 \001(\t\022/\n\013create_time\030\003 \001(" - + "\0132\032.google.protobuf.Timestamp\022/\n\013update_" - + "time\030\004 \001(\0132\032.google.protobuf.Timestamp\022Q" - + "\n\017common_metadata\030\005 \001(\01328.google.cloud.d" - + "ocumentai.v1beta3.CommonOperationMetadat" - + "a\022\023\n\013question_id\030\006 \001(\t\"e\n\005State\022\025\n\021STATE" - + "_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\016\n\nCANCELLIN" - + "G\020\002\022\r\n\tSUCCEEDED\020\003\022\n\n\006FAILED\020\004\022\r\n\tCANCEL" - + "LED\020\0052\244\"\n\030DocumentProcessorService\022\233\002\n\017P" - + "rocessDocument\022/.google.cloud.documentai" - + ".v1beta3.ProcessRequest\0320.google.cloud.d" - + "ocumentai.v1beta3.ProcessResponse\"\244\001\202\323\344\223" - + "\002\226\001\";/v1beta3/{name=projects/*/locations" - + "/*/processors/*}:process:\001*ZT\"O/v1beta3/" - + "{name=projects/*/locations/*/processors/" - + "*/processorVersions/*}:process:\001*\332A\004name" - + "\022\314\002\n\025BatchProcessDocuments\0224.google.clou" - + "d.documentai.v1beta3.BatchProcessRequest" - + "\032\035.google.longrunning.Operation\"\335\001\202\323\344\223\002\240" - + "\001\"@/v1beta3/{name=projects/*/locations/*" - + "/processors/*}:batchProcess:\001*ZY\"T/v1bet" - + "a3/{name=projects/*/locations/*/processo" - + "rs/*/processorVersions/*}:batchProcess:\001" - + "*\332A\004name\312A,\n\024BatchProcessResponse\022\024Batch" - + "ProcessMetadata\022\337\001\n\023FetchProcessorTypes\022" - + ";.google.cloud.documentai.v1beta3.FetchP" - + "rocessorTypesRequest\032<.google.cloud.docu" - + "mentai.v1beta3.FetchProcessorTypesRespon" - + "se\"M\202\323\344\223\002>\022." - + "google.cloud.documentai.v1beta3.ListProc" - + "essorVersionsResponse\"X\202\323\344\223\002I\022G/v1beta3/" + + "perationMetadata\022\023\n\013question_id\030\006 \001(\t\"e\n" + + "\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING" + + "\020\001\022\016\n\nCANCELLING\020\002\022\r\n\tSUCCEEDED\020\003\022\n\n\006FAI" + + "LED\020\004\022\r\n\tCANCELLED\020\005\"\317\001\n\037EvaluateProcess" + + "orVersionRequest\022M\n\021processor_version\030\001 " + + "\001(\tB2\340A\002\372A,\n*documentai.googleapis.com/P" + + "rocessorVersion\022]\n\024evaluation_documents\030" + + "\003 \001(\0132:.google.cloud.documentai.v1beta3." + + "BatchDocumentsInputConfigB\003\340A\001\"u\n Evalua" + + "teProcessorVersionMetadata\022Q\n\017common_met" + + "adata\030\001 \001(\01328.google.cloud.documentai.v1" + + "beta3.CommonOperationMetadata\"6\n Evaluat" + + "eProcessorVersionResponse\022\022\n\nevaluation\030" + + "\002 \001(\t\"R\n\024GetEvaluationRequest\022:\n\004name\030\001 " + + "\001(\tB,\340A\002\372A&\n$documentai.googleapis.com/E" + + "valuation\"\203\001\n\026ListEvaluationsRequest\022B\n\006" + + "parent\030\001 \001(\tB2\340A\002\372A,\n*documentai.googlea" + + "pis.com/ProcessorVersion\022\021\n\tpage_size\030\002 " + + "\001(\005\022\022\n\npage_token\030\003 \001(\t\"t\n\027ListEvaluatio" + + "nsResponse\022@\n\013evaluations\030\001 \003(\0132+.google" + + ".cloud.documentai.v1beta3.Evaluation\022\027\n\017" + + "next_page_token\030\002 \001(\t2\362*\n\030DocumentProces" + + "sorService\022\233\002\n\017ProcessDocument\022/.google." + + "cloud.documentai.v1beta3.ProcessRequest\032" + + "0.google.cloud.documentai.v1beta3.Proces" + + "sResponse\"\244\001\202\323\344\223\002\226\001\";/v1beta3/{name=proj" + + "ects/*/locations/*/processors/*}:process" + + ":\001*ZT\"O/v1beta3/{name=projects/*/locatio" + + "ns/*/processors/*/processorVersions/*}:p" + + "rocess:\001*\332A\004name\022\314\002\n\025BatchProcessDocumen" + + "ts\0224.google.cloud.documentai.v1beta3.Bat" + + "chProcessRequest\032\035.google.longrunning.Op" + + "eration\"\335\001\202\323\344\223\002\240\001\"@/v1beta3/{name=projec" + + "ts/*/locations/*/processors/*}:batchProc" + + "ess:\001*ZY\"T/v1beta3/{name=projects/*/loca" + + "tions/*/processors/*/processorVersions/*" + + "}:batchProcess:\001*\332A\004name\312A,\n\024BatchProces" + + "sResponse\022\024BatchProcessMetadata\022\337\001\n\023Fetc" + + "hProcessorTypes\022;.google.cloud.documenta" + + "i.v1beta3.FetchProcessorTypesRequest\032<.g" + + "oogle.cloud.documentai.v1beta3.FetchProc" + + "essorTypesResponse\"M\202\323\344\223\002>\022.google.cloud.docume" - + "ntai.v1beta3.DeleteProcessorVersionReque" - + "st\032\035.google.longrunning.Operation\"\220\001\202\323\344\223" - + "\002I*G/v1beta3/{name=projects/*/locations/" - + "*/processors/*/processorVersions/*}\332A\004na" - + "me\312A7\n\025google.protobuf.Empty\022\036DeleteProc" - + "essorVersionMetadata\022\235\002\n\026DeployProcessor" - + "Version\022>.google.cloud.documentai.v1beta" - + "3.DeployProcessorVersionRequest\032\035.google" - + ".longrunning.Operation\"\243\001\202\323\344\223\002S\"N/v1beta" - + "3/{name=projects/*/locations/*/processor" - + "s/*/processorVersions/*}:deploy:\001*\332A\004nam" - + "e\312A@\n\036DeployProcessorVersionResponse\022\036De" - + "ployProcessorVersionMetadata\022\247\002\n\030Undeplo" - + "yProcessorVersion\022@.google.cloud.documen" - + "tai.v1beta3.UndeployProcessorVersionRequ" - + "est\032\035.google.longrunning.Operation\"\251\001\202\323\344" - + "\223\002U\"P/v1beta3/{name=projects/*/locations" - + "/*/processors/*/processorVersions/*}:und" - + "eploy:\001*\332A\004name\312AD\n UndeployProcessorVer" - + "sionResponse\022 UndeployProcessorVersionMe" - + "tadata\022\321\001\n\017CreateProcessor\0227.google.clou" - + "d.documentai.v1beta3.CreateProcessorRequ" - + "est\032*.google.cloud.documentai.v1beta3.Pr" - + "ocessor\"Y\202\323\344\223\002@\"3/v1beta3/{parent=projec" - + "ts/*/locations/*}/processors:\tprocessor\332" - + "A\020parent,processor\022\340\001\n\017DeleteProcessor\0227" - + ".google.cloud.documentai.v1beta3.DeleteP" - + "rocessorRequest\032\035.google.longrunning.Ope" - + "ration\"u\202\323\344\223\0025*3/v1beta3/{name=projects/" - + "*/locations/*/processors/*}\332A\004name\312A0\n\025g" - + "oogle.protobuf.Empty\022\027DeleteProcessorMet" - + "adata\022\345\001\n\017EnableProcessor\0227.google.cloud" - + ".documentai.v1beta3.EnableProcessorReque" - + "st\032\035.google.longrunning.Operation\"z\202\323\344\223\002" - + "?\":/v1beta3/{name=projects/*/locations/*" - + "/processors/*}:enable:\001*\312A2\n\027EnableProce" - + "ssorResponse\022\027EnableProcessorMetadata\022\352\001" - + "\n\020DisableProcessor\0228.google.cloud.docume" - + "ntai.v1beta3.DisableProcessorRequest\032\035.g" - + "oogle.longrunning.Operation\"}\202\323\344\223\002@\";/v1" - + "beta3/{name=projects/*/locations/*/proce" - + "ssors/*}:disable:\001*\312A4\n\030DisableProcessor" - + "Response\022\030DisableProcessorMetadata\022\253\002\n\032S" - + "etDefaultProcessorVersion\022B.google.cloud" - + ".documentai.v1beta3.SetDefaultProcessorV" - + "ersionRequest\032\035.google.longrunning.Opera" - + "tion\"\251\001\202\323\344\223\002X\"S/v1beta3/{processor=proje" - + "cts/*/locations/*/processors/*}:setDefau" - + "ltProcessorVersion:\001*\312AH\n\"SetDefaultProc" - + "essorVersionResponse\022\"SetDefaultProcesso" - + "rVersionMetadata\022\252\002\n\016ReviewDocument\0226.go" - + "ogle.cloud.documentai.v1beta3.ReviewDocu" - + "mentRequest\032\035.google.longrunning.Operati" - + "on\"\300\001\202\323\344\223\002h\"c/v1beta3/{human_review_conf" - + "ig=projects/*/locations/*/processors/*/h" - + "umanReviewConfig}:reviewDocument:\001*\332A\023hu" - + "man_review_config\312A9\n\026ReviewDocumentResp" - + "onse\022\037ReviewDocumentOperationMetadata\032M\312" - + "A\031documentai.googleapis.com\322A.https://ww" - + "w.googleapis.com/auth/cloud-platformB\311\003\n" - + "#com.google.cloud.documentai.v1beta3B\032Do" - + "cumentAiProcessorServiceP\001ZIgoogle.golan" - + "g.org/genproto/googleapis/cloud/document" - + "ai/v1beta3;documentai\252\002\037Google.Cloud.Doc" - + "umentAI.V1Beta3\312\002\037Google\\Cloud\\DocumentA" - + "I\\V1beta3\352\002\"Google::Cloud::DocumentAI::V" - + "1beta3\352A\177\n+documentai.googleapis.com/Hum" - + "anReviewConfig\022Pprojects/{project}/locat" - + "ions/{location}/processors/{processor}/h" - + "umanReviewConfig\352AM\n\"documentai.googleap" - + "is.com/Location\022\'projects/{project}/loca" - + "tions/{location}b\006proto3" + + "s/*}/processorVersions:train:\001*\332A\030parent" + + ",processor_version\312A>\n\035TrainProcessorVer" + + "sionResponse\022\035TrainProcessorVersionMetad" + + "ata\022\335\001\n\023GetProcessorVersion\022;.google.clo" + + "ud.documentai.v1beta3.GetProcessorVersio" + + "nRequest\0321.google.cloud.documentai.v1bet" + + "a3.ProcessorVersion\"V\202\323\344\223\002I\022G/v1beta3/{n" + + "ame=projects/*/locations/*/processors/*/" + + "processorVersions/*}\332A\004name\022\360\001\n\025ListProc" + + "essorVersions\022=.google.cloud.documentai." + + "v1beta3.ListProcessorVersionsRequest\032>.g" + + "oogle.cloud.documentai.v1beta3.ListProce" + + "ssorVersionsResponse\"X\202\323\344\223\002I\022G/v1beta3/{" + + "parent=projects/*/locations/*/processors" + + "/*}/processorVersions\332A\006parent\022\212\002\n\026Delet" + + "eProcessorVersion\022>.google.cloud.documen" + + "tai.v1beta3.DeleteProcessorVersionReques" + + "t\032\035.google.longrunning.Operation\"\220\001\202\323\344\223\002" + + "I*G/v1beta3/{name=projects/*/locations/*" + + "/processors/*/processorVersions/*}\332A\004nam" + + "e\312A7\n\025google.protobuf.Empty\022\036DeleteProce" + + "ssorVersionMetadata\022\235\002\n\026DeployProcessorV" + + "ersion\022>.google.cloud.documentai.v1beta3" + + ".DeployProcessorVersionRequest\032\035.google." + + "longrunning.Operation\"\243\001\202\323\344\223\002S\"N/v1beta3" + + "/{name=projects/*/locations/*/processors" + + "/*/processorVersions/*}:deploy:\001*\332A\004name" + + "\312A@\n\036DeployProcessorVersionResponse\022\036Dep" + + "loyProcessorVersionMetadata\022\247\002\n\030Undeploy" + + "ProcessorVersion\022@.google.cloud.document" + + "ai.v1beta3.UndeployProcessorVersionReque" + + "st\032\035.google.longrunning.Operation\"\251\001\202\323\344\223" + + "\002U\"P/v1beta3/{name=projects/*/locations/" + + "*/processors/*/processorVersions/*}:unde" + + "ploy:\001*\332A\004name\312AD\n UndeployProcessorVers" + + "ionResponse\022 UndeployProcessorVersionMet" + + "adata\022\321\001\n\017CreateProcessor\0227.google.cloud" + + ".documentai.v1beta3.CreateProcessorReque" + + "st\032*.google.cloud.documentai.v1beta3.Pro" + + "cessor\"Y\202\323\344\223\002@\"3/v1beta3/{parent=project" + + "s/*/locations/*}/processors:\tprocessor\332A" + + "\020parent,processor\022\340\001\n\017DeleteProcessor\0227." + + "google.cloud.documentai.v1beta3.DeletePr" + + "ocessorRequest\032\035.google.longrunning.Oper" + + "ation\"u\202\323\344\223\0025*3/v1beta3/{name=projects/*" + + "/locations/*/processors/*}\332A\004name\312A0\n\025go" + + "ogle.protobuf.Empty\022\027DeleteProcessorMeta" + + "data\022\345\001\n\017EnableProcessor\0227.google.cloud." + + "documentai.v1beta3.EnableProcessorReques" + + "t\032\035.google.longrunning.Operation\"z\202\323\344\223\002?" + + "\":/v1beta3/{name=projects/*/locations/*/" + + "processors/*}:enable:\001*\312A2\n\027EnableProces" + + "sorResponse\022\027EnableProcessorMetadata\022\352\001\n" + + "\020DisableProcessor\0228.google.cloud.documen" + + "tai.v1beta3.DisableProcessorRequest\032\035.go" + + "ogle.longrunning.Operation\"}\202\323\344\223\002@\";/v1b" + + "eta3/{name=projects/*/locations/*/proces" + + "sors/*}:disable:\001*\312A4\n\030DisableProcessorR" + + "esponse\022\030DisableProcessorMetadata\022\253\002\n\032Se" + + "tDefaultProcessorVersion\022B.google.cloud." + + "documentai.v1beta3.SetDefaultProcessorVe" + + "rsionRequest\032\035.google.longrunning.Operat" + + "ion\"\251\001\202\323\344\223\002X\"S/v1beta3/{processor=projec" + + "ts/*/locations/*/processors/*}:setDefaul" + + "tProcessorVersion:\001*\312AH\n\"SetDefaultProce" + + "ssorVersionResponse\022\"SetDefaultProcessor" + + "VersionMetadata\022\252\002\n\016ReviewDocument\0226.goo" + + "gle.cloud.documentai.v1beta3.ReviewDocum" + + "entRequest\032\035.google.longrunning.Operatio" + + "n\"\300\001\202\323\344\223\002h\"c/v1beta3/{human_review_confi" + + "g=projects/*/locations/*/processors/*/hu" + + "manReviewConfig}:reviewDocument:\001*\332A\023hum" + + "an_review_config\312A9\n\026ReviewDocumentRespo" + + "nse\022\037ReviewDocumentOperationMetadata\022\321\002\n" + + "\030EvaluateProcessorVersion\022@.google.cloud" + + ".documentai.v1beta3.EvaluateProcessorVer" + + "sionRequest\032\035.google.longrunning.Operati" + + "on\"\323\001\202\323\344\223\002r\"m/v1beta3/{processor_version" + + "=projects/*/locations/*/processors/*/pro" + + "cessorVersions/*}:evaluateProcessorVersi" + + "on:\001*\332A\021processor_version\312AD\n EvaluatePr" + + "ocessorVersionResponse\022 EvaluateProcesso" + + "rVersionMetadata\022\331\001\n\rGetEvaluation\0225.goo" + + "gle.cloud.documentai.v1beta3.GetEvaluati" + + "onRequest\032+.google.cloud.documentai.v1be" + + "ta3.Evaluation\"d\202\323\344\223\002W\022U/v1beta3/{name=p" + + "rojects/*/locations/*/processors/*/proce" + + "ssorVersions/*/evaluations/*}\332A\004name\022\354\001\n" + + "\017ListEvaluations\0227.google.cloud.document" + + "ai.v1beta3.ListEvaluationsRequest\0328.goog" + + "le.cloud.documentai.v1beta3.ListEvaluati" + + "onsResponse\"f\202\323\344\223\002W\022U/v1beta3/{parent=pr" + + "ojects/*/locations/*/processors/*/proces" + + "sorVersions/*}/evaluations\332A\006parent\032M\312A\031" + + "documentai.googleapis.com\322A.https://www." + + "googleapis.com/auth/cloud-platformB\311\003\n#c" + + "om.google.cloud.documentai.v1beta3B\032Docu" + + "mentAiProcessorServiceP\001ZIgoogle.golang." + + "org/genproto/googleapis/cloud/documentai" + + "/v1beta3;documentai\252\002\037Google.Cloud.Docum" + + "entAI.V1Beta3\312\002\037Google\\Cloud\\DocumentAI\\" + + "V1beta3\352\002\"Google::Cloud::DocumentAI::V1b" + + "eta3\352A\177\n+documentai.googleapis.com/Human" + + "ReviewConfig\022Pprojects/{project}/locatio" + + "ns/{location}/processors/{processor}/hum" + + "anReviewConfig\352AM\n\"documentai.googleapis" + + ".com/Location\022\'projects/{project}/locati" + + "ons/{location}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -510,6 +630,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.documentai.v1beta3.DocumentProto.getDescriptor(), com.google.cloud.documentai.v1beta3.DocumentIoProto.getDescriptor(), com.google.cloud.documentai.v1beta3.DocumentAiDocumentSchema.getDescriptor(), + com.google.cloud.documentai.v1beta3.DocumentAiEvaluation.getDescriptor(), com.google.cloud.documentai.v1beta3.OperationMetadataProto.getDescriptor(), com.google.cloud.documentai.v1beta3.DocumentAiProcessor.getDescriptor(), com.google.cloud.documentai.v1beta3.DocumentAiProcessorType.getDescriptor(), @@ -839,8 +960,52 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "CommonMetadata", }); - internal_static_google_cloud_documentai_v1beta3_ReviewDocumentRequest_descriptor = + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_descriptor = getDescriptor().getMessageTypes().get(36); + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_descriptor, + new java.lang.String[] { + "Parent", "ProcessorVersion", "DocumentSchema", "InputData", "BaseProcessorVersion", + }); + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_InputData_descriptor = + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_InputData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_InputData_descriptor, + new java.lang.String[] { + "TrainingDocuments", "TestDocuments", + }); + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionResponse_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionResponse_descriptor, + new java.lang.String[] { + "ProcessorVersion", + }); + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_descriptor, + new java.lang.String[] { + "CommonMetadata", "TrainingDatasetValidation", "TestDatasetValidation", + }); + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_DatasetValidation_descriptor = + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_DatasetValidation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_DatasetValidation_descriptor, + new java.lang.String[] { + "DocumentErrorCount", "DatasetErrorCount", "DocumentErrors", "DatasetErrors", + }); + internal_static_google_cloud_documentai_v1beta3_ReviewDocumentRequest_descriptor = + getDescriptor().getMessageTypes().get(39); internal_static_google_cloud_documentai_v1beta3_ReviewDocumentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_ReviewDocumentRequest_descriptor, @@ -854,7 +1019,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Source", }); internal_static_google_cloud_documentai_v1beta3_ReviewDocumentResponse_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(40); internal_static_google_cloud_documentai_v1beta3_ReviewDocumentResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_ReviewDocumentResponse_descriptor, @@ -862,13 +1027,61 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GcsDestination", "State", "RejectionReason", }); internal_static_google_cloud_documentai_v1beta3_ReviewDocumentOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(41); internal_static_google_cloud_documentai_v1beta3_ReviewDocumentOperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_ReviewDocumentOperationMetadata_descriptor, new java.lang.String[] { "State", "StateMessage", "CreateTime", "UpdateTime", "CommonMetadata", "QuestionId", }); + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionRequest_descriptor, + new java.lang.String[] { + "ProcessorVersion", "EvaluationDocuments", + }); + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionMetadata_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionMetadata_descriptor, + new java.lang.String[] { + "CommonMetadata", + }); + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionResponse_descriptor = + getDescriptor().getMessageTypes().get(44); + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionResponse_descriptor, + new java.lang.String[] { + "Evaluation", + }); + internal_static_google_cloud_documentai_v1beta3_GetEvaluationRequest_descriptor = + getDescriptor().getMessageTypes().get(45); + internal_static_google_cloud_documentai_v1beta3_GetEvaluationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_GetEvaluationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_documentai_v1beta3_ListEvaluationsRequest_descriptor = + getDescriptor().getMessageTypes().get(46); + internal_static_google_cloud_documentai_v1beta3_ListEvaluationsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_ListEvaluationsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_documentai_v1beta3_ListEvaluationsResponse_descriptor = + getDescriptor().getMessageTypes().get(47); + internal_static_google_cloud_documentai_v1beta3_ListEvaluationsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_ListEvaluationsResponse_descriptor, + new java.lang.String[] { + "Evaluations", "NextPageToken", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -888,6 +1101,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.documentai.v1beta3.DocumentProto.getDescriptor(); com.google.cloud.documentai.v1beta3.DocumentIoProto.getDescriptor(); com.google.cloud.documentai.v1beta3.DocumentAiDocumentSchema.getDescriptor(); + com.google.cloud.documentai.v1beta3.DocumentAiEvaluation.getDescriptor(); com.google.cloud.documentai.v1beta3.OperationMetadataProto.getDescriptor(); com.google.cloud.documentai.v1beta3.DocumentAiProcessor.getDescriptor(); com.google.cloud.documentai.v1beta3.DocumentAiProcessorType.getDescriptor(); diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentIoProto.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentIoProto.java index 40cfc4b5ca8c..77a8bd54046b 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentIoProto.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentIoProto.java @@ -66,31 +66,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n1google/cloud/documentai/v1beta3/docume" + "nt_io.proto\022\037google.cloud.documentai.v1b" - + "eta3\"1\n\013RawDocument\022\017\n\007content\030\001 \001(\014\022\021\n\t" - + "mime_type\030\002 \001(\t\"1\n\013GcsDocument\022\017\n\007gcs_ur" - + "i\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(\t\"O\n\014GcsDocumen" - + "ts\022?\n\tdocuments\030\001 \003(\0132,.google.cloud.doc" - + "umentai.v1beta3.GcsDocument\"#\n\tGcsPrefix" - + "\022\026\n\016gcs_uri_prefix\030\001 \001(\t\"\257\001\n\031BatchDocume" - + "ntsInputConfig\022@\n\ngcs_prefix\030\001 \001(\0132*.goo" - + "gle.cloud.documentai.v1beta3.GcsPrefixH\000" - + "\022F\n\rgcs_documents\030\002 \001(\0132-.google.cloud.d" - + "ocumentai.v1beta3.GcsDocumentsH\000B\010\n\006sour" - + "ce\"\255\001\n\024DocumentOutputConfig\022b\n\021gcs_outpu" - + "t_config\030\001 \001(\0132E.google.cloud.documentai" - + ".v1beta3.DocumentOutputConfig.GcsOutputC" - + "onfigH\000\032\"\n\017GcsOutputConfig\022\017\n\007gcs_uri\030\001 " - + "\001(\tB\r\n\013destinationB\354\001\n#com.google.cloud." - + "documentai.v1beta3B\017DocumentIoProtoP\001ZIg" - + "oogle.golang.org/genproto/googleapis/clo" - + "ud/documentai/v1beta3;documentai\252\002\037Googl" - + "e.Cloud.DocumentAI.V1Beta3\312\002\037Google\\Clou" - + "d\\DocumentAI\\V1beta3\352\002\"Google::Cloud::Do" - + "cumentAI::V1beta3b\006proto3" + + "eta3\032 google/protobuf/field_mask.proto\"1" + + "\n\013RawDocument\022\017\n\007content\030\001 \001(\014\022\021\n\tmime_t" + + "ype\030\002 \001(\t\"1\n\013GcsDocument\022\017\n\007gcs_uri\030\001 \001(" + + "\t\022\021\n\tmime_type\030\002 \001(\t\"O\n\014GcsDocuments\022?\n\t" + + "documents\030\001 \003(\0132,.google.cloud.documenta" + + "i.v1beta3.GcsDocument\"#\n\tGcsPrefix\022\026\n\016gc" + + "s_uri_prefix\030\001 \001(\t\"\257\001\n\031BatchDocumentsInp" + + "utConfig\022@\n\ngcs_prefix\030\001 \001(\0132*.google.cl" + + "oud.documentai.v1beta3.GcsPrefixH\000\022F\n\rgc" + + "s_documents\030\002 \001(\0132-.google.cloud.documen" + + "tai.v1beta3.GcsDocumentsH\000B\010\n\006source\"\335\001\n" + + "\024DocumentOutputConfig\022b\n\021gcs_output_conf" + + "ig\030\001 \001(\0132E.google.cloud.documentai.v1bet" + + "a3.DocumentOutputConfig.GcsOutputConfigH" + + "\000\032R\n\017GcsOutputConfig\022\017\n\007gcs_uri\030\001 \001(\t\022.\n" + + "\nfield_mask\030\002 \001(\0132\032.google.protobuf.Fiel" + + "dMaskB\r\n\013destinationB\354\001\n#com.google.clou" + + "d.documentai.v1beta3B\017DocumentIoProtoP\001Z" + + "Igoogle.golang.org/genproto/googleapis/c" + + "loud/documentai/v1beta3;documentai\252\002\037Goo" + + "gle.Cloud.DocumentAI.V1Beta3\312\002\037Google\\Cl" + + "oud\\DocumentAI\\V1beta3\352\002\"Google::Cloud::" + + "DocumentAI::V1beta3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); internal_static_google_cloud_documentai_v1beta3_RawDocument_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_cloud_documentai_v1beta3_RawDocument_fieldAccessorTable = @@ -147,8 +152,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_DocumentOutputConfig_GcsOutputConfig_descriptor, new java.lang.String[] { - "GcsUri", + "GcsUri", "FieldMask", }); + com.google.protobuf.FieldMaskProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOrBuilder.java index 4768f97acc49..d8d843a946a9 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOrBuilder.java @@ -379,9 +379,9 @@ com.google.cloud.documentai.v1beta3.Document.EntityRelationOrBuilder getEntityRe * * *
-   * Placeholder.  A list of text corrections made to [Document.text].  This is
-   * usually used for annotating corrections to OCR mistakes.  Text changes for
-   * a given revision may not overlap with each other.
+   * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+   * is usually used for annotating corrections to OCR mistakes.  Text changes
+   * for a given revision may not overlap with each other.
    * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -391,9 +391,9 @@ com.google.cloud.documentai.v1beta3.Document.EntityRelationOrBuilder getEntityRe * * *
-   * Placeholder.  A list of text corrections made to [Document.text].  This is
-   * usually used for annotating corrections to OCR mistakes.  Text changes for
-   * a given revision may not overlap with each other.
+   * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+   * is usually used for annotating corrections to OCR mistakes.  Text changes
+   * for a given revision may not overlap with each other.
    * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -403,9 +403,9 @@ com.google.cloud.documentai.v1beta3.Document.EntityRelationOrBuilder getEntityRe * * *
-   * Placeholder.  A list of text corrections made to [Document.text].  This is
-   * usually used for annotating corrections to OCR mistakes.  Text changes for
-   * a given revision may not overlap with each other.
+   * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+   * is usually used for annotating corrections to OCR mistakes.  Text changes
+   * for a given revision may not overlap with each other.
    * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -415,9 +415,9 @@ com.google.cloud.documentai.v1beta3.Document.EntityRelationOrBuilder getEntityRe * * *
-   * Placeholder.  A list of text corrections made to [Document.text].  This is
-   * usually used for annotating corrections to OCR mistakes.  Text changes for
-   * a given revision may not overlap with each other.
+   * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+   * is usually used for annotating corrections to OCR mistakes.  Text changes
+   * for a given revision may not overlap with each other.
    * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; @@ -428,9 +428,9 @@ com.google.cloud.documentai.v1beta3.Document.EntityRelationOrBuilder getEntityRe * * *
-   * Placeholder.  A list of text corrections made to [Document.text].  This is
-   * usually used for annotating corrections to OCR mistakes.  Text changes for
-   * a given revision may not overlap with each other.
+   * Placeholder.  A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text].  This
+   * is usually used for annotating corrections to OCR mistakes.  Text changes
+   * for a given revision may not overlap with each other.
    * 
* * repeated .google.cloud.documentai.v1beta3.Document.TextChange text_changes = 14; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOutputConfig.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOutputConfig.java index 46f4e92bd640..5724a0e4dea9 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOutputConfig.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOutputConfig.java @@ -95,6 +95,47 @@ public interface GcsOutputConfigOrBuilder * @return The bytes for gcsUri. */ com.google.protobuf.ByteString getGcsUriBytes(); + + /** + * + * + *
+     * Specifies which fields to include in the output documents.
+     * Only supports top level document and pages field so it must be in the
+     * form of `{document_field_name}` or `pages.{page_field_name}`.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + * + * @return Whether the fieldMask field is set. + */ + boolean hasFieldMask(); + /** + * + * + *
+     * Specifies which fields to include in the output documents.
+     * Only supports top level document and pages field so it must be in the
+     * form of `{document_field_name}` or `pages.{page_field_name}`.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + * + * @return The fieldMask. + */ + com.google.protobuf.FieldMask getFieldMask(); + /** + * + * + *
+     * Specifies which fields to include in the output documents.
+     * Only supports top level document and pages field so it must be in the
+     * form of `{document_field_name}` or `pages.{page_field_name}`.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder(); } /** * @@ -195,6 +236,58 @@ public com.google.protobuf.ByteString getGcsUriBytes() { } } + public static final int FIELD_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask fieldMask_; + /** + * + * + *
+     * Specifies which fields to include in the output documents.
+     * Only supports top level document and pages field so it must be in the
+     * form of `{document_field_name}` or `pages.{page_field_name}`.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + * + * @return Whether the fieldMask field is set. + */ + @java.lang.Override + public boolean hasFieldMask() { + return fieldMask_ != null; + } + /** + * + * + *
+     * Specifies which fields to include in the output documents.
+     * Only supports top level document and pages field so it must be in the
+     * form of `{document_field_name}` or `pages.{page_field_name}`.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + * + * @return The fieldMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getFieldMask() { + return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; + } + /** + * + * + *
+     * Specifies which fields to include in the output documents.
+     * Only supports top level document and pages field so it must be in the
+     * form of `{document_field_name}` or `pages.{page_field_name}`.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { + return getFieldMask(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -212,6 +305,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsUri_); } + if (fieldMask_ != null) { + output.writeMessage(2, getFieldMask()); + } getUnknownFields().writeTo(output); } @@ -224,6 +320,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsUri_); } + if (fieldMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFieldMask()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -242,6 +341,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig) obj; if (!getGcsUri().equals(other.getGcsUri())) return false; + if (hasFieldMask() != other.hasFieldMask()) return false; + if (hasFieldMask()) { + if (!getFieldMask().equals(other.getFieldMask())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -255,6 +358,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + GCS_URI_FIELD_NUMBER; hash = (53 * hash) + getGcsUri().hashCode(); + if (hasFieldMask()) { + hash = (37 * hash) + FIELD_MASK_FIELD_NUMBER; + hash = (53 * hash) + getFieldMask().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -406,6 +513,12 @@ public Builder clear() { super.clear(); gcsUri_ = ""; + if (fieldMaskBuilder_ == null) { + fieldMask_ = null; + } else { + fieldMask_ = null; + fieldMaskBuilder_ = null; + } return this; } @@ -438,6 +551,11 @@ public com.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig com.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig result = new com.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig(this); result.gcsUri_ = gcsUri_; + if (fieldMaskBuilder_ == null) { + result.fieldMask_ = fieldMask_; + } else { + result.fieldMask_ = fieldMaskBuilder_.build(); + } onBuilt(); return result; } @@ -498,6 +616,9 @@ public Builder mergeFrom( gcsUri_ = other.gcsUri_; onChanged(); } + if (other.hasFieldMask()) { + mergeFieldMask(other.getFieldMask()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -530,6 +651,12 @@ public Builder mergeFrom( break; } // case 10 + case 18: + { + input.readMessage(getFieldMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -653,6 +780,209 @@ public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.FieldMask fieldMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + fieldMaskBuilder_; + /** + * + * + *
+       * Specifies which fields to include in the output documents.
+       * Only supports top level document and pages field so it must be in the
+       * form of `{document_field_name}` or `pages.{page_field_name}`.
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + * + * @return Whether the fieldMask field is set. + */ + public boolean hasFieldMask() { + return fieldMaskBuilder_ != null || fieldMask_ != null; + } + /** + * + * + *
+       * Specifies which fields to include in the output documents.
+       * Only supports top level document and pages field so it must be in the
+       * form of `{document_field_name}` or `pages.{page_field_name}`.
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + * + * @return The fieldMask. + */ + public com.google.protobuf.FieldMask getFieldMask() { + if (fieldMaskBuilder_ == null) { + return fieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : fieldMask_; + } else { + return fieldMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Specifies which fields to include in the output documents.
+       * Only supports top level document and pages field so it must be in the
+       * form of `{document_field_name}` or `pages.{page_field_name}`.
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + */ + public Builder setFieldMask(com.google.protobuf.FieldMask value) { + if (fieldMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldMask_ = value; + onChanged(); + } else { + fieldMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Specifies which fields to include in the output documents.
+       * Only supports top level document and pages field so it must be in the
+       * form of `{document_field_name}` or `pages.{page_field_name}`.
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + */ + public Builder setFieldMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (fieldMaskBuilder_ == null) { + fieldMask_ = builderForValue.build(); + onChanged(); + } else { + fieldMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Specifies which fields to include in the output documents.
+       * Only supports top level document and pages field so it must be in the
+       * form of `{document_field_name}` or `pages.{page_field_name}`.
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + */ + public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { + if (fieldMaskBuilder_ == null) { + if (fieldMask_ != null) { + fieldMask_ = + com.google.protobuf.FieldMask.newBuilder(fieldMask_) + .mergeFrom(value) + .buildPartial(); + } else { + fieldMask_ = value; + } + onChanged(); + } else { + fieldMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Specifies which fields to include in the output documents.
+       * Only supports top level document and pages field so it must be in the
+       * form of `{document_field_name}` or `pages.{page_field_name}`.
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + */ + public Builder clearFieldMask() { + if (fieldMaskBuilder_ == null) { + fieldMask_ = null; + onChanged(); + } else { + fieldMask_ = null; + fieldMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Specifies which fields to include in the output documents.
+       * Only supports top level document and pages field so it must be in the
+       * form of `{document_field_name}` or `pages.{page_field_name}`.
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() { + + onChanged(); + return getFieldMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Specifies which fields to include in the output documents.
+       * Only supports top level document and pages field so it must be in the
+       * form of `{document_field_name}` or `pages.{page_field_name}`.
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { + if (fieldMaskBuilder_ != null) { + return fieldMaskBuilder_.getMessageOrBuilder(); + } else { + return fieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : fieldMask_; + } + } + /** + * + * + *
+       * Specifies which fields to include in the output documents.
+       * Only supports top level document and pages field so it must be in the
+       * form of `{document_field_name}` or `pages.{page_field_name}`.
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getFieldMaskFieldBuilder() { + if (fieldMaskBuilder_ == null) { + fieldMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getFieldMask(), getParentForChildren(), isClean()); + fieldMask_ = null; + } + return fieldMaskBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java index 1ac6f86cdaaa..e0d9b9b6056e 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java @@ -115,6 +115,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta3_Document_Page_DetectedLanguage_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta3_Document_Page_DetectedLanguage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_DetectedDefect_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_DetectedDefect_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1beta3_Document_Entity_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -182,7 +190,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/color.proto\032\026google/type/date.proto\032\032go" + "ogle/type/datetime.proto\032\027google/type/mo" + "ney.proto\032 google/type/postal_address.pr" - + "oto\"\205A\n\010Document\022\022\n\003uri\030\001 \001(\tB\003\340A\001H\000\022\026\n\007" + + "oto\"\253D\n\010Document\022\022\n\003uri\030\001 \001(\tB\003\340A\001H\000\022\026\n\007" + "content\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.documentai.v1beta3.Docume" @@ -199,7 +207,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".Status\022E\n\trevisions\030\r \003(\01322.google.clou" + "d.documentai.v1beta3.Document.Revision\032J" + "\n\tShardInfo\022\023\n\013shard_index\030\001 \001(\003\022\023\n\013shar" - + "d_count\030\002 \001(\003\022\023\n\013text_offset\030\003 \001(\003\032\332\002\n\005S" + + "d_count\030\002 \001(\003\022\023\n\013text_offset\030\003 \001(\003\032\357\002\n\005S" + "tyle\022I\n\013text_anchor\030\001 \001(\01324.google.cloud" + ".documentai.v1beta3.Document.TextAnchor\022" + "!\n\005color\030\002 \001(\0132\022.google.type.Color\022,\n\020ba" @@ -207,196 +215,206 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\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.v1beta3." - + "Document.Style.FontSize\032&\n\010FontSize\022\014\n\004s" - + "ize\030\001 \001(\002\022\014\n\004unit\030\002 \001(\t\032\206%\n\004Page\022\023\n\013page" - + "_number\030\001 \001(\005\022C\n\005image\030\r \001(\01324.google.cl" - + "oud.documentai.v1beta3.Document.Page.Ima" - + "ge\022I\n\ntransforms\030\016 \003(\01325.google.cloud.do" - + "cumentai.v1beta3.Document.Page.Matrix\022K\n" - + "\tdimension\030\002 \001(\01328.google.cloud.document" - + "ai.v1beta3.Document.Page.Dimension\022E\n\006la" - + "yout\030\003 \001(\01325.google.cloud.documentai.v1b" - + "eta3.Document.Page.Layout\022[\n\022detected_la" - + "nguages\030\004 \003(\0132?.google.cloud.documentai." - + "v1beta3.Document.Page.DetectedLanguage\022D" - + "\n\006blocks\030\005 \003(\01324.google.cloud.documentai" - + ".v1beta3.Document.Page.Block\022L\n\nparagrap" - + "hs\030\006 \003(\01328.google.cloud.documentai.v1bet" - + "a3.Document.Page.Paragraph\022B\n\005lines\030\007 \003(" - + "\01323.google.cloud.documentai.v1beta3.Docu" - + "ment.Page.Line\022D\n\006tokens\030\010 \003(\01324.google." - + "cloud.documentai.v1beta3.Document.Page.T" - + "oken\022U\n\017visual_elements\030\t \003(\0132<.google.c" - + "loud.documentai.v1beta3.Document.Page.Vi" - + "sualElement\022D\n\006tables\030\n \003(\01324.google.clo" - + "ud.documentai.v1beta3.Document.Page.Tabl" - + "e\022M\n\013form_fields\030\013 \003(\01328.google.cloud.do" - + "cumentai.v1beta3.Document.Page.FormField" - + "\022F\n\007symbols\030\014 \003(\01325.google.cloud.documen" - + "tai.v1beta3.Document.Page.Symbol\022Y\n\021dete" - + "cted_barcodes\030\017 \003(\0132>.google.cloud.docum" - + "entai.v1beta3.Document.Page.DetectedBarc" - + "ode\022H\n\nprovenance\030\020 \001(\01324.google.cloud.d" - + "ocumentai.v1beta3.Document.Provenance\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\032J\n\005Image\022\017\n\007content\030\001 \001(" - + "\014\022\021\n\tmime_type\030\002 \001(\t\022\r\n\005width\030\003 \001(\005\022\016\n\006h" - + "eight\030\004 \001(\005\032@\n\006Matrix\022\014\n\004rows\030\001 \001(\005\022\014\n\004c" - + "ols\030\002 \001(\005\022\014\n\004type\030\003 \001(\005\022\014\n\004data\030\004 \001(\014\032\354\002" - + "\n\006Layout\022I\n\013text_anchor\030\001 \001(\01324.google.c" - + "loud.documentai.v1beta3.Document.TextAnc" - + "hor\022\022\n\nconfidence\030\002 \001(\002\022D\n\rbounding_poly" - + "\030\003 \001(\0132-.google.cloud.documentai.v1beta3" - + ".BoundingPoly\022V\n\013orientation\030\004 \001(\0162A.goo" + + "Document.Style.FontSize\022\023\n\013font_family\030\010" + + " \001(\t\032&\n\010FontSize\022\014\n\004size\030\001 \001(\002\022\014\n\004unit\030\002" + + " \001(\t\032\223(\n\004Page\022\023\n\013page_number\030\001 \001(\005\022C\n\005im" + + "age\030\r \001(\01324.google.cloud.documentai.v1be" + + "ta3.Document.Page.Image\022I\n\ntransforms\030\016 " + + "\003(\01325.google.cloud.documentai.v1beta3.Do" + + "cument.Page.Matrix\022K\n\tdimension\030\002 \001(\01328." + + "google.cloud.documentai.v1beta3.Document" + + ".Page.Dimension\022E\n\006layout\030\003 \001(\01325.google" + + ".cloud.documentai.v1beta3.Document.Page." + + "Layout\022[\n\022detected_languages\030\004 \003(\0132?.goo" + "gle.cloud.documentai.v1beta3.Document.Pa" - + "ge.Layout.Orientation\"e\n\013Orientation\022\033\n\027" - + "ORIENTATION_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_LE" - + "FT\020\004\032\365\001\n\005Block\022E\n\006layout\030\001 \001(\01325.google." - + "cloud.documentai.v1beta3.Document.Page.L" - + "ayout\022[\n\022detected_languages\030\002 \003(\0132?.goog" - + "le.cloud.documentai.v1beta3.Document.Pag" - + "e.DetectedLanguage\022H\n\nprovenance\030\003 \001(\01324" + + "ge.DetectedLanguage\022D\n\006blocks\030\005 \003(\01324.go" + + "ogle.cloud.documentai.v1beta3.Document.P" + + "age.Block\022L\n\nparagraphs\030\006 \003(\01328.google.c" + + "loud.documentai.v1beta3.Document.Page.Pa" + + "ragraph\022B\n\005lines\030\007 \003(\01323.google.cloud.do" + + "cumentai.v1beta3.Document.Page.Line\022D\n\006t" + + "okens\030\010 \003(\01324.google.cloud.documentai.v1" + + "beta3.Document.Page.Token\022U\n\017visual_elem" + + "ents\030\t \003(\0132<.google.cloud.documentai.v1b" + + "eta3.Document.Page.VisualElement\022D\n\006tabl" + + "es\030\n \003(\01324.google.cloud.documentai.v1bet" + + "a3.Document.Page.Table\022M\n\013form_fields\030\013 " + + "\003(\01328.google.cloud.documentai.v1beta3.Do" + + "cument.Page.FormField\022F\n\007symbols\030\014 \003(\01325" + ".google.cloud.documentai.v1beta3.Documen" - + "t.Provenance\032\371\001\n\tParagraph\022E\n\006layout\030\001 \001" - + "(\01325.google.cloud.documentai.v1beta3.Doc" - + "ument.Page.Layout\022[\n\022detected_languages\030" - + "\002 \003(\0132?.google.cloud.documentai.v1beta3." - + "Document.Page.DetectedLanguage\022H\n\nproven" - + "ance\030\003 \001(\01324.google.cloud.documentai.v1b" - + "eta3.Document.Provenance\032\364\001\n\004Line\022E\n\006lay" - + "out\030\001 \001(\01325.google.cloud.documentai.v1be" - + "ta3.Document.Page.Layout\022[\n\022detected_lan" - + "guages\030\002 \003(\0132?.google.cloud.documentai.v" - + "1beta3.Document.Page.DetectedLanguage\022H\n" - + "\nprovenance\030\003 \001(\01324.google.cloud.documen" - + "tai.v1beta3.Document.Provenance\032\377\003\n\005Toke" - + "n\022E\n\006layout\030\001 \001(\01325.google.cloud.documen" - + "tai.v1beta3.Document.Page.Layout\022Z\n\016dete" - + "cted_break\030\002 \001(\0132B.google.cloud.document" - + "ai.v1beta3.Document.Page.Token.DetectedB" - + "reak\022[\n\022detected_languages\030\003 \003(\0132?.googl" + + "t.Page.Symbol\022Y\n\021detected_barcodes\030\017 \003(\013" + + "2>.google.cloud.documentai.v1beta3.Docum" + + "ent.Page.DetectedBarcode\022_\n\024image_qualit" + + "y_scores\030\021 \001(\0132A.google.cloud.documentai" + + ".v1beta3.Document.Page.ImageQualityScore" + + "s\022L\n\nprovenance\030\020 \001(\01324.google.cloud.doc" + + "umentai.v1beta3.Document.ProvenanceB\002\030\001\032" + + "8\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\032J\n\005Image\022\017\n\007content\030\001 " + + "\001(\014\022\021\n\tmime_type\030\002 \001(\t\022\r\n\005width\030\003 \001(\005\022\016\n" + + "\006height\030\004 \001(\005\032@\n\006Matrix\022\014\n\004rows\030\001 \001(\005\022\014\n" + + "\004cols\030\002 \001(\005\022\014\n\004type\030\003 \001(\005\022\014\n\004data\030\004 \001(\014\032" + + "\354\002\n\006Layout\022I\n\013text_anchor\030\001 \001(\01324.google" + + ".cloud.documentai.v1beta3.Document.TextA" + + "nchor\022\022\n\nconfidence\030\002 \001(\002\022D\n\rbounding_po" + + "ly\030\003 \001(\0132-.google.cloud.documentai.v1bet" + + "a3.BoundingPoly\022V\n\013orientation\030\004 \001(\0162A.g" + + "oogle.cloud.documentai.v1beta3.Document." + + "Page.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_" + + "LEFT\020\004\032\371\001\n\005Block\022E\n\006layout\030\001 \001(\01325.googl" + "e.cloud.documentai.v1beta3.Document.Page" - + ".DetectedLanguage\022H\n\nprovenance\030\004 \001(\01324." - + "google.cloud.documentai.v1beta3.Document" - + ".Provenance\032\253\001\n\rDetectedBreak\022U\n\004type\030\001 " - + "\001(\0162G.google.cloud.documentai.v1beta3.Do" - + "cument.Page.Token.DetectedBreak.Type\"C\n\004" - + "Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\t\n\005SPACE\020\001\022\016\n" - + "\nWIDE_SPACE\020\002\022\n\n\006HYPHEN\020\003\032\254\001\n\006Symbol\022E\n\006" - + "layout\030\001 \001(\01325.google.cloud.documentai.v" - + "1beta3.Document.Page.Layout\022[\n\022detected_" - + "languages\030\002 \003(\0132?.google.cloud.documenta" - + "i.v1beta3.Document.Page.DetectedLanguage" - + "\032\301\001\n\rVisualElement\022E\n\006layout\030\001 \001(\01325.goo" - + "gle.cloud.documentai.v1beta3.Document.Pa" - + "ge.Layout\022\014\n\004type\030\002 \001(\t\022[\n\022detected_lang" - + "uages\030\003 \003(\0132?.google.cloud.documentai.v1" - + "beta3.Document.Page.DetectedLanguage\032\202\005\n" - + "\005Table\022E\n\006layout\030\001 \001(\01325.google.cloud.do" - + "cumentai.v1beta3.Document.Page.Layout\022R\n" - + "\013header_rows\030\002 \003(\0132=.google.cloud.docume" - + "ntai.v1beta3.Document.Page.Table.TableRo" - + "w\022P\n\tbody_rows\030\003 \003(\0132=.google.cloud.docu" - + "mentai.v1beta3.Document.Page.Table.Table" - + "Row\022[\n\022detected_languages\030\004 \003(\0132?.google" - + ".cloud.documentai.v1beta3.Document.Page." - + "DetectedLanguage\032Y\n\010TableRow\022M\n\005cells\030\001 " - + "\003(\0132>.google.cloud.documentai.v1beta3.Do" - + "cument.Page.Table.TableCell\032\323\001\n\tTableCel" - + "l\022E\n\006layout\030\001 \001(\01325.google.cloud.documen" - + "tai.v1beta3.Document.Page.Layout\022\020\n\010row_" - + "span\030\002 \001(\005\022\020\n\010col_span\030\003 \001(\005\022[\n\022detected" - + "_languages\030\004 \003(\0132?.google.cloud.document" - + "ai.v1beta3.Document.Page.DetectedLanguag" - + "e\032\377\003\n\tFormField\022I\n\nfield_name\030\001 \001(\01325.go" + + ".Layout\022[\n\022detected_languages\030\002 \003(\0132?.go" + "ogle.cloud.documentai.v1beta3.Document.P" - + "age.Layout\022J\n\013field_value\030\002 \001(\01325.google" - + ".cloud.documentai.v1beta3.Document.Page." - + "Layout\022`\n\027name_detected_languages\030\003 \003(\0132" - + "?.google.cloud.documentai.v1beta3.Docume" - + "nt.Page.DetectedLanguage\022a\n\030value_detect" - + "ed_languages\030\004 \003(\0132?.google.cloud.docume" - + "ntai.v1beta3.Document.Page.DetectedLangu" - + "age\022\022\n\nvalue_type\030\005 \001(\t\022\032\n\022corrected_key" - + "_text\030\006 \001(\t\022\034\n\024corrected_value_text\030\007 \001(" - + "\t\022H\n\nprovenance\030\010 \001(\01324.google.cloud.doc" - + "umentai.v1beta3.Document.Provenance\032\223\001\n\017" - + "DetectedBarcode\022E\n\006layout\030\001 \001(\01325.google" - + ".cloud.documentai.v1beta3.Document.Page." - + "Layout\0229\n\007barcode\030\002 \001(\0132(.google.cloud.d" - + "ocumentai.v1beta3.Barcode\032=\n\020DetectedLan" - + "guage\022\025\n\rlanguage_code\030\001 \001(\t\022\022\n\nconfiden" - + "ce\030\002 \001(\002\032\351\006\n\006Entity\022N\n\013text_anchor\030\001 \001(\013" + + "age.DetectedLanguage\022L\n\nprovenance\030\003 \001(\013" + "24.google.cloud.documentai.v1beta3.Docum" - + "ent.TextAnchorB\003\340A\001\022\021\n\004type\030\002 \001(\tB\003\340A\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\022N\n\013p" - + "age_anchor\030\006 \001(\01324.google.cloud.document" - + "ai.v1beta3.Document.PageAnchorB\003\340A\001\022\017\n\002i" - + "d\030\007 \001(\tB\003\340A\001\022_\n\020normalized_value\030\t \001(\0132@" - + ".google.cloud.documentai.v1beta3.Documen" - + "t.Entity.NormalizedValueB\003\340A\001\022I\n\npropert" - + "ies\030\n \003(\01320.google.cloud.documentai.v1be" - + "ta3.Document.EntityB\003\340A\001\022M\n\nprovenance\030\013" - + " \001(\01324.google.cloud.documentai.v1beta3.D" - + "ocument.ProvenanceB\003\340A\001\022\025\n\010redacted\030\014 \001(" - + "\010B\003\340A\001\032\273\002\n\017NormalizedValue\022)\n\013money_valu" - + "e\030\002 \001(\0132\022.google.type.MoneyH\000\022\'\n\ndate_va" - + "lue\030\003 \001(\0132\021.google.type.DateH\000\022/\n\016dateti" - + "me_value\030\004 \001(\0132\025.google.type.DateTimeH\000\022" - + "3\n\raddress_value\030\005 \001(\0132\032.google.type.Pos" - + "talAddressH\000\022\027\n\rboolean_value\030\006 \001(\010H\000\022\027\n" - + "\rinteger_value\030\007 \001(\005H\000\022\025\n\013float_value\030\010 " - + "\001(\002H\000\022\021\n\004text\030\001 \001(\tB\003\340A\001B\022\n\020structured_v" - + "alue\032I\n\016EntityRelation\022\022\n\nsubject_id\030\001 \001" - + "(\t\022\021\n\tobject_id\030\002 \001(\t\022\020\n\010relation\030\003 \001(\t\032" - + "\255\001\n\nTextAnchor\022W\n\rtext_segments\030\001 \003(\0132@." - + "google.cloud.documentai.v1beta3.Document" - + ".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\t" - + "end_index\030\002 \001(\003\032\347\003\n\nPageAnchor\022O\n\tpage_r" - + "efs\030\001 \003(\0132<.google.cloud.documentai.v1be" - + "ta3.Document.PageAnchor.PageRef\032\207\003\n\007Page" - + "Ref\022\021\n\004page\030\001 \001(\003B\003\340A\002\022a\n\013layout_type\030\002 " - + "\001(\0162G.google.cloud.documentai.v1beta3.Do" - + "cument.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.v1b" - + "eta3.BoundingPolyB\003\340A\001\022\027\n\nconfidence\030\005 \001" - + "(\002B\003\340A\001\"\207\001\n\nLayoutType\022\033\n\027LAYOUT_TYPE_UN" - + "SPECIFIED\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\010revision\030\001 \001(\005\022\016\n\002id\030\002 \001(\005B\002\030\001\022L\n\007pa" - + "rents\030\003 \003(\0132;.google.cloud.documentai.v1" - + "beta3.Document.Provenance.Parent\022P\n\004type" - + "\030\004 \001(\0162B.google.cloud.documentai.v1beta3" - + ".Document.Provenance.OperationType\0329\n\006Pa" - + "rent\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\032OPERA" - + "TION_TYPE_UNSPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMO" - + "VE\020\002\022\013\n\007REPLACE\020\003\022\022\n\016EVAL_REQUESTED\020\004\022\021\n" - + "\rEVAL_APPROVED\020\005\022\020\n\014EVAL_SKIPPED\020\006\032\252\002\n\010R" - + "evision\022\017\n\005agent\030\004 \001(\tH\000\022\023\n\tprocessor\030\005 " - + "\001(\tH\000\022\n\n\002id\030\001 \001(\t\022\022\n\006parent\030\002 \003(\005B\002\030\001\022\022\n" - + "\nparent_ids\030\007 \003(\t\022/\n\013create_time\030\003 \001(\0132\032" - + ".google.protobuf.Timestamp\022T\n\014human_revi" - + "ew\030\006 \001(\0132>.google.cloud.documentai.v1bet" - + "a3.Document.Revision.HumanReview\0323\n\013Huma" - + "nReview\022\r\n\005state\030\001 \001(\t\022\025\n\rstate_message\030" - + "\002 \001(\tB\010\n\006source\032\267\001\n\nTextChange\022I\n\013text_a" - + "nchor\030\001 \001(\01324.google.cloud.documentai.v1" - + "beta3.Document.TextAnchor\022\024\n\014changed_tex" - + "t\030\002 \001(\t\022H\n\nprovenance\030\003 \003(\01324.google.clo" + + "ent.ProvenanceB\002\030\001\032\375\001\n\tParagraph\022E\n\006layo" + + "ut\030\001 \001(\01325.google.cloud.documentai.v1bet" + + "a3.Document.Page.Layout\022[\n\022detected_lang" + + "uages\030\002 \003(\0132?.google.cloud.documentai.v1" + + "beta3.Document.Page.DetectedLanguage\022L\n\n" + + "provenance\030\003 \001(\01324.google.cloud.document" + + "ai.v1beta3.Document.ProvenanceB\002\030\001\032\370\001\n\004L" + + "ine\022E\n\006layout\030\001 \001(\01325.google.cloud.docum" + + "entai.v1beta3.Document.Page.Layout\022[\n\022de" + + "tected_languages\030\002 \003(\0132?.google.cloud.do" + + "cumentai.v1beta3.Document.Page.DetectedL" + + "anguage\022L\n\nprovenance\030\003 \001(\01324.google.clo" + "ud.documentai.v1beta3.Document.Provenanc" - + "eB\010\n\006sourceB\352\001\n#com.google.cloud.documen" - + "tai.v1beta3B\rDocumentProtoP\001ZIgoogle.gol" - + "ang.org/genproto/googleapis/cloud/docume" - + "ntai/v1beta3;documentai\252\002\037Google.Cloud.D" - + "ocumentAI.V1Beta3\312\002\037Google\\Cloud\\Documen" - + "tAI\\V1beta3\352\002\"Google::Cloud::DocumentAI:" - + ":V1beta3b\006proto3" + + "eB\002\030\001\032\203\004\n\005Token\022E\n\006layout\030\001 \001(\01325.google" + + ".cloud.documentai.v1beta3.Document.Page." + + "Layout\022Z\n\016detected_break\030\002 \001(\0132B.google." + + "cloud.documentai.v1beta3.Document.Page.T" + + "oken.DetectedBreak\022[\n\022detected_languages" + + "\030\003 \003(\0132?.google.cloud.documentai.v1beta3" + + ".Document.Page.DetectedLanguage\022L\n\nprove" + + "nance\030\004 \001(\01324.google.cloud.documentai.v1" + + "beta3.Document.ProvenanceB\002\030\001\032\253\001\n\rDetect" + + "edBreak\022U\n\004type\030\001 \001(\0162G.google.cloud.doc" + + "umentai.v1beta3.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\254\001\n\006Symbol\022E\n\006layout\030\001 \001(\01325.google." + + "cloud.documentai.v1beta3.Document.Page.L" + + "ayout\022[\n\022detected_languages\030\002 \003(\0132?.goog" + + "le.cloud.documentai.v1beta3.Document.Pag" + + "e.DetectedLanguage\032\301\001\n\rVisualElement\022E\n\006" + + "layout\030\001 \001(\01325.google.cloud.documentai.v" + + "1beta3.Document.Page.Layout\022\014\n\004type\030\002 \001(" + + "\t\022[\n\022detected_languages\030\003 \003(\0132?.google.c" + + "loud.documentai.v1beta3.Document.Page.De" + + "tectedLanguage\032\314\005\n\005Table\022E\n\006layout\030\001 \001(\013" + + "25.google.cloud.documentai.v1beta3.Docum" + + "ent.Page.Layout\022R\n\013header_rows\030\002 \003(\0132=.g" + + "oogle.cloud.documentai.v1beta3.Document." + + "Page.Table.TableRow\022P\n\tbody_rows\030\003 \003(\0132=" + + ".google.cloud.documentai.v1beta3.Documen" + + "t.Page.Table.TableRow\022[\n\022detected_langua" + + "ges\030\004 \003(\0132?.google.cloud.documentai.v1be" + + "ta3.Document.Page.DetectedLanguage\022H\n\npr" + + "ovenance\030\005 \001(\01324.google.cloud.documentai" + + ".v1beta3.Document.Provenance\032Y\n\010TableRow" + + "\022M\n\005cells\030\001 \003(\0132>.google.cloud.documenta" + + "i.v1beta3.Document.Page.Table.TableCell\032" + + "\323\001\n\tTableCell\022E\n\006layout\030\001 \001(\01325.google.c" + + "loud.documentai.v1beta3.Document.Page.La" + + "yout\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.cl" + + "oud.documentai.v1beta3.Document.Page.Det" + + "ectedLanguage\032\377\003\n\tFormField\022I\n\nfield_nam" + + "e\030\001 \001(\01325.google.cloud.documentai.v1beta" + + "3.Document.Page.Layout\022J\n\013field_value\030\002 " + + "\001(\01325.google.cloud.documentai.v1beta3.Do" + + "cument.Page.Layout\022`\n\027name_detected_lang" + + "uages\030\003 \003(\0132?.google.cloud.documentai.v1" + + "beta3.Document.Page.DetectedLanguage\022a\n\030" + + "value_detected_languages\030\004 \003(\0132?.google." + + "cloud.documentai.v1beta3.Document.Page.D" + + "etectedLanguage\022\022\n\nvalue_type\030\005 \001(\t\022\032\n\022c" + + "orrected_key_text\030\006 \001(\t\022\034\n\024corrected_val" + + "ue_text\030\007 \001(\t\022H\n\nprovenance\030\010 \001(\01324.goog" + + "le.cloud.documentai.v1beta3.Document.Pro" + + "venance\032\223\001\n\017DetectedBarcode\022E\n\006layout\030\001 " + + "\001(\01325.google.cloud.documentai.v1beta3.Do" + + "cument.Page.Layout\0229\n\007barcode\030\002 \001(\0132(.go" + + "ogle.cloud.documentai.v1beta3.Barcode\032=\n" + + "\020DetectedLanguage\022\025\n\rlanguage_code\030\001 \001(\t" + + "\022\022\n\nconfidence\030\002 \001(\002\032\313\001\n\022ImageQualitySco" + + "res\022\025\n\rquality_score\030\001 \001(\002\022j\n\020detected_d" + + "efects\030\002 \003(\0132P.google.cloud.documentai.v" + + "1beta3.Document.Page.ImageQualityScores." + + "DetectedDefect\0322\n\016DetectedDefect\022\014\n\004type" + + "\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\351\006\n\006Entity\022N\n" + + "\013text_anchor\030\001 \001(\01324.google.cloud.docume" + + "ntai.v1beta3.Document.TextAnchorB\003\340A\001\022\021\n" + + "\004type\030\002 \001(\tB\003\340A\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\nconfiden" + + "ce\030\005 \001(\002B\003\340A\001\022N\n\013page_anchor\030\006 \001(\01324.goo" + + "gle.cloud.documentai.v1beta3.Document.Pa" + + "geAnchorB\003\340A\001\022\017\n\002id\030\007 \001(\tB\003\340A\001\022_\n\020normal" + + "ized_value\030\t \001(\0132@.google.cloud.document" + + "ai.v1beta3.Document.Entity.NormalizedVal" + + "ueB\003\340A\001\022I\n\nproperties\030\n \003(\01320.google.clo" + + "ud.documentai.v1beta3.Document.EntityB\003\340" + + "A\001\022M\n\nprovenance\030\013 \001(\01324.google.cloud.do" + + "cumentai.v1beta3.Document.ProvenanceB\003\340A" + + "\001\022\025\n\010redacted\030\014 \001(\010B\003\340A\001\032\273\002\n\017NormalizedV" + + "alue\022)\n\013money_value\030\002 \001(\0132\022.google.type." + + "MoneyH\000\022\'\n\ndate_value\030\003 \001(\0132\021.google.typ" + + "e.DateH\000\022/\n\016datetime_value\030\004 \001(\0132\025.googl" + + "e.type.DateTimeH\000\0223\n\raddress_value\030\005 \001(\013" + + "2\032.google.type.PostalAddressH\000\022\027\n\rboolea" + + "n_value\030\006 \001(\010H\000\022\027\n\rinteger_value\030\007 \001(\005H\000" + + "\022\025\n\013float_value\030\010 \001(\002H\000\022\021\n\004text\030\001 \001(\tB\003\340" + + "A\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\nTextAnchor\022W\n\rtext" + + "_segments\030\001 \003(\0132@.google.cloud.documenta" + + "i.v1beta3.Document.TextAnchor.TextSegmen" + + "t\022\017\n\007content\030\002 \001(\t\0325\n\013TextSegment\022\023\n\013sta" + + "rt_index\030\001 \001(\003\022\021\n\tend_index\030\002 \001(\003\032\347\003\n\nPa" + + "geAnchor\022O\n\tpage_refs\030\001 \003(\0132<.google.clo" + + "ud.documentai.v1beta3.Document.PageAncho" + + "r.PageRef\032\207\003\n\007PageRef\022\021\n\004page\030\001 \001(\003B\003\340A\002" + + "\022a\n\013layout_type\030\002 \001(\0162G.google.cloud.doc" + + "umentai.v1beta3.Document.PageAnchor.Page" + + "Ref.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.cl" + + "oud.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_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\016" + + "VISUAL_ELEMENT\020\005\022\t\n\005TABLE\020\006\022\016\n\nFORM_FIEL" + + "D\020\007\032\226\003\n\nProvenance\022\020\n\010revision\030\001 \001(\005\022\016\n\002" + + "id\030\002 \001(\005B\002\030\001\022L\n\007parents\030\003 \003(\0132;.google.c" + + "loud.documentai.v1beta3.Document.Provena" + + "nce.Parent\022P\n\004type\030\004 \001(\0162B.google.cloud." + + "documentai.v1beta3.Document.Provenance.O" + + "perationType\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\rOper" + + "ationType\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\016E" + + "VAL_REQUESTED\020\004\022\021\n\rEVAL_APPROVED\020\005\022\020\n\014EV" + + "AL_SKIPPED\020\006\032\252\002\n\010Revision\022\017\n\005agent\030\004 \001(\t" + + "H\000\022\023\n\tprocessor\030\005 \001(\tH\000\022\n\n\002id\030\001 \001(\t\022\022\n\006p" + + "arent\030\002 \003(\005B\002\030\001\022\022\n\nparent_ids\030\007 \003(\t\022/\n\013c" + + "reate_time\030\003 \001(\0132\032.google.protobuf.Times" + + "tamp\022T\n\014human_review\030\006 \001(\0132>.google.clou" + + "d.documentai.v1beta3.Document.Revision.H" + + "umanReview\0323\n\013HumanReview\022\r\n\005state\030\001 \001(\t" + + "\022\025\n\rstate_message\030\002 \001(\tB\010\n\006source\032\273\001\n\nTe" + + "xtChange\022I\n\013text_anchor\030\001 \001(\01324.google.c" + + "loud.documentai.v1beta3.Document.TextAnc" + + "hor\022\024\n\014changed_text\030\002 \001(\t\022L\n\nprovenance\030" + + "\003 \003(\01324.google.cloud.documentai.v1beta3." + + "Document.ProvenanceB\002\030\001B\010\n\006sourceB\352\001\n#co" + + "m.google.cloud.documentai.v1beta3B\rDocum" + + "entProtoP\001ZIgoogle.golang.org/genproto/g" + + "oogleapis/cloud/documentai/v1beta3;docum" + + "entai\252\002\037Google.Cloud.DocumentAI.V1Beta3\312" + + "\002\037Google\\Cloud\\DocumentAI\\V1beta3\352\002\"Goog" + + "le::Cloud::DocumentAI::V1beta3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -454,6 +472,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TextStyle", "TextDecoration", "FontSize", + "FontFamily", }); internal_static_google_cloud_documentai_v1beta3_Document_Style_FontSize_descriptor = internal_static_google_cloud_documentai_v1beta3_Document_Style_descriptor @@ -486,6 +505,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FormFields", "Symbols", "DetectedBarcodes", + "ImageQualityScores", "Provenance", }); internal_static_google_cloud_documentai_v1beta3_Document_Page_Dimension_descriptor = @@ -606,7 +626,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_Document_Page_Table_descriptor, new java.lang.String[] { - "Layout", "HeaderRows", "BodyRows", "DetectedLanguages", + "Layout", "HeaderRows", "BodyRows", "DetectedLanguages", "Provenance", }); internal_static_google_cloud_documentai_v1beta3_Document_Page_Table_TableRow_descriptor = internal_static_google_cloud_documentai_v1beta3_Document_Page_Table_descriptor @@ -665,6 +685,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "LanguageCode", "Confidence", }); + internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_Page_descriptor + .getNestedTypes() + .get(14); + internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_descriptor, + new java.lang.String[] { + "QualityScore", "DetectedDefects", + }); + internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_DetectedDefect_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_DetectedDefect_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_Page_ImageQualityScores_DetectedDefect_descriptor, + new java.lang.String[] { + "Type", "Confidence", + }); internal_static_google_cloud_documentai_v1beta3_Document_Entity_descriptor = internal_static_google_cloud_documentai_v1beta3_Document_descriptor.getNestedTypes().get(3); internal_static_google_cloud_documentai_v1beta3_Document_Entity_fieldAccessorTable = diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentSchema.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentSchema.java index 89e8b76dd64a..66306da1b655 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentSchema.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentSchema.java @@ -157,15 +157,15 @@ public interface EntityTypeOrBuilder * Name of the type. It must be unique within the schema file and * cannot be a 'Common Type'. Besides that we use the following naming * conventions: - * - *use snake_casing* + * - *use `snake_casing`* * - name matching is case-insensitive * - Maximum 64 characters. * - Must start with a letter. * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward * compatibility internal infrastructure and tooling can handle any ascii * character) - * - The '/' is sometimes used to denote a property of a type. For example - * line_item/amount. This convention is deprecated, but will still be + * - The `/` is sometimes used to denote a property of a type. For example + * `line_item/amount`. This convention is deprecated, but will still be * honored for backward compatibility. * * @@ -181,15 +181,15 @@ public interface EntityTypeOrBuilder * Name of the type. It must be unique within the schema file and * cannot be a 'Common Type'. Besides that we use the following naming * conventions: - * - *use snake_casing* + * - *use `snake_casing`* * - name matching is case-insensitive * - Maximum 64 characters. * - Must start with a letter. * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward * compatibility internal infrastructure and tooling can handle any ascii * character) - * - The '/' is sometimes used to denote a property of a type. For example - * line_item/amount. This convention is deprecated, but will still be + * - The `/` is sometimes used to denote a property of a type. For example + * `line_item/amount`. This convention is deprecated, but will still be * honored for backward compatibility. * * @@ -2640,15 +2640,15 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * Name of the type. It must be unique within the schema file and * cannot be a 'Common Type'. Besides that we use the following naming * conventions: - * - *use snake_casing* + * - *use `snake_casing`* * - name matching is case-insensitive * - Maximum 64 characters. * - Must start with a letter. * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward * compatibility internal infrastructure and tooling can handle any ascii * character) - * - The '/' is sometimes used to denote a property of a type. For example - * line_item/amount. This convention is deprecated, but will still be + * - The `/` is sometimes used to denote a property of a type. For example + * `line_item/amount`. This convention is deprecated, but will still be * honored for backward compatibility. * * @@ -2675,15 +2675,15 @@ public java.lang.String getName() { * Name of the type. It must be unique within the schema file and * cannot be a 'Common Type'. Besides that we use the following naming * conventions: - * - *use snake_casing* + * - *use `snake_casing`* * - name matching is case-insensitive * - Maximum 64 characters. * - Must start with a letter. * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward * compatibility internal infrastructure and tooling can handle any ascii * character) - * - The '/' is sometimes used to denote a property of a type. For example - * line_item/amount. This convention is deprecated, but will still be + * - The `/` is sometimes used to denote a property of a type. For example + * `line_item/amount`. This convention is deprecated, but will still be * honored for backward compatibility. * * @@ -3797,15 +3797,15 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { * Name of the type. It must be unique within the schema file and * cannot be a 'Common Type'. Besides that we use the following naming * conventions: - * - *use snake_casing* + * - *use `snake_casing`* * - name matching is case-insensitive * - Maximum 64 characters. * - Must start with a letter. * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward * compatibility internal infrastructure and tooling can handle any ascii * character) - * - The '/' is sometimes used to denote a property of a type. For example - * line_item/amount. This convention is deprecated, but will still be + * - The `/` is sometimes used to denote a property of a type. For example + * `line_item/amount`. This convention is deprecated, but will still be * honored for backward compatibility. * * @@ -3831,15 +3831,15 @@ public java.lang.String getName() { * Name of the type. It must be unique within the schema file and * cannot be a 'Common Type'. Besides that we use the following naming * conventions: - * - *use snake_casing* + * - *use `snake_casing`* * - name matching is case-insensitive * - Maximum 64 characters. * - Must start with a letter. * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward * compatibility internal infrastructure and tooling can handle any ascii * character) - * - The '/' is sometimes used to denote a property of a type. For example - * line_item/amount. This convention is deprecated, but will still be + * - The `/` is sometimes used to denote a property of a type. For example + * `line_item/amount`. This convention is deprecated, but will still be * honored for backward compatibility. * * @@ -3865,15 +3865,15 @@ public com.google.protobuf.ByteString getNameBytes() { * Name of the type. It must be unique within the schema file and * cannot be a 'Common Type'. Besides that we use the following naming * conventions: - * - *use snake_casing* + * - *use `snake_casing`* * - name matching is case-insensitive * - Maximum 64 characters. * - Must start with a letter. * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward * compatibility internal infrastructure and tooling can handle any ascii * character) - * - The '/' is sometimes used to denote a property of a type. For example - * line_item/amount. This convention is deprecated, but will still be + * - The `/` is sometimes used to denote a property of a type. For example + * `line_item/amount`. This convention is deprecated, but will still be * honored for backward compatibility. * * @@ -3898,15 +3898,15 @@ public Builder setName(java.lang.String value) { * Name of the type. It must be unique within the schema file and * cannot be a 'Common Type'. Besides that we use the following naming * conventions: - * - *use snake_casing* + * - *use `snake_casing`* * - name matching is case-insensitive * - Maximum 64 characters. * - Must start with a letter. * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward * compatibility internal infrastructure and tooling can handle any ascii * character) - * - The '/' is sometimes used to denote a property of a type. For example - * line_item/amount. This convention is deprecated, but will still be + * - The `/` is sometimes used to denote a property of a type. For example + * `line_item/amount`. This convention is deprecated, but will still be * honored for backward compatibility. * * @@ -3927,15 +3927,15 @@ public Builder clearName() { * Name of the type. It must be unique within the schema file and * cannot be a 'Common Type'. Besides that we use the following naming * conventions: - * - *use snake_casing* + * - *use `snake_casing`* * - name matching is case-insensitive * - Maximum 64 characters. * - Must start with a letter. * - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward * compatibility internal infrastructure and tooling can handle any ascii * character) - * - The '/' is sometimes used to denote a property of a type. For example - * line_item/amount. This convention is deprecated, but will still be + * - The `/` is sometimes used to denote a property of a type. For example + * `line_item/amount`. This convention is deprecated, but will still be * honored for backward compatibility. * * diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionMetadata.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionMetadata.java new file mode 100644 index 000000000000..263a9cec1f1d --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionMetadata.java @@ -0,0 +1,722 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * Metadata of the EvaluateProcessorVersion method.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata} + */ +public final class EvaluateProcessorVersionMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata) + EvaluateProcessorVersionMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use EvaluateProcessorVersionMetadata.newBuilder() to construct. + private EvaluateProcessorVersionMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EvaluateProcessorVersionMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EvaluateProcessorVersionMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata.class, + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata.Builder.class); + } + + public static final int COMMON_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta3.CommonOperationMetadata commonMetadata_; + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + @java.lang.Override + public boolean hasCommonMetadata() { + return commonMetadata_ != null; + } + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.CommonOperationMetadata getCommonMetadata() { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + return getCommonMetadata(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (commonMetadata_ != null) { + output.writeMessage(1, getCommonMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (commonMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommonMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata other = + (com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata) obj; + + if (hasCommonMetadata() != other.hasCommonMetadata()) return false; + if (hasCommonMetadata()) { + if (!getCommonMetadata().equals(other.getCommonMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommonMetadata()) { + hash = (37 * hash) + COMMON_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getCommonMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata of the EvaluateProcessorVersion method.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata) + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata.class, + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (commonMetadataBuilder_ == null) { + commonMetadata_ = null; + } else { + commonMetadata_ = null; + commonMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata build() { + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata buildPartial() { + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata result = + new com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata(this); + if (commonMetadataBuilder_ == null) { + result.commonMetadata_ = commonMetadata_; + } else { + result.commonMetadata_ = commonMetadataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata other) { + if (other + == com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata + .getDefaultInstance()) return this; + if (other.hasCommonMetadata()) { + mergeCommonMetadata(other.getCommonMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCommonMetadataFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.cloud.documentai.v1beta3.CommonOperationMetadata commonMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.CommonOperationMetadata, + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder, + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder> + commonMetadataBuilder_; + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + public boolean hasCommonMetadata() { + return commonMetadataBuilder_ != null || commonMetadata_ != null; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + public com.google.cloud.documentai.v1beta3.CommonOperationMetadata getCommonMetadata() { + if (commonMetadataBuilder_ == null) { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } else { + return commonMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder setCommonMetadata( + com.google.cloud.documentai.v1beta3.CommonOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commonMetadata_ = value; + onChanged(); + } else { + commonMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder setCommonMetadata( + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder builderForValue) { + if (commonMetadataBuilder_ == null) { + commonMetadata_ = builderForValue.build(); + onChanged(); + } else { + commonMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder mergeCommonMetadata( + com.google.cloud.documentai.v1beta3.CommonOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (commonMetadata_ != null) { + commonMetadata_ = + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.newBuilder( + commonMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + commonMetadata_ = value; + } + onChanged(); + } else { + commonMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder clearCommonMetadata() { + if (commonMetadataBuilder_ == null) { + commonMetadata_ = null; + onChanged(); + } else { + commonMetadata_ = null; + commonMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder + getCommonMetadataBuilder() { + + onChanged(); + return getCommonMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + if (commonMetadataBuilder_ != null) { + return commonMetadataBuilder_.getMessageOrBuilder(); + } else { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.CommonOperationMetadata, + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder, + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder> + getCommonMetadataFieldBuilder() { + if (commonMetadataBuilder_ == null) { + commonMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.CommonOperationMetadata, + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder, + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder>( + getCommonMetadata(), getParentForChildren(), isClean()); + commonMetadata_ = null; + } + return commonMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata) + private static final com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata(); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EvaluateProcessorVersionMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionMetadataOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionMetadataOrBuilder.java new file mode 100644 index 000000000000..a9ef9040b35b --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionMetadataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface EvaluateProcessorVersionMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + boolean hasCommonMetadata(); + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + com.google.cloud.documentai.v1beta3.CommonOperationMetadata getCommonMetadata(); + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder getCommonMetadataOrBuilder(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionRequest.java new file mode 100644 index 000000000000..e4a5b00a28f7 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionRequest.java @@ -0,0 +1,959 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * Evaluates the given ProcessorVersion against the supplied documents.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest} + */ +public final class EvaluateProcessorVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest) + EvaluateProcessorVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use EvaluateProcessorVersionRequest.newBuilder() to construct. + private EvaluateProcessorVersionRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EvaluateProcessorVersionRequest() { + processorVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EvaluateProcessorVersionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest.class, + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest.Builder.class); + } + + public static final int PROCESSOR_VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object processorVersion_; + /** + * + * + *
+   * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to evaluate.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * + * string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The processorVersion. + */ + @java.lang.Override + public java.lang.String getProcessorVersion() { + java.lang.Object ref = processorVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + processorVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to evaluate.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * + * string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for processorVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProcessorVersionBytes() { + java.lang.Object ref = processorVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processorVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVALUATION_DOCUMENTS_FIELD_NUMBER = 3; + private com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluationDocuments_; + /** + * + * + *
+   * Optional. The documents used in the evaluation. If unspecified, use the processor's
+   * dataset as evaluation input.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the evaluationDocuments field is set. + */ + @java.lang.Override + public boolean hasEvaluationDocuments() { + return evaluationDocuments_ != null; + } + /** + * + * + *
+   * Optional. The documents used in the evaluation. If unspecified, use the processor's
+   * dataset as evaluation input.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The evaluationDocuments. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getEvaluationDocuments() { + return evaluationDocuments_ == null + ? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance() + : evaluationDocuments_; + } + /** + * + * + *
+   * Optional. The documents used in the evaluation. If unspecified, use the processor's
+   * dataset as evaluation input.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder + getEvaluationDocumentsOrBuilder() { + return getEvaluationDocuments(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processorVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, processorVersion_); + } + if (evaluationDocuments_ != null) { + output.writeMessage(3, getEvaluationDocuments()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processorVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, processorVersion_); + } + if (evaluationDocuments_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEvaluationDocuments()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest other = + (com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest) obj; + + if (!getProcessorVersion().equals(other.getProcessorVersion())) return false; + if (hasEvaluationDocuments() != other.hasEvaluationDocuments()) return false; + if (hasEvaluationDocuments()) { + if (!getEvaluationDocuments().equals(other.getEvaluationDocuments())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROCESSOR_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getProcessorVersion().hashCode(); + if (hasEvaluationDocuments()) { + hash = (37 * hash) + EVALUATION_DOCUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getEvaluationDocuments().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Evaluates the given ProcessorVersion against the supplied documents.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest) + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest.class, + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + processorVersion_ = ""; + + if (evaluationDocumentsBuilder_ == null) { + evaluationDocuments_ = null; + } else { + evaluationDocuments_ = null; + evaluationDocumentsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest build() { + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest buildPartial() { + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest result = + new com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest(this); + result.processorVersion_ = processorVersion_; + if (evaluationDocumentsBuilder_ == null) { + result.evaluationDocuments_ = evaluationDocuments_; + } else { + result.evaluationDocuments_ = evaluationDocumentsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest other) { + if (other + == com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest + .getDefaultInstance()) return this; + if (!other.getProcessorVersion().isEmpty()) { + processorVersion_ = other.processorVersion_; + onChanged(); + } + if (other.hasEvaluationDocuments()) { + mergeEvaluationDocuments(other.getEvaluationDocuments()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + processorVersion_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: + { + input.readMessage( + getEvaluationDocumentsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object processorVersion_ = ""; + /** + * + * + *
+     * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to evaluate.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * + * string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The processorVersion. + */ + public java.lang.String getProcessorVersion() { + java.lang.Object ref = processorVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + processorVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to evaluate.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * + * string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for processorVersion. + */ + public com.google.protobuf.ByteString getProcessorVersionBytes() { + java.lang.Object ref = processorVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processorVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to evaluate.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * + * string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The processorVersion to set. + * @return This builder for chaining. + */ + public Builder setProcessorVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + processorVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to evaluate.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * + * string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearProcessorVersion() { + + processorVersion_ = getDefaultInstance().getProcessorVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to evaluate.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * + * string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for processorVersion to set. + * @return This builder for chaining. + */ + public Builder setProcessorVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + processorVersion_ = value; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluationDocuments_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder> + evaluationDocumentsBuilder_; + /** + * + * + *
+     * Optional. The documents used in the evaluation. If unspecified, use the processor's
+     * dataset as evaluation input.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the evaluationDocuments field is set. + */ + public boolean hasEvaluationDocuments() { + return evaluationDocumentsBuilder_ != null || evaluationDocuments_ != null; + } + /** + * + * + *
+     * Optional. The documents used in the evaluation. If unspecified, use the processor's
+     * dataset as evaluation input.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The evaluationDocuments. + */ + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getEvaluationDocuments() { + if (evaluationDocumentsBuilder_ == null) { + return evaluationDocuments_ == null + ? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance() + : evaluationDocuments_; + } else { + return evaluationDocumentsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The documents used in the evaluation. If unspecified, use the processor's
+     * dataset as evaluation input.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEvaluationDocuments( + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig value) { + if (evaluationDocumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + evaluationDocuments_ = value; + onChanged(); + } else { + evaluationDocumentsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The documents used in the evaluation. If unspecified, use the processor's
+     * dataset as evaluation input.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEvaluationDocuments( + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder builderForValue) { + if (evaluationDocumentsBuilder_ == null) { + evaluationDocuments_ = builderForValue.build(); + onChanged(); + } else { + evaluationDocumentsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The documents used in the evaluation. If unspecified, use the processor's
+     * dataset as evaluation input.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEvaluationDocuments( + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig value) { + if (evaluationDocumentsBuilder_ == null) { + if (evaluationDocuments_ != null) { + evaluationDocuments_ = + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.newBuilder( + evaluationDocuments_) + .mergeFrom(value) + .buildPartial(); + } else { + evaluationDocuments_ = value; + } + onChanged(); + } else { + evaluationDocumentsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The documents used in the evaluation. If unspecified, use the processor's
+     * dataset as evaluation input.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEvaluationDocuments() { + if (evaluationDocumentsBuilder_ == null) { + evaluationDocuments_ = null; + onChanged(); + } else { + evaluationDocuments_ = null; + evaluationDocumentsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The documents used in the evaluation. If unspecified, use the processor's
+     * dataset as evaluation input.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder + getEvaluationDocumentsBuilder() { + + onChanged(); + return getEvaluationDocumentsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The documents used in the evaluation. If unspecified, use the processor's
+     * dataset as evaluation input.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder + getEvaluationDocumentsOrBuilder() { + if (evaluationDocumentsBuilder_ != null) { + return evaluationDocumentsBuilder_.getMessageOrBuilder(); + } else { + return evaluationDocuments_ == null + ? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance() + : evaluationDocuments_; + } + } + /** + * + * + *
+     * Optional. The documents used in the evaluation. If unspecified, use the processor's
+     * dataset as evaluation input.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder> + getEvaluationDocumentsFieldBuilder() { + if (evaluationDocumentsBuilder_ == null) { + evaluationDocumentsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder>( + getEvaluationDocuments(), getParentForChildren(), isClean()); + evaluationDocuments_ = null; + } + return evaluationDocumentsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest) + private static final com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest(); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EvaluateProcessorVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionRequestOrBuilder.java new file mode 100644 index 000000000000..a1521c3aa1e5 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionRequestOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface EvaluateProcessorVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to evaluate.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * + * string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The processorVersion. + */ + java.lang.String getProcessorVersion(); + /** + * + * + *
+   * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to evaluate.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * + * string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for processorVersion. + */ + com.google.protobuf.ByteString getProcessorVersionBytes(); + + /** + * + * + *
+   * Optional. The documents used in the evaluation. If unspecified, use the processor's
+   * dataset as evaluation input.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the evaluationDocuments field is set. + */ + boolean hasEvaluationDocuments(); + /** + * + * + *
+   * Optional. The documents used in the evaluation. If unspecified, use the processor's
+   * dataset as evaluation input.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The evaluationDocuments. + */ + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getEvaluationDocuments(); + /** + * + * + *
+   * Optional. The documents used in the evaluation. If unspecified, use the processor's
+   * dataset as evaluation input.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder + getEvaluationDocumentsOrBuilder(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionResponse.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionResponse.java new file mode 100644 index 000000000000..b28df93c9ddf --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionResponse.java @@ -0,0 +1,627 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * Metadata of the EvaluateProcessorVersion method.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse} + */ +public final class EvaluateProcessorVersionResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse) + EvaluateProcessorVersionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use EvaluateProcessorVersionResponse.newBuilder() to construct. + private EvaluateProcessorVersionResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EvaluateProcessorVersionResponse() { + evaluation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EvaluateProcessorVersionResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse.class, + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse.Builder.class); + } + + public static final int EVALUATION_FIELD_NUMBER = 2; + private volatile java.lang.Object evaluation_; + /** + * + * + *
+   * The resource name of the created evaluation.
+   * 
+ * + * string evaluation = 2; + * + * @return The evaluation. + */ + @java.lang.Override + public java.lang.String getEvaluation() { + java.lang.Object ref = evaluation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + evaluation_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the created evaluation.
+   * 
+ * + * string evaluation = 2; + * + * @return The bytes for evaluation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEvaluationBytes() { + java.lang.Object ref = evaluation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + evaluation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(evaluation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, evaluation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(evaluation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, evaluation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse other = + (com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse) obj; + + if (!getEvaluation().equals(other.getEvaluation())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EVALUATION_FIELD_NUMBER; + hash = (53 * hash) + getEvaluation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata of the EvaluateProcessorVersion method.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse) + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse.class, + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + evaluation_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_EvaluateProcessorVersionResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse build() { + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse buildPartial() { + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse result = + new com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse(this); + result.evaluation_ = evaluation_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse other) { + if (other + == com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse + .getDefaultInstance()) return this; + if (!other.getEvaluation().isEmpty()) { + evaluation_ = other.evaluation_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + evaluation_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object evaluation_ = ""; + /** + * + * + *
+     * The resource name of the created evaluation.
+     * 
+ * + * string evaluation = 2; + * + * @return The evaluation. + */ + public java.lang.String getEvaluation() { + java.lang.Object ref = evaluation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + evaluation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the created evaluation.
+     * 
+ * + * string evaluation = 2; + * + * @return The bytes for evaluation. + */ + public com.google.protobuf.ByteString getEvaluationBytes() { + java.lang.Object ref = evaluation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + evaluation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the created evaluation.
+     * 
+ * + * string evaluation = 2; + * + * @param value The evaluation to set. + * @return This builder for chaining. + */ + public Builder setEvaluation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + evaluation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the created evaluation.
+     * 
+ * + * string evaluation = 2; + * + * @return This builder for chaining. + */ + public Builder clearEvaluation() { + + evaluation_ = getDefaultInstance().getEvaluation(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the created evaluation.
+     * 
+ * + * string evaluation = 2; + * + * @param value The bytes for evaluation to set. + * @return This builder for chaining. + */ + public Builder setEvaluationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + evaluation_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse) + private static final com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse(); + } + + public static com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EvaluateProcessorVersionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionResponseOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionResponseOrBuilder.java new file mode 100644 index 000000000000..55428b5b4083 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluateProcessorVersionResponseOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface EvaluateProcessorVersionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the created evaluation.
+   * 
+ * + * string evaluation = 2; + * + * @return The evaluation. + */ + java.lang.String getEvaluation(); + /** + * + * + *
+   * The resource name of the created evaluation.
+   * 
+ * + * string evaluation = 2; + * + * @return The bytes for evaluation. + */ + com.google.protobuf.ByteString getEvaluationBytes(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Evaluation.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Evaluation.java new file mode 100644 index 000000000000..5748a2c884d5 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Evaluation.java @@ -0,0 +1,8050 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/evaluation.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * An evaluation of a ProcessorVersion's performance.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Evaluation} + */ +public final class Evaluation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Evaluation) + EvaluationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Evaluation.newBuilder() to construct. + private Evaluation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Evaluation() { + name_ = ""; + kmsKeyName_ = ""; + kmsKeyVersionName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Evaluation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetEntityMetrics(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Evaluation.class, + com.google.cloud.documentai.v1beta3.Evaluation.Builder.class); + } + + public interface CountersOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Evaluation.Counters) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * How many documents were sent for evaluation.
+     * 
+ * + * int32 input_documents_count = 1; + * + * @return The inputDocumentsCount. + */ + int getInputDocumentsCount(); + + /** + * + * + *
+     * How many documents were not included in the evaluation as they didn't
+     * pass validation.
+     * 
+ * + * int32 invalid_documents_count = 2; + * + * @return The invalidDocumentsCount. + */ + int getInvalidDocumentsCount(); + + /** + * + * + *
+     * How many documents were not included in the evaluation as Document AI
+     * failed to process them.
+     * 
+ * + * int32 failed_documents_count = 3; + * + * @return The failedDocumentsCount. + */ + int getFailedDocumentsCount(); + + /** + * + * + *
+     * How many documents were used in the evaluation.
+     * 
+ * + * int32 evaluated_documents_count = 4; + * + * @return The evaluatedDocumentsCount. + */ + int getEvaluatedDocumentsCount(); + } + /** + * + * + *
+   * Evaluation counters for the documents that were used.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Evaluation.Counters} + */ + public static final class Counters extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Evaluation.Counters) + CountersOrBuilder { + private static final long serialVersionUID = 0L; + // Use Counters.newBuilder() to construct. + private Counters(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Counters() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Counters(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_Counters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_Counters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Evaluation.Counters.class, + com.google.cloud.documentai.v1beta3.Evaluation.Counters.Builder.class); + } + + public static final int INPUT_DOCUMENTS_COUNT_FIELD_NUMBER = 1; + private int inputDocumentsCount_; + /** + * + * + *
+     * How many documents were sent for evaluation.
+     * 
+ * + * int32 input_documents_count = 1; + * + * @return The inputDocumentsCount. + */ + @java.lang.Override + public int getInputDocumentsCount() { + return inputDocumentsCount_; + } + + public static final int INVALID_DOCUMENTS_COUNT_FIELD_NUMBER = 2; + private int invalidDocumentsCount_; + /** + * + * + *
+     * How many documents were not included in the evaluation as they didn't
+     * pass validation.
+     * 
+ * + * int32 invalid_documents_count = 2; + * + * @return The invalidDocumentsCount. + */ + @java.lang.Override + public int getInvalidDocumentsCount() { + return invalidDocumentsCount_; + } + + public static final int FAILED_DOCUMENTS_COUNT_FIELD_NUMBER = 3; + private int failedDocumentsCount_; + /** + * + * + *
+     * How many documents were not included in the evaluation as Document AI
+     * failed to process them.
+     * 
+ * + * int32 failed_documents_count = 3; + * + * @return The failedDocumentsCount. + */ + @java.lang.Override + public int getFailedDocumentsCount() { + return failedDocumentsCount_; + } + + public static final int EVALUATED_DOCUMENTS_COUNT_FIELD_NUMBER = 4; + private int evaluatedDocumentsCount_; + /** + * + * + *
+     * How many documents were used in the evaluation.
+     * 
+ * + * int32 evaluated_documents_count = 4; + * + * @return The evaluatedDocumentsCount. + */ + @java.lang.Override + public int getEvaluatedDocumentsCount() { + return evaluatedDocumentsCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (inputDocumentsCount_ != 0) { + output.writeInt32(1, inputDocumentsCount_); + } + if (invalidDocumentsCount_ != 0) { + output.writeInt32(2, invalidDocumentsCount_); + } + if (failedDocumentsCount_ != 0) { + output.writeInt32(3, failedDocumentsCount_); + } + if (evaluatedDocumentsCount_ != 0) { + output.writeInt32(4, evaluatedDocumentsCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputDocumentsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, inputDocumentsCount_); + } + if (invalidDocumentsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, invalidDocumentsCount_); + } + if (failedDocumentsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, failedDocumentsCount_); + } + if (evaluatedDocumentsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, evaluatedDocumentsCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.Evaluation.Counters)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Evaluation.Counters other = + (com.google.cloud.documentai.v1beta3.Evaluation.Counters) obj; + + if (getInputDocumentsCount() != other.getInputDocumentsCount()) return false; + if (getInvalidDocumentsCount() != other.getInvalidDocumentsCount()) return false; + if (getFailedDocumentsCount() != other.getFailedDocumentsCount()) return false; + if (getEvaluatedDocumentsCount() != other.getEvaluatedDocumentsCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INPUT_DOCUMENTS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getInputDocumentsCount(); + hash = (37 * hash) + INVALID_DOCUMENTS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getInvalidDocumentsCount(); + hash = (37 * hash) + FAILED_DOCUMENTS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getFailedDocumentsCount(); + hash = (37 * hash) + EVALUATED_DOCUMENTS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getEvaluatedDocumentsCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Counters parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Counters parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Counters parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Counters parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Counters parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Counters parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Counters parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Counters parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Counters parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Counters parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Counters parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Counters parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Evaluation.Counters prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Evaluation counters for the documents that were used.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Evaluation.Counters} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Evaluation.Counters) + com.google.cloud.documentai.v1beta3.Evaluation.CountersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_Counters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_Counters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Evaluation.Counters.class, + com.google.cloud.documentai.v1beta3.Evaluation.Counters.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.Evaluation.Counters.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + inputDocumentsCount_ = 0; + + invalidDocumentsCount_ = 0; + + failedDocumentsCount_ = 0; + + evaluatedDocumentsCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_Counters_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.Counters getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Evaluation.Counters.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.Counters build() { + com.google.cloud.documentai.v1beta3.Evaluation.Counters result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.Counters buildPartial() { + com.google.cloud.documentai.v1beta3.Evaluation.Counters result = + new com.google.cloud.documentai.v1beta3.Evaluation.Counters(this); + result.inputDocumentsCount_ = inputDocumentsCount_; + result.invalidDocumentsCount_ = invalidDocumentsCount_; + result.failedDocumentsCount_ = failedDocumentsCount_; + result.evaluatedDocumentsCount_ = evaluatedDocumentsCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.Evaluation.Counters) { + return mergeFrom((com.google.cloud.documentai.v1beta3.Evaluation.Counters) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Evaluation.Counters other) { + if (other == com.google.cloud.documentai.v1beta3.Evaluation.Counters.getDefaultInstance()) + return this; + if (other.getInputDocumentsCount() != 0) { + setInputDocumentsCount(other.getInputDocumentsCount()); + } + if (other.getInvalidDocumentsCount() != 0) { + setInvalidDocumentsCount(other.getInvalidDocumentsCount()); + } + if (other.getFailedDocumentsCount() != 0) { + setFailedDocumentsCount(other.getFailedDocumentsCount()); + } + if (other.getEvaluatedDocumentsCount() != 0) { + setEvaluatedDocumentsCount(other.getEvaluatedDocumentsCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + inputDocumentsCount_ = input.readInt32(); + + break; + } // case 8 + case 16: + { + invalidDocumentsCount_ = input.readInt32(); + + break; + } // case 16 + case 24: + { + failedDocumentsCount_ = input.readInt32(); + + break; + } // case 24 + case 32: + { + evaluatedDocumentsCount_ = input.readInt32(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int inputDocumentsCount_; + /** + * + * + *
+       * How many documents were sent for evaluation.
+       * 
+ * + * int32 input_documents_count = 1; + * + * @return The inputDocumentsCount. + */ + @java.lang.Override + public int getInputDocumentsCount() { + return inputDocumentsCount_; + } + /** + * + * + *
+       * How many documents were sent for evaluation.
+       * 
+ * + * int32 input_documents_count = 1; + * + * @param value The inputDocumentsCount to set. + * @return This builder for chaining. + */ + public Builder setInputDocumentsCount(int value) { + + inputDocumentsCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * How many documents were sent for evaluation.
+       * 
+ * + * int32 input_documents_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearInputDocumentsCount() { + + inputDocumentsCount_ = 0; + onChanged(); + return this; + } + + private int invalidDocumentsCount_; + /** + * + * + *
+       * How many documents were not included in the evaluation as they didn't
+       * pass validation.
+       * 
+ * + * int32 invalid_documents_count = 2; + * + * @return The invalidDocumentsCount. + */ + @java.lang.Override + public int getInvalidDocumentsCount() { + return invalidDocumentsCount_; + } + /** + * + * + *
+       * How many documents were not included in the evaluation as they didn't
+       * pass validation.
+       * 
+ * + * int32 invalid_documents_count = 2; + * + * @param value The invalidDocumentsCount to set. + * @return This builder for chaining. + */ + public Builder setInvalidDocumentsCount(int value) { + + invalidDocumentsCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * How many documents were not included in the evaluation as they didn't
+       * pass validation.
+       * 
+ * + * int32 invalid_documents_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearInvalidDocumentsCount() { + + invalidDocumentsCount_ = 0; + onChanged(); + return this; + } + + private int failedDocumentsCount_; + /** + * + * + *
+       * How many documents were not included in the evaluation as Document AI
+       * failed to process them.
+       * 
+ * + * int32 failed_documents_count = 3; + * + * @return The failedDocumentsCount. + */ + @java.lang.Override + public int getFailedDocumentsCount() { + return failedDocumentsCount_; + } + /** + * + * + *
+       * How many documents were not included in the evaluation as Document AI
+       * failed to process them.
+       * 
+ * + * int32 failed_documents_count = 3; + * + * @param value The failedDocumentsCount to set. + * @return This builder for chaining. + */ + public Builder setFailedDocumentsCount(int value) { + + failedDocumentsCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * How many documents were not included in the evaluation as Document AI
+       * failed to process them.
+       * 
+ * + * int32 failed_documents_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearFailedDocumentsCount() { + + failedDocumentsCount_ = 0; + onChanged(); + return this; + } + + private int evaluatedDocumentsCount_; + /** + * + * + *
+       * How many documents were used in the evaluation.
+       * 
+ * + * int32 evaluated_documents_count = 4; + * + * @return The evaluatedDocumentsCount. + */ + @java.lang.Override + public int getEvaluatedDocumentsCount() { + return evaluatedDocumentsCount_; + } + /** + * + * + *
+       * How many documents were used in the evaluation.
+       * 
+ * + * int32 evaluated_documents_count = 4; + * + * @param value The evaluatedDocumentsCount to set. + * @return This builder for chaining. + */ + public Builder setEvaluatedDocumentsCount(int value) { + + evaluatedDocumentsCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * How many documents were used in the evaluation.
+       * 
+ * + * int32 evaluated_documents_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearEvaluatedDocumentsCount() { + + evaluatedDocumentsCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Evaluation.Counters) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Evaluation.Counters) + private static final com.google.cloud.documentai.v1beta3.Evaluation.Counters DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Evaluation.Counters(); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Counters getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Counters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.Counters getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MetricsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Evaluation.Metrics) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The calculated precision.
+     * 
+ * + * float precision = 1; + * + * @return The precision. + */ + float getPrecision(); + + /** + * + * + *
+     * The calculated recall.
+     * 
+ * + * float recall = 2; + * + * @return The recall. + */ + float getRecall(); + + /** + * + * + *
+     * The calculated f1 score.
+     * 
+ * + * float f1_score = 3; + * + * @return The f1Score. + */ + float getF1Score(); + + /** + * + * + *
+     * The amount of occurrences in predicted documents.
+     * 
+ * + * int32 predicted_occurrences_count = 4; + * + * @return The predictedOccurrencesCount. + */ + int getPredictedOccurrencesCount(); + + /** + * + * + *
+     * The amount of occurrences in ground truth documents.
+     * 
+ * + * int32 ground_truth_occurrences_count = 5; + * + * @return The groundTruthOccurrencesCount. + */ + int getGroundTruthOccurrencesCount(); + + /** + * + * + *
+     * The amount of documents with a predicted occurrence.
+     * 
+ * + * int32 predicted_document_count = 10; + * + * @return The predictedDocumentCount. + */ + int getPredictedDocumentCount(); + + /** + * + * + *
+     * The amount of documents with a ground truth occurrence.
+     * 
+ * + * int32 ground_truth_document_count = 11; + * + * @return The groundTruthDocumentCount. + */ + int getGroundTruthDocumentCount(); + + /** + * + * + *
+     * The amount of true positives.
+     * 
+ * + * int32 true_positives_count = 6; + * + * @return The truePositivesCount. + */ + int getTruePositivesCount(); + + /** + * + * + *
+     * The amount of false positives.
+     * 
+ * + * int32 false_positives_count = 7; + * + * @return The falsePositivesCount. + */ + int getFalsePositivesCount(); + + /** + * + * + *
+     * The amount of false negatives.
+     * 
+ * + * int32 false_negatives_count = 8; + * + * @return The falseNegativesCount. + */ + int getFalseNegativesCount(); + + /** + * + * + *
+     * The amount of documents that had an occurrence of this label.
+     * 
+ * + * int32 total_documents_count = 9; + * + * @return The totalDocumentsCount. + */ + int getTotalDocumentsCount(); + } + /** + * + * + *
+   * Evaluation metrics, either in aggregate or about a specific entity.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Evaluation.Metrics} + */ + public static final class Metrics extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Evaluation.Metrics) + MetricsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Metrics.newBuilder() to construct. + private Metrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Metrics() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Metrics(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_Metrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_Metrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Evaluation.Metrics.class, + com.google.cloud.documentai.v1beta3.Evaluation.Metrics.Builder.class); + } + + public static final int PRECISION_FIELD_NUMBER = 1; + private float precision_; + /** + * + * + *
+     * The calculated precision.
+     * 
+ * + * float precision = 1; + * + * @return The precision. + */ + @java.lang.Override + public float getPrecision() { + return precision_; + } + + public static final int RECALL_FIELD_NUMBER = 2; + private float recall_; + /** + * + * + *
+     * The calculated recall.
+     * 
+ * + * float recall = 2; + * + * @return The recall. + */ + @java.lang.Override + public float getRecall() { + return recall_; + } + + public static final int F1_SCORE_FIELD_NUMBER = 3; + private float f1Score_; + /** + * + * + *
+     * The calculated f1 score.
+     * 
+ * + * float f1_score = 3; + * + * @return The f1Score. + */ + @java.lang.Override + public float getF1Score() { + return f1Score_; + } + + public static final int PREDICTED_OCCURRENCES_COUNT_FIELD_NUMBER = 4; + private int predictedOccurrencesCount_; + /** + * + * + *
+     * The amount of occurrences in predicted documents.
+     * 
+ * + * int32 predicted_occurrences_count = 4; + * + * @return The predictedOccurrencesCount. + */ + @java.lang.Override + public int getPredictedOccurrencesCount() { + return predictedOccurrencesCount_; + } + + public static final int GROUND_TRUTH_OCCURRENCES_COUNT_FIELD_NUMBER = 5; + private int groundTruthOccurrencesCount_; + /** + * + * + *
+     * The amount of occurrences in ground truth documents.
+     * 
+ * + * int32 ground_truth_occurrences_count = 5; + * + * @return The groundTruthOccurrencesCount. + */ + @java.lang.Override + public int getGroundTruthOccurrencesCount() { + return groundTruthOccurrencesCount_; + } + + public static final int PREDICTED_DOCUMENT_COUNT_FIELD_NUMBER = 10; + private int predictedDocumentCount_; + /** + * + * + *
+     * The amount of documents with a predicted occurrence.
+     * 
+ * + * int32 predicted_document_count = 10; + * + * @return The predictedDocumentCount. + */ + @java.lang.Override + public int getPredictedDocumentCount() { + return predictedDocumentCount_; + } + + public static final int GROUND_TRUTH_DOCUMENT_COUNT_FIELD_NUMBER = 11; + private int groundTruthDocumentCount_; + /** + * + * + *
+     * The amount of documents with a ground truth occurrence.
+     * 
+ * + * int32 ground_truth_document_count = 11; + * + * @return The groundTruthDocumentCount. + */ + @java.lang.Override + public int getGroundTruthDocumentCount() { + return groundTruthDocumentCount_; + } + + public static final int TRUE_POSITIVES_COUNT_FIELD_NUMBER = 6; + private int truePositivesCount_; + /** + * + * + *
+     * The amount of true positives.
+     * 
+ * + * int32 true_positives_count = 6; + * + * @return The truePositivesCount. + */ + @java.lang.Override + public int getTruePositivesCount() { + return truePositivesCount_; + } + + public static final int FALSE_POSITIVES_COUNT_FIELD_NUMBER = 7; + private int falsePositivesCount_; + /** + * + * + *
+     * The amount of false positives.
+     * 
+ * + * int32 false_positives_count = 7; + * + * @return The falsePositivesCount. + */ + @java.lang.Override + public int getFalsePositivesCount() { + return falsePositivesCount_; + } + + public static final int FALSE_NEGATIVES_COUNT_FIELD_NUMBER = 8; + private int falseNegativesCount_; + /** + * + * + *
+     * The amount of false negatives.
+     * 
+ * + * int32 false_negatives_count = 8; + * + * @return The falseNegativesCount. + */ + @java.lang.Override + public int getFalseNegativesCount() { + return falseNegativesCount_; + } + + public static final int TOTAL_DOCUMENTS_COUNT_FIELD_NUMBER = 9; + private int totalDocumentsCount_; + /** + * + * + *
+     * The amount of documents that had an occurrence of this label.
+     * 
+ * + * int32 total_documents_count = 9; + * + * @return The totalDocumentsCount. + */ + @java.lang.Override + public int getTotalDocumentsCount() { + return totalDocumentsCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(precision_) != 0) { + output.writeFloat(1, precision_); + } + if (java.lang.Float.floatToRawIntBits(recall_) != 0) { + output.writeFloat(2, recall_); + } + if (java.lang.Float.floatToRawIntBits(f1Score_) != 0) { + output.writeFloat(3, f1Score_); + } + if (predictedOccurrencesCount_ != 0) { + output.writeInt32(4, predictedOccurrencesCount_); + } + if (groundTruthOccurrencesCount_ != 0) { + output.writeInt32(5, groundTruthOccurrencesCount_); + } + if (truePositivesCount_ != 0) { + output.writeInt32(6, truePositivesCount_); + } + if (falsePositivesCount_ != 0) { + output.writeInt32(7, falsePositivesCount_); + } + if (falseNegativesCount_ != 0) { + output.writeInt32(8, falseNegativesCount_); + } + if (totalDocumentsCount_ != 0) { + output.writeInt32(9, totalDocumentsCount_); + } + if (predictedDocumentCount_ != 0) { + output.writeInt32(10, predictedDocumentCount_); + } + if (groundTruthDocumentCount_ != 0) { + output.writeInt32(11, groundTruthDocumentCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(precision_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, precision_); + } + if (java.lang.Float.floatToRawIntBits(recall_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, recall_); + } + if (java.lang.Float.floatToRawIntBits(f1Score_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, f1Score_); + } + if (predictedOccurrencesCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(4, predictedOccurrencesCount_); + } + if (groundTruthOccurrencesCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(5, groundTruthOccurrencesCount_); + } + if (truePositivesCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, truePositivesCount_); + } + if (falsePositivesCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, falsePositivesCount_); + } + if (falseNegativesCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, falseNegativesCount_); + } + if (totalDocumentsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, totalDocumentsCount_); + } + if (predictedDocumentCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(10, predictedDocumentCount_); + } + if (groundTruthDocumentCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(11, groundTruthDocumentCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.Evaluation.Metrics)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Evaluation.Metrics other = + (com.google.cloud.documentai.v1beta3.Evaluation.Metrics) obj; + + if (java.lang.Float.floatToIntBits(getPrecision()) + != java.lang.Float.floatToIntBits(other.getPrecision())) return false; + if (java.lang.Float.floatToIntBits(getRecall()) + != java.lang.Float.floatToIntBits(other.getRecall())) return false; + if (java.lang.Float.floatToIntBits(getF1Score()) + != java.lang.Float.floatToIntBits(other.getF1Score())) return false; + if (getPredictedOccurrencesCount() != other.getPredictedOccurrencesCount()) return false; + if (getGroundTruthOccurrencesCount() != other.getGroundTruthOccurrencesCount()) return false; + if (getPredictedDocumentCount() != other.getPredictedDocumentCount()) return false; + if (getGroundTruthDocumentCount() != other.getGroundTruthDocumentCount()) return false; + if (getTruePositivesCount() != other.getTruePositivesCount()) return false; + if (getFalsePositivesCount() != other.getFalsePositivesCount()) return false; + if (getFalseNegativesCount() != other.getFalseNegativesCount()) return false; + if (getTotalDocumentsCount() != other.getTotalDocumentsCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRECISION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getPrecision()); + hash = (37 * hash) + RECALL_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getRecall()); + hash = (37 * hash) + F1_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getF1Score()); + hash = (37 * hash) + PREDICTED_OCCURRENCES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getPredictedOccurrencesCount(); + hash = (37 * hash) + GROUND_TRUTH_OCCURRENCES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getGroundTruthOccurrencesCount(); + hash = (37 * hash) + PREDICTED_DOCUMENT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getPredictedDocumentCount(); + hash = (37 * hash) + GROUND_TRUTH_DOCUMENT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getGroundTruthDocumentCount(); + hash = (37 * hash) + TRUE_POSITIVES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTruePositivesCount(); + hash = (37 * hash) + FALSE_POSITIVES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getFalsePositivesCount(); + hash = (37 * hash) + FALSE_NEGATIVES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getFalseNegativesCount(); + hash = (37 * hash) + TOTAL_DOCUMENTS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTotalDocumentsCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Metrics parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Metrics parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Metrics parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Metrics parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Metrics parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Metrics parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Metrics parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Metrics parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Metrics parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Metrics parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Metrics parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Metrics parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Evaluation.Metrics prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Evaluation metrics, either in aggregate or about a specific entity.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Evaluation.Metrics} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Evaluation.Metrics) + com.google.cloud.documentai.v1beta3.Evaluation.MetricsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_Metrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_Metrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Evaluation.Metrics.class, + com.google.cloud.documentai.v1beta3.Evaluation.Metrics.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.Evaluation.Metrics.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + precision_ = 0F; + + recall_ = 0F; + + f1Score_ = 0F; + + predictedOccurrencesCount_ = 0; + + groundTruthOccurrencesCount_ = 0; + + predictedDocumentCount_ = 0; + + groundTruthDocumentCount_ = 0; + + truePositivesCount_ = 0; + + falsePositivesCount_ = 0; + + falseNegativesCount_ = 0; + + totalDocumentsCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_Metrics_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.Metrics getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Evaluation.Metrics.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.Metrics build() { + com.google.cloud.documentai.v1beta3.Evaluation.Metrics result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.Metrics buildPartial() { + com.google.cloud.documentai.v1beta3.Evaluation.Metrics result = + new com.google.cloud.documentai.v1beta3.Evaluation.Metrics(this); + result.precision_ = precision_; + result.recall_ = recall_; + result.f1Score_ = f1Score_; + result.predictedOccurrencesCount_ = predictedOccurrencesCount_; + result.groundTruthOccurrencesCount_ = groundTruthOccurrencesCount_; + result.predictedDocumentCount_ = predictedDocumentCount_; + result.groundTruthDocumentCount_ = groundTruthDocumentCount_; + result.truePositivesCount_ = truePositivesCount_; + result.falsePositivesCount_ = falsePositivesCount_; + result.falseNegativesCount_ = falseNegativesCount_; + result.totalDocumentsCount_ = totalDocumentsCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.Evaluation.Metrics) { + return mergeFrom((com.google.cloud.documentai.v1beta3.Evaluation.Metrics) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Evaluation.Metrics other) { + if (other == com.google.cloud.documentai.v1beta3.Evaluation.Metrics.getDefaultInstance()) + return this; + if (other.getPrecision() != 0F) { + setPrecision(other.getPrecision()); + } + if (other.getRecall() != 0F) { + setRecall(other.getRecall()); + } + if (other.getF1Score() != 0F) { + setF1Score(other.getF1Score()); + } + if (other.getPredictedOccurrencesCount() != 0) { + setPredictedOccurrencesCount(other.getPredictedOccurrencesCount()); + } + if (other.getGroundTruthOccurrencesCount() != 0) { + setGroundTruthOccurrencesCount(other.getGroundTruthOccurrencesCount()); + } + if (other.getPredictedDocumentCount() != 0) { + setPredictedDocumentCount(other.getPredictedDocumentCount()); + } + if (other.getGroundTruthDocumentCount() != 0) { + setGroundTruthDocumentCount(other.getGroundTruthDocumentCount()); + } + if (other.getTruePositivesCount() != 0) { + setTruePositivesCount(other.getTruePositivesCount()); + } + if (other.getFalsePositivesCount() != 0) { + setFalsePositivesCount(other.getFalsePositivesCount()); + } + if (other.getFalseNegativesCount() != 0) { + setFalseNegativesCount(other.getFalseNegativesCount()); + } + if (other.getTotalDocumentsCount() != 0) { + setTotalDocumentsCount(other.getTotalDocumentsCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + precision_ = input.readFloat(); + + break; + } // case 13 + case 21: + { + recall_ = input.readFloat(); + + break; + } // case 21 + case 29: + { + f1Score_ = input.readFloat(); + + break; + } // case 29 + case 32: + { + predictedOccurrencesCount_ = input.readInt32(); + + break; + } // case 32 + case 40: + { + groundTruthOccurrencesCount_ = input.readInt32(); + + break; + } // case 40 + case 48: + { + truePositivesCount_ = input.readInt32(); + + break; + } // case 48 + case 56: + { + falsePositivesCount_ = input.readInt32(); + + break; + } // case 56 + case 64: + { + falseNegativesCount_ = input.readInt32(); + + break; + } // case 64 + case 72: + { + totalDocumentsCount_ = input.readInt32(); + + break; + } // case 72 + case 80: + { + predictedDocumentCount_ = input.readInt32(); + + break; + } // case 80 + case 88: + { + groundTruthDocumentCount_ = input.readInt32(); + + break; + } // case 88 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private float precision_; + /** + * + * + *
+       * The calculated precision.
+       * 
+ * + * float precision = 1; + * + * @return The precision. + */ + @java.lang.Override + public float getPrecision() { + return precision_; + } + /** + * + * + *
+       * The calculated precision.
+       * 
+ * + * float precision = 1; + * + * @param value The precision to set. + * @return This builder for chaining. + */ + public Builder setPrecision(float value) { + + precision_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The calculated precision.
+       * 
+ * + * float precision = 1; + * + * @return This builder for chaining. + */ + public Builder clearPrecision() { + + precision_ = 0F; + onChanged(); + return this; + } + + private float recall_; + /** + * + * + *
+       * The calculated recall.
+       * 
+ * + * float recall = 2; + * + * @return The recall. + */ + @java.lang.Override + public float getRecall() { + return recall_; + } + /** + * + * + *
+       * The calculated recall.
+       * 
+ * + * float recall = 2; + * + * @param value The recall to set. + * @return This builder for chaining. + */ + public Builder setRecall(float value) { + + recall_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The calculated recall.
+       * 
+ * + * float recall = 2; + * + * @return This builder for chaining. + */ + public Builder clearRecall() { + + recall_ = 0F; + onChanged(); + return this; + } + + private float f1Score_; + /** + * + * + *
+       * The calculated f1 score.
+       * 
+ * + * float f1_score = 3; + * + * @return The f1Score. + */ + @java.lang.Override + public float getF1Score() { + return f1Score_; + } + /** + * + * + *
+       * The calculated f1 score.
+       * 
+ * + * float f1_score = 3; + * + * @param value The f1Score to set. + * @return This builder for chaining. + */ + public Builder setF1Score(float value) { + + f1Score_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The calculated f1 score.
+       * 
+ * + * float f1_score = 3; + * + * @return This builder for chaining. + */ + public Builder clearF1Score() { + + f1Score_ = 0F; + onChanged(); + return this; + } + + private int predictedOccurrencesCount_; + /** + * + * + *
+       * The amount of occurrences in predicted documents.
+       * 
+ * + * int32 predicted_occurrences_count = 4; + * + * @return The predictedOccurrencesCount. + */ + @java.lang.Override + public int getPredictedOccurrencesCount() { + return predictedOccurrencesCount_; + } + /** + * + * + *
+       * The amount of occurrences in predicted documents.
+       * 
+ * + * int32 predicted_occurrences_count = 4; + * + * @param value The predictedOccurrencesCount to set. + * @return This builder for chaining. + */ + public Builder setPredictedOccurrencesCount(int value) { + + predictedOccurrencesCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The amount of occurrences in predicted documents.
+       * 
+ * + * int32 predicted_occurrences_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearPredictedOccurrencesCount() { + + predictedOccurrencesCount_ = 0; + onChanged(); + return this; + } + + private int groundTruthOccurrencesCount_; + /** + * + * + *
+       * The amount of occurrences in ground truth documents.
+       * 
+ * + * int32 ground_truth_occurrences_count = 5; + * + * @return The groundTruthOccurrencesCount. + */ + @java.lang.Override + public int getGroundTruthOccurrencesCount() { + return groundTruthOccurrencesCount_; + } + /** + * + * + *
+       * The amount of occurrences in ground truth documents.
+       * 
+ * + * int32 ground_truth_occurrences_count = 5; + * + * @param value The groundTruthOccurrencesCount to set. + * @return This builder for chaining. + */ + public Builder setGroundTruthOccurrencesCount(int value) { + + groundTruthOccurrencesCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The amount of occurrences in ground truth documents.
+       * 
+ * + * int32 ground_truth_occurrences_count = 5; + * + * @return This builder for chaining. + */ + public Builder clearGroundTruthOccurrencesCount() { + + groundTruthOccurrencesCount_ = 0; + onChanged(); + return this; + } + + private int predictedDocumentCount_; + /** + * + * + *
+       * The amount of documents with a predicted occurrence.
+       * 
+ * + * int32 predicted_document_count = 10; + * + * @return The predictedDocumentCount. + */ + @java.lang.Override + public int getPredictedDocumentCount() { + return predictedDocumentCount_; + } + /** + * + * + *
+       * The amount of documents with a predicted occurrence.
+       * 
+ * + * int32 predicted_document_count = 10; + * + * @param value The predictedDocumentCount to set. + * @return This builder for chaining. + */ + public Builder setPredictedDocumentCount(int value) { + + predictedDocumentCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The amount of documents with a predicted occurrence.
+       * 
+ * + * int32 predicted_document_count = 10; + * + * @return This builder for chaining. + */ + public Builder clearPredictedDocumentCount() { + + predictedDocumentCount_ = 0; + onChanged(); + return this; + } + + private int groundTruthDocumentCount_; + /** + * + * + *
+       * The amount of documents with a ground truth occurrence.
+       * 
+ * + * int32 ground_truth_document_count = 11; + * + * @return The groundTruthDocumentCount. + */ + @java.lang.Override + public int getGroundTruthDocumentCount() { + return groundTruthDocumentCount_; + } + /** + * + * + *
+       * The amount of documents with a ground truth occurrence.
+       * 
+ * + * int32 ground_truth_document_count = 11; + * + * @param value The groundTruthDocumentCount to set. + * @return This builder for chaining. + */ + public Builder setGroundTruthDocumentCount(int value) { + + groundTruthDocumentCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The amount of documents with a ground truth occurrence.
+       * 
+ * + * int32 ground_truth_document_count = 11; + * + * @return This builder for chaining. + */ + public Builder clearGroundTruthDocumentCount() { + + groundTruthDocumentCount_ = 0; + onChanged(); + return this; + } + + private int truePositivesCount_; + /** + * + * + *
+       * The amount of true positives.
+       * 
+ * + * int32 true_positives_count = 6; + * + * @return The truePositivesCount. + */ + @java.lang.Override + public int getTruePositivesCount() { + return truePositivesCount_; + } + /** + * + * + *
+       * The amount of true positives.
+       * 
+ * + * int32 true_positives_count = 6; + * + * @param value The truePositivesCount to set. + * @return This builder for chaining. + */ + public Builder setTruePositivesCount(int value) { + + truePositivesCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The amount of true positives.
+       * 
+ * + * int32 true_positives_count = 6; + * + * @return This builder for chaining. + */ + public Builder clearTruePositivesCount() { + + truePositivesCount_ = 0; + onChanged(); + return this; + } + + private int falsePositivesCount_; + /** + * + * + *
+       * The amount of false positives.
+       * 
+ * + * int32 false_positives_count = 7; + * + * @return The falsePositivesCount. + */ + @java.lang.Override + public int getFalsePositivesCount() { + return falsePositivesCount_; + } + /** + * + * + *
+       * The amount of false positives.
+       * 
+ * + * int32 false_positives_count = 7; + * + * @param value The falsePositivesCount to set. + * @return This builder for chaining. + */ + public Builder setFalsePositivesCount(int value) { + + falsePositivesCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The amount of false positives.
+       * 
+ * + * int32 false_positives_count = 7; + * + * @return This builder for chaining. + */ + public Builder clearFalsePositivesCount() { + + falsePositivesCount_ = 0; + onChanged(); + return this; + } + + private int falseNegativesCount_; + /** + * + * + *
+       * The amount of false negatives.
+       * 
+ * + * int32 false_negatives_count = 8; + * + * @return The falseNegativesCount. + */ + @java.lang.Override + public int getFalseNegativesCount() { + return falseNegativesCount_; + } + /** + * + * + *
+       * The amount of false negatives.
+       * 
+ * + * int32 false_negatives_count = 8; + * + * @param value The falseNegativesCount to set. + * @return This builder for chaining. + */ + public Builder setFalseNegativesCount(int value) { + + falseNegativesCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The amount of false negatives.
+       * 
+ * + * int32 false_negatives_count = 8; + * + * @return This builder for chaining. + */ + public Builder clearFalseNegativesCount() { + + falseNegativesCount_ = 0; + onChanged(); + return this; + } + + private int totalDocumentsCount_; + /** + * + * + *
+       * The amount of documents that had an occurrence of this label.
+       * 
+ * + * int32 total_documents_count = 9; + * + * @return The totalDocumentsCount. + */ + @java.lang.Override + public int getTotalDocumentsCount() { + return totalDocumentsCount_; + } + /** + * + * + *
+       * The amount of documents that had an occurrence of this label.
+       * 
+ * + * int32 total_documents_count = 9; + * + * @param value The totalDocumentsCount to set. + * @return This builder for chaining. + */ + public Builder setTotalDocumentsCount(int value) { + + totalDocumentsCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The amount of documents that had an occurrence of this label.
+       * 
+ * + * int32 total_documents_count = 9; + * + * @return This builder for chaining. + */ + public Builder clearTotalDocumentsCount() { + + totalDocumentsCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Evaluation.Metrics) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Evaluation.Metrics) + private static final com.google.cloud.documentai.v1beta3.Evaluation.Metrics DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Evaluation.Metrics(); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.Metrics getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metrics parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.Metrics getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConfidenceLevelMetricsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The confidence level.
+     * 
+ * + * float confidence_level = 1; + * + * @return The confidenceLevel. + */ + float getConfidenceLevel(); + + /** + * + * + *
+     * The metrics at the specific confidence level.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + * + * @return Whether the metrics field is set. + */ + boolean hasMetrics(); + /** + * + * + *
+     * The metrics at the specific confidence level.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + * + * @return The metrics. + */ + com.google.cloud.documentai.v1beta3.Evaluation.Metrics getMetrics(); + /** + * + * + *
+     * The metrics at the specific confidence level.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + */ + com.google.cloud.documentai.v1beta3.Evaluation.MetricsOrBuilder getMetricsOrBuilder(); + } + /** + * + * + *
+   * Evaluations metrics, at a specific confidence level.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics} + */ + public static final class ConfidenceLevelMetrics extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics) + ConfidenceLevelMetricsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConfidenceLevelMetrics.newBuilder() to construct. + private ConfidenceLevelMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfidenceLevelMetrics() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConfidenceLevelMetrics(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_ConfidenceLevelMetrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_ConfidenceLevelMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.class, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder.class); + } + + public static final int CONFIDENCE_LEVEL_FIELD_NUMBER = 1; + private float confidenceLevel_; + /** + * + * + *
+     * The confidence level.
+     * 
+ * + * float confidence_level = 1; + * + * @return The confidenceLevel. + */ + @java.lang.Override + public float getConfidenceLevel() { + return confidenceLevel_; + } + + public static final int METRICS_FIELD_NUMBER = 2; + private com.google.cloud.documentai.v1beta3.Evaluation.Metrics metrics_; + /** + * + * + *
+     * The metrics at the specific confidence level.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + * + * @return Whether the metrics field is set. + */ + @java.lang.Override + public boolean hasMetrics() { + return metrics_ != null; + } + /** + * + * + *
+     * The metrics at the specific confidence level.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + * + * @return The metrics. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.Metrics getMetrics() { + return metrics_ == null + ? com.google.cloud.documentai.v1beta3.Evaluation.Metrics.getDefaultInstance() + : metrics_; + } + /** + * + * + *
+     * The metrics at the specific confidence level.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.MetricsOrBuilder getMetricsOrBuilder() { + return getMetrics(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(confidenceLevel_) != 0) { + output.writeFloat(1, confidenceLevel_); + } + if (metrics_ != null) { + output.writeMessage(2, getMetrics()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(confidenceLevel_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, confidenceLevel_); + } + if (metrics_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetrics()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics other = + (com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics) obj; + + if (java.lang.Float.floatToIntBits(getConfidenceLevel()) + != java.lang.Float.floatToIntBits(other.getConfidenceLevel())) return false; + if (hasMetrics() != other.hasMetrics()) return false; + if (hasMetrics()) { + if (!getMetrics().equals(other.getMetrics())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONFIDENCE_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidenceLevel()); + if (hasMetrics()) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetrics().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Evaluations metrics, at a specific confidence level.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics) + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_ConfidenceLevelMetrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_ConfidenceLevelMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.class, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder + .class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + confidenceLevel_ = 0F; + + if (metricsBuilder_ == null) { + metrics_ = null; + } else { + metrics_ = null; + metricsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_ConfidenceLevelMetrics_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics build() { + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics buildPartial() { + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics result = + new com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics(this); + result.confidenceLevel_ = confidenceLevel_; + if (metricsBuilder_ == null) { + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics other) { + if (other + == com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + .getDefaultInstance()) return this; + if (other.getConfidenceLevel() != 0F) { + setConfidenceLevel(other.getConfidenceLevel()); + } + if (other.hasMetrics()) { + mergeMetrics(other.getMetrics()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + confidenceLevel_ = input.readFloat(); + + break; + } // case 13 + case 18: + { + input.readMessage(getMetricsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private float confidenceLevel_; + /** + * + * + *
+       * The confidence level.
+       * 
+ * + * float confidence_level = 1; + * + * @return The confidenceLevel. + */ + @java.lang.Override + public float getConfidenceLevel() { + return confidenceLevel_; + } + /** + * + * + *
+       * The confidence level.
+       * 
+ * + * float confidence_level = 1; + * + * @param value The confidenceLevel to set. + * @return This builder for chaining. + */ + public Builder setConfidenceLevel(float value) { + + confidenceLevel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The confidence level.
+       * 
+ * + * float confidence_level = 1; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceLevel() { + + confidenceLevel_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1beta3.Evaluation.Metrics metrics_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.Metrics, + com.google.cloud.documentai.v1beta3.Evaluation.Metrics.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.MetricsOrBuilder> + metricsBuilder_; + /** + * + * + *
+       * The metrics at the specific confidence level.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + * + * @return Whether the metrics field is set. + */ + public boolean hasMetrics() { + return metricsBuilder_ != null || metrics_ != null; + } + /** + * + * + *
+       * The metrics at the specific confidence level.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + * + * @return The metrics. + */ + public com.google.cloud.documentai.v1beta3.Evaluation.Metrics getMetrics() { + if (metricsBuilder_ == null) { + return metrics_ == null + ? com.google.cloud.documentai.v1beta3.Evaluation.Metrics.getDefaultInstance() + : metrics_; + } else { + return metricsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The metrics at the specific confidence level.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + */ + public Builder setMetrics(com.google.cloud.documentai.v1beta3.Evaluation.Metrics value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metrics_ = value; + onChanged(); + } else { + metricsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The metrics at the specific confidence level.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + */ + public Builder setMetrics( + com.google.cloud.documentai.v1beta3.Evaluation.Metrics.Builder builderForValue) { + if (metricsBuilder_ == null) { + metrics_ = builderForValue.build(); + onChanged(); + } else { + metricsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The metrics at the specific confidence level.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + */ + public Builder mergeMetrics(com.google.cloud.documentai.v1beta3.Evaluation.Metrics value) { + if (metricsBuilder_ == null) { + if (metrics_ != null) { + metrics_ = + com.google.cloud.documentai.v1beta3.Evaluation.Metrics.newBuilder(metrics_) + .mergeFrom(value) + .buildPartial(); + } else { + metrics_ = value; + } + onChanged(); + } else { + metricsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The metrics at the specific confidence level.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = null; + onChanged(); + } else { + metrics_ = null; + metricsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The metrics at the specific confidence level.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + */ + public com.google.cloud.documentai.v1beta3.Evaluation.Metrics.Builder getMetricsBuilder() { + + onChanged(); + return getMetricsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The metrics at the specific confidence level.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + */ + public com.google.cloud.documentai.v1beta3.Evaluation.MetricsOrBuilder getMetricsOrBuilder() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilder(); + } else { + return metrics_ == null + ? com.google.cloud.documentai.v1beta3.Evaluation.Metrics.getDefaultInstance() + : metrics_; + } + } + /** + * + * + *
+       * The metrics at the specific confidence level.
+       * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Metrics metrics = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.Metrics, + com.google.cloud.documentai.v1beta3.Evaluation.Metrics.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.MetricsOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.Metrics, + com.google.cloud.documentai.v1beta3.Evaluation.Metrics.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.MetricsOrBuilder>( + getMetrics(), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics) + private static final com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics(); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfidenceLevelMetrics parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MultiConfidenceMetricsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Metrics across confidence levels with fuzzy matching enabled.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + java.util.List + getConfidenceLevelMetricsList(); + /** + * + * + *
+     * Metrics across confidence levels with fuzzy matching enabled.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics getConfidenceLevelMetrics( + int index); + /** + * + * + *
+     * Metrics across confidence levels with fuzzy matching enabled.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + int getConfidenceLevelMetricsCount(); + /** + * + * + *
+     * Metrics across confidence levels with fuzzy matching enabled.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder> + getConfidenceLevelMetricsOrBuilderList(); + /** + * + * + *
+     * Metrics across confidence levels with fuzzy matching enabled.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder + getConfidenceLevelMetricsOrBuilder(int index); + + /** + * + * + *
+     * Metrics across confidence levels with only exact matching.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + java.util.List + getConfidenceLevelMetricsExactList(); + /** + * + * + *
+     * Metrics across confidence levels with only exact matching.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + getConfidenceLevelMetricsExact(int index); + /** + * + * + *
+     * Metrics across confidence levels with only exact matching.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + int getConfidenceLevelMetricsExactCount(); + /** + * + * + *
+     * Metrics across confidence levels with only exact matching.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder> + getConfidenceLevelMetricsExactOrBuilderList(); + /** + * + * + *
+     * Metrics across confidence levels with only exact matching.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder + getConfidenceLevelMetricsExactOrBuilder(int index); + + /** + * + * + *
+     * The calculated area under the precision recall curve (AUPRC), computed by
+     * integrating over all confidence thresholds.
+     * 
+ * + * float auprc = 2; + * + * @return The auprc. + */ + float getAuprc(); + + /** + * + * + *
+     * The Estimated Calibration Error (ECE) of the confidence of the predicted
+     * entities.
+     * 
+ * + * float estimated_calibration_error = 3; + * + * @return The estimatedCalibrationError. + */ + float getEstimatedCalibrationError(); + + /** + * + * + *
+     * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching
+     * only.
+     * 
+ * + * float auprc_exact = 5; + * + * @return The auprcExact. + */ + float getAuprcExact(); + + /** + * + * + *
+     * The ECE for the predicted entities with fuzzy matching disabled, i.e.,
+     * exact matching only.
+     * 
+ * + * float estimated_calibration_error_exact = 6; + * + * @return The estimatedCalibrationErrorExact. + */ + float getEstimatedCalibrationErrorExact(); + + /** + * + * + *
+     * The metrics type for the label.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; + * + * + * @return The enum numeric value on the wire for metricsType. + */ + int getMetricsTypeValue(); + /** + * + * + *
+     * The metrics type for the label.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; + * + * + * @return The metricsType. + */ + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType + getMetricsType(); + } + /** + * + * + *
+   * Metrics across multiple confidence levels.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics} + */ + public static final class MultiConfidenceMetrics extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics) + MultiConfidenceMetricsOrBuilder { + private static final long serialVersionUID = 0L; + // Use MultiConfidenceMetrics.newBuilder() to construct. + private MultiConfidenceMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MultiConfidenceMetrics() { + confidenceLevelMetrics_ = java.util.Collections.emptyList(); + confidenceLevelMetricsExact_ = java.util.Collections.emptyList(); + metricsType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MultiConfidenceMetrics(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_MultiConfidenceMetrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_MultiConfidenceMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.class, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.Builder.class); + } + + /** + * + * + *
+     * A type that determines how metrics should be interpreted.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType} + */ + public enum MetricsType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The metrics type is unspecified. By default, metrics without a
+       * particular specification are for leaf entity types (i.e., top-level
+       * entity types without child types, or child types which are not
+       * parent types themselves).
+       * 
+ * + * METRICS_TYPE_UNSPECIFIED = 0; + */ + METRICS_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Indicates whether metrics for this particular label type represent an
+       * aggregate of metrics for other types instead of being based on actual
+       * TP/FP/FN values for the label type. Metrics for parent (i.e., non-leaf)
+       * entity types are an aggregate of metrics for their children.
+       * 
+ * + * AGGREGATE = 1; + */ + AGGREGATE(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The metrics type is unspecified. By default, metrics without a
+       * particular specification are for leaf entity types (i.e., top-level
+       * entity types without child types, or child types which are not
+       * parent types themselves).
+       * 
+ * + * METRICS_TYPE_UNSPECIFIED = 0; + */ + public static final int METRICS_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Indicates whether metrics for this particular label type represent an
+       * aggregate of metrics for other types instead of being based on actual
+       * TP/FP/FN values for the label type. Metrics for parent (i.e., non-leaf)
+       * entity types are an aggregate of metrics for their children.
+       * 
+ * + * AGGREGATE = 1; + */ + public static final int AGGREGATE_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetricsType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MetricsType forNumber(int value) { + switch (value) { + case 0: + return METRICS_TYPE_UNSPECIFIED; + case 1: + return AGGREGATE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetricsType findValueByNumber(int number) { + return MetricsType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final MetricsType[] VALUES = values(); + + public static MetricsType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MetricsType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType) + } + + public static final int CONFIDENCE_LEVEL_METRICS_FIELD_NUMBER = 1; + private java.util.List + confidenceLevelMetrics_; + /** + * + * + *
+     * Metrics across confidence levels with fuzzy matching enabled.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + @java.lang.Override + public java.util.List + getConfidenceLevelMetricsList() { + return confidenceLevelMetrics_; + } + /** + * + * + *
+     * Metrics across confidence levels with fuzzy matching enabled.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder> + getConfidenceLevelMetricsOrBuilderList() { + return confidenceLevelMetrics_; + } + /** + * + * + *
+     * Metrics across confidence levels with fuzzy matching enabled.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + @java.lang.Override + public int getConfidenceLevelMetricsCount() { + return confidenceLevelMetrics_.size(); + } + /** + * + * + *
+     * Metrics across confidence levels with fuzzy matching enabled.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + getConfidenceLevelMetrics(int index) { + return confidenceLevelMetrics_.get(index); + } + /** + * + * + *
+     * Metrics across confidence levels with fuzzy matching enabled.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder + getConfidenceLevelMetricsOrBuilder(int index) { + return confidenceLevelMetrics_.get(index); + } + + public static final int CONFIDENCE_LEVEL_METRICS_EXACT_FIELD_NUMBER = 4; + private java.util.List + confidenceLevelMetricsExact_; + /** + * + * + *
+     * Metrics across confidence levels with only exact matching.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + @java.lang.Override + public java.util.List + getConfidenceLevelMetricsExactList() { + return confidenceLevelMetricsExact_; + } + /** + * + * + *
+     * Metrics across confidence levels with only exact matching.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder> + getConfidenceLevelMetricsExactOrBuilderList() { + return confidenceLevelMetricsExact_; + } + /** + * + * + *
+     * Metrics across confidence levels with only exact matching.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + @java.lang.Override + public int getConfidenceLevelMetricsExactCount() { + return confidenceLevelMetricsExact_.size(); + } + /** + * + * + *
+     * Metrics across confidence levels with only exact matching.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + getConfidenceLevelMetricsExact(int index) { + return confidenceLevelMetricsExact_.get(index); + } + /** + * + * + *
+     * Metrics across confidence levels with only exact matching.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder + getConfidenceLevelMetricsExactOrBuilder(int index) { + return confidenceLevelMetricsExact_.get(index); + } + + public static final int AUPRC_FIELD_NUMBER = 2; + private float auprc_; + /** + * + * + *
+     * The calculated area under the precision recall curve (AUPRC), computed by
+     * integrating over all confidence thresholds.
+     * 
+ * + * float auprc = 2; + * + * @return The auprc. + */ + @java.lang.Override + public float getAuprc() { + return auprc_; + } + + public static final int ESTIMATED_CALIBRATION_ERROR_FIELD_NUMBER = 3; + private float estimatedCalibrationError_; + /** + * + * + *
+     * The Estimated Calibration Error (ECE) of the confidence of the predicted
+     * entities.
+     * 
+ * + * float estimated_calibration_error = 3; + * + * @return The estimatedCalibrationError. + */ + @java.lang.Override + public float getEstimatedCalibrationError() { + return estimatedCalibrationError_; + } + + public static final int AUPRC_EXACT_FIELD_NUMBER = 5; + private float auprcExact_; + /** + * + * + *
+     * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching
+     * only.
+     * 
+ * + * float auprc_exact = 5; + * + * @return The auprcExact. + */ + @java.lang.Override + public float getAuprcExact() { + return auprcExact_; + } + + public static final int ESTIMATED_CALIBRATION_ERROR_EXACT_FIELD_NUMBER = 6; + private float estimatedCalibrationErrorExact_; + /** + * + * + *
+     * The ECE for the predicted entities with fuzzy matching disabled, i.e.,
+     * exact matching only.
+     * 
+ * + * float estimated_calibration_error_exact = 6; + * + * @return The estimatedCalibrationErrorExact. + */ + @java.lang.Override + public float getEstimatedCalibrationErrorExact() { + return estimatedCalibrationErrorExact_; + } + + public static final int METRICS_TYPE_FIELD_NUMBER = 7; + private int metricsType_; + /** + * + * + *
+     * The metrics type for the label.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; + * + * + * @return The enum numeric value on the wire for metricsType. + */ + @java.lang.Override + public int getMetricsTypeValue() { + return metricsType_; + } + /** + * + * + *
+     * The metrics type for the label.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; + * + * + * @return The metricsType. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType + getMetricsType() { + @SuppressWarnings("deprecation") + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType result = + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType.valueOf( + metricsType_); + return result == null + ? com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType + .UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < confidenceLevelMetrics_.size(); i++) { + output.writeMessage(1, confidenceLevelMetrics_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(auprc_) != 0) { + output.writeFloat(2, auprc_); + } + if (java.lang.Float.floatToRawIntBits(estimatedCalibrationError_) != 0) { + output.writeFloat(3, estimatedCalibrationError_); + } + for (int i = 0; i < confidenceLevelMetricsExact_.size(); i++) { + output.writeMessage(4, confidenceLevelMetricsExact_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(auprcExact_) != 0) { + output.writeFloat(5, auprcExact_); + } + if (java.lang.Float.floatToRawIntBits(estimatedCalibrationErrorExact_) != 0) { + output.writeFloat(6, estimatedCalibrationErrorExact_); + } + if (metricsType_ + != com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType + .METRICS_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, metricsType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < confidenceLevelMetrics_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, confidenceLevelMetrics_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(auprc_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, auprc_); + } + if (java.lang.Float.floatToRawIntBits(estimatedCalibrationError_) != 0) { + size += + com.google.protobuf.CodedOutputStream.computeFloatSize(3, estimatedCalibrationError_); + } + for (int i = 0; i < confidenceLevelMetricsExact_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, confidenceLevelMetricsExact_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(auprcExact_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, auprcExact_); + } + if (java.lang.Float.floatToRawIntBits(estimatedCalibrationErrorExact_) != 0) { + size += + com.google.protobuf.CodedOutputStream.computeFloatSize( + 6, estimatedCalibrationErrorExact_); + } + if (metricsType_ + != com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType + .METRICS_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, metricsType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics other = + (com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics) obj; + + if (!getConfidenceLevelMetricsList().equals(other.getConfidenceLevelMetricsList())) + return false; + if (!getConfidenceLevelMetricsExactList().equals(other.getConfidenceLevelMetricsExactList())) + return false; + if (java.lang.Float.floatToIntBits(getAuprc()) + != java.lang.Float.floatToIntBits(other.getAuprc())) return false; + if (java.lang.Float.floatToIntBits(getEstimatedCalibrationError()) + != java.lang.Float.floatToIntBits(other.getEstimatedCalibrationError())) return false; + if (java.lang.Float.floatToIntBits(getAuprcExact()) + != java.lang.Float.floatToIntBits(other.getAuprcExact())) return false; + if (java.lang.Float.floatToIntBits(getEstimatedCalibrationErrorExact()) + != java.lang.Float.floatToIntBits(other.getEstimatedCalibrationErrorExact())) + return false; + if (metricsType_ != other.metricsType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConfidenceLevelMetricsCount() > 0) { + hash = (37 * hash) + CONFIDENCE_LEVEL_METRICS_FIELD_NUMBER; + hash = (53 * hash) + getConfidenceLevelMetricsList().hashCode(); + } + if (getConfidenceLevelMetricsExactCount() > 0) { + hash = (37 * hash) + CONFIDENCE_LEVEL_METRICS_EXACT_FIELD_NUMBER; + hash = (53 * hash) + getConfidenceLevelMetricsExactList().hashCode(); + } + hash = (37 * hash) + AUPRC_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getAuprc()); + hash = (37 * hash) + ESTIMATED_CALIBRATION_ERROR_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getEstimatedCalibrationError()); + hash = (37 * hash) + AUPRC_EXACT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getAuprcExact()); + hash = (37 * hash) + ESTIMATED_CALIBRATION_ERROR_EXACT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getEstimatedCalibrationErrorExact()); + hash = (37 * hash) + METRICS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + metricsType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Metrics across multiple confidence levels.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics) + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetricsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_MultiConfidenceMetrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_MultiConfidenceMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.class, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.Builder + .class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (confidenceLevelMetricsBuilder_ == null) { + confidenceLevelMetrics_ = java.util.Collections.emptyList(); + } else { + confidenceLevelMetrics_ = null; + confidenceLevelMetricsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (confidenceLevelMetricsExactBuilder_ == null) { + confidenceLevelMetricsExact_ = java.util.Collections.emptyList(); + } else { + confidenceLevelMetricsExact_ = null; + confidenceLevelMetricsExactBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + auprc_ = 0F; + + estimatedCalibrationError_ = 0F; + + auprcExact_ = 0F; + + estimatedCalibrationErrorExact_ = 0F; + + metricsType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_MultiConfidenceMetrics_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics build() { + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics buildPartial() { + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics result = + new com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics(this); + int from_bitField0_ = bitField0_; + if (confidenceLevelMetricsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + confidenceLevelMetrics_ = + java.util.Collections.unmodifiableList(confidenceLevelMetrics_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.confidenceLevelMetrics_ = confidenceLevelMetrics_; + } else { + result.confidenceLevelMetrics_ = confidenceLevelMetricsBuilder_.build(); + } + if (confidenceLevelMetricsExactBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + confidenceLevelMetricsExact_ = + java.util.Collections.unmodifiableList(confidenceLevelMetricsExact_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.confidenceLevelMetricsExact_ = confidenceLevelMetricsExact_; + } else { + result.confidenceLevelMetricsExact_ = confidenceLevelMetricsExactBuilder_.build(); + } + result.auprc_ = auprc_; + result.estimatedCalibrationError_ = estimatedCalibrationError_; + result.auprcExact_ = auprcExact_; + result.estimatedCalibrationErrorExact_ = estimatedCalibrationErrorExact_; + result.metricsType_ = metricsType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics other) { + if (other + == com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + .getDefaultInstance()) return this; + if (confidenceLevelMetricsBuilder_ == null) { + if (!other.confidenceLevelMetrics_.isEmpty()) { + if (confidenceLevelMetrics_.isEmpty()) { + confidenceLevelMetrics_ = other.confidenceLevelMetrics_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConfidenceLevelMetricsIsMutable(); + confidenceLevelMetrics_.addAll(other.confidenceLevelMetrics_); + } + onChanged(); + } + } else { + if (!other.confidenceLevelMetrics_.isEmpty()) { + if (confidenceLevelMetricsBuilder_.isEmpty()) { + confidenceLevelMetricsBuilder_.dispose(); + confidenceLevelMetricsBuilder_ = null; + confidenceLevelMetrics_ = other.confidenceLevelMetrics_; + bitField0_ = (bitField0_ & ~0x00000001); + confidenceLevelMetricsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConfidenceLevelMetricsFieldBuilder() + : null; + } else { + confidenceLevelMetricsBuilder_.addAllMessages(other.confidenceLevelMetrics_); + } + } + } + if (confidenceLevelMetricsExactBuilder_ == null) { + if (!other.confidenceLevelMetricsExact_.isEmpty()) { + if (confidenceLevelMetricsExact_.isEmpty()) { + confidenceLevelMetricsExact_ = other.confidenceLevelMetricsExact_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureConfidenceLevelMetricsExactIsMutable(); + confidenceLevelMetricsExact_.addAll(other.confidenceLevelMetricsExact_); + } + onChanged(); + } + } else { + if (!other.confidenceLevelMetricsExact_.isEmpty()) { + if (confidenceLevelMetricsExactBuilder_.isEmpty()) { + confidenceLevelMetricsExactBuilder_.dispose(); + confidenceLevelMetricsExactBuilder_ = null; + confidenceLevelMetricsExact_ = other.confidenceLevelMetricsExact_; + bitField0_ = (bitField0_ & ~0x00000002); + confidenceLevelMetricsExactBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConfidenceLevelMetricsExactFieldBuilder() + : null; + } else { + confidenceLevelMetricsExactBuilder_.addAllMessages( + other.confidenceLevelMetricsExact_); + } + } + } + if (other.getAuprc() != 0F) { + setAuprc(other.getAuprc()); + } + if (other.getEstimatedCalibrationError() != 0F) { + setEstimatedCalibrationError(other.getEstimatedCalibrationError()); + } + if (other.getAuprcExact() != 0F) { + setAuprcExact(other.getAuprcExact()); + } + if (other.getEstimatedCalibrationErrorExact() != 0F) { + setEstimatedCalibrationErrorExact(other.getEstimatedCalibrationErrorExact()); + } + if (other.metricsType_ != 0) { + setMetricsTypeValue(other.getMetricsTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics m = + input.readMessage( + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + .parser(), + extensionRegistry); + if (confidenceLevelMetricsBuilder_ == null) { + ensureConfidenceLevelMetricsIsMutable(); + confidenceLevelMetrics_.add(m); + } else { + confidenceLevelMetricsBuilder_.addMessage(m); + } + break; + } // case 10 + case 21: + { + auprc_ = input.readFloat(); + + break; + } // case 21 + case 29: + { + estimatedCalibrationError_ = input.readFloat(); + + break; + } // case 29 + case 34: + { + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics m = + input.readMessage( + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + .parser(), + extensionRegistry); + if (confidenceLevelMetricsExactBuilder_ == null) { + ensureConfidenceLevelMetricsExactIsMutable(); + confidenceLevelMetricsExact_.add(m); + } else { + confidenceLevelMetricsExactBuilder_.addMessage(m); + } + break; + } // case 34 + case 45: + { + auprcExact_ = input.readFloat(); + + break; + } // case 45 + case 53: + { + estimatedCalibrationErrorExact_ = input.readFloat(); + + break; + } // case 53 + case 56: + { + metricsType_ = input.readEnum(); + + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + confidenceLevelMetrics_ = java.util.Collections.emptyList(); + + private void ensureConfidenceLevelMetricsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + confidenceLevelMetrics_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics>( + confidenceLevelMetrics_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder> + confidenceLevelMetricsBuilder_; + + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public java.util.List + getConfidenceLevelMetricsList() { + if (confidenceLevelMetricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(confidenceLevelMetrics_); + } else { + return confidenceLevelMetricsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public int getConfidenceLevelMetricsCount() { + if (confidenceLevelMetricsBuilder_ == null) { + return confidenceLevelMetrics_.size(); + } else { + return confidenceLevelMetricsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + getConfidenceLevelMetrics(int index) { + if (confidenceLevelMetricsBuilder_ == null) { + return confidenceLevelMetrics_.get(index); + } else { + return confidenceLevelMetricsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public Builder setConfidenceLevelMetrics( + int index, com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics value) { + if (confidenceLevelMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfidenceLevelMetricsIsMutable(); + confidenceLevelMetrics_.set(index, value); + onChanged(); + } else { + confidenceLevelMetricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public Builder setConfidenceLevelMetrics( + int index, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder + builderForValue) { + if (confidenceLevelMetricsBuilder_ == null) { + ensureConfidenceLevelMetricsIsMutable(); + confidenceLevelMetrics_.set(index, builderForValue.build()); + onChanged(); + } else { + confidenceLevelMetricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public Builder addConfidenceLevelMetrics( + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics value) { + if (confidenceLevelMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfidenceLevelMetricsIsMutable(); + confidenceLevelMetrics_.add(value); + onChanged(); + } else { + confidenceLevelMetricsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public Builder addConfidenceLevelMetrics( + int index, com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics value) { + if (confidenceLevelMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfidenceLevelMetricsIsMutable(); + confidenceLevelMetrics_.add(index, value); + onChanged(); + } else { + confidenceLevelMetricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public Builder addConfidenceLevelMetrics( + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder + builderForValue) { + if (confidenceLevelMetricsBuilder_ == null) { + ensureConfidenceLevelMetricsIsMutable(); + confidenceLevelMetrics_.add(builderForValue.build()); + onChanged(); + } else { + confidenceLevelMetricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public Builder addConfidenceLevelMetrics( + int index, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder + builderForValue) { + if (confidenceLevelMetricsBuilder_ == null) { + ensureConfidenceLevelMetricsIsMutable(); + confidenceLevelMetrics_.add(index, builderForValue.build()); + onChanged(); + } else { + confidenceLevelMetricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public Builder addAllConfidenceLevelMetrics( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics> + values) { + if (confidenceLevelMetricsBuilder_ == null) { + ensureConfidenceLevelMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, confidenceLevelMetrics_); + onChanged(); + } else { + confidenceLevelMetricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public Builder clearConfidenceLevelMetrics() { + if (confidenceLevelMetricsBuilder_ == null) { + confidenceLevelMetrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + confidenceLevelMetricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public Builder removeConfidenceLevelMetrics(int index) { + if (confidenceLevelMetricsBuilder_ == null) { + ensureConfidenceLevelMetricsIsMutable(); + confidenceLevelMetrics_.remove(index); + onChanged(); + } else { + confidenceLevelMetricsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder + getConfidenceLevelMetricsBuilder(int index) { + return getConfidenceLevelMetricsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder + getConfidenceLevelMetricsOrBuilder(int index) { + if (confidenceLevelMetricsBuilder_ == null) { + return confidenceLevelMetrics_.get(index); + } else { + return confidenceLevelMetricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder> + getConfidenceLevelMetricsOrBuilderList() { + if (confidenceLevelMetricsBuilder_ != null) { + return confidenceLevelMetricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(confidenceLevelMetrics_); + } + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder + addConfidenceLevelMetricsBuilder() { + return getConfidenceLevelMetricsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + .getDefaultInstance()); + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder + addConfidenceLevelMetricsBuilder(int index) { + return getConfidenceLevelMetricsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + .getDefaultInstance()); + } + /** + * + * + *
+       * Metrics across confidence levels with fuzzy matching enabled.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder> + getConfidenceLevelMetricsBuilderList() { + return getConfidenceLevelMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder> + getConfidenceLevelMetricsFieldBuilder() { + if (confidenceLevelMetricsBuilder_ == null) { + confidenceLevelMetricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder>( + confidenceLevelMetrics_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + confidenceLevelMetrics_ = null; + } + return confidenceLevelMetricsBuilder_; + } + + private java.util.List + confidenceLevelMetricsExact_ = java.util.Collections.emptyList(); + + private void ensureConfidenceLevelMetricsExactIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + confidenceLevelMetricsExact_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics>( + confidenceLevelMetricsExact_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder> + confidenceLevelMetricsExactBuilder_; + + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public java.util.List + getConfidenceLevelMetricsExactList() { + if (confidenceLevelMetricsExactBuilder_ == null) { + return java.util.Collections.unmodifiableList(confidenceLevelMetricsExact_); + } else { + return confidenceLevelMetricsExactBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public int getConfidenceLevelMetricsExactCount() { + if (confidenceLevelMetricsExactBuilder_ == null) { + return confidenceLevelMetricsExact_.size(); + } else { + return confidenceLevelMetricsExactBuilder_.getCount(); + } + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + getConfidenceLevelMetricsExact(int index) { + if (confidenceLevelMetricsExactBuilder_ == null) { + return confidenceLevelMetricsExact_.get(index); + } else { + return confidenceLevelMetricsExactBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public Builder setConfidenceLevelMetricsExact( + int index, com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics value) { + if (confidenceLevelMetricsExactBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfidenceLevelMetricsExactIsMutable(); + confidenceLevelMetricsExact_.set(index, value); + onChanged(); + } else { + confidenceLevelMetricsExactBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public Builder setConfidenceLevelMetricsExact( + int index, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder + builderForValue) { + if (confidenceLevelMetricsExactBuilder_ == null) { + ensureConfidenceLevelMetricsExactIsMutable(); + confidenceLevelMetricsExact_.set(index, builderForValue.build()); + onChanged(); + } else { + confidenceLevelMetricsExactBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public Builder addConfidenceLevelMetricsExact( + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics value) { + if (confidenceLevelMetricsExactBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfidenceLevelMetricsExactIsMutable(); + confidenceLevelMetricsExact_.add(value); + onChanged(); + } else { + confidenceLevelMetricsExactBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public Builder addConfidenceLevelMetricsExact( + int index, com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics value) { + if (confidenceLevelMetricsExactBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfidenceLevelMetricsExactIsMutable(); + confidenceLevelMetricsExact_.add(index, value); + onChanged(); + } else { + confidenceLevelMetricsExactBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public Builder addConfidenceLevelMetricsExact( + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder + builderForValue) { + if (confidenceLevelMetricsExactBuilder_ == null) { + ensureConfidenceLevelMetricsExactIsMutable(); + confidenceLevelMetricsExact_.add(builderForValue.build()); + onChanged(); + } else { + confidenceLevelMetricsExactBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public Builder addConfidenceLevelMetricsExact( + int index, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder + builderForValue) { + if (confidenceLevelMetricsExactBuilder_ == null) { + ensureConfidenceLevelMetricsExactIsMutable(); + confidenceLevelMetricsExact_.add(index, builderForValue.build()); + onChanged(); + } else { + confidenceLevelMetricsExactBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public Builder addAllConfidenceLevelMetricsExact( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics> + values) { + if (confidenceLevelMetricsExactBuilder_ == null) { + ensureConfidenceLevelMetricsExactIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, confidenceLevelMetricsExact_); + onChanged(); + } else { + confidenceLevelMetricsExactBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public Builder clearConfidenceLevelMetricsExact() { + if (confidenceLevelMetricsExactBuilder_ == null) { + confidenceLevelMetricsExact_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + confidenceLevelMetricsExactBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public Builder removeConfidenceLevelMetricsExact(int index) { + if (confidenceLevelMetricsExactBuilder_ == null) { + ensureConfidenceLevelMetricsExactIsMutable(); + confidenceLevelMetricsExact_.remove(index); + onChanged(); + } else { + confidenceLevelMetricsExactBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder + getConfidenceLevelMetricsExactBuilder(int index) { + return getConfidenceLevelMetricsExactFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder + getConfidenceLevelMetricsExactOrBuilder(int index) { + if (confidenceLevelMetricsExactBuilder_ == null) { + return confidenceLevelMetricsExact_.get(index); + } else { + return confidenceLevelMetricsExactBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder> + getConfidenceLevelMetricsExactOrBuilderList() { + if (confidenceLevelMetricsExactBuilder_ != null) { + return confidenceLevelMetricsExactBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(confidenceLevelMetricsExact_); + } + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder + addConfidenceLevelMetricsExactBuilder() { + return getConfidenceLevelMetricsExactFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + .getDefaultInstance()); + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder + addConfidenceLevelMetricsExactBuilder(int index) { + return getConfidenceLevelMetricsExactFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics + .getDefaultInstance()); + } + /** + * + * + *
+       * Metrics across confidence levels with only exact matching.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder> + getConfidenceLevelMetricsExactBuilderList() { + return getConfidenceLevelMetricsExactFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder> + getConfidenceLevelMetricsExactFieldBuilder() { + if (confidenceLevelMetricsExactBuilder_ == null) { + confidenceLevelMetricsExactBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetrics.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.ConfidenceLevelMetricsOrBuilder>( + confidenceLevelMetricsExact_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + confidenceLevelMetricsExact_ = null; + } + return confidenceLevelMetricsExactBuilder_; + } + + private float auprc_; + /** + * + * + *
+       * The calculated area under the precision recall curve (AUPRC), computed by
+       * integrating over all confidence thresholds.
+       * 
+ * + * float auprc = 2; + * + * @return The auprc. + */ + @java.lang.Override + public float getAuprc() { + return auprc_; + } + /** + * + * + *
+       * The calculated area under the precision recall curve (AUPRC), computed by
+       * integrating over all confidence thresholds.
+       * 
+ * + * float auprc = 2; + * + * @param value The auprc to set. + * @return This builder for chaining. + */ + public Builder setAuprc(float value) { + + auprc_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The calculated area under the precision recall curve (AUPRC), computed by
+       * integrating over all confidence thresholds.
+       * 
+ * + * float auprc = 2; + * + * @return This builder for chaining. + */ + public Builder clearAuprc() { + + auprc_ = 0F; + onChanged(); + return this; + } + + private float estimatedCalibrationError_; + /** + * + * + *
+       * The Estimated Calibration Error (ECE) of the confidence of the predicted
+       * entities.
+       * 
+ * + * float estimated_calibration_error = 3; + * + * @return The estimatedCalibrationError. + */ + @java.lang.Override + public float getEstimatedCalibrationError() { + return estimatedCalibrationError_; + } + /** + * + * + *
+       * The Estimated Calibration Error (ECE) of the confidence of the predicted
+       * entities.
+       * 
+ * + * float estimated_calibration_error = 3; + * + * @param value The estimatedCalibrationError to set. + * @return This builder for chaining. + */ + public Builder setEstimatedCalibrationError(float value) { + + estimatedCalibrationError_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The Estimated Calibration Error (ECE) of the confidence of the predicted
+       * entities.
+       * 
+ * + * float estimated_calibration_error = 3; + * + * @return This builder for chaining. + */ + public Builder clearEstimatedCalibrationError() { + + estimatedCalibrationError_ = 0F; + onChanged(); + return this; + } + + private float auprcExact_; + /** + * + * + *
+       * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching
+       * only.
+       * 
+ * + * float auprc_exact = 5; + * + * @return The auprcExact. + */ + @java.lang.Override + public float getAuprcExact() { + return auprcExact_; + } + /** + * + * + *
+       * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching
+       * only.
+       * 
+ * + * float auprc_exact = 5; + * + * @param value The auprcExact to set. + * @return This builder for chaining. + */ + public Builder setAuprcExact(float value) { + + auprcExact_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching
+       * only.
+       * 
+ * + * float auprc_exact = 5; + * + * @return This builder for chaining. + */ + public Builder clearAuprcExact() { + + auprcExact_ = 0F; + onChanged(); + return this; + } + + private float estimatedCalibrationErrorExact_; + /** + * + * + *
+       * The ECE for the predicted entities with fuzzy matching disabled, i.e.,
+       * exact matching only.
+       * 
+ * + * float estimated_calibration_error_exact = 6; + * + * @return The estimatedCalibrationErrorExact. + */ + @java.lang.Override + public float getEstimatedCalibrationErrorExact() { + return estimatedCalibrationErrorExact_; + } + /** + * + * + *
+       * The ECE for the predicted entities with fuzzy matching disabled, i.e.,
+       * exact matching only.
+       * 
+ * + * float estimated_calibration_error_exact = 6; + * + * @param value The estimatedCalibrationErrorExact to set. + * @return This builder for chaining. + */ + public Builder setEstimatedCalibrationErrorExact(float value) { + + estimatedCalibrationErrorExact_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The ECE for the predicted entities with fuzzy matching disabled, i.e.,
+       * exact matching only.
+       * 
+ * + * float estimated_calibration_error_exact = 6; + * + * @return This builder for chaining. + */ + public Builder clearEstimatedCalibrationErrorExact() { + + estimatedCalibrationErrorExact_ = 0F; + onChanged(); + return this; + } + + private int metricsType_ = 0; + /** + * + * + *
+       * The metrics type for the label.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; + * + * + * @return The enum numeric value on the wire for metricsType. + */ + @java.lang.Override + public int getMetricsTypeValue() { + return metricsType_; + } + /** + * + * + *
+       * The metrics type for the label.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; + * + * + * @param value The enum numeric value on the wire for metricsType to set. + * @return This builder for chaining. + */ + public Builder setMetricsTypeValue(int value) { + + metricsType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The metrics type for the label.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; + * + * + * @return The metricsType. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType + getMetricsType() { + @SuppressWarnings("deprecation") + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType result = + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType + .valueOf(metricsType_); + return result == null + ? com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The metrics type for the label.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; + * + * + * @param value The metricsType to set. + * @return This builder for chaining. + */ + public Builder setMetricsType( + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType value) { + if (value == null) { + throw new NullPointerException(); + } + + metricsType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The metrics type for the label.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7; + * + * + * @return This builder for chaining. + */ + public Builder clearMetricsType() { + + metricsType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics) + private static final com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics(); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MultiConfidenceMetrics parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the evaluation.
+   * Format:
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the evaluation.
+   * Format:
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The time that the evaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * The time that the evaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The time that the evaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int DOCUMENT_COUNTERS_FIELD_NUMBER = 5; + private com.google.cloud.documentai.v1beta3.Evaluation.Counters documentCounters_; + /** + * + * + *
+   * Counters for the documents used in the evaluation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + * + * @return Whether the documentCounters field is set. + */ + @java.lang.Override + public boolean hasDocumentCounters() { + return documentCounters_ != null; + } + /** + * + * + *
+   * Counters for the documents used in the evaluation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + * + * @return The documentCounters. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.Counters getDocumentCounters() { + return documentCounters_ == null + ? com.google.cloud.documentai.v1beta3.Evaluation.Counters.getDefaultInstance() + : documentCounters_; + } + /** + * + * + *
+   * Counters for the documents used in the evaluation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.CountersOrBuilder + getDocumentCountersOrBuilder() { + return getDocumentCounters(); + } + + public static final int ALL_ENTITIES_METRICS_FIELD_NUMBER = 3; + private com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics allEntitiesMetrics_; + /** + * + * + *
+   * Metrics for all the entities in aggregate.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + * + * @return Whether the allEntitiesMetrics field is set. + */ + @java.lang.Override + public boolean hasAllEntitiesMetrics() { + return allEntitiesMetrics_ != null; + } + /** + * + * + *
+   * Metrics for all the entities in aggregate.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + * + * @return The allEntitiesMetrics. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + getAllEntitiesMetrics() { + return allEntitiesMetrics_ == null + ? com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.getDefaultInstance() + : allEntitiesMetrics_; + } + /** + * + * + *
+   * Metrics for all the entities in aggregate.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetricsOrBuilder + getAllEntitiesMetricsOrBuilder() { + return getAllEntitiesMetrics(); + } + + public static final int ENTITY_METRICS_FIELD_NUMBER = 4; + + private static final class EntityMetricsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_EntityMetricsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + .getDefaultInstance()); + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + entityMetrics_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + internalGetEntityMetrics() { + if (entityMetrics_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EntityMetricsDefaultEntryHolder.defaultEntry); + } + return entityMetrics_; + } + + public int getEntityMetricsCount() { + return internalGetEntityMetrics().getMap().size(); + } + /** + * + * + *
+   * Metrics across confidence levels, for different entities.
+   * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + @java.lang.Override + public boolean containsEntityMetrics(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetEntityMetrics().getMap().containsKey(key); + } + /** Use {@link #getEntityMetricsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + getEntityMetrics() { + return getEntityMetricsMap(); + } + /** + * + * + *
+   * Metrics across confidence levels, for different entities.
+   * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + getEntityMetricsMap() { + return internalGetEntityMetrics().getMap(); + } + /** + * + * + *
+   * Metrics across confidence levels, for different entities.
+   * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + getEntityMetricsOrDefault( + java.lang.String key, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + map = internalGetEntityMetrics().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Metrics across confidence levels, for different entities.
+   * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + getEntityMetricsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + map = internalGetEntityMetrics().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int KMS_KEY_NAME_FIELD_NUMBER = 6; + private volatile java.lang.Object kmsKeyName_; + /** + * + * + *
+   * The KMS key name used for encryption.
+   * 
+ * + * string kms_key_name = 6; + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } + } + /** + * + * + *
+   * The KMS key name used for encryption.
+   * 
+ * + * string kms_key_name = 6; + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KMS_KEY_VERSION_NAME_FIELD_NUMBER = 7; + private volatile java.lang.Object kmsKeyVersionName_; + /** + * + * + *
+   * The KMS key version with which data is encrypted.
+   * 
+ * + * string kms_key_version_name = 7; + * + * @return The kmsKeyVersionName. + */ + @java.lang.Override + public java.lang.String getKmsKeyVersionName() { + java.lang.Object ref = kmsKeyVersionName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyVersionName_ = s; + return s; + } + } + /** + * + * + *
+   * The KMS key version with which data is encrypted.
+   * 
+ * + * string kms_key_version_name = 7; + * + * @return The bytes for kmsKeyVersionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyVersionNameBytes() { + java.lang.Object ref = kmsKeyVersionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyVersionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (allEntitiesMetrics_ != null) { + output.writeMessage(3, getAllEntitiesMetrics()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetEntityMetrics(), EntityMetricsDefaultEntryHolder.defaultEntry, 4); + if (documentCounters_ != null) { + output.writeMessage(5, getDocumentCounters()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, kmsKeyName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyVersionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, kmsKeyVersionName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (allEntitiesMetrics_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAllEntitiesMetrics()); + } + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + entry : internalGetEntityMetrics().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + entityMetrics__ = + EntityMetricsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, entityMetrics__); + } + if (documentCounters_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDocumentCounters()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, kmsKeyName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyVersionName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, kmsKeyVersionName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.Evaluation)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Evaluation other = + (com.google.cloud.documentai.v1beta3.Evaluation) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasDocumentCounters() != other.hasDocumentCounters()) return false; + if (hasDocumentCounters()) { + if (!getDocumentCounters().equals(other.getDocumentCounters())) return false; + } + if (hasAllEntitiesMetrics() != other.hasAllEntitiesMetrics()) return false; + if (hasAllEntitiesMetrics()) { + if (!getAllEntitiesMetrics().equals(other.getAllEntitiesMetrics())) return false; + } + if (!internalGetEntityMetrics().equals(other.internalGetEntityMetrics())) return false; + if (!getKmsKeyName().equals(other.getKmsKeyName())) return false; + if (!getKmsKeyVersionName().equals(other.getKmsKeyVersionName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasDocumentCounters()) { + hash = (37 * hash) + DOCUMENT_COUNTERS_FIELD_NUMBER; + hash = (53 * hash) + getDocumentCounters().hashCode(); + } + if (hasAllEntitiesMetrics()) { + hash = (37 * hash) + ALL_ENTITIES_METRICS_FIELD_NUMBER; + hash = (53 * hash) + getAllEntitiesMetrics().hashCode(); + } + if (!internalGetEntityMetrics().getMap().isEmpty()) { + hash = (37 * hash) + ENTITY_METRICS_FIELD_NUMBER; + hash = (53 * hash) + internalGetEntityMetrics().hashCode(); + } + hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + hash = (37 * hash) + KMS_KEY_VERSION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyVersionName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Evaluation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.documentai.v1beta3.Evaluation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An evaluation of a ProcessorVersion's performance.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Evaluation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Evaluation) + com.google.cloud.documentai.v1beta3.EvaluationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetEntityMetrics(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableEntityMetrics(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Evaluation.class, + com.google.cloud.documentai.v1beta3.Evaluation.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.Evaluation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (documentCountersBuilder_ == null) { + documentCounters_ = null; + } else { + documentCounters_ = null; + documentCountersBuilder_ = null; + } + if (allEntitiesMetricsBuilder_ == null) { + allEntitiesMetrics_ = null; + } else { + allEntitiesMetrics_ = null; + allEntitiesMetricsBuilder_ = null; + } + internalGetMutableEntityMetrics().clear(); + kmsKeyName_ = ""; + + kmsKeyVersionName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiEvaluation + .internal_static_google_cloud_documentai_v1beta3_Evaluation_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Evaluation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation build() { + com.google.cloud.documentai.v1beta3.Evaluation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation buildPartial() { + com.google.cloud.documentai.v1beta3.Evaluation result = + new com.google.cloud.documentai.v1beta3.Evaluation(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (documentCountersBuilder_ == null) { + result.documentCounters_ = documentCounters_; + } else { + result.documentCounters_ = documentCountersBuilder_.build(); + } + if (allEntitiesMetricsBuilder_ == null) { + result.allEntitiesMetrics_ = allEntitiesMetrics_; + } else { + result.allEntitiesMetrics_ = allEntitiesMetricsBuilder_.build(); + } + result.entityMetrics_ = internalGetEntityMetrics(); + result.entityMetrics_.makeImmutable(); + result.kmsKeyName_ = kmsKeyName_; + result.kmsKeyVersionName_ = kmsKeyVersionName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.Evaluation) { + return mergeFrom((com.google.cloud.documentai.v1beta3.Evaluation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Evaluation other) { + if (other == com.google.cloud.documentai.v1beta3.Evaluation.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasDocumentCounters()) { + mergeDocumentCounters(other.getDocumentCounters()); + } + if (other.hasAllEntitiesMetrics()) { + mergeAllEntitiesMetrics(other.getAllEntitiesMetrics()); + } + internalGetMutableEntityMetrics().mergeFrom(other.internalGetEntityMetrics()); + if (!other.getKmsKeyName().isEmpty()) { + kmsKeyName_ = other.kmsKeyName_; + onChanged(); + } + if (!other.getKmsKeyVersionName().isEmpty()) { + kmsKeyVersionName_ = other.kmsKeyVersionName_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage( + getAllEntitiesMetricsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + entityMetrics__ = + input.readMessage( + EntityMetricsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableEntityMetrics() + .getMutableMap() + .put(entityMetrics__.getKey(), entityMetrics__.getValue()); + break; + } // case 34 + case 42: + { + input.readMessage( + getDocumentCountersFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + kmsKeyName_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + kmsKeyVersionName_ = input.readStringRequireUtf8(); + + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the evaluation.
+     * Format:
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the evaluation.
+     * Format:
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the evaluation.
+     * Format:
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the evaluation.
+     * Format:
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the evaluation.
+     * Format:
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * The time that the evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * The time that the evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time that the evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time that the evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time that the evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time that the evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time that the evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time that the evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The time that the evaluation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.cloud.documentai.v1beta3.Evaluation.Counters documentCounters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.Counters, + com.google.cloud.documentai.v1beta3.Evaluation.Counters.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.CountersOrBuilder> + documentCountersBuilder_; + /** + * + * + *
+     * Counters for the documents used in the evaluation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + * + * @return Whether the documentCounters field is set. + */ + public boolean hasDocumentCounters() { + return documentCountersBuilder_ != null || documentCounters_ != null; + } + /** + * + * + *
+     * Counters for the documents used in the evaluation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + * + * @return The documentCounters. + */ + public com.google.cloud.documentai.v1beta3.Evaluation.Counters getDocumentCounters() { + if (documentCountersBuilder_ == null) { + return documentCounters_ == null + ? com.google.cloud.documentai.v1beta3.Evaluation.Counters.getDefaultInstance() + : documentCounters_; + } else { + return documentCountersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Counters for the documents used in the evaluation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + */ + public Builder setDocumentCounters( + com.google.cloud.documentai.v1beta3.Evaluation.Counters value) { + if (documentCountersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + documentCounters_ = value; + onChanged(); + } else { + documentCountersBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Counters for the documents used in the evaluation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + */ + public Builder setDocumentCounters( + com.google.cloud.documentai.v1beta3.Evaluation.Counters.Builder builderForValue) { + if (documentCountersBuilder_ == null) { + documentCounters_ = builderForValue.build(); + onChanged(); + } else { + documentCountersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Counters for the documents used in the evaluation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + */ + public Builder mergeDocumentCounters( + com.google.cloud.documentai.v1beta3.Evaluation.Counters value) { + if (documentCountersBuilder_ == null) { + if (documentCounters_ != null) { + documentCounters_ = + com.google.cloud.documentai.v1beta3.Evaluation.Counters.newBuilder(documentCounters_) + .mergeFrom(value) + .buildPartial(); + } else { + documentCounters_ = value; + } + onChanged(); + } else { + documentCountersBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Counters for the documents used in the evaluation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + */ + public Builder clearDocumentCounters() { + if (documentCountersBuilder_ == null) { + documentCounters_ = null; + onChanged(); + } else { + documentCounters_ = null; + documentCountersBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Counters for the documents used in the evaluation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + */ + public com.google.cloud.documentai.v1beta3.Evaluation.Counters.Builder + getDocumentCountersBuilder() { + + onChanged(); + return getDocumentCountersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Counters for the documents used in the evaluation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + */ + public com.google.cloud.documentai.v1beta3.Evaluation.CountersOrBuilder + getDocumentCountersOrBuilder() { + if (documentCountersBuilder_ != null) { + return documentCountersBuilder_.getMessageOrBuilder(); + } else { + return documentCounters_ == null + ? com.google.cloud.documentai.v1beta3.Evaluation.Counters.getDefaultInstance() + : documentCounters_; + } + } + /** + * + * + *
+     * Counters for the documents used in the evaluation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.Counters, + com.google.cloud.documentai.v1beta3.Evaluation.Counters.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.CountersOrBuilder> + getDocumentCountersFieldBuilder() { + if (documentCountersBuilder_ == null) { + documentCountersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.Counters, + com.google.cloud.documentai.v1beta3.Evaluation.Counters.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.CountersOrBuilder>( + getDocumentCounters(), getParentForChildren(), isClean()); + documentCounters_ = null; + } + return documentCountersBuilder_; + } + + private com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + allEntitiesMetrics_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetricsOrBuilder> + allEntitiesMetricsBuilder_; + /** + * + * + *
+     * Metrics for all the entities in aggregate.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + * + * @return Whether the allEntitiesMetrics field is set. + */ + public boolean hasAllEntitiesMetrics() { + return allEntitiesMetricsBuilder_ != null || allEntitiesMetrics_ != null; + } + /** + * + * + *
+     * Metrics for all the entities in aggregate.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + * + * @return The allEntitiesMetrics. + */ + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + getAllEntitiesMetrics() { + if (allEntitiesMetricsBuilder_ == null) { + return allEntitiesMetrics_ == null + ? com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + .getDefaultInstance() + : allEntitiesMetrics_; + } else { + return allEntitiesMetricsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Metrics for all the entities in aggregate.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + */ + public Builder setAllEntitiesMetrics( + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics value) { + if (allEntitiesMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + allEntitiesMetrics_ = value; + onChanged(); + } else { + allEntitiesMetricsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Metrics for all the entities in aggregate.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + */ + public Builder setAllEntitiesMetrics( + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.Builder + builderForValue) { + if (allEntitiesMetricsBuilder_ == null) { + allEntitiesMetrics_ = builderForValue.build(); + onChanged(); + } else { + allEntitiesMetricsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Metrics for all the entities in aggregate.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + */ + public Builder mergeAllEntitiesMetrics( + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics value) { + if (allEntitiesMetricsBuilder_ == null) { + if (allEntitiesMetrics_ != null) { + allEntitiesMetrics_ = + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.newBuilder( + allEntitiesMetrics_) + .mergeFrom(value) + .buildPartial(); + } else { + allEntitiesMetrics_ = value; + } + onChanged(); + } else { + allEntitiesMetricsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Metrics for all the entities in aggregate.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + */ + public Builder clearAllEntitiesMetrics() { + if (allEntitiesMetricsBuilder_ == null) { + allEntitiesMetrics_ = null; + onChanged(); + } else { + allEntitiesMetrics_ = null; + allEntitiesMetricsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Metrics for all the entities in aggregate.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + */ + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.Builder + getAllEntitiesMetricsBuilder() { + + onChanged(); + return getAllEntitiesMetricsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Metrics for all the entities in aggregate.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + */ + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetricsOrBuilder + getAllEntitiesMetricsOrBuilder() { + if (allEntitiesMetricsBuilder_ != null) { + return allEntitiesMetricsBuilder_.getMessageOrBuilder(); + } else { + return allEntitiesMetrics_ == null + ? com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + .getDefaultInstance() + : allEntitiesMetrics_; + } + } + /** + * + * + *
+     * Metrics for all the entities in aggregate.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetricsOrBuilder> + getAllEntitiesMetricsFieldBuilder() { + if (allEntitiesMetricsBuilder_ == null) { + allEntitiesMetricsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.Builder, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetricsOrBuilder>( + getAllEntitiesMetrics(), getParentForChildren(), isClean()); + allEntitiesMetrics_ = null; + } + return allEntitiesMetricsBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + entityMetrics_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + internalGetEntityMetrics() { + if (entityMetrics_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EntityMetricsDefaultEntryHolder.defaultEntry); + } + return entityMetrics_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + internalGetMutableEntityMetrics() { + onChanged(); + ; + if (entityMetrics_ == null) { + entityMetrics_ = + com.google.protobuf.MapField.newMapField(EntityMetricsDefaultEntryHolder.defaultEntry); + } + if (!entityMetrics_.isMutable()) { + entityMetrics_ = entityMetrics_.copy(); + } + return entityMetrics_; + } + + public int getEntityMetricsCount() { + return internalGetEntityMetrics().getMap().size(); + } + /** + * + * + *
+     * Metrics across confidence levels, for different entities.
+     * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + @java.lang.Override + public boolean containsEntityMetrics(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetEntityMetrics().getMap().containsKey(key); + } + /** Use {@link #getEntityMetricsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + getEntityMetrics() { + return getEntityMetricsMap(); + } + /** + * + * + *
+     * Metrics across confidence levels, for different entities.
+     * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + getEntityMetricsMap() { + return internalGetEntityMetrics().getMap(); + } + /** + * + * + *
+     * Metrics across confidence levels, for different entities.
+     * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + getEntityMetricsOrDefault( + java.lang.String key, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + map = internalGetEntityMetrics().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Metrics across confidence levels, for different entities.
+     * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics + getEntityMetricsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + map = internalGetEntityMetrics().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearEntityMetrics() { + internalGetMutableEntityMetrics().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Metrics across confidence levels, for different entities.
+     * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + public Builder removeEntityMetrics(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableEntityMetrics().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + getMutableEntityMetrics() { + return internalGetMutableEntityMetrics().getMutableMap(); + } + /** + * + * + *
+     * Metrics across confidence levels, for different entities.
+     * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + public Builder putEntityMetrics( + java.lang.String key, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableEntityMetrics().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Metrics across confidence levels, for different entities.
+     * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + public Builder putAllEntityMetrics( + java.util.Map< + java.lang.String, + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + values) { + internalGetMutableEntityMetrics().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object kmsKeyName_ = ""; + /** + * + * + *
+     * The KMS key name used for encryption.
+     * 
+ * + * string kms_key_name = 6; + * + * @return The kmsKeyName. + */ + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The KMS key name used for encryption.
+     * 
+ * + * string kms_key_name = 6; + * + * @return The bytes for kmsKeyName. + */ + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The KMS key name used for encryption.
+     * 
+ * + * string kms_key_name = 6; + * + * @param value The kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKeyName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key name used for encryption.
+     * 
+ * + * string kms_key_name = 6; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyName() { + + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key name used for encryption.
+     * 
+ * + * string kms_key_name = 6; + * + * @param value The bytes for kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKeyName_ = value; + onChanged(); + return this; + } + + private java.lang.Object kmsKeyVersionName_ = ""; + /** + * + * + *
+     * The KMS key version with which data is encrypted.
+     * 
+ * + * string kms_key_version_name = 7; + * + * @return The kmsKeyVersionName. + */ + public java.lang.String getKmsKeyVersionName() { + java.lang.Object ref = kmsKeyVersionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyVersionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The KMS key version with which data is encrypted.
+     * 
+ * + * string kms_key_version_name = 7; + * + * @return The bytes for kmsKeyVersionName. + */ + public com.google.protobuf.ByteString getKmsKeyVersionNameBytes() { + java.lang.Object ref = kmsKeyVersionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyVersionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The KMS key version with which data is encrypted.
+     * 
+ * + * string kms_key_version_name = 7; + * + * @param value The kmsKeyVersionName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyVersionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKeyVersionName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key version with which data is encrypted.
+     * 
+ * + * string kms_key_version_name = 7; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyVersionName() { + + kmsKeyVersionName_ = getDefaultInstance().getKmsKeyVersionName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key version with which data is encrypted.
+     * 
+ * + * string kms_key_version_name = 7; + * + * @param value The bytes for kmsKeyVersionName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyVersionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKeyVersionName_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Evaluation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Evaluation) + private static final com.google.cloud.documentai.v1beta3.Evaluation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Evaluation(); + } + + public static com.google.cloud.documentai.v1beta3.Evaluation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Evaluation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluationName.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluationName.java new file mode 100644 index 000000000000..987f76f61bb2 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluationName.java @@ -0,0 +1,306 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class EvaluationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PROCESSOR_PROCESSOR_VERSION_EVALUATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String processor; + private final String processorVersion; + private final String evaluation; + + @Deprecated + protected EvaluationName() { + project = null; + location = null; + processor = null; + processorVersion = null; + evaluation = null; + } + + private EvaluationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + processor = Preconditions.checkNotNull(builder.getProcessor()); + processorVersion = Preconditions.checkNotNull(builder.getProcessorVersion()); + evaluation = Preconditions.checkNotNull(builder.getEvaluation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProcessor() { + return processor; + } + + public String getProcessorVersion() { + return processorVersion; + } + + public String getEvaluation() { + return evaluation; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static EvaluationName of( + String project, + String location, + String processor, + String processorVersion, + String evaluation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProcessor(processor) + .setProcessorVersion(processorVersion) + .setEvaluation(evaluation) + .build(); + } + + public static String format( + String project, + String location, + String processor, + String processorVersion, + String evaluation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProcessor(processor) + .setProcessorVersion(processorVersion) + .setEvaluation(evaluation) + .build() + .toString(); + } + + public static EvaluationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PROCESSOR_PROCESSOR_VERSION_EVALUATION.validatedMatch( + formattedString, "EvaluationName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("processor"), + matchMap.get("processor_version"), + matchMap.get("evaluation")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (EvaluationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PROCESSOR_PROCESSOR_VERSION_EVALUATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (processor != null) { + fieldMapBuilder.put("processor", processor); + } + if (processorVersion != null) { + fieldMapBuilder.put("processor_version", processorVersion); + } + if (evaluation != null) { + fieldMapBuilder.put("evaluation", evaluation); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PROCESSOR_PROCESSOR_VERSION_EVALUATION.instantiate( + "project", + project, + "location", + location, + "processor", + processor, + "processor_version", + processorVersion, + "evaluation", + evaluation); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + EvaluationName that = ((EvaluationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.processor, that.processor) + && Objects.equals(this.processorVersion, that.processorVersion) + && Objects.equals(this.evaluation, that.evaluation); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(processor); + h *= 1000003; + h ^= Objects.hashCode(processorVersion); + h *= 1000003; + h ^= Objects.hashCode(evaluation); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}. + */ + public static class Builder { + private String project; + private String location; + private String processor; + private String processorVersion; + private String evaluation; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProcessor() { + return processor; + } + + public String getProcessorVersion() { + return processorVersion; + } + + public String getEvaluation() { + return evaluation; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProcessor(String processor) { + this.processor = processor; + return this; + } + + public Builder setProcessorVersion(String processorVersion) { + this.processorVersion = processorVersion; + return this; + } + + public Builder setEvaluation(String evaluation) { + this.evaluation = evaluation; + return this; + } + + private Builder(EvaluationName evaluationName) { + this.project = evaluationName.project; + this.location = evaluationName.location; + this.processor = evaluationName.processor; + this.processorVersion = evaluationName.processorVersion; + this.evaluation = evaluationName.evaluation; + } + + public EvaluationName build() { + return new EvaluationName(this); + } + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluationOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluationOrBuilder.java new file mode 100644 index 000000000000..813b5067154d --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/EvaluationOrBuilder.java @@ -0,0 +1,290 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/evaluation.proto + +package com.google.cloud.documentai.v1beta3; + +public interface EvaluationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Evaluation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the evaluation.
+   * Format:
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the evaluation.
+   * Format:
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The time that the evaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The time that the evaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The time that the evaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Counters for the documents used in the evaluation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + * + * @return Whether the documentCounters field is set. + */ + boolean hasDocumentCounters(); + /** + * + * + *
+   * Counters for the documents used in the evaluation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + * + * @return The documentCounters. + */ + com.google.cloud.documentai.v1beta3.Evaluation.Counters getDocumentCounters(); + /** + * + * + *
+   * Counters for the documents used in the evaluation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.Evaluation.Counters document_counters = 5; + */ + com.google.cloud.documentai.v1beta3.Evaluation.CountersOrBuilder getDocumentCountersOrBuilder(); + + /** + * + * + *
+   * Metrics for all the entities in aggregate.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + * + * @return Whether the allEntitiesMetrics field is set. + */ + boolean hasAllEntitiesMetrics(); + /** + * + * + *
+   * Metrics for all the entities in aggregate.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + * + * @return The allEntitiesMetrics. + */ + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics getAllEntitiesMetrics(); + /** + * + * + *
+   * Metrics for all the entities in aggregate.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3; + * + */ + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetricsOrBuilder + getAllEntitiesMetricsOrBuilder(); + + /** + * + * + *
+   * Metrics across confidence levels, for different entities.
+   * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + int getEntityMetricsCount(); + /** + * + * + *
+   * Metrics across confidence levels, for different entities.
+   * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + boolean containsEntityMetrics(java.lang.String key); + /** Use {@link #getEntityMetricsMap()} instead. */ + @java.lang.Deprecated + java.util.Map< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + getEntityMetrics(); + /** + * + * + *
+   * Metrics across confidence levels, for different entities.
+   * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + java.util.Map< + java.lang.String, com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> + getEntityMetricsMap(); + /** + * + * + *
+   * Metrics across confidence levels, for different entities.
+   * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + + /* nullable */ + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics getEntityMetricsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics defaultValue); + /** + * + * + *
+   * Metrics across confidence levels, for different entities.
+   * 
+ * + * + * map<string, .google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics> entity_metrics = 4; + * + */ + com.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics getEntityMetricsOrThrow( + java.lang.String key); + + /** + * + * + *
+   * The KMS key name used for encryption.
+   * 
+ * + * string kms_key_name = 6; + * + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + /** + * + * + *
+   * The KMS key name used for encryption.
+   * 
+ * + * string kms_key_name = 6; + * + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString getKmsKeyNameBytes(); + + /** + * + * + *
+   * The KMS key version with which data is encrypted.
+   * 
+ * + * string kms_key_version_name = 7; + * + * @return The kmsKeyVersionName. + */ + java.lang.String getKmsKeyVersionName(); + /** + * + * + *
+   * The KMS key version with which data is encrypted.
+   * 
+ * + * string kms_key_version_name = 7; + * + * @return The bytes for kmsKeyVersionName. + */ + com.google.protobuf.ByteString getKmsKeyVersionNameBytes(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetEvaluationRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetEvaluationRequest.java new file mode 100644 index 000000000000..b243e1a128f9 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetEvaluationRequest.java @@ -0,0 +1,637 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * Retrieves a specific Evaluation.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.GetEvaluationRequest} + */ +public final class GetEvaluationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.GetEvaluationRequest) + GetEvaluationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetEvaluationRequest.newBuilder() to construct. + private GetEvaluationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetEvaluationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetEvaluationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_GetEvaluationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_GetEvaluationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.GetEvaluationRequest.class, + com.google.cloud.documentai.v1beta3.GetEvaluationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the [Evaluation][google.cloud.documentai.v1beta3.Evaluation] to get.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the [Evaluation][google.cloud.documentai.v1beta3.Evaluation] to get.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.GetEvaluationRequest)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.GetEvaluationRequest other = + (com.google.cloud.documentai.v1beta3.GetEvaluationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.GetEvaluationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.GetEvaluationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.GetEvaluationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.GetEvaluationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.GetEvaluationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.GetEvaluationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.GetEvaluationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.GetEvaluationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.GetEvaluationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.GetEvaluationRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.GetEvaluationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.GetEvaluationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.GetEvaluationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Retrieves a specific Evaluation.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.GetEvaluationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.GetEvaluationRequest) + com.google.cloud.documentai.v1beta3.GetEvaluationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_GetEvaluationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_GetEvaluationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.GetEvaluationRequest.class, + com.google.cloud.documentai.v1beta3.GetEvaluationRequest.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.GetEvaluationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_GetEvaluationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GetEvaluationRequest getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.GetEvaluationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GetEvaluationRequest build() { + com.google.cloud.documentai.v1beta3.GetEvaluationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GetEvaluationRequest buildPartial() { + com.google.cloud.documentai.v1beta3.GetEvaluationRequest result = + new com.google.cloud.documentai.v1beta3.GetEvaluationRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.GetEvaluationRequest) { + return mergeFrom((com.google.cloud.documentai.v1beta3.GetEvaluationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.GetEvaluationRequest other) { + if (other == com.google.cloud.documentai.v1beta3.GetEvaluationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the [Evaluation][google.cloud.documentai.v1beta3.Evaluation] to get.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the [Evaluation][google.cloud.documentai.v1beta3.Evaluation] to get.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the [Evaluation][google.cloud.documentai.v1beta3.Evaluation] to get.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the [Evaluation][google.cloud.documentai.v1beta3.Evaluation] to get.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the [Evaluation][google.cloud.documentai.v1beta3.Evaluation] to get.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.GetEvaluationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.GetEvaluationRequest) + private static final com.google.cloud.documentai.v1beta3.GetEvaluationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.GetEvaluationRequest(); + } + + public static com.google.cloud.documentai.v1beta3.GetEvaluationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetEvaluationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.GetEvaluationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetEvaluationRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetEvaluationRequestOrBuilder.java new file mode 100644 index 000000000000..132606bbf919 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/GetEvaluationRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface GetEvaluationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.GetEvaluationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the [Evaluation][google.cloud.documentai.v1beta3.Evaluation] to get.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the [Evaluation][google.cloud.documentai.v1beta3.Evaluation] to get.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListEvaluationsRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListEvaluationsRequest.java new file mode 100644 index 000000000000..2e3d1d12db58 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListEvaluationsRequest.java @@ -0,0 +1,921 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * Retrieves a list of evaluations for a given ProcessorVersion.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.ListEvaluationsRequest} + */ +public final class ListEvaluationsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.ListEvaluationsRequest) + ListEvaluationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEvaluationsRequest.newBuilder() to construct. + private ListEvaluationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEvaluationsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEvaluationsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ListEvaluationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ListEvaluationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest.class, + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to list evaluations for.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to list evaluations for.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * If unspecified, at most 5 evaluations will be returned.
+   * The maximum value is 100; values above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListEvaluations` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListEvaluations` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.ListEvaluationsRequest)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest other = + (com.google.cloud.documentai.v1beta3.ListEvaluationsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Retrieves a list of evaluations for a given ProcessorVersion.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.ListEvaluationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.ListEvaluationsRequest) + com.google.cloud.documentai.v1beta3.ListEvaluationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ListEvaluationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ListEvaluationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest.class, + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.ListEvaluationsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ListEvaluationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ListEvaluationsRequest getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.ListEvaluationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ListEvaluationsRequest build() { + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ListEvaluationsRequest buildPartial() { + com.google.cloud.documentai.v1beta3.ListEvaluationsRequest result = + new com.google.cloud.documentai.v1beta3.ListEvaluationsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.ListEvaluationsRequest) { + return mergeFrom((com.google.cloud.documentai.v1beta3.ListEvaluationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.ListEvaluationsRequest other) { + if (other == com.google.cloud.documentai.v1beta3.ListEvaluationsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to list evaluations for.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to list evaluations for.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to list evaluations for.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to list evaluations for.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to list evaluations for.
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * If unspecified, at most 5 evaluations will be returned.
+     * The maximum value is 100; values above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * If unspecified, at most 5 evaluations will be returned.
+     * The maximum value is 100; values above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * If unspecified, at most 5 evaluations will be returned.
+     * The maximum value is 100; values above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListEvaluations` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListEvaluations` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListEvaluations` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListEvaluations` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListEvaluations` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.ListEvaluationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.ListEvaluationsRequest) + private static final com.google.cloud.documentai.v1beta3.ListEvaluationsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.ListEvaluationsRequest(); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEvaluationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ListEvaluationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListEvaluationsRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListEvaluationsRequestOrBuilder.java new file mode 100644 index 000000000000..bab2a85464b5 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListEvaluationsRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface ListEvaluationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.ListEvaluationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to list evaluations for.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to list evaluations for.
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * If unspecified, at most 5 evaluations will be returned.
+   * The maximum value is 100; values above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListEvaluations` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListEvaluations` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListEvaluationsResponse.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListEvaluationsResponse.java new file mode 100644 index 000000000000..3b7e4811915d --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListEvaluationsResponse.java @@ -0,0 +1,1116 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * The response from ListEvaluations.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.ListEvaluationsResponse} + */ +public final class ListEvaluationsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.ListEvaluationsResponse) + ListEvaluationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEvaluationsResponse.newBuilder() to construct. + private ListEvaluationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEvaluationsResponse() { + evaluations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEvaluationsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ListEvaluationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ListEvaluationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse.class, + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse.Builder.class); + } + + public static final int EVALUATIONS_FIELD_NUMBER = 1; + private java.util.List evaluations_; + /** + * + * + *
+   * The evaluations requested.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + @java.lang.Override + public java.util.List getEvaluationsList() { + return evaluations_; + } + /** + * + * + *
+   * The evaluations requested.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + @java.lang.Override + public java.util.List + getEvaluationsOrBuilderList() { + return evaluations_; + } + /** + * + * + *
+   * The evaluations requested.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + @java.lang.Override + public int getEvaluationsCount() { + return evaluations_.size(); + } + /** + * + * + *
+   * The evaluations requested.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Evaluation getEvaluations(int index) { + return evaluations_.get(index); + } + /** + * + * + *
+   * The evaluations requested.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.EvaluationOrBuilder getEvaluationsOrBuilder( + int index) { + return evaluations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < evaluations_.size(); i++) { + output.writeMessage(1, evaluations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < evaluations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, evaluations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.ListEvaluationsResponse)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse other = + (com.google.cloud.documentai.v1beta3.ListEvaluationsResponse) obj; + + if (!getEvaluationsList().equals(other.getEvaluationsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEvaluationsCount() > 0) { + hash = (37 * hash) + EVALUATIONS_FIELD_NUMBER; + hash = (53 * hash) + getEvaluationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response from ListEvaluations.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.ListEvaluationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.ListEvaluationsResponse) + com.google.cloud.documentai.v1beta3.ListEvaluationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ListEvaluationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ListEvaluationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse.class, + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.ListEvaluationsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (evaluationsBuilder_ == null) { + evaluations_ = java.util.Collections.emptyList(); + } else { + evaluations_ = null; + evaluationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ListEvaluationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ListEvaluationsResponse getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.ListEvaluationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ListEvaluationsResponse build() { + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ListEvaluationsResponse buildPartial() { + com.google.cloud.documentai.v1beta3.ListEvaluationsResponse result = + new com.google.cloud.documentai.v1beta3.ListEvaluationsResponse(this); + int from_bitField0_ = bitField0_; + if (evaluationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + evaluations_ = java.util.Collections.unmodifiableList(evaluations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.evaluations_ = evaluations_; + } else { + result.evaluations_ = evaluationsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.ListEvaluationsResponse) { + return mergeFrom((com.google.cloud.documentai.v1beta3.ListEvaluationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.ListEvaluationsResponse other) { + if (other == com.google.cloud.documentai.v1beta3.ListEvaluationsResponse.getDefaultInstance()) + return this; + if (evaluationsBuilder_ == null) { + if (!other.evaluations_.isEmpty()) { + if (evaluations_.isEmpty()) { + evaluations_ = other.evaluations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEvaluationsIsMutable(); + evaluations_.addAll(other.evaluations_); + } + onChanged(); + } + } else { + if (!other.evaluations_.isEmpty()) { + if (evaluationsBuilder_.isEmpty()) { + evaluationsBuilder_.dispose(); + evaluationsBuilder_ = null; + evaluations_ = other.evaluations_; + bitField0_ = (bitField0_ & ~0x00000001); + evaluationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEvaluationsFieldBuilder() + : null; + } else { + evaluationsBuilder_.addAllMessages(other.evaluations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta3.Evaluation m = + input.readMessage( + com.google.cloud.documentai.v1beta3.Evaluation.parser(), extensionRegistry); + if (evaluationsBuilder_ == null) { + ensureEvaluationsIsMutable(); + evaluations_.add(m); + } else { + evaluationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List evaluations_ = + java.util.Collections.emptyList(); + + private void ensureEvaluationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + evaluations_ = + new java.util.ArrayList(evaluations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation, + com.google.cloud.documentai.v1beta3.Evaluation.Builder, + com.google.cloud.documentai.v1beta3.EvaluationOrBuilder> + evaluationsBuilder_; + + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public java.util.List getEvaluationsList() { + if (evaluationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(evaluations_); + } else { + return evaluationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public int getEvaluationsCount() { + if (evaluationsBuilder_ == null) { + return evaluations_.size(); + } else { + return evaluationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public com.google.cloud.documentai.v1beta3.Evaluation getEvaluations(int index) { + if (evaluationsBuilder_ == null) { + return evaluations_.get(index); + } else { + return evaluationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public Builder setEvaluations(int index, com.google.cloud.documentai.v1beta3.Evaluation value) { + if (evaluationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEvaluationsIsMutable(); + evaluations_.set(index, value); + onChanged(); + } else { + evaluationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public Builder setEvaluations( + int index, com.google.cloud.documentai.v1beta3.Evaluation.Builder builderForValue) { + if (evaluationsBuilder_ == null) { + ensureEvaluationsIsMutable(); + evaluations_.set(index, builderForValue.build()); + onChanged(); + } else { + evaluationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public Builder addEvaluations(com.google.cloud.documentai.v1beta3.Evaluation value) { + if (evaluationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEvaluationsIsMutable(); + evaluations_.add(value); + onChanged(); + } else { + evaluationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public Builder addEvaluations(int index, com.google.cloud.documentai.v1beta3.Evaluation value) { + if (evaluationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEvaluationsIsMutable(); + evaluations_.add(index, value); + onChanged(); + } else { + evaluationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public Builder addEvaluations( + com.google.cloud.documentai.v1beta3.Evaluation.Builder builderForValue) { + if (evaluationsBuilder_ == null) { + ensureEvaluationsIsMutable(); + evaluations_.add(builderForValue.build()); + onChanged(); + } else { + evaluationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public Builder addEvaluations( + int index, com.google.cloud.documentai.v1beta3.Evaluation.Builder builderForValue) { + if (evaluationsBuilder_ == null) { + ensureEvaluationsIsMutable(); + evaluations_.add(index, builderForValue.build()); + onChanged(); + } else { + evaluationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public Builder addAllEvaluations( + java.lang.Iterable values) { + if (evaluationsBuilder_ == null) { + ensureEvaluationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, evaluations_); + onChanged(); + } else { + evaluationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public Builder clearEvaluations() { + if (evaluationsBuilder_ == null) { + evaluations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + evaluationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public Builder removeEvaluations(int index) { + if (evaluationsBuilder_ == null) { + ensureEvaluationsIsMutable(); + evaluations_.remove(index); + onChanged(); + } else { + evaluationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public com.google.cloud.documentai.v1beta3.Evaluation.Builder getEvaluationsBuilder(int index) { + return getEvaluationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public com.google.cloud.documentai.v1beta3.EvaluationOrBuilder getEvaluationsOrBuilder( + int index) { + if (evaluationsBuilder_ == null) { + return evaluations_.get(index); + } else { + return evaluationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public java.util.List + getEvaluationsOrBuilderList() { + if (evaluationsBuilder_ != null) { + return evaluationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(evaluations_); + } + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public com.google.cloud.documentai.v1beta3.Evaluation.Builder addEvaluationsBuilder() { + return getEvaluationsFieldBuilder() + .addBuilder(com.google.cloud.documentai.v1beta3.Evaluation.getDefaultInstance()); + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public com.google.cloud.documentai.v1beta3.Evaluation.Builder addEvaluationsBuilder(int index) { + return getEvaluationsFieldBuilder() + .addBuilder(index, com.google.cloud.documentai.v1beta3.Evaluation.getDefaultInstance()); + } + /** + * + * + *
+     * The evaluations requested.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + public java.util.List + getEvaluationsBuilderList() { + return getEvaluationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation, + com.google.cloud.documentai.v1beta3.Evaluation.Builder, + com.google.cloud.documentai.v1beta3.EvaluationOrBuilder> + getEvaluationsFieldBuilder() { + if (evaluationsBuilder_ == null) { + evaluationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Evaluation, + com.google.cloud.documentai.v1beta3.Evaluation.Builder, + com.google.cloud.documentai.v1beta3.EvaluationOrBuilder>( + evaluations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + evaluations_ = null; + } + return evaluationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.ListEvaluationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.ListEvaluationsResponse) + private static final com.google.cloud.documentai.v1beta3.ListEvaluationsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.ListEvaluationsResponse(); + } + + public static com.google.cloud.documentai.v1beta3.ListEvaluationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEvaluationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ListEvaluationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListEvaluationsResponseOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListEvaluationsResponseOrBuilder.java new file mode 100644 index 000000000000..804b7d28333b --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ListEvaluationsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface ListEvaluationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.ListEvaluationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The evaluations requested.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + java.util.List getEvaluationsList(); + /** + * + * + *
+   * The evaluations requested.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + com.google.cloud.documentai.v1beta3.Evaluation getEvaluations(int index); + /** + * + * + *
+   * The evaluations requested.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + int getEvaluationsCount(); + /** + * + * + *
+   * The evaluations requested.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + java.util.List + getEvaluationsOrBuilderList(); + /** + * + * + *
+   * The evaluations requested.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Evaluation evaluations = 1; + */ + com.google.cloud.documentai.v1beta3.EvaluationOrBuilder getEvaluationsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java index f67c0c5bfec8..b63db60e832e 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java @@ -291,7 +291,7 @@ public com.google.protobuf.ByteString getNameBytes() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=277 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=323 * @return Whether the document field is set. */ @java.lang.Override @@ -309,7 +309,7 @@ public boolean hasDocument() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=277 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=323 * @return The document. */ @java.lang.Override @@ -360,6 +360,8 @@ public boolean getSkipHumanReview() { * *
    * Specifies which fields to include in ProcessResponse's document.
+   * Only supports top level document and pages field so it must be in the form
+   * of `{document_field_name}` or `pages.{page_field_name}`.
    * 
* * .google.protobuf.FieldMask field_mask = 6; @@ -375,6 +377,8 @@ public boolean hasFieldMask() { * *
    * Specifies which fields to include in ProcessResponse's document.
+   * Only supports top level document and pages field so it must be in the form
+   * of `{document_field_name}` or `pages.{page_field_name}`.
    * 
* * .google.protobuf.FieldMask field_mask = 6; @@ -390,6 +394,8 @@ public com.google.protobuf.FieldMask getFieldMask() { * *
    * Specifies which fields to include in ProcessResponse's document.
+   * Only supports top level document and pages field so it must be in the form
+   * of `{document_field_name}` or `pages.{page_field_name}`.
    * 
* * .google.protobuf.FieldMask field_mask = 6; @@ -1499,7 +1505,7 @@ 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=277 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=323 * @return Whether the document field is set. */ @java.lang.Deprecated @@ -1516,7 +1522,7 @@ public boolean hasDocument() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=277 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=323 * @return The document. */ @java.lang.Deprecated @@ -1747,6 +1753,8 @@ public Builder clearSkipHumanReview() { * *
      * Specifies which fields to include in ProcessResponse's document.
+     * Only supports top level document and pages field so it must be in the form
+     * of `{document_field_name}` or `pages.{page_field_name}`.
      * 
* * .google.protobuf.FieldMask field_mask = 6; @@ -1761,6 +1769,8 @@ public boolean hasFieldMask() { * *
      * Specifies which fields to include in ProcessResponse's document.
+     * Only supports top level document and pages field so it must be in the form
+     * of `{document_field_name}` or `pages.{page_field_name}`.
      * 
* * .google.protobuf.FieldMask field_mask = 6; @@ -1779,6 +1789,8 @@ public com.google.protobuf.FieldMask getFieldMask() { * *
      * Specifies which fields to include in ProcessResponse's document.
+     * Only supports top level document and pages field so it must be in the form
+     * of `{document_field_name}` or `pages.{page_field_name}`.
      * 
* * .google.protobuf.FieldMask field_mask = 6; @@ -1801,6 +1813,8 @@ public Builder setFieldMask(com.google.protobuf.FieldMask value) { * *
      * Specifies which fields to include in ProcessResponse's document.
+     * Only supports top level document and pages field so it must be in the form
+     * of `{document_field_name}` or `pages.{page_field_name}`.
      * 
* * .google.protobuf.FieldMask field_mask = 6; @@ -1820,6 +1834,8 @@ public Builder setFieldMask(com.google.protobuf.FieldMask.Builder builderForValu * *
      * Specifies which fields to include in ProcessResponse's document.
+     * Only supports top level document and pages field so it must be in the form
+     * of `{document_field_name}` or `pages.{page_field_name}`.
      * 
* * .google.protobuf.FieldMask field_mask = 6; @@ -1844,6 +1860,8 @@ public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { * *
      * Specifies which fields to include in ProcessResponse's document.
+     * Only supports top level document and pages field so it must be in the form
+     * of `{document_field_name}` or `pages.{page_field_name}`.
      * 
* * .google.protobuf.FieldMask field_mask = 6; @@ -1864,6 +1882,8 @@ public Builder clearFieldMask() { * *
      * Specifies which fields to include in ProcessResponse's document.
+     * Only supports top level document and pages field so it must be in the form
+     * of `{document_field_name}` or `pages.{page_field_name}`.
      * 
* * .google.protobuf.FieldMask field_mask = 6; @@ -1878,6 +1898,8 @@ public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() { * *
      * Specifies which fields to include in ProcessResponse's document.
+     * Only supports top level document and pages field so it must be in the form
+     * of `{document_field_name}` or `pages.{page_field_name}`.
      * 
* * .google.protobuf.FieldMask field_mask = 6; @@ -1894,6 +1916,8 @@ public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { * *
      * Specifies which fields to include in ProcessResponse's document.
+     * Only supports top level document and pages field so it must be in the form
+     * of `{document_field_name}` or `pages.{page_field_name}`.
      * 
* * .google.protobuf.FieldMask field_mask = 6; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java index 2e724cc4df43..3aac1979f384 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java @@ -142,7 +142,7 @@ public interface ProcessRequestOrBuilder * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=277 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=323 * @return Whether the document field is set. */ @java.lang.Deprecated @@ -157,7 +157,7 @@ public interface ProcessRequestOrBuilder * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=277 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=323 * @return The document. */ @java.lang.Deprecated @@ -193,6 +193,8 @@ public interface ProcessRequestOrBuilder * *
    * Specifies which fields to include in ProcessResponse's document.
+   * Only supports top level document and pages field so it must be in the form
+   * of `{document_field_name}` or `pages.{page_field_name}`.
    * 
* * .google.protobuf.FieldMask field_mask = 6; @@ -205,6 +207,8 @@ public interface ProcessRequestOrBuilder * *
    * Specifies which fields to include in ProcessResponse's document.
+   * Only supports top level document and pages field so it must be in the form
+   * of `{document_field_name}` or `pages.{page_field_name}`.
    * 
* * .google.protobuf.FieldMask field_mask = 6; @@ -217,6 +221,8 @@ public interface ProcessRequestOrBuilder * *
    * Specifies which fields to include in ProcessResponse's document.
+   * Only supports top level document and pages field so it must be in the form
+   * of `{document_field_name}` or `pages.{page_field_name}`.
    * 
* * .google.protobuf.FieldMask field_mask = 6; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java index 7eb7f20b5131..1e1b3e69b3ae 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java @@ -133,7 +133,7 @@ public com.google.cloud.documentai.v1beta3.DocumentOrBuilder getDocumentOrBuilde * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=333 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 * @return The humanReviewOperation. */ @java.lang.Override @@ -162,7 +162,7 @@ public java.lang.String getHumanReviewOperation() { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=333 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 * @return The bytes for humanReviewOperation. */ @java.lang.Override @@ -836,7 +836,7 @@ public com.google.cloud.documentai.v1beta3.DocumentOrBuilder getDocumentOrBuilde * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=333 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 * @return The humanReviewOperation. */ @java.lang.Deprecated @@ -864,7 +864,7 @@ public java.lang.String getHumanReviewOperation() { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=333 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 * @return The bytes for humanReviewOperation. */ @java.lang.Deprecated @@ -892,7 +892,7 @@ public com.google.protobuf.ByteString getHumanReviewOperationBytes() { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=333 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 * @param value The humanReviewOperation to set. * @return This builder for chaining. */ @@ -919,7 +919,7 @@ public Builder setHumanReviewOperation(java.lang.String value) { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=333 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 * @return This builder for chaining. */ @java.lang.Deprecated @@ -942,7 +942,7 @@ public Builder clearHumanReviewOperation() { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=333 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 * @param value The bytes for humanReviewOperation to set. * @return This builder for chaining. */ diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java index fcd4a2f1690e..6e277ded8ccb 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java @@ -74,7 +74,7 @@ public interface ProcessResponseOrBuilder * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=333 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 * @return The humanReviewOperation. */ @java.lang.Deprecated @@ -92,7 +92,7 @@ public interface ProcessResponseOrBuilder * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=333 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=381 * @return The bytes for humanReviewOperation. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Processor.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Processor.java index 147412f99bb0..6793549c5faf 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Processor.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Processor.java @@ -120,7 +120,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The processor is being enabled, will become ENABLED if successful.
+     * The processor is being enabled, will become `ENABLED` if successful.
      * 
* * ENABLING = 3; @@ -130,7 +130,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The processor is being disabled, will become DISABLED if successful.
+     * The processor is being disabled, will become `DISABLED` if successful.
      * 
* * DISABLING = 4; @@ -140,8 +140,8 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The processor is being created, will become either ENABLED (for
-     * successful creation) or FAILED (for failed ones).
+     * The processor is being created, will become either `ENABLED` (for
+     * successful creation) or `FAILED` (for failed ones).
      * Once a processor is in this state, it can then be used for document
      * processing, but the feature dependencies of the processor might not be
      * fully created yet.
@@ -211,7 +211,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum {
      *
      *
      * 
-     * The processor is being enabled, will become ENABLED if successful.
+     * The processor is being enabled, will become `ENABLED` if successful.
      * 
* * ENABLING = 3; @@ -221,7 +221,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The processor is being disabled, will become DISABLED if successful.
+     * The processor is being disabled, will become `DISABLED` if successful.
      * 
* * DISABLING = 4; @@ -231,8 +231,8 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The processor is being created, will become either ENABLED (for
-     * successful creation) or FAILED (for failed ones).
+     * The processor is being created, will become either `ENABLED` (for
+     * successful creation) or `FAILED` (for failed ones).
      * Once a processor is in this state, it can then be used for document
      * processing, but the feature dependencies of the processor might not be
      * fully created yet.
@@ -418,7 +418,7 @@ public com.google.protobuf.ByteString getNameBytes() {
    *
    *
    * 
-   * The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc.
+   * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
    * To get a list of processors types, see
    * [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes].
    * 
@@ -443,7 +443,7 @@ public java.lang.String getType() { * * *
-   * The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc.
+   * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
    * To get a list of processors types, see
    * [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes].
    * 
@@ -1378,7 +1378,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc.
+     * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
      * To get a list of processors types, see
      * [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes].
      * 
@@ -1402,7 +1402,7 @@ public java.lang.String getType() { * * *
-     * The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc.
+     * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
      * To get a list of processors types, see
      * [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes].
      * 
@@ -1426,7 +1426,7 @@ public com.google.protobuf.ByteString getTypeBytes() { * * *
-     * The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc.
+     * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
      * To get a list of processors types, see
      * [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes].
      * 
@@ -1449,7 +1449,7 @@ public Builder setType(java.lang.String value) { * * *
-     * The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc.
+     * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
      * To get a list of processors types, see
      * [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes].
      * 
@@ -1468,7 +1468,7 @@ public Builder clearType() { * * *
-     * The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc.
+     * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
      * To get a list of processors types, see
      * [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes].
      * 
diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorOrBuilder.java index 8b5433881e64..70c4a28f1c7c 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorOrBuilder.java @@ -58,7 +58,7 @@ public interface ProcessorOrBuilder * * *
-   * The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc.
+   * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
    * To get a list of processors types, see
    * [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes].
    * 
@@ -72,7 +72,7 @@ public interface ProcessorOrBuilder * * *
-   * The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc.
+   * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
    * To get a list of processors types, see
    * [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes].
    * 
diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorType.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorType.java index 37cec8e38ee4..a977436106a9 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorType.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorType.java @@ -718,7 +718,7 @@ public com.google.protobuf.Parser getParserForType() { * *
    * The resource name of the processor type.
-   * Format: projects/{project}/processorTypes/{processor_type}
+   * Format: `projects/{project}/processorTypes/{processor_type}`
    * 
* * string name = 1; @@ -742,7 +742,7 @@ public java.lang.String getName() { * *
    * The resource name of the processor type.
-   * Format: projects/{project}/processorTypes/{processor_type}
+   * Format: `projects/{project}/processorTypes/{processor_type}`
    * 
* * string name = 1; @@ -768,7 +768,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * The type of the processor, e.g., "invoice_parsing".
+   * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
    * 
* * string type = 2; @@ -791,7 +791,7 @@ public java.lang.String getType() { * * *
-   * The type of the processor, e.g., "invoice_parsing".
+   * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
    * 
* * string type = 2; @@ -1493,7 +1493,7 @@ public Builder mergeFrom( * *
      * The resource name of the processor type.
-     * Format: projects/{project}/processorTypes/{processor_type}
+     * Format: `projects/{project}/processorTypes/{processor_type}`
      * 
* * string name = 1; @@ -1516,7 +1516,7 @@ public java.lang.String getName() { * *
      * The resource name of the processor type.
-     * Format: projects/{project}/processorTypes/{processor_type}
+     * Format: `projects/{project}/processorTypes/{processor_type}`
      * 
* * string name = 1; @@ -1539,7 +1539,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * The resource name of the processor type.
-     * Format: projects/{project}/processorTypes/{processor_type}
+     * Format: `projects/{project}/processorTypes/{processor_type}`
      * 
* * string name = 1; @@ -1561,7 +1561,7 @@ public Builder setName(java.lang.String value) { * *
      * The resource name of the processor type.
-     * Format: projects/{project}/processorTypes/{processor_type}
+     * Format: `projects/{project}/processorTypes/{processor_type}`
      * 
* * string name = 1; @@ -1579,7 +1579,7 @@ public Builder clearName() { * *
      * The resource name of the processor type.
-     * Format: projects/{project}/processorTypes/{processor_type}
+     * Format: `projects/{project}/processorTypes/{processor_type}`
      * 
* * string name = 1; @@ -1603,7 +1603,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * The type of the processor, e.g., "invoice_parsing".
+     * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
      * 
* * string type = 2; @@ -1625,7 +1625,7 @@ public java.lang.String getType() { * * *
-     * The type of the processor, e.g., "invoice_parsing".
+     * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
      * 
* * string type = 2; @@ -1647,7 +1647,7 @@ public com.google.protobuf.ByteString getTypeBytes() { * * *
-     * The type of the processor, e.g., "invoice_parsing".
+     * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
      * 
* * string type = 2; @@ -1668,7 +1668,7 @@ public Builder setType(java.lang.String value) { * * *
-     * The type of the processor, e.g., "invoice_parsing".
+     * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
      * 
* * string type = 2; @@ -1685,7 +1685,7 @@ public Builder clearType() { * * *
-     * The type of the processor, e.g., "invoice_parsing".
+     * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
      * 
* * string type = 2; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorTypeOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorTypeOrBuilder.java index 7bca8a86d555..c6175f2d1011 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorTypeOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorTypeOrBuilder.java @@ -28,7 +28,7 @@ public interface ProcessorTypeOrBuilder * *
    * The resource name of the processor type.
-   * Format: projects/{project}/processorTypes/{processor_type}
+   * Format: `projects/{project}/processorTypes/{processor_type}`
    * 
* * string name = 1; @@ -41,7 +41,7 @@ public interface ProcessorTypeOrBuilder * *
    * The resource name of the processor type.
-   * Format: projects/{project}/processorTypes/{processor_type}
+   * Format: `projects/{project}/processorTypes/{processor_type}`
    * 
* * string name = 1; @@ -54,7 +54,7 @@ public interface ProcessorTypeOrBuilder * * *
-   * The type of the processor, e.g., "invoice_parsing".
+   * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
    * 
* * string type = 2; @@ -66,7 +66,7 @@ public interface ProcessorTypeOrBuilder * * *
-   * The type of the processor, e.g., "invoice_parsing".
+   * The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
    * 
* * string type = 2; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersion.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersion.java index 276bb72d2872..6cef2bddf742 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersion.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersion.java @@ -1405,6 +1405,54 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { } } + public static final int DOCUMENT_SCHEMA_FIELD_NUMBER = 12; + private com.google.cloud.documentai.v1beta3.DocumentSchema documentSchema_; + /** + * + * + *
+   * The schema of the processor version. Describes the output.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + * + * @return Whether the documentSchema field is set. + */ + @java.lang.Override + public boolean hasDocumentSchema() { + return documentSchema_ != null; + } + /** + * + * + *
+   * The schema of the processor version. Describes the output.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + * + * @return The documentSchema. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentSchema getDocumentSchema() { + return documentSchema_ == null + ? com.google.cloud.documentai.v1beta3.DocumentSchema.getDefaultInstance() + : documentSchema_; + } + /** + * + * + *
+   * The schema of the processor version. Describes the output.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder getDocumentSchemaOrBuilder() { + return getDocumentSchema(); + } + public static final int STATE_FIELD_NUMBER = 6; private int state_; /** @@ -1694,6 +1742,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (googleManaged_ != false) { output.writeBool(11, googleManaged_); } + if (documentSchema_ != null) { + output.writeMessage(12, getDocumentSchema()); + } if (deprecationInfo_ != null) { output.writeMessage(13, getDeprecationInfo()); } @@ -1729,6 +1780,9 @@ public int getSerializedSize() { if (googleManaged_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, googleManaged_); } + if (documentSchema_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getDocumentSchema()); + } if (deprecationInfo_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getDeprecationInfo()); } @@ -1750,6 +1804,10 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasDocumentSchema() != other.hasDocumentSchema()) return false; + if (hasDocumentSchema()) { + if (!getDocumentSchema().equals(other.getDocumentSchema())) return false; + } if (state_ != other.state_) return false; if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { @@ -1777,6 +1835,10 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); + if (hasDocumentSchema()) { + hash = (37 * hash) + DOCUMENT_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getDocumentSchema().hashCode(); + } hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; if (hasCreateTime()) { @@ -1939,6 +2001,12 @@ public Builder clear() { displayName_ = ""; + if (documentSchemaBuilder_ == null) { + documentSchema_ = null; + } else { + documentSchema_ = null; + documentSchemaBuilder_ = null; + } state_ = 0; if (createTimeBuilder_ == null) { @@ -1988,6 +2056,11 @@ public com.google.cloud.documentai.v1beta3.ProcessorVersion buildPartial() { new com.google.cloud.documentai.v1beta3.ProcessorVersion(this); result.name_ = name_; result.displayName_ = displayName_; + if (documentSchemaBuilder_ == null) { + result.documentSchema_ = documentSchema_; + } else { + result.documentSchema_ = documentSchemaBuilder_.build(); + } result.state_ = state_; if (createTimeBuilder_ == null) { result.createTime_ = createTime_; @@ -2060,6 +2133,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta3.ProcessorVersion ot displayName_ = other.displayName_; onChanged(); } + if (other.hasDocumentSchema()) { + mergeDocumentSchema(other.getDocumentSchema()); + } if (other.state_ != 0) { setStateValue(other.getStateValue()); } @@ -2148,6 +2224,12 @@ public Builder mergeFrom( break; } // case 88 + case 98: + { + input.readMessage(getDocumentSchemaFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 98 case 106: { input.readMessage(getDeprecationInfoFieldBuilder().getBuilder(), extensionRegistry); @@ -2393,6 +2475,193 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.documentai.v1beta3.DocumentSchema documentSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentSchema, + com.google.cloud.documentai.v1beta3.DocumentSchema.Builder, + com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder> + documentSchemaBuilder_; + /** + * + * + *
+     * The schema of the processor version. Describes the output.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + * + * @return Whether the documentSchema field is set. + */ + public boolean hasDocumentSchema() { + return documentSchemaBuilder_ != null || documentSchema_ != null; + } + /** + * + * + *
+     * The schema of the processor version. Describes the output.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + * + * @return The documentSchema. + */ + public com.google.cloud.documentai.v1beta3.DocumentSchema getDocumentSchema() { + if (documentSchemaBuilder_ == null) { + return documentSchema_ == null + ? com.google.cloud.documentai.v1beta3.DocumentSchema.getDefaultInstance() + : documentSchema_; + } else { + return documentSchemaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The schema of the processor version. Describes the output.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + */ + public Builder setDocumentSchema(com.google.cloud.documentai.v1beta3.DocumentSchema value) { + if (documentSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + documentSchema_ = value; + onChanged(); + } else { + documentSchemaBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The schema of the processor version. Describes the output.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + */ + public Builder setDocumentSchema( + com.google.cloud.documentai.v1beta3.DocumentSchema.Builder builderForValue) { + if (documentSchemaBuilder_ == null) { + documentSchema_ = builderForValue.build(); + onChanged(); + } else { + documentSchemaBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The schema of the processor version. Describes the output.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + */ + public Builder mergeDocumentSchema(com.google.cloud.documentai.v1beta3.DocumentSchema value) { + if (documentSchemaBuilder_ == null) { + if (documentSchema_ != null) { + documentSchema_ = + com.google.cloud.documentai.v1beta3.DocumentSchema.newBuilder(documentSchema_) + .mergeFrom(value) + .buildPartial(); + } else { + documentSchema_ = value; + } + onChanged(); + } else { + documentSchemaBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The schema of the processor version. Describes the output.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + */ + public Builder clearDocumentSchema() { + if (documentSchemaBuilder_ == null) { + documentSchema_ = null; + onChanged(); + } else { + documentSchema_ = null; + documentSchemaBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The schema of the processor version. Describes the output.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + */ + public com.google.cloud.documentai.v1beta3.DocumentSchema.Builder getDocumentSchemaBuilder() { + + onChanged(); + return getDocumentSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The schema of the processor version. Describes the output.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + */ + public com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder + getDocumentSchemaOrBuilder() { + if (documentSchemaBuilder_ != null) { + return documentSchemaBuilder_.getMessageOrBuilder(); + } else { + return documentSchema_ == null + ? com.google.cloud.documentai.v1beta3.DocumentSchema.getDefaultInstance() + : documentSchema_; + } + } + /** + * + * + *
+     * The schema of the processor version. Describes the output.
+     * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentSchema, + com.google.cloud.documentai.v1beta3.DocumentSchema.Builder, + com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder> + getDocumentSchemaFieldBuilder() { + if (documentSchemaBuilder_ == null) { + documentSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentSchema, + com.google.cloud.documentai.v1beta3.DocumentSchema.Builder, + com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder>( + getDocumentSchema(), getParentForChildren(), isClean()); + documentSchema_ = null; + } + return documentSchemaBuilder_; + } + private int state_ = 0; /** * diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersionOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersionOrBuilder.java index ffdc82a36695..7740da5a6702 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersionOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersionOrBuilder.java @@ -77,6 +77,41 @@ public interface ProcessorVersionOrBuilder */ com.google.protobuf.ByteString getDisplayNameBytes(); + /** + * + * + *
+   * The schema of the processor version. Describes the output.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + * + * @return Whether the documentSchema field is set. + */ + boolean hasDocumentSchema(); + /** + * + * + *
+   * The schema of the processor version. Describes the output.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + * + * @return The documentSchema. + */ + com.google.cloud.documentai.v1beta3.DocumentSchema getDocumentSchema(); + /** + * + * + *
+   * The schema of the processor version. Describes the output.
+   * 
+ * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12; + */ + com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder getDocumentSchemaOrBuilder(); + /** * * diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RawDocument.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RawDocument.java index 5a10712c0dbc..6146529e2e13 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RawDocument.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RawDocument.java @@ -93,7 +93,7 @@ public com.google.protobuf.ByteString getContent() { * *
    * An IANA MIME type (RFC6838) indicating the nature and format of the
-   * [content].
+   * [content][google.cloud.documentai.v1beta3.RawDocument.content].
    * 
* * string mime_type = 2; @@ -117,7 +117,7 @@ public java.lang.String getMimeType() { * *
    * An IANA MIME type (RFC6838) indicating the nature and format of the
-   * [content].
+   * [content][google.cloud.documentai.v1beta3.RawDocument.content].
    * 
* * string mime_type = 2; @@ -549,7 +549,7 @@ public Builder clearContent() { * *
      * An IANA MIME type (RFC6838) indicating the nature and format of the
-     * [content].
+     * [content][google.cloud.documentai.v1beta3.RawDocument.content].
      * 
* * string mime_type = 2; @@ -572,7 +572,7 @@ public java.lang.String getMimeType() { * *
      * An IANA MIME type (RFC6838) indicating the nature and format of the
-     * [content].
+     * [content][google.cloud.documentai.v1beta3.RawDocument.content].
      * 
* * string mime_type = 2; @@ -595,7 +595,7 @@ public com.google.protobuf.ByteString getMimeTypeBytes() { * *
      * An IANA MIME type (RFC6838) indicating the nature and format of the
-     * [content].
+     * [content][google.cloud.documentai.v1beta3.RawDocument.content].
      * 
* * string mime_type = 2; @@ -617,7 +617,7 @@ public Builder setMimeType(java.lang.String value) { * *
      * An IANA MIME type (RFC6838) indicating the nature and format of the
-     * [content].
+     * [content][google.cloud.documentai.v1beta3.RawDocument.content].
      * 
* * string mime_type = 2; @@ -635,7 +635,7 @@ public Builder clearMimeType() { * *
      * An IANA MIME type (RFC6838) indicating the nature and format of the
-     * [content].
+     * [content][google.cloud.documentai.v1beta3.RawDocument.content].
      * 
* * string mime_type = 2; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RawDocumentOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RawDocumentOrBuilder.java index 9789303e01a7..088f823ea334 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RawDocumentOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/RawDocumentOrBuilder.java @@ -41,7 +41,7 @@ public interface RawDocumentOrBuilder * *
    * An IANA MIME type (RFC6838) indicating the nature and format of the
-   * [content].
+   * [content][google.cloud.documentai.v1beta3.RawDocument.content].
    * 
* * string mime_type = 2; @@ -54,7 +54,7 @@ public interface RawDocumentOrBuilder * *
    * An IANA MIME type (RFC6838) indicating the nature and format of the
-   * [content].
+   * [content][google.cloud.documentai.v1beta3.RawDocument.content].
    * 
* * string mime_type = 2; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java index 9710838218ed..b1777fe45a3c 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java @@ -369,7 +369,7 @@ public com.google.protobuf.ByteString getHumanReviewConfigBytes() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=799 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=920 * @return Whether the document field is set. */ @java.lang.Override @@ -387,7 +387,7 @@ public boolean hasDocument() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=799 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=920 * @return The document. */ @java.lang.Override @@ -1374,7 +1374,7 @@ public Builder setHumanReviewConfigBytes(com.google.protobuf.ByteString value) { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=799 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=920 * @return Whether the document field is set. */ @java.lang.Deprecated @@ -1391,7 +1391,7 @@ public boolean hasDocument() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=799 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=920 * @return The document. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java index 07a27ea0c27f..7e523bf33b77 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java @@ -99,7 +99,7 @@ public interface ReviewDocumentRequestOrBuilder * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=799 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=920 * @return Whether the document field is set. */ @java.lang.Deprecated @@ -114,7 +114,7 @@ public interface ReviewDocumentRequestOrBuilder * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=799 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=920 * @return The document. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionMetadata.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionMetadata.java new file mode 100644 index 000000000000..341cb4333bad --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionMetadata.java @@ -0,0 +1,3222 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * The metadata that represents a processor version being created.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata} + */ +public final class TrainProcessorVersionMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata) + TrainProcessorVersionMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use TrainProcessorVersionMetadata.newBuilder() to construct. + private TrainProcessorVersionMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrainProcessorVersionMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrainProcessorVersionMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.class, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.Builder.class); + } + + public interface DatasetValidationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The total number of document errors.
+     * 
+ * + * int32 document_error_count = 3; + * + * @return The documentErrorCount. + */ + int getDocumentErrorCount(); + + /** + * + * + *
+     * The total number of dataset errors.
+     * 
+ * + * int32 dataset_error_count = 4; + * + * @return The datasetErrorCount. + */ + int getDatasetErrorCount(); + + /** + * + * + *
+     * Error information pertaining to specific documents. A maximum of 10
+     * document errors will be returned.
+     * Any document with errors will not be used throughout training.
+     * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + java.util.List getDocumentErrorsList(); + /** + * + * + *
+     * Error information pertaining to specific documents. A maximum of 10
+     * document errors will be returned.
+     * Any document with errors will not be used throughout training.
+     * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + com.google.rpc.Status getDocumentErrors(int index); + /** + * + * + *
+     * Error information pertaining to specific documents. A maximum of 10
+     * document errors will be returned.
+     * Any document with errors will not be used throughout training.
+     * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + int getDocumentErrorsCount(); + /** + * + * + *
+     * Error information pertaining to specific documents. A maximum of 10
+     * document errors will be returned.
+     * Any document with errors will not be used throughout training.
+     * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + java.util.List getDocumentErrorsOrBuilderList(); + /** + * + * + *
+     * Error information pertaining to specific documents. A maximum of 10
+     * document errors will be returned.
+     * Any document with errors will not be used throughout training.
+     * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + com.google.rpc.StatusOrBuilder getDocumentErrorsOrBuilder(int index); + + /** + * + * + *
+     * Error information for the dataset as a whole. A maximum of 10 dataset
+     * errors will be returned.
+     * A single dataset error is terminal for training.
+     * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + java.util.List getDatasetErrorsList(); + /** + * + * + *
+     * Error information for the dataset as a whole. A maximum of 10 dataset
+     * errors will be returned.
+     * A single dataset error is terminal for training.
+     * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + com.google.rpc.Status getDatasetErrors(int index); + /** + * + * + *
+     * Error information for the dataset as a whole. A maximum of 10 dataset
+     * errors will be returned.
+     * A single dataset error is terminal for training.
+     * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + int getDatasetErrorsCount(); + /** + * + * + *
+     * Error information for the dataset as a whole. A maximum of 10 dataset
+     * errors will be returned.
+     * A single dataset error is terminal for training.
+     * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + java.util.List getDatasetErrorsOrBuilderList(); + /** + * + * + *
+     * Error information for the dataset as a whole. A maximum of 10 dataset
+     * errors will be returned.
+     * A single dataset error is terminal for training.
+     * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + com.google.rpc.StatusOrBuilder getDatasetErrorsOrBuilder(int index); + } + /** + * + * + *
+   * The dataset validation information.
+   * This includes any and all errors with documents and the dataset.
+   * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation} + */ + public static final class DatasetValidation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation) + DatasetValidationOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatasetValidation.newBuilder() to construct. + private DatasetValidation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DatasetValidation() { + documentErrors_ = java.util.Collections.emptyList(); + datasetErrors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DatasetValidation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_DatasetValidation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_DatasetValidation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .class, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .Builder.class); + } + + public static final int DOCUMENT_ERROR_COUNT_FIELD_NUMBER = 3; + private int documentErrorCount_; + /** + * + * + *
+     * The total number of document errors.
+     * 
+ * + * int32 document_error_count = 3; + * + * @return The documentErrorCount. + */ + @java.lang.Override + public int getDocumentErrorCount() { + return documentErrorCount_; + } + + public static final int DATASET_ERROR_COUNT_FIELD_NUMBER = 4; + private int datasetErrorCount_; + /** + * + * + *
+     * The total number of dataset errors.
+     * 
+ * + * int32 dataset_error_count = 4; + * + * @return The datasetErrorCount. + */ + @java.lang.Override + public int getDatasetErrorCount() { + return datasetErrorCount_; + } + + public static final int DOCUMENT_ERRORS_FIELD_NUMBER = 1; + private java.util.List documentErrors_; + /** + * + * + *
+     * Error information pertaining to specific documents. A maximum of 10
+     * document errors will be returned.
+     * Any document with errors will not be used throughout training.
+     * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + @java.lang.Override + public java.util.List getDocumentErrorsList() { + return documentErrors_; + } + /** + * + * + *
+     * Error information pertaining to specific documents. A maximum of 10
+     * document errors will be returned.
+     * Any document with errors will not be used throughout training.
+     * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + @java.lang.Override + public java.util.List + getDocumentErrorsOrBuilderList() { + return documentErrors_; + } + /** + * + * + *
+     * Error information pertaining to specific documents. A maximum of 10
+     * document errors will be returned.
+     * Any document with errors will not be used throughout training.
+     * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + @java.lang.Override + public int getDocumentErrorsCount() { + return documentErrors_.size(); + } + /** + * + * + *
+     * Error information pertaining to specific documents. A maximum of 10
+     * document errors will be returned.
+     * Any document with errors will not be used throughout training.
+     * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + @java.lang.Override + public com.google.rpc.Status getDocumentErrors(int index) { + return documentErrors_.get(index); + } + /** + * + * + *
+     * Error information pertaining to specific documents. A maximum of 10
+     * document errors will be returned.
+     * Any document with errors will not be used throughout training.
+     * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getDocumentErrorsOrBuilder(int index) { + return documentErrors_.get(index); + } + + public static final int DATASET_ERRORS_FIELD_NUMBER = 2; + private java.util.List datasetErrors_; + /** + * + * + *
+     * Error information for the dataset as a whole. A maximum of 10 dataset
+     * errors will be returned.
+     * A single dataset error is terminal for training.
+     * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + @java.lang.Override + public java.util.List getDatasetErrorsList() { + return datasetErrors_; + } + /** + * + * + *
+     * Error information for the dataset as a whole. A maximum of 10 dataset
+     * errors will be returned.
+     * A single dataset error is terminal for training.
+     * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + @java.lang.Override + public java.util.List + getDatasetErrorsOrBuilderList() { + return datasetErrors_; + } + /** + * + * + *
+     * Error information for the dataset as a whole. A maximum of 10 dataset
+     * errors will be returned.
+     * A single dataset error is terminal for training.
+     * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + @java.lang.Override + public int getDatasetErrorsCount() { + return datasetErrors_.size(); + } + /** + * + * + *
+     * Error information for the dataset as a whole. A maximum of 10 dataset
+     * errors will be returned.
+     * A single dataset error is terminal for training.
+     * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + @java.lang.Override + public com.google.rpc.Status getDatasetErrors(int index) { + return datasetErrors_.get(index); + } + /** + * + * + *
+     * Error information for the dataset as a whole. A maximum of 10 dataset
+     * errors will be returned.
+     * A single dataset error is terminal for training.
+     * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getDatasetErrorsOrBuilder(int index) { + return datasetErrors_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < documentErrors_.size(); i++) { + output.writeMessage(1, documentErrors_.get(i)); + } + for (int i = 0; i < datasetErrors_.size(); i++) { + output.writeMessage(2, datasetErrors_.get(i)); + } + if (documentErrorCount_ != 0) { + output.writeInt32(3, documentErrorCount_); + } + if (datasetErrorCount_ != 0) { + output.writeInt32(4, datasetErrorCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < documentErrors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, documentErrors_.get(i)); + } + for (int i = 0; i < datasetErrors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, datasetErrors_.get(i)); + } + if (documentErrorCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, documentErrorCount_); + } + if (datasetErrorCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, datasetErrorCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation other = + (com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation) obj; + + if (getDocumentErrorCount() != other.getDocumentErrorCount()) return false; + if (getDatasetErrorCount() != other.getDatasetErrorCount()) return false; + if (!getDocumentErrorsList().equals(other.getDocumentErrorsList())) return false; + if (!getDatasetErrorsList().equals(other.getDatasetErrorsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOCUMENT_ERROR_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getDocumentErrorCount(); + hash = (37 * hash) + DATASET_ERROR_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getDatasetErrorCount(); + if (getDocumentErrorsCount() > 0) { + hash = (37 * hash) + DOCUMENT_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getDocumentErrorsList().hashCode(); + } + if (getDatasetErrorsCount() > 0) { + hash = (37 * hash) + DATASET_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getDatasetErrorsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The dataset validation information.
+     * This includes any and all errors with documents and the dataset.
+     * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation) + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_DatasetValidation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_DatasetValidation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .class, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + documentErrorCount_ = 0; + + datasetErrorCount_ = 0; + + if (documentErrorsBuilder_ == null) { + documentErrors_ = java.util.Collections.emptyList(); + } else { + documentErrors_ = null; + documentErrorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (datasetErrorsBuilder_ == null) { + datasetErrors_ = java.util.Collections.emptyList(); + } else { + datasetErrors_ = null; + datasetErrorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_DatasetValidation_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + build() { + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + buildPartial() { + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation result = + new com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation( + this); + int from_bitField0_ = bitField0_; + result.documentErrorCount_ = documentErrorCount_; + result.datasetErrorCount_ = datasetErrorCount_; + if (documentErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + documentErrors_ = java.util.Collections.unmodifiableList(documentErrors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.documentErrors_ = documentErrors_; + } else { + result.documentErrors_ = documentErrorsBuilder_.build(); + } + if (datasetErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + datasetErrors_ = java.util.Collections.unmodifiableList(datasetErrors_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.datasetErrors_ = datasetErrors_; + } else { + result.datasetErrors_ = datasetErrorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + other) { + if (other + == com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .getDefaultInstance()) return this; + if (other.getDocumentErrorCount() != 0) { + setDocumentErrorCount(other.getDocumentErrorCount()); + } + if (other.getDatasetErrorCount() != 0) { + setDatasetErrorCount(other.getDatasetErrorCount()); + } + if (documentErrorsBuilder_ == null) { + if (!other.documentErrors_.isEmpty()) { + if (documentErrors_.isEmpty()) { + documentErrors_ = other.documentErrors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDocumentErrorsIsMutable(); + documentErrors_.addAll(other.documentErrors_); + } + onChanged(); + } + } else { + if (!other.documentErrors_.isEmpty()) { + if (documentErrorsBuilder_.isEmpty()) { + documentErrorsBuilder_.dispose(); + documentErrorsBuilder_ = null; + documentErrors_ = other.documentErrors_; + bitField0_ = (bitField0_ & ~0x00000001); + documentErrorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDocumentErrorsFieldBuilder() + : null; + } else { + documentErrorsBuilder_.addAllMessages(other.documentErrors_); + } + } + } + if (datasetErrorsBuilder_ == null) { + if (!other.datasetErrors_.isEmpty()) { + if (datasetErrors_.isEmpty()) { + datasetErrors_ = other.datasetErrors_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDatasetErrorsIsMutable(); + datasetErrors_.addAll(other.datasetErrors_); + } + onChanged(); + } + } else { + if (!other.datasetErrors_.isEmpty()) { + if (datasetErrorsBuilder_.isEmpty()) { + datasetErrorsBuilder_.dispose(); + datasetErrorsBuilder_ = null; + datasetErrors_ = other.datasetErrors_; + bitField0_ = (bitField0_ & ~0x00000002); + datasetErrorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDatasetErrorsFieldBuilder() + : null; + } else { + datasetErrorsBuilder_.addAllMessages(other.datasetErrors_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (documentErrorsBuilder_ == null) { + ensureDocumentErrorsIsMutable(); + documentErrors_.add(m); + } else { + documentErrorsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (datasetErrorsBuilder_ == null) { + ensureDatasetErrorsIsMutable(); + datasetErrors_.add(m); + } else { + datasetErrorsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + documentErrorCount_ = input.readInt32(); + + break; + } // case 24 + case 32: + { + datasetErrorCount_ = input.readInt32(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int documentErrorCount_; + /** + * + * + *
+       * The total number of document errors.
+       * 
+ * + * int32 document_error_count = 3; + * + * @return The documentErrorCount. + */ + @java.lang.Override + public int getDocumentErrorCount() { + return documentErrorCount_; + } + /** + * + * + *
+       * The total number of document errors.
+       * 
+ * + * int32 document_error_count = 3; + * + * @param value The documentErrorCount to set. + * @return This builder for chaining. + */ + public Builder setDocumentErrorCount(int value) { + + documentErrorCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The total number of document errors.
+       * 
+ * + * int32 document_error_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearDocumentErrorCount() { + + documentErrorCount_ = 0; + onChanged(); + return this; + } + + private int datasetErrorCount_; + /** + * + * + *
+       * The total number of dataset errors.
+       * 
+ * + * int32 dataset_error_count = 4; + * + * @return The datasetErrorCount. + */ + @java.lang.Override + public int getDatasetErrorCount() { + return datasetErrorCount_; + } + /** + * + * + *
+       * The total number of dataset errors.
+       * 
+ * + * int32 dataset_error_count = 4; + * + * @param value The datasetErrorCount to set. + * @return This builder for chaining. + */ + public Builder setDatasetErrorCount(int value) { + + datasetErrorCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The total number of dataset errors.
+       * 
+ * + * int32 dataset_error_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearDatasetErrorCount() { + + datasetErrorCount_ = 0; + onChanged(); + return this; + } + + private java.util.List documentErrors_ = + java.util.Collections.emptyList(); + + private void ensureDocumentErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + documentErrors_ = new java.util.ArrayList(documentErrors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + documentErrorsBuilder_; + + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public java.util.List getDocumentErrorsList() { + if (documentErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(documentErrors_); + } else { + return documentErrorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public int getDocumentErrorsCount() { + if (documentErrorsBuilder_ == null) { + return documentErrors_.size(); + } else { + return documentErrorsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public com.google.rpc.Status getDocumentErrors(int index) { + if (documentErrorsBuilder_ == null) { + return documentErrors_.get(index); + } else { + return documentErrorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public Builder setDocumentErrors(int index, com.google.rpc.Status value) { + if (documentErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentErrorsIsMutable(); + documentErrors_.set(index, value); + onChanged(); + } else { + documentErrorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public Builder setDocumentErrors(int index, com.google.rpc.Status.Builder builderForValue) { + if (documentErrorsBuilder_ == null) { + ensureDocumentErrorsIsMutable(); + documentErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + documentErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public Builder addDocumentErrors(com.google.rpc.Status value) { + if (documentErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentErrorsIsMutable(); + documentErrors_.add(value); + onChanged(); + } else { + documentErrorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public Builder addDocumentErrors(int index, com.google.rpc.Status value) { + if (documentErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentErrorsIsMutable(); + documentErrors_.add(index, value); + onChanged(); + } else { + documentErrorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public Builder addDocumentErrors(com.google.rpc.Status.Builder builderForValue) { + if (documentErrorsBuilder_ == null) { + ensureDocumentErrorsIsMutable(); + documentErrors_.add(builderForValue.build()); + onChanged(); + } else { + documentErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public Builder addDocumentErrors(int index, com.google.rpc.Status.Builder builderForValue) { + if (documentErrorsBuilder_ == null) { + ensureDocumentErrorsIsMutable(); + documentErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + documentErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public Builder addAllDocumentErrors( + java.lang.Iterable values) { + if (documentErrorsBuilder_ == null) { + ensureDocumentErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, documentErrors_); + onChanged(); + } else { + documentErrorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public Builder clearDocumentErrors() { + if (documentErrorsBuilder_ == null) { + documentErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + documentErrorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public Builder removeDocumentErrors(int index) { + if (documentErrorsBuilder_ == null) { + ensureDocumentErrorsIsMutable(); + documentErrors_.remove(index); + onChanged(); + } else { + documentErrorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public com.google.rpc.Status.Builder getDocumentErrorsBuilder(int index) { + return getDocumentErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public com.google.rpc.StatusOrBuilder getDocumentErrorsOrBuilder(int index) { + if (documentErrorsBuilder_ == null) { + return documentErrors_.get(index); + } else { + return documentErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public java.util.List + getDocumentErrorsOrBuilderList() { + if (documentErrorsBuilder_ != null) { + return documentErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(documentErrors_); + } + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public com.google.rpc.Status.Builder addDocumentErrorsBuilder() { + return getDocumentErrorsFieldBuilder() + .addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public com.google.rpc.Status.Builder addDocumentErrorsBuilder(int index) { + return getDocumentErrorsFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+       * Error information pertaining to specific documents. A maximum of 10
+       * document errors will be returned.
+       * Any document with errors will not be used throughout training.
+       * 
+ * + * repeated .google.rpc.Status document_errors = 1; + */ + public java.util.List getDocumentErrorsBuilderList() { + return getDocumentErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getDocumentErrorsFieldBuilder() { + if (documentErrorsBuilder_ == null) { + documentErrorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + documentErrors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + documentErrors_ = null; + } + return documentErrorsBuilder_; + } + + private java.util.List datasetErrors_ = + java.util.Collections.emptyList(); + + private void ensureDatasetErrorsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + datasetErrors_ = new java.util.ArrayList(datasetErrors_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + datasetErrorsBuilder_; + + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public java.util.List getDatasetErrorsList() { + if (datasetErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(datasetErrors_); + } else { + return datasetErrorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public int getDatasetErrorsCount() { + if (datasetErrorsBuilder_ == null) { + return datasetErrors_.size(); + } else { + return datasetErrorsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public com.google.rpc.Status getDatasetErrors(int index) { + if (datasetErrorsBuilder_ == null) { + return datasetErrors_.get(index); + } else { + return datasetErrorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public Builder setDatasetErrors(int index, com.google.rpc.Status value) { + if (datasetErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetErrorsIsMutable(); + datasetErrors_.set(index, value); + onChanged(); + } else { + datasetErrorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public Builder setDatasetErrors(int index, com.google.rpc.Status.Builder builderForValue) { + if (datasetErrorsBuilder_ == null) { + ensureDatasetErrorsIsMutable(); + datasetErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + datasetErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public Builder addDatasetErrors(com.google.rpc.Status value) { + if (datasetErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetErrorsIsMutable(); + datasetErrors_.add(value); + onChanged(); + } else { + datasetErrorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public Builder addDatasetErrors(int index, com.google.rpc.Status value) { + if (datasetErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetErrorsIsMutable(); + datasetErrors_.add(index, value); + onChanged(); + } else { + datasetErrorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public Builder addDatasetErrors(com.google.rpc.Status.Builder builderForValue) { + if (datasetErrorsBuilder_ == null) { + ensureDatasetErrorsIsMutable(); + datasetErrors_.add(builderForValue.build()); + onChanged(); + } else { + datasetErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public Builder addDatasetErrors(int index, com.google.rpc.Status.Builder builderForValue) { + if (datasetErrorsBuilder_ == null) { + ensureDatasetErrorsIsMutable(); + datasetErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + datasetErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public Builder addAllDatasetErrors( + java.lang.Iterable values) { + if (datasetErrorsBuilder_ == null) { + ensureDatasetErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, datasetErrors_); + onChanged(); + } else { + datasetErrorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public Builder clearDatasetErrors() { + if (datasetErrorsBuilder_ == null) { + datasetErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + datasetErrorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public Builder removeDatasetErrors(int index) { + if (datasetErrorsBuilder_ == null) { + ensureDatasetErrorsIsMutable(); + datasetErrors_.remove(index); + onChanged(); + } else { + datasetErrorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public com.google.rpc.Status.Builder getDatasetErrorsBuilder(int index) { + return getDatasetErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public com.google.rpc.StatusOrBuilder getDatasetErrorsOrBuilder(int index) { + if (datasetErrorsBuilder_ == null) { + return datasetErrors_.get(index); + } else { + return datasetErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public java.util.List + getDatasetErrorsOrBuilderList() { + if (datasetErrorsBuilder_ != null) { + return datasetErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(datasetErrors_); + } + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public com.google.rpc.Status.Builder addDatasetErrorsBuilder() { + return getDatasetErrorsFieldBuilder() + .addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public com.google.rpc.Status.Builder addDatasetErrorsBuilder(int index) { + return getDatasetErrorsFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+       * Error information for the dataset as a whole. A maximum of 10 dataset
+       * errors will be returned.
+       * A single dataset error is terminal for training.
+       * 
+ * + * repeated .google.rpc.Status dataset_errors = 2; + */ + public java.util.List getDatasetErrorsBuilderList() { + return getDatasetErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getDatasetErrorsFieldBuilder() { + if (datasetErrorsBuilder_ == null) { + datasetErrorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + datasetErrors_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + datasetErrors_ = null; + } + return datasetErrorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation) + private static final com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation(); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatasetValidation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int COMMON_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta3.CommonOperationMetadata commonMetadata_; + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + @java.lang.Override + public boolean hasCommonMetadata() { + return commonMetadata_ != null; + } + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.CommonOperationMetadata getCommonMetadata() { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + return getCommonMetadata(); + } + + public static final int TRAINING_DATASET_VALIDATION_FIELD_NUMBER = 2; + private com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + trainingDatasetValidation_; + /** + * + * + *
+   * The training dataset validation information.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + * + * @return Whether the trainingDatasetValidation field is set. + */ + @java.lang.Override + public boolean hasTrainingDatasetValidation() { + return trainingDatasetValidation_ != null; + } + /** + * + * + *
+   * The training dataset validation information.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + * + * @return The trainingDatasetValidation. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + getTrainingDatasetValidation() { + return trainingDatasetValidation_ == null + ? com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .getDefaultInstance() + : trainingDatasetValidation_; + } + /** + * + * + *
+   * The training dataset validation information.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidationOrBuilder + getTrainingDatasetValidationOrBuilder() { + return getTrainingDatasetValidation(); + } + + public static final int TEST_DATASET_VALIDATION_FIELD_NUMBER = 3; + private com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + testDatasetValidation_; + /** + * + * + *
+   * The test dataset validation information.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + * + * @return Whether the testDatasetValidation field is set. + */ + @java.lang.Override + public boolean hasTestDatasetValidation() { + return testDatasetValidation_ != null; + } + /** + * + * + *
+   * The test dataset validation information.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + * + * @return The testDatasetValidation. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + getTestDatasetValidation() { + return testDatasetValidation_ == null + ? com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .getDefaultInstance() + : testDatasetValidation_; + } + /** + * + * + *
+   * The test dataset validation information.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidationOrBuilder + getTestDatasetValidationOrBuilder() { + return getTestDatasetValidation(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (commonMetadata_ != null) { + output.writeMessage(1, getCommonMetadata()); + } + if (trainingDatasetValidation_ != null) { + output.writeMessage(2, getTrainingDatasetValidation()); + } + if (testDatasetValidation_ != null) { + output.writeMessage(3, getTestDatasetValidation()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (commonMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommonMetadata()); + } + if (trainingDatasetValidation_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getTrainingDatasetValidation()); + } + if (testDatasetValidation_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTestDatasetValidation()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata other = + (com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata) obj; + + if (hasCommonMetadata() != other.hasCommonMetadata()) return false; + if (hasCommonMetadata()) { + if (!getCommonMetadata().equals(other.getCommonMetadata())) return false; + } + if (hasTrainingDatasetValidation() != other.hasTrainingDatasetValidation()) return false; + if (hasTrainingDatasetValidation()) { + if (!getTrainingDatasetValidation().equals(other.getTrainingDatasetValidation())) + return false; + } + if (hasTestDatasetValidation() != other.hasTestDatasetValidation()) return false; + if (hasTestDatasetValidation()) { + if (!getTestDatasetValidation().equals(other.getTestDatasetValidation())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommonMetadata()) { + hash = (37 * hash) + COMMON_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getCommonMetadata().hashCode(); + } + if (hasTrainingDatasetValidation()) { + hash = (37 * hash) + TRAINING_DATASET_VALIDATION_FIELD_NUMBER; + hash = (53 * hash) + getTrainingDatasetValidation().hashCode(); + } + if (hasTestDatasetValidation()) { + hash = (37 * hash) + TEST_DATASET_VALIDATION_FIELD_NUMBER; + hash = (53 * hash) + getTestDatasetValidation().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The metadata that represents a processor version being created.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata) + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.class, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (commonMetadataBuilder_ == null) { + commonMetadata_ = null; + } else { + commonMetadata_ = null; + commonMetadataBuilder_ = null; + } + if (trainingDatasetValidationBuilder_ == null) { + trainingDatasetValidation_ = null; + } else { + trainingDatasetValidation_ = null; + trainingDatasetValidationBuilder_ = null; + } + if (testDatasetValidationBuilder_ == null) { + testDatasetValidation_ = null; + } else { + testDatasetValidation_ = null; + testDatasetValidationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata build() { + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata buildPartial() { + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata result = + new com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata(this); + if (commonMetadataBuilder_ == null) { + result.commonMetadata_ = commonMetadata_; + } else { + result.commonMetadata_ = commonMetadataBuilder_.build(); + } + if (trainingDatasetValidationBuilder_ == null) { + result.trainingDatasetValidation_ = trainingDatasetValidation_; + } else { + result.trainingDatasetValidation_ = trainingDatasetValidationBuilder_.build(); + } + if (testDatasetValidationBuilder_ == null) { + result.testDatasetValidation_ = testDatasetValidation_; + } else { + result.testDatasetValidation_ = testDatasetValidationBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata) { + return mergeFrom((com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata other) { + if (other + == com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.getDefaultInstance()) + return this; + if (other.hasCommonMetadata()) { + mergeCommonMetadata(other.getCommonMetadata()); + } + if (other.hasTrainingDatasetValidation()) { + mergeTrainingDatasetValidation(other.getTrainingDatasetValidation()); + } + if (other.hasTestDatasetValidation()) { + mergeTestDatasetValidation(other.getTestDatasetValidation()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCommonMetadataFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage( + getTrainingDatasetValidationFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage( + getTestDatasetValidationFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.cloud.documentai.v1beta3.CommonOperationMetadata commonMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.CommonOperationMetadata, + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder, + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder> + commonMetadataBuilder_; + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + public boolean hasCommonMetadata() { + return commonMetadataBuilder_ != null || commonMetadata_ != null; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + public com.google.cloud.documentai.v1beta3.CommonOperationMetadata getCommonMetadata() { + if (commonMetadataBuilder_ == null) { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } else { + return commonMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder setCommonMetadata( + com.google.cloud.documentai.v1beta3.CommonOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commonMetadata_ = value; + onChanged(); + } else { + commonMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder setCommonMetadata( + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder builderForValue) { + if (commonMetadataBuilder_ == null) { + commonMetadata_ = builderForValue.build(); + onChanged(); + } else { + commonMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder mergeCommonMetadata( + com.google.cloud.documentai.v1beta3.CommonOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (commonMetadata_ != null) { + commonMetadata_ = + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.newBuilder( + commonMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + commonMetadata_ = value; + } + onChanged(); + } else { + commonMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public Builder clearCommonMetadata() { + if (commonMetadataBuilder_ == null) { + commonMetadata_ = null; + onChanged(); + } else { + commonMetadata_ = null; + commonMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder + getCommonMetadataBuilder() { + + onChanged(); + return getCommonMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + public com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + if (commonMetadataBuilder_ != null) { + return commonMetadataBuilder_.getMessageOrBuilder(); + } else { + return commonMetadata_ == null + ? com.google.cloud.documentai.v1beta3.CommonOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + } + /** + * + * + *
+     * The basic metadata of the long running operation.
+     * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.CommonOperationMetadata, + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder, + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder> + getCommonMetadataFieldBuilder() { + if (commonMetadataBuilder_ == null) { + commonMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.CommonOperationMetadata, + com.google.cloud.documentai.v1beta3.CommonOperationMetadata.Builder, + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder>( + getCommonMetadata(), getParentForChildren(), isClean()); + commonMetadata_ = null; + } + return commonMetadataBuilder_; + } + + private com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + trainingDatasetValidation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .Builder, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidationOrBuilder> + trainingDatasetValidationBuilder_; + /** + * + * + *
+     * The training dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + * + * @return Whether the trainingDatasetValidation field is set. + */ + public boolean hasTrainingDatasetValidation() { + return trainingDatasetValidationBuilder_ != null || trainingDatasetValidation_ != null; + } + /** + * + * + *
+     * The training dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + * + * @return The trainingDatasetValidation. + */ + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + getTrainingDatasetValidation() { + if (trainingDatasetValidationBuilder_ == null) { + return trainingDatasetValidation_ == null + ? com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .getDefaultInstance() + : trainingDatasetValidation_; + } else { + return trainingDatasetValidationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The training dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + */ + public Builder setTrainingDatasetValidation( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation value) { + if (trainingDatasetValidationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainingDatasetValidation_ = value; + onChanged(); + } else { + trainingDatasetValidationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The training dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + */ + public Builder setTrainingDatasetValidation( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation.Builder + builderForValue) { + if (trainingDatasetValidationBuilder_ == null) { + trainingDatasetValidation_ = builderForValue.build(); + onChanged(); + } else { + trainingDatasetValidationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The training dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + */ + public Builder mergeTrainingDatasetValidation( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation value) { + if (trainingDatasetValidationBuilder_ == null) { + if (trainingDatasetValidation_ != null) { + trainingDatasetValidation_ = + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .newBuilder(trainingDatasetValidation_) + .mergeFrom(value) + .buildPartial(); + } else { + trainingDatasetValidation_ = value; + } + onChanged(); + } else { + trainingDatasetValidationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The training dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + */ + public Builder clearTrainingDatasetValidation() { + if (trainingDatasetValidationBuilder_ == null) { + trainingDatasetValidation_ = null; + onChanged(); + } else { + trainingDatasetValidation_ = null; + trainingDatasetValidationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The training dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + */ + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .Builder + getTrainingDatasetValidationBuilder() { + + onChanged(); + return getTrainingDatasetValidationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The training dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + */ + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidationOrBuilder + getTrainingDatasetValidationOrBuilder() { + if (trainingDatasetValidationBuilder_ != null) { + return trainingDatasetValidationBuilder_.getMessageOrBuilder(); + } else { + return trainingDatasetValidation_ == null + ? com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .getDefaultInstance() + : trainingDatasetValidation_; + } + } + /** + * + * + *
+     * The training dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .Builder, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidationOrBuilder> + getTrainingDatasetValidationFieldBuilder() { + if (trainingDatasetValidationBuilder_ == null) { + trainingDatasetValidationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .Builder, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidationOrBuilder>( + getTrainingDatasetValidation(), getParentForChildren(), isClean()); + trainingDatasetValidation_ = null; + } + return trainingDatasetValidationBuilder_; + } + + private com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + testDatasetValidation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .Builder, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidationOrBuilder> + testDatasetValidationBuilder_; + /** + * + * + *
+     * The test dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + * + * @return Whether the testDatasetValidation field is set. + */ + public boolean hasTestDatasetValidation() { + return testDatasetValidationBuilder_ != null || testDatasetValidation_ != null; + } + /** + * + * + *
+     * The test dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + * + * @return The testDatasetValidation. + */ + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + getTestDatasetValidation() { + if (testDatasetValidationBuilder_ == null) { + return testDatasetValidation_ == null + ? com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .getDefaultInstance() + : testDatasetValidation_; + } else { + return testDatasetValidationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The test dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + */ + public Builder setTestDatasetValidation( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation value) { + if (testDatasetValidationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + testDatasetValidation_ = value; + onChanged(); + } else { + testDatasetValidationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The test dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + */ + public Builder setTestDatasetValidation( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation.Builder + builderForValue) { + if (testDatasetValidationBuilder_ == null) { + testDatasetValidation_ = builderForValue.build(); + onChanged(); + } else { + testDatasetValidationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The test dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + */ + public Builder mergeTestDatasetValidation( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation value) { + if (testDatasetValidationBuilder_ == null) { + if (testDatasetValidation_ != null) { + testDatasetValidation_ = + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .newBuilder(testDatasetValidation_) + .mergeFrom(value) + .buildPartial(); + } else { + testDatasetValidation_ = value; + } + onChanged(); + } else { + testDatasetValidationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The test dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + */ + public Builder clearTestDatasetValidation() { + if (testDatasetValidationBuilder_ == null) { + testDatasetValidation_ = null; + onChanged(); + } else { + testDatasetValidation_ = null; + testDatasetValidationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The test dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + */ + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .Builder + getTestDatasetValidationBuilder() { + + onChanged(); + return getTestDatasetValidationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The test dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + */ + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidationOrBuilder + getTestDatasetValidationOrBuilder() { + if (testDatasetValidationBuilder_ != null) { + return testDatasetValidationBuilder_.getMessageOrBuilder(); + } else { + return testDatasetValidation_ == null + ? com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .getDefaultInstance() + : testDatasetValidation_; + } + } + /** + * + * + *
+     * The test dataset validation information.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .Builder, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidationOrBuilder> + getTestDatasetValidationFieldBuilder() { + if (testDatasetValidationBuilder_ == null) { + testDatasetValidationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + .Builder, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + .DatasetValidationOrBuilder>( + getTestDatasetValidation(), getParentForChildren(), isClean()); + testDatasetValidation_ = null; + } + return testDatasetValidationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata) + private static final com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata(); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrainProcessorVersionMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionMetadataOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionMetadataOrBuilder.java new file mode 100644 index 000000000000..9f971527b0ef --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionMetadataOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface TrainProcessorVersionMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + boolean hasCommonMetadata(); + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + com.google.cloud.documentai.v1beta3.CommonOperationMetadata getCommonMetadata(); + /** + * + * + *
+   * The basic metadata of the long running operation.
+   * 
+ * + * .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 1; + */ + com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder getCommonMetadataOrBuilder(); + + /** + * + * + *
+   * The training dataset validation information.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + * + * @return Whether the trainingDatasetValidation field is set. + */ + boolean hasTrainingDatasetValidation(); + /** + * + * + *
+   * The training dataset validation information.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + * + * @return The trainingDatasetValidation. + */ + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + getTrainingDatasetValidation(); + /** + * + * + *
+   * The training dataset validation information.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation training_dataset_validation = 2; + * + */ + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidationOrBuilder + getTrainingDatasetValidationOrBuilder(); + + /** + * + * + *
+   * The test dataset validation information.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + * + * @return Whether the testDatasetValidation field is set. + */ + boolean hasTestDatasetValidation(); + /** + * + * + *
+   * The test dataset validation information.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + * + * @return The testDatasetValidation. + */ + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation + getTestDatasetValidation(); + /** + * + * + *
+   * The test dataset validation information.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidation test_dataset_validation = 3; + * + */ + com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata.DatasetValidationOrBuilder + getTestDatasetValidationOrBuilder(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionRequest.java new file mode 100644 index 000000000000..dd9b5870f290 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionRequest.java @@ -0,0 +1,2815 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * Request message for the create processor version method.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.TrainProcessorVersionRequest} + */ +public final class TrainProcessorVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.TrainProcessorVersionRequest) + TrainProcessorVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use TrainProcessorVersionRequest.newBuilder() to construct. + private TrainProcessorVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrainProcessorVersionRequest() { + parent_ = ""; + baseProcessorVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrainProcessorVersionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.class, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.Builder.class); + } + + public interface InputDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The documents used for training the new version.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + * + * @return Whether the trainingDocuments field is set. + */ + boolean hasTrainingDocuments(); + /** + * + * + *
+     * The documents used for training the new version.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + * + * @return The trainingDocuments. + */ + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getTrainingDocuments(); + /** + * + * + *
+     * The documents used for training the new version.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + */ + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder + getTrainingDocumentsOrBuilder(); + + /** + * + * + *
+     * The documents used for testing the trained version.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + * + * @return Whether the testDocuments field is set. + */ + boolean hasTestDocuments(); + /** + * + * + *
+     * The documents used for testing the trained version.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + * + * @return The testDocuments. + */ + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getTestDocuments(); + /** + * + * + *
+     * The documents used for testing the trained version.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + */ + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder + getTestDocumentsOrBuilder(); + } + /** + * + * + *
+   * The input data used to train a new `ProcessorVersion`.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData} + */ + public static final class InputData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData) + InputDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use InputData.newBuilder() to construct. + private InputData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InputData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InputData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_InputData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_InputData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData.class, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData.Builder + .class); + } + + public static final int TRAINING_DOCUMENTS_FIELD_NUMBER = 3; + private com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig trainingDocuments_; + /** + * + * + *
+     * The documents used for training the new version.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + * + * @return Whether the trainingDocuments field is set. + */ + @java.lang.Override + public boolean hasTrainingDocuments() { + return trainingDocuments_ != null; + } + /** + * + * + *
+     * The documents used for training the new version.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + * + * @return The trainingDocuments. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getTrainingDocuments() { + return trainingDocuments_ == null + ? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance() + : trainingDocuments_; + } + /** + * + * + *
+     * The documents used for training the new version.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder + getTrainingDocumentsOrBuilder() { + return getTrainingDocuments(); + } + + public static final int TEST_DOCUMENTS_FIELD_NUMBER = 4; + private com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig testDocuments_; + /** + * + * + *
+     * The documents used for testing the trained version.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + * + * @return Whether the testDocuments field is set. + */ + @java.lang.Override + public boolean hasTestDocuments() { + return testDocuments_ != null; + } + /** + * + * + *
+     * The documents used for testing the trained version.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + * + * @return The testDocuments. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getTestDocuments() { + return testDocuments_ == null + ? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance() + : testDocuments_; + } + /** + * + * + *
+     * The documents used for testing the trained version.
+     * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder + getTestDocumentsOrBuilder() { + return getTestDocuments(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (trainingDocuments_ != null) { + output.writeMessage(3, getTrainingDocuments()); + } + if (testDocuments_ != null) { + output.writeMessage(4, getTestDocuments()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (trainingDocuments_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTrainingDocuments()); + } + if (testDocuments_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTestDocuments()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData other = + (com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData) obj; + + if (hasTrainingDocuments() != other.hasTrainingDocuments()) return false; + if (hasTrainingDocuments()) { + if (!getTrainingDocuments().equals(other.getTrainingDocuments())) return false; + } + if (hasTestDocuments() != other.hasTestDocuments()) return false; + if (hasTestDocuments()) { + if (!getTestDocuments().equals(other.getTestDocuments())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTrainingDocuments()) { + hash = (37 * hash) + TRAINING_DOCUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getTrainingDocuments().hashCode(); + } + if (hasTestDocuments()) { + hash = (37 * hash) + TEST_DOCUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getTestDocuments().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The input data used to train a new `ProcessorVersion`.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData) + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_InputData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_InputData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData.class, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData.Builder + .class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (trainingDocumentsBuilder_ == null) { + trainingDocuments_ = null; + } else { + trainingDocuments_ = null; + trainingDocumentsBuilder_ = null; + } + if (testDocumentsBuilder_ == null) { + testDocuments_ = null; + } else { + testDocuments_ = null; + testDocumentsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_InputData_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData build() { + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + buildPartial() { + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData result = + new com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData(this); + if (trainingDocumentsBuilder_ == null) { + result.trainingDocuments_ = trainingDocuments_; + } else { + result.trainingDocuments_ = trainingDocumentsBuilder_.build(); + } + if (testDocumentsBuilder_ == null) { + result.testDocuments_ = testDocuments_; + } else { + result.testDocuments_ = testDocumentsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData other) { + if (other + == com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + .getDefaultInstance()) return this; + if (other.hasTrainingDocuments()) { + mergeTrainingDocuments(other.getTrainingDocuments()); + } + if (other.hasTestDocuments()) { + mergeTestDocuments(other.getTestDocuments()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: + { + input.readMessage( + getTrainingDocumentsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getTestDocumentsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig trainingDocuments_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder> + trainingDocumentsBuilder_; + /** + * + * + *
+       * The documents used for training the new version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + * + * @return Whether the trainingDocuments field is set. + */ + public boolean hasTrainingDocuments() { + return trainingDocumentsBuilder_ != null || trainingDocuments_ != null; + } + /** + * + * + *
+       * The documents used for training the new version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + * + * @return The trainingDocuments. + */ + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getTrainingDocuments() { + if (trainingDocumentsBuilder_ == null) { + return trainingDocuments_ == null + ? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance() + : trainingDocuments_; + } else { + return trainingDocumentsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The documents used for training the new version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + */ + public Builder setTrainingDocuments( + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig value) { + if (trainingDocumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainingDocuments_ = value; + onChanged(); + } else { + trainingDocumentsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The documents used for training the new version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + */ + public Builder setTrainingDocuments( + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder builderForValue) { + if (trainingDocumentsBuilder_ == null) { + trainingDocuments_ = builderForValue.build(); + onChanged(); + } else { + trainingDocumentsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The documents used for training the new version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + */ + public Builder mergeTrainingDocuments( + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig value) { + if (trainingDocumentsBuilder_ == null) { + if (trainingDocuments_ != null) { + trainingDocuments_ = + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.newBuilder( + trainingDocuments_) + .mergeFrom(value) + .buildPartial(); + } else { + trainingDocuments_ = value; + } + onChanged(); + } else { + trainingDocumentsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The documents used for training the new version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + */ + public Builder clearTrainingDocuments() { + if (trainingDocumentsBuilder_ == null) { + trainingDocuments_ = null; + onChanged(); + } else { + trainingDocuments_ = null; + trainingDocumentsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The documents used for training the new version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder + getTrainingDocumentsBuilder() { + + onChanged(); + return getTrainingDocumentsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The documents used for training the new version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + */ + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder + getTrainingDocumentsOrBuilder() { + if (trainingDocumentsBuilder_ != null) { + return trainingDocumentsBuilder_.getMessageOrBuilder(); + } else { + return trainingDocuments_ == null + ? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance() + : trainingDocuments_; + } + } + /** + * + * + *
+       * The documents used for training the new version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig training_documents = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder> + getTrainingDocumentsFieldBuilder() { + if (trainingDocumentsBuilder_ == null) { + trainingDocumentsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder>( + getTrainingDocuments(), getParentForChildren(), isClean()); + trainingDocuments_ = null; + } + return trainingDocumentsBuilder_; + } + + private com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig testDocuments_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder> + testDocumentsBuilder_; + /** + * + * + *
+       * The documents used for testing the trained version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + * + * @return Whether the testDocuments field is set. + */ + public boolean hasTestDocuments() { + return testDocumentsBuilder_ != null || testDocuments_ != null; + } + /** + * + * + *
+       * The documents used for testing the trained version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + * + * @return The testDocuments. + */ + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getTestDocuments() { + if (testDocumentsBuilder_ == null) { + return testDocuments_ == null + ? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance() + : testDocuments_; + } else { + return testDocumentsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The documents used for testing the trained version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + */ + public Builder setTestDocuments( + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig value) { + if (testDocumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + testDocuments_ = value; + onChanged(); + } else { + testDocumentsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The documents used for testing the trained version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + */ + public Builder setTestDocuments( + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder builderForValue) { + if (testDocumentsBuilder_ == null) { + testDocuments_ = builderForValue.build(); + onChanged(); + } else { + testDocumentsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The documents used for testing the trained version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + */ + public Builder mergeTestDocuments( + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig value) { + if (testDocumentsBuilder_ == null) { + if (testDocuments_ != null) { + testDocuments_ = + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.newBuilder( + testDocuments_) + .mergeFrom(value) + .buildPartial(); + } else { + testDocuments_ = value; + } + onChanged(); + } else { + testDocumentsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The documents used for testing the trained version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + */ + public Builder clearTestDocuments() { + if (testDocumentsBuilder_ == null) { + testDocuments_ = null; + onChanged(); + } else { + testDocuments_ = null; + testDocumentsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The documents used for testing the trained version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + */ + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder + getTestDocumentsBuilder() { + + onChanged(); + return getTestDocumentsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The documents used for testing the trained version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + */ + public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder + getTestDocumentsOrBuilder() { + if (testDocumentsBuilder_ != null) { + return testDocumentsBuilder_.getMessageOrBuilder(); + } else { + return testDocuments_ == null + ? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance() + : testDocuments_; + } + } + /** + * + * + *
+       * The documents used for testing the trained version.
+       * 
+ * + * .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig test_documents = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder> + getTestDocumentsFieldBuilder() { + if (testDocumentsBuilder_ == null) { + testDocumentsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder, + com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder>( + getTestDocuments(), getParentForChildren(), isClean()); + testDocuments_ = null; + } + return testDocumentsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData) + private static final com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData(); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent (project, location and processor) to create the new version for.
+   * Format: `projects/{project}/locations/{location}/processors/{processor}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent (project, location and processor) to create the new version for.
+   * Format: `projects/{project}/locations/{location}/processors/{processor}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROCESSOR_VERSION_FIELD_NUMBER = 2; + private com.google.cloud.documentai.v1beta3.ProcessorVersion processorVersion_; + /** + * + * + *
+   * Required. The processor version to be created.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the processorVersion field is set. + */ + @java.lang.Override + public boolean hasProcessorVersion() { + return processorVersion_ != null; + } + /** + * + * + *
+   * Required. The processor version to be created.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The processorVersion. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessorVersion getProcessorVersion() { + return processorVersion_ == null + ? com.google.cloud.documentai.v1beta3.ProcessorVersion.getDefaultInstance() + : processorVersion_; + } + /** + * + * + *
+   * Required. The processor version to be created.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessorVersionOrBuilder + getProcessorVersionOrBuilder() { + return getProcessorVersion(); + } + + public static final int DOCUMENT_SCHEMA_FIELD_NUMBER = 10; + private com.google.cloud.documentai.v1beta3.DocumentSchema documentSchema_; + /** + * + * + *
+   * Optional. The schema the processor version will be trained with.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the documentSchema field is set. + */ + @java.lang.Override + public boolean hasDocumentSchema() { + return documentSchema_ != null; + } + /** + * + * + *
+   * Optional. The schema the processor version will be trained with.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The documentSchema. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentSchema getDocumentSchema() { + return documentSchema_ == null + ? com.google.cloud.documentai.v1beta3.DocumentSchema.getDefaultInstance() + : documentSchema_; + } + /** + * + * + *
+   * Optional. The schema the processor version will be trained with.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder getDocumentSchemaOrBuilder() { + return getDocumentSchema(); + } + + public static final int INPUT_DATA_FIELD_NUMBER = 4; + private com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData inputData_; + /** + * + * + *
+   * Optional. The input data used to train the `ProcessorVersion`.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputData field is set. + */ + @java.lang.Override + public boolean hasInputData() { + return inputData_ != null; + } + /** + * + * + *
+   * Optional. The input data used to train the `ProcessorVersion`.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputData. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData getInputData() { + return inputData_ == null + ? com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + .getDefaultInstance() + : inputData_; + } + /** + * + * + *
+   * Optional. The input data used to train the `ProcessorVersion`.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputDataOrBuilder + getInputDataOrBuilder() { + return getInputData(); + } + + public static final int BASE_PROCESSOR_VERSION_FIELD_NUMBER = 8; + private volatile java.lang.Object baseProcessorVersion_; + /** + * + * + *
+   * Optional. The processor version to use as a base for training. This processor version
+   * must be a child of `parent`. Format:
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
+   * 
+ * + * string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The baseProcessorVersion. + */ + @java.lang.Override + public java.lang.String getBaseProcessorVersion() { + java.lang.Object ref = baseProcessorVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseProcessorVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The processor version to use as a base for training. This processor version
+   * must be a child of `parent`. Format:
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
+   * 
+ * + * string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for baseProcessorVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaseProcessorVersionBytes() { + java.lang.Object ref = baseProcessorVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseProcessorVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (processorVersion_ != null) { + output.writeMessage(2, getProcessorVersion()); + } + if (inputData_ != null) { + output.writeMessage(4, getInputData()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseProcessorVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, baseProcessorVersion_); + } + if (documentSchema_ != null) { + output.writeMessage(10, getDocumentSchema()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (processorVersion_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProcessorVersion()); + } + if (inputData_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getInputData()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseProcessorVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, baseProcessorVersion_); + } + if (documentSchema_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDocumentSchema()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest other = + (com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasProcessorVersion() != other.hasProcessorVersion()) return false; + if (hasProcessorVersion()) { + if (!getProcessorVersion().equals(other.getProcessorVersion())) return false; + } + if (hasDocumentSchema() != other.hasDocumentSchema()) return false; + if (hasDocumentSchema()) { + if (!getDocumentSchema().equals(other.getDocumentSchema())) return false; + } + if (hasInputData() != other.hasInputData()) return false; + if (hasInputData()) { + if (!getInputData().equals(other.getInputData())) return false; + } + if (!getBaseProcessorVersion().equals(other.getBaseProcessorVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasProcessorVersion()) { + hash = (37 * hash) + PROCESSOR_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getProcessorVersion().hashCode(); + } + if (hasDocumentSchema()) { + hash = (37 * hash) + DOCUMENT_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getDocumentSchema().hashCode(); + } + if (hasInputData()) { + hash = (37 * hash) + INPUT_DATA_FIELD_NUMBER; + hash = (53 * hash) + getInputData().hashCode(); + } + hash = (37 * hash) + BASE_PROCESSOR_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getBaseProcessorVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for the create processor version method.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.TrainProcessorVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.TrainProcessorVersionRequest) + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.class, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (processorVersionBuilder_ == null) { + processorVersion_ = null; + } else { + processorVersion_ = null; + processorVersionBuilder_ = null; + } + if (documentSchemaBuilder_ == null) { + documentSchema_ = null; + } else { + documentSchema_ = null; + documentSchemaBuilder_ = null; + } + if (inputDataBuilder_ == null) { + inputData_ = null; + } else { + inputData_ = null; + inputDataBuilder_ = null; + } + baseProcessorVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest build() { + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest buildPartial() { + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest result = + new com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest(this); + result.parent_ = parent_; + if (processorVersionBuilder_ == null) { + result.processorVersion_ = processorVersion_; + } else { + result.processorVersion_ = processorVersionBuilder_.build(); + } + if (documentSchemaBuilder_ == null) { + result.documentSchema_ = documentSchema_; + } else { + result.documentSchema_ = documentSchemaBuilder_.build(); + } + if (inputDataBuilder_ == null) { + result.inputData_ = inputData_; + } else { + result.inputData_ = inputDataBuilder_.build(); + } + result.baseProcessorVersion_ = baseProcessorVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest) { + return mergeFrom((com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest other) { + if (other + == com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasProcessorVersion()) { + mergeProcessorVersion(other.getProcessorVersion()); + } + if (other.hasDocumentSchema()) { + mergeDocumentSchema(other.getDocumentSchema()); + } + if (other.hasInputData()) { + mergeInputData(other.getInputData()); + } + if (!other.getBaseProcessorVersion().isEmpty()) { + baseProcessorVersion_ = other.baseProcessorVersion_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage( + getProcessorVersionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 34: + { + input.readMessage(getInputDataFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 66: + { + baseProcessorVersion_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 82: + { + input.readMessage(getDocumentSchemaFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent (project, location and processor) to create the new version for.
+     * Format: `projects/{project}/locations/{location}/processors/{processor}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent (project, location and processor) to create the new version for.
+     * Format: `projects/{project}/locations/{location}/processors/{processor}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent (project, location and processor) to create the new version for.
+     * Format: `projects/{project}/locations/{location}/processors/{processor}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent (project, location and processor) to create the new version for.
+     * Format: `projects/{project}/locations/{location}/processors/{processor}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent (project, location and processor) to create the new version for.
+     * Format: `projects/{project}/locations/{location}/processors/{processor}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1beta3.ProcessorVersion processorVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ProcessorVersion, + com.google.cloud.documentai.v1beta3.ProcessorVersion.Builder, + com.google.cloud.documentai.v1beta3.ProcessorVersionOrBuilder> + processorVersionBuilder_; + /** + * + * + *
+     * Required. The processor version to be created.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the processorVersion field is set. + */ + public boolean hasProcessorVersion() { + return processorVersionBuilder_ != null || processorVersion_ != null; + } + /** + * + * + *
+     * Required. The processor version to be created.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The processorVersion. + */ + public com.google.cloud.documentai.v1beta3.ProcessorVersion getProcessorVersion() { + if (processorVersionBuilder_ == null) { + return processorVersion_ == null + ? com.google.cloud.documentai.v1beta3.ProcessorVersion.getDefaultInstance() + : processorVersion_; + } else { + return processorVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The processor version to be created.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProcessorVersion(com.google.cloud.documentai.v1beta3.ProcessorVersion value) { + if (processorVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorVersion_ = value; + onChanged(); + } else { + processorVersionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The processor version to be created.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProcessorVersion( + com.google.cloud.documentai.v1beta3.ProcessorVersion.Builder builderForValue) { + if (processorVersionBuilder_ == null) { + processorVersion_ = builderForValue.build(); + onChanged(); + } else { + processorVersionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The processor version to be created.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeProcessorVersion( + com.google.cloud.documentai.v1beta3.ProcessorVersion value) { + if (processorVersionBuilder_ == null) { + if (processorVersion_ != null) { + processorVersion_ = + com.google.cloud.documentai.v1beta3.ProcessorVersion.newBuilder(processorVersion_) + .mergeFrom(value) + .buildPartial(); + } else { + processorVersion_ = value; + } + onChanged(); + } else { + processorVersionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The processor version to be created.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearProcessorVersion() { + if (processorVersionBuilder_ == null) { + processorVersion_ = null; + onChanged(); + } else { + processorVersion_ = null; + processorVersionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The processor version to be created.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.ProcessorVersion.Builder + getProcessorVersionBuilder() { + + onChanged(); + return getProcessorVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The processor version to be created.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.documentai.v1beta3.ProcessorVersionOrBuilder + getProcessorVersionOrBuilder() { + if (processorVersionBuilder_ != null) { + return processorVersionBuilder_.getMessageOrBuilder(); + } else { + return processorVersion_ == null + ? com.google.cloud.documentai.v1beta3.ProcessorVersion.getDefaultInstance() + : processorVersion_; + } + } + /** + * + * + *
+     * Required. The processor version to be created.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ProcessorVersion, + com.google.cloud.documentai.v1beta3.ProcessorVersion.Builder, + com.google.cloud.documentai.v1beta3.ProcessorVersionOrBuilder> + getProcessorVersionFieldBuilder() { + if (processorVersionBuilder_ == null) { + processorVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ProcessorVersion, + com.google.cloud.documentai.v1beta3.ProcessorVersion.Builder, + com.google.cloud.documentai.v1beta3.ProcessorVersionOrBuilder>( + getProcessorVersion(), getParentForChildren(), isClean()); + processorVersion_ = null; + } + return processorVersionBuilder_; + } + + private com.google.cloud.documentai.v1beta3.DocumentSchema documentSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentSchema, + com.google.cloud.documentai.v1beta3.DocumentSchema.Builder, + com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder> + documentSchemaBuilder_; + /** + * + * + *
+     * Optional. The schema the processor version will be trained with.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the documentSchema field is set. + */ + public boolean hasDocumentSchema() { + return documentSchemaBuilder_ != null || documentSchema_ != null; + } + /** + * + * + *
+     * Optional. The schema the processor version will be trained with.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The documentSchema. + */ + public com.google.cloud.documentai.v1beta3.DocumentSchema getDocumentSchema() { + if (documentSchemaBuilder_ == null) { + return documentSchema_ == null + ? com.google.cloud.documentai.v1beta3.DocumentSchema.getDefaultInstance() + : documentSchema_; + } else { + return documentSchemaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The schema the processor version will be trained with.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDocumentSchema(com.google.cloud.documentai.v1beta3.DocumentSchema value) { + if (documentSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + documentSchema_ = value; + onChanged(); + } else { + documentSchemaBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The schema the processor version will be trained with.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDocumentSchema( + com.google.cloud.documentai.v1beta3.DocumentSchema.Builder builderForValue) { + if (documentSchemaBuilder_ == null) { + documentSchema_ = builderForValue.build(); + onChanged(); + } else { + documentSchemaBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The schema the processor version will be trained with.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDocumentSchema(com.google.cloud.documentai.v1beta3.DocumentSchema value) { + if (documentSchemaBuilder_ == null) { + if (documentSchema_ != null) { + documentSchema_ = + com.google.cloud.documentai.v1beta3.DocumentSchema.newBuilder(documentSchema_) + .mergeFrom(value) + .buildPartial(); + } else { + documentSchema_ = value; + } + onChanged(); + } else { + documentSchemaBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The schema the processor version will be trained with.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDocumentSchema() { + if (documentSchemaBuilder_ == null) { + documentSchema_ = null; + onChanged(); + } else { + documentSchema_ = null; + documentSchemaBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The schema the processor version will be trained with.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta3.DocumentSchema.Builder getDocumentSchemaBuilder() { + + onChanged(); + return getDocumentSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The schema the processor version will be trained with.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder + getDocumentSchemaOrBuilder() { + if (documentSchemaBuilder_ != null) { + return documentSchemaBuilder_.getMessageOrBuilder(); + } else { + return documentSchema_ == null + ? com.google.cloud.documentai.v1beta3.DocumentSchema.getDefaultInstance() + : documentSchema_; + } + } + /** + * + * + *
+     * Optional. The schema the processor version will be trained with.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentSchema, + com.google.cloud.documentai.v1beta3.DocumentSchema.Builder, + com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder> + getDocumentSchemaFieldBuilder() { + if (documentSchemaBuilder_ == null) { + documentSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.DocumentSchema, + com.google.cloud.documentai.v1beta3.DocumentSchema.Builder, + com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder>( + getDocumentSchema(), getParentForChildren(), isClean()); + documentSchema_ = null; + } + return documentSchemaBuilder_; + } + + private com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData inputData_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData.Builder, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputDataOrBuilder> + inputDataBuilder_; + /** + * + * + *
+     * Optional. The input data used to train the `ProcessorVersion`.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputData field is set. + */ + public boolean hasInputData() { + return inputDataBuilder_ != null || inputData_ != null; + } + /** + * + * + *
+     * Optional. The input data used to train the `ProcessorVersion`.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputData. + */ + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + getInputData() { + if (inputDataBuilder_ == null) { + return inputData_ == null + ? com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + .getDefaultInstance() + : inputData_; + } else { + return inputDataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The input data used to train the `ProcessorVersion`.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputData( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData value) { + if (inputDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputData_ = value; + onChanged(); + } else { + inputDataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The input data used to train the `ProcessorVersion`.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputData( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData.Builder + builderForValue) { + if (inputDataBuilder_ == null) { + inputData_ = builderForValue.build(); + onChanged(); + } else { + inputDataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The input data used to train the `ProcessorVersion`.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInputData( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData value) { + if (inputDataBuilder_ == null) { + if (inputData_ != null) { + inputData_ = + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData.newBuilder( + inputData_) + .mergeFrom(value) + .buildPartial(); + } else { + inputData_ = value; + } + onChanged(); + } else { + inputDataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The input data used to train the `ProcessorVersion`.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInputData() { + if (inputDataBuilder_ == null) { + inputData_ = null; + onChanged(); + } else { + inputData_ = null; + inputDataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The input data used to train the `ProcessorVersion`.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData.Builder + getInputDataBuilder() { + + onChanged(); + return getInputDataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The input data used to train the `ProcessorVersion`.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputDataOrBuilder + getInputDataOrBuilder() { + if (inputDataBuilder_ != null) { + return inputDataBuilder_.getMessageOrBuilder(); + } else { + return inputData_ == null + ? com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData + .getDefaultInstance() + : inputData_; + } + } + /** + * + * + *
+     * Optional. The input data used to train the `ProcessorVersion`.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData.Builder, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputDataOrBuilder> + getInputDataFieldBuilder() { + if (inputDataBuilder_ == null) { + inputDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData.Builder, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest + .InputDataOrBuilder>(getInputData(), getParentForChildren(), isClean()); + inputData_ = null; + } + return inputDataBuilder_; + } + + private java.lang.Object baseProcessorVersion_ = ""; + /** + * + * + *
+     * Optional. The processor version to use as a base for training. This processor version
+     * must be a child of `parent`. Format:
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
+     * 
+ * + * string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The baseProcessorVersion. + */ + public java.lang.String getBaseProcessorVersion() { + java.lang.Object ref = baseProcessorVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseProcessorVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The processor version to use as a base for training. This processor version
+     * must be a child of `parent`. Format:
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
+     * 
+ * + * string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for baseProcessorVersion. + */ + public com.google.protobuf.ByteString getBaseProcessorVersionBytes() { + java.lang.Object ref = baseProcessorVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseProcessorVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The processor version to use as a base for training. This processor version
+     * must be a child of `parent`. Format:
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
+     * 
+ * + * string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The baseProcessorVersion to set. + * @return This builder for chaining. + */ + public Builder setBaseProcessorVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + baseProcessorVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The processor version to use as a base for training. This processor version
+     * must be a child of `parent`. Format:
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
+     * 
+ * + * string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearBaseProcessorVersion() { + + baseProcessorVersion_ = getDefaultInstance().getBaseProcessorVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The processor version to use as a base for training. This processor version
+     * must be a child of `parent`. Format:
+     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
+     * 
+ * + * string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for baseProcessorVersion to set. + * @return This builder for chaining. + */ + public Builder setBaseProcessorVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + baseProcessorVersion_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.TrainProcessorVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.TrainProcessorVersionRequest) + private static final com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest(); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrainProcessorVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionRequestOrBuilder.java new file mode 100644 index 000000000000..4e198bb51fe4 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionRequestOrBuilder.java @@ -0,0 +1,209 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface TrainProcessorVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.TrainProcessorVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent (project, location and processor) to create the new version for.
+   * Format: `projects/{project}/locations/{location}/processors/{processor}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent (project, location and processor) to create the new version for.
+   * Format: `projects/{project}/locations/{location}/processors/{processor}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The processor version to be created.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the processorVersion field is set. + */ + boolean hasProcessorVersion(); + /** + * + * + *
+   * Required. The processor version to be created.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The processorVersion. + */ + com.google.cloud.documentai.v1beta3.ProcessorVersion getProcessorVersion(); + /** + * + * + *
+   * Required. The processor version to be created.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.documentai.v1beta3.ProcessorVersionOrBuilder getProcessorVersionOrBuilder(); + + /** + * + * + *
+   * Optional. The schema the processor version will be trained with.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the documentSchema field is set. + */ + boolean hasDocumentSchema(); + /** + * + * + *
+   * Optional. The schema the processor version will be trained with.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The documentSchema. + */ + com.google.cloud.documentai.v1beta3.DocumentSchema getDocumentSchema(); + /** + * + * + *
+   * Optional. The schema the processor version will be trained with.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder getDocumentSchemaOrBuilder(); + + /** + * + * + *
+   * Optional. The input data used to train the `ProcessorVersion`.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputData field is set. + */ + boolean hasInputData(); + /** + * + * + *
+   * Optional. The input data used to train the `ProcessorVersion`.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputData. + */ + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData getInputData(); + /** + * + * + *
+   * Optional. The input data used to train the `ProcessorVersion`.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.InputDataOrBuilder + getInputDataOrBuilder(); + + /** + * + * + *
+   * Optional. The processor version to use as a base for training. This processor version
+   * must be a child of `parent`. Format:
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
+   * 
+ * + * string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The baseProcessorVersion. + */ + java.lang.String getBaseProcessorVersion(); + /** + * + * + *
+   * Optional. The processor version to use as a base for training. This processor version
+   * must be a child of `parent`. Format:
+   * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
+   * 
+ * + * string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for baseProcessorVersion. + */ + com.google.protobuf.ByteString getBaseProcessorVersionBytes(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionResponse.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionResponse.java new file mode 100644 index 000000000000..af97d4856b39 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionResponse.java @@ -0,0 +1,624 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +/** + * + * + *
+ * The response for the TrainProcessorVersion method.
+ * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.TrainProcessorVersionResponse} + */ +public final class TrainProcessorVersionResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.TrainProcessorVersionResponse) + TrainProcessorVersionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use TrainProcessorVersionResponse.newBuilder() to construct. + private TrainProcessorVersionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrainProcessorVersionResponse() { + processorVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrainProcessorVersionResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse.class, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse.Builder.class); + } + + public static final int PROCESSOR_VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object processorVersion_; + /** + * + * + *
+   * The resource name of the processor version produced by training.
+   * 
+ * + * string processor_version = 1; + * + * @return The processorVersion. + */ + @java.lang.Override + public java.lang.String getProcessorVersion() { + java.lang.Object ref = processorVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + processorVersion_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the processor version produced by training.
+   * 
+ * + * string processor_version = 1; + * + * @return The bytes for processorVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProcessorVersionBytes() { + java.lang.Object ref = processorVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processorVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processorVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, processorVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processorVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, processorVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse other = + (com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse) obj; + + if (!getProcessorVersion().equals(other.getProcessorVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROCESSOR_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getProcessorVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response for the TrainProcessorVersion method.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.TrainProcessorVersionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.TrainProcessorVersionResponse) + com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse.class, + com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + processorVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_TrainProcessorVersionResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse build() { + com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse buildPartial() { + com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse result = + new com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse(this); + result.processorVersion_ = processorVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse) { + return mergeFrom((com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse other) { + if (other + == com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse.getDefaultInstance()) + return this; + if (!other.getProcessorVersion().isEmpty()) { + processorVersion_ = other.processorVersion_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + processorVersion_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object processorVersion_ = ""; + /** + * + * + *
+     * The resource name of the processor version produced by training.
+     * 
+ * + * string processor_version = 1; + * + * @return The processorVersion. + */ + public java.lang.String getProcessorVersion() { + java.lang.Object ref = processorVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + processorVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the processor version produced by training.
+     * 
+ * + * string processor_version = 1; + * + * @return The bytes for processorVersion. + */ + public com.google.protobuf.ByteString getProcessorVersionBytes() { + java.lang.Object ref = processorVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processorVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the processor version produced by training.
+     * 
+ * + * string processor_version = 1; + * + * @param value The processorVersion to set. + * @return This builder for chaining. + */ + public Builder setProcessorVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + processorVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the processor version produced by training.
+     * 
+ * + * string processor_version = 1; + * + * @return This builder for chaining. + */ + public Builder clearProcessorVersion() { + + processorVersion_ = getDefaultInstance().getProcessorVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the processor version produced by training.
+     * 
+ * + * string processor_version = 1; + * + * @param value The bytes for processorVersion to set. + * @return This builder for chaining. + */ + public Builder setProcessorVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + processorVersion_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.TrainProcessorVersionResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.TrainProcessorVersionResponse) + private static final com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse(); + } + + public static com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrainProcessorVersionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionResponseOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionResponseOrBuilder.java new file mode 100644 index 000000000000..86db43a82ca8 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/TrainProcessorVersionResponseOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/documentai/v1beta3/document_processor_service.proto + +package com.google.cloud.documentai.v1beta3; + +public interface TrainProcessorVersionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.TrainProcessorVersionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the processor version produced by training.
+   * 
+ * + * string processor_version = 1; + * + * @return The processorVersion. + */ + java.lang.String getProcessorVersion(); + /** + * + * + *
+   * The resource name of the processor version produced by training.
+   * 
+ * + * string processor_version = 1; + * + * @return The bytes for processorVersion. + */ + com.google.protobuf.ByteString getProcessorVersionBytes(); +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/barcode.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/barcode.proto index 7c7050a868be..9b063faf287a 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/barcode.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/barcode.proto @@ -28,40 +28,42 @@ option ruby_package = "Google::Cloud::DocumentAI::V1beta3"; message Barcode { // Format of a barcode. // The supported formats are: - // CODE_128: Code 128 type. - // CODE_39: Code 39 type. - // CODE_93: Code 93 type. - // CODABAR: Codabar type. - // DATA_MATRIX: 2D Data Matrix type. - // ITF: ITF type. - // EAN_13: EAN-13 type. - // EAN_8: EAN-8 type. - // QR_CODE: 2D QR code type. - // UPC_A: UPC-A type. - // UPC_E: UPC-E type. - // PDF417: PDF417 type. - // AZTEC: 2D Aztec code type. - // DATABAR: GS1 DataBar code type. + // + // - `CODE_128`: Code 128 type. + // - `CODE_39`: Code 39 type. + // - `CODE_93`: Code 93 type. + // - `CODABAR`: Codabar type. + // - `DATA_MATRIX`: 2D Data Matrix type. + // - `ITF`: ITF type. + // - `EAN_13`: EAN-13 type. + // - `EAN_8`: EAN-8 type. + // - `QR_CODE`: 2D QR code type. + // - `UPC_A`: UPC-A type. + // - `UPC_E`: UPC-E type. + // - `PDF417`: PDF417 type. + // - `AZTEC`: 2D Aztec code type. + // - `DATABAR`: GS1 DataBar code type. string format = 1; // Value format describes the format of the value that a barcode // encodes. // The supported formats are: - // CONTACT_INFO: Contact information. - // EMAIL: Email address. - // ISBN: ISBN identifier. - // PHONE: Phone number. - // PRODUCT: Product. - // SMS: SMS message. - // TEXT: Text string. - // URL: URL address. - // WIFI: Wifi information. - // GEO: Geo-localization. - // CALENDAR_EVENT: Calendar event. - // DRIVER_LICENSE: Driver's license. + // + // - `CONTACT_INFO`: Contact information. + // - `EMAIL`: Email address. + // - `ISBN`: ISBN identifier. + // - `PHONE`: Phone number. + // - `PRODUCT`: Product. + // - `SMS`: SMS message. + // - `TEXT`: Text string. + // - `URL`: URL address. + // - `WIFI`: Wifi information. + // - `GEO`: Geo-localization. + // - `CALENDAR_EVENT`: Calendar event. + // - `DRIVER_LICENSE`: Driver's license. string value_format = 2; // Raw value encoded in the barcode. - // For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'. + // For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. string raw_value = 3; } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto index 809a64ea4c7b..2ae46db8e240 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto @@ -91,6 +91,10 @@ message Document { // Font size. FontSize font_size = 7; + + // Font family such as `Arial`, `Times New Roman`. + // https://www.w3schools.com/cssref/pr_font_font-family.asp + string font_family = 8; } // A page in a [Document][google.cloud.documentai.v1beta3.Document]. @@ -169,7 +173,7 @@ message Document { // Confidence of the current [Layout][google.cloud.documentai.v1beta3.Document.Page.Layout] within context of the object this // layout is for. e.g. confidence can be for a single token, a table, - // a visual element, etc. depending on context. Range [0, 1]. + // a visual element, etc. depending on context. Range `[0, 1]`. float confidence = 2; // The bounding polygon for the [Layout][google.cloud.documentai.v1beta3.Document.Page.Layout]. @@ -189,7 +193,7 @@ message Document { repeated DetectedLanguage detected_languages = 2; // The history of this annotation. - Provenance provenance = 3; + Provenance provenance = 3 [deprecated = true]; } // A collection of lines that a human would perceive as a paragraph. @@ -201,7 +205,7 @@ message Document { repeated DetectedLanguage detected_languages = 2; // The history of this annotation. - Provenance provenance = 3; + Provenance provenance = 3 [deprecated = true]; } // A collection of tokens that a human would perceive as a line. @@ -214,7 +218,7 @@ message Document { repeated DetectedLanguage detected_languages = 2; // The history of this annotation. - Provenance provenance = 3; + Provenance provenance = 3 [deprecated = true]; } // A detected token. @@ -249,8 +253,8 @@ message Document { // A list of detected languages together with confidence. repeated DetectedLanguage detected_languages = 3; - // The history of this annotation. - Provenance provenance = 4; + // The history of this annotation. + Provenance provenance = 4 [deprecated = true]; } // A detected symbol. @@ -309,6 +313,9 @@ message Document { // A list of detected languages together with confidence. repeated DetectedLanguage detected_languages = 4; + + // The history of this table. + Provenance provenance = 5; } // A form field detected on the page. @@ -358,15 +365,43 @@ message Document { // Detected language for a structural component. message DetectedLanguage { - // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // The BCP-47 language code, such as `en-US` or `sr-Latn`. For more // information, see // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. string language_code = 1; - // Confidence of detected language. Range [0, 1]. + // Confidence of detected language. Range `[0, 1]`. float confidence = 2; } + // Image Quality Scores for the page image + message ImageQualityScores { + // Image Quality Defects + message DetectedDefect { + // Name of the defect type. Supported values are: + // + // - `quality/defect_blurry` + // - `quality/defect_noisy` + // - `quality/defect_dark` + // - `quality/defect_faint` + // - `quality/defect_text_too_small` + // - `quality/defect_document_cutoff` + // - `quality/defect_text_cutoff` + // - `quality/defect_glare` + string type = 1; + + // Confidence of detected defect. Range `[0, 1]` where 1 indicates + // strong confidence of that the defect exists. + float confidence = 2; + } + + // The overall quality score. Range `[0, 1]` where 1 is perfect quality. + float quality_score = 1; + + // A list of detected defects. + repeated DetectedDefect detected_defects = 2; + } + // 1-based index for current [Page][google.cloud.documentai.v1beta3.Document.Page] in a parent [Document][google.cloud.documentai.v1beta3.Document]. // Useful when a page is taken out of a [Document][google.cloud.documentai.v1beta3.Document] for individual // processing. @@ -422,8 +457,11 @@ message Document { // A list of detected barcodes. repeated DetectedBarcode detected_barcodes = 15; + // Image Quality Scores. + ImageQualityScores image_quality_scores = 17; + // The history of this page. - Provenance provenance = 16; + Provenance provenance = 16 [deprecated = true]; } // An entity that could be a phrase in the text or a property that belongs to @@ -471,6 +509,7 @@ message Document { // or int normalized text by default. // // Below are sample formats mapped to structured values. + // // - Money/Currency type (`money_value`) is in the ISO 4217 text format. // - Date type (`date_value`) is in the ISO 8601 text format. // - Datetime type (`datetime_value`) is in the ISO 8601 text format. @@ -484,14 +523,13 @@ message Document { // 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. + // Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. string mention_text = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Deprecated. Use `id` field instead. string mention_id = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Confidence of detected Schema entity. Range [0, 1]. + // Optional. Confidence of detected Schema entity. Range `[0, 1]`. float confidence = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. Represents the provenance of this entity wrt. the location on the @@ -605,7 +643,7 @@ message Document { // Optional. Identifies the bounding polygon of a layout element on the page. BoundingPoly bounding_poly = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Confidence of detected page element, if applicable. Range [0, 1]. + // Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. float confidence = 5 [(google.api.field_behavior) = OPTIONAL]; } @@ -726,7 +764,7 @@ message Document { string changed_text = 2; // The history of this annotation. - repeated Provenance provenance = 3; + repeated Provenance provenance = 3 [deprecated = true]; } // Original source document from the user. @@ -765,9 +803,9 @@ message Document { // Placeholder. Relationship among [Document.entities][google.cloud.documentai.v1beta3.Document.entities]. repeated EntityRelation entity_relations = 8; - // Placeholder. A list of text corrections made to [Document.text]. This is - // usually used for annotating corrections to OCR mistakes. Text changes for - // a given revision may not overlap with each other. + // Placeholder. A list of text corrections made to [Document.text][google.cloud.documentai.v1beta3.Document.text]. This + // is usually used for annotating corrections to OCR mistakes. Text changes + // for a given revision may not overlap with each other. repeated TextChange text_changes = 14; // Information about the sharding if this document is sharded part of a larger diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_io.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_io.proto index a0d410c8cb49..e41458e0a241 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_io.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_io.proto @@ -16,6 +16,8 @@ syntax = "proto3"; package google.cloud.documentai.v1beta3; +import "google/protobuf/field_mask.proto"; + option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3"; option go_package = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta3;documentai"; option java_multiple_files = true; @@ -30,7 +32,7 @@ message RawDocument { bytes content = 1; // An IANA MIME type (RFC6838) indicating the nature and format of the - // [content]. + // [content][google.cloud.documentai.v1beta3.RawDocument.content]. string mime_type = 2; } @@ -59,7 +61,7 @@ message GcsPrefix { message BatchDocumentsInputConfig { // The source. oneof source { - // The set of documents that match the specified Cloud Storage [gcs_prefix]. + // The set of documents that match the specified Cloud Storage `gcs_prefix`. GcsPrefix gcs_prefix = 1; // The set of documents individually specified on Cloud Storage. @@ -74,6 +76,11 @@ message DocumentOutputConfig { message GcsOutputConfig { // The Cloud Storage uri (a directory) of the output. string gcs_uri = 1; + + // Specifies which fields to include in the output documents. + // Only supports top level document and pages field so it must be in the + // form of `{document_field_name}` or `pages.{page_field_name}`. + google.protobuf.FieldMask field_mask = 2; } // The destination of the results. diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto index 952db5904d57..34e3380413b3 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/documentai/v1beta3/document.proto"; import "google/cloud/documentai/v1beta3/document_io.proto"; import "google/cloud/documentai/v1beta3/document_schema.proto"; +import "google/cloud/documentai/v1beta3/evaluation.proto"; import "google/cloud/documentai/v1beta3/operation_metadata.proto"; import "google/cloud/documentai/v1beta3/processor.proto"; import "google/cloud/documentai/v1beta3/processor_type.proto"; @@ -119,6 +120,21 @@ service DocumentProcessorService { option (google.api.method_signature) = "name"; } + // Trains a new processor version. + // Operation metadata is returned as + // cloud_documentai_core.TrainProcessorVersionMetadata. + rpc TrainProcessorVersion(TrainProcessorVersionRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta3/{parent=projects/*/locations/*/processors/*}/processorVersions:train" + body: "*" + }; + option (google.api.method_signature) = "parent,processor_version"; + option (google.longrunning.operation_info) = { + response_type: "TrainProcessorVersionResponse" + metadata_type: "TrainProcessorVersionMetadata" + }; + } + // Gets a processor version detail. rpc GetProcessorVersion(GetProcessorVersionRequest) returns (ProcessorVersion) { option (google.api.http) = { @@ -248,6 +264,36 @@ service DocumentProcessorService { metadata_type: "ReviewDocumentOperationMetadata" }; } + + // Evaluates a ProcessorVersion against annotated documents, producing an + // Evaluation. + rpc EvaluateProcessorVersion(EvaluateProcessorVersionRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta3/{processor_version=projects/*/locations/*/processors/*/processorVersions/*}:evaluateProcessorVersion" + body: "*" + }; + option (google.api.method_signature) = "processor_version"; + option (google.longrunning.operation_info) = { + response_type: "EvaluateProcessorVersionResponse" + metadata_type: "EvaluateProcessorVersionMetadata" + }; + } + + // Retrieves a specific evaluation. + rpc GetEvaluation(GetEvaluationRequest) returns (Evaluation) { + option (google.api.http) = { + get: "/v1beta3/{name=projects/*/locations/*/processors/*/processorVersions/*/evaluations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Retrieves a set of evaluations for a given processor version. + rpc ListEvaluations(ListEvaluationsRequest) returns (ListEvaluationsResponse) { + option (google.api.http) = { + get: "/v1beta3/{parent=projects/*/locations/*/processors/*/processorVersions/*}/evaluations" + }; + option (google.api.method_signature) = "parent"; + } } // Request message for the process document method. @@ -282,6 +328,8 @@ message ProcessRequest { bool skip_human_review = 3; // Specifies which fields to include in ProcessResponse's document. + // Only supports top level document and pages field so it must be in the form + // of `{document_field_name}` or `pages.{page_field_name}`. google.protobuf.FieldMask field_mask = 6; } @@ -769,6 +817,79 @@ message SetDefaultProcessorVersionMetadata { CommonOperationMetadata common_metadata = 1; } +// Request message for the create processor version method. +message TrainProcessorVersionRequest { + // The input data used to train a new `ProcessorVersion`. + message InputData { + // The documents used for training the new version. + BatchDocumentsInputConfig training_documents = 3; + + // The documents used for testing the trained version. + BatchDocumentsInputConfig test_documents = 4; + } + + // Required. The parent (project, location and processor) to create the new version for. + // Format: `projects/{project}/locations/{location}/processors/{processor}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "documentai.googleapis.com/ProcessorVersion" + } + ]; + + // Required. The processor version to be created. + ProcessorVersion processor_version = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The schema the processor version will be trained with. + DocumentSchema document_schema = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The input data used to train the `ProcessorVersion`. + InputData input_data = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The processor version to use as a base for training. This processor version + // must be a child of `parent`. Format: + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. + string base_processor_version = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response for the TrainProcessorVersion method. +message TrainProcessorVersionResponse { + // The resource name of the processor version produced by training. + string processor_version = 1; +} + +// The metadata that represents a processor version being created. +message TrainProcessorVersionMetadata { + // The dataset validation information. + // This includes any and all errors with documents and the dataset. + message DatasetValidation { + // The total number of document errors. + int32 document_error_count = 3; + + // The total number of dataset errors. + int32 dataset_error_count = 4; + + // Error information pertaining to specific documents. A maximum of 10 + // document errors will be returned. + // Any document with errors will not be used throughout training. + repeated google.rpc.Status document_errors = 1; + + // Error information for the dataset as a whole. A maximum of 10 dataset + // errors will be returned. + // A single dataset error is terminal for training. + repeated google.rpc.Status dataset_errors = 2; + } + + // The basic metadata of the long running operation. + CommonOperationMetadata common_metadata = 1; + + // The training dataset validation information. + DatasetValidation training_dataset_validation = 2; + + // The test dataset validation information. + DatasetValidation test_dataset_validation = 3; +} + // Request message for review document method. message ReviewDocumentRequest { // The priority level of the human review task. @@ -876,3 +997,74 @@ message ReviewDocumentOperationMetadata { // The Crowd Compute question ID. string question_id = 6; } + +// Evaluates the given ProcessorVersion against the supplied documents. +message EvaluateProcessorVersionRequest { + // Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to evaluate. + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + string processor_version = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "documentai.googleapis.com/ProcessorVersion" + } + ]; + + // Optional. The documents used in the evaluation. If unspecified, use the processor's + // dataset as evaluation input. + BatchDocumentsInputConfig evaluation_documents = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata of the EvaluateProcessorVersion method. +message EvaluateProcessorVersionMetadata { + // The basic metadata of the long running operation. + CommonOperationMetadata common_metadata = 1; +} + +// Metadata of the EvaluateProcessorVersion method. +message EvaluateProcessorVersionResponse { + // The resource name of the created evaluation. + string evaluation = 2; +} + +// Retrieves a specific Evaluation. +message GetEvaluationRequest { + // Required. The resource name of the [Evaluation][google.cloud.documentai.v1beta3.Evaluation] to get. + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "documentai.googleapis.com/Evaluation" + } + ]; +} + +// Retrieves a list of evaluations for a given ProcessorVersion. +message ListEvaluationsRequest { + // Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to list evaluations for. + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "documentai.googleapis.com/ProcessorVersion" + } + ]; + + // The standard list page size. + // If unspecified, at most 5 evaluations will be returned. + // The maximum value is 100; values above 100 will be coerced to 100. + int32 page_size = 2; + + // A page token, received from a previous `ListEvaluations` call. + // Provide this to retrieve the subsequent page. + string page_token = 3; +} + +// The response from ListEvaluations. +message ListEvaluationsResponse { + // The evaluations requested. + repeated Evaluation evaluations = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_schema.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_schema.proto index 214e56864dea..1e29f7c89d9a 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_schema.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_schema.proto @@ -86,15 +86,16 @@ message DocumentSchema { // Name of the type. It must be unique within the schema file and // cannot be a 'Common Type'. Besides that we use the following naming // conventions: - // - *use snake_casing* + // + // - *use `snake_casing`* // - name matching is case-insensitive // - Maximum 64 characters. // - Must start with a letter. // - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward // compatibility internal infrastructure and tooling can handle any ascii // character) - // - The '/' is sometimes used to denote a property of a type. For example - // line_item/amount. This convention is deprecated, but will still be + // - The `/` is sometimes used to denote a property of a type. For example + // `line_item/amount`. This convention is deprecated, but will still be // honored for backward compatibility. string name = 1; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/evaluation.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/evaluation.proto new file mode 100644 index 000000000000..c6aa30e7ab44 --- /dev/null +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/evaluation.proto @@ -0,0 +1,164 @@ +// 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. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.documentai.v1beta3; + +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta3;documentai"; +option java_multiple_files = true; +option java_outer_classname = "DocumentAiEvaluation"; +option java_package = "com.google.cloud.documentai.v1beta3"; +option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta3"; +option ruby_package = "Google::Cloud::DocumentAI::V1beta3"; + +// An evaluation of a ProcessorVersion's performance. +message Evaluation { + option (google.api.resource) = { + type: "documentai.googleapis.com/Evaluation" + pattern: "projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}" + }; + + // Evaluation counters for the documents that were used. + message Counters { + // How many documents were sent for evaluation. + int32 input_documents_count = 1; + + // How many documents were not included in the evaluation as they didn't + // pass validation. + int32 invalid_documents_count = 2; + + // How many documents were not included in the evaluation as Document AI + // failed to process them. + int32 failed_documents_count = 3; + + // How many documents were used in the evaluation. + int32 evaluated_documents_count = 4; + } + + // Evaluation metrics, either in aggregate or about a specific entity. + message Metrics { + // The calculated precision. + float precision = 1; + + // The calculated recall. + float recall = 2; + + // The calculated f1 score. + float f1_score = 3; + + // The amount of occurrences in predicted documents. + int32 predicted_occurrences_count = 4; + + // The amount of occurrences in ground truth documents. + int32 ground_truth_occurrences_count = 5; + + // The amount of documents with a predicted occurrence. + int32 predicted_document_count = 10; + + // The amount of documents with a ground truth occurrence. + int32 ground_truth_document_count = 11; + + // The amount of true positives. + int32 true_positives_count = 6; + + // The amount of false positives. + int32 false_positives_count = 7; + + // The amount of false negatives. + int32 false_negatives_count = 8; + + // The amount of documents that had an occurrence of this label. + int32 total_documents_count = 9; + } + + // Evaluations metrics, at a specific confidence level. + message ConfidenceLevelMetrics { + // The confidence level. + float confidence_level = 1; + + // The metrics at the specific confidence level. + Metrics metrics = 2; + } + + // Metrics across multiple confidence levels. + message MultiConfidenceMetrics { + // A type that determines how metrics should be interpreted. + enum MetricsType { + // The metrics type is unspecified. By default, metrics without a + // particular specification are for leaf entity types (i.e., top-level + // entity types without child types, or child types which are not + // parent types themselves). + METRICS_TYPE_UNSPECIFIED = 0; + + // Indicates whether metrics for this particular label type represent an + // aggregate of metrics for other types instead of being based on actual + // TP/FP/FN values for the label type. Metrics for parent (i.e., non-leaf) + // entity types are an aggregate of metrics for their children. + AGGREGATE = 1; + } + + // Metrics across confidence levels with fuzzy matching enabled. + repeated ConfidenceLevelMetrics confidence_level_metrics = 1; + + // Metrics across confidence levels with only exact matching. + repeated ConfidenceLevelMetrics confidence_level_metrics_exact = 4; + + // The calculated area under the precision recall curve (AUPRC), computed by + // integrating over all confidence thresholds. + float auprc = 2; + + // The Estimated Calibration Error (ECE) of the confidence of the predicted + // entities. + float estimated_calibration_error = 3; + + // The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching + // only. + float auprc_exact = 5; + + // The ECE for the predicted entities with fuzzy matching disabled, i.e., + // exact matching only. + float estimated_calibration_error_exact = 6; + + // The metrics type for the label. + MetricsType metrics_type = 7; + } + + // The resource name of the evaluation. + // Format: + // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` + string name = 1; + + // The time that the evaluation was created. + google.protobuf.Timestamp create_time = 2; + + // Counters for the documents used in the evaluation. + Counters document_counters = 5; + + // Metrics for all the entities in aggregate. + MultiConfidenceMetrics all_entities_metrics = 3; + + // Metrics across confidence levels, for different entities. + map entity_metrics = 4; + + // The KMS key name used for encryption. + string kms_key_name = 6; + + // The KMS key version with which data is encrypted. + string kms_key_version_name = 7; +} diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor.proto index b7019bf4d128..db13e89defa9 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor.proto @@ -18,6 +18,7 @@ package google.cloud.documentai.v1beta3; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/documentai/v1beta3/document_schema.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3"; @@ -85,6 +86,9 @@ message ProcessorVersion { // The display name of the processor version. string display_name = 2; + // The schema of the processor version. Describes the output. + DocumentSchema document_schema = 12; + // The state of the processor version. State state = 6; @@ -125,14 +129,14 @@ message Processor { // The processor is disabled. DISABLED = 2; - // The processor is being enabled, will become ENABLED if successful. + // The processor is being enabled, will become `ENABLED` if successful. ENABLING = 3; - // The processor is being disabled, will become DISABLED if successful. + // The processor is being disabled, will become `DISABLED` if successful. DISABLING = 4; - // The processor is being created, will become either ENABLED (for - // successful creation) or FAILED (for failed ones). + // The processor is being created, will become either `ENABLED` (for + // successful creation) or `FAILED` (for failed ones). // Once a processor is in this state, it can then be used for document // processing, but the feature dependencies of the processor might not be // fully created yet. @@ -154,7 +158,7 @@ message Processor { (google.api.field_behavior) = OUTPUT_ONLY ]; - // The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc. + // The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc. // To get a list of processors types, see // [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes]. string type = 2; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor_type.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor_type.proto index a2799e301a91..9afbf04d481e 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor_type.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor_type.proto @@ -42,10 +42,10 @@ message ProcessorType { } // The resource name of the processor type. - // Format: projects/{project}/processorTypes/{processor_type} + // Format: `projects/{project}/processorTypes/{processor_type}` string name = 1; - // The type of the processor, e.g., "invoice_parsing". + // The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc. string type = 2; // The processor category, used by UI to group processor types. diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/batchprocessdocuments/SyncBatchProcessDocumentsString.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/batchprocessdocuments/SyncBatchProcessDocumentsString.java index 18d64cfaf097..0129a690d44c 100644 --- a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/batchprocessdocuments/SyncBatchProcessDocumentsString.java +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/batchprocessdocuments/SyncBatchProcessDocumentsString.java @@ -19,7 +19,7 @@ // [START documentai_v1beta3_generated_DocumentProcessorService_BatchProcessDocuments_String_sync] import com.google.cloud.documentai.v1beta3.BatchProcessResponse; import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; -import com.google.cloud.documentai.v1beta3.HumanReviewConfigName; +import com.google.cloud.documentai.v1beta3.EvaluationName; public class SyncBatchProcessDocumentsString { @@ -35,7 +35,10 @@ public static void syncBatchProcessDocumentsString() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) { - String name = HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); + String name = + EvaluationName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]", "[EVALUATION]") + .toString(); BatchProcessResponse response = documentProcessorServiceClient.batchProcessDocumentsAsync(name).get(); } diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/AsyncEvaluateProcessorVersion.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/AsyncEvaluateProcessorVersion.java new file mode 100644 index 000000000000..d9c5d1acd7b7 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/AsyncEvaluateProcessorVersion.java @@ -0,0 +1,56 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_EvaluateProcessorVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig; +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.ProcessorVersionName; +import com.google.longrunning.Operation; + +public class AsyncEvaluateProcessorVersion { + + public static void main(String[] args) throws Exception { + asyncEvaluateProcessorVersion(); + } + + public static void asyncEvaluateProcessorVersion() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + EvaluateProcessorVersionRequest request = + EvaluateProcessorVersionRequest.newBuilder() + .setProcessorVersion( + ProcessorVersionName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]") + .toString()) + .setEvaluationDocuments(BatchDocumentsInputConfig.newBuilder().build()) + .build(); + ApiFuture future = + documentProcessorServiceClient.evaluateProcessorVersionCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_EvaluateProcessorVersion_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/AsyncEvaluateProcessorVersionLRO.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/AsyncEvaluateProcessorVersionLRO.java new file mode 100644 index 000000000000..1501e5d9beda --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/AsyncEvaluateProcessorVersionLRO.java @@ -0,0 +1,59 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_EvaluateProcessorVersion_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig; +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionMetadata; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse; +import com.google.cloud.documentai.v1beta3.ProcessorVersionName; + +public class AsyncEvaluateProcessorVersionLRO { + + public static void main(String[] args) throws Exception { + asyncEvaluateProcessorVersionLRO(); + } + + public static void asyncEvaluateProcessorVersionLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + EvaluateProcessorVersionRequest request = + EvaluateProcessorVersionRequest.newBuilder() + .setProcessorVersion( + ProcessorVersionName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]") + .toString()) + .setEvaluationDocuments(BatchDocumentsInputConfig.newBuilder().build()) + .build(); + OperationFuture future = + documentProcessorServiceClient + .evaluateProcessorVersionOperationCallable() + .futureCall(request); + // Do something. + EvaluateProcessorVersionResponse response = future.get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_EvaluateProcessorVersion_LRO_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/SyncEvaluateProcessorVersion.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/SyncEvaluateProcessorVersion.java new file mode 100644 index 000000000000..597514bd9435 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/SyncEvaluateProcessorVersion.java @@ -0,0 +1,53 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_EvaluateProcessorVersion_sync] +import com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig; +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse; +import com.google.cloud.documentai.v1beta3.ProcessorVersionName; + +public class SyncEvaluateProcessorVersion { + + public static void main(String[] args) throws Exception { + syncEvaluateProcessorVersion(); + } + + public static void syncEvaluateProcessorVersion() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + EvaluateProcessorVersionRequest request = + EvaluateProcessorVersionRequest.newBuilder() + .setProcessorVersion( + ProcessorVersionName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]") + .toString()) + .setEvaluationDocuments(BatchDocumentsInputConfig.newBuilder().build()) + .build(); + EvaluateProcessorVersionResponse response = + documentProcessorServiceClient.evaluateProcessorVersionAsync(request).get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_EvaluateProcessorVersion_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/SyncEvaluateProcessorVersionProcessorversionname.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/SyncEvaluateProcessorVersionProcessorversionname.java new file mode 100644 index 000000000000..87340e18efcc --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/SyncEvaluateProcessorVersionProcessorversionname.java @@ -0,0 +1,45 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_EvaluateProcessorVersion_Processorversionname_sync] +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse; +import com.google.cloud.documentai.v1beta3.ProcessorVersionName; + +public class SyncEvaluateProcessorVersionProcessorversionname { + + public static void main(String[] args) throws Exception { + syncEvaluateProcessorVersionProcessorversionname(); + } + + public static void syncEvaluateProcessorVersionProcessorversionname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + ProcessorVersionName processorVersion = + ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]"); + EvaluateProcessorVersionResponse response = + documentProcessorServiceClient.evaluateProcessorVersionAsync(processorVersion).get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_EvaluateProcessorVersion_Processorversionname_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/SyncEvaluateProcessorVersionString.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/SyncEvaluateProcessorVersionString.java new file mode 100644 index 000000000000..e648fa63828a --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/evaluateprocessorversion/SyncEvaluateProcessorVersionString.java @@ -0,0 +1,46 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_EvaluateProcessorVersion_String_sync] +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.EvaluateProcessorVersionResponse; +import com.google.cloud.documentai.v1beta3.ProcessorVersionName; + +public class SyncEvaluateProcessorVersionString { + + public static void main(String[] args) throws Exception { + syncEvaluateProcessorVersionString(); + } + + public static void syncEvaluateProcessorVersionString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + String processorVersion = + ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]") + .toString(); + EvaluateProcessorVersionResponse response = + documentProcessorServiceClient.evaluateProcessorVersionAsync(processorVersion).get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_EvaluateProcessorVersion_String_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/getevaluation/AsyncGetEvaluation.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/getevaluation/AsyncGetEvaluation.java new file mode 100644 index 000000000000..1b7871b883ae --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/getevaluation/AsyncGetEvaluation.java @@ -0,0 +1,58 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_GetEvaluation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.Evaluation; +import com.google.cloud.documentai.v1beta3.EvaluationName; +import com.google.cloud.documentai.v1beta3.GetEvaluationRequest; + +public class AsyncGetEvaluation { + + public static void main(String[] args) throws Exception { + asyncGetEvaluation(); + } + + public static void asyncGetEvaluation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + GetEvaluationRequest request = + GetEvaluationRequest.newBuilder() + .setName( + EvaluationName.of( + "[PROJECT]", + "[LOCATION]", + "[PROCESSOR]", + "[PROCESSOR_VERSION]", + "[EVALUATION]") + .toString()) + .build(); + ApiFuture future = + documentProcessorServiceClient.getEvaluationCallable().futureCall(request); + // Do something. + Evaluation response = future.get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_GetEvaluation_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/getevaluation/SyncGetEvaluation.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/getevaluation/SyncGetEvaluation.java new file mode 100644 index 000000000000..15579198e66f --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/getevaluation/SyncGetEvaluation.java @@ -0,0 +1,54 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_GetEvaluation_sync] +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.Evaluation; +import com.google.cloud.documentai.v1beta3.EvaluationName; +import com.google.cloud.documentai.v1beta3.GetEvaluationRequest; + +public class SyncGetEvaluation { + + public static void main(String[] args) throws Exception { + syncGetEvaluation(); + } + + public static void syncGetEvaluation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + GetEvaluationRequest request = + GetEvaluationRequest.newBuilder() + .setName( + EvaluationName.of( + "[PROJECT]", + "[LOCATION]", + "[PROCESSOR]", + "[PROCESSOR_VERSION]", + "[EVALUATION]") + .toString()) + .build(); + Evaluation response = documentProcessorServiceClient.getEvaluation(request); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_GetEvaluation_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/getevaluation/SyncGetEvaluationEvaluationname.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/getevaluation/SyncGetEvaluationEvaluationname.java new file mode 100644 index 000000000000..ee0084f7082a --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/getevaluation/SyncGetEvaluationEvaluationname.java @@ -0,0 +1,45 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_GetEvaluation_Evaluationname_sync] +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.Evaluation; +import com.google.cloud.documentai.v1beta3.EvaluationName; + +public class SyncGetEvaluationEvaluationname { + + public static void main(String[] args) throws Exception { + syncGetEvaluationEvaluationname(); + } + + public static void syncGetEvaluationEvaluationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + EvaluationName name = + EvaluationName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]", "[EVALUATION]"); + Evaluation response = documentProcessorServiceClient.getEvaluation(name); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_GetEvaluation_Evaluationname_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/getevaluation/SyncGetEvaluationString.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/getevaluation/SyncGetEvaluationString.java new file mode 100644 index 000000000000..aa0ad661ab2c --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/getevaluation/SyncGetEvaluationString.java @@ -0,0 +1,46 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_GetEvaluation_String_sync] +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.Evaluation; +import com.google.cloud.documentai.v1beta3.EvaluationName; + +public class SyncGetEvaluationString { + + public static void main(String[] args) throws Exception { + syncGetEvaluationString(); + } + + public static void syncGetEvaluationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + String name = + EvaluationName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]", "[EVALUATION]") + .toString(); + Evaluation response = documentProcessorServiceClient.getEvaluation(name); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_GetEvaluation_String_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/AsyncListEvaluations.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/AsyncListEvaluations.java new file mode 100644 index 000000000000..3a2302045a88 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/AsyncListEvaluations.java @@ -0,0 +1,58 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_ListEvaluations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.Evaluation; +import com.google.cloud.documentai.v1beta3.ListEvaluationsRequest; +import com.google.cloud.documentai.v1beta3.ProcessorVersionName; + +public class AsyncListEvaluations { + + public static void main(String[] args) throws Exception { + asyncListEvaluations(); + } + + public static void asyncListEvaluations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + ListEvaluationsRequest request = + ListEvaluationsRequest.newBuilder() + .setParent( + ProcessorVersionName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + documentProcessorServiceClient.listEvaluationsPagedCallable().futureCall(request); + // Do something. + for (Evaluation element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_ListEvaluations_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/AsyncListEvaluationsPaged.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/AsyncListEvaluationsPaged.java new file mode 100644 index 000000000000..6382fe06f874 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/AsyncListEvaluationsPaged.java @@ -0,0 +1,66 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_ListEvaluations_Paged_async] +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.Evaluation; +import com.google.cloud.documentai.v1beta3.ListEvaluationsRequest; +import com.google.cloud.documentai.v1beta3.ListEvaluationsResponse; +import com.google.cloud.documentai.v1beta3.ProcessorVersionName; +import com.google.common.base.Strings; + +public class AsyncListEvaluationsPaged { + + public static void main(String[] args) throws Exception { + asyncListEvaluationsPaged(); + } + + public static void asyncListEvaluationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + ListEvaluationsRequest request = + ListEvaluationsRequest.newBuilder() + .setParent( + ProcessorVersionName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListEvaluationsResponse response = + documentProcessorServiceClient.listEvaluationsCallable().call(request); + for (Evaluation element : response.getEvaluationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_ListEvaluations_Paged_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/SyncListEvaluations.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/SyncListEvaluations.java new file mode 100644 index 000000000000..6b60bd871417 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/SyncListEvaluations.java @@ -0,0 +1,55 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_ListEvaluations_sync] +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.Evaluation; +import com.google.cloud.documentai.v1beta3.ListEvaluationsRequest; +import com.google.cloud.documentai.v1beta3.ProcessorVersionName; + +public class SyncListEvaluations { + + public static void main(String[] args) throws Exception { + syncListEvaluations(); + } + + public static void syncListEvaluations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + ListEvaluationsRequest request = + ListEvaluationsRequest.newBuilder() + .setParent( + ProcessorVersionName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Evaluation element : + documentProcessorServiceClient.listEvaluations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_ListEvaluations_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/SyncListEvaluationsProcessorversionname.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/SyncListEvaluationsProcessorversionname.java new file mode 100644 index 000000000000..920d930bd953 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/SyncListEvaluationsProcessorversionname.java @@ -0,0 +1,47 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_ListEvaluations_Processorversionname_sync] +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.Evaluation; +import com.google.cloud.documentai.v1beta3.ProcessorVersionName; + +public class SyncListEvaluationsProcessorversionname { + + public static void main(String[] args) throws Exception { + syncListEvaluationsProcessorversionname(); + } + + public static void syncListEvaluationsProcessorversionname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + ProcessorVersionName parent = + ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]"); + for (Evaluation element : + documentProcessorServiceClient.listEvaluations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_ListEvaluations_Processorversionname_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/SyncListEvaluationsString.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/SyncListEvaluationsString.java new file mode 100644 index 000000000000..f7daa527add7 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/listevaluations/SyncListEvaluationsString.java @@ -0,0 +1,48 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_ListEvaluations_String_sync] +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.Evaluation; +import com.google.cloud.documentai.v1beta3.ProcessorVersionName; + +public class SyncListEvaluationsString { + + public static void main(String[] args) throws Exception { + syncListEvaluationsString(); + } + + public static void syncListEvaluationsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + String parent = + ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]") + .toString(); + for (Evaluation element : + documentProcessorServiceClient.listEvaluations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_ListEvaluations_String_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/processdocument/SyncProcessDocumentString.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/processdocument/SyncProcessDocumentString.java index 70a139cf1595..972597c7e894 100644 --- a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/processdocument/SyncProcessDocumentString.java +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/processdocument/SyncProcessDocumentString.java @@ -18,7 +18,7 @@ // [START documentai_v1beta3_generated_DocumentProcessorService_ProcessDocument_String_sync] import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; -import com.google.cloud.documentai.v1beta3.HumanReviewConfigName; +import com.google.cloud.documentai.v1beta3.EvaluationName; import com.google.cloud.documentai.v1beta3.ProcessResponse; public class SyncProcessDocumentString { @@ -35,7 +35,10 @@ public static void syncProcessDocumentString() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DocumentProcessorServiceClient documentProcessorServiceClient = DocumentProcessorServiceClient.create()) { - String name = HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); + String name = + EvaluationName.of( + "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]", "[EVALUATION]") + .toString(); ProcessResponse response = documentProcessorServiceClient.processDocument(name); } } diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/AsyncTrainProcessorVersion.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/AsyncTrainProcessorVersion.java new file mode 100644 index 000000000000..97bada957176 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/AsyncTrainProcessorVersion.java @@ -0,0 +1,57 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_TrainProcessorVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.DocumentSchema; +import com.google.cloud.documentai.v1beta3.ProcessorName; +import com.google.cloud.documentai.v1beta3.ProcessorVersion; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest; +import com.google.longrunning.Operation; + +public class AsyncTrainProcessorVersion { + + public static void main(String[] args) throws Exception { + asyncTrainProcessorVersion(); + } + + public static void asyncTrainProcessorVersion() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + TrainProcessorVersionRequest request = + TrainProcessorVersionRequest.newBuilder() + .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setProcessorVersion(ProcessorVersion.newBuilder().build()) + .setDocumentSchema(DocumentSchema.newBuilder().build()) + .setInputData(TrainProcessorVersionRequest.InputData.newBuilder().build()) + .setBaseProcessorVersion("baseProcessorVersion337709271") + .build(); + ApiFuture future = + documentProcessorServiceClient.trainProcessorVersionCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_TrainProcessorVersion_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/AsyncTrainProcessorVersionLRO.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/AsyncTrainProcessorVersionLRO.java new file mode 100644 index 000000000000..c49973df5efe --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/AsyncTrainProcessorVersionLRO.java @@ -0,0 +1,60 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_TrainProcessorVersion_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.DocumentSchema; +import com.google.cloud.documentai.v1beta3.ProcessorName; +import com.google.cloud.documentai.v1beta3.ProcessorVersion; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse; + +public class AsyncTrainProcessorVersionLRO { + + public static void main(String[] args) throws Exception { + asyncTrainProcessorVersionLRO(); + } + + public static void asyncTrainProcessorVersionLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + TrainProcessorVersionRequest request = + TrainProcessorVersionRequest.newBuilder() + .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setProcessorVersion(ProcessorVersion.newBuilder().build()) + .setDocumentSchema(DocumentSchema.newBuilder().build()) + .setInputData(TrainProcessorVersionRequest.InputData.newBuilder().build()) + .setBaseProcessorVersion("baseProcessorVersion337709271") + .build(); + OperationFuture future = + documentProcessorServiceClient + .trainProcessorVersionOperationCallable() + .futureCall(request); + // Do something. + TrainProcessorVersionResponse response = future.get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_TrainProcessorVersion_LRO_async] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/SyncTrainProcessorVersion.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/SyncTrainProcessorVersion.java new file mode 100644 index 000000000000..e07232dc84b0 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/SyncTrainProcessorVersion.java @@ -0,0 +1,54 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_TrainProcessorVersion_sync] +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.DocumentSchema; +import com.google.cloud.documentai.v1beta3.ProcessorName; +import com.google.cloud.documentai.v1beta3.ProcessorVersion; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse; + +public class SyncTrainProcessorVersion { + + public static void main(String[] args) throws Exception { + syncTrainProcessorVersion(); + } + + public static void syncTrainProcessorVersion() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + TrainProcessorVersionRequest request = + TrainProcessorVersionRequest.newBuilder() + .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setProcessorVersion(ProcessorVersion.newBuilder().build()) + .setDocumentSchema(DocumentSchema.newBuilder().build()) + .setInputData(TrainProcessorVersionRequest.InputData.newBuilder().build()) + .setBaseProcessorVersion("baseProcessorVersion337709271") + .build(); + TrainProcessorVersionResponse response = + documentProcessorServiceClient.trainProcessorVersionAsync(request).get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_TrainProcessorVersion_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/SyncTrainProcessorVersionProcessornameProcessorversion.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/SyncTrainProcessorVersionProcessornameProcessorversion.java new file mode 100644 index 000000000000..f35e3f1b7d61 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/SyncTrainProcessorVersionProcessornameProcessorversion.java @@ -0,0 +1,46 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_TrainProcessorVersion_ProcessornameProcessorversion_sync] +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.ProcessorName; +import com.google.cloud.documentai.v1beta3.ProcessorVersion; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse; + +public class SyncTrainProcessorVersionProcessornameProcessorversion { + + public static void main(String[] args) throws Exception { + syncTrainProcessorVersionProcessornameProcessorversion(); + } + + public static void syncTrainProcessorVersionProcessornameProcessorversion() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + ProcessorName parent = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + ProcessorVersion processorVersion = ProcessorVersion.newBuilder().build(); + TrainProcessorVersionResponse response = + documentProcessorServiceClient.trainProcessorVersionAsync(parent, processorVersion).get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_TrainProcessorVersion_ProcessornameProcessorversion_sync] diff --git a/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/SyncTrainProcessorVersionStringProcessorversion.java b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/SyncTrainProcessorVersionStringProcessorversion.java new file mode 100644 index 000000000000..e41e5be795c4 --- /dev/null +++ b/java-document-ai/samples/snippets/generated/com/google/cloud/documentai/v1beta3/documentprocessorservice/trainprocessorversion/SyncTrainProcessorVersionStringProcessorversion.java @@ -0,0 +1,46 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.documentai.v1beta3.samples; + +// [START documentai_v1beta3_generated_DocumentProcessorService_TrainProcessorVersion_StringProcessorversion_sync] +import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1beta3.ProcessorName; +import com.google.cloud.documentai.v1beta3.ProcessorVersion; +import com.google.cloud.documentai.v1beta3.TrainProcessorVersionResponse; + +public class SyncTrainProcessorVersionStringProcessorversion { + + public static void main(String[] args) throws Exception { + syncTrainProcessorVersionStringProcessorversion(); + } + + public static void syncTrainProcessorVersionStringProcessorversion() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentProcessorServiceClient documentProcessorServiceClient = + DocumentProcessorServiceClient.create()) { + String parent = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString(); + ProcessorVersion processorVersion = ProcessorVersion.newBuilder().build(); + TrainProcessorVersionResponse response = + documentProcessorServiceClient.trainProcessorVersionAsync(parent, processorVersion).get(); + } + } +} +// [END documentai_v1beta3_generated_DocumentProcessorService_TrainProcessorVersion_StringProcessorversion_sync]