From f69e920ffee1de9257691228f72a62c36b410701 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 24 Jun 2021 19:12:31 +0000 Subject: [PATCH] feat: update ReviewDocumentRequest to allow set priority and enable validation (#527) PiperOrigin-RevId: 380732771 Source-Link: https://github.com/googleapis/googleapis/commit/87fc4d48c705e307a2427fcaf8f4f799ac3b8ca8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7610fef6fdadfbe237b8bd64a0f38438a41bc5ee --- .../v1/DocumentProcessorServiceClient.java | 3 + .../google/cloud/documentai/v1/Document.java | 777 +++++++++++++++++- .../v1/DocumentAiProcessorService.java | 86 +- .../cloud/documentai/v1/DocumentProto.java | 283 +++---- .../documentai/v1/HumanReviewConfigName.java | 6 +- .../cloud/documentai/v1/ProcessorName.java | 6 +- .../documentai/v1/ReviewDocumentRequest.java | 386 +++++++++ .../v1/ReviewDocumentRequestOrBuilder.java | 38 + .../google/cloud/documentai/v1/document.proto | 16 +- .../v1/document_processor_service.proto | 18 + .../v1beta3/HumanReviewConfigName.java | 6 +- .../documentai/v1beta3/LocationName.java | 4 +- .../documentai/v1beta3/ProcessorName.java | 6 +- .../documentai/v1beta3/ProcessorTypeName.java | 6 +- 14 files changed, 1433 insertions(+), 208 deletions(-) diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceClient.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceClient.java index adbc5cf4..dbf4de02 100644 --- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceClient.java +++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceClient.java @@ -469,6 +469,7 @@ public final UnaryCallable batchProcessDocuments * ReviewDocumentRequest.newBuilder() * .setHumanReviewConfig( * HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + * .setEnableSchemaValidation(true) * .build(); * ReviewDocumentResponse response = * documentProcessorServiceClient.reviewDocumentAsync(request).get(); @@ -497,6 +498,7 @@ public final UnaryCallable batchProcessDocuments * ReviewDocumentRequest.newBuilder() * .setHumanReviewConfig( * HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + * .setEnableSchemaValidation(true) * .build(); * OperationFuture future = * documentProcessorServiceClient.reviewDocumentOperationCallable().futureCall(request); @@ -525,6 +527,7 @@ public final UnaryCallable batchProcessDocuments * ReviewDocumentRequest.newBuilder() * .setHumanReviewConfig( * HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + * .setEnableSchemaValidation(true) * .build(); * ApiFuture future = * documentProcessorServiceClient.reviewDocumentCallable().futureCall(request); diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Document.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Document.java index b7f0e4b4..2a6390c3 100644 --- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Document.java +++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Document.java @@ -4766,6 +4766,41 @@ com.google.cloud.documentai.v1.Document.Page.VisualElementOrBuilder getVisualEle */ com.google.cloud.documentai.v1.Document.Page.FormFieldOrBuilder getFormFieldsOrBuilder( int index); + + /** + * + * + *
+     * The history of this page.
+     * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + * + * @return Whether the provenance field is set. + */ + boolean hasProvenance(); + /** + * + * + *
+     * The history of this page.
+     * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + * + * @return The provenance. + */ + com.google.cloud.documentai.v1.Document.Provenance getProvenance(); + /** + * + * + *
+     * The history of this page.
+     * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + */ + com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); } /** * @@ -5006,6 +5041,23 @@ private Page( extensionRegistry)); break; } + case 130: + { + com.google.cloud.documentai.v1.Document.Provenance.Builder subBuilder = null; + if (provenance_ != null) { + subBuilder = provenance_.toBuilder(); + } + provenance_ = + input.readMessage( + com.google.cloud.documentai.v1.Document.Provenance.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(provenance_); + provenance_ = subBuilder.buildPartial(); + } + + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -24576,6 +24628,41 @@ com.google.cloud.documentai.v1.Document.Page.DetectedLanguage getValueDetectedLa * @return The bytes for valueType. */ com.google.protobuf.ByteString getValueTypeBytes(); + + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + * + * @return Whether the provenance field is set. + */ + boolean hasProvenance(); + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + * + * @return The provenance. + */ + com.google.cloud.documentai.v1.Document.Provenance getProvenance(); + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + */ + com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder getProvenanceOrBuilder(); } /** * @@ -24699,6 +24786,23 @@ private FormField( java.lang.String s = input.readStringRequireUtf8(); valueType_ = s; + break; + } + case 66: + { + com.google.cloud.documentai.v1.Document.Provenance.Builder subBuilder = null; + if (provenance_ != null) { + subBuilder = provenance_.toBuilder(); + } + provenance_ = + input.readMessage( + com.google.cloud.documentai.v1.Document.Provenance.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(provenance_); + provenance_ = subBuilder.buildPartial(); + } + break; } default: @@ -25067,6 +25171,54 @@ public com.google.protobuf.ByteString getValueTypeBytes() { } } + public static final int PROVENANCE_FIELD_NUMBER = 8; + private com.google.cloud.documentai.v1.Document.Provenance provenance_; + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + * + * @return Whether the provenance field is set. + */ + @java.lang.Override + public boolean hasProvenance() { + return provenance_ != null; + } + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + * + * @return The provenance. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.Provenance getProvenance() { + return provenance_ == null + ? com.google.cloud.documentai.v1.Document.Provenance.getDefaultInstance() + : provenance_; + } + /** + * + * + *
+       * The history of this annotation.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder getProvenanceOrBuilder() { + return getProvenance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -25096,6 +25248,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getValueTypeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, valueType_); } + if (provenance_ != null) { + output.writeMessage(8, getProvenance()); + } unknownFields.writeTo(output); } @@ -25124,6 +25279,9 @@ public int getSerializedSize() { if (!getValueTypeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, valueType_); } + if (provenance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getProvenance()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -25153,6 +25311,10 @@ public boolean equals(final java.lang.Object obj) { if (!getValueDetectedLanguagesList().equals(other.getValueDetectedLanguagesList())) return false; if (!getValueType().equals(other.getValueType())) return false; + if (hasProvenance() != other.hasProvenance()) return false; + if (hasProvenance()) { + if (!getProvenance().equals(other.getProvenance())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -25182,6 +25344,10 @@ public int hashCode() { } hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER; hash = (53 * hash) + getValueType().hashCode(); + if (hasProvenance()) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -25359,6 +25525,12 @@ public Builder clear() { } valueType_ = ""; + if (provenanceBuilder_ == null) { + provenance_ = null; + } else { + provenance_ = null; + provenanceBuilder_ = null; + } return this; } @@ -25418,6 +25590,11 @@ public com.google.cloud.documentai.v1.Document.Page.FormField buildPartial() { result.valueDetectedLanguages_ = valueDetectedLanguagesBuilder_.build(); } result.valueType_ = valueType_; + if (provenanceBuilder_ == null) { + result.provenance_ = provenance_; + } else { + result.provenance_ = provenanceBuilder_.build(); + } onBuilt(); return result; } @@ -25534,6 +25711,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.Document.Page.FormField valueType_ = other.valueType_; onChanged(); } + if (other.hasProvenance()) { + mergeProvenance(other.getProvenance()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -26897,6 +27077,193 @@ public Builder setValueTypeBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.documentai.v1.Document.Provenance provenance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.Document.Provenance, + com.google.cloud.documentai.v1.Document.Provenance.Builder, + com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder> + provenanceBuilder_; + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + * + * @return Whether the provenance field is set. + */ + public boolean hasProvenance() { + return provenanceBuilder_ != null || provenance_ != null; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + * + * @return The provenance. + */ + public com.google.cloud.documentai.v1.Document.Provenance getProvenance() { + if (provenanceBuilder_ == null) { + return provenance_ == null + ? com.google.cloud.documentai.v1.Document.Provenance.getDefaultInstance() + : provenance_; + } else { + return provenanceBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + */ + public Builder setProvenance(com.google.cloud.documentai.v1.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 annotation.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + */ + public Builder setProvenance( + com.google.cloud.documentai.v1.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + provenance_ = builderForValue.build(); + onChanged(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + */ + public Builder mergeProvenance(com.google.cloud.documentai.v1.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (provenance_ != null) { + provenance_ = + com.google.cloud.documentai.v1.Document.Provenance.newBuilder(provenance_) + .mergeFrom(value) + .buildPartial(); + } else { + provenance_ = value; + } + onChanged(); + } else { + provenanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + */ + public Builder clearProvenance() { + if (provenanceBuilder_ == null) { + provenance_ = null; + onChanged(); + } else { + provenance_ = null; + provenanceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + */ + public com.google.cloud.documentai.v1.Document.Provenance.Builder getProvenanceBuilder() { + + onChanged(); + return getProvenanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + */ + public com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder + getProvenanceOrBuilder() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + return provenance_ == null + ? com.google.cloud.documentai.v1.Document.Provenance.getDefaultInstance() + : provenance_; + } + } + /** + * + * + *
+         * The history of this annotation.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.Document.Provenance, + com.google.cloud.documentai.v1.Document.Provenance.Builder, + com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.Document.Provenance, + com.google.cloud.documentai.v1.Document.Provenance.Builder, + com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder>( + getProvenance(), getParentForChildren(), isClean()); + provenance_ = null; + } + return provenanceBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -28588,6 +28955,54 @@ public com.google.cloud.documentai.v1.Document.Page.FormFieldOrBuilder getFormFi return formFields_.get(index); } + public static final int PROVENANCE_FIELD_NUMBER = 16; + private com.google.cloud.documentai.v1.Document.Provenance provenance_; + /** + * + * + *
+     * The history of this page.
+     * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + * + * @return Whether the provenance field is set. + */ + @java.lang.Override + public boolean hasProvenance() { + return provenance_ != null; + } + /** + * + * + *
+     * The history of this page.
+     * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + * + * @return The provenance. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.Provenance getProvenance() { + return provenance_ == null + ? com.google.cloud.documentai.v1.Document.Provenance.getDefaultInstance() + : provenance_; + } + /** + * + * + *
+     * The history of this page.
+     * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder getProvenanceOrBuilder() { + return getProvenance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -28641,6 +29056,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < transforms_.size(); i++) { output.writeMessage(14, transforms_.get(i)); } + if (provenance_ != null) { + output.writeMessage(16, getProvenance()); + } unknownFields.writeTo(output); } @@ -28690,6 +29108,9 @@ public int getSerializedSize() { for (int i = 0; i < transforms_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, transforms_.get(i)); } + if (provenance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getProvenance()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -28728,6 +29149,10 @@ public boolean equals(final java.lang.Object obj) { if (!getVisualElementsList().equals(other.getVisualElementsList())) return false; if (!getTablesList().equals(other.getTablesList())) return false; if (!getFormFieldsList().equals(other.getFormFieldsList())) return false; + if (hasProvenance() != other.hasProvenance()) return false; + if (hasProvenance()) { + if (!getProvenance().equals(other.getProvenance())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -28789,6 +29214,10 @@ public int hashCode() { hash = (37 * hash) + FORM_FIELDS_FIELD_NUMBER; hash = (53 * hash) + getFormFieldsList().hashCode(); } + if (hasProvenance()) { + hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getProvenance().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -29020,6 +29449,12 @@ public Builder clear() { } else { formFieldsBuilder_.clear(); } + if (provenanceBuilder_ == null) { + provenance_ = null; + } else { + provenance_ = null; + provenanceBuilder_ = null; + } return this; } @@ -29145,6 +29580,11 @@ public com.google.cloud.documentai.v1.Document.Page buildPartial() { } else { result.formFields_ = formFieldsBuilder_.build(); } + if (provenanceBuilder_ == null) { + result.provenance_ = provenance_; + } else { + result.provenance_ = provenanceBuilder_.build(); + } onBuilt(); return result; } @@ -29451,6 +29891,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.Document.Page other) { } } } + if (other.hasProvenance()) { + mergeProvenance(other.getProvenance()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -33535,6 +33978,192 @@ public com.google.cloud.documentai.v1.Document.Page.FormField.Builder addFormFie return formFieldsBuilder_; } + private com.google.cloud.documentai.v1.Document.Provenance provenance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.Document.Provenance, + com.google.cloud.documentai.v1.Document.Provenance.Builder, + com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder> + provenanceBuilder_; + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + * + * @return Whether the provenance field is set. + */ + public boolean hasProvenance() { + return provenanceBuilder_ != null || provenance_ != null; + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + * + * @return The provenance. + */ + public com.google.cloud.documentai.v1.Document.Provenance getProvenance() { + if (provenanceBuilder_ == null) { + return provenance_ == null + ? com.google.cloud.documentai.v1.Document.Provenance.getDefaultInstance() + : provenance_; + } else { + return provenanceBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + */ + public Builder setProvenance(com.google.cloud.documentai.v1.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 page.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + */ + public Builder setProvenance( + com.google.cloud.documentai.v1.Document.Provenance.Builder builderForValue) { + if (provenanceBuilder_ == null) { + provenance_ = builderForValue.build(); + onChanged(); + } else { + provenanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + */ + public Builder mergeProvenance(com.google.cloud.documentai.v1.Document.Provenance value) { + if (provenanceBuilder_ == null) { + if (provenance_ != null) { + provenance_ = + com.google.cloud.documentai.v1.Document.Provenance.newBuilder(provenance_) + .mergeFrom(value) + .buildPartial(); + } else { + provenance_ = value; + } + onChanged(); + } else { + provenanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + */ + public Builder clearProvenance() { + if (provenanceBuilder_ == null) { + provenance_ = null; + onChanged(); + } else { + provenance_ = null; + provenanceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + */ + public com.google.cloud.documentai.v1.Document.Provenance.Builder getProvenanceBuilder() { + + onChanged(); + return getProvenanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + */ + public com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder getProvenanceOrBuilder() { + if (provenanceBuilder_ != null) { + return provenanceBuilder_.getMessageOrBuilder(); + } else { + return provenance_ == null + ? com.google.cloud.documentai.v1.Document.Provenance.getDefaultInstance() + : provenance_; + } + } + /** + * + * + *
+       * The history of this page.
+       * 
+ * + * .google.cloud.documentai.v1.Document.Provenance provenance = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.Document.Provenance, + com.google.cloud.documentai.v1.Document.Provenance.Builder, + com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder> + getProvenanceFieldBuilder() { + if (provenanceBuilder_ == null) { + provenanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1.Document.Provenance, + com.google.cloud.documentai.v1.Document.Provenance.Builder, + com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder>( + getProvenance(), getParentForChildren(), isClean()); + provenance_ = null; + } + return provenanceBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -42723,6 +43352,8 @@ public interface PageRefOrBuilder *
        * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using
        * [Document.pages][page_refs.page] to locate the related page element.
+       * This field is skipped when its value is the default 0. See
+       * https://developers.google.com/protocol-buffers/docs/proto3#json.
        * 
* * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -43249,6 +43880,8 @@ private LayoutType(int value) { *
        * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using
        * [Document.pages][page_refs.page] to locate the related page element.
+       * This field is skipped when its value is the default 0. See
+       * https://developers.google.com/protocol-buffers/docs/proto3#json.
        * 
* * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -43841,6 +44474,8 @@ public Builder mergeFrom( *
          * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using
          * [Document.pages][page_refs.page] to locate the related page element.
+         * This field is skipped when its value is the default 0. See
+         * https://developers.google.com/protocol-buffers/docs/proto3#json.
          * 
* * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -43857,6 +44492,8 @@ public long getPage() { *
          * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using
          * [Document.pages][page_refs.page] to locate the related page element.
+         * This field is skipped when its value is the default 0. See
+         * https://developers.google.com/protocol-buffers/docs/proto3#json.
          * 
* * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -43876,6 +44513,8 @@ public Builder setPage(long value) { *
          * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using
          * [Document.pages][page_refs.page] to locate the related page element.
+         * This field is skipped when its value is the default 0. See
+         * https://developers.google.com/protocol-buffers/docs/proto3#json.
          * 
* * int64 page = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -45322,10 +45961,11 @@ public interface ProvenanceOrBuilder * revision. * * - * int32 id = 2; + * int32 id = 2 [deprecated = true]; * * @return The id. */ + @java.lang.Deprecated int getId(); /** @@ -45798,6 +46438,20 @@ public interface ParentOrBuilder */ int getRevision(); + /** + * + * + *
+       * The index of the parent revisions corresponding collection of items
+       * (eg. list of entities, properties within entities, etc.)
+       * 
+ * + * int32 index = 3; + * + * @return The index. + */ + int getIndex(); + /** * * @@ -45805,10 +46459,11 @@ public interface ParentOrBuilder * The id of the parent provenance. * * - * int32 id = 2; + * int32 id = 2 [deprecated = true]; * * @return The id. */ + @java.lang.Deprecated int getId(); } /** @@ -45873,6 +46528,11 @@ private Parent( id_ = input.readInt32(); break; } + case 24: + { + index_ = input.readInt32(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -45926,6 +46586,25 @@ public int getRevision() { return revision_; } + public static final int INDEX_FIELD_NUMBER = 3; + private int index_; + /** + * + * + *
+       * The index of the parent revisions corresponding collection of items
+       * (eg. list of entities, properties within entities, etc.)
+       * 
+ * + * int32 index = 3; + * + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + public static final int ID_FIELD_NUMBER = 2; private int id_; /** @@ -45935,11 +46614,12 @@ public int getRevision() { * The id of the parent provenance. * * - * int32 id = 2; + * int32 id = 2 [deprecated = true]; * * @return The id. */ @java.lang.Override + @java.lang.Deprecated public int getId() { return id_; } @@ -45964,6 +46644,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (id_ != 0) { output.writeInt32(2, id_); } + if (index_ != 0) { + output.writeInt32(3, index_); + } unknownFields.writeTo(output); } @@ -45979,6 +46662,9 @@ public int getSerializedSize() { if (id_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, id_); } + if (index_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, index_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -45996,6 +46682,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.documentai.v1.Document.Provenance.Parent) obj; if (getRevision() != other.getRevision()) return false; + if (getIndex() != other.getIndex()) return false; if (getId() != other.getId()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -46010,6 +46697,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + REVISION_FIELD_NUMBER; hash = (53 * hash) + getRevision(); + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId(); hash = (29 * hash) + unknownFields.hashCode(); @@ -46164,6 +46853,8 @@ public Builder clear() { super.clear(); revision_ = 0; + index_ = 0; + id_ = 0; return this; @@ -46195,6 +46886,7 @@ public com.google.cloud.documentai.v1.Document.Provenance.Parent buildPartial() com.google.cloud.documentai.v1.Document.Provenance.Parent result = new com.google.cloud.documentai.v1.Document.Provenance.Parent(this); result.revision_ = revision_; + result.index_ = index_; result.id_ = id_; onBuilt(); return result; @@ -46252,6 +46944,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.Document.Provenance.Pare if (other.getRevision() != 0) { setRevision(other.getRevision()); } + if (other.getIndex() != 0) { + setIndex(other.getIndex()); + } if (other.getId() != 0) { setId(other.getId()); } @@ -46338,6 +47033,61 @@ public Builder clearRevision() { return this; } + private int index_; + /** + * + * + *
+         * The index of the parent revisions corresponding collection of items
+         * (eg. list of entities, properties within entities, etc.)
+         * 
+ * + * int32 index = 3; + * + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + /** + * + * + *
+         * The index of the parent revisions corresponding collection of items
+         * (eg. list of entities, properties within entities, etc.)
+         * 
+ * + * int32 index = 3; + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(int value) { + + index_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The index of the parent revisions corresponding collection of items
+         * (eg. list of entities, properties within entities, etc.)
+         * 
+ * + * int32 index = 3; + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + + index_ = 0; + onChanged(); + return this; + } + private int id_; /** * @@ -46346,11 +47096,12 @@ public Builder clearRevision() { * The id of the parent provenance. * * - * int32 id = 2; + * int32 id = 2 [deprecated = true]; * * @return The id. */ @java.lang.Override + @java.lang.Deprecated public int getId() { return id_; } @@ -46361,11 +47112,12 @@ public int getId() { * The id of the parent provenance. * * - * int32 id = 2; + * int32 id = 2 [deprecated = true]; * * @param value The id to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setId(int value) { id_ = value; @@ -46379,10 +47131,11 @@ public Builder setId(int value) { * The id of the parent provenance. * * - * int32 id = 2; + * int32 id = 2 [deprecated = true]; * * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearId() { id_ = 0; @@ -46471,11 +47224,12 @@ public int getRevision() { * revision. * * - * int32 id = 2; + * int32 id = 2 [deprecated = true]; * * @return The id. */ @java.lang.Override + @java.lang.Deprecated public int getId() { return id_; } @@ -47067,11 +47821,12 @@ public Builder clearRevision() { * revision. * * - * int32 id = 2; + * int32 id = 2 [deprecated = true]; * * @return The id. */ @java.lang.Override + @java.lang.Deprecated public int getId() { return id_; } @@ -47083,11 +47838,12 @@ public int getId() { * revision. * * - * int32 id = 2; + * int32 id = 2 [deprecated = true]; * * @param value The id to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setId(int value) { id_ = value; @@ -47102,10 +47858,11 @@ public Builder setId(int value) { * revision. * * - * int32 id = 2; + * int32 id = 2 [deprecated = true]; * * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearId() { id_ = 0; diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessorService.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessorService.java index b99c68ab..bb9032f5 100644 --- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessorService.java +++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessorService.java @@ -127,49 +127,53 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "manReviewStatus\"r\n\005State\022\025\n\021STATE_UNSPEC" + "IFIED\020\000\022\013\n\007WAITING\020\001\022\013\n\007RUNNING\020\002\022\r\n\tSUC" + "CEEDED\020\003\022\016\n\nCANCELLING\020\004\022\r\n\tCANCELLED\020\005\022" - + "\n\n\006FAILED\020\006\"\264\001\n\025ReviewDocumentRequest\022?\n" + + "\n\n\006FAILED\020\006\"\317\002\n\025ReviewDocumentRequest\022?\n" + "\017inline_document\030\004 \001(\0132$.google.cloud.do" + "cumentai.v1.DocumentH\000\022P\n\023human_review_c" + "onfig\030\001 \001(\tB3\340A\002\372A-\n+documentai.googleap" - + "is.com/HumanReviewConfigB\010\n\006source\"1\n\026Re" - + "viewDocumentResponse\022\027\n\017gcs_destination\030" - + "\001 \001(\t\"o\n\037ReviewDocumentOperationMetadata" - + "\022L\n\017common_metadata\030\005 \001(\01323.google.cloud" - + ".documentai.v1.CommonOperationMetadata2\253" - + "\006\n\030DocumentProcessorService\022\264\001\n\017ProcessD" - + "ocument\022*.google.cloud.documentai.v1.Pro" - + "cessRequest\032+.google.cloud.documentai.v1" - + ".ProcessResponse\"H\202\323\344\223\002;\"6/v1/{name=proj" - + "ects/*/locations/*/processors/*}:process" - + ":\001*\332A\004name\022\345\001\n\025BatchProcessDocuments\022/.g" - + "oogle.cloud.documentai.v1.BatchProcessRe" - + "quest\032\035.google.longrunning.Operation\"|\202\323" - + "\344\223\002@\";/v1/{name=projects/*/locations/*/p" - + "rocessors/*}:batchProcess:\001*\332A\004name\312A,\n\024" - + "BatchProcessResponse\022\024BatchProcessMetada" - + "ta\022\240\002\n\016ReviewDocument\0221.google.cloud.doc" - + "umentai.v1.ReviewDocumentRequest\032\035.googl" - + "e.longrunning.Operation\"\273\001\202\323\344\223\002c\"^/v1/{h" - + "uman_review_config=projects/*/locations/" - + "*/processors/*/humanReviewConfig}:review" - + "Document:\001*\332A\023human_review_config\312A9\n\026Re" - + "viewDocumentResponse\022\037ReviewDocumentOper" - + "ationMetadata\032M\312A\031documentai.googleapis." - + "com\322A.https://www.googleapis.com/auth/cl" - + "oud-platformB\230\004\n\036com.google.cloud.docume" - + "ntai.v1B\032DocumentAiProcessorServiceP\001ZDg" - + "oogle.golang.org/genproto/googleapis/clo" - + "ud/documentai/v1;documentai\252\002\032Google.Clo" - + "ud.DocumentAI.V1\312\002\032Google\\Cloud\\Document" - + "AI\\V1\352\002\035Google::Cloud::DocumentAI::V1\352AM" - + "\n\"documentai.googleapis.com/Location\022\'pr" - + "ojects/{project}/locations/{location}\352Ae" - + "\n#documentai.googleapis.com/Processor\022>p" - + "rojects/{project}/locations/{location}/p" - + "rocessors/{processor}\352A\177\n+documentai.goo" - + "gleapis.com/HumanReviewConfig\022Pprojects/" - + "{project}/locations/{location}/processor" - + "s/{processor}/humanReviewConfigb\006proto3" + + "is.com/HumanReviewConfig\022 \n\030enable_schem" + + "a_validation\030\003 \001(\010\022L\n\010priority\030\005 \001(\0162:.g" + + "oogle.cloud.documentai.v1.ReviewDocument" + + "Request.Priority\"#\n\010Priority\022\013\n\007DEFAULT\020" + + "\000\022\n\n\006URGENT\020\001B\010\n\006sourceJ\004\010\002\020\003\"1\n\026ReviewD" + + "ocumentResponse\022\027\n\017gcs_destination\030\001 \001(\t" + + "\"o\n\037ReviewDocumentOperationMetadata\022L\n\017c" + + "ommon_metadata\030\005 \001(\01323.google.cloud.docu" + + "mentai.v1.CommonOperationMetadata2\253\006\n\030Do" + + "cumentProcessorService\022\264\001\n\017ProcessDocume" + + "nt\022*.google.cloud.documentai.v1.ProcessR" + + "equest\032+.google.cloud.documentai.v1.Proc" + + "essResponse\"H\202\323\344\223\002;\"6/v1/{name=projects/" + + "*/locations/*/processors/*}:process:\001*\332A" + + "\004name\022\345\001\n\025BatchProcessDocuments\022/.google" + + ".cloud.documentai.v1.BatchProcessRequest" + + "\032\035.google.longrunning.Operation\"|\202\323\344\223\002@\"" + + ";/v1/{name=projects/*/locations/*/proces" + + "sors/*}:batchProcess:\001*\332A\004name\312A,\n\024Batch" + + "ProcessResponse\022\024BatchProcessMetadata\022\240\002" + + "\n\016ReviewDocument\0221.google.cloud.document" + + "ai.v1.ReviewDocumentRequest\032\035.google.lon" + + "grunning.Operation\"\273\001\202\323\344\223\002c\"^/v1/{human_" + + "review_config=projects/*/locations/*/pro" + + "cessors/*/humanReviewConfig}:reviewDocum" + + "ent:\001*\332A\023human_review_config\312A9\n\026ReviewD" + + "ocumentResponse\022\037ReviewDocumentOperation" + + "Metadata\032M\312A\031documentai.googleapis.com\322A" + + ".https://www.googleapis.com/auth/cloud-p" + + "latformB\230\004\n\036com.google.cloud.documentai." + + "v1B\032DocumentAiProcessorServiceP\001ZDgoogle" + + ".golang.org/genproto/googleapis/cloud/do" + + "cumentai/v1;documentai\252\002\032Google.Cloud.Do" + + "cumentAI.V1\312\002\032Google\\Cloud\\DocumentAI\\V1" + + "\352\002\035Google::Cloud::DocumentAI::V1\352AM\n\"doc" + + "umentai.googleapis.com/Location\022\'project" + + "s/{project}/locations/{location}\352Ae\n#doc" + + "umentai.googleapis.com/Processor\022>projec" + + "ts/{project}/locations/{location}/proces" + + "sors/{processor}\352A\177\n+documentai.googleap" + + "is.com/HumanReviewConfig\022Pprojects/{proj" + + "ect}/locations/{location}/processors/{pr" + + "ocessor}/humanReviewConfigb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -249,7 +253,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_ReviewDocumentRequest_descriptor, new java.lang.String[] { - "InlineDocument", "HumanReviewConfig", "Source", + "InlineDocument", "HumanReviewConfig", "EnableSchemaValidation", "Priority", "Source", }); internal_static_google_cloud_documentai_v1_ReviewDocumentResponse_descriptor = getDescriptor().getMessageTypes().get(7); diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java index f906f4ff..236b75c9 100644 --- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java +++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java @@ -173,7 +173,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ype/date.proto\032\032google/type/datetime.pro" + "to\032\027google/type/money.proto\032 google/type" + "/postal_address.proto\032\034google/api/annota" - + "tions.proto\"\2468\n\010Document\022\022\n\003uri\030\001 \001(\tB\003\340" + + "tions.proto\"\3079\n\010Document\022\022\n\003uri\030\001 \001(\tB\003\340" + "A\001H\000\022\026\n\007content\030\002 \001(\014B\003\340A\001H\000\022\021\n\tmime_typ" + "e\030\003 \001(\t\022\021\n\004text\030\004 \001(\tB\003\340A\001\022?\n\013text_style" + "s\030\005 \003(\0132*.google.cloud.documentai.v1.Doc" @@ -198,7 +198,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "yle\030\005 \001(\t\022\027\n\017text_decoration\030\006 \001(\t\022F\n\tfo" + "nt_size\030\007 \001(\01323.google.cloud.documentai." + "v1.Document.Style.FontSize\032&\n\010FontSize\022\014" - + "\n\004size\030\001 \001(\002\022\014\n\004unit\030\002 \001(\t\032\376\035\n\004Page\022\023\n\013p" + + "\n\004size\030\001 \001(\002\022\014\n\004unit\030\002 \001(\t\032\210\037\n\004Page\022\023\n\013p" + "age_number\030\001 \001(\005\022>\n\005image\030\r \001(\0132/.google" + ".cloud.documentai.v1.Document.Page.Image" + "\022D\n\ntransforms\030\016 \003(\01320.google.cloud.docu" @@ -220,145 +220,150 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ment\022?\n\006tables\030\n \003(\0132/.google.cloud.docu" + "mentai.v1.Document.Page.Table\022H\n\013form_fi" + "elds\030\013 \003(\01323.google.cloud.documentai.v1." - + "Document.Page.FormField\0328\n\tDimension\022\r\n\005" - + "width\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\004t" - + "ype\030\003 \001(\005\022\014\n\004data\030\004 \001(\014\032\335\002\n\006Layout\022D\n\013te" - + "xt_anchor\030\001 \001(\0132/.google.cloud.documenta" - + "i.v1.Document.TextAnchor\022\022\n\nconfidence\030\002" - + " \001(\002\022?\n\rbounding_poly\030\003 \001(\0132(.google.clo" - + "ud.documentai.v1.BoundingPoly\022Q\n\013orienta" - + "tion\030\004 \001(\0162<.google.cloud.documentai.v1." - + "Document.Page.Layout.Orientation\"e\n\013Orie" - + "ntation\022\033\n\027ORIENTATION_UNSPECIFIED\020\000\022\013\n\007" - + "PAGE_UP\020\001\022\016\n\nPAGE_RIGHT\020\002\022\r\n\tPAGE_DOWN\020\003" - + "\022\r\n\tPAGE_LEFT\020\004\032\346\001\n\005Block\022@\n\006layout\030\001 \001(" - + "\01320.google.cloud.documentai.v1.Document." - + "Page.Layout\022V\n\022detected_languages\030\002 \003(\0132" - + ":.google.cloud.documentai.v1.Document.Pa" - + "ge.DetectedLanguage\022C\n\nprovenance\030\003 \001(\0132" - + "/.google.cloud.documentai.v1.Document.Pr" - + "ovenance\032\352\001\n\tParagraph\022@\n\006layout\030\001 \001(\01320" - + ".google.cloud.documentai.v1.Document.Pag" - + "e.Layout\022V\n\022detected_languages\030\002 \003(\0132:.g" - + "oogle.cloud.documentai.v1.Document.Page." - + "DetectedLanguage\022C\n\nprovenance\030\003 \001(\0132/.g" - + "oogle.cloud.documentai.v1.Document.Prove" - + "nance\032\345\001\n\004Line\022@\n\006layout\030\001 \001(\01320.google." + + "Document.Page.FormField\022C\n\nprovenance\030\020 " + + "\001(\0132/.google.cloud.documentai.v1.Documen" + + "t.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\005w" + + "idth\030\003 \001(\005\022\016\n\006height\030\004 \001(\005\032@\n\006Matrix\022\014\n\004" + + "rows\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\335\002\n\006Layout\022D\n\013text_anchor\030\001" + + " \001(\0132/.google.cloud.documentai.v1.Docume" + + "nt.TextAnchor\022\022\n\nconfidence\030\002 \001(\002\022?\n\rbou" + + "nding_poly\030\003 \001(\0132(.google.cloud.document" + + "ai.v1.BoundingPoly\022Q\n\013orientation\030\004 \001(\0162" + + "<.google.cloud.documentai.v1.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\346\001\n\005Block\022@\n\006layout\030\001 \001(\01320.google." + "cloud.documentai.v1.Document.Page.Layout" + "\022V\n\022detected_languages\030\002 \003(\0132:.google.cl" + "oud.documentai.v1.Document.Page.Detected" + "Language\022C\n\nprovenance\030\003 \001(\0132/.google.cl" - + "oud.documentai.v1.Document.Provenance\032\346\003" - + "\n\005Token\022@\n\006layout\030\001 \001(\01320.google.cloud.d" - + "ocumentai.v1.Document.Page.Layout\022U\n\016det" - + "ected_break\030\002 \001(\0132=.google.cloud.documen" - + "tai.v1.Document.Page.Token.DetectedBreak" - + "\022V\n\022detected_languages\030\003 \003(\0132:.google.cl" - + "oud.documentai.v1.Document.Page.Detected" - + "Language\022C\n\nprovenance\030\004 \001(\0132/.google.cl" - + "oud.documentai.v1.Document.Provenance\032\246\001" - + "\n\rDetectedBreak\022P\n\004type\030\001 \001(\0162B.google.c" - + "loud.documentai.v1.Document.Page.Token.D" - + "etectedBreak.Type\"C\n\004Type\022\024\n\020TYPE_UNSPEC" - + "IFIED\020\000\022\t\n\005SPACE\020\001\022\016\n\nWIDE_SPACE\020\002\022\n\n\006HY" - + "PHEN\020\003\032\267\001\n\rVisualElement\022@\n\006layout\030\001 \001(\013" - + "20.google.cloud.documentai.v1.Document.P" - + "age.Layout\022\014\n\004type\030\002 \001(\t\022V\n\022detected_lan" - + "guages\030\003 \003(\0132:.google.cloud.documentai.v" - + "1.Document.Page.DetectedLanguage\032\337\004\n\005Tab" - + "le\022@\n\006layout\030\001 \001(\01320.google.cloud.docume" - + "ntai.v1.Document.Page.Layout\022M\n\013header_r" - + "ows\030\002 \003(\01328.google.cloud.documentai.v1.D" - + "ocument.Page.Table.TableRow\022K\n\tbody_rows" - + "\030\003 \003(\01328.google.cloud.documentai.v1.Docu" - + "ment.Page.Table.TableRow\022V\n\022detected_lan" - + "guages\030\004 \003(\0132:.google.cloud.documentai.v" - + "1.Document.Page.DetectedLanguage\032T\n\010Tabl" - + "eRow\022H\n\005cells\030\001 \003(\01329.google.cloud.docum" - + "entai.v1.Document.Page.Table.TableCell\032\311" - + "\001\n\tTableCell\022@\n\006layout\030\001 \001(\01320.google.cl" - + "oud.documentai.v1.Document.Page.Layout\022\020" - + "\n\010row_span\030\002 \001(\005\022\020\n\010col_span\030\003 \001(\005\022V\n\022de" - + "tected_languages\030\004 \003(\0132:.google.cloud.do" - + "cumentai.v1.Document.Page.DetectedLangua" - + "ge\032\347\002\n\tFormField\022D\n\nfield_name\030\001 \001(\01320.g" - + "oogle.cloud.documentai.v1.Document.Page." - + "Layout\022E\n\013field_value\030\002 \001(\01320.google.clo" - + "ud.documentai.v1.Document.Page.Layout\022[\n" - + "\027name_detected_languages\030\003 \003(\0132:.google." - + "cloud.documentai.v1.Document.Page.Detect" - + "edLanguage\022\\\n\030value_detected_languages\030\004" - + " \003(\0132:.google.cloud.documentai.v1.Docume" - + "nt.Page.DetectedLanguage\022\022\n\nvalue_type\030\005" - + " \001(\t\032=\n\020DetectedLanguage\022\025\n\rlanguage_cod" - + "e\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\233\006\n\006Entity\022I" - + "\n\013text_anchor\030\001 \001(\0132/.google.cloud.docum" - + "entai.v1.Document.TextAnchorB\003\340A\001\022\014\n\004typ" - + "e\030\002 \001(\t\022\031\n\014mention_text\030\003 \001(\tB\003\340A\001\022\027\n\nme" - + "ntion_id\030\004 \001(\tB\003\340A\001\022\027\n\nconfidence\030\005 \001(\002B" - + "\003\340A\001\022I\n\013page_anchor\030\006 \001(\0132/.google.cloud" - + ".documentai.v1.Document.PageAnchorB\003\340A\001\022" - + "\017\n\002id\030\007 \001(\tB\003\340A\001\022Z\n\020normalized_value\030\t \001" - + "(\0132;.google.cloud.documentai.v1.Document" - + ".Entity.NormalizedValueB\003\340A\001\022D\n\nproperti" - + "es\030\n \003(\0132+.google.cloud.documentai.v1.Do" - + "cument.EntityB\003\340A\001\022H\n\nprovenance\030\013 \001(\0132/" - + ".google.cloud.documentai.v1.Document.Pro" - + "venanceB\003\340A\001\022\025\n\010redacted\030\014 \001(\010B\003\340A\001\032\213\002\n\017" - + "NormalizedValue\022)\n\013money_value\030\002 \001(\0132\022.g" - + "oogle.type.MoneyH\000\022\'\n\ndate_value\030\003 \001(\0132\021" - + ".google.type.DateH\000\022/\n\016datetime_value\030\004 " - + "\001(\0132\025.google.type.DateTimeH\000\0223\n\raddress_" - + "value\030\005 \001(\0132\032.google.type.PostalAddressH" - + "\000\022\027\n\rboolean_value\030\006 \001(\010H\000\022\021\n\004text\030\001 \001(\t" - + "B\003\340A\002B\022\n\020structured_value\032I\n\016EntityRelat" - + "ion\022\022\n\nsubject_id\030\001 \001(\t\022\021\n\tobject_id\030\002 \001" - + "(\t\022\020\n\010relation\030\003 \001(\t\032\250\001\n\nTextAnchor\022R\n\rt" - + "ext_segments\030\001 \003(\0132;.google.cloud.docume" - + "ntai.v1.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\tend_index\030\002 \001(\003\032\330\003\n\nPage" - + "Anchor\022J\n\tpage_refs\030\001 \003(\01327.google.cloud" - + ".documentai.v1.Document.PageAnchor.PageR" - + "ef\032\375\002\n\007PageRef\022\021\n\004page\030\001 \001(\003B\003\340A\002\022\\\n\013lay" - + "out_type\030\002 \001(\0162B.google.cloud.documentai" - + ".v1.Document.PageAnchor.PageRef.LayoutTy" - + "peB\003\340A\001\022\030\n\tlayout_id\030\003 \001(\tB\005\030\001\340A\001\022D\n\rbou" - + "nding_poly\030\004 \001(\0132(.google.cloud.document" - + "ai.v1.BoundingPolyB\003\340A\001\022\027\n\nconfidence\030\005 " - + "\001(\002B\003\340A\001\"\207\001\n\nLayoutType\022\033\n\027LAYOUT_TYPE_U" - + "NSPECIFIED\020\000\022\t\n\005BLOCK\020\001\022\r\n\tPARAGRAPH\020\002\022\010" - + "\n\004LINE\020\003\022\t\n\005TOKEN\020\004\022\022\n\016VISUAL_ELEMENT\020\005\022" - + "\t\n\005TABLE\020\006\022\016\n\nFORM_FIELD\020\007\032\365\002\n\nProvenanc" - + "e\022\020\n\010revision\030\001 \001(\005\022\n\n\002id\030\002 \001(\005\022G\n\007paren" - + "ts\030\003 \003(\01326.google.cloud.documentai.v1.Do" - + "cument.Provenance.Parent\022K\n\004type\030\004 \001(\0162=" - + ".google.cloud.documentai.v1.Document.Pro" - + "venance.OperationType\032&\n\006Parent\022\020\n\010revis" - + "ion\030\001 \001(\005\022\n\n\002id\030\002 \001(\005\"\212\001\n\rOperationType\022" - + "\036\n\032OPERATION_TYPE_UNSPECIFIED\020\000\022\007\n\003ADD\020\001" - + "\022\n\n\006REMOVE\020\002\022\013\n\007REPLACE\020\003\022\022\n\016EVAL_REQUES" - + "TED\020\004\022\021\n\rEVAL_APPROVED\020\005\022\020\n\014EVAL_SKIPPED" - + "\020\006\032\215\002\n\010Revision\022\017\n\005agent\030\004 \001(\tH\000\022\023\n\tproc" - + "essor\030\005 \001(\tH\000\022\n\n\002id\030\001 \001(\t\022\016\n\006parent\030\002 \003(" - + "\005\022/\n\013create_time\030\003 \001(\0132\032.google.protobuf" - + ".Timestamp\022O\n\014human_review\030\006 \001(\01329.googl" - + "e.cloud.documentai.v1.Document.Revision." - + "HumanReview\0323\n\013HumanReview\022\r\n\005state\030\001 \001(" - + "\t\022\025\n\rstate_message\030\002 \001(\tB\010\n\006source\032\255\001\n\nT" - + "extChange\022D\n\013text_anchor\030\001 \001(\0132/.google." - + "cloud.documentai.v1.Document.TextAnchor\022" - + "\024\n\014changed_text\030\002 \001(\t\022C\n\nprovenance\030\003 \003(" - + "\0132/.google.cloud.documentai.v1.Document." - + "ProvenanceB\010\n\006sourceB\321\001\n\036com.google.clou" - + "d.documentai.v1B\rDocumentProtoP\001ZDgoogle" - + ".golang.org/genproto/googleapis/cloud/do" - + "cumentai/v1;documentai\252\002\032Google.Cloud.Do" - + "cumentAI.V1\312\002\032Google\\Cloud\\DocumentAI\\V1" - + "\352\002\035Google::Cloud::DocumentAI::V1b\006proto3" + + "oud.documentai.v1.Document.Provenance\032\352\001" + + "\n\tParagraph\022@\n\006layout\030\001 \001(\01320.google.clo" + + "ud.documentai.v1.Document.Page.Layout\022V\n" + + "\022detected_languages\030\002 \003(\0132:.google.cloud" + + ".documentai.v1.Document.Page.DetectedLan" + + "guage\022C\n\nprovenance\030\003 \001(\0132/.google.cloud" + + ".documentai.v1.Document.Provenance\032\345\001\n\004L" + + "ine\022@\n\006layout\030\001 \001(\01320.google.cloud.docum" + + "entai.v1.Document.Page.Layout\022V\n\022detecte" + + "d_languages\030\002 \003(\0132:.google.cloud.documen" + + "tai.v1.Document.Page.DetectedLanguage\022C\n" + + "\nprovenance\030\003 \001(\0132/.google.cloud.documen" + + "tai.v1.Document.Provenance\032\346\003\n\005Token\022@\n\006" + + "layout\030\001 \001(\01320.google.cloud.documentai.v" + + "1.Document.Page.Layout\022U\n\016detected_break" + + "\030\002 \001(\0132=.google.cloud.documentai.v1.Docu" + + "ment.Page.Token.DetectedBreak\022V\n\022detecte" + + "d_languages\030\003 \003(\0132:.google.cloud.documen" + + "tai.v1.Document.Page.DetectedLanguage\022C\n" + + "\nprovenance\030\004 \001(\0132/.google.cloud.documen" + + "tai.v1.Document.Provenance\032\246\001\n\rDetectedB" + + "reak\022P\n\004type\030\001 \001(\0162B.google.cloud.docume" + + "ntai.v1.Document.Page.Token.DetectedBrea" + + "k.Type\"C\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\t\n\005" + + "SPACE\020\001\022\016\n\nWIDE_SPACE\020\002\022\n\n\006HYPHEN\020\003\032\267\001\n\r" + + "VisualElement\022@\n\006layout\030\001 \001(\01320.google.c" + + "loud.documentai.v1.Document.Page.Layout\022" + + "\014\n\004type\030\002 \001(\t\022V\n\022detected_languages\030\003 \003(" + + "\0132:.google.cloud.documentai.v1.Document." + + "Page.DetectedLanguage\032\337\004\n\005Table\022@\n\006layou" + + "t\030\001 \001(\01320.google.cloud.documentai.v1.Doc" + + "ument.Page.Layout\022M\n\013header_rows\030\002 \003(\01328" + + ".google.cloud.documentai.v1.Document.Pag" + + "e.Table.TableRow\022K\n\tbody_rows\030\003 \003(\01328.go" + + "ogle.cloud.documentai.v1.Document.Page.T" + + "able.TableRow\022V\n\022detected_languages\030\004 \003(" + + "\0132:.google.cloud.documentai.v1.Document." + + "Page.DetectedLanguage\032T\n\010TableRow\022H\n\005cel" + + "ls\030\001 \003(\01329.google.cloud.documentai.v1.Do" + + "cument.Page.Table.TableCell\032\311\001\n\tTableCel" + + "l\022@\n\006layout\030\001 \001(\01320.google.cloud.documen" + + "tai.v1.Document.Page.Layout\022\020\n\010row_span\030" + + "\002 \001(\005\022\020\n\010col_span\030\003 \001(\005\022V\n\022detected_lang" + + "uages\030\004 \003(\0132:.google.cloud.documentai.v1" + + ".Document.Page.DetectedLanguage\032\254\003\n\tForm" + + "Field\022D\n\nfield_name\030\001 \001(\01320.google.cloud" + + ".documentai.v1.Document.Page.Layout\022E\n\013f" + + "ield_value\030\002 \001(\01320.google.cloud.document" + + "ai.v1.Document.Page.Layout\022[\n\027name_detec" + + "ted_languages\030\003 \003(\0132:.google.cloud.docum" + + "entai.v1.Document.Page.DetectedLanguage\022" + + "\\\n\030value_detected_languages\030\004 \003(\0132:.goog" + + "le.cloud.documentai.v1.Document.Page.Det" + + "ectedLanguage\022\022\n\nvalue_type\030\005 \001(\t\022C\n\npro" + + "venance\030\010 \001(\0132/.google.cloud.documentai." + + "v1.Document.Provenance\032=\n\020DetectedLangua" + + "ge\022\025\n\rlanguage_code\030\001 \001(\t\022\022\n\nconfidence\030" + + "\002 \001(\002\032\233\006\n\006Entity\022I\n\013text_anchor\030\001 \001(\0132/." + + "google.cloud.documentai.v1.Document.Text" + + "AnchorB\003\340A\001\022\014\n\004type\030\002 \001(\t\022\031\n\014mention_tex" + + "t\030\003 \001(\tB\003\340A\001\022\027\n\nmention_id\030\004 \001(\tB\003\340A\001\022\027\n" + + "\nconfidence\030\005 \001(\002B\003\340A\001\022I\n\013page_anchor\030\006 " + + "\001(\0132/.google.cloud.documentai.v1.Documen" + + "t.PageAnchorB\003\340A\001\022\017\n\002id\030\007 \001(\tB\003\340A\001\022Z\n\020no" + + "rmalized_value\030\t \001(\0132;.google.cloud.docu" + + "mentai.v1.Document.Entity.NormalizedValu" + + "eB\003\340A\001\022D\n\nproperties\030\n \003(\0132+.google.clou" + + "d.documentai.v1.Document.EntityB\003\340A\001\022H\n\n" + + "provenance\030\013 \001(\0132/.google.cloud.document" + + "ai.v1.Document.ProvenanceB\003\340A\001\022\025\n\010redact" + + "ed\030\014 \001(\010B\003\340A\001\032\213\002\n\017NormalizedValue\022)\n\013mon" + + "ey_value\030\002 \001(\0132\022.google.type.MoneyH\000\022\'\n\n" + + "date_value\030\003 \001(\0132\021.google.type.DateH\000\022/\n" + + "\016datetime_value\030\004 \001(\0132\025.google.type.Date" + + "TimeH\000\0223\n\raddress_value\030\005 \001(\0132\032.google.t" + + "ype.PostalAddressH\000\022\027\n\rboolean_value\030\006 \001" + + "(\010H\000\022\021\n\004text\030\001 \001(\tB\003\340A\002B\022\n\020structured_va" + + "lue\032I\n\016EntityRelation\022\022\n\nsubject_id\030\001 \001(" + + "\t\022\021\n\tobject_id\030\002 \001(\t\022\020\n\010relation\030\003 \001(\t\032\250" + + "\001\n\nTextAnchor\022R\n\rtext_segments\030\001 \003(\0132;.g" + + "oogle.cloud.documentai.v1.Document.TextA" + + "nchor.TextSegment\022\017\n\007content\030\002 \001(\t\0325\n\013Te" + + "xtSegment\022\023\n\013start_index\030\001 \001(\003\022\021\n\tend_in" + + "dex\030\002 \001(\003\032\330\003\n\nPageAnchor\022J\n\tpage_refs\030\001 " + + "\003(\01327.google.cloud.documentai.v1.Documen" + + "t.PageAnchor.PageRef\032\375\002\n\007PageRef\022\021\n\004page" + + "\030\001 \001(\003B\003\340A\002\022\\\n\013layout_type\030\002 \001(\0162B.googl" + + "e.cloud.documentai.v1.Document.PageAncho" + + "r.PageRef.LayoutTypeB\003\340A\001\022\030\n\tlayout_id\030\003" + + " \001(\tB\005\030\001\340A\001\022D\n\rbounding_poly\030\004 \001(\0132(.goo" + + "gle.cloud.documentai.v1.BoundingPolyB\003\340A" + + "\001\022\027\n\nconfidence\030\005 \001(\002B\003\340A\001\"\207\001\n\nLayoutTyp" + + "e\022\033\n\027LAYOUT_TYPE_UNSPECIFIED\020\000\022\t\n\005BLOCK\020" + + "\001\022\r\n\tPARAGRAPH\020\002\022\010\n\004LINE\020\003\022\t\n\005TOKEN\020\004\022\022\n" + + "\016VISUAL_ELEMENT\020\005\022\t\n\005TABLE\020\006\022\016\n\nFORM_FIE" + + "LD\020\007\032\214\003\n\nProvenance\022\020\n\010revision\030\001 \001(\005\022\016\n" + + "\002id\030\002 \001(\005B\002\030\001\022G\n\007parents\030\003 \003(\01326.google." + + "cloud.documentai.v1.Document.Provenance." + + "Parent\022K\n\004type\030\004 \001(\0162=.google.cloud.docu" + + "mentai.v1.Document.Provenance.OperationT" + + "ype\0329\n\006Parent\022\020\n\010revision\030\001 \001(\005\022\r\n\005index" + + "\030\003 \001(\005\022\016\n\002id\030\002 \001(\005B\002\030\001\"\212\001\n\rOperationType" + + "\022\036\n\032OPERATION_TYPE_UNSPECIFIED\020\000\022\007\n\003ADD\020" + + "\001\022\n\n\006REMOVE\020\002\022\013\n\007REPLACE\020\003\022\022\n\016EVAL_REQUE" + + "STED\020\004\022\021\n\rEVAL_APPROVED\020\005\022\020\n\014EVAL_SKIPPE" + + "D\020\006\032\215\002\n\010Revision\022\017\n\005agent\030\004 \001(\tH\000\022\023\n\tpro" + + "cessor\030\005 \001(\tH\000\022\n\n\002id\030\001 \001(\t\022\016\n\006parent\030\002 \003" + + "(\005\022/\n\013create_time\030\003 \001(\0132\032.google.protobu" + + "f.Timestamp\022O\n\014human_review\030\006 \001(\01329.goog" + + "le.cloud.documentai.v1.Document.Revision" + + ".HumanReview\0323\n\013HumanReview\022\r\n\005state\030\001 \001" + + "(\t\022\025\n\rstate_message\030\002 \001(\tB\010\n\006source\032\255\001\n\n" + + "TextChange\022D\n\013text_anchor\030\001 \001(\0132/.google" + + ".cloud.documentai.v1.Document.TextAnchor" + + "\022\024\n\014changed_text\030\002 \001(\t\022C\n\nprovenance\030\003 \003" + + "(\0132/.google.cloud.documentai.v1.Document" + + ".ProvenanceB\010\n\006sourceB\321\001\n\036com.google.clo" + + "ud.documentai.v1B\rDocumentProtoP\001ZDgoogl" + + "e.golang.org/genproto/googleapis/cloud/d" + + "ocumentai/v1;documentai\252\002\032Google.Cloud.D" + + "ocumentAI.V1\312\002\032Google\\Cloud\\DocumentAI\\V" + + "1\352\002\035Google::Cloud::DocumentAI::V1b\006proto" + + "3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -446,6 +451,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "VisualElements", "Tables", "FormFields", + "Provenance", }); internal_static_google_cloud_documentai_v1_Document_Page_Dimension_descriptor = internal_static_google_cloud_documentai_v1_Document_Page_descriptor.getNestedTypes().get(0); @@ -570,6 +576,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NameDetectedLanguages", "ValueDetectedLanguages", "ValueType", + "Provenance", }); internal_static_google_cloud_documentai_v1_Document_Page_DetectedLanguage_descriptor = internal_static_google_cloud_documentai_v1_Document_Page_descriptor @@ -675,7 +682,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_Document_Provenance_Parent_descriptor, new java.lang.String[] { - "Revision", "Id", + "Revision", "Index", "Id", }); internal_static_google_cloud_documentai_v1_Document_Revision_descriptor = internal_static_google_cloud_documentai_v1_Document_descriptor.getNestedTypes().get(8); diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewConfigName.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewConfigName.java index 5638bd5e..d333169d 100644 --- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewConfigName.java +++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewConfigName.java @@ -213,9 +213,9 @@ public Builder setProcessor(String processor) { } private Builder(HumanReviewConfigName humanReviewConfigName) { - project = humanReviewConfigName.project; - location = humanReviewConfigName.location; - processor = humanReviewConfigName.processor; + this.project = humanReviewConfigName.project; + this.location = humanReviewConfigName.location; + this.processor = humanReviewConfigName.processor; } public HumanReviewConfigName build() { diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorName.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorName.java index 0ba9b1fb..ded0c8bc 100644 --- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorName.java +++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorName.java @@ -211,9 +211,9 @@ public Builder setProcessor(String processor) { } private Builder(ProcessorName processorName) { - project = processorName.project; - location = processorName.location; - processor = processorName.processor; + this.project = processorName.project; + this.location = processorName.location; + this.processor = processorName.processor; } public ProcessorName build() { diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequest.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequest.java index 522df1a1..99a265c7 100644 --- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequest.java +++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequest.java @@ -39,6 +39,7 @@ private ReviewDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder private ReviewDocumentRequest() { humanReviewConfig_ = ""; + priority_ = 0; } @java.lang.Override @@ -77,6 +78,11 @@ private ReviewDocumentRequest( humanReviewConfig_ = s; break; } + case 24: + { + enableSchemaValidation_ = input.readBool(); + break; + } case 34: { com.google.cloud.documentai.v1.Document.Builder subBuilder = null; @@ -93,6 +99,13 @@ private ReviewDocumentRequest( sourceCase_ = 4; break; } + case 40: + { + int rawValue = input.readEnum(); + + priority_ = rawValue; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -127,6 +140,145 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.documentai.v1.ReviewDocumentRequest.Builder.class); } + /** + * + * + *
+   * The priority level of the human review task.
+   * 
+ * + * Protobuf enum {@code google.cloud.documentai.v1.ReviewDocumentRequest.Priority} + */ + public enum Priority implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default priority level.
+     * 
+ * + * DEFAULT = 0; + */ + DEFAULT(0), + /** + * + * + *
+     * The urgent priority level. The labeling manager should allocate labeler
+     * resource to the urgent task queue to respect this priority level.
+     * 
+ * + * URGENT = 1; + */ + URGENT(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default priority level.
+     * 
+ * + * DEFAULT = 0; + */ + public static final int DEFAULT_VALUE = 0; + /** + * + * + *
+     * The urgent priority level. The labeling manager should allocate labeler
+     * resource to the urgent task queue to respect this priority level.
+     * 
+ * + * URGENT = 1; + */ + public static final int URGENT_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 Priority 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 Priority forNumber(int value) { + switch (value) { + case 0: + return DEFAULT; + case 1: + return URGENT; + 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 Priority findValueByNumber(int number) { + return Priority.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.documentai.v1.ReviewDocumentRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Priority[] VALUES = values(); + + public static Priority 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 Priority(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1.ReviewDocumentRequest.Priority) + } + private int sourceCase_ = 0; private java.lang.Object source_; @@ -277,6 +429,62 @@ public com.google.protobuf.ByteString getHumanReviewConfigBytes() { } } + public static final int ENABLE_SCHEMA_VALIDATION_FIELD_NUMBER = 3; + private boolean enableSchemaValidation_; + /** + * + * + *
+   * Whether the validation should be performed on the ad-hoc review request.
+   * 
+ * + * bool enable_schema_validation = 3; + * + * @return The enableSchemaValidation. + */ + @java.lang.Override + public boolean getEnableSchemaValidation() { + return enableSchemaValidation_; + } + + public static final int PRIORITY_FIELD_NUMBER = 5; + private int priority_; + /** + * + * + *
+   * The priority of the human review task.
+   * 
+ * + * .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; + * + * @return The enum numeric value on the wire for priority. + */ + @java.lang.Override + public int getPriorityValue() { + return priority_; + } + /** + * + * + *
+   * The priority of the human review task.
+   * 
+ * + * .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; + * + * @return The priority. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority getPriority() { + @SuppressWarnings("deprecation") + com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority result = + com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority.valueOf(priority_); + return result == null + ? com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -294,9 +502,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getHumanReviewConfigBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, humanReviewConfig_); } + if (enableSchemaValidation_ != false) { + output.writeBool(3, enableSchemaValidation_); + } if (sourceCase_ == 4) { output.writeMessage(4, (com.google.cloud.documentai.v1.Document) source_); } + if (priority_ + != com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority.DEFAULT.getNumber()) { + output.writeEnum(5, priority_); + } unknownFields.writeTo(output); } @@ -309,11 +524,18 @@ public int getSerializedSize() { if (!getHumanReviewConfigBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, humanReviewConfig_); } + if (enableSchemaValidation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableSchemaValidation_); + } if (sourceCase_ == 4) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 4, (com.google.cloud.documentai.v1.Document) source_); } + if (priority_ + != com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, priority_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -331,6 +553,8 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.documentai.v1.ReviewDocumentRequest) obj; if (!getHumanReviewConfig().equals(other.getHumanReviewConfig())) return false; + if (getEnableSchemaValidation() != other.getEnableSchemaValidation()) return false; + if (priority_ != other.priority_) return false; if (!getSourceCase().equals(other.getSourceCase())) return false; switch (sourceCase_) { case 4: @@ -352,6 +576,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + HUMAN_REVIEW_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getHumanReviewConfig().hashCode(); + hash = (37 * hash) + ENABLE_SCHEMA_VALIDATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSchemaValidation()); + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + priority_; switch (sourceCase_) { case 4: hash = (37 * hash) + INLINE_DOCUMENT_FIELD_NUMBER; @@ -507,6 +735,10 @@ public Builder clear() { super.clear(); humanReviewConfig_ = ""; + enableSchemaValidation_ = false; + + priority_ = 0; + sourceCase_ = 0; source_ = null; return this; @@ -544,6 +776,8 @@ public com.google.cloud.documentai.v1.ReviewDocumentRequest buildPartial() { } } result.humanReviewConfig_ = humanReviewConfig_; + result.enableSchemaValidation_ = enableSchemaValidation_; + result.priority_ = priority_; result.sourceCase_ = sourceCase_; onBuilt(); return result; @@ -599,6 +833,12 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.ReviewDocumentRequest ot humanReviewConfig_ = other.humanReviewConfig_; onChanged(); } + if (other.getEnableSchemaValidation() != false) { + setEnableSchemaValidation(other.getEnableSchemaValidation()); + } + if (other.priority_ != 0) { + setPriorityValue(other.getPriorityValue()); + } switch (other.getSourceCase()) { case INLINE_DOCUMENT: { @@ -984,6 +1224,152 @@ public Builder setHumanReviewConfigBytes(com.google.protobuf.ByteString value) { return this; } + private boolean enableSchemaValidation_; + /** + * + * + *
+     * Whether the validation should be performed on the ad-hoc review request.
+     * 
+ * + * bool enable_schema_validation = 3; + * + * @return The enableSchemaValidation. + */ + @java.lang.Override + public boolean getEnableSchemaValidation() { + return enableSchemaValidation_; + } + /** + * + * + *
+     * Whether the validation should be performed on the ad-hoc review request.
+     * 
+ * + * bool enable_schema_validation = 3; + * + * @param value The enableSchemaValidation to set. + * @return This builder for chaining. + */ + public Builder setEnableSchemaValidation(boolean value) { + + enableSchemaValidation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the validation should be performed on the ad-hoc review request.
+     * 
+ * + * bool enable_schema_validation = 3; + * + * @return This builder for chaining. + */ + public Builder clearEnableSchemaValidation() { + + enableSchemaValidation_ = false; + onChanged(); + return this; + } + + private int priority_ = 0; + /** + * + * + *
+     * The priority of the human review task.
+     * 
+ * + * .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; + * + * @return The enum numeric value on the wire for priority. + */ + @java.lang.Override + public int getPriorityValue() { + return priority_; + } + /** + * + * + *
+     * The priority of the human review task.
+     * 
+ * + * .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; + * + * @param value The enum numeric value on the wire for priority to set. + * @return This builder for chaining. + */ + public Builder setPriorityValue(int value) { + + priority_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The priority of the human review task.
+     * 
+ * + * .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; + * + * @return The priority. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority getPriority() { + @SuppressWarnings("deprecation") + com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority result = + com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority.valueOf(priority_); + return result == null + ? com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The priority of the human review task.
+     * 
+ * + * .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; + * + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority( + com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority value) { + if (value == null) { + throw new NullPointerException(); + } + + priority_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The priority of the human review task.
+     * 
+ * + * .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; + * + * @return This builder for chaining. + */ + public Builder clearPriority() { + + priority_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequestOrBuilder.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequestOrBuilder.java index 8e2576b2..21080f66 100644 --- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequestOrBuilder.java +++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequestOrBuilder.java @@ -89,5 +89,43 @@ public interface ReviewDocumentRequestOrBuilder */ com.google.protobuf.ByteString getHumanReviewConfigBytes(); + /** + * + * + *
+   * Whether the validation should be performed on the ad-hoc review request.
+   * 
+ * + * bool enable_schema_validation = 3; + * + * @return The enableSchemaValidation. + */ + boolean getEnableSchemaValidation(); + + /** + * + * + *
+   * The priority of the human review task.
+   * 
+ * + * .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; + * + * @return The enum numeric value on the wire for priority. + */ + int getPriorityValue(); + /** + * + * + *
+   * The priority of the human review task.
+   * 
+ * + * .google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5; + * + * @return The priority. + */ + com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority getPriority(); + public com.google.cloud.documentai.v1.ReviewDocumentRequest.SourceCase getSourceCase(); } diff --git a/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto b/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto index eb4615c1..467a4492 100644 --- a/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto +++ b/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto @@ -324,6 +324,9 @@ message Document { // - "unfilled_checkbox" // - "filled_checkbox" string value_type = 5; + + // The history of this annotation. + Provenance provenance = 8; } // Detected language for a structural component. @@ -385,6 +388,9 @@ message Document { // A list of visually detected form fields on the page. repeated FormField form_fields = 11; + + // The history of this page. + Provenance provenance = 16; } // A phrase in the text that is a known entity type, such as a person, an @@ -536,6 +542,8 @@ message Document { // Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using // [Document.pages][page_refs.page] to locate the related page element. + // This field is skipped when its value is the default 0. See + // https://developers.google.com/protocol-buffers/docs/proto3#json. int64 page = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The type of the layout element that is being referenced if any. @@ -568,8 +576,12 @@ message Document { // The index of the [Document.revisions] identifying the parent revision. int32 revision = 1; + // The index of the parent revisions corresponding collection of items + // (eg. list of entities, properties within entities, etc.) + int32 index = 3; + // The id of the parent provenance. - int32 id = 2; + int32 id = 2 [deprecated = true]; } // If a processor or agent does an explicit operation on existing elements. @@ -602,7 +614,7 @@ message Document { // The Id of this operation. Needs to be unique within the scope of the // revision. - int32 id = 2; + int32 id = 2 [deprecated = true]; // References to the original elements that are replaced. repeated Parent parents = 3; diff --git a/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto b/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto index 9f0b11a7..65f0e6d9 100644 --- a/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto +++ b/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto @@ -254,6 +254,18 @@ message BatchProcessMetadata { // Request message for review document method. message ReviewDocumentRequest { + reserved 2; + + // The priority level of the human review task. + enum Priority { + // The default priority level. + DEFAULT = 0; + + // The urgent priority level. The labeling manager should allocate labeler + // resource to the urgent task queue to respect this priority level. + URGENT = 1; + } + // The document payload. oneof source { // An inline document proto. @@ -268,6 +280,12 @@ message ReviewDocumentRequest { type: "documentai.googleapis.com/HumanReviewConfig" } ]; + + // Whether the validation should be performed on the ad-hoc review request. + bool enable_schema_validation = 3; + + // The priority of the human review task. + Priority priority = 5; } // Response message for review document method. diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/HumanReviewConfigName.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/HumanReviewConfigName.java index 99b43ebf..4a48c700 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/HumanReviewConfigName.java +++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/HumanReviewConfigName.java @@ -213,9 +213,9 @@ public Builder setProcessor(String processor) { } private Builder(HumanReviewConfigName humanReviewConfigName) { - project = humanReviewConfigName.project; - location = humanReviewConfigName.location; - processor = humanReviewConfigName.processor; + this.project = humanReviewConfigName.project; + this.location = humanReviewConfigName.location; + this.processor = humanReviewConfigName.processor; } public HumanReviewConfigName build() { diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/LocationName.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/LocationName.java index 750b2e48..0a1352d2 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/LocationName.java +++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/LocationName.java @@ -181,8 +181,8 @@ public Builder setLocation(String location) { } private Builder(LocationName locationName) { - project = locationName.project; - location = locationName.location; + this.project = locationName.project; + this.location = locationName.location; } public LocationName build() { diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorName.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorName.java index 7ca10634..33ee7318 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorName.java +++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorName.java @@ -211,9 +211,9 @@ public Builder setProcessor(String processor) { } private Builder(ProcessorName processorName) { - project = processorName.project; - location = processorName.location; - processor = processorName.processor; + this.project = processorName.project; + this.location = processorName.location; + this.processor = processorName.processor; } public ProcessorName build() { diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorTypeName.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorTypeName.java index 4cea485c..dcfa71fa 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorTypeName.java +++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorTypeName.java @@ -215,9 +215,9 @@ public Builder setProcessorType(String processorType) { } private Builder(ProcessorTypeName processorTypeName) { - project = processorTypeName.project; - location = processorTypeName.location; - processorType = processorTypeName.processorType; + this.project = processorTypeName.project; + this.location = processorTypeName.location; + this.processorType = processorTypeName.processorType; } public ProcessorTypeName build() {