/** * 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 Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace NimbleStudio { namespace Model { /** *

One of the parameters in the request is invalid.

See Also:

* AWS * API Reference

*/ class ValidationException { public: AWS_NIMBLESTUDIO_API ValidationException(); AWS_NIMBLESTUDIO_API ValidationException(Aws::Utils::Json::JsonView jsonValue); AWS_NIMBLESTUDIO_API ValidationException& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_NIMBLESTUDIO_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

A more specific error code.

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

A more specific error code.

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

A more specific error code.

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

A more specific error code.

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

A more specific error code.

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

A more specific error code.

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

A more specific error code.

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

A more specific error code.

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

The exception context.

*/ inline const Aws::Map& GetContext() const{ return m_context; } /** *

The exception context.

*/ inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; } /** *

The exception context.

*/ inline void SetContext(const Aws::Map& value) { m_contextHasBeenSet = true; m_context = value; } /** *

The exception context.

*/ inline void SetContext(Aws::Map&& value) { m_contextHasBeenSet = true; m_context = std::move(value); } /** *

The exception context.

*/ inline ValidationException& WithContext(const Aws::Map& value) { SetContext(value); return *this;} /** *

The exception context.

*/ inline ValidationException& WithContext(Aws::Map&& value) { SetContext(std::move(value)); return *this;} /** *

The exception context.

*/ inline ValidationException& AddContext(const Aws::String& key, const Aws::String& value) { m_contextHasBeenSet = true; m_context.emplace(key, value); return *this; } /** *

The exception context.

*/ inline ValidationException& AddContext(Aws::String&& key, const Aws::String& value) { m_contextHasBeenSet = true; m_context.emplace(std::move(key), value); return *this; } /** *

The exception context.

*/ inline ValidationException& AddContext(const Aws::String& key, Aws::String&& value) { m_contextHasBeenSet = true; m_context.emplace(key, std::move(value)); return *this; } /** *

The exception context.

*/ inline ValidationException& AddContext(Aws::String&& key, Aws::String&& value) { m_contextHasBeenSet = true; m_context.emplace(std::move(key), std::move(value)); return *this; } /** *

The exception context.

*/ inline ValidationException& AddContext(const char* key, Aws::String&& value) { m_contextHasBeenSet = true; m_context.emplace(key, std::move(value)); return *this; } /** *

The exception context.

*/ inline ValidationException& AddContext(Aws::String&& key, const char* value) { m_contextHasBeenSet = true; m_context.emplace(std::move(key), value); return *this; } /** *

The exception context.

*/ inline ValidationException& AddContext(const char* key, const char* value) { m_contextHasBeenSet = true; m_context.emplace(key, value); return *this; } /** *

A human-readable description of the error.

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

A human-readable description of the error.

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

A human-readable description of the error.

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

A human-readable description of the error.

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

A human-readable description of the error.

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

A human-readable description of the error.

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

A human-readable description of the error.

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

A human-readable description of the error.

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