Class 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 type google.cloud.documentai.v1.Document.TextChange
    • Method Detail

      • getDescriptor

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

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

        public 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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public Document.TextChange.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.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 interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
      • clearField

        public Document.TextChange.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
      • clearOneof

        public Document.TextChange.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.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 interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.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 interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.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 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
      • 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.
      • 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];
      • 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];
      • setUnknownFields

        public final Document.TextChange.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>
      • mergeUnknownFields

        public final Document.TextChange.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Document.TextChange.Builder>