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

An ordered list of errors for each item in the request which caused the * transaction to get cancelled. The values of the list are ordered according to * the ordering of the TransactWriteItems request parameter. If no * error occurred for the associated item an error with a Null code and Null * message will be present.

See Also:

AWS * API Reference

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

Item in the request which caused the transaction to get cancelled.

*/ inline const Aws::Map& GetItem() const{ return m_item; } /** *

Item in the request which caused the transaction to get cancelled.

*/ inline bool ItemHasBeenSet() const { return m_itemHasBeenSet; } /** *

Item in the request which caused the transaction to get cancelled.

*/ inline void SetItem(const Aws::Map& value) { m_itemHasBeenSet = true; m_item = value; } /** *

Item in the request which caused the transaction to get cancelled.

*/ inline void SetItem(Aws::Map&& value) { m_itemHasBeenSet = true; m_item = std::move(value); } /** *

Item in the request which caused the transaction to get cancelled.

*/ inline CancellationReason& WithItem(const Aws::Map& value) { SetItem(value); return *this;} /** *

Item in the request which caused the transaction to get cancelled.

*/ inline CancellationReason& WithItem(Aws::Map&& value) { SetItem(std::move(value)); return *this;} /** *

Item in the request which caused the transaction to get cancelled.

*/ inline CancellationReason& AddItem(const Aws::String& key, const AttributeValue& value) { m_itemHasBeenSet = true; m_item.emplace(key, value); return *this; } /** *

Item in the request which caused the transaction to get cancelled.

*/ inline CancellationReason& AddItem(Aws::String&& key, const AttributeValue& value) { m_itemHasBeenSet = true; m_item.emplace(std::move(key), value); return *this; } /** *

Item in the request which caused the transaction to get cancelled.

*/ inline CancellationReason& AddItem(const Aws::String& key, AttributeValue&& value) { m_itemHasBeenSet = true; m_item.emplace(key, std::move(value)); return *this; } /** *

Item in the request which caused the transaction to get cancelled.

*/ inline CancellationReason& AddItem(Aws::String&& key, AttributeValue&& value) { m_itemHasBeenSet = true; m_item.emplace(std::move(key), std::move(value)); return *this; } /** *

Item in the request which caused the transaction to get cancelled.

*/ inline CancellationReason& AddItem(const char* key, AttributeValue&& value) { m_itemHasBeenSet = true; m_item.emplace(key, std::move(value)); return *this; } /** *

Item in the request which caused the transaction to get cancelled.

*/ inline CancellationReason& AddItem(const char* key, const AttributeValue& value) { m_itemHasBeenSet = true; m_item.emplace(key, value); return *this; } /** *

Status code for the result of the cancelled transaction.

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

Status code for the result of the cancelled transaction.

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

Status code for the result of the cancelled transaction.

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

Status code for the result of the cancelled transaction.

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

Status code for the result of the cancelled transaction.

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

Status code for the result of the cancelled transaction.

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

Status code for the result of the cancelled transaction.

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

Status code for the result of the cancelled transaction.

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

Cancellation reason message description.

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

Cancellation reason message description.

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

Cancellation reason message description.

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

Cancellation reason message description.

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

Cancellation reason message description.

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

Cancellation reason message description.

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

Cancellation reason message description.

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

Cancellation reason message description.

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