public static final class TextAnnotation.Builder extends GeneratedMessageV3.Builder<TextAnnotation.Builder> implements TextAnnotationOrBuilder
TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the [TextAnnotation.TextProperty][google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty] message definition below for more detail.Protobuf type
google.cloud.vision.v1p2beta1.TextAnnotation
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public TextAnnotation build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public TextAnnotation buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public TextAnnotation.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder mergeFrom(TextAnnotation other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<TextAnnotation.Builder>
java.io.IOException
public java.util.List<Page> getPagesList()
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
getPagesList
in interface TextAnnotationOrBuilder
public int getPagesCount()
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
getPagesCount
in interface TextAnnotationOrBuilder
public Page getPages(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
getPages
in interface TextAnnotationOrBuilder
public TextAnnotation.Builder setPages(int index, Page value)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
public TextAnnotation.Builder setPages(int index, Page.Builder builderForValue)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
public TextAnnotation.Builder addPages(Page value)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
public TextAnnotation.Builder addPages(int index, Page value)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
public TextAnnotation.Builder addPages(Page.Builder builderForValue)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
public TextAnnotation.Builder addPages(int index, Page.Builder builderForValue)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
public TextAnnotation.Builder addAllPages(java.lang.Iterable<? extends Page> values)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
public TextAnnotation.Builder clearPages()
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
public TextAnnotation.Builder removePages(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
public Page.Builder getPagesBuilder(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
public PageOrBuilder getPagesOrBuilder(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
getPagesOrBuilder
in interface TextAnnotationOrBuilder
public java.util.List<? extends PageOrBuilder> getPagesOrBuilderList()
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
getPagesOrBuilderList
in interface TextAnnotationOrBuilder
public Page.Builder addPagesBuilder()
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
public Page.Builder addPagesBuilder(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
public java.util.List<Page.Builder> getPagesBuilderList()
List of pages detected by OCR.
repeated .google.cloud.vision.v1p2beta1.Page pages = 1;
public java.lang.String getText()
UTF-8 text detected on the pages.
string text = 2;
getText
in interface TextAnnotationOrBuilder
public ByteString getTextBytes()
UTF-8 text detected on the pages.
string text = 2;
getTextBytes
in interface TextAnnotationOrBuilder
public TextAnnotation.Builder setText(java.lang.String value)
UTF-8 text detected on the pages.
string text = 2;
public TextAnnotation.Builder clearText()
UTF-8 text detected on the pages.
string text = 2;
public TextAnnotation.Builder setTextBytes(ByteString value)
UTF-8 text detected on the pages.
string text = 2;
public final TextAnnotation.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public final TextAnnotation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>