Package com.google.cloud.documentai.v1
Class Document.TextChange.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Document.TextChange.Builder>
com.google.cloud.documentai.v1.Document.TextChange.Builder
- All Implemented Interfaces:
Document.TextChangeOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Document.TextChange
public static final class Document.TextChange.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Document.TextChange.Builder>
implements Document.TextChangeOrBuilder
This message is used for text changes aka. OCR corrections.Protobuf type
google.cloud.documentai.v1.Document.TextChange-
Method Summary
Modifier and TypeMethodDescriptionaddAllProvenance(Iterable<? extends Document.Provenance> values) Deprecated.addProvenance(int index, Document.Provenance value) Deprecated.addProvenance(int index, Document.Provenance.Builder builderForValue) Deprecated.addProvenance(Document.Provenance value) Deprecated.addProvenance(Document.Provenance.Builder builderForValue) Deprecated.Deprecated.addProvenanceBuilder(int index) Deprecated.build()clear()The text that replaces the text identified in the `text_anchor`.Deprecated.Provenance of the correction.The text that replaces the text identified in the `text_anchor`.com.google.protobuf.ByteStringThe text that replaces the text identified in the `text_anchor`.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetProvenance(int index) Deprecated.getProvenanceBuilder(int index) Deprecated.Deprecated.intDeprecated.Deprecated.getProvenanceOrBuilder(int index) Deprecated.List<? extends Document.ProvenanceOrBuilder>Deprecated.Provenance of the correction.Provenance of the correction.Provenance of the correction.booleanProvenance of the correction.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(Document.TextChange other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Provenance of the correction.removeProvenance(int index) Deprecated.setChangedText(String value) The text that replaces the text identified in the `text_anchor`.setChangedTextBytes(com.google.protobuf.ByteString value) The text that replaces the text identified in the `text_anchor`.setProvenance(int index, Document.Provenance value) Deprecated.setProvenance(int index, Document.Provenance.Builder builderForValue) Deprecated.setTextAnchor(Document.TextAnchor value) Provenance of the correction.setTextAnchor(Document.TextAnchor.Builder builderForValue) Provenance of the correction.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Document.TextChange.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Document.TextChange.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Document.TextChange.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Document.TextChange.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Document.TextChange.Builder>
-
mergeFrom
public Document.TextChange.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Document.TextChange.Builder>- Throws:
IOException
-
hasTextAnchor
public boolean hasTextAnchor()Provenance of the correction. Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1;- Specified by:
hasTextAnchorin interfaceDocument.TextChangeOrBuilder- Returns:
- Whether the textAnchor field is set.
-
getTextAnchor
Provenance of the correction. Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1;- Specified by:
getTextAnchorin interfaceDocument.TextChangeOrBuilder- Returns:
- The textAnchor.
-
setTextAnchor
Provenance of the correction. Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; -
setTextAnchor
Provenance of the correction. Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; -
mergeTextAnchor
Provenance of the correction. Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; -
clearTextAnchor
Provenance of the correction. Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; -
getTextAnchorBuilder
Provenance of the correction. Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; -
getTextAnchorOrBuilder
Provenance of the correction. Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
.google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1;- Specified by:
getTextAnchorOrBuilderin interfaceDocument.TextChangeOrBuilder
-
getChangedText
The text that replaces the text identified in the `text_anchor`.
string changed_text = 2;- Specified by:
getChangedTextin interfaceDocument.TextChangeOrBuilder- Returns:
- The changedText.
-
getChangedTextBytes
public com.google.protobuf.ByteString getChangedTextBytes()The text that replaces the text identified in the `text_anchor`.
string changed_text = 2;- Specified by:
getChangedTextBytesin interfaceDocument.TextChangeOrBuilder- Returns:
- The bytes for changedText.
-
setChangedText
The text that replaces the text identified in the `text_anchor`.
string changed_text = 2;- Parameters:
value- The changedText to set.- Returns:
- This builder for chaining.
-
clearChangedText
The text that replaces the text identified in the `text_anchor`.
string changed_text = 2;- Returns:
- This builder for chaining.
-
setChangedTextBytes
The text that replaces the text identified in the `text_anchor`.
string changed_text = 2;- Parameters:
value- The bytes for changedText to set.- Returns:
- This builder for chaining.
-
getProvenanceList
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];- Specified by:
getProvenanceListin interfaceDocument.TextChangeOrBuilder
-
getProvenanceCount
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];- Specified by:
getProvenanceCountin interfaceDocument.TextChangeOrBuilder
-
getProvenance
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];- Specified by:
getProvenancein interfaceDocument.TextChangeOrBuilder
-
setProvenance
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; -
setProvenance
@Deprecated public Document.TextChange.Builder setProvenance(int index, Document.Provenance.Builder builderForValue) Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; -
addProvenance
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; -
addProvenance
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; -
addProvenance
@Deprecated public Document.TextChange.Builder addProvenance(Document.Provenance.Builder builderForValue) Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; -
addProvenance
@Deprecated public Document.TextChange.Builder addProvenance(int index, Document.Provenance.Builder builderForValue) Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; -
addAllProvenance
@Deprecated public Document.TextChange.Builder addAllProvenance(Iterable<? extends Document.Provenance> values) Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; -
clearProvenance
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; -
removeProvenance
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; -
getProvenanceBuilder
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; -
getProvenanceOrBuilder
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];- Specified by:
getProvenanceOrBuilderin interfaceDocument.TextChangeOrBuilder
-
getProvenanceOrBuilderList
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];- Specified by:
getProvenanceOrBuilderListin interfaceDocument.TextChangeOrBuilder
-
addProvenanceBuilder
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; -
addProvenanceBuilder
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true]; -
getProvenanceBuilderList
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];
-