public static final class Document.TextChange.Builder extends GeneratedMessageV3.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
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addAllProvenance(Iterable<? extends Document.Provenance> values)
public Document.TextChange.Builder addAllProvenance(Iterable<? extends Document.Provenance> values)
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Parameter
Name | Description |
values | Iterable<? extends com.google.cloud.documentai.v1.Document.Provenance>
|
Returns
addProvenance(Document.Provenance value)
public Document.TextChange.Builder addProvenance(Document.Provenance value)
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Parameter
Returns
addProvenance(Document.Provenance.Builder builderForValue)
public Document.TextChange.Builder addProvenance(Document.Provenance.Builder builderForValue)
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Parameter
Returns
addProvenance(int index, Document.Provenance value)
public Document.TextChange.Builder addProvenance(int index, Document.Provenance value)
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Parameters
Returns
addProvenance(int index, Document.Provenance.Builder builderForValue)
public Document.TextChange.Builder addProvenance(int index, Document.Provenance.Builder builderForValue)
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Parameters
Returns
addProvenanceBuilder()
public Document.Provenance.Builder addProvenanceBuilder()
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Returns
addProvenanceBuilder(int index)
public Document.Provenance.Builder addProvenanceBuilder(int index)
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Parameter
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Document.TextChange.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public Document.TextChange build()
Returns
buildPartial()
public Document.TextChange buildPartial()
Returns
clear()
public Document.TextChange.Builder clear()
Returns
Overrides
clearChangedText()
public Document.TextChange.Builder clearChangedText()
The text that replaces the text identified in the text_anchor
.
string changed_text = 2;
Returns
clearField(Descriptors.FieldDescriptor field)
public Document.TextChange.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Document.TextChange.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearProvenance()
public Document.TextChange.Builder clearProvenance()
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Returns
clearTextAnchor()
public Document.TextChange.Builder clearTextAnchor()
Provenance of the correction.
Text anchor indexing into the
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;
Returns
clone()
public Document.TextChange.Builder clone()
Returns
Overrides
getChangedText()
public String getChangedText()
The text that replaces the text identified in the text_anchor
.
string changed_text = 2;
Returns
Type | Description |
String | The changedText.
|
getChangedTextBytes()
public ByteString getChangedTextBytes()
The text that replaces the text identified in the text_anchor
.
string changed_text = 2;
Returns
Type | Description |
ByteString | The bytes for changedText.
|
getDefaultInstanceForType()
public Document.TextChange getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getProvenance(int index)
public Document.Provenance getProvenance(int index)
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Parameter
Returns
getProvenanceBuilder(int index)
public Document.Provenance.Builder getProvenanceBuilder(int index)
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Parameter
Returns
getProvenanceBuilderList()
public List<Document.Provenance.Builder> getProvenanceBuilderList()
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Returns
getProvenanceCount()
public int getProvenanceCount()
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Returns
getProvenanceList()
public List<Document.Provenance> getProvenanceList()
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Returns
getProvenanceOrBuilder(int index)
public Document.ProvenanceOrBuilder getProvenanceOrBuilder(int index)
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Parameter
Returns
getProvenanceOrBuilderList()
public List<? extends Document.ProvenanceOrBuilder> getProvenanceOrBuilderList()
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Returns
Type | Description |
List<? extends com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder> | |
getTextAnchor()
public Document.TextAnchor getTextAnchor()
Provenance of the correction.
Text anchor indexing into the
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;
Returns
getTextAnchorBuilder()
public Document.TextAnchor.Builder getTextAnchorBuilder()
Provenance of the correction.
Text anchor indexing into the
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;
Returns
getTextAnchorOrBuilder()
public Document.TextAnchorOrBuilder getTextAnchorOrBuilder()
Provenance of the correction.
Text anchor indexing into the
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;
Returns
hasTextAnchor()
public boolean hasTextAnchor()
Provenance of the correction.
Text anchor indexing into the
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;
Returns
Type | Description |
boolean | Whether the textAnchor field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(Document.TextChange other)
public Document.TextChange.Builder mergeFrom(Document.TextChange other)
Parameter
Returns
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Document.TextChange.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Document.TextChange.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeTextAnchor(Document.TextAnchor value)
public Document.TextChange.Builder mergeTextAnchor(Document.TextAnchor value)
Provenance of the correction.
Text anchor indexing into the
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;
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Document.TextChange.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
removeProvenance(int index)
public Document.TextChange.Builder removeProvenance(int index)
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Parameter
Returns
setChangedText(String value)
public Document.TextChange.Builder setChangedText(String value)
The text that replaces the text identified in the text_anchor
.
string changed_text = 2;
Parameter
Name | Description |
value | String
The changedText to set.
|
Returns
setChangedTextBytes(ByteString value)
public Document.TextChange.Builder setChangedTextBytes(ByteString value)
The text that replaces the text identified in the text_anchor
.
string changed_text = 2;
Parameter
Name | Description |
value | ByteString
The bytes for changedText to set.
|
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public Document.TextChange.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setProvenance(int index, Document.Provenance value)
public Document.TextChange.Builder setProvenance(int index, Document.Provenance value)
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Parameters
Returns
setProvenance(int index, Document.Provenance.Builder builderForValue)
public Document.TextChange.Builder setProvenance(int index, Document.Provenance.Builder builderForValue)
The history of this annotation.
repeated .google.cloud.documentai.v1.Document.Provenance provenance = 3;
Parameters
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Document.TextChange.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setTextAnchor(Document.TextAnchor value)
public Document.TextChange.Builder setTextAnchor(Document.TextAnchor value)
Provenance of the correction.
Text anchor indexing into the
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;
Parameter
Returns
setTextAnchor(Document.TextAnchor.Builder builderForValue)
public Document.TextChange.Builder setTextAnchor(Document.TextAnchor.Builder builderForValue)
Provenance of the correction.
Text anchor indexing into the
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;
Parameter
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final Document.TextChange.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides