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

The error code and error message that is returned for a parameter or * parameter combination that is not valid when a new launch template or new * version of a launch template is created.

See Also:

AWS * API Reference

*/ class ValidationError { public: AWS_EC2_API ValidationError(); AWS_EC2_API ValidationError(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API ValidationError& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The error code that indicates why the parameter or parameter combination is * not valid. For more information about error codes, see Error * codes.

*/ inline const Aws::String& GetCode() const{ return m_code; } /** *

The error code that indicates why the parameter or parameter combination is * not valid. For more information about error codes, see Error * codes.

*/ inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; } /** *

The error code that indicates why the parameter or parameter combination is * not valid. For more information about error codes, see Error * codes.

*/ inline void SetCode(const Aws::String& value) { m_codeHasBeenSet = true; m_code = value; } /** *

The error code that indicates why the parameter or parameter combination is * not valid. For more information about error codes, see Error * codes.

*/ inline void SetCode(Aws::String&& value) { m_codeHasBeenSet = true; m_code = std::move(value); } /** *

The error code that indicates why the parameter or parameter combination is * not valid. For more information about error codes, see Error * codes.

*/ inline void SetCode(const char* value) { m_codeHasBeenSet = true; m_code.assign(value); } /** *

The error code that indicates why the parameter or parameter combination is * not valid. For more information about error codes, see Error * codes.

*/ inline ValidationError& WithCode(const Aws::String& value) { SetCode(value); return *this;} /** *

The error code that indicates why the parameter or parameter combination is * not valid. For more information about error codes, see Error * codes.

*/ inline ValidationError& WithCode(Aws::String&& value) { SetCode(std::move(value)); return *this;} /** *

The error code that indicates why the parameter or parameter combination is * not valid. For more information about error codes, see Error * codes.

*/ inline ValidationError& WithCode(const char* value) { SetCode(value); return *this;} /** *

The error message that describes why the parameter or parameter combination * is not valid. For more information about error messages, see Error * codes.

*/ inline const Aws::String& GetMessage() const{ return m_message; } /** *

The error message that describes why the parameter or parameter combination * is not valid. For more information about error messages, see Error * codes.

*/ inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } /** *

The error message that describes why the parameter or parameter combination * is not valid. For more information about error messages, see Error * codes.

*/ inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } /** *

The error message that describes why the parameter or parameter combination * is not valid. For more information about error messages, see Error * codes.

*/ inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } /** *

The error message that describes why the parameter or parameter combination * is not valid. For more information about error messages, see Error * codes.

*/ inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } /** *

The error message that describes why the parameter or parameter combination * is not valid. For more information about error messages, see Error * codes.

*/ inline ValidationError& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} /** *

The error message that describes why the parameter or parameter combination * is not valid. For more information about error messages, see Error * codes.

*/ inline ValidationError& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} /** *

The error message that describes why the parameter or parameter combination * is not valid. For more information about error messages, see Error * codes.

*/ inline ValidationError& WithMessage(const char* value) { SetMessage(value); return *this;} private: Aws::String m_code; bool m_codeHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws