Interface ClassifyDocumentResponse.Builder

All Superinterfaces:
AwsResponse.Builder, Buildable, ComprehendResponse.Builder, CopyableBuilder<ClassifyDocumentResponse.Builder,ClassifyDocumentResponse>, SdkBuilder<ClassifyDocumentResponse.Builder,ClassifyDocumentResponse>, SdkPojo, SdkResponse.Builder
Enclosing class:
ClassifyDocumentResponse

public static interface ClassifyDocumentResponse.Builder extends ComprehendResponse.Builder, SdkPojo, CopyableBuilder<ClassifyDocumentResponse.Builder,ClassifyDocumentResponse>
  • Method Details

    • classes

      The classes used by the document being analyzed. These are used for multi-class trained models. Individual classes are mutually exclusive and each document is expected to have only a single class assigned to it. For example, an animal can be a dog or a cat, but not both at the same time.

      For prompt classification, the response includes a single class (UNDESIRED_PROMPT), along with a confidence score. A higher confidence score indicates that the input prompt is undesired in nature.

      Parameters:
      classes - The classes used by the document being analyzed. These are used for multi-class trained models. Individual classes are mutually exclusive and each document is expected to have only a single class assigned to it. For example, an animal can be a dog or a cat, but not both at the same time.

      For prompt classification, the response includes a single class (UNDESIRED_PROMPT), along with a confidence score. A higher confidence score indicates that the input prompt is undesired in nature.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • classes

      The classes used by the document being analyzed. These are used for multi-class trained models. Individual classes are mutually exclusive and each document is expected to have only a single class assigned to it. For example, an animal can be a dog or a cat, but not both at the same time.

      For prompt classification, the response includes a single class (UNDESIRED_PROMPT), along with a confidence score. A higher confidence score indicates that the input prompt is undesired in nature.

      Parameters:
      classes - The classes used by the document being analyzed. These are used for multi-class trained models. Individual classes are mutually exclusive and each document is expected to have only a single class assigned to it. For example, an animal can be a dog or a cat, but not both at the same time.

      For prompt classification, the response includes a single class (UNDESIRED_PROMPT), along with a confidence score. A higher confidence score indicates that the input prompt is undesired in nature.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • classes

      The classes used by the document being analyzed. These are used for multi-class trained models. Individual classes are mutually exclusive and each document is expected to have only a single class assigned to it. For example, an animal can be a dog or a cat, but not both at the same time.

      For prompt classification, the response includes a single class (UNDESIRED_PROMPT), along with a confidence score. A higher confidence score indicates that the input prompt is undesired in nature.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to classes(List<DocumentClass>).

      Parameters:
      classes - a consumer that will call methods on DocumentClass.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • labels

      The labels used the document being analyzed. These are used for multi-label trained models. Individual labels represent different categories that are related in some manner and are not mutually exclusive. For example, a movie can be just an action movie, or it can be an action movie, a science fiction movie, and a comedy, all at the same time.

      Parameters:
      labels - The labels used the document being analyzed. These are used for multi-label trained models. Individual labels represent different categories that are related in some manner and are not mutually exclusive. For example, a movie can be just an action movie, or it can be an action movie, a science fiction movie, and a comedy, all at the same time.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • labels

      The labels used the document being analyzed. These are used for multi-label trained models. Individual labels represent different categories that are related in some manner and are not mutually exclusive. For example, a movie can be just an action movie, or it can be an action movie, a science fiction movie, and a comedy, all at the same time.

      Parameters:
      labels - The labels used the document being analyzed. These are used for multi-label trained models. Individual labels represent different categories that are related in some manner and are not mutually exclusive. For example, a movie can be just an action movie, or it can be an action movie, a science fiction movie, and a comedy, all at the same time.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • labels

      The labels used the document being analyzed. These are used for multi-label trained models. Individual labels represent different categories that are related in some manner and are not mutually exclusive. For example, a movie can be just an action movie, or it can be an action movie, a science fiction movie, and a comedy, all at the same time.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to labels(List<DocumentLabel>).

      Parameters:
      labels - a consumer that will call methods on DocumentLabel.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • documentMetadata

      ClassifyDocumentResponse.Builder documentMetadata(DocumentMetadata documentMetadata)

      Extraction information about the document. This field is present in the response only if your request includes the Byte parameter.

      Parameters:
      documentMetadata - Extraction information about the document. This field is present in the response only if your request includes the Byte parameter.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • documentMetadata

      default ClassifyDocumentResponse.Builder documentMetadata(Consumer<DocumentMetadata.Builder> documentMetadata)

      Extraction information about the document. This field is present in the response only if your request includes the Byte parameter.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to documentMetadata(DocumentMetadata).

      Parameters:
      documentMetadata - a consumer that will call methods on DocumentMetadata.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • documentType

      The document type for each page in the input document. This field is present in the response only if your request includes the Byte parameter.

      Parameters:
      documentType - The document type for each page in the input document. This field is present in the response only if your request includes the Byte parameter.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • documentType

      The document type for each page in the input document. This field is present in the response only if your request includes the Byte parameter.

      Parameters:
      documentType - The document type for each page in the input document. This field is present in the response only if your request includes the Byte parameter.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • documentType

      The document type for each page in the input document. This field is present in the response only if your request includes the Byte parameter.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to documentType(List<DocumentTypeListItem>).

      Parameters:
      documentType - a consumer that will call methods on DocumentTypeListItem.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • errors

      Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.

      Parameters:
      errors - Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • errors

      Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.

      Parameters:
      errors - Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • errors

      Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to errors(List<ErrorsListItem>).

      Parameters:
      errors - a consumer that will call methods on ErrorsListItem.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • warnings

      Warnings detected while processing the input document. The response includes a warning if there is a mismatch between the input document type and the model type associated with the endpoint that you specified. The response can also include warnings for individual pages that have a mismatch.

      The field is empty if the system generated no warnings.

      Parameters:
      warnings - Warnings detected while processing the input document. The response includes a warning if there is a mismatch between the input document type and the model type associated with the endpoint that you specified. The response can also include warnings for individual pages that have a mismatch.

      The field is empty if the system generated no warnings.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • warnings

      Warnings detected while processing the input document. The response includes a warning if there is a mismatch between the input document type and the model type associated with the endpoint that you specified. The response can also include warnings for individual pages that have a mismatch.

      The field is empty if the system generated no warnings.

      Parameters:
      warnings - Warnings detected while processing the input document. The response includes a warning if there is a mismatch between the input document type and the model type associated with the endpoint that you specified. The response can also include warnings for individual pages that have a mismatch.

      The field is empty if the system generated no warnings.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • warnings

      Warnings detected while processing the input document. The response includes a warning if there is a mismatch between the input document type and the model type associated with the endpoint that you specified. The response can also include warnings for individual pages that have a mismatch.

      The field is empty if the system generated no warnings.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to warnings(List<WarningsListItem>).

      Parameters:
      warnings - a consumer that will call methods on WarningsListItem.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: