Class Document.TextChange.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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
  • 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.TextChange.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.TextChange.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.TextChange.Builder>
    • getDefaultInstanceForType

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

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

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

      public Document.TextChange.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.TextChange.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.TextChange.Builder>
    • mergeFrom

      public Document.TextChange.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.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:
      hasTextAnchor in interface Document.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:
      getTextAnchor in interface Document.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:
      getTextAnchorOrBuilder in interface Document.TextChangeOrBuilder
    • getChangedText

      public String getChangedText()
       The text that replaces the text identified in the `text_anchor`.
       
      string changed_text = 2;
      Specified by:
      getChangedText in interface Document.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 interface Document.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:
      getProvenanceList in interface Document.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:
      getProvenanceCount in interface Document.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:
      getProvenance in interface Document.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.
       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.
       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:
      getProvenanceOrBuilder in interface Document.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:
      getProvenanceOrBuilderList in interface Document.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];