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

An error associated with a statement in a PartiQL batch that was run. *

See Also:

AWS * API Reference

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

The error code associated with the failed PartiQL batch statement.

*/ inline const BatchStatementErrorCodeEnum& GetCode() const{ return m_code; } /** *

The error code associated with the failed PartiQL batch statement.

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

The error code associated with the failed PartiQL batch statement.

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

The error code associated with the failed PartiQL batch statement.

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

The error code associated with the failed PartiQL batch statement.

*/ inline BatchStatementError& WithCode(const BatchStatementErrorCodeEnum& value) { SetCode(value); return *this;} /** *

The error code associated with the failed PartiQL batch statement.

*/ inline BatchStatementError& WithCode(BatchStatementErrorCodeEnum&& value) { SetCode(std::move(value)); return *this;} /** *

The error message associated with the PartiQL batch response.

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

The error message associated with the PartiQL batch response.

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

The error message associated with the PartiQL batch response.

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

The error message associated with the PartiQL batch response.

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

The error message associated with the PartiQL batch response.

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

The error message associated with the PartiQL batch response.

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

The error message associated with the PartiQL batch response.

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

The error message associated with the PartiQL batch response.

*/ inline BatchStatementError& WithMessage(const char* value) { SetMessage(value); return *this;} /** *

The item which caused the condition check to fail. This will be set if * ReturnValuesOnConditionCheckFailure is specified as ALL_OLD.

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

The item which caused the condition check to fail. This will be set if * ReturnValuesOnConditionCheckFailure is specified as ALL_OLD.

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

The item which caused the condition check to fail. This will be set if * ReturnValuesOnConditionCheckFailure is specified as ALL_OLD.

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

The item which caused the condition check to fail. This will be set if * ReturnValuesOnConditionCheckFailure is specified as ALL_OLD.

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

The item which caused the condition check to fail. This will be set if * ReturnValuesOnConditionCheckFailure is specified as ALL_OLD.

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

The item which caused the condition check to fail. This will be set if * ReturnValuesOnConditionCheckFailure is specified as ALL_OLD.

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

The item which caused the condition check to fail. This will be set if * ReturnValuesOnConditionCheckFailure is specified as ALL_OLD.

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

The item which caused the condition check to fail. This will be set if * ReturnValuesOnConditionCheckFailure is specified as ALL_OLD.

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

The item which caused the condition check to fail. This will be set if * ReturnValuesOnConditionCheckFailure is specified as ALL_OLD.

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

The item which caused the condition check to fail. This will be set if * ReturnValuesOnConditionCheckFailure is specified as ALL_OLD.

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

The item which caused the condition check to fail. This will be set if * ReturnValuesOnConditionCheckFailure is specified as ALL_OLD.

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

The item which caused the condition check to fail. This will be set if * ReturnValuesOnConditionCheckFailure is specified as ALL_OLD.

*/ inline BatchStatementError& AddItem(const char* key, const AttributeValue& value) { m_itemHasBeenSet = true; m_item.emplace(key, value); return *this; } private: BatchStatementErrorCodeEnum m_code; bool m_codeHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; Aws::Map m_item; bool m_itemHasBeenSet = false; }; } // namespace Model } // namespace DynamoDB } // namespace Aws