/** * 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 CloudDirectory { namespace Model { /** *

The batch read exception structure, which contains the exception type and * message.

See Also:

AWS * API Reference

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

A type of exception, such as InvalidArnException.

*/ inline const BatchReadExceptionType& GetType() const{ return m_type; } /** *

A type of exception, such as InvalidArnException.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

A type of exception, such as InvalidArnException.

*/ inline void SetType(const BatchReadExceptionType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

A type of exception, such as InvalidArnException.

*/ inline void SetType(BatchReadExceptionType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

A type of exception, such as InvalidArnException.

*/ inline BatchReadException& WithType(const BatchReadExceptionType& value) { SetType(value); return *this;} /** *

A type of exception, such as InvalidArnException.

*/ inline BatchReadException& WithType(BatchReadExceptionType&& value) { SetType(std::move(value)); return *this;} /** *

An exception message that is associated with the failure.

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

An exception message that is associated with the failure.

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

An exception message that is associated with the failure.

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

An exception message that is associated with the failure.

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

An exception message that is associated with the failure.

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

An exception message that is associated with the failure.

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

An exception message that is associated with the failure.

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

An exception message that is associated with the failure.

*/ inline BatchReadException& WithMessage(const char* value) { SetMessage(value); return *this;} private: BatchReadExceptionType m_type; bool m_typeHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; }; } // namespace Model } // namespace CloudDirectory } // namespace Aws