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 Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ClassifyDocumentResponse.Builderclasses(Collection<DocumentClass> classes)The classes used by the document being analyzed.ClassifyDocumentResponse.Builderclasses(Consumer<DocumentClass.Builder>... classes)The classes used by the document being analyzed.ClassifyDocumentResponse.Builderclasses(DocumentClass... classes)The classes used by the document being analyzed.default ClassifyDocumentResponse.BuilderdocumentMetadata(Consumer<DocumentMetadata.Builder> documentMetadata)Extraction information about the document.ClassifyDocumentResponse.BuilderdocumentMetadata(DocumentMetadata documentMetadata)Extraction information about the document.ClassifyDocumentResponse.BuilderdocumentType(Collection<DocumentTypeListItem> documentType)The document type for each page in the input document.ClassifyDocumentResponse.BuilderdocumentType(Consumer<DocumentTypeListItem.Builder>... documentType)The document type for each page in the input document.ClassifyDocumentResponse.BuilderdocumentType(DocumentTypeListItem... documentType)The document type for each page in the input document.ClassifyDocumentResponse.Buildererrors(Collection<ErrorsListItem> errors)Page-level errors that the system detected while processing the input document.ClassifyDocumentResponse.Buildererrors(Consumer<ErrorsListItem.Builder>... errors)Page-level errors that the system detected while processing the input document.ClassifyDocumentResponse.Buildererrors(ErrorsListItem... errors)Page-level errors that the system detected while processing the input document.ClassifyDocumentResponse.Builderlabels(Collection<DocumentLabel> labels)The labels used in the document being analyzed.ClassifyDocumentResponse.Builderlabels(Consumer<DocumentLabel.Builder>... labels)The labels used in the document being analyzed.ClassifyDocumentResponse.Builderlabels(DocumentLabel... labels)The labels used in the document being analyzed.ClassifyDocumentResponse.Builderwarnings(Collection<WarningsListItem> warnings)Warnings detected while processing the input document.ClassifyDocumentResponse.Builderwarnings(Consumer<WarningsListItem.Builder>... warnings)Warnings detected while processing the input document.ClassifyDocumentResponse.Builderwarnings(WarningsListItem... warnings)Warnings detected while processing the input document.-
Methods inherited from interface software.amazon.awssdk.services.comprehend.model.ComprehendResponse.Builder
build, responseMetadata, responseMetadata
-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Methods inherited from interface software.amazon.awssdk.core.SdkResponse.Builder
sdkHttpResponse, sdkHttpResponse
-
-
-
-
Method Detail
-
classes
ClassifyDocumentResponse.Builder classes(Collection<DocumentClass> classes)
The classes used by the document being analyzed. These are used for models trained in multi-class mode. 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 safety classification, the response includes only two classes (SAFE_PROMPT and UNSAFE_PROMPT), along with a confidence score for each class. The value range of the score is zero to one, where one is the highest confidence.
- Parameters:
classes- The classes used by the document being analyzed. These are used for models trained in multi-class mode. 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 safety classification, the response includes only two classes (SAFE_PROMPT and UNSAFE_PROMPT), along with a confidence score for each class. The value range of the score is zero to one, where one is the highest confidence.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
classes
ClassifyDocumentResponse.Builder classes(DocumentClass... classes)
The classes used by the document being analyzed. These are used for models trained in multi-class mode. 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 safety classification, the response includes only two classes (SAFE_PROMPT and UNSAFE_PROMPT), along with a confidence score for each class. The value range of the score is zero to one, where one is the highest confidence.
- Parameters:
classes- The classes used by the document being analyzed. These are used for models trained in multi-class mode. 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 safety classification, the response includes only two classes (SAFE_PROMPT and UNSAFE_PROMPT), along with a confidence score for each class. The value range of the score is zero to one, where one is the highest confidence.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
classes
ClassifyDocumentResponse.Builder classes(Consumer<DocumentClass.Builder>... classes)
The classes used by the document being analyzed. These are used for models trained in multi-class mode. 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 safety classification, the response includes only two classes (SAFE_PROMPT and UNSAFE_PROMPT), along with a confidence score for each class. The value range of the score is zero to one, where one is the highest confidence.
This is a convenience method that creates an instance of theDocumentClass.Builderavoiding the need to create one manually viaDocumentClass.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#classes(List.) - Parameters:
classes- a consumer that will call methods onDocumentClass.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#classes(java.util.Collection)
-
labels
ClassifyDocumentResponse.Builder labels(Collection<DocumentLabel> labels)
The labels used in 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 in 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
ClassifyDocumentResponse.Builder labels(DocumentLabel... labels)
The labels used in 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 in 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
ClassifyDocumentResponse.Builder labels(Consumer<DocumentLabel.Builder>... labels)
The labels used in 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 theDocumentLabel.Builderavoiding the need to create one manually viaDocumentLabel.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#labels(List.) - Parameters:
labels- a consumer that will call methods onDocumentLabel.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#labels(java.util.Collection)
-
documentMetadata
ClassifyDocumentResponse.Builder documentMetadata(DocumentMetadata documentMetadata)
Extraction information about the document. This field is present in the response only if your request includes the
Byteparameter.- Parameters:
documentMetadata- Extraction information about the document. This field is present in the response only if your request includes theByteparameter.- 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
This is a convenience method that creates an instance of theByteparameter.DocumentMetadata.Builderavoiding the need to create one manually viaDocumentMetadata.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed todocumentMetadata(DocumentMetadata).- Parameters:
documentMetadata- a consumer that will call methods onDocumentMetadata.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
documentMetadata(DocumentMetadata)
-
documentType
ClassifyDocumentResponse.Builder documentType(Collection<DocumentTypeListItem> documentType)
The document type for each page in the input document. This field is present in the response only if your request includes the
Byteparameter.- Parameters:
documentType- The document type for each page in the input document. This field is present in the response only if your request includes theByteparameter.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
documentType
ClassifyDocumentResponse.Builder documentType(DocumentTypeListItem... documentType)
The document type for each page in the input document. This field is present in the response only if your request includes the
Byteparameter.- Parameters:
documentType- The document type for each page in the input document. This field is present in the response only if your request includes theByteparameter.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
documentType
ClassifyDocumentResponse.Builder documentType(Consumer<DocumentTypeListItem.Builder>... documentType)
The document type for each page in the input document. This field is present in the response only if your request includes the
This is a convenience method that creates an instance of theByteparameter.DocumentTypeListItem.Builderavoiding the need to create one manually viaDocumentTypeListItem.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#documentType(List.) - Parameters:
documentType- a consumer that will call methods onDocumentTypeListItem.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#documentType(java.util.Collection)
-
errors
ClassifyDocumentResponse.Builder errors(Collection<ErrorsListItem> 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
ClassifyDocumentResponse.Builder errors(ErrorsListItem... 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
ClassifyDocumentResponse.Builder errors(Consumer<ErrorsListItem.Builder>... 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 theErrorsListItem.Builderavoiding the need to create one manually viaErrorsListItem.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#errors(List.) - Parameters:
errors- a consumer that will call methods onErrorsListItem.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#errors(java.util.Collection)
-
warnings
ClassifyDocumentResponse.Builder warnings(Collection<WarningsListItem> 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
ClassifyDocumentResponse.Builder warnings(WarningsListItem... 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
ClassifyDocumentResponse.Builder warnings(Consumer<WarningsListItem.Builder>... 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 theWarningsListItem.Builderavoiding the need to create one manually viaWarningsListItem.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#warnings(List.) - Parameters:
warnings- a consumer that will call methods onWarningsListItem.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#warnings(java.util.Collection)
-
-