AWS SDK for C++

AWS SDK for C++ Version 1.11.745

Loading...
Searching...
No Matches
Update.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
31class Update {
32 public:
33 AWS_DYNAMODB_API Update() = default;
34 AWS_DYNAMODB_API Update(Aws::Utils::Json::JsonView jsonValue);
35 AWS_DYNAMODB_API Update& operator=(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 Update& WithKey(KeyT&& value) {
52 SetKey(std::forward<KeyT>(value));
53 return *this;
54 }
55 template <typename KeyKeyT = Aws::String, typename KeyValueT = AttributeValue>
56 Update& 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& GetUpdateExpression() const { return m_updateExpression; }
69 inline bool UpdateExpressionHasBeenSet() const { return m_updateExpressionHasBeenSet; }
70 template <typename UpdateExpressionT = Aws::String>
71 void SetUpdateExpression(UpdateExpressionT&& value) {
72 m_updateExpressionHasBeenSet = true;
73 m_updateExpression = std::forward<UpdateExpressionT>(value);
74 }
75 template <typename UpdateExpressionT = Aws::String>
76 Update& WithUpdateExpression(UpdateExpressionT&& value) {
77 SetUpdateExpression(std::forward<UpdateExpressionT>(value));
78 return *this;
79 }
81
83
87 inline const Aws::String& GetTableName() const { return m_tableName; }
88 inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
89 template <typename TableNameT = Aws::String>
90 void SetTableName(TableNameT&& value) {
91 m_tableNameHasBeenSet = true;
92 m_tableName = std::forward<TableNameT>(value);
93 }
94 template <typename TableNameT = Aws::String>
95 Update& WithTableName(TableNameT&& value) {
96 SetTableName(std::forward<TableNameT>(value));
97 return *this;
98 }
100
102
106 inline const Aws::String& GetConditionExpression() const { return m_conditionExpression; }
107 inline bool ConditionExpressionHasBeenSet() const { return m_conditionExpressionHasBeenSet; }
108 template <typename ConditionExpressionT = Aws::String>
109 void SetConditionExpression(ConditionExpressionT&& value) {
110 m_conditionExpressionHasBeenSet = true;
111 m_conditionExpression = std::forward<ConditionExpressionT>(value);
112 }
113 template <typename ConditionExpressionT = Aws::String>
114 Update& WithConditionExpression(ConditionExpressionT&& value) {
115 SetConditionExpression(std::forward<ConditionExpressionT>(value));
116 return *this;
117 }
119
121
124 inline const Aws::Map<Aws::String, Aws::String>& GetExpressionAttributeNames() const { return m_expressionAttributeNames; }
125 inline bool ExpressionAttributeNamesHasBeenSet() const { return m_expressionAttributeNamesHasBeenSet; }
126 template <typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
127 void SetExpressionAttributeNames(ExpressionAttributeNamesT&& value) {
128 m_expressionAttributeNamesHasBeenSet = true;
129 m_expressionAttributeNames = std::forward<ExpressionAttributeNamesT>(value);
130 }
131 template <typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
132 Update& WithExpressionAttributeNames(ExpressionAttributeNamesT&& value) {
133 SetExpressionAttributeNames(std::forward<ExpressionAttributeNamesT>(value));
134 return *this;
135 }
136 template <typename ExpressionAttributeNamesKeyT = Aws::String, typename ExpressionAttributeNamesValueT = Aws::String>
137 Update& AddExpressionAttributeNames(ExpressionAttributeNamesKeyT&& key, ExpressionAttributeNamesValueT&& value) {
138 m_expressionAttributeNamesHasBeenSet = true;
139 m_expressionAttributeNames.emplace(std::forward<ExpressionAttributeNamesKeyT>(key),
140 std::forward<ExpressionAttributeNamesValueT>(value));
141 return *this;
142 }
144
146
149 inline const Aws::Map<Aws::String, AttributeValue>& GetExpressionAttributeValues() const { return m_expressionAttributeValues; }
150 inline bool ExpressionAttributeValuesHasBeenSet() const { return m_expressionAttributeValuesHasBeenSet; }
151 template <typename ExpressionAttributeValuesT = Aws::Map<Aws::String, AttributeValue>>
152 void SetExpressionAttributeValues(ExpressionAttributeValuesT&& value) {
153 m_expressionAttributeValuesHasBeenSet = true;
154 m_expressionAttributeValues = std::forward<ExpressionAttributeValuesT>(value);
155 }
156 template <typename ExpressionAttributeValuesT = Aws::Map<Aws::String, AttributeValue>>
157 Update& WithExpressionAttributeValues(ExpressionAttributeValuesT&& value) {
158 SetExpressionAttributeValues(std::forward<ExpressionAttributeValuesT>(value));
159 return *this;
160 }
161 template <typename ExpressionAttributeValuesKeyT = Aws::String, typename ExpressionAttributeValuesValueT = AttributeValue>
162 Update& AddExpressionAttributeValues(ExpressionAttributeValuesKeyT&& key, ExpressionAttributeValuesValueT&& value) {
163 m_expressionAttributeValuesHasBeenSet = true;
164 m_expressionAttributeValues.emplace(std::forward<ExpressionAttributeValuesKeyT>(key),
165 std::forward<ExpressionAttributeValuesValueT>(value));
166 return *this;
167 }
169
171
178 return m_returnValuesOnConditionCheckFailure;
179 }
180 inline bool ReturnValuesOnConditionCheckFailureHasBeenSet() const { return m_returnValuesOnConditionCheckFailureHasBeenSet; }
182 m_returnValuesOnConditionCheckFailureHasBeenSet = true;
183 m_returnValuesOnConditionCheckFailure = value;
184 }
187 return *this;
188 }
190 private:
192
193 Aws::String m_updateExpression;
194
195 Aws::String m_tableName;
196
197 Aws::String m_conditionExpression;
198
199 Aws::Map<Aws::String, Aws::String> m_expressionAttributeNames;
200
201 Aws::Map<Aws::String, AttributeValue> m_expressionAttributeValues;
202
204 bool m_keyHasBeenSet = false;
205 bool m_updateExpressionHasBeenSet = false;
206 bool m_tableNameHasBeenSet = false;
207 bool m_conditionExpressionHasBeenSet = false;
208 bool m_expressionAttributeNamesHasBeenSet = false;
209 bool m_expressionAttributeValuesHasBeenSet = false;
210 bool m_returnValuesOnConditionCheckFailureHasBeenSet = false;
211};
212
213} // namespace Model
214} // namespace DynamoDB
215} // namespace Aws
void SetReturnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure value)
Definition Update.h:181
const Aws::Map< Aws::String, AttributeValue > & GetKey() const
Definition Update.h:43
void SetExpressionAttributeNames(ExpressionAttributeNamesT &&value)
Definition Update.h:127
const Aws::String & GetConditionExpression() const
Definition Update.h:106
bool TableNameHasBeenSet() const
Definition Update.h:88
const Aws::String & GetTableName() const
Definition Update.h:87
Update & WithKey(KeyT &&value)
Definition Update.h:51
void SetUpdateExpression(UpdateExpressionT &&value)
Definition Update.h:71
AWS_DYNAMODB_API Update()=default
bool KeyHasBeenSet() const
Definition Update.h:44
Update & AddExpressionAttributeValues(ExpressionAttributeValuesKeyT &&key, ExpressionAttributeValuesValueT &&value)
Definition Update.h:162
void SetKey(KeyT &&value)
Definition Update.h:46
void SetConditionExpression(ConditionExpressionT &&value)
Definition Update.h:109
AWS_DYNAMODB_API Update & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Map< Aws::String, Aws::String > & GetExpressionAttributeNames() const
Definition Update.h:124
bool ExpressionAttributeValuesHasBeenSet() const
Definition Update.h:150
Update & WithUpdateExpression(UpdateExpressionT &&value)
Definition Update.h:76
bool ConditionExpressionHasBeenSet() const
Definition Update.h:107
const Aws::Map< Aws::String, AttributeValue > & GetExpressionAttributeValues() const
Definition Update.h:149
void SetTableName(TableNameT &&value)
Definition Update.h:90
Update & WithConditionExpression(ConditionExpressionT &&value)
Definition Update.h:114
Update & WithTableName(TableNameT &&value)
Definition Update.h:95
Update & WithReturnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure value)
Definition Update.h:185
Update & AddKey(KeyKeyT &&key, KeyValueT &&value)
Definition Update.h:56
ReturnValuesOnConditionCheckFailure GetReturnValuesOnConditionCheckFailure() const
Definition Update.h:177
Update & WithExpressionAttributeNames(ExpressionAttributeNamesT &&value)
Definition Update.h:132
bool ReturnValuesOnConditionCheckFailureHasBeenSet() const
Definition Update.h:180
AWS_DYNAMODB_API Update(Aws::Utils::Json::JsonView jsonValue)
void SetExpressionAttributeValues(ExpressionAttributeValuesT &&value)
Definition Update.h:152
AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const
Update & WithExpressionAttributeValues(ExpressionAttributeValuesT &&value)
Definition Update.h:157
const Aws::String & GetUpdateExpression() const
Definition Update.h:68
bool ExpressionAttributeNamesHasBeenSet() const
Definition Update.h:125
Update & AddExpressionAttributeNames(ExpressionAttributeNamesKeyT &&key, ExpressionAttributeNamesValueT &&value)
Definition Update.h:137
bool UpdateExpressionHasBeenSet() const
Definition Update.h:69
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