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.v1beta3.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.v1beta3.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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
clear
public Document.TextChange.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
getDefaultInstanceForType
public Document.TextChange getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public Document.TextChange build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Document.TextChange buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Document.TextChange.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
setField
public Document.TextChange.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
clearField
public Document.TextChange.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
clearOneof
public Document.TextChange.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in 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:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
addRepeatedField
public Document.TextChange.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
mergeFrom
public Document.TextChange.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Document.TextChange.Builder>
-
mergeFrom
public Document.TextChange.Builder mergeFrom(Document.TextChange other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1;
- Specified by:
hasTextAnchor
in 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.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1;
- Specified by:
getTextAnchor
in 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.v1beta3.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.v1beta3.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.v1beta3.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.v1beta3.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.v1beta3.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.v1beta3.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.v1beta3.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.v1beta3.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.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1;
-
getTextAnchorOrBuilder
public Document.TextAnchorOrBuilder getTextAnchorOrBuilder()
Provenance of the correction. Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.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.v1beta3.Document.TextAnchor text_anchor = 1;
- Specified by:
getTextAnchorOrBuilder
in interfaceDocument.TextChangeOrBuilder
-
getChangedText
public String getChangedText()
The text that replaces the text identified in the `text_anchor`.
string changed_text = 2;
- Specified by:
getChangedText
in 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:
getChangedTextBytes
in 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.v1beta3.Document.Provenance provenance = 3 [deprecated = true];
- Specified by:
getProvenanceList
in interfaceDocument.TextChangeOrBuilder
-
getProvenanceCount
@Deprecated public int getProvenanceCount()
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true];
- Specified by:
getProvenanceCount
in interfaceDocument.TextChangeOrBuilder
-
getProvenance
@Deprecated public Document.Provenance getProvenance(int index)
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true];
- Specified by:
getProvenance
in interfaceDocument.TextChangeOrBuilder
-
setProvenance
@Deprecated public Document.TextChange.Builder setProvenance(int index, Document.Provenance value)
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1beta3.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.v1beta3.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.v1beta3.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.v1beta3.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.v1beta3.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.v1beta3.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.v1beta3.Document.Provenance provenance = 3 [deprecated = true];
-
clearProvenance
@Deprecated public Document.TextChange.Builder clearProvenance()
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1beta3.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.v1beta3.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.v1beta3.Document.Provenance provenance = 3 [deprecated = true];
-
getProvenanceOrBuilder
@Deprecated public Document.ProvenanceOrBuilder getProvenanceOrBuilder(int index)
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true];
- Specified by:
getProvenanceOrBuilder
in interfaceDocument.TextChangeOrBuilder
-
getProvenanceOrBuilderList
@Deprecated public List<? extends Document.ProvenanceOrBuilder> getProvenanceOrBuilderList()
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true];
- Specified by:
getProvenanceOrBuilderList
in interfaceDocument.TextChangeOrBuilder
-
addProvenanceBuilder
@Deprecated public Document.Provenance.Builder addProvenanceBuilder()
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1beta3.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.v1beta3.Document.Provenance provenance = 3 [deprecated = true];
-
getProvenanceBuilderList
@Deprecated public List<Document.Provenance.Builder> getProvenanceBuilderList()
Deprecated.The history of this annotation.
repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true];
-
setUnknownFields
public final Document.TextChange.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
mergeUnknownFields
public final Document.TextChange.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
-
-