/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Translate { namespace Model { /** *

Amazon Translate does not support translation from the language of the source * text into the requested target language. For more information, see Supported * languages.

See Also:

AWS * API Reference

*/ class UnsupportedLanguagePairException { public: AWS_TRANSLATE_API UnsupportedLanguagePairException(); AWS_TRANSLATE_API UnsupportedLanguagePairException(Aws::Utils::Json::JsonView jsonValue); AWS_TRANSLATE_API UnsupportedLanguagePairException& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_TRANSLATE_API Aws::Utils::Json::JsonValue Jsonize() const; inline const Aws::String& GetMessage() const{ return m_message; } inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } inline UnsupportedLanguagePairException& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} inline UnsupportedLanguagePairException& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} inline UnsupportedLanguagePairException& WithMessage(const char* value) { SetMessage(value); return *this;} /** *

The language code for the language of the input text.

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

The language code for the language of the input text.

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

The language code for the language of the input text.

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

The language code for the language of the input text.

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

The language code for the language of the input text.

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

The language code for the language of the input text.

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

The language code for the language of the input text.

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

The language code for the language of the input text.

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

The language code for the language of the translated text.

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

The language code for the language of the translated text.

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

The language code for the language of the translated text.

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

The language code for the language of the translated text.

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

The language code for the language of the translated text.

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

The language code for the language of the translated text.

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

The language code for the language of the translated text.

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

The language code for the language of the translated text.

*/ inline UnsupportedLanguagePairException& WithTargetLanguageCode(const char* value) { SetTargetLanguageCode(value); return *this;} private: Aws::String m_message; bool m_messageHasBeenSet = false; Aws::String m_sourceLanguageCode; bool m_sourceLanguageCodeHasBeenSet = false; Aws::String m_targetLanguageCode; bool m_targetLanguageCodeHasBeenSet = false; }; } // namespace Model } // namespace Translate } // namespace Aws