/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Comprehend { namespace Model { /** */ class DetectEntitiesRequest : public ComprehendRequest { public: AWS_COMPREHEND_API DetectEntitiesRequest(); // 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 "DetectEntities"; } AWS_COMPREHEND_API Aws::String SerializePayload() const override; AWS_COMPREHEND_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

A UTF-8 text string. The maximum string size is 100 KB. If you enter text * using this parameter, do not use the Bytes parameter.

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

A UTF-8 text string. The maximum string size is 100 KB. If you enter text * using this parameter, do not use the Bytes parameter.

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

A UTF-8 text string. The maximum string size is 100 KB. 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; } /** *

A UTF-8 text string. The maximum string size is 100 KB. 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); } /** *

A UTF-8 text string. The maximum string size is 100 KB. 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); } /** *

A UTF-8 text string. The maximum string size is 100 KB. If you enter text * using this parameter, do not use the Bytes parameter.

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

A UTF-8 text string. The maximum string size is 100 KB. If you enter text * using this parameter, do not use the Bytes parameter.

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

A UTF-8 text string. The maximum string size is 100 KB. If you enter text * using this parameter, do not use the Bytes parameter.

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

The language of the input documents. You can specify any of the primary * languages supported by Amazon Comprehend. If your request includes the endpoint * for a custom entity recognition model, Amazon Comprehend uses the language of * your custom model, and it ignores any language code that you specify here.

*

All input documents must be in the same language.

*/ inline const LanguageCode& GetLanguageCode() const{ return m_languageCode; } /** *

The language of the input documents. You can specify any of the primary * languages supported by Amazon Comprehend. If your request includes the endpoint * for a custom entity recognition model, Amazon Comprehend uses the language of * your custom model, and it ignores any language code that you specify here.

*

All input documents must be in the same language.

*/ inline bool LanguageCodeHasBeenSet() const { return m_languageCodeHasBeenSet; } /** *

The language of the input documents. You can specify any of the primary * languages supported by Amazon Comprehend. If your request includes the endpoint * for a custom entity recognition model, Amazon Comprehend uses the language of * your custom model, and it ignores any language code that you specify here.

*

All input documents must be in the same language.

*/ inline void SetLanguageCode(const LanguageCode& value) { m_languageCodeHasBeenSet = true; m_languageCode = value; } /** *

The language of the input documents. You can specify any of the primary * languages supported by Amazon Comprehend. If your request includes the endpoint * for a custom entity recognition model, Amazon Comprehend uses the language of * your custom model, and it ignores any language code that you specify here.

*

All input documents must be in the same language.

*/ inline void SetLanguageCode(LanguageCode&& value) { m_languageCodeHasBeenSet = true; m_languageCode = std::move(value); } /** *

The language of the input documents. You can specify any of the primary * languages supported by Amazon Comprehend. If your request includes the endpoint * for a custom entity recognition model, Amazon Comprehend uses the language of * your custom model, and it ignores any language code that you specify here.

*

All input documents must be in the same language.

*/ inline DetectEntitiesRequest& WithLanguageCode(const LanguageCode& value) { SetLanguageCode(value); return *this;} /** *

The language of the input documents. You can specify any of the primary * languages supported by Amazon Comprehend. If your request includes the endpoint * for a custom entity recognition model, Amazon Comprehend uses the language of * your custom model, and it ignores any language code that you specify here.

*

All input documents must be in the same language.

*/ inline DetectEntitiesRequest& WithLanguageCode(LanguageCode&& value) { SetLanguageCode(std::move(value)); return *this;} /** *

The Amazon Resource Name of an endpoint that is associated with a custom * entity recognition model. Provide an endpoint if you want to detect entities by * using your own custom model instead of the default model that is used by Amazon * Comprehend.

If you specify an endpoint, Amazon Comprehend uses the * language of your custom model, and it ignores any language code that you provide * in your request.

For information about endpoints, see Managing * endpoints.

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

The Amazon Resource Name of an endpoint that is associated with a custom * entity recognition model. Provide an endpoint if you want to detect entities by * using your own custom model instead of the default model that is used by Amazon * Comprehend.

If you specify an endpoint, Amazon Comprehend uses the * language of your custom model, and it ignores any language code that you provide * in your request.

For information about endpoints, see Managing * endpoints.

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

The Amazon Resource Name of an endpoint that is associated with a custom * entity recognition model. Provide an endpoint if you want to detect entities by * using your own custom model instead of the default model that is used by Amazon * Comprehend.

If you specify an endpoint, Amazon Comprehend uses the * language of your custom model, and it ignores any language code that you provide * in your request.

For information about endpoints, see Managing * endpoints.

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

The Amazon Resource Name of an endpoint that is associated with a custom * entity recognition model. Provide an endpoint if you want to detect entities by * using your own custom model instead of the default model that is used by Amazon * Comprehend.

If you specify an endpoint, Amazon Comprehend uses the * language of your custom model, and it ignores any language code that you provide * in your request.

For information about endpoints, see Managing * endpoints.

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

The Amazon Resource Name of an endpoint that is associated with a custom * entity recognition model. Provide an endpoint if you want to detect entities by * using your own custom model instead of the default model that is used by Amazon * Comprehend.

If you specify an endpoint, Amazon Comprehend uses the * language of your custom model, and it ignores any language code that you provide * in your request.

For information about endpoints, see Managing * endpoints.

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

The Amazon Resource Name of an endpoint that is associated with a custom * entity recognition model. Provide an endpoint if you want to detect entities by * using your own custom model instead of the default model that is used by Amazon * Comprehend.

If you specify an endpoint, Amazon Comprehend uses the * language of your custom model, and it ignores any language code that you provide * in your request.

For information about endpoints, see Managing * endpoints.

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

The Amazon Resource Name of an endpoint that is associated with a custom * entity recognition model. Provide an endpoint if you want to detect entities by * using your own custom model instead of the default model that is used by Amazon * Comprehend.

If you specify an endpoint, Amazon Comprehend uses the * language of your custom model, and it ignores any language code that you provide * in your request.

For information about endpoints, see Managing * endpoints.

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

The Amazon Resource Name of an endpoint that is associated with a custom * entity recognition model. Provide an endpoint if you want to detect entities by * using your own custom model instead of the default model that is used by Amazon * Comprehend.

If you specify an endpoint, Amazon Comprehend uses the * language of your custom model, and it ignores any language code that you provide * in your request.

For information about endpoints, see Managing * endpoints.

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

This field applies only when you use a custom entity recognition model that * was trained with PDF annotations. For other cases, enter your text input in the * Text field.

Use the Bytes parameter to input a * text, PDF, Word or image file. Using a plain-text file in the Bytes * parameter is equivelent to using the Text parameter (the * Entities field in the response is identical).

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 detect entities, 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; } /** *

This field applies only when you use a custom entity recognition model that * was trained with PDF annotations. For other cases, enter your text input in the * Text field.

Use the Bytes parameter to input a * text, PDF, Word or image file. Using a plain-text file in the Bytes * parameter is equivelent to using the Text parameter (the * Entities field in the response is identical).

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 detect entities, 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; } /** *

This field applies only when you use a custom entity recognition model that * was trained with PDF annotations. For other cases, enter your text input in the * Text field.

Use the Bytes parameter to input a * text, PDF, Word or image file. Using a plain-text file in the Bytes * parameter is equivelent to using the Text parameter (the * Entities field in the response is identical).

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 detect entities, 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; } /** *

This field applies only when you use a custom entity recognition model that * was trained with PDF annotations. For other cases, enter your text input in the * Text field.

Use the Bytes parameter to input a * text, PDF, Word or image file. Using a plain-text file in the Bytes * parameter is equivelent to using the Text parameter (the * Entities field in the response is identical).

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 detect entities, 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); } /** *

This field applies only when you use a custom entity recognition model that * was trained with PDF annotations. For other cases, enter your text input in the * Text field.

Use the Bytes parameter to input a * text, PDF, Word or image file. Using a plain-text file in the Bytes * parameter is equivelent to using the Text parameter (the * Entities field in the response is identical).

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 detect entities, 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 DetectEntitiesRequest& WithBytes(const Aws::Utils::ByteBuffer& value) { SetBytes(value); return *this;} /** *

This field applies only when you use a custom entity recognition model that * was trained with PDF annotations. For other cases, enter your text input in the * Text field.

Use the Bytes parameter to input a * text, PDF, Word or image file. Using a plain-text file in the Bytes * parameter is equivelent to using the Text parameter (the * Entities field in the response is identical).

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 detect entities, 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 DetectEntitiesRequest& 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 DetectEntitiesRequest& 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 DetectEntitiesRequest& WithDocumentReaderConfig(DocumentReaderConfig&& value) { SetDocumentReaderConfig(std::move(value)); return *this;} private: Aws::String m_text; bool m_textHasBeenSet = false; LanguageCode m_languageCode; bool m_languageCodeHasBeenSet = 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