AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
GetItemRequest.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/core/utils/memory/stl/AWSVector.h>
12#include <aws/dynamodb/model/ReturnConsumedCapacity.h>
13#include <aws/dynamodb/model/AttributeValue.h>
14#include <utility>
15
16namespace Aws
17{
18namespace DynamoDB
19{
20namespace Model
21{
22
30 {
31 public:
32 AWS_DYNAMODB_API GetItemRequest();
33
34 // Service request name is the Operation name which will send this request out,
35 // each operation should has unique request name, so that we can get operation's name from this request.
36 // Note: this is not true for response, multiple operations may have the same response name,
37 // so we can not get operation's name from response.
38 inline virtual const char* GetServiceRequestName() const override { return "GetItem"; }
39
40 AWS_DYNAMODB_API Aws::String SerializePayload() const override;
41
43
44
46
50 inline const Aws::String& GetTableName() const{ return m_tableName; }
51 inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
52 inline void SetTableName(const Aws::String& value) { m_tableNameHasBeenSet = true; m_tableName = value; }
53 inline void SetTableName(Aws::String&& value) { m_tableNameHasBeenSet = true; m_tableName = std::move(value); }
54 inline void SetTableName(const char* value) { m_tableNameHasBeenSet = true; m_tableName.assign(value); }
55 inline GetItemRequest& WithTableName(const Aws::String& value) { SetTableName(value); return *this;}
56 inline GetItemRequest& WithTableName(Aws::String&& value) { SetTableName(std::move(value)); return *this;}
57 inline GetItemRequest& WithTableName(const char* value) { SetTableName(value); return *this;}
59
61
68 inline const Aws::Map<Aws::String, AttributeValue>& GetKey() const{ return m_key; }
69 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
70 inline void SetKey(const Aws::Map<Aws::String, AttributeValue>& value) { m_keyHasBeenSet = true; m_key = value; }
71 inline void SetKey(Aws::Map<Aws::String, AttributeValue>&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
72 inline GetItemRequest& WithKey(const Aws::Map<Aws::String, AttributeValue>& value) { SetKey(value); return *this;}
73 inline GetItemRequest& WithKey(Aws::Map<Aws::String, AttributeValue>&& value) { SetKey(std::move(value)); return *this;}
74 inline GetItemRequest& AddKey(const Aws::String& key, const AttributeValue& value) { m_keyHasBeenSet = true; m_key.emplace(key, value); return *this; }
75 inline GetItemRequest& AddKey(Aws::String&& key, const AttributeValue& value) { m_keyHasBeenSet = true; m_key.emplace(std::move(key), value); return *this; }
76 inline GetItemRequest& AddKey(const Aws::String& key, AttributeValue&& value) { m_keyHasBeenSet = true; m_key.emplace(key, std::move(value)); return *this; }
77 inline GetItemRequest& AddKey(Aws::String&& key, AttributeValue&& value) { m_keyHasBeenSet = true; m_key.emplace(std::move(key), std::move(value)); return *this; }
78 inline GetItemRequest& AddKey(const char* key, AttributeValue&& value) { m_keyHasBeenSet = true; m_key.emplace(key, std::move(value)); return *this; }
79 inline GetItemRequest& AddKey(const char* key, const AttributeValue& value) { m_keyHasBeenSet = true; m_key.emplace(key, value); return *this; }
81
83
89 inline const Aws::Vector<Aws::String>& GetAttributesToGet() const{ return m_attributesToGet; }
90 inline bool AttributesToGetHasBeenSet() const { return m_attributesToGetHasBeenSet; }
91 inline void SetAttributesToGet(const Aws::Vector<Aws::String>& value) { m_attributesToGetHasBeenSet = true; m_attributesToGet = value; }
92 inline void SetAttributesToGet(Aws::Vector<Aws::String>&& value) { m_attributesToGetHasBeenSet = true; m_attributesToGet = std::move(value); }
94 inline GetItemRequest& WithAttributesToGet(Aws::Vector<Aws::String>&& value) { SetAttributesToGet(std::move(value)); return *this;}
95 inline GetItemRequest& AddAttributesToGet(const Aws::String& value) { m_attributesToGetHasBeenSet = true; m_attributesToGet.push_back(value); return *this; }
96 inline GetItemRequest& AddAttributesToGet(Aws::String&& value) { m_attributesToGetHasBeenSet = true; m_attributesToGet.push_back(std::move(value)); return *this; }
97 inline GetItemRequest& AddAttributesToGet(const char* value) { m_attributesToGetHasBeenSet = true; m_attributesToGet.push_back(value); return *this; }
99
101
106 inline bool GetConsistentRead() const{ return m_consistentRead; }
107 inline bool ConsistentReadHasBeenSet() const { return m_consistentReadHasBeenSet; }
108 inline void SetConsistentRead(bool value) { m_consistentReadHasBeenSet = true; m_consistentRead = value; }
109 inline GetItemRequest& WithConsistentRead(bool value) { SetConsistentRead(value); return *this;}
111
113
114 inline const ReturnConsumedCapacity& GetReturnConsumedCapacity() const{ return m_returnConsumedCapacity; }
115 inline bool ReturnConsumedCapacityHasBeenSet() const { return m_returnConsumedCapacityHasBeenSet; }
116 inline void SetReturnConsumedCapacity(const ReturnConsumedCapacity& value) { m_returnConsumedCapacityHasBeenSet = true; m_returnConsumedCapacity = value; }
117 inline void SetReturnConsumedCapacity(ReturnConsumedCapacity&& value) { m_returnConsumedCapacityHasBeenSet = true; m_returnConsumedCapacity = std::move(value); }
121
123
133 inline const Aws::String& GetProjectionExpression() const{ return m_projectionExpression; }
134 inline bool ProjectionExpressionHasBeenSet() const { return m_projectionExpressionHasBeenSet; }
135 inline void SetProjectionExpression(const Aws::String& value) { m_projectionExpressionHasBeenSet = true; m_projectionExpression = value; }
136 inline void SetProjectionExpression(Aws::String&& value) { m_projectionExpressionHasBeenSet = true; m_projectionExpression = std::move(value); }
137 inline void SetProjectionExpression(const char* value) { m_projectionExpressionHasBeenSet = true; m_projectionExpression.assign(value); }
138 inline GetItemRequest& WithProjectionExpression(const Aws::String& value) { SetProjectionExpression(value); return *this;}
139 inline GetItemRequest& WithProjectionExpression(Aws::String&& value) { SetProjectionExpression(std::move(value)); return *this;}
140 inline GetItemRequest& WithProjectionExpression(const char* value) { SetProjectionExpression(value); return *this;}
142
144
169 inline const Aws::Map<Aws::String, Aws::String>& GetExpressionAttributeNames() const{ return m_expressionAttributeNames; }
170 inline bool ExpressionAttributeNamesHasBeenSet() const { return m_expressionAttributeNamesHasBeenSet; }
171 inline void SetExpressionAttributeNames(const Aws::Map<Aws::String, Aws::String>& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames = value; }
172 inline void SetExpressionAttributeNames(Aws::Map<Aws::String, Aws::String>&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames = std::move(value); }
175 inline GetItemRequest& AddExpressionAttributeNames(const Aws::String& key, const Aws::String& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(key, value); return *this; }
176 inline GetItemRequest& AddExpressionAttributeNames(Aws::String&& key, const Aws::String& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(std::move(key), value); return *this; }
177 inline GetItemRequest& AddExpressionAttributeNames(const Aws::String& key, Aws::String&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(key, std::move(value)); return *this; }
178 inline GetItemRequest& AddExpressionAttributeNames(Aws::String&& key, Aws::String&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(std::move(key), std::move(value)); return *this; }
179 inline GetItemRequest& AddExpressionAttributeNames(const char* key, Aws::String&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(key, std::move(value)); return *this; }
180 inline GetItemRequest& AddExpressionAttributeNames(Aws::String&& key, const char* value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(std::move(key), value); return *this; }
181 inline GetItemRequest& AddExpressionAttributeNames(const char* key, const char* value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(key, value); return *this; }
183 private:
184
185 Aws::String m_tableName;
186 bool m_tableNameHasBeenSet = false;
187
189 bool m_keyHasBeenSet = false;
190
191 Aws::Vector<Aws::String> m_attributesToGet;
192 bool m_attributesToGetHasBeenSet = false;
193
194 bool m_consistentRead;
195 bool m_consistentReadHasBeenSet = false;
196
197 ReturnConsumedCapacity m_returnConsumedCapacity;
198 bool m_returnConsumedCapacityHasBeenSet = false;
199
200 Aws::String m_projectionExpression;
201 bool m_projectionExpressionHasBeenSet = false;
202
203 Aws::Map<Aws::String, Aws::String> m_expressionAttributeNames;
204 bool m_expressionAttributeNamesHasBeenSet = false;
205 };
206
207} // namespace Model
208} // namespace DynamoDB
209} // namespace Aws
http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html
GetItemRequest & WithTableName(Aws::String &&value)
GetItemRequest & AddExpressionAttributeNames(const Aws::String &key, const Aws::String &value)
void SetAttributesToGet(const Aws::Vector< Aws::String > &value)
GetItemRequest & WithExpressionAttributeNames(const Aws::Map< Aws::String, Aws::String > &value)
GetItemRequest & AddKey(Aws::String &&key, const AttributeValue &value)
GetItemRequest & AddExpressionAttributeNames(Aws::String &&key, Aws::String &&value)
GetItemRequest & AddAttributesToGet(Aws::String &&value)
const Aws::Map< Aws::String, AttributeValue > & GetKey() const
void SetProjectionExpression(Aws::String &&value)
GetItemRequest & WithConsistentRead(bool value)
GetItemRequest & WithTableName(const char *value)
const ReturnConsumedCapacity & GetReturnConsumedCapacity() const
GetItemRequest & AddKey(const char *key, AttributeValue &&value)
GetItemRequest & WithAttributesToGet(const Aws::Vector< Aws::String > &value)
void SetTableName(const char *value)
void SetTableName(const Aws::String &value)
GetItemRequest & AddAttributesToGet(const Aws::String &value)
AWS_DYNAMODB_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
GetItemRequest & WithProjectionExpression(const char *value)
void SetReturnConsumedCapacity(const ReturnConsumedCapacity &value)
void SetReturnConsumedCapacity(ReturnConsumedCapacity &&value)
GetItemRequest & WithKey(const Aws::Map< Aws::String, AttributeValue > &value)
void SetExpressionAttributeNames(const Aws::Map< Aws::String, Aws::String > &value)
GetItemRequest & AddExpressionAttributeNames(const Aws::String &key, Aws::String &&value)
GetItemRequest & WithProjectionExpression(Aws::String &&value)
void SetKey(Aws::Map< Aws::String, AttributeValue > &&value)
GetItemRequest & AddExpressionAttributeNames(const char *key, const char *value)
GetItemRequest & WithKey(Aws::Map< Aws::String, AttributeValue > &&value)
GetItemRequest & WithTableName(const Aws::String &value)
GetItemRequest & AddKey(const Aws::String &key, const AttributeValue &value)
GetItemRequest & WithReturnConsumedCapacity(ReturnConsumedCapacity &&value)
GetItemRequest & WithAttributesToGet(Aws::Vector< Aws::String > &&value)
void SetAttributesToGet(Aws::Vector< Aws::String > &&value)
GetItemRequest & AddKey(const char *key, const AttributeValue &value)
GetItemRequest & WithProjectionExpression(const Aws::String &value)
void SetProjectionExpression(const Aws::String &value)
GetItemRequest & AddKey(const Aws::String &key, AttributeValue &&value)
void SetExpressionAttributeNames(Aws::Map< Aws::String, Aws::String > &&value)
virtual const char * GetServiceRequestName() const override
GetItemRequest & WithExpressionAttributeNames(Aws::Map< Aws::String, Aws::String > &&value)
void SetTableName(Aws::String &&value)
const Aws::String & GetProjectionExpression() const
GetItemRequest & AddExpressionAttributeNames(Aws::String &&key, const Aws::String &value)
void SetProjectionExpression(const char *value)
void SetKey(const Aws::Map< Aws::String, AttributeValue > &value)
GetItemRequest & AddKey(Aws::String &&key, AttributeValue &&value)
const Aws::String & GetTableName() const
GetItemRequest & AddExpressionAttributeNames(Aws::String &&key, const char *value)
GetItemRequest & AddExpressionAttributeNames(const char *key, Aws::String &&value)
GetItemRequest & AddAttributesToGet(const char *value)
const Aws::Vector< Aws::String > & GetAttributesToGet() const
GetItemRequest & WithReturnConsumedCapacity(const ReturnConsumedCapacity &value)
AWS_DYNAMODB_API Aws::String SerializePayload() const override
const Aws::Map< Aws::String, Aws::String > & GetExpressionAttributeNames() const
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
std::vector< T, Aws::Allocator< T > > Vector