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/synth.metadata b/synth.metadata
index cfbd9ed4..803a7c6b 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,39 +4,39 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-document-ai.git",
- "sha": "dab957da5958688cafca5deef8e8949d8ddf11f1"
+ "sha": "03c7a9b10e8c1db2219ada1fbedaa8cc5f5595e2"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "3b236df084cf9222c529a2890f90e3a4ff0f2dfd",
- "internalRef": "368426665"
+ "sha": "f07131004bbcab3737d1241b34341d1b76ae7712",
+ "internalRef": "370028868"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "3b236df084cf9222c529a2890f90e3a4ff0f2dfd",
- "internalRef": "368426665"
+ "sha": "f07131004bbcab3737d1241b34341d1b76ae7712",
+ "internalRef": "370028868"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "3b236df084cf9222c529a2890f90e3a4ff0f2dfd",
- "internalRef": "368426665"
+ "sha": "f07131004bbcab3737d1241b34341d1b76ae7712",
+ "internalRef": "370028868"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "3b236df084cf9222c529a2890f90e3a4ff0f2dfd",
- "internalRef": "368426665"
+ "sha": "f07131004bbcab3737d1241b34341d1b76ae7712",
+ "internalRef": "370028868"
}
},
{