Class Document.Builder

  • All Implemented Interfaces:
    DocumentOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Document

    public static final class Document.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
    implements DocumentOrBuilder
     A structured text document e.g. a PDF.
     
    Protobuf type google.cloud.automl.v1beta1.Document
    • 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.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

        public Document.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.Builder>
        Throws:
        IOException
      • hasInputConfig

        public boolean hasInputConfig()
         An input config specifying the content of the document.
         
        .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1;
        Specified by:
        hasInputConfig in interface DocumentOrBuilder
        Returns:
        Whether the inputConfig field is set.
      • getInputConfig

        public DocumentInputConfig getInputConfig()
         An input config specifying the content of the document.
         
        .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1;
        Specified by:
        getInputConfig in interface DocumentOrBuilder
        Returns:
        The inputConfig.
      • setInputConfig

        public Document.Builder setInputConfig​(DocumentInputConfig value)
         An input config specifying the content of the document.
         
        .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1;
      • setInputConfig

        public Document.Builder setInputConfig​(DocumentInputConfig.Builder builderForValue)
         An input config specifying the content of the document.
         
        .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1;
      • mergeInputConfig

        public Document.Builder mergeInputConfig​(DocumentInputConfig value)
         An input config specifying the content of the document.
         
        .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1;
      • clearInputConfig

        public Document.Builder clearInputConfig()
         An input config specifying the content of the document.
         
        .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1;
      • getInputConfigBuilder

        public DocumentInputConfig.Builder getInputConfigBuilder()
         An input config specifying the content of the document.
         
        .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1;
      • hasDocumentText

        public boolean hasDocumentText()
         The plain text version of this document.
         
        .google.cloud.automl.v1beta1.TextSnippet document_text = 2;
        Specified by:
        hasDocumentText in interface DocumentOrBuilder
        Returns:
        Whether the documentText field is set.
      • getDocumentText

        public TextSnippet getDocumentText()
         The plain text version of this document.
         
        .google.cloud.automl.v1beta1.TextSnippet document_text = 2;
        Specified by:
        getDocumentText in interface DocumentOrBuilder
        Returns:
        The documentText.
      • setDocumentText

        public Document.Builder setDocumentText​(TextSnippet value)
         The plain text version of this document.
         
        .google.cloud.automl.v1beta1.TextSnippet document_text = 2;
      • setDocumentText

        public Document.Builder setDocumentText​(TextSnippet.Builder builderForValue)
         The plain text version of this document.
         
        .google.cloud.automl.v1beta1.TextSnippet document_text = 2;
      • mergeDocumentText

        public Document.Builder mergeDocumentText​(TextSnippet value)
         The plain text version of this document.
         
        .google.cloud.automl.v1beta1.TextSnippet document_text = 2;
      • clearDocumentText

        public Document.Builder clearDocumentText()
         The plain text version of this document.
         
        .google.cloud.automl.v1beta1.TextSnippet document_text = 2;
      • getDocumentTextBuilder

        public TextSnippet.Builder getDocumentTextBuilder()
         The plain text version of this document.
         
        .google.cloud.automl.v1beta1.TextSnippet document_text = 2;
      • getLayoutList

        public List<Document.Layout> getLayoutList()
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
        Specified by:
        getLayoutList in interface DocumentOrBuilder
      • getLayoutCount

        public int getLayoutCount()
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
        Specified by:
        getLayoutCount in interface DocumentOrBuilder
      • getLayout

        public Document.Layout getLayout​(int index)
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
        Specified by:
        getLayout in interface DocumentOrBuilder
      • setLayout

        public Document.Builder setLayout​(int index,
                                          Document.Layout value)
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
      • setLayout

        public Document.Builder setLayout​(int index,
                                          Document.Layout.Builder builderForValue)
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
      • addLayout

        public Document.Builder addLayout​(Document.Layout value)
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
      • addLayout

        public Document.Builder addLayout​(int index,
                                          Document.Layout value)
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
      • addLayout

        public Document.Builder addLayout​(Document.Layout.Builder builderForValue)
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
      • addLayout

        public Document.Builder addLayout​(int index,
                                          Document.Layout.Builder builderForValue)
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
      • addAllLayout

        public Document.Builder addAllLayout​(Iterable<? extends Document.Layout> values)
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
      • clearLayout

        public Document.Builder clearLayout()
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
      • removeLayout

        public Document.Builder removeLayout​(int index)
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
      • getLayoutBuilder

        public Document.Layout.Builder getLayoutBuilder​(int index)
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
      • addLayoutBuilder

        public Document.Layout.Builder addLayoutBuilder()
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
      • addLayoutBuilder

        public Document.Layout.Builder addLayoutBuilder​(int index)
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
      • getLayoutBuilderList

        public List<Document.Layout.Builder> getLayoutBuilderList()
         Describes the layout of the document.
         Sorted by [page_number][].
         
        repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;
      • hasDocumentDimensions

        public boolean hasDocumentDimensions()
         The dimensions of the page in the document.
         
        .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4;
        Specified by:
        hasDocumentDimensions in interface DocumentOrBuilder
        Returns:
        Whether the documentDimensions field is set.
      • getDocumentDimensions

        public DocumentDimensions getDocumentDimensions()
         The dimensions of the page in the document.
         
        .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4;
        Specified by:
        getDocumentDimensions in interface DocumentOrBuilder
        Returns:
        The documentDimensions.
      • setDocumentDimensions

        public Document.Builder setDocumentDimensions​(DocumentDimensions value)
         The dimensions of the page in the document.
         
        .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4;
      • setDocumentDimensions

        public Document.Builder setDocumentDimensions​(DocumentDimensions.Builder builderForValue)
         The dimensions of the page in the document.
         
        .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4;
      • mergeDocumentDimensions

        public Document.Builder mergeDocumentDimensions​(DocumentDimensions value)
         The dimensions of the page in the document.
         
        .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4;
      • clearDocumentDimensions

        public Document.Builder clearDocumentDimensions()
         The dimensions of the page in the document.
         
        .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4;
      • getDocumentDimensionsBuilder

        public DocumentDimensions.Builder getDocumentDimensionsBuilder()
         The dimensions of the page in the document.
         
        .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4;
      • getPageCount

        public int getPageCount()
         Number of pages in the document.
         
        int32 page_count = 5;
        Specified by:
        getPageCount in interface DocumentOrBuilder
        Returns:
        The pageCount.
      • setPageCount

        public Document.Builder setPageCount​(int value)
         Number of pages in the document.
         
        int32 page_count = 5;
        Parameters:
        value - The pageCount to set.
        Returns:
        This builder for chaining.
      • clearPageCount

        public Document.Builder clearPageCount()
         Number of pages in the document.
         
        int32 page_count = 5;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Document.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.Builder>
      • mergeUnknownFields

        public final Document.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.Builder>