Class Document.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Document.Builder>
com.google.cloud.automl.v1.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.GeneratedMessage.Builder<Document.Builder> implements DocumentOrBuilder
 A structured text document e.g. a PDF.
 
Protobuf type google.cloud.automl.v1.Document
  • 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.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.GeneratedMessage.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.GeneratedMessage.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
    • 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>
    • mergeFrom

      public Document.Builder mergeFrom(Document other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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.v1.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.v1.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.v1.DocumentInputConfig input_config = 1;
    • setInputConfig

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

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

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

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

      public DocumentInputConfigOrBuilder getInputConfigOrBuilder()
       An input config specifying the content of the document.
       
      .google.cloud.automl.v1.DocumentInputConfig input_config = 1;
      Specified by:
      getInputConfigOrBuilder in interface DocumentOrBuilder
    • hasDocumentText

      public boolean hasDocumentText()
       The plain text version of this document.
       
      .google.cloud.automl.v1.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.v1.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.v1.TextSnippet document_text = 2;
    • setDocumentText

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

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

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

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

      public TextSnippetOrBuilder getDocumentTextOrBuilder()
       The plain text version of this document.
       
      .google.cloud.automl.v1.TextSnippet document_text = 2;
      Specified by:
      getDocumentTextOrBuilder in interface DocumentOrBuilder
    • getLayoutList

      public List<Document.Layout> getLayoutList()
       Describes the layout of the document.
       Sorted by [page_number][].
       
      repeated .google.cloud.automl.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.Document.Layout layout = 3;
    • clearLayout

      public Document.Builder clearLayout()
       Describes the layout of the document.
       Sorted by [page_number][].
       
      repeated .google.cloud.automl.v1.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.v1.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.v1.Document.Layout layout = 3;
    • getLayoutOrBuilder

      public Document.LayoutOrBuilder getLayoutOrBuilder(int index)
       Describes the layout of the document.
       Sorted by [page_number][].
       
      repeated .google.cloud.automl.v1.Document.Layout layout = 3;
      Specified by:
      getLayoutOrBuilder in interface DocumentOrBuilder
    • getLayoutOrBuilderList

      public List<? extends Document.LayoutOrBuilder> getLayoutOrBuilderList()
       Describes the layout of the document.
       Sorted by [page_number][].
       
      repeated .google.cloud.automl.v1.Document.Layout layout = 3;
      Specified by:
      getLayoutOrBuilderList in interface DocumentOrBuilder
    • addLayoutBuilder

      public Document.Layout.Builder addLayoutBuilder()
       Describes the layout of the document.
       Sorted by [page_number][].
       
      repeated .google.cloud.automl.v1.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.v1.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.v1.Document.Layout layout = 3;
    • hasDocumentDimensions

      public boolean hasDocumentDimensions()
       The dimensions of the page in the document.
       
      .google.cloud.automl.v1.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.v1.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.v1.DocumentDimensions document_dimensions = 4;
    • setDocumentDimensions

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

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

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

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

      public DocumentDimensionsOrBuilder getDocumentDimensionsOrBuilder()
       The dimensions of the page in the document.
       
      .google.cloud.automl.v1.DocumentDimensions document_dimensions = 4;
      Specified by:
      getDocumentDimensionsOrBuilder in interface DocumentOrBuilder
    • 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.