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.GeneratedMessageV3.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.GeneratedMessageV3.Builder<Document.TextChange.Builder> implements Document.TextChangeOrBuilder
This message is used for text changes aka. OCR corrections.
Protobuf typegoogle.cloud.documentai.v1.Document.TextChange
-
-
Method Summary
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
clear
public 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.GeneratedMessageV3.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.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
getDefaultInstanceForType
public Document.TextChange getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public Document.TextChange build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Document.TextChange buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Document.TextChange.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
setField
public Document.TextChange.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
clearField
public Document.TextChange.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
clearOneof
public Document.TextChange.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
setRepeatedField
public Document.TextChange.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
addRepeatedField
public Document.TextChange.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
mergeFrom
public Document.TextChange.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Document.TextChange.Builder>
-
mergeFrom
public Document.TextChange.Builder mergeFrom(Document.TextChange other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.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
public Document.TextAnchor 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
public Document.TextChange.Builder setTextAnchor(Document.TextAnchor value)
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
public Document.TextChange.Builder setTextAnchor(Document.TextAnchor.Builder builderForValue)
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
public Document.TextChange.Builder mergeTextAnchor(Document.TextAnchor value)
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
public Document.TextChange.Builder 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
public Document.TextAnchor.Builder 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
public Document.TextAnchorOrBuilder 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
public String 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
public Document.TextChange.Builder setChangedText(String value)
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
public Document.TextChange.Builder clearChangedText()
The text that replaces the text identified in the `text_anchor`.
string changed_text = 2;- Returns:
- This builder for chaining.
-
setChangedTextBytes
public Document.TextChange.Builder setChangedTextBytes(com.google.protobuf.ByteString value)
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 public List<Document.Provenance> 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 public int 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 public Document.Provenance getProvenance(int index)
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];- Specified by:
getProvenancein interfaceDocument.TextChangeOrBuilder
-
setProvenance
@Deprecated public Document.TextChange.Builder setProvenance(int index, Document.Provenance value)
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 public Document.TextChange.Builder addProvenance(Document.Provenance value)
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 value)
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 public Document.TextChange.Builder clearProvenance()
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];
-
removeProvenance
@Deprecated public Document.TextChange.Builder removeProvenance(int index)
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];
-
getProvenanceBuilder
@Deprecated public Document.Provenance.Builder getProvenanceBuilder(int index)
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];
-
getProvenanceOrBuilder
@Deprecated public Document.ProvenanceOrBuilder getProvenanceOrBuilder(int index)
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];- Specified by:
getProvenanceOrBuilderin interfaceDocument.TextChangeOrBuilder
-
getProvenanceOrBuilderList
@Deprecated public List<? extends Document.ProvenanceOrBuilder> 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 public Document.Provenance.Builder addProvenanceBuilder()
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];
-
addProvenanceBuilder
@Deprecated public Document.Provenance.Builder addProvenanceBuilder(int index)
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];
-
getProvenanceBuilderList
@Deprecated public List<Document.Provenance.Builder> getProvenanceBuilderList()
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3 [deprecated = true];
-
setUnknownFields
public final Document.TextChange.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
mergeUnknownFields
public final Document.TextChange.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
-