AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
ConditionCheck.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/dynamodb/DynamoDB_EXPORTS.h>
10#include <aws/dynamodb/model/AttributeValue.h>
11#include <aws/dynamodb/model/ReturnValuesOnConditionCheckFailure.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace DynamoDB {
23namespace Model {
24
32 public:
33 AWS_DYNAMODB_API ConditionCheck() = default;
34 AWS_DYNAMODB_API ConditionCheck(Aws::Utils::Json::JsonView jsonValue);
36 AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
43 inline const Aws::Map<Aws::String, AttributeValue>& GetKey() const { return m_key; }
44 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
45 template <typename KeyT = Aws::Map<Aws::String, AttributeValue>>
46 void SetKey(KeyT&& value) {
47 m_keyHasBeenSet = true;
48 m_key = std::forward<KeyT>(value);
49 }
50 template <typename KeyT = Aws::Map<Aws::String, AttributeValue>>
51 ConditionCheck& WithKey(KeyT&& value) {
52 SetKey(std::forward<KeyT>(value));
53 return *this;
54 }
55 template <typename KeyKeyT = Aws::String, typename KeyValueT = AttributeValue>
56 ConditionCheck& AddKey(KeyKeyT&& key, KeyValueT&& value) {
57 m_keyHasBeenSet = true;
58 m_key.emplace(std::forward<KeyKeyT>(key), std::forward<KeyValueT>(value));
59 return *this;
60 }
62
64
68 inline const Aws::String& GetTableName() const { return m_tableName; }
69 inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
70 template <typename TableNameT = Aws::String>
71 void SetTableName(TableNameT&& value) {
72 m_tableNameHasBeenSet = true;
73 m_tableName = std::forward<TableNameT>(value);
74 }
75 template <typename TableNameT = Aws::String>
76 ConditionCheck& WithTableName(TableNameT&& value) {
77 SetTableName(std::forward<TableNameT>(value));
78 return *this;
79 }
81
83
89 inline const Aws::String& GetConditionExpression() const { return m_conditionExpression; }
90 inline bool ConditionExpressionHasBeenSet() const { return m_conditionExpressionHasBeenSet; }
91 template <typename ConditionExpressionT = Aws::String>
92 void SetConditionExpression(ConditionExpressionT&& value) {
93 m_conditionExpressionHasBeenSet = true;
94 m_conditionExpression = std::forward<ConditionExpressionT>(value);
95 }
96 template <typename ConditionExpressionT = Aws::String>
97 ConditionCheck& WithConditionExpression(ConditionExpressionT&& value) {
98 SetConditionExpression(std::forward<ConditionExpressionT>(value));
99 return *this;
100 }
102
104
110 inline const Aws::Map<Aws::String, Aws::String>& GetExpressionAttributeNames() const { return m_expressionAttributeNames; }
111 inline bool ExpressionAttributeNamesHasBeenSet() const { return m_expressionAttributeNamesHasBeenSet; }
112 template <typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
113 void SetExpressionAttributeNames(ExpressionAttributeNamesT&& value) {
114 m_expressionAttributeNamesHasBeenSet = true;
115 m_expressionAttributeNames = std::forward<ExpressionAttributeNamesT>(value);
116 }
117 template <typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
118 ConditionCheck& WithExpressionAttributeNames(ExpressionAttributeNamesT&& value) {
119 SetExpressionAttributeNames(std::forward<ExpressionAttributeNamesT>(value));
120 return *this;
121 }
122 template <typename ExpressionAttributeNamesKeyT = Aws::String, typename ExpressionAttributeNamesValueT = Aws::String>
123 ConditionCheck& AddExpressionAttributeNames(ExpressionAttributeNamesKeyT&& key, ExpressionAttributeNamesValueT&& value) {
124 m_expressionAttributeNamesHasBeenSet = true;
125 m_expressionAttributeNames.emplace(std::forward<ExpressionAttributeNamesKeyT>(key),
126 std::forward<ExpressionAttributeNamesValueT>(value));
127 return *this;
128 }
130
132
138 inline const Aws::Map<Aws::String, AttributeValue>& GetExpressionAttributeValues() const { return m_expressionAttributeValues; }
139 inline bool ExpressionAttributeValuesHasBeenSet() const { return m_expressionAttributeValuesHasBeenSet; }
140 template <typename ExpressionAttributeValuesT = Aws::Map<Aws::String, AttributeValue>>
141 void SetExpressionAttributeValues(ExpressionAttributeValuesT&& value) {
142 m_expressionAttributeValuesHasBeenSet = true;
143 m_expressionAttributeValues = std::forward<ExpressionAttributeValuesT>(value);
144 }
145 template <typename ExpressionAttributeValuesT = Aws::Map<Aws::String, AttributeValue>>
146 ConditionCheck& WithExpressionAttributeValues(ExpressionAttributeValuesT&& value) {
147 SetExpressionAttributeValues(std::forward<ExpressionAttributeValuesT>(value));
148 return *this;
149 }
150 template <typename ExpressionAttributeValuesKeyT = Aws::String, typename ExpressionAttributeValuesValueT = AttributeValue>
151 ConditionCheck& AddExpressionAttributeValues(ExpressionAttributeValuesKeyT&& key, ExpressionAttributeValuesValueT&& value) {
152 m_expressionAttributeValuesHasBeenSet = true;
153 m_expressionAttributeValues.emplace(std::forward<ExpressionAttributeValuesKeyT>(key),
154 std::forward<ExpressionAttributeValuesValueT>(value));
155 return *this;
156 }
158
160
167 return m_returnValuesOnConditionCheckFailure;
168 }
169 inline bool ReturnValuesOnConditionCheckFailureHasBeenSet() const { return m_returnValuesOnConditionCheckFailureHasBeenSet; }
171 m_returnValuesOnConditionCheckFailureHasBeenSet = true;
172 m_returnValuesOnConditionCheckFailure = value;
173 }
176 return *this;
177 }
179 private:
181
182 Aws::String m_tableName;
183
184 Aws::String m_conditionExpression;
185
186 Aws::Map<Aws::String, Aws::String> m_expressionAttributeNames;
187
188 Aws::Map<Aws::String, AttributeValue> m_expressionAttributeValues;
189
191 bool m_keyHasBeenSet = false;
192 bool m_tableNameHasBeenSet = false;
193 bool m_conditionExpressionHasBeenSet = false;
194 bool m_expressionAttributeNamesHasBeenSet = false;
195 bool m_expressionAttributeValuesHasBeenSet = false;
196 bool m_returnValuesOnConditionCheckFailureHasBeenSet = false;
197};
198
199} // namespace Model
200} // namespace DynamoDB
201} // namespace Aws
ConditionCheck & AddExpressionAttributeNames(ExpressionAttributeNamesKeyT &&key, ExpressionAttributeNamesValueT &&value)
ConditionCheck & AddExpressionAttributeValues(ExpressionAttributeValuesKeyT &&key, ExpressionAttributeValuesValueT &&value)
ConditionCheck & WithReturnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure value)
const Aws::String & GetTableName() const
ConditionCheck & WithKey(KeyT &&value)
AWS_DYNAMODB_API ConditionCheck(Aws::Utils::Json::JsonView jsonValue)
AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const
void SetTableName(TableNameT &&value)
void SetReturnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure value)
ConditionCheck & WithTableName(TableNameT &&value)
ConditionCheck & WithConditionExpression(ConditionExpressionT &&value)
void SetExpressionAttributeNames(ExpressionAttributeNamesT &&value)
AWS_DYNAMODB_API ConditionCheck & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_DYNAMODB_API ConditionCheck()=default
void SetExpressionAttributeValues(ExpressionAttributeValuesT &&value)
const Aws::Map< Aws::String, Aws::String > & GetExpressionAttributeNames() const
ConditionCheck & WithExpressionAttributeNames(ExpressionAttributeNamesT &&value)
ConditionCheck & AddKey(KeyKeyT &&key, KeyValueT &&value)
void SetConditionExpression(ConditionExpressionT &&value)
const Aws::String & GetConditionExpression() const
ConditionCheck & WithExpressionAttributeValues(ExpressionAttributeValuesT &&value)
const Aws::Map< Aws::String, AttributeValue > & GetKey() const
bool ReturnValuesOnConditionCheckFailureHasBeenSet() const
ReturnValuesOnConditionCheckFailure GetReturnValuesOnConditionCheckFailure() const
const Aws::Map< Aws::String, AttributeValue > & GetExpressionAttributeValues() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue