diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Document.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Document.java
index 8b44d559..03f3edc3 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Document.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/Document.java
@@ -35347,6 +35347,33 @@ public interface TextAnchorOrBuilder
*/
com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegmentOrBuilder
getTextSegmentsOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * Contains the content of the text span so that users do
+ * not have to look it up in the text_segments.
+ *
+ *
+ * string content = 2;
+ *
+ * @return The content.
+ */
+ java.lang.String getContent();
+ /**
+ *
+ *
+ *
+ * Contains the content of the text span so that users do
+ * not have to look it up in the text_segments.
+ *
+ *
+ * string content = 2;
+ *
+ * @return The bytes for content.
+ */
+ com.google.protobuf.ByteString getContentBytes();
}
/**
*
@@ -35369,6 +35396,7 @@ private TextAnchor(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
private TextAnchor() {
textSegments_ = java.util.Collections.emptyList();
+ content_ = "";
}
@java.lang.Override
@@ -35416,6 +35444,13 @@ private TextAnchor(
extensionRegistry));
break;
}
+ case 18:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ content_ = s;
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -36217,6 +36252,57 @@ public com.google.cloud.documentai.v1beta2.Document.TextAnchor.TextSegment getTe
return textSegments_.get(index);
}
+ public static final int CONTENT_FIELD_NUMBER = 2;
+ private volatile java.lang.Object content_;
+ /**
+ *
+ *
+ *
+ * Contains the content of the text span so that users do
+ * not have to look it up in the text_segments.
+ *
+ *
+ * string content = 2;
+ *
+ * @return The content.
+ */
+ @java.lang.Override
+ public java.lang.String getContent() {
+ java.lang.Object ref = content_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ content_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Contains the content of the text span so that users do
+ * not have to look it up in the text_segments.
+ *
+ *
+ * string content = 2;
+ *
+ * @return The bytes for content.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getContentBytes() {
+ java.lang.Object ref = content_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ content_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -36234,6 +36320,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
for (int i = 0; i < textSegments_.size(); i++) {
output.writeMessage(1, textSegments_.get(i));
}
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_);
+ }
unknownFields.writeTo(output);
}
@@ -36246,6 +36335,9 @@ public int getSerializedSize() {
for (int i = 0; i < textSegments_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, textSegments_.get(i));
}
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -36263,6 +36355,7 @@ public boolean equals(final java.lang.Object obj) {
(com.google.cloud.documentai.v1beta2.Document.TextAnchor) obj;
if (!getTextSegmentsList().equals(other.getTextSegmentsList())) return false;
+ if (!getContent().equals(other.getContent())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -36278,6 +36371,8 @@ public int hashCode() {
hash = (37 * hash) + TEXT_SEGMENTS_FIELD_NUMBER;
hash = (53 * hash) + getTextSegmentsList().hashCode();
}
+ hash = (37 * hash) + CONTENT_FIELD_NUMBER;
+ hash = (53 * hash) + getContent().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -36434,6 +36529,8 @@ public Builder clear() {
} else {
textSegmentsBuilder_.clear();
}
+ content_ = "";
+
return this;
}
@@ -36471,6 +36568,7 @@ public com.google.cloud.documentai.v1beta2.Document.TextAnchor buildPartial() {
} else {
result.textSegments_ = textSegmentsBuilder_.build();
}
+ result.content_ = content_;
onBuilt();
return result;
}
@@ -36550,6 +36648,10 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta2.Document.TextAnchor
}
}
}
+ if (!other.getContent().isEmpty()) {
+ content_ = other.content_;
+ onChanged();
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -36998,6 +37100,117 @@ public Builder removeTextSegments(int index) {
return textSegmentsBuilder_;
}
+ private java.lang.Object content_ = "";
+ /**
+ *
+ *
+ *
+ * Contains the content of the text span so that users do
+ * not have to look it up in the text_segments.
+ *
+ *
+ * string content = 2;
+ *
+ * @return The content.
+ */
+ public java.lang.String getContent() {
+ java.lang.Object ref = content_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ content_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Contains the content of the text span so that users do
+ * not have to look it up in the text_segments.
+ *
+ *
+ * string content = 2;
+ *
+ * @return The bytes for content.
+ */
+ public com.google.protobuf.ByteString getContentBytes() {
+ java.lang.Object ref = content_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ content_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Contains the content of the text span so that users do
+ * not have to look it up in the text_segments.
+ *
+ *
+ * string content = 2;
+ *
+ * @param value The content to set.
+ * @return This builder for chaining.
+ */
+ public Builder setContent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ content_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Contains the content of the text span so that users do
+ * not have to look it up in the text_segments.
+ *
+ *
+ * string content = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearContent() {
+
+ content_ = getDefaultInstance().getContent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Contains the content of the text span so that users do
+ * not have to look it up in the text_segments.
+ *
+ *
+ * string content = 2;
+ *
+ * @param value The bytes for content to set.
+ * @return This builder for chaining.
+ */
+ public Builder setContentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ content_ = value;
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentProto.java b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentProto.java
index 70ff1eac..572e94a5 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentProto.java
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/java/com/google/cloud/documentai/v1beta2/DocumentProto.java
@@ -142,7 +142,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "le/cloud/documentai/v1beta2/geometry.pro"
+ "to\032\027google/rpc/status.proto\032\027google/type"
+ "/color.proto\032\034google/api/annotations.pro"
- + "to\"\302+\n\010Document\022\r\n\003uri\030\001 \001(\tH\000\022\021\n\007conten"
+ + "to\"\323+\n\010Document\022\r\n\003uri\030\001 \001(\tH\000\022\021\n\007conten"
+ "t\030\002 \001(\014H\000\022\021\n\tmime_type\030\003 \001(\t\022\014\n\004text\030\004 \001"
+ "(\t\022D\n\013text_styles\030\005 \003(\0132/.google.cloud.d"
+ "ocumentai.v1beta2.Document.Style\022=\n\005page"
@@ -267,27 +267,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "ntend\030\010 \001(\0132-.google.cloud.documentai.v1"
+ "beta2.BoundingPolyB\003\340A\001\032I\n\016EntityRelatio"
+ "n\022\022\n\nsubject_id\030\001 \001(\t\022\021\n\tobject_id\030\002 \001(\t"
- + "\022\020\n\010relation\030\003 \001(\t\032\234\001\n\nTextAnchor\022W\n\rtex"
+ + "\022\020\n\010relation\030\003 \001(\t\032\255\001\n\nTextAnchor\022W\n\rtex"
+ "t_segments\030\001 \003(\0132@.google.cloud.document"
+ "ai.v1beta2.Document.TextAnchor.TextSegme"
- + "nt\0325\n\013TextSegment\022\023\n\013start_index\030\001 \001(\003\022\021"
- + "\n\tend_index\030\002 \001(\003\032\201\003\n\nPageAnchor\022O\n\tpage"
- + "_refs\030\001 \003(\0132<.google.cloud.documentai.v1"
- + "beta2.Document.PageAnchor.PageRef\032\241\002\n\007Pa"
- + "geRef\022\021\n\004page\030\001 \001(\003B\003\340A\002\022a\n\013layout_type\030"
- + "\002 \001(\0162G.google.cloud.documentai.v1beta2."
- + "Document.PageAnchor.PageRef.LayoutTypeB\003"
- + "\340A\001\022\026\n\tlayout_id\030\003 \001(\tB\003\340A\001\"\207\001\n\nLayoutTy"
- + "pe\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_FI"
- + "ELD\020\007B\010\n\006sourceB\352\001\n#com.google.cloud.doc"
- + "umentai.v1beta2B\rDocumentProtoP\001ZIgoogle"
- + ".golang.org/genproto/googleapis/cloud/do"
- + "cumentai/v1beta2;documentai\252\002\037Google.Clo"
- + "ud.DocumentAI.V1Beta2\312\002\037Google\\Cloud\\Doc"
- + "umentAI\\V1beta2\352\002\"Google::Cloud::Documen"
- + "tAI::V1beta2b\006proto3"
+ + "nt\022\017\n\007content\030\002 \001(\t\0325\n\013TextSegment\022\023\n\013st"
+ + "art_index\030\001 \001(\003\022\021\n\tend_index\030\002 \001(\003\032\201\003\n\nP"
+ + "ageAnchor\022O\n\tpage_refs\030\001 \003(\0132<.google.cl"
+ + "oud.documentai.v1beta2.Document.PageAnch"
+ + "or.PageRef\032\241\002\n\007PageRef\022\021\n\004page\030\001 \001(\003B\003\340A"
+ + "\002\022a\n\013layout_type\030\002 \001(\0162G.google.cloud.do"
+ + "cumentai.v1beta2.Document.PageAnchor.Pag"
+ + "eRef.LayoutTypeB\003\340A\001\022\026\n\tlayout_id\030\003 \001(\tB"
+ + "\003\340A\001\"\207\001\n\nLayoutType\022\033\n\027LAYOUT_TYPE_UNSPE"
+ + "CIFIED\020\000\022\t\n\005BLOCK\020\001\022\r\n\tPARAGRAPH\020\002\022\010\n\004LI"
+ + "NE\020\003\022\t\n\005TOKEN\020\004\022\022\n\016VISUAL_ELEMENT\020\005\022\t\n\005T"
+ + "ABLE\020\006\022\016\n\nFORM_FIELD\020\007B\010\n\006sourceB\352\001\n#com"
+ + ".google.cloud.documentai.v1beta2B\rDocume"
+ + "ntProtoP\001ZIgoogle.golang.org/genproto/go"
+ + "ogleapis/cloud/documentai/v1beta2;docume"
+ + "ntai\252\002\037Google.Cloud.DocumentAI.V1Beta2\312\002"
+ + "\037Google\\Cloud\\DocumentAI\\V1beta2\352\002\"Googl"
+ + "e::Cloud::DocumentAI::V1beta2b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -541,7 +541,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_descriptor,
new java.lang.String[] {
- "TextSegments",
+ "TextSegments", "Content",
});
internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_TextSegment_descriptor =
internal_static_google_cloud_documentai_v1beta2_Document_TextAnchor_descriptor
diff --git a/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document.proto b/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document.proto
index bb3b58ba..b8af15b5 100644
--- a/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document.proto
+++ b/proto-google-cloud-document-ai-v1beta2/src/main/proto/google/cloud/documentai/v1beta2/document.proto
@@ -421,6 +421,10 @@ message Document {
// The text segments from the [Document.text][google.cloud.documentai.v1beta2.Document.text].
repeated TextSegment text_segments = 1;
+
+ // Contains the content of the text span so that users do
+ // not have to look it up in the text_segments.
+ string content = 2;
}
// Referencing elements in [Document.pages][google.cloud.documentai.v1beta2.Document.pages].
diff --git a/proto-google-cloud-document-ai-v1beta3/pom.xml b/proto-google-cloud-document-ai-v1beta3/pom.xml
index f25eabac..7d5bb827 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.15.1
+ 0.16.0
proto-google-cloud-document-ai-v1beta3
PROTO library for proto-google-cloud-document-ai-v1beta3
com.google.cloud
google-cloud-document-ai-parent
- 2.3.1
+ 2.4.0
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index e3414cb0..ed8c57ff 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
- 2.3.0
+ 2.3.1
com.google.cloud
google-cloud-storage
- 2.4.5
+ 2.5.1
junit
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index c14d7f6f..0d1b24a8 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -28,13 +28,13 @@
com.google.cloud
google-cloud-document-ai
- 2.3.0
+ 2.3.1
com.google.cloud
google-cloud-storage
- 2.4.5
+ 2.5.1
junit
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index d3963fba..4e40528d 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -30,7 +30,7 @@
com.google.cloud
libraries-bom
- 24.4.0
+ 25.0.0
pom
import
@@ -41,7 +41,7 @@
com.google.cloud
google-cloud-document-ai
- 2.3.0
+ 2.3.1
diff --git a/versions.txt b/versions.txt
index 34631e96..6a920a87 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,12 +1,12 @@
# Format:
# module:released-version:current-version
-google-cloud-document-ai:2.3.1:2.3.1
-grpc-google-cloud-document-ai-v1beta1:0.15.1:0.15.1
-grpc-google-cloud-document-ai-v1beta2:0.15.1:0.15.1
-grpc-google-cloud-document-ai-v1beta3:0.15.1:0.15.1
-grpc-google-cloud-document-ai-v1:2.3.1:2.3.1
-proto-google-cloud-document-ai-v1beta1:0.15.1:0.15.1
-proto-google-cloud-document-ai-v1beta2:0.15.1:0.15.1
-proto-google-cloud-document-ai-v1beta3:0.15.1:0.15.1
-proto-google-cloud-document-ai-v1:2.3.1:2.3.1
+google-cloud-document-ai:2.4.0:2.4.0
+grpc-google-cloud-document-ai-v1beta1:0.16.0:0.16.0
+grpc-google-cloud-document-ai-v1beta2:0.16.0:0.16.0
+grpc-google-cloud-document-ai-v1beta3:0.16.0:0.16.0
+grpc-google-cloud-document-ai-v1:2.4.0:2.4.0
+proto-google-cloud-document-ai-v1beta1:0.16.0:0.16.0
+proto-google-cloud-document-ai-v1beta2:0.16.0:0.16.0
+proto-google-cloud-document-ai-v1beta3:0.16.0:0.16.0
+proto-google-cloud-document-ai-v1:2.4.0:2.4.0