AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
PutItemRequest.h
1
6#pragma once
7#include <aws/dynamodb/DynamoDB_EXPORTS.h>
8#include <aws/dynamodb/DynamoDBRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/dynamodb/model/ReturnValue.h>
12#include <aws/dynamodb/model/ReturnConsumedCapacity.h>
13#include <aws/dynamodb/model/ReturnItemCollectionMetrics.h>
14#include <aws/dynamodb/model/ConditionalOperator.h>
15#include <aws/dynamodb/model/ReturnValuesOnConditionCheckFailure.h>
16#include <aws/dynamodb/model/AttributeValue.h>
17#include <aws/dynamodb/model/ExpectedAttributeValue.h>
18#include <utility>
19
20namespace Aws
21{
22namespace DynamoDB
23{
24namespace Model
25{
26
34 {
35 public:
36 AWS_DYNAMODB_API PutItemRequest();
37
38 // Service request name is the Operation name which will send this request out,
39 // each operation should has unique request name, so that we can get operation's name from this request.
40 // Note: this is not true for response, multiple operations may have the same response name,
41 // so we can not get operation's name from response.
42 inline virtual const char* GetServiceRequestName() const override { return "PutItem"; }
43
44 AWS_DYNAMODB_API Aws::String SerializePayload() const override;
45
47
48
50
54 inline const Aws::String& GetTableName() const{ return m_tableName; }
55 inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
56 inline void SetTableName(const Aws::String& value) { m_tableNameHasBeenSet = true; m_tableName = value; }
57 inline void SetTableName(Aws::String&& value) { m_tableNameHasBeenSet = true; m_tableName = std::move(value); }
58 inline void SetTableName(const char* value) { m_tableNameHasBeenSet = true; m_tableName.assign(value); }
59 inline PutItemRequest& WithTableName(const Aws::String& value) { SetTableName(value); return *this;}
60 inline PutItemRequest& WithTableName(Aws::String&& value) { SetTableName(std::move(value)); return *this;}
61 inline PutItemRequest& WithTableName(const char* value) { SetTableName(value); return *this;}
63
65
82 inline const Aws::Map<Aws::String, AttributeValue>& GetItem() const{ return m_item; }
83 inline bool ItemHasBeenSet() const { return m_itemHasBeenSet; }
84 inline void SetItem(const Aws::Map<Aws::String, AttributeValue>& value) { m_itemHasBeenSet = true; m_item = value; }
85 inline void SetItem(Aws::Map<Aws::String, AttributeValue>&& value) { m_itemHasBeenSet = true; m_item = std::move(value); }
86 inline PutItemRequest& WithItem(const Aws::Map<Aws::String, AttributeValue>& value) { SetItem(value); return *this;}
87 inline PutItemRequest& WithItem(Aws::Map<Aws::String, AttributeValue>&& value) { SetItem(std::move(value)); return *this;}
88 inline PutItemRequest& AddItem(const Aws::String& key, const AttributeValue& value) { m_itemHasBeenSet = true; m_item.emplace(key, value); return *this; }
89 inline PutItemRequest& AddItem(Aws::String&& key, const AttributeValue& value) { m_itemHasBeenSet = true; m_item.emplace(std::move(key), value); return *this; }
90 inline PutItemRequest& AddItem(const Aws::String& key, AttributeValue&& value) { m_itemHasBeenSet = true; m_item.emplace(key, std::move(value)); return *this; }
91 inline PutItemRequest& AddItem(Aws::String&& key, AttributeValue&& value) { m_itemHasBeenSet = true; m_item.emplace(std::move(key), std::move(value)); return *this; }
92 inline PutItemRequest& AddItem(const char* key, AttributeValue&& value) { m_itemHasBeenSet = true; m_item.emplace(key, std::move(value)); return *this; }
93 inline PutItemRequest& AddItem(const char* key, const AttributeValue& value) { m_itemHasBeenSet = true; m_item.emplace(key, value); return *this; }
95
97
103 inline const Aws::Map<Aws::String, ExpectedAttributeValue>& GetExpected() const{ return m_expected; }
104 inline bool ExpectedHasBeenSet() const { return m_expectedHasBeenSet; }
105 inline void SetExpected(const Aws::Map<Aws::String, ExpectedAttributeValue>& value) { m_expectedHasBeenSet = true; m_expected = value; }
106 inline void SetExpected(Aws::Map<Aws::String, ExpectedAttributeValue>&& value) { m_expectedHasBeenSet = true; m_expected = std::move(value); }
109 inline PutItemRequest& AddExpected(const Aws::String& key, const ExpectedAttributeValue& value) { m_expectedHasBeenSet = true; m_expected.emplace(key, value); return *this; }
110 inline PutItemRequest& AddExpected(Aws::String&& key, const ExpectedAttributeValue& value) { m_expectedHasBeenSet = true; m_expected.emplace(std::move(key), value); return *this; }
111 inline PutItemRequest& AddExpected(const Aws::String& key, ExpectedAttributeValue&& value) { m_expectedHasBeenSet = true; m_expected.emplace(key, std::move(value)); return *this; }
112 inline PutItemRequest& AddExpected(Aws::String&& key, ExpectedAttributeValue&& value) { m_expectedHasBeenSet = true; m_expected.emplace(std::move(key), std::move(value)); return *this; }
113 inline PutItemRequest& AddExpected(const char* key, ExpectedAttributeValue&& value) { m_expectedHasBeenSet = true; m_expected.emplace(key, std::move(value)); return *this; }
114 inline PutItemRequest& AddExpected(const char* key, const ExpectedAttributeValue& value) { m_expectedHasBeenSet = true; m_expected.emplace(key, value); return *this; }
116
118
134 inline const ReturnValue& GetReturnValues() const{ return m_returnValues; }
135 inline bool ReturnValuesHasBeenSet() const { return m_returnValuesHasBeenSet; }
136 inline void SetReturnValues(const ReturnValue& value) { m_returnValuesHasBeenSet = true; m_returnValues = value; }
137 inline void SetReturnValues(ReturnValue&& value) { m_returnValuesHasBeenSet = true; m_returnValues = std::move(value); }
138 inline PutItemRequest& WithReturnValues(const ReturnValue& value) { SetReturnValues(value); return *this;}
139 inline PutItemRequest& WithReturnValues(ReturnValue&& value) { SetReturnValues(std::move(value)); return *this;}
141
143
144 inline const ReturnConsumedCapacity& GetReturnConsumedCapacity() const{ return m_returnConsumedCapacity; }
145 inline bool ReturnConsumedCapacityHasBeenSet() const { return m_returnConsumedCapacityHasBeenSet; }
146 inline void SetReturnConsumedCapacity(const ReturnConsumedCapacity& value) { m_returnConsumedCapacityHasBeenSet = true; m_returnConsumedCapacity = value; }
147 inline void SetReturnConsumedCapacity(ReturnConsumedCapacity&& value) { m_returnConsumedCapacityHasBeenSet = true; m_returnConsumedCapacity = std::move(value); }
151
153
159 inline const ReturnItemCollectionMetrics& GetReturnItemCollectionMetrics() const{ return m_returnItemCollectionMetrics; }
160 inline bool ReturnItemCollectionMetricsHasBeenSet() const { return m_returnItemCollectionMetricsHasBeenSet; }
161 inline void SetReturnItemCollectionMetrics(const ReturnItemCollectionMetrics& value) { m_returnItemCollectionMetricsHasBeenSet = true; m_returnItemCollectionMetrics = value; }
162 inline void SetReturnItemCollectionMetrics(ReturnItemCollectionMetrics&& value) { m_returnItemCollectionMetricsHasBeenSet = true; m_returnItemCollectionMetrics = std::move(value); }
166
168
174 inline const ConditionalOperator& GetConditionalOperator() const{ return m_conditionalOperator; }
175 inline bool ConditionalOperatorHasBeenSet() const { return m_conditionalOperatorHasBeenSet; }
176 inline void SetConditionalOperator(const ConditionalOperator& value) { m_conditionalOperatorHasBeenSet = true; m_conditionalOperator = value; }
177 inline void SetConditionalOperator(ConditionalOperator&& value) { m_conditionalOperatorHasBeenSet = true; m_conditionalOperator = std::move(value); }
179 inline PutItemRequest& WithConditionalOperator(ConditionalOperator&& value) { SetConditionalOperator(std::move(value)); return *this;}
181
183
195 inline const Aws::String& GetConditionExpression() const{ return m_conditionExpression; }
196 inline bool ConditionExpressionHasBeenSet() const { return m_conditionExpressionHasBeenSet; }
197 inline void SetConditionExpression(const Aws::String& value) { m_conditionExpressionHasBeenSet = true; m_conditionExpression = value; }
198 inline void SetConditionExpression(Aws::String&& value) { m_conditionExpressionHasBeenSet = true; m_conditionExpression = std::move(value); }
199 inline void SetConditionExpression(const char* value) { m_conditionExpressionHasBeenSet = true; m_conditionExpression.assign(value); }
200 inline PutItemRequest& WithConditionExpression(const Aws::String& value) { SetConditionExpression(value); return *this;}
201 inline PutItemRequest& WithConditionExpression(Aws::String&& value) { SetConditionExpression(std::move(value)); return *this;}
202 inline PutItemRequest& WithConditionExpression(const char* value) { SetConditionExpression(value); return *this;}
204
206
231 inline const Aws::Map<Aws::String, Aws::String>& GetExpressionAttributeNames() const{ return m_expressionAttributeNames; }
232 inline bool ExpressionAttributeNamesHasBeenSet() const { return m_expressionAttributeNamesHasBeenSet; }
233 inline void SetExpressionAttributeNames(const Aws::Map<Aws::String, Aws::String>& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames = value; }
234 inline void SetExpressionAttributeNames(Aws::Map<Aws::String, Aws::String>&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames = std::move(value); }
237 inline PutItemRequest& AddExpressionAttributeNames(const Aws::String& key, const Aws::String& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(key, value); return *this; }
238 inline PutItemRequest& AddExpressionAttributeNames(Aws::String&& key, const Aws::String& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(std::move(key), value); return *this; }
239 inline PutItemRequest& AddExpressionAttributeNames(const Aws::String& key, Aws::String&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(key, std::move(value)); return *this; }
240 inline PutItemRequest& AddExpressionAttributeNames(Aws::String&& key, Aws::String&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(std::move(key), std::move(value)); return *this; }
241 inline PutItemRequest& AddExpressionAttributeNames(const char* key, Aws::String&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(key, std::move(value)); return *this; }
242 inline PutItemRequest& AddExpressionAttributeNames(Aws::String&& key, const char* value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(std::move(key), value); return *this; }
243 inline PutItemRequest& AddExpressionAttributeNames(const char* key, const char* value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(key, value); return *this; }
245
247
262 inline const Aws::Map<Aws::String, AttributeValue>& GetExpressionAttributeValues() const{ return m_expressionAttributeValues; }
263 inline bool ExpressionAttributeValuesHasBeenSet() const { return m_expressionAttributeValuesHasBeenSet; }
264 inline void SetExpressionAttributeValues(const Aws::Map<Aws::String, AttributeValue>& value) { m_expressionAttributeValuesHasBeenSet = true; m_expressionAttributeValues = value; }
265 inline void SetExpressionAttributeValues(Aws::Map<Aws::String, AttributeValue>&& value) { m_expressionAttributeValuesHasBeenSet = true; m_expressionAttributeValues = std::move(value); }
268 inline PutItemRequest& AddExpressionAttributeValues(const Aws::String& key, const AttributeValue& value) { m_expressionAttributeValuesHasBeenSet = true; m_expressionAttributeValues.emplace(key, value); return *this; }
269 inline PutItemRequest& AddExpressionAttributeValues(Aws::String&& key, const AttributeValue& value) { m_expressionAttributeValuesHasBeenSet = true; m_expressionAttributeValues.emplace(std::move(key), value); return *this; }
270 inline PutItemRequest& AddExpressionAttributeValues(const Aws::String& key, AttributeValue&& value) { m_expressionAttributeValuesHasBeenSet = true; m_expressionAttributeValues.emplace(key, std::move(value)); return *this; }
271 inline PutItemRequest& AddExpressionAttributeValues(Aws::String&& key, AttributeValue&& value) { m_expressionAttributeValuesHasBeenSet = true; m_expressionAttributeValues.emplace(std::move(key), std::move(value)); return *this; }
272 inline PutItemRequest& AddExpressionAttributeValues(const char* key, AttributeValue&& value) { m_expressionAttributeValuesHasBeenSet = true; m_expressionAttributeValues.emplace(key, std::move(value)); return *this; }
273 inline PutItemRequest& AddExpressionAttributeValues(const char* key, const AttributeValue& value) { m_expressionAttributeValuesHasBeenSet = true; m_expressionAttributeValues.emplace(key, value); return *this; }
275
277
284 inline const ReturnValuesOnConditionCheckFailure& GetReturnValuesOnConditionCheckFailure() const{ return m_returnValuesOnConditionCheckFailure; }
285 inline bool ReturnValuesOnConditionCheckFailureHasBeenSet() const { return m_returnValuesOnConditionCheckFailureHasBeenSet; }
286 inline void SetReturnValuesOnConditionCheckFailure(const ReturnValuesOnConditionCheckFailure& value) { m_returnValuesOnConditionCheckFailureHasBeenSet = true; m_returnValuesOnConditionCheckFailure = value; }
287 inline void SetReturnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure&& value) { m_returnValuesOnConditionCheckFailureHasBeenSet = true; m_returnValuesOnConditionCheckFailure = std::move(value); }
291 private:
292
293 Aws::String m_tableName;
294 bool m_tableNameHasBeenSet = false;
295
297 bool m_itemHasBeenSet = false;
298
300 bool m_expectedHasBeenSet = false;
301
302 ReturnValue m_returnValues;
303 bool m_returnValuesHasBeenSet = false;
304
305 ReturnConsumedCapacity m_returnConsumedCapacity;
306 bool m_returnConsumedCapacityHasBeenSet = false;
307
308 ReturnItemCollectionMetrics m_returnItemCollectionMetrics;
309 bool m_returnItemCollectionMetricsHasBeenSet = false;
310
311 ConditionalOperator m_conditionalOperator;
312 bool m_conditionalOperatorHasBeenSet = false;
313
314 Aws::String m_conditionExpression;
315 bool m_conditionExpressionHasBeenSet = false;
316
317 Aws::Map<Aws::String, Aws::String> m_expressionAttributeNames;
318 bool m_expressionAttributeNamesHasBeenSet = false;
319
320 Aws::Map<Aws::String, AttributeValue> m_expressionAttributeValues;
321 bool m_expressionAttributeValuesHasBeenSet = false;
322
323 ReturnValuesOnConditionCheckFailure m_returnValuesOnConditionCheckFailure;
324 bool m_returnValuesOnConditionCheckFailureHasBeenSet = false;
325 };
326
327} // namespace Model
328} // namespace DynamoDB
329} // namespace Aws
http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html
void SetReturnValues(ReturnValue &&value)
PutItemRequest & WithConditionalOperator(ConditionalOperator &&value)
const Aws::Map< Aws::String, Aws::String > & GetExpressionAttributeNames() const
PutItemRequest & WithExpressionAttributeNames(Aws::Map< Aws::String, Aws::String > &&value)
void SetConditionalOperator(const ConditionalOperator &value)
PutItemRequest & WithExpressionAttributeNames(const Aws::Map< Aws::String, Aws::String > &value)
PutItemRequest & AddExpected(const Aws::String &key, ExpectedAttributeValue &&value)
const Aws::String & GetConditionExpression() const
const ReturnValuesOnConditionCheckFailure & GetReturnValuesOnConditionCheckFailure() const
PutItemRequest & WithExpressionAttributeValues(Aws::Map< Aws::String, AttributeValue > &&value)
void SetConditionExpression(const Aws::String &value)
void SetConditionalOperator(ConditionalOperator &&value)
PutItemRequest & WithExpressionAttributeValues(const Aws::Map< Aws::String, AttributeValue > &value)
PutItemRequest & WithConditionalOperator(const ConditionalOperator &value)
void SetConditionExpression(Aws::String &&value)
const ReturnValue & GetReturnValues() const
PutItemRequest & WithConditionExpression(const char *value)
const Aws::String & GetTableName() const
PutItemRequest & WithTableName(const char *value)
void SetReturnConsumedCapacity(const ReturnConsumedCapacity &value)
PutItemRequest & AddExpressionAttributeValues(const char *key, const AttributeValue &value)
void SetExpressionAttributeValues(const Aws::Map< Aws::String, AttributeValue > &value)
PutItemRequest & WithConditionExpression(const Aws::String &value)
PutItemRequest & AddItem(const char *key, AttributeValue &&value)
void SetExpected(Aws::Map< Aws::String, ExpectedAttributeValue > &&value)
PutItemRequest & WithTableName(Aws::String &&value)
PutItemRequest & AddExpressionAttributeValues(Aws::String &&key, AttributeValue &&value)
PutItemRequest & AddExpressionAttributeNames(const Aws::String &key, const Aws::String &value)
PutItemRequest & AddExpected(Aws::String &&key, ExpectedAttributeValue &&value)
PutItemRequest & AddItem(const Aws::String &key, const AttributeValue &value)
void SetReturnValues(const ReturnValue &value)
PutItemRequest & AddExpressionAttributeValues(const char *key, AttributeValue &&value)
const Aws::Map< Aws::String, AttributeValue > & GetExpressionAttributeValues() const
PutItemRequest & AddExpressionAttributeNames(Aws::String &&key, Aws::String &&value)
PutItemRequest & WithReturnValuesOnConditionCheckFailure(const ReturnValuesOnConditionCheckFailure &value)
const ReturnConsumedCapacity & GetReturnConsumedCapacity() const
void SetExpressionAttributeNames(const Aws::Map< Aws::String, Aws::String > &value)
void SetConditionExpression(const char *value)
PutItemRequest & WithReturnValues(const ReturnValue &value)
PutItemRequest & AddExpressionAttributeValues(const Aws::String &key, const AttributeValue &value)
void SetExpressionAttributeValues(Aws::Map< Aws::String, AttributeValue > &&value)
PutItemRequest & AddItem(Aws::String &&key, const AttributeValue &value)
PutItemRequest & AddExpected(Aws::String &&key, const ExpectedAttributeValue &value)
PutItemRequest & AddExpressionAttributeValues(const Aws::String &key, AttributeValue &&value)
void SetTableName(const Aws::String &value)
PutItemRequest & AddExpressionAttributeNames(const Aws::String &key, Aws::String &&value)
AWS_DYNAMODB_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutItemRequest & WithReturnValues(ReturnValue &&value)
PutItemRequest & WithReturnItemCollectionMetrics(ReturnItemCollectionMetrics &&value)
PutItemRequest & WithItem(Aws::Map< Aws::String, AttributeValue > &&value)
PutItemRequest & WithReturnConsumedCapacity(ReturnConsumedCapacity &&value)
void SetTableName(Aws::String &&value)
PutItemRequest & WithConditionExpression(Aws::String &&value)
const ReturnItemCollectionMetrics & GetReturnItemCollectionMetrics() const
void SetExpected(const Aws::Map< Aws::String, ExpectedAttributeValue > &value)
PutItemRequest & AddExpected(const char *key, const ExpectedAttributeValue &value)
PutItemRequest & AddExpressionAttributeNames(Aws::String &&key, const char *value)
void SetReturnValuesOnConditionCheckFailure(const ReturnValuesOnConditionCheckFailure &value)
PutItemRequest & WithExpected(const Aws::Map< Aws::String, ExpectedAttributeValue > &value)
AWS_DYNAMODB_API Aws::String SerializePayload() const override
PutItemRequest & WithTableName(const Aws::String &value)
bool ReturnValuesOnConditionCheckFailureHasBeenSet() const
const Aws::Map< Aws::String, ExpectedAttributeValue > & GetExpected() const
PutItemRequest & WithReturnConsumedCapacity(const ReturnConsumedCapacity &value)
void SetItem(const Aws::Map< Aws::String, AttributeValue > &value)
PutItemRequest & AddItem(Aws::String &&key, AttributeValue &&value)
PutItemRequest & AddExpected(const Aws::String &key, const ExpectedAttributeValue &value)
PutItemRequest & WithExpected(Aws::Map< Aws::String, ExpectedAttributeValue > &&value)
void SetReturnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure &&value)
virtual const char * GetServiceRequestName() const override
PutItemRequest & WithItem(const Aws::Map< Aws::String, AttributeValue > &value)
PutItemRequest & WithReturnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure &&value)
const Aws::Map< Aws::String, AttributeValue > & GetItem() const
void SetExpressionAttributeNames(Aws::Map< Aws::String, Aws::String > &&value)
void SetItem(Aws::Map< Aws::String, AttributeValue > &&value)
void SetReturnItemCollectionMetrics(ReturnItemCollectionMetrics &&value)
void SetTableName(const char *value)
PutItemRequest & WithReturnItemCollectionMetrics(const ReturnItemCollectionMetrics &value)
PutItemRequest & AddExpressionAttributeNames(const char *key, Aws::String &&value)
PutItemRequest & AddExpressionAttributeValues(Aws::String &&key, const AttributeValue &value)
void SetReturnItemCollectionMetrics(const ReturnItemCollectionMetrics &value)
PutItemRequest & AddItem(const char *key, const AttributeValue &value)
PutItemRequest & AddExpected(const char *key, ExpectedAttributeValue &&value)
void SetReturnConsumedCapacity(ReturnConsumedCapacity &&value)
PutItemRequest & AddItem(const Aws::String &key, AttributeValue &&value)
const ConditionalOperator & GetConditionalOperator() const
PutItemRequest & AddExpressionAttributeNames(Aws::String &&key, const Aws::String &value)
PutItemRequest & AddExpressionAttributeNames(const char *key, const char *value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
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