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

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

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

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

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

The text to translate. The text string can be a maximum of 5,000 bytes long. * Depending on your character set, this may be fewer than 5,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 5,000 bytes long. * Depending on your character set, this may be fewer than 5,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 5,000 bytes long. * Depending on your character set, this may be fewer than 5,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 5,000 bytes long. * Depending on your character set, this may be fewer than 5,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 5,000 bytes long. * Depending on your character set, this may be fewer than 5,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 5,000 bytes long. * Depending on your character set, this may be fewer than 5,000 characters.

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

The name of the terminology list file to be used in the TranslateText * request. You can use 1 terminology list at most in a TranslateText * request. Terminology lists can contain a maximum of 256 terms.

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

The name of the terminology list file to be used in the TranslateText * request. You can use 1 terminology list at most in a TranslateText * request. Terminology lists can contain a maximum of 256 terms.

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

The name of the terminology list file to be used in the TranslateText * request. You can use 1 terminology list at most in a TranslateText * request. Terminology lists can contain a maximum of 256 terms.

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

The name of the terminology list file to be used in the TranslateText * request. You can use 1 terminology list at most in a TranslateText * request. Terminology lists can contain a maximum of 256 terms.

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

The name of the terminology list file to be used in the TranslateText * request. You can use 1 terminology list at most in a TranslateText * request. Terminology lists can contain a maximum of 256 terms.

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

The name of the terminology list file to be used in the TranslateText * request. You can use 1 terminology list at most in a TranslateText * request. Terminology lists can contain a maximum of 256 terms.

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

The name of the terminology list file to be used in the TranslateText * request. You can use 1 terminology list at most in a TranslateText * request. Terminology lists can contain a maximum of 256 terms.

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

The name of the terminology list file to be used in the TranslateText * request. You can use 1 terminology list at most in a TranslateText * request. Terminology lists can contain a maximum of 256 terms.

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

The name of the terminology list file to be used in the TranslateText * request. You can use 1 terminology list at most in a TranslateText * request. Terminology lists can contain a maximum of 256 terms.

*/ 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. The language must be a * language supported by Amazon Translate. For a list of language codes, see * what-is-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.

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

The language code for the language of the source text. The language must be a * language supported by Amazon Translate. For a list of language codes, see * what-is-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.

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

The language code for the language of the source text. The language must be a * language supported by Amazon Translate. For a list of language codes, see * what-is-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.

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

The language code for the language of the source text. The language must be a * language supported by Amazon Translate. For a list of language codes, see * what-is-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.

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

The language code for the language of the source text. The language must be a * language supported by Amazon Translate. For a list of language codes, see * what-is-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.

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

The language code for the language of the source text. The language must be a * language supported by Amazon Translate. For a list of language codes, see * what-is-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.

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

The language code for the language of the source text. The language must be a * language supported by Amazon Translate. For a list of language codes, see * what-is-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.

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

The language code for the language of the source text. The language must be a * language supported by Amazon Translate. For a list of language codes, see * what-is-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.

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

The language code requested for the language of the target text. The language * must be a language supported by Amazon Translate.

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

The language code requested for the language of the target text. The language * must be a language supported by Amazon Translate.

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

The language code requested for the language of the target text. The language * must be a language supported by Amazon Translate.

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

The language code requested for the language of the target text. The language * must be a language supported by Amazon Translate.

*/ 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. The language * must be a language supported by Amazon Translate.

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

The language code requested for the language of the target text. The language * must be a language supported by Amazon Translate.

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

The language code requested for the language of the target text. The language * must be a language supported by Amazon Translate.

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

The language code requested for the language of the target text. The language * must be a language supported by Amazon Translate.

*/ inline TranslateTextRequest& WithTargetLanguageCode(const char* value) { SetTargetLanguageCode(value); return *this;} private: Aws::String m_text; bool m_textHasBeenSet; Aws::Vector m_terminologyNames; bool m_terminologyNamesHasBeenSet; Aws::String m_sourceLanguageCode; bool m_sourceLanguageCodeHasBeenSet; Aws::String m_targetLanguageCode; bool m_targetLanguageCodeHasBeenSet; }; } // namespace Model } // namespace Translate } // namespace Aws