/** * 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 Translate { namespace Model { /** */ class TranslateTextRequest : public TranslateRequest { public: AWS_TRANSLATE_API TranslateTextRequest(); // 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 "TranslateText"; } AWS_TRANSLATE_API Aws::String SerializePayload() const override; AWS_TRANSLATE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The text to translate. The text string can be a maximum of 10,000 bytes long. * Depending on your character set, this may be fewer than 10,000 characters.

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

The text to translate. The text string can be a maximum of 10,000 bytes long. * Depending on your character set, this may be fewer than 10,000 characters.

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

The text to translate. The text string can be a maximum of 10,000 bytes long. * Depending on your character set, this may be fewer than 10,000 characters.

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

The text to translate. The text string can be a maximum of 10,000 bytes long. * Depending on your character set, this may be fewer than 10,000 characters.

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

The text to translate. The text string can be a maximum of 10,000 bytes long. * Depending on your character set, this may be fewer than 10,000 characters.

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

The text to translate. The text string can be a maximum of 10,000 bytes long. * Depending on your character set, this may be fewer than 10,000 characters.

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

The text to translate. The text string can be a maximum of 10,000 bytes long. * Depending on your character set, this may be fewer than 10,000 characters.

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

The text to translate. The text string can be a maximum of 10,000 bytes long. * Depending on your character set, this may be fewer than 10,000 characters.

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

The name of a terminology list file to add to the translation job. This file * provides source terms and the desired translation for each term. A terminology * list can contain a maximum of 256 terms. You can use one custom terminology * resource in your translation request.

Use the ListTerminologies * operation to get the available terminology lists.

For more information * about custom terminology lists, see Custom * terminology.

*/ inline const Aws::Vector& GetTerminologyNames() const{ return m_terminologyNames; } /** *

The name of a terminology list file to add to the translation job. This file * provides source terms and the desired translation for each term. A terminology * list can contain a maximum of 256 terms. You can use one custom terminology * resource in your translation request.

Use the ListTerminologies * operation to get the available terminology lists.

For more information * about custom terminology lists, see Custom * terminology.

*/ inline bool TerminologyNamesHasBeenSet() const { return m_terminologyNamesHasBeenSet; } /** *

The name of a terminology list file to add to the translation job. This file * provides source terms and the desired translation for each term. A terminology * list can contain a maximum of 256 terms. You can use one custom terminology * resource in your translation request.

Use the ListTerminologies * operation to get the available terminology lists.

For more information * about custom terminology lists, see Custom * terminology.

*/ inline void SetTerminologyNames(const Aws::Vector& value) { m_terminologyNamesHasBeenSet = true; m_terminologyNames = value; } /** *

The name of a terminology list file to add to the translation job. This file * provides source terms and the desired translation for each term. A terminology * list can contain a maximum of 256 terms. You can use one custom terminology * resource in your translation request.

Use the ListTerminologies * operation to get the available terminology lists.

For more information * about custom terminology lists, see Custom * terminology.

*/ inline void SetTerminologyNames(Aws::Vector&& value) { m_terminologyNamesHasBeenSet = true; m_terminologyNames = std::move(value); } /** *

The name of a terminology list file to add to the translation job. This file * provides source terms and the desired translation for each term. A terminology * list can contain a maximum of 256 terms. You can use one custom terminology * resource in your translation request.

Use the ListTerminologies * operation to get the available terminology lists.

For more information * about custom terminology lists, see Custom * terminology.

*/ inline TranslateTextRequest& WithTerminologyNames(const Aws::Vector& value) { SetTerminologyNames(value); return *this;} /** *

The name of a terminology list file to add to the translation job. This file * provides source terms and the desired translation for each term. A terminology * list can contain a maximum of 256 terms. You can use one custom terminology * resource in your translation request.

Use the ListTerminologies * operation to get the available terminology lists.

For more information * about custom terminology lists, see Custom * terminology.

*/ inline TranslateTextRequest& WithTerminologyNames(Aws::Vector&& value) { SetTerminologyNames(std::move(value)); return *this;} /** *

The name of a terminology list file to add to the translation job. This file * provides source terms and the desired translation for each term. A terminology * list can contain a maximum of 256 terms. You can use one custom terminology * resource in your translation request.

Use the ListTerminologies * operation to get the available terminology lists.

For more information * about custom terminology lists, see Custom * terminology.

*/ inline TranslateTextRequest& AddTerminologyNames(const Aws::String& value) { m_terminologyNamesHasBeenSet = true; m_terminologyNames.push_back(value); return *this; } /** *

The name of a terminology list file to add to the translation job. This file * provides source terms and the desired translation for each term. A terminology * list can contain a maximum of 256 terms. You can use one custom terminology * resource in your translation request.

Use the ListTerminologies * operation to get the available terminology lists.

For more information * about custom terminology lists, see Custom * terminology.

*/ inline TranslateTextRequest& AddTerminologyNames(Aws::String&& value) { m_terminologyNamesHasBeenSet = true; m_terminologyNames.push_back(std::move(value)); return *this; } /** *

The name of a terminology list file to add to the translation job. This file * provides source terms and the desired translation for each term. A terminology * list can contain a maximum of 256 terms. You can use one custom terminology * resource in your translation request.

Use the ListTerminologies * operation to get the available terminology lists.

For more information * about custom terminology lists, see Custom * terminology.

*/ inline TranslateTextRequest& AddTerminologyNames(const char* value) { m_terminologyNamesHasBeenSet = true; m_terminologyNames.push_back(value); return *this; } /** *

The language code for the language of the source text. For a list of language * codes, see Supported * languages.

To have Amazon Translate determine the source language of * your text, you can specify auto in the * SourceLanguageCode field. If you specify auto, Amazon * Translate will call Amazon * Comprehend to determine the source language.

If you specify * auto, you must send the TranslateText request in a * region that supports Amazon Comprehend. Otherwise, the request returns an error * indicating that autodetect is not supported.

*/ inline const Aws::String& GetSourceLanguageCode() const{ return m_sourceLanguageCode; } /** *

The language code for the language of the source text. For a list of language * codes, see Supported * languages.

To have Amazon Translate determine the source language of * your text, you can specify auto in the * SourceLanguageCode field. If you specify auto, Amazon * Translate will call Amazon * Comprehend to determine the source language.

If you specify * auto, you must send the TranslateText request in a * region that supports Amazon Comprehend. Otherwise, the request returns an error * indicating that autodetect is not supported.

*/ inline bool SourceLanguageCodeHasBeenSet() const { return m_sourceLanguageCodeHasBeenSet; } /** *

The language code for the language of the source text. For a list of language * codes, see Supported * languages.

To have Amazon Translate determine the source language of * your text, you can specify auto in the * SourceLanguageCode field. If you specify auto, Amazon * Translate will call Amazon * Comprehend to determine the source language.

If you specify * auto, you must send the TranslateText request in a * region that supports Amazon Comprehend. Otherwise, the request returns an error * indicating that autodetect is not supported.

*/ inline void SetSourceLanguageCode(const Aws::String& value) { m_sourceLanguageCodeHasBeenSet = true; m_sourceLanguageCode = value; } /** *

The language code for the language of the source text. For a list of language * codes, see Supported * languages.

To have Amazon Translate determine the source language of * your text, you can specify auto in the * SourceLanguageCode field. If you specify auto, Amazon * Translate will call Amazon * Comprehend to determine the source language.

If you specify * auto, you must send the TranslateText request in a * region that supports Amazon Comprehend. Otherwise, the request returns an error * indicating that autodetect is not supported.

*/ inline void SetSourceLanguageCode(Aws::String&& value) { m_sourceLanguageCodeHasBeenSet = true; m_sourceLanguageCode = std::move(value); } /** *

The language code for the language of the source text. For a list of language * codes, see Supported * languages.

To have Amazon Translate determine the source language of * your text, you can specify auto in the * SourceLanguageCode field. If you specify auto, Amazon * Translate will call Amazon * Comprehend to determine the source language.

If you specify * auto, you must send the TranslateText request in a * region that supports Amazon Comprehend. Otherwise, the request returns an error * indicating that autodetect is not supported.

*/ inline void SetSourceLanguageCode(const char* value) { m_sourceLanguageCodeHasBeenSet = true; m_sourceLanguageCode.assign(value); } /** *

The language code for the language of the source text. For a list of language * codes, see Supported * languages.

To have Amazon Translate determine the source language of * your text, you can specify auto in the * SourceLanguageCode field. If you specify auto, Amazon * Translate will call Amazon * Comprehend to determine the source language.

If you specify * auto, you must send the TranslateText request in a * region that supports Amazon Comprehend. Otherwise, the request returns an error * indicating that autodetect is not supported.

*/ inline TranslateTextRequest& WithSourceLanguageCode(const Aws::String& value) { SetSourceLanguageCode(value); return *this;} /** *

The language code for the language of the source text. For a list of language * codes, see Supported * languages.

To have Amazon Translate determine the source language of * your text, you can specify auto in the * SourceLanguageCode field. If you specify auto, Amazon * Translate will call Amazon * Comprehend to determine the source language.

If you specify * auto, you must send the TranslateText request in a * region that supports Amazon Comprehend. Otherwise, the request returns an error * indicating that autodetect is not supported.

*/ inline TranslateTextRequest& WithSourceLanguageCode(Aws::String&& value) { SetSourceLanguageCode(std::move(value)); return *this;} /** *

The language code for the language of the source text. For a list of language * codes, see Supported * languages.

To have Amazon Translate determine the source language of * your text, you can specify auto in the * SourceLanguageCode field. If you specify auto, Amazon * Translate will call Amazon * Comprehend to determine the source language.

If you specify * auto, you must send the TranslateText request in a * region that supports Amazon Comprehend. Otherwise, the request returns an error * indicating that autodetect is not supported.

*/ inline TranslateTextRequest& WithSourceLanguageCode(const char* value) { SetSourceLanguageCode(value); return *this;} /** *

The language code requested for the language of the target text. For a list * of language codes, see Supported * languages.

*/ inline const Aws::String& GetTargetLanguageCode() const{ return m_targetLanguageCode; } /** *

The language code requested for the language of the target text. For a list * of language codes, see Supported * languages.

*/ inline bool TargetLanguageCodeHasBeenSet() const { return m_targetLanguageCodeHasBeenSet; } /** *

The language code requested for the language of the target text. For a list * of language codes, see Supported * languages.

*/ inline void SetTargetLanguageCode(const Aws::String& value) { m_targetLanguageCodeHasBeenSet = true; m_targetLanguageCode = value; } /** *

The language code requested for the language of the target text. For a list * of language codes, see Supported * languages.

*/ inline void SetTargetLanguageCode(Aws::String&& value) { m_targetLanguageCodeHasBeenSet = true; m_targetLanguageCode = std::move(value); } /** *

The language code requested for the language of the target text. For a list * of language codes, see Supported * languages.

*/ inline void SetTargetLanguageCode(const char* value) { m_targetLanguageCodeHasBeenSet = true; m_targetLanguageCode.assign(value); } /** *

The language code requested for the language of the target text. For a list * of language codes, see Supported * languages.

*/ inline TranslateTextRequest& WithTargetLanguageCode(const Aws::String& value) { SetTargetLanguageCode(value); return *this;} /** *

The language code requested for the language of the target text. For a list * of language codes, see Supported * languages.

*/ inline TranslateTextRequest& WithTargetLanguageCode(Aws::String&& value) { SetTargetLanguageCode(std::move(value)); return *this;} /** *

The language code requested for the language of the target text. For a list * of language codes, see Supported * languages.

*/ inline TranslateTextRequest& WithTargetLanguageCode(const char* value) { SetTargetLanguageCode(value); return *this;} /** *

Settings to configure your translation output, including the option to set * the formality level of the output text and the option to mask profane words and * phrases.

*/ inline const TranslationSettings& GetSettings() const{ return m_settings; } /** *

Settings to configure your translation output, including the option to set * the formality level of the output text and the option to mask profane words and * phrases.

*/ inline bool SettingsHasBeenSet() const { return m_settingsHasBeenSet; } /** *

Settings to configure your translation output, including the option to set * the formality level of the output text and the option to mask profane words and * phrases.

*/ inline void SetSettings(const TranslationSettings& value) { m_settingsHasBeenSet = true; m_settings = value; } /** *

Settings to configure your translation output, including the option to set * the formality level of the output text and the option to mask profane words and * phrases.

*/ inline void SetSettings(TranslationSettings&& value) { m_settingsHasBeenSet = true; m_settings = std::move(value); } /** *

Settings to configure your translation output, including the option to set * the formality level of the output text and the option to mask profane words and * phrases.

*/ inline TranslateTextRequest& WithSettings(const TranslationSettings& value) { SetSettings(value); return *this;} /** *

Settings to configure your translation output, including the option to set * the formality level of the output text and the option to mask profane words and * phrases.

*/ inline TranslateTextRequest& WithSettings(TranslationSettings&& value) { SetSettings(std::move(value)); return *this;} private: Aws::String m_text; bool m_textHasBeenSet = false; Aws::Vector m_terminologyNames; bool m_terminologyNamesHasBeenSet = false; Aws::String m_sourceLanguageCode; bool m_sourceLanguageCodeHasBeenSet = false; Aws::String m_targetLanguageCode; bool m_targetLanguageCodeHasBeenSet = false; TranslationSettings m_settings; bool m_settingsHasBeenSet = false; }; } // namespace Model } // namespace Translate } // namespace Aws