@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ClassifyDocumentRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
NOOP
Constructor and Description |
---|
ClassifyDocumentRequest() |
Modifier and Type | Method and Description |
---|---|
ClassifyDocumentRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
ByteBuffer |
getBytes()
Use the
Bytes parameter to input a text, PDF, Word or image file. |
DocumentReaderConfig |
getDocumentReaderConfig()
Provides configuration parameters to override the default actions for extracting text from PDF documents and
image files.
|
String |
getEndpointArn()
The Amazon Resource Number (ARN) of the endpoint.
|
String |
getText()
The document text to be analyzed.
|
int |
hashCode() |
void |
setBytes(ByteBuffer bytes)
Use the
Bytes parameter to input a text, PDF, Word or image file. |
void |
setDocumentReaderConfig(DocumentReaderConfig documentReaderConfig)
Provides configuration parameters to override the default actions for extracting text from PDF documents and
image files.
|
void |
setEndpointArn(String endpointArn)
The Amazon Resource Number (ARN) of the endpoint.
|
void |
setText(String text)
The document text to be analyzed.
|
String |
toString()
Returns a string representation of this object.
|
ClassifyDocumentRequest |
withBytes(ByteBuffer bytes)
Use the
Bytes parameter to input a text, PDF, Word or image file. |
ClassifyDocumentRequest |
withDocumentReaderConfig(DocumentReaderConfig documentReaderConfig)
Provides configuration parameters to override the default actions for extracting text from PDF documents and
image files.
|
ClassifyDocumentRequest |
withEndpointArn(String endpointArn)
The Amazon Resource Number (ARN) of the endpoint.
|
ClassifyDocumentRequest |
withText(String text)
The document text to be analyzed.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public void setText(String text)
The document text to be analyzed. If you enter text using this parameter, do not use the Bytes
parameter.
text
- The document text to be analyzed. If you enter text using this parameter, do not use the
Bytes
parameter.public String getText()
The document text to be analyzed. If you enter text using this parameter, do not use the Bytes
parameter.
Bytes
parameter.public ClassifyDocumentRequest withText(String text)
The document text to be analyzed. If you enter text using this parameter, do not use the Bytes
parameter.
text
- The document text to be analyzed. If you enter text using this parameter, do not use the
Bytes
parameter.public void setEndpointArn(String endpointArn)
The Amazon Resource Number (ARN) of the endpoint.
For prompt safety classification, Amazon Comprehend provides the endpoint ARN. For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide
For custom classification, you create an endpoint for your custom model. For more information, see Using Amazon Comprehend endpoints.
endpointArn
- The Amazon Resource Number (ARN) of the endpoint.
For prompt safety classification, Amazon Comprehend provides the endpoint ARN. For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide
For custom classification, you create an endpoint for your custom model. For more information, see Using Amazon Comprehend endpoints.
public String getEndpointArn()
The Amazon Resource Number (ARN) of the endpoint.
For prompt safety classification, Amazon Comprehend provides the endpoint ARN. For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide
For custom classification, you create an endpoint for your custom model. For more information, see Using Amazon Comprehend endpoints.
For prompt safety classification, Amazon Comprehend provides the endpoint ARN. For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide
For custom classification, you create an endpoint for your custom model. For more information, see Using Amazon Comprehend endpoints.
public ClassifyDocumentRequest withEndpointArn(String endpointArn)
The Amazon Resource Number (ARN) of the endpoint.
For prompt safety classification, Amazon Comprehend provides the endpoint ARN. For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide
For custom classification, you create an endpoint for your custom model. For more information, see Using Amazon Comprehend endpoints.
endpointArn
- The Amazon Resource Number (ARN) of the endpoint.
For prompt safety classification, Amazon Comprehend provides the endpoint ARN. For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide
For custom classification, you create an endpoint for your custom model. For more information, see Using Amazon Comprehend endpoints.
public void setBytes(ByteBuffer bytes)
Use the Bytes
parameter to input a text, PDF, Word or image file.
When you classify a document using a custom model, you can also use the Bytes
parameter to input an
Amazon Textract DetectDocumentText
or AnalyzeDocument
output file.
To classify a document using the prompt safety classifier, use the Text
parameter for input.
Provide the input document as a sequence of base64-encoded bytes. If your code uses an Amazon Web Services SDK to classify documents, the SDK may encode the document file bytes for you.
The maximum length of this field depends on the input document type. For details, see Inputs for real-time custom analysis in the Comprehend Developer Guide.
If you use the Bytes
parameter, do not use the Text
parameter.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
bytes
- Use the Bytes
parameter to input a text, PDF, Word or image file.
When you classify a document using a custom model, you can also use the Bytes
parameter to
input an Amazon Textract DetectDocumentText
or AnalyzeDocument
output file.
To classify a document using the prompt safety classifier, use the Text
parameter for input.
Provide the input document as a sequence of base64-encoded bytes. If your code uses an Amazon Web Services SDK to classify documents, the SDK may encode the document file bytes for you.
The maximum length of this field depends on the input document type. For details, see Inputs for real-time custom analysis in the Comprehend Developer Guide.
If you use the Bytes
parameter, do not use the Text
parameter.
public ByteBuffer getBytes()
Use the Bytes
parameter to input a text, PDF, Word or image file.
When you classify a document using a custom model, you can also use the Bytes
parameter to input an
Amazon Textract DetectDocumentText
or AnalyzeDocument
output file.
To classify a document using the prompt safety classifier, use the Text
parameter for input.
Provide the input document as a sequence of base64-encoded bytes. If your code uses an Amazon Web Services SDK to classify documents, the SDK may encode the document file bytes for you.
The maximum length of this field depends on the input document type. For details, see Inputs for real-time custom analysis in the Comprehend Developer Guide.
If you use the Bytes
parameter, do not use the Text
parameter.
ByteBuffer
s are stateful. Calling their get
methods changes their position
. We recommend
using ByteBuffer.asReadOnlyBuffer()
to create a read-only view of the buffer with an independent
position
, and calling get
methods on this rather than directly on the returned ByteBuffer
.
Doing so will ensure that anyone else using the ByteBuffer
will not be affected by changes to the
position
.
Bytes
parameter to input a text, PDF, Word or image file.
When you classify a document using a custom model, you can also use the Bytes
parameter to
input an Amazon Textract DetectDocumentText
or AnalyzeDocument
output file.
To classify a document using the prompt safety classifier, use the Text
parameter for input.
Provide the input document as a sequence of base64-encoded bytes. If your code uses an Amazon Web Services SDK to classify documents, the SDK may encode the document file bytes for you.
The maximum length of this field depends on the input document type. For details, see Inputs for real-time custom analysis in the Comprehend Developer Guide.
If you use the Bytes
parameter, do not use the Text
parameter.
public ClassifyDocumentRequest withBytes(ByteBuffer bytes)
Use the Bytes
parameter to input a text, PDF, Word or image file.
When you classify a document using a custom model, you can also use the Bytes
parameter to input an
Amazon Textract DetectDocumentText
or AnalyzeDocument
output file.
To classify a document using the prompt safety classifier, use the Text
parameter for input.
Provide the input document as a sequence of base64-encoded bytes. If your code uses an Amazon Web Services SDK to classify documents, the SDK may encode the document file bytes for you.
The maximum length of this field depends on the input document type. For details, see Inputs for real-time custom analysis in the Comprehend Developer Guide.
If you use the Bytes
parameter, do not use the Text
parameter.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
bytes
- Use the Bytes
parameter to input a text, PDF, Word or image file.
When you classify a document using a custom model, you can also use the Bytes
parameter to
input an Amazon Textract DetectDocumentText
or AnalyzeDocument
output file.
To classify a document using the prompt safety classifier, use the Text
parameter for input.
Provide the input document as a sequence of base64-encoded bytes. If your code uses an Amazon Web Services SDK to classify documents, the SDK may encode the document file bytes for you.
The maximum length of this field depends on the input document type. For details, see Inputs for real-time custom analysis in the Comprehend Developer Guide.
If you use the Bytes
parameter, do not use the Text
parameter.
public void setDocumentReaderConfig(DocumentReaderConfig documentReaderConfig)
Provides configuration parameters to override the default actions for extracting text from PDF documents and image files.
documentReaderConfig
- Provides configuration parameters to override the default actions for extracting text from PDF documents
and image files.public DocumentReaderConfig getDocumentReaderConfig()
Provides configuration parameters to override the default actions for extracting text from PDF documents and image files.
public ClassifyDocumentRequest withDocumentReaderConfig(DocumentReaderConfig documentReaderConfig)
Provides configuration parameters to override the default actions for extracting text from PDF documents and image files.
documentReaderConfig
- Provides configuration parameters to override the default actions for extracting text from PDF documents
and image files.public String toString()
toString
in class Object
Object.toString()
public ClassifyDocumentRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()