/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Comprehend { namespace Model { /** */ class ClassifyDocumentRequest : public ComprehendRequest { public: AWS_COMPREHEND_API ClassifyDocumentRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ClassifyDocument"; } AWS_COMPREHEND_API Aws::String SerializePayload() const override; AWS_COMPREHEND_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The document text to be analyzed. If you enter text using this parameter, do * not use the Bytes parameter.

*/ inline const Aws::String& GetText() const{ return m_text; } /** *

The document text to be analyzed. If you enter text using this parameter, do * not use the Bytes parameter.

*/ inline bool TextHasBeenSet() const { return m_textHasBeenSet; } /** *

The document text to be analyzed. If you enter text using this parameter, do * not use the Bytes parameter.

*/ inline void SetText(const Aws::String& value) { m_textHasBeenSet = true; m_text = value; } /** *

The document text to be analyzed. If you enter text using this parameter, do * not use the Bytes parameter.

*/ inline void SetText(Aws::String&& value) { m_textHasBeenSet = true; m_text = std::move(value); } /** *

The document text to be analyzed. If you enter text using this parameter, do * not use the Bytes parameter.

*/ inline void SetText(const char* value) { m_textHasBeenSet = true; m_text.assign(value); } /** *

The document text to be analyzed. If you enter text using this parameter, do * not use the Bytes parameter.

*/ inline ClassifyDocumentRequest& WithText(const Aws::String& value) { SetText(value); return *this;} /** *

The document text to be analyzed. If you enter text using this parameter, do * not use the Bytes parameter.

*/ inline ClassifyDocumentRequest& WithText(Aws::String&& value) { SetText(std::move(value)); return *this;} /** *

The document text to be analyzed. If you enter text using this parameter, do * not use the Bytes parameter.

*/ inline ClassifyDocumentRequest& WithText(const char* value) { SetText(value); return *this;} /** *

The Amazon Resource Number (ARN) of the endpoint. For information about * endpoints, see Managing * endpoints.

*/ inline const Aws::String& GetEndpointArn() const{ return m_endpointArn; } /** *

The Amazon Resource Number (ARN) of the endpoint. For information about * endpoints, see Managing * endpoints.

*/ inline bool EndpointArnHasBeenSet() const { return m_endpointArnHasBeenSet; } /** *

The Amazon Resource Number (ARN) of the endpoint. For information about * endpoints, see Managing * endpoints.

*/ inline void SetEndpointArn(const Aws::String& value) { m_endpointArnHasBeenSet = true; m_endpointArn = value; } /** *

The Amazon Resource Number (ARN) of the endpoint. For information about * endpoints, see Managing * endpoints.

*/ inline void SetEndpointArn(Aws::String&& value) { m_endpointArnHasBeenSet = true; m_endpointArn = std::move(value); } /** *

The Amazon Resource Number (ARN) of the endpoint. For information about * endpoints, see Managing * endpoints.

*/ inline void SetEndpointArn(const char* value) { m_endpointArnHasBeenSet = true; m_endpointArn.assign(value); } /** *

The Amazon Resource Number (ARN) of the endpoint. For information about * endpoints, see Managing * endpoints.

*/ inline ClassifyDocumentRequest& WithEndpointArn(const Aws::String& value) { SetEndpointArn(value); return *this;} /** *

The Amazon Resource Number (ARN) of the endpoint. For information about * endpoints, see Managing * endpoints.

*/ inline ClassifyDocumentRequest& WithEndpointArn(Aws::String&& value) { SetEndpointArn(std::move(value)); return *this;} /** *

The Amazon Resource Number (ARN) of the endpoint. For information about * endpoints, see Managing * endpoints.

*/ inline ClassifyDocumentRequest& WithEndpointArn(const char* value) { SetEndpointArn(value); return *this;} /** *

Use the Bytes parameter to input a text, PDF, Word or image * file. You can also use the Bytes parameter to input an Amazon * Textract DetectDocumentText or AnalyzeDocument output * file.

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.

*/ inline const Aws::Utils::ByteBuffer& GetBytes() const{ return m_bytes; } /** *

Use the Bytes parameter to input a text, PDF, Word or image * file. You can also use the Bytes parameter to input an Amazon * Textract DetectDocumentText or AnalyzeDocument output * file.

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.

*/ inline bool BytesHasBeenSet() const { return m_bytesHasBeenSet; } /** *

Use the Bytes parameter to input a text, PDF, Word or image * file. You can also use the Bytes parameter to input an Amazon * Textract DetectDocumentText or AnalyzeDocument output * file.

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.

*/ inline void SetBytes(const Aws::Utils::ByteBuffer& value) { m_bytesHasBeenSet = true; m_bytes = value; } /** *

Use the Bytes parameter to input a text, PDF, Word or image * file. You can also use the Bytes parameter to input an Amazon * Textract DetectDocumentText or AnalyzeDocument output * file.

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.

*/ inline void SetBytes(Aws::Utils::ByteBuffer&& value) { m_bytesHasBeenSet = true; m_bytes = std::move(value); } /** *

Use the Bytes parameter to input a text, PDF, Word or image * file. You can also use the Bytes parameter to input an Amazon * Textract DetectDocumentText or AnalyzeDocument output * file.

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.

*/ inline ClassifyDocumentRequest& WithBytes(const Aws::Utils::ByteBuffer& value) { SetBytes(value); return *this;} /** *

Use the Bytes parameter to input a text, PDF, Word or image * file. You can also use the Bytes parameter to input an Amazon * Textract DetectDocumentText or AnalyzeDocument output * file.

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.

*/ inline ClassifyDocumentRequest& WithBytes(Aws::Utils::ByteBuffer&& value) { SetBytes(std::move(value)); return *this;} /** *

Provides configuration parameters to override the default actions for * extracting text from PDF documents and image files.

*/ inline const DocumentReaderConfig& GetDocumentReaderConfig() const{ return m_documentReaderConfig; } /** *

Provides configuration parameters to override the default actions for * extracting text from PDF documents and image files.

*/ inline bool DocumentReaderConfigHasBeenSet() const { return m_documentReaderConfigHasBeenSet; } /** *

Provides configuration parameters to override the default actions for * extracting text from PDF documents and image files.

*/ inline void SetDocumentReaderConfig(const DocumentReaderConfig& value) { m_documentReaderConfigHasBeenSet = true; m_documentReaderConfig = value; } /** *

Provides configuration parameters to override the default actions for * extracting text from PDF documents and image files.

*/ inline void SetDocumentReaderConfig(DocumentReaderConfig&& value) { m_documentReaderConfigHasBeenSet = true; m_documentReaderConfig = std::move(value); } /** *

Provides configuration parameters to override the default actions for * extracting text from PDF documents and image files.

*/ inline ClassifyDocumentRequest& WithDocumentReaderConfig(const DocumentReaderConfig& value) { SetDocumentReaderConfig(value); return *this;} /** *

Provides configuration parameters to override the default actions for * extracting text from PDF documents and image files.

*/ inline ClassifyDocumentRequest& WithDocumentReaderConfig(DocumentReaderConfig&& value) { SetDocumentReaderConfig(std::move(value)); return *this;} private: Aws::String m_text; bool m_textHasBeenSet = false; Aws::String m_endpointArn; bool m_endpointArnHasBeenSet = false; Aws::Utils::ByteBuffer m_bytes; bool m_bytesHasBeenSet = false; DocumentReaderConfig m_documentReaderConfig; bool m_documentReaderConfigHasBeenSet = false; }; } // namespace Model } // namespace Comprehend } // namespace Aws