diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d11df534..30fdb7b9 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -7,4 +7,4 @@ * @googleapis/yoshi-java # The java-samples-reviewers team is the default owner for samples changes -samples/**/*.java @googleapis/java-samples-reviewers @googleapis/ml-apis +samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 8a5e9641..13622694 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-document-ai.git", - "sha": "1ea5c6128ff9177a9cd21705adaffe6e095476fb" + "sha": "464417334090df664b79e94b3cc3111275687d16" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ff6b759fcb58f216f62b48d5be0bb85fafbc3bb2" + "sha": "5a6f30b8bb7672cf237c4f75d5aa96bfba170e7f" } } ] diff --git a/CHANGELOG.md b/CHANGELOG.md index 0592edf0..f7a54bc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.8.0](https://www.github.com/googleapis/java-document-ai/compare/v0.7.1...v0.8.0) (2021-04-27) + + +### Features + +* add confidence field to the PageAnchor.PageRef in document.proto ([#450](https://www.github.com/googleapis/java-document-ai/issues/450)) ([2843a9d](https://www.github.com/googleapis/java-document-ai/commit/2843a9dba1cf0aa13ecebc8b62687c9ea091079f)) +* add confidence field to the PageAnchor.PageRef in document.proto ([#453](https://www.github.com/googleapis/java-document-ai/issues/453)) ([2d0772e](https://www.github.com/googleapis/java-document-ai/commit/2d0772e02bb2ffa2b45f026e121ac36f7b1590b9)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v1 ([#452](https://www.github.com/googleapis/java-document-ai/issues/452)) ([952106e](https://www.github.com/googleapis/java-document-ai/commit/952106ebcfa227d552beeb84e3fe816223e899a0)) +* update dependency com.google.cloud:google-cloud-storage to v1.113.16 ([#454](https://www.github.com/googleapis/java-document-ai/issues/454)) ([ce87c21](https://www.github.com/googleapis/java-document-ai/commit/ce87c2199576fc98ae252449556255f00f135290)) + ### [0.7.1](https://www.github.com/googleapis/java-document-ai/compare/v0.7.0...v0.7.1) (2021-04-20) diff --git a/README.md b/README.md index ffbc24c2..cd127e4b 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud google-cloud-document-ai - 0.6.0 + 0.7.1 ``` @@ -42,7 +42,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-document-ai - 0.6.0 + 0.7.1 ``` @@ -55,12 +55,12 @@ compile 'com.google.cloud:google-cloud-document-ai' ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-document-ai:0.7.0' +compile 'com.google.cloud:google-cloud-document-ai:0.7.1' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-document-ai" % "0.7.0" +libraryDependencies += "com.google.cloud" % "google-cloud-document-ai" % "0.7.1" ``` ## Authentication @@ -101,6 +101,9 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Batch Process Document | [source code](https://github.com/googleapis/java-document-ai/blob/master/samples/snippets/src/main/java/documentai/v1/BatchProcessDocument.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-document-ai&page=editor&open_in_editor=samples/snippets/src/main/java/documentai/v1/BatchProcessDocument.java) | +| Process Document | [source code](https://github.com/googleapis/java-document-ai/blob/master/samples/snippets/src/main/java/documentai/v1/ProcessDocument.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-document-ai&page=editor&open_in_editor=samples/snippets/src/main/java/documentai/v1/ProcessDocument.java) | +| Quick Start | [source code](https://github.com/googleapis/java-document-ai/blob/master/samples/snippets/src/main/java/documentai/v1/QuickStart.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-document-ai&page=editor&open_in_editor=samples/snippets/src/main/java/documentai/v1/QuickStart.java) | | Batch Parse Form Beta | [source code](https://github.com/googleapis/java-document-ai/blob/master/samples/snippets/src/main/java/documentai/v1beta2/BatchParseFormBeta.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-document-ai&page=editor&open_in_editor=samples/snippets/src/main/java/documentai/v1beta2/BatchParseFormBeta.java) | | Batch Parse Table Beta | [source code](https://github.com/googleapis/java-document-ai/blob/master/samples/snippets/src/main/java/documentai/v1beta2/BatchParseTableBeta.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-document-ai&page=editor&open_in_editor=samples/snippets/src/main/java/documentai/v1beta2/BatchParseTableBeta.java) | | Parse Form Beta | [source code](https://github.com/googleapis/java-document-ai/blob/master/samples/snippets/src/main/java/documentai/v1beta2/ParseFormBeta.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-document-ai&page=editor&open_in_editor=samples/snippets/src/main/java/documentai/v1beta2/ParseFormBeta.java) | @@ -108,9 +111,6 @@ has instructions for running the samples. | Parse With Model Beta | [source code](https://github.com/googleapis/java-document-ai/blob/master/samples/snippets/src/main/java/documentai/v1beta2/ParseWithModelBeta.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-document-ai&page=editor&open_in_editor=samples/snippets/src/main/java/documentai/v1beta2/ParseWithModelBeta.java) | | Quick Start | [source code](https://github.com/googleapis/java-document-ai/blob/master/samples/snippets/src/main/java/documentai/v1beta2/QuickStart.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-document-ai&page=editor&open_in_editor=samples/snippets/src/main/java/documentai/v1beta2/QuickStart.java) | | Set End Point Beta | [source code](https://github.com/googleapis/java-document-ai/blob/master/samples/snippets/src/main/java/documentai/v1beta2/SetEndPointBeta.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-document-ai&page=editor&open_in_editor=samples/snippets/src/main/java/documentai/v1beta2/SetEndPointBeta.java) | -| Batch Process Document Beta | [source code](https://github.com/googleapis/java-document-ai/blob/master/samples/snippets/src/main/java/documentai/v1beta3/BatchProcessDocumentBeta.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-document-ai&page=editor&open_in_editor=samples/snippets/src/main/java/documentai/v1beta3/BatchProcessDocumentBeta.java) | -| Process Document Beta | [source code](https://github.com/googleapis/java-document-ai/blob/master/samples/snippets/src/main/java/documentai/v1beta3/ProcessDocumentBeta.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-document-ai&page=editor&open_in_editor=samples/snippets/src/main/java/documentai/v1beta3/ProcessDocumentBeta.java) | -| Quick Start | [source code](https://github.com/googleapis/java-document-ai/blob/master/samples/snippets/src/main/java/documentai/v1beta3/QuickStart.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-document-ai&page=editor&open_in_editor=samples/snippets/src/main/java/documentai/v1beta3/QuickStart.java) | diff --git a/google-cloud-document-ai-bom/pom.xml b/google-cloud-document-ai-bom/pom.xml index 2648aedd..e632cb07 100644 --- a/google-cloud-document-ai-bom/pom.xml +++ b/google-cloud-document-ai-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-document-ai-bom - 0.7.1 + 0.8.0 pom com.google.cloud google-cloud-shared-config - 0.11.1 + 0.11.2 Google Cloud Document AI BOM @@ -61,47 +61,47 @@ com.google.cloud google-cloud-document-ai - 0.7.1 + 0.8.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta1 - 0.7.1 + 0.8.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta2 - 0.7.1 + 0.8.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta3 - 0.7.1 + 0.8.0 com.google.api.grpc grpc-google-cloud-document-ai-v1 - 0.7.1 + 0.8.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta1 - 0.7.1 + 0.8.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta2 - 0.7.1 + 0.8.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta3 - 0.7.1 + 0.8.0 com.google.api.grpc proto-google-cloud-document-ai-v1 - 0.7.1 + 0.8.0 diff --git a/google-cloud-document-ai/pom.xml b/google-cloud-document-ai/pom.xml index beb45d40..b676a32d 100644 --- a/google-cloud-document-ai/pom.xml +++ b/google-cloud-document-ai/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-document-ai - 0.7.1 + 0.8.0 jar Google Cloud Document AI https://github.com/googleapis/java-document-ai @@ -11,7 +11,7 @@ com.google.cloud google-cloud-document-ai-parent - 0.7.1 + 0.8.0 google-cloud-document-ai diff --git a/grpc-google-cloud-document-ai-v1/pom.xml b/grpc-google-cloud-document-ai-v1/pom.xml index c256a0c7..db76dd13 100644 --- a/grpc-google-cloud-document-ai-v1/pom.xml +++ b/grpc-google-cloud-document-ai-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-document-ai-v1 - 0.7.1 + 0.8.0 grpc-google-cloud-document-ai-v1 GRPC library for google-cloud-document-ai com.google.cloud google-cloud-document-ai-parent - 0.7.1 + 0.8.0 diff --git a/grpc-google-cloud-document-ai-v1beta1/pom.xml b/grpc-google-cloud-document-ai-v1beta1/pom.xml index faceaab5..e69e397a 100644 --- a/grpc-google-cloud-document-ai-v1beta1/pom.xml +++ b/grpc-google-cloud-document-ai-v1beta1/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta1 - 0.7.1 + 0.8.0 grpc-google-cloud-document-ai-v1beta1 GRPC library for grpc-google-cloud-document-ai-v1beta1 com.google.cloud google-cloud-document-ai-parent - 0.7.1 + 0.8.0 diff --git a/grpc-google-cloud-document-ai-v1beta2/pom.xml b/grpc-google-cloud-document-ai-v1beta2/pom.xml index e00c4308..2132c360 100644 --- a/grpc-google-cloud-document-ai-v1beta2/pom.xml +++ b/grpc-google-cloud-document-ai-v1beta2/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta2 - 0.7.1 + 0.8.0 grpc-google-cloud-document-ai-v1beta2 GRPC library for grpc-google-cloud-document-ai-v1beta2 com.google.cloud google-cloud-document-ai-parent - 0.7.1 + 0.8.0 diff --git a/grpc-google-cloud-document-ai-v1beta3/pom.xml b/grpc-google-cloud-document-ai-v1beta3/pom.xml index 279fa3f3..7e8696db 100644 --- a/grpc-google-cloud-document-ai-v1beta3/pom.xml +++ b/grpc-google-cloud-document-ai-v1beta3/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta3 - 0.7.1 + 0.8.0 grpc-google-cloud-document-ai-v1beta3 GRPC library for grpc-google-cloud-document-ai-v1beta3 com.google.cloud google-cloud-document-ai-parent - 0.7.1 + 0.8.0 diff --git a/pom.xml b/pom.xml index e535dd3b..43a6e70a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-document-ai-parent pom - 0.7.1 + 0.8.0 Google Cloud Document AI Parent https://github.com/googleapis/java-document-ai @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 0.11.1 + 0.11.2 @@ -70,53 +70,53 @@ com.google.api.grpc grpc-google-cloud-document-ai-v1beta1 - 0.7.1 + 0.8.0 com.google.api.grpc proto-google-cloud-document-ai-v1 - 0.7.1 + 0.8.0 com.google.api.grpc grpc-google-cloud-document-ai-v1 - 0.7.1 + 0.8.0 com.google.cloud google-cloud-document-ai - 0.7.1 + 0.8.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta2 - 0.7.1 + 0.8.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta3 - 0.7.1 + 0.8.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta1 - 0.7.1 + 0.8.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta2 - 0.7.1 + 0.8.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta3 - 0.7.1 + 0.8.0 com.google.cloud google-cloud-shared-dependencies - 0.21.1 + 1.0.0 pom import diff --git a/proto-google-cloud-document-ai-v1/pom.xml b/proto-google-cloud-document-ai-v1/pom.xml index ded86da0..464299a6 100644 --- a/proto-google-cloud-document-ai-v1/pom.xml +++ b/proto-google-cloud-document-ai-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-document-ai-v1 - 0.7.1 + 0.8.0 proto-google-cloud-document-ai-v1 Proto library for google-cloud-document-ai com.google.cloud google-cloud-document-ai-parent - 0.7.1 + 0.8.0 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 b555a701..b7f0e4b4 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 @@ -42829,6 +42829,19 @@ public interface PageRefOrBuilder * */ com.google.cloud.documentai.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + * + * + *
+       * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+       * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidence. + */ + float getConfidence(); } /** * @@ -42916,6 +42929,11 @@ private PageRef( boundingPoly_ = subBuilder.buildPartial(); } + break; + } + case 45: + { + confidence_ = input.readFloat(); break; } default: @@ -43392,6 +43410,24 @@ public com.google.cloud.documentai.v1.BoundingPolyOrBuilder getBoundingPolyOrBui return getBoundingPoly(); } + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + * + * + *
+       * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+       * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -43421,6 +43457,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (boundingPoly_ != null) { output.writeMessage(4, getBoundingPoly()); } + if (confidence_ != 0F) { + output.writeFloat(5, confidence_); + } unknownFields.writeTo(output); } @@ -43445,6 +43484,9 @@ public int getSerializedSize() { if (boundingPoly_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBoundingPoly()); } + if (confidence_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, confidence_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -43468,6 +43510,8 @@ public boolean equals(final java.lang.Object obj) { if (hasBoundingPoly()) { if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -43489,6 +43533,8 @@ public int hashCode() { hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; hash = (53 * hash) + getBoundingPoly().hashCode(); } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -43649,6 +43695,8 @@ public Builder clear() { boundingPoly_ = null; boundingPolyBuilder_ = null; } + confidence_ = 0F; + return this; } @@ -43685,6 +43733,7 @@ public com.google.cloud.documentai.v1.Document.PageAnchor.PageRef buildPartial() } else { result.boundingPoly_ = boundingPolyBuilder_.build(); } + result.confidence_ = confidence_; onBuilt(); return result; } @@ -43751,6 +43800,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.Document.PageAnchor.Page if (other.hasBoundingPoly()) { mergeBoundingPoly(other.getBoundingPoly()); } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -44263,6 +44315,58 @@ public com.google.cloud.documentai.v1.BoundingPolyOrBuilder getBoundingPolyOrBui return boundingPolyBuilder_; } + private float confidence_; + /** + * + * + *
+         * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+         * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + * + * + *
+         * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+         * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+         * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { 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 85978fde..f906f4ff 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\"\2158\n\010Document\022\022\n\003uri\030\001 \001(\tB\003\340" + + "tions.proto\"\2468\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" @@ -320,45 +320,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "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\277\003\n\nPage" + + "_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\344\002\n\007PageRef\022\021\n\004page\030\001 \001(\003B\003\340A\002\022\\\n\013lay" + + "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\"\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\016VI" - + "SUAL_ELEMENT\020\005\022\t\n\005TABLE\020\006\022\016\n\nFORM_FIELD\020" - + "\007\032\365\002\n\nProvenance\022\020\n\010revision\030\001 \001(\005\022\n\n\002id" - + "\030\002 \001(\005\022G\n\007parents\030\003 \003(\01326.google.cloud.d" - + "ocumentai.v1.Document.Provenance.Parent\022" - + "K\n\004type\030\004 \001(\0162=.google.cloud.documentai." - + "v1.Document.Provenance.OperationType\032&\n\006" - + "Parent\022\020\n\010revision\030\001 \001(\005\022\n\n\002id\030\002 \001(\005\"\212\001\n" - + "\rOperationType\022\036\n\032OPERATION_TYPE_UNSPECI" - + "FIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\022\013\n\007REPLACE\020\003" - + "\022\022\n\016EVAL_REQUESTED\020\004\022\021\n\rEVAL_APPROVED\020\005\022" - + "\020\n\014EVAL_SKIPPED\020\006\032\215\002\n\010Revision\022\017\n\005agent\030" - + "\004 \001(\tH\000\022\023\n\tprocessor\030\005 \001(\tH\000\022\n\n\002id\030\001 \001(\t" - + "\022\016\n\006parent\030\002 \003(\005\022/\n\013create_time\030\003 \001(\0132\032." - + "google.protobuf.Timestamp\022O\n\014human_revie" - + "w\030\006 \001(\01329.google.cloud.documentai.v1.Doc" - + "ument.Revision.HumanReview\0323\n\013HumanRevie" - + "w\022\r\n\005state\030\001 \001(\t\022\025\n\rstate_message\030\002 \001(\tB" - + "\010\n\006source\032\255\001\n\nTextChange\022D\n\013text_anchor\030" - + "\001 \001(\0132/.google.cloud.documentai.v1.Docum" - + "ent.TextAnchor\022\024\n\014changed_text\030\002 \001(\t\022C\n\n" - + "provenance\030\003 \003(\0132/.google.cloud.document" - + "ai.v1.Document.ProvenanceB\010\n\006sourceB\321\001\n\036" - + "com.google.cloud.documentai.v1B\rDocument" - + "ProtoP\001ZDgoogle.golang.org/genproto/goog" - + "leapis/cloud/documentai/v1;documentai\252\002\032" - + "Google.Cloud.DocumentAI.V1\312\002\032Google\\Clou" - + "d\\DocumentAI\\V1\352\002\035Google::Cloud::Documen" - + "tAI::V1b\006proto3" + + "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" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -657,7 +657,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1_Document_PageAnchor_PageRef_descriptor, new java.lang.String[] { - "Page", "LayoutType", "LayoutId", "BoundingPoly", + "Page", "LayoutType", "LayoutId", "BoundingPoly", "Confidence", }); internal_static_google_cloud_documentai_v1_Document_Provenance_descriptor = internal_static_google_cloud_documentai_v1_Document_descriptor.getNestedTypes().get(7); 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 21412e98..eb4615c1 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 @@ -549,6 +549,9 @@ 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]. + float confidence = 5 [(google.api.field_behavior) = OPTIONAL]; } // One or more references to visual page elements diff --git a/proto-google-cloud-document-ai-v1beta1/pom.xml b/proto-google-cloud-document-ai-v1beta1/pom.xml index d6d88594..704aee4b 100644 --- a/proto-google-cloud-document-ai-v1beta1/pom.xml +++ b/proto-google-cloud-document-ai-v1beta1/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta1 - 0.7.1 + 0.8.0 proto-google-cloud-document-ai-v1beta1 PROTO library for proto-google-cloud-document-ai-v1beta1 com.google.cloud google-cloud-document-ai-parent - 0.7.1 + 0.8.0 diff --git a/proto-google-cloud-document-ai-v1beta2/pom.xml b/proto-google-cloud-document-ai-v1beta2/pom.xml index cd27f2c1..d5f0452e 100644 --- a/proto-google-cloud-document-ai-v1beta2/pom.xml +++ b/proto-google-cloud-document-ai-v1beta2/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta2 - 0.7.1 + 0.8.0 proto-google-cloud-document-ai-v1beta2 PROTO library for proto-google-cloud-document-ai-v1beta2 com.google.cloud google-cloud-document-ai-parent - 0.7.1 + 0.8.0 diff --git a/proto-google-cloud-document-ai-v1beta3/pom.xml b/proto-google-cloud-document-ai-v1beta3/pom.xml index c2a0d051..0a7b6658 100644 --- a/proto-google-cloud-document-ai-v1beta3/pom.xml +++ b/proto-google-cloud-document-ai-v1beta3/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta3 - 0.7.1 + 0.8.0 proto-google-cloud-document-ai-v1beta3 PROTO library for proto-google-cloud-document-ai-v1beta3 com.google.cloud google-cloud-document-ai-parent - 0.7.1 + 0.8.0 diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java index 7f325e7b..f89147db 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java +++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java @@ -43396,6 +43396,19 @@ public interface PageRefOrBuilder * */ com.google.cloud.documentai.v1beta3.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + * + * + *
+       * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+       * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidence. + */ + float getConfidence(); } /** * @@ -43484,6 +43497,11 @@ private PageRef( boundingPoly_ = subBuilder.buildPartial(); } + break; + } + case 45: + { + confidence_ = input.readFloat(); break; } default: @@ -43963,6 +43981,24 @@ public com.google.cloud.documentai.v1beta3.BoundingPolyOrBuilder getBoundingPoly return getBoundingPoly(); } + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + * + * + *
+       * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+       * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -43992,6 +44028,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (boundingPoly_ != null) { output.writeMessage(4, getBoundingPoly()); } + if (confidence_ != 0F) { + output.writeFloat(5, confidence_); + } unknownFields.writeTo(output); } @@ -44016,6 +44055,9 @@ public int getSerializedSize() { if (boundingPoly_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBoundingPoly()); } + if (confidence_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, confidence_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -44039,6 +44081,8 @@ public boolean equals(final java.lang.Object obj) { if (hasBoundingPoly()) { if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -44060,6 +44104,8 @@ public int hashCode() { hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; hash = (53 * hash) + getBoundingPoly().hashCode(); } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -44223,6 +44269,8 @@ public Builder clear() { boundingPoly_ = null; boundingPolyBuilder_ = null; } + confidence_ = 0F; + return this; } @@ -44260,6 +44308,7 @@ public com.google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef buildPart } else { result.boundingPoly_ = boundingPolyBuilder_.build(); } + result.confidence_ = confidence_; onBuilt(); return result; } @@ -44328,6 +44377,9 @@ public Builder mergeFrom( if (other.hasBoundingPoly()) { mergeBoundingPoly(other.getBoundingPoly()); } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -44842,6 +44894,58 @@ public com.google.cloud.documentai.v1beta3.BoundingPoly.Builder getBoundingPolyB return boundingPolyBuilder_; } + private float confidence_; + /** + * + * + *
+         * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+         * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + * + * + *
+         * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+         * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Confidence of detected page element, if applicable. Range [0, 1].
+         * 
+ * + * float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java index 44c81f92..89b788e7 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java +++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java @@ -173,7 +173,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "proto\032\026google/type/date.proto\032\032google/ty" + "pe/datetime.proto\032\027google/type/money.pro" + "to\032 google/type/postal_address.proto\032\034go" - + "ogle/api/annotations.proto\"\322:\n\010Document\022" + + "ogle/api/annotations.proto\"\353:\n\010Document\022" + "\022\n\003uri\030\001 \001(\tB\003\340A\001H\000\022\026\n\007content\030\002 \001(\014B\003\340A" + "\001H\000\022\021\n\tmime_type\030\003 \001(\t\022\021\n\004text\030\004 \001(\tB\003\340A" + "\001\022D\n\013text_styles\030\005 \003(\0132/.google.cloud.do" @@ -328,46 +328,47 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "le.cloud.documentai.v1beta3.Document.Tex" + "tAnchor.TextSegment\022\017\n\007content\030\002 \001(\t\0325\n\013" + "TextSegment\022\023\n\013start_index\030\001 \001(\003\022\021\n\tend_" - + "index\030\002 \001(\003\032\316\003\n\nPageAnchor\022O\n\tpage_refs\030" + + "index\030\002 \001(\003\032\347\003\n\nPageAnchor\022O\n\tpage_refs\030" + "\001 \003(\0132<.google.cloud.documentai.v1beta3." - + "Document.PageAnchor.PageRef\032\356\002\n\007PageRef\022" + + "Document.PageAnchor.PageRef\032\207\003\n\007PageRef\022" + "\021\n\004page\030\001 \001(\003B\003\340A\002\022a\n\013layout_type\030\002 \001(\0162" + "G.google.cloud.documentai.v1beta3.Docume" + "nt.PageAnchor.PageRef.LayoutTypeB\003\340A\001\022\030\n" + "\tlayout_id\030\003 \001(\tB\005\030\001\340A\001\022I\n\rbounding_poly" + "\030\004 \001(\0132-.google.cloud.documentai.v1beta3" - + ".BoundingPolyB\003\340A\001\"\207\001\n\nLayoutType\022\033\n\027LAY" - + "OUT_TYPE_UNSPECIFIED\020\000\022\t\n\005BLOCK\020\001\022\r\n\tPAR" - + "AGRAPH\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\377\002\n" - + "\nProvenance\022\020\n\010revision\030\001 \001(\005\022\n\n\002id\030\002 \001(" - + "\005\022L\n\007parents\030\003 \003(\0132;.google.cloud.docume" - + "ntai.v1beta3.Document.Provenance.Parent\022" - + "P\n\004type\030\004 \001(\0162B.google.cloud.documentai." - + "v1beta3.Document.Provenance.OperationTyp" - + "e\032&\n\006Parent\022\020\n\010revision\030\001 \001(\005\022\n\n\002id\030\002 \001(" - + "\005\"\212\001\n\rOperationType\022\036\n\032OPERATION_TYPE_UN" - + "SPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\022\013\n\007REPL" - + "ACE\020\003\022\022\n\016EVAL_REQUESTED\020\004\022\021\n\rEVAL_APPROV" - + "ED\020\005\022\020\n\014EVAL_SKIPPED\020\006\032\222\002\n\010Revision\022\017\n\005a" - + "gent\030\004 \001(\tH\000\022\023\n\tprocessor\030\005 \001(\tH\000\022\n\n\002id\030" - + "\001 \001(\t\022\016\n\006parent\030\002 \003(\005\022/\n\013create_time\030\003 \001" - + "(\0132\032.google.protobuf.Timestamp\022T\n\014human_" - + "review\030\006 \001(\0132>.google.cloud.documentai.v" - + "1beta3.Document.Revision.HumanReview\0323\n\013" - + "HumanReview\022\r\n\005state\030\001 \001(\t\022\025\n\rstate_mess" - + "age\030\002 \001(\tB\010\n\006source\032\267\001\n\nTextChange\022I\n\013te" - + "xt_anchor\030\001 \001(\01324.google.cloud.documenta" - + "i.v1beta3.Document.TextAnchor\022\024\n\014changed" - + "_text\030\002 \001(\t\022H\n\nprovenance\030\003 \003(\01324.google" - + ".cloud.documentai.v1beta3.Document.Prove" - + "nanceB\010\n\006sourceB\352\001\n#com.google.cloud.doc" - + "umentai.v1beta3B\rDocumentProtoP\001ZIgoogle" - + ".golang.org/genproto/googleapis/cloud/do" - + "cumentai/v1beta3;documentai\252\002\037Google.Clo" - + "ud.DocumentAI.V1Beta3\312\002\037Google\\Cloud\\Doc" - + "umentAI\\V1beta3\352\002\"Google::Cloud::Documen" - + "tAI::V1beta3b\006proto3" + + ".BoundingPolyB\003\340A\001\022\027\n\nconfidence\030\005 \001(\002B\003" + + "\340A\001\"\207\001\n\nLayoutType\022\033\n\027LAYOUT_TYPE_UNSPEC" + + "IFIED\020\000\022\t\n\005BLOCK\020\001\022\r\n\tPARAGRAPH\020\002\022\010\n\004LIN" + + "E\020\003\022\t\n\005TOKEN\020\004\022\022\n\016VISUAL_ELEMENT\020\005\022\t\n\005TA" + + "BLE\020\006\022\016\n\nFORM_FIELD\020\007\032\377\002\n\nProvenance\022\020\n\010" + + "revision\030\001 \001(\005\022\n\n\002id\030\002 \001(\005\022L\n\007parents\030\003 " + + "\003(\0132;.google.cloud.documentai.v1beta3.Do" + + "cument.Provenance.Parent\022P\n\004type\030\004 \001(\0162B" + + ".google.cloud.documentai.v1beta3.Documen" + + "t.Provenance.OperationType\032&\n\006Parent\022\020\n\010" + + "revision\030\001 \001(\005\022\n\n\002id\030\002 \001(\005\"\212\001\n\rOperation" + + "Type\022\036\n\032OPERATION_TYPE_UNSPECIFIED\020\000\022\007\n\003" + + "ADD\020\001\022\n\n\006REMOVE\020\002\022\013\n\007REPLACE\020\003\022\022\n\016EVAL_R" + + "EQUESTED\020\004\022\021\n\rEVAL_APPROVED\020\005\022\020\n\014EVAL_SK" + + "IPPED\020\006\032\222\002\n\010Revision\022\017\n\005agent\030\004 \001(\tH\000\022\023\n" + + "\tprocessor\030\005 \001(\tH\000\022\n\n\002id\030\001 \001(\t\022\016\n\006parent" + + "\030\002 \003(\005\022/\n\013create_time\030\003 \001(\0132\032.google.pro" + + "tobuf.Timestamp\022T\n\014human_review\030\006 \001(\0132>." + + "google.cloud.documentai.v1beta3.Document" + + ".Revision.HumanReview\0323\n\013HumanReview\022\r\n\005" + + "state\030\001 \001(\t\022\025\n\rstate_message\030\002 \001(\tB\010\n\006so" + + "urce\032\267\001\n\nTextChange\022I\n\013text_anchor\030\001 \001(\013" + + "24.google.cloud.documentai.v1beta3.Docum" + + "ent.TextAnchor\022\024\n\014changed_text\030\002 \001(\t\022H\n\n" + + "provenance\030\003 \003(\01324.google.cloud.document" + + "ai.v1beta3.Document.ProvenanceB\010\n\006source" + + "B\352\001\n#com.google.cloud.documentai.v1beta3" + + "B\rDocumentProtoP\001ZIgoogle.golang.org/gen" + + "proto/googleapis/cloud/documentai/v1beta" + + "3;documentai\252\002\037Google.Cloud.DocumentAI.V" + + "1Beta3\312\002\037Google\\Cloud\\DocumentAI\\V1beta3" + + "\352\002\"Google::Cloud::DocumentAI::V1beta3b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -686,7 +687,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_Document_PageAnchor_PageRef_descriptor, new java.lang.String[] { - "Page", "LayoutType", "LayoutId", "BoundingPoly", + "Page", "LayoutType", "LayoutId", "BoundingPoly", "Confidence", }); internal_static_google_cloud_documentai_v1beta3_Document_Provenance_descriptor = internal_static_google_cloud_documentai_v1beta3_Document_descriptor.getNestedTypes().get(7); diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto b/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto index e9345f01..d461041f 100644 --- a/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto +++ b/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto @@ -549,6 +549,9 @@ 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]. + float confidence = 5 [(google.api.field_behavior) = OPTIONAL]; } // One or more references to visual page elements diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 3f4a16ed..95f24180 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,13 +29,13 @@ com.google.cloud google-cloud-document-ai - 0.6.0 + 0.7.1 com.google.cloud google-cloud-storage - 1.113.15 + 1.113.16 junit diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index f423fbb8..2f4b3cd5 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,13 +28,13 @@ com.google.cloud google-cloud-document-ai - 0.6.0 + 0.7.1 com.google.cloud google-cloud-storage - 1.113.15 + 1.113.16 junit diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 52108ec8..554f369f 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -41,7 +41,7 @@ com.google.cloud google-cloud-document-ai - 0.6.0 + 0.7.1 diff --git a/samples/snippets/src/main/java/documentai/v1beta3/BatchProcessDocumentBeta.java b/samples/snippets/src/main/java/documentai/v1/BatchProcessDocument.java similarity index 82% rename from samples/snippets/src/main/java/documentai/v1beta3/BatchProcessDocumentBeta.java rename to samples/snippets/src/main/java/documentai/v1/BatchProcessDocument.java index 360a38f2..0a853a0c 100644 --- a/samples/snippets/src/main/java/documentai/v1beta3/BatchProcessDocumentBeta.java +++ b/samples/snippets/src/main/java/documentai/v1/BatchProcessDocument.java @@ -14,17 +14,22 @@ * limitations under the License. */ -package documentai.v1beta3; +package documentai.v1; // [START documentai_batch_process_document] import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.paging.Page; -import com.google.cloud.documentai.v1beta3.BatchProcessMetadata; -import com.google.cloud.documentai.v1beta3.BatchProcessRequest; -import com.google.cloud.documentai.v1beta3.BatchProcessResponse; -import com.google.cloud.documentai.v1beta3.Document; -import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1.BatchDocumentsInputConfig; +import com.google.cloud.documentai.v1.BatchProcessMetadata; +import com.google.cloud.documentai.v1.BatchProcessRequest; +import com.google.cloud.documentai.v1.BatchProcessResponse; +import com.google.cloud.documentai.v1.Document; +import com.google.cloud.documentai.v1.DocumentOutputConfig; +import com.google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig; +import com.google.cloud.documentai.v1.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1.GcsDocument; +import com.google.cloud.documentai.v1.GcsDocuments; import com.google.cloud.storage.Blob; import com.google.cloud.storage.BlobId; import com.google.cloud.storage.Bucket; @@ -39,7 +44,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -public class BatchProcessDocumentBeta { +public class BatchProcessDocument { public static void batchProcessDocument() throws IOException, InterruptedException, TimeoutException, ExecutionException { // TODO(developer): Replace these variables before running the sample. @@ -71,22 +76,26 @@ public static void batchProcessDocument( String name = String.format("projects/%s/locations/%s/processors/%s", projectId, location, processorId); - BatchProcessRequest.BatchInputConfig batchInputConfig = - BatchProcessRequest.BatchInputConfig.newBuilder() - .setGcsSource(gcsInputUri) - .setMimeType("application/pdf") - .build(); + GcsDocument gcsDocument = + GcsDocument.newBuilder().setGcsUri(gcsInputUri).setMimeType("application/pdf").build(); + + GcsDocuments gcsDocuments = GcsDocuments.newBuilder().addDocuments(gcsDocument).build(); + + BatchDocumentsInputConfig inputConfig = + BatchDocumentsInputConfig.newBuilder().setGcsDocuments(gcsDocuments).build(); String fullGcsPath = String.format("gs://%s/%s/", gcsOutputBucketName, gcsOutputUriPrefix); - BatchProcessRequest.BatchOutputConfig outputConfig = - BatchProcessRequest.BatchOutputConfig.newBuilder().setGcsDestination(fullGcsPath).build(); + GcsOutputConfig gcsOutputConfig = GcsOutputConfig.newBuilder().setGcsUri(fullGcsPath).build(); + + DocumentOutputConfig documentOutputConfig = + DocumentOutputConfig.newBuilder().setGcsOutputConfig(gcsOutputConfig).build(); // Configure the batch process request. BatchProcessRequest request = BatchProcessRequest.newBuilder() .setName(name) - .addInputConfigs(batchInputConfig) - .setOutputConfig(outputConfig) + .setInputDocuments(inputConfig) + .setDocumentOutputConfig(documentOutputConfig) .build(); OperationFuture future = diff --git a/samples/snippets/src/main/java/documentai/v1beta3/ProcessDocumentBeta.java b/samples/snippets/src/main/java/documentai/v1/ProcessDocument.java similarity index 89% rename from samples/snippets/src/main/java/documentai/v1beta3/ProcessDocumentBeta.java rename to samples/snippets/src/main/java/documentai/v1/ProcessDocument.java index 63b79069..75a5c639 100644 --- a/samples/snippets/src/main/java/documentai/v1beta3/ProcessDocumentBeta.java +++ b/samples/snippets/src/main/java/documentai/v1/ProcessDocument.java @@ -14,14 +14,15 @@ * limitations under the License. */ -package documentai.v1beta3; +package documentai.v1; // [START documentai_process_document] -import com.google.cloud.documentai.v1beta3.Document; -import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; -import com.google.cloud.documentai.v1beta3.ProcessRequest; -import com.google.cloud.documentai.v1beta3.ProcessResponse; +import com.google.cloud.documentai.v1.Document; +import com.google.cloud.documentai.v1.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1.ProcessRequest; +import com.google.cloud.documentai.v1.ProcessResponse; +import com.google.cloud.documentai.v1.RawDocument; import com.google.protobuf.ByteString; import java.io.IOException; import java.nio.file.Files; @@ -30,7 +31,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; -public class ProcessDocumentBeta { +public class ProcessDocument { public static void processDocument() throws IOException, InterruptedException, ExecutionException, TimeoutException { // TODO(developer): Replace these variables before running the sample. @@ -60,12 +61,12 @@ public static void processDocument( // Convert the image data to a Buffer and base64 encode it. ByteString content = ByteString.copyFrom(imageFileData); - Document document = - Document.newBuilder().setContent(content).setMimeType("application/pdf").build(); + RawDocument document = + RawDocument.newBuilder().setContent(content).setMimeType("application/pdf").build(); // Configure the process request. ProcessRequest request = - ProcessRequest.newBuilder().setName(name).setDocument(document).build(); + ProcessRequest.newBuilder().setName(name).setRawDocument(document).build(); // Recognizes text entities in the PDF document ProcessResponse result = client.processDocument(request); diff --git a/samples/snippets/src/main/java/documentai/v1beta3/QuickStart.java b/samples/snippets/src/main/java/documentai/v1/QuickStart.java similarity index 87% rename from samples/snippets/src/main/java/documentai/v1beta3/QuickStart.java rename to samples/snippets/src/main/java/documentai/v1/QuickStart.java index f43d3aa9..54f93470 100644 --- a/samples/snippets/src/main/java/documentai/v1beta3/QuickStart.java +++ b/samples/snippets/src/main/java/documentai/v1/QuickStart.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package documentai.v1beta3; +package documentai.v1; // [START documentai_quickstart] - -import com.google.cloud.documentai.v1beta3.Document; -import com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClient; -import com.google.cloud.documentai.v1beta3.ProcessRequest; -import com.google.cloud.documentai.v1beta3.ProcessResponse; +import com.google.cloud.documentai.v1.Document; +import com.google.cloud.documentai.v1.DocumentProcessorServiceClient; +import com.google.cloud.documentai.v1.ProcessRequest; +import com.google.cloud.documentai.v1.ProcessResponse; +import com.google.cloud.documentai.v1.RawDocument; import com.google.protobuf.ByteString; import java.io.IOException; import java.nio.file.Files; @@ -31,7 +31,7 @@ import java.util.concurrent.TimeoutException; public class QuickStart { - public static void quickStart() + public static void main(String[] args) throws IOException, InterruptedException, ExecutionException, TimeoutException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; @@ -60,12 +60,12 @@ public static void quickStart( // Convert the image data to a Buffer and base64 encode it. ByteString content = ByteString.copyFrom(imageFileData); - Document document = - Document.newBuilder().setContent(content).setMimeType("application/pdf").build(); + RawDocument document = + RawDocument.newBuilder().setContent(content).setMimeType("application/pdf").build(); // Configure the process request. ProcessRequest request = - ProcessRequest.newBuilder().setName(name).setDocument(document).build(); + ProcessRequest.newBuilder().setName(name).setRawDocument(document).build(); // Recognizes text entities in the PDF document ProcessResponse result = client.processDocument(request); diff --git a/samples/snippets/src/test/java/documentai/v1beta3/BatchProcessDocumentBetaTest.java b/samples/snippets/src/test/java/documentai/v1/BatchProcessDocumentTest.java similarity index 96% rename from samples/snippets/src/test/java/documentai/v1beta3/BatchProcessDocumentBetaTest.java rename to samples/snippets/src/test/java/documentai/v1/BatchProcessDocumentTest.java index c61a859e..1024ae71 100644 --- a/samples/snippets/src/test/java/documentai/v1beta3/BatchProcessDocumentBetaTest.java +++ b/samples/snippets/src/test/java/documentai/v1/BatchProcessDocumentTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package documentai.v1beta3; +package documentai.v1; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertNotNull; @@ -34,7 +34,7 @@ import org.junit.Before; import org.junit.Test; -public class BatchProcessDocumentBetaTest { +public class BatchProcessDocumentTest { private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); private static final String PROCESSOR_ID = "88541adc6eeec481"; private static final String BUCKET_NAME = @@ -99,7 +99,7 @@ public void setUp() { public void testBatchProcessDocument() throws InterruptedException, ExecutionException, TimeoutException, IOException { // parse the GCS invoice as a form. - BatchProcessDocumentBeta.batchProcessDocument( + BatchProcessDocument.batchProcessDocument( PROJECT_ID, "us", PROCESSOR_ID, INPUT_URI, OUTPUT_BUCKET_NAME, OUTPUT_PREFIX); String got = bout.toString(); diff --git a/samples/snippets/src/test/java/documentai/v1beta3/ProcessDocumentTest.java b/samples/snippets/src/test/java/documentai/v1/ProcessDocumentTest.java similarity index 95% rename from samples/snippets/src/test/java/documentai/v1beta3/ProcessDocumentTest.java rename to samples/snippets/src/test/java/documentai/v1/ProcessDocumentTest.java index c7f65b68..6a4a35aa 100644 --- a/samples/snippets/src/test/java/documentai/v1beta3/ProcessDocumentTest.java +++ b/samples/snippets/src/test/java/documentai/v1/ProcessDocumentTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package documentai.v1beta3; +package documentai.v1; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertNotNull; @@ -61,7 +61,7 @@ public void setUp() { public void testProcessDocument() throws InterruptedException, ExecutionException, IOException, TimeoutException { // parse the GCS invoice as a form. - ProcessDocumentBeta.processDocument(PROJECT_ID, "us", PROCESSOR_ID, FILE_PATH); + ProcessDocument.processDocument(PROJECT_ID, "us", PROCESSOR_ID, FILE_PATH); String got = bout.toString(); assertThat(got).contains("Paragraph text:"); diff --git a/samples/snippets/src/test/java/documentai/v1beta3/QuickStartTest.java b/samples/snippets/src/test/java/documentai/v1/QuickStartTest.java similarity index 98% rename from samples/snippets/src/test/java/documentai/v1beta3/QuickStartTest.java rename to samples/snippets/src/test/java/documentai/v1/QuickStartTest.java index 4451ef32..afaa4b1c 100644 --- a/samples/snippets/src/test/java/documentai/v1beta3/QuickStartTest.java +++ b/samples/snippets/src/test/java/documentai/v1/QuickStartTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package documentai.v1beta3; +package documentai.v1; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertNotNull; diff --git a/synth.metadata b/synth.metadata index 5872acfb..fd42a197 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,39 +4,39 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-document-ai.git", - "sha": "5b3822be1da9ddcf264f6ee83d79132b20909936" + "sha": "952106ebcfa227d552beeb84e3fe816223e899a0" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3b236df084cf9222c529a2890f90e3a4ff0f2dfd", - "internalRef": "368426665" + "sha": "7713e2e860003a84b35b701de29dd0769795e1e3", + "internalRef": "370513265" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3b236df084cf9222c529a2890f90e3a4ff0f2dfd", - "internalRef": "368426665" + "sha": "7713e2e860003a84b35b701de29dd0769795e1e3", + "internalRef": "370513265" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3b236df084cf9222c529a2890f90e3a4ff0f2dfd", - "internalRef": "368426665" + "sha": "7713e2e860003a84b35b701de29dd0769795e1e3", + "internalRef": "370513265" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3b236df084cf9222c529a2890f90e3a4ff0f2dfd", - "internalRef": "368426665" + "sha": "7713e2e860003a84b35b701de29dd0769795e1e3", + "internalRef": "370513265" } }, { diff --git a/versions.txt b/versions.txt index 81265361..1fcd811f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,12 +1,12 @@ # Format: # module:released-version:current-version -google-cloud-document-ai:0.7.1:0.7.1 -grpc-google-cloud-document-ai-v1beta1:0.7.1:0.7.1 -grpc-google-cloud-document-ai-v1beta2:0.7.1:0.7.1 -grpc-google-cloud-document-ai-v1beta3:0.7.1:0.7.1 -grpc-google-cloud-document-ai-v1:0.7.1:0.7.1 -proto-google-cloud-document-ai-v1beta1:0.7.1:0.7.1 -proto-google-cloud-document-ai-v1beta2:0.7.1:0.7.1 -proto-google-cloud-document-ai-v1beta3:0.7.1:0.7.1 -proto-google-cloud-document-ai-v1:0.7.1:0.7.1 +google-cloud-document-ai:0.8.0:0.8.0 +grpc-google-cloud-document-ai-v1beta1:0.8.0:0.8.0 +grpc-google-cloud-document-ai-v1beta2:0.8.0:0.8.0 +grpc-google-cloud-document-ai-v1beta3:0.8.0:0.8.0 +grpc-google-cloud-document-ai-v1:0.8.0:0.8.0 +proto-google-cloud-document-ai-v1beta1:0.8.0:0.8.0 +proto-google-cloud-document-ai-v1beta2:0.8.0:0.8.0 +proto-google-cloud-document-ai-v1beta3:0.8.0:0.8.0 +proto-google-cloud-document-ai-v1:0.8.0:0.8.0