Class Document.TextAnchor.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Document.TextAnchor.Builder>
com.google.cloud.documentai.v1.Document.TextAnchor.Builder
All Implemented Interfaces:
Document.TextAnchorOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Document.TextAnchor

public static final class Document.TextAnchor.Builder extends com.google.protobuf.GeneratedMessage.Builder<Document.TextAnchor.Builder> implements Document.TextAnchorOrBuilder
 Text reference indexing into the
 [Document.text][google.cloud.documentai.v1.Document.text].
 
Protobuf type google.cloud.documentai.v1.Document.TextAnchor
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Document.TextAnchor.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Document.TextAnchor.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Document.TextAnchor.Builder>
    • getDefaultInstanceForType

      public Document.TextAnchor getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Document.TextAnchor build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Document.TextAnchor buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Document.TextAnchor.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Document.TextAnchor.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Document.TextAnchor.Builder>
    • mergeFrom

      public Document.TextAnchor.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Document.TextAnchor.Builder>
      Throws:
      IOException
    • getTextSegmentsList

      public List<Document.TextAnchor.TextSegment> getTextSegmentsList()
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
      Specified by:
      getTextSegmentsList in interface Document.TextAnchorOrBuilder
    • getTextSegmentsCount

      public int getTextSegmentsCount()
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
      Specified by:
      getTextSegmentsCount in interface Document.TextAnchorOrBuilder
    • getTextSegments

      public Document.TextAnchor.TextSegment getTextSegments(int index)
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
      Specified by:
      getTextSegments in interface Document.TextAnchorOrBuilder
    • setTextSegments

      public Document.TextAnchor.Builder setTextSegments(int index, Document.TextAnchor.TextSegment value)
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
    • setTextSegments

      public Document.TextAnchor.Builder setTextSegments(int index, Document.TextAnchor.TextSegment.Builder builderForValue)
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
    • addTextSegments

       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
    • addTextSegments

      public Document.TextAnchor.Builder addTextSegments(int index, Document.TextAnchor.TextSegment value)
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
    • addTextSegments

      public Document.TextAnchor.Builder addTextSegments(Document.TextAnchor.TextSegment.Builder builderForValue)
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
    • addTextSegments

      public Document.TextAnchor.Builder addTextSegments(int index, Document.TextAnchor.TextSegment.Builder builderForValue)
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
    • addAllTextSegments

      public Document.TextAnchor.Builder addAllTextSegments(Iterable<? extends Document.TextAnchor.TextSegment> values)
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
    • clearTextSegments

      public Document.TextAnchor.Builder clearTextSegments()
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
    • removeTextSegments

      public Document.TextAnchor.Builder removeTextSegments(int index)
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
    • getTextSegmentsBuilder

      public Document.TextAnchor.TextSegment.Builder getTextSegmentsBuilder(int index)
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
    • getTextSegmentsOrBuilder

      public Document.TextAnchor.TextSegmentOrBuilder getTextSegmentsOrBuilder(int index)
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
      Specified by:
      getTextSegmentsOrBuilder in interface Document.TextAnchorOrBuilder
    • getTextSegmentsOrBuilderList

      public List<? extends Document.TextAnchor.TextSegmentOrBuilder> getTextSegmentsOrBuilderList()
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
      Specified by:
      getTextSegmentsOrBuilderList in interface Document.TextAnchorOrBuilder
    • addTextSegmentsBuilder

      public Document.TextAnchor.TextSegment.Builder addTextSegmentsBuilder()
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
    • addTextSegmentsBuilder

      public Document.TextAnchor.TextSegment.Builder addTextSegmentsBuilder(int index)
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
    • getTextSegmentsBuilderList

      public List<Document.TextAnchor.TextSegment.Builder> getTextSegmentsBuilderList()
       The text segments from the
       [Document.text][google.cloud.documentai.v1.Document.text].
       
      repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
    • getContent

      public String getContent()
       Contains the content of the text span so that users do
       not have to look it up in the text_segments.  It is always
       populated for formFields.
       
      string content = 2;
      Specified by:
      getContent in interface Document.TextAnchorOrBuilder
      Returns:
      The content.
    • getContentBytes

      public com.google.protobuf.ByteString getContentBytes()
       Contains the content of the text span so that users do
       not have to look it up in the text_segments.  It is always
       populated for formFields.
       
      string content = 2;
      Specified by:
      getContentBytes in interface Document.TextAnchorOrBuilder
      Returns:
      The bytes for content.
    • setContent

      public Document.TextAnchor.Builder setContent(String value)
       Contains the content of the text span so that users do
       not have to look it up in the text_segments.  It is always
       populated for formFields.
       
      string content = 2;
      Parameters:
      value - The content to set.
      Returns:
      This builder for chaining.
    • clearContent

      public Document.TextAnchor.Builder clearContent()
       Contains the content of the text span so that users do
       not have to look it up in the text_segments.  It is always
       populated for formFields.
       
      string content = 2;
      Returns:
      This builder for chaining.
    • setContentBytes

      public Document.TextAnchor.Builder setContentBytes(com.google.protobuf.ByteString value)
       Contains the content of the text span so that users do
       not have to look it up in the text_segments.  It is always
       populated for formFields.
       
      string content = 2;
      Parameters:
      value - The bytes for content to set.
      Returns:
      This builder for chaining.