Interface DetectDocumentTextResponse.Builder

    • Method Detail

      • documentMetadata

        DetectDocumentTextResponse.Builder documentMetadata​(DocumentMetadata documentMetadata)

        Metadata about the document. It contains the number of pages that are detected in the document.

        Parameters:
        documentMetadata - Metadata about the document. It contains the number of pages that are detected in the document.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • blocks

        DetectDocumentTextResponse.Builder blocks​(Collection<Block> blocks)

        An array of Block objects that contain the text that's detected in the document.

        Parameters:
        blocks - An array of Block objects that contain the text that's detected in the document.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • blocks

        DetectDocumentTextResponse.Builder blocks​(Block... blocks)

        An array of Block objects that contain the text that's detected in the document.

        Parameters:
        blocks - An array of Block objects that contain the text that's detected in the document.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • blocks

        DetectDocumentTextResponse.Builder blocks​(Consumer<Block.Builder>... blocks)

        An array of Block objects that contain the text that's detected in the document.

        This is a convenience method that creates an instance of the Block.Builder avoiding the need to create one manually via Block.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #blocks(List).

        Parameters:
        blocks - a consumer that will call methods on Block.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #blocks(java.util.Collection)
      • detectDocumentTextModelVersion

        DetectDocumentTextResponse.Builder detectDocumentTextModelVersion​(String detectDocumentTextModelVersion)

        Parameters:
        detectDocumentTextModelVersion -
        Returns:
        Returns a reference to this object so that method calls can be chained together.