/**
* 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
{
/**
* A list of requests that can perform update, put, delete, or check operations
* on multiple items in one or more tables atomically.
See Also:
* AWS
* API Reference
*/
class TransactWriteItem
{
public:
AWS_DYNAMODB_API TransactWriteItem();
AWS_DYNAMODB_API TransactWriteItem(Aws::Utils::Json::JsonView jsonValue);
AWS_DYNAMODB_API TransactWriteItem& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const;
/**
* A request to perform a check item operation.
*/
inline const ConditionCheck& GetConditionCheck() const{ return m_conditionCheck; }
/**
* A request to perform a check item operation.
*/
inline bool ConditionCheckHasBeenSet() const { return m_conditionCheckHasBeenSet; }
/**
* A request to perform a check item operation.
*/
inline void SetConditionCheck(const ConditionCheck& value) { m_conditionCheckHasBeenSet = true; m_conditionCheck = value; }
/**
* A request to perform a check item operation.
*/
inline void SetConditionCheck(ConditionCheck&& value) { m_conditionCheckHasBeenSet = true; m_conditionCheck = std::move(value); }
/**
* A request to perform a check item operation.
*/
inline TransactWriteItem& WithConditionCheck(const ConditionCheck& value) { SetConditionCheck(value); return *this;}
/**
* A request to perform a check item operation.
*/
inline TransactWriteItem& WithConditionCheck(ConditionCheck&& value) { SetConditionCheck(std::move(value)); return *this;}
/**
* A request to perform a PutItem
operation.
*/
inline const Put& GetPut() const{ return m_put; }
/**
* A request to perform a PutItem
operation.
*/
inline bool PutHasBeenSet() const { return m_putHasBeenSet; }
/**
* A request to perform a PutItem
operation.
*/
inline void SetPut(const Put& value) { m_putHasBeenSet = true; m_put = value; }
/**
* A request to perform a PutItem
operation.
*/
inline void SetPut(Put&& value) { m_putHasBeenSet = true; m_put = std::move(value); }
/**
* A request to perform a PutItem
operation.
*/
inline TransactWriteItem& WithPut(const Put& value) { SetPut(value); return *this;}
/**
* A request to perform a PutItem
operation.
*/
inline TransactWriteItem& WithPut(Put&& value) { SetPut(std::move(value)); return *this;}
/**
* A request to perform a DeleteItem
operation.
*/
inline const Delete& GetDelete() const{ return m_delete; }
/**
* A request to perform a DeleteItem
operation.
*/
inline bool DeleteHasBeenSet() const { return m_deleteHasBeenSet; }
/**
* A request to perform a DeleteItem
operation.
*/
inline void SetDelete(const Delete& value) { m_deleteHasBeenSet = true; m_delete = value; }
/**
* A request to perform a DeleteItem
operation.
*/
inline void SetDelete(Delete&& value) { m_deleteHasBeenSet = true; m_delete = std::move(value); }
/**
* A request to perform a DeleteItem
operation.
*/
inline TransactWriteItem& WithDelete(const Delete& value) { SetDelete(value); return *this;}
/**
* A request to perform a DeleteItem
operation.
*/
inline TransactWriteItem& WithDelete(Delete&& value) { SetDelete(std::move(value)); return *this;}
/**
* A request to perform an UpdateItem
operation.
*/
inline const Update& GetUpdate() const{ return m_update; }
/**
* A request to perform an UpdateItem
operation.
*/
inline bool UpdateHasBeenSet() const { return m_updateHasBeenSet; }
/**
* A request to perform an UpdateItem
operation.
*/
inline void SetUpdate(const Update& value) { m_updateHasBeenSet = true; m_update = value; }
/**
* A request to perform an UpdateItem
operation.
*/
inline void SetUpdate(Update&& value) { m_updateHasBeenSet = true; m_update = std::move(value); }
/**
* A request to perform an UpdateItem
operation.
*/
inline TransactWriteItem& WithUpdate(const Update& value) { SetUpdate(value); return *this;}
/**
* A request to perform an UpdateItem
operation.
*/
inline TransactWriteItem& WithUpdate(Update&& value) { SetUpdate(std::move(value)); return *this;}
private:
ConditionCheck m_conditionCheck;
bool m_conditionCheckHasBeenSet = false;
Put m_put;
bool m_putHasBeenSet = false;
Delete m_delete;
bool m_deleteHasBeenSet = false;
Update m_update;
bool m_updateHasBeenSet = false;
};
} // namespace Model
} // namespace DynamoDB
} // namespace Aws