AWS SDK for C++

AWS SDK for C++ Version 1.11.750

Loading...
Searching...
No Matches
KeysAndAttributes.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/core/utils/memory/stl/AWSVector.h>
10#include <aws/dynamodb/DynamoDB_EXPORTS.h>
11#include <aws/dynamodb/model/AttributeValue.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
36 public:
37 AWS_DYNAMODB_API KeysAndAttributes() = default;
38 AWS_DYNAMODB_API KeysAndAttributes(Aws::Utils::Json::JsonView jsonValue);
40 AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
47 inline const Aws::Vector<Aws::Map<Aws::String, AttributeValue>>& GetKeys() const { return m_keys; }
48 inline bool KeysHasBeenSet() const { return m_keysHasBeenSet; }
49 template <typename KeysT = Aws::Vector<Aws::Map<Aws::String, AttributeValue>>>
50 void SetKeys(KeysT&& value) {
51 m_keysHasBeenSet = true;
52 m_keys = std::forward<KeysT>(value);
53 }
54 template <typename KeysT = Aws::Vector<Aws::Map<Aws::String, AttributeValue>>>
55 KeysAndAttributes& WithKeys(KeysT&& value) {
56 SetKeys(std::forward<KeysT>(value));
57 return *this;
58 }
59 template <typename KeysT = Aws::Map<Aws::String, AttributeValue>>
60 KeysAndAttributes& AddKeys(KeysT&& value) {
61 m_keysHasBeenSet = true;
62 m_keys.emplace_back(std::forward<KeysT>(value));
63 return *this;
64 }
66
68
74 inline const Aws::Vector<Aws::String>& GetAttributesToGet() const { return m_attributesToGet; }
75 inline bool AttributesToGetHasBeenSet() const { return m_attributesToGetHasBeenSet; }
76 template <typename AttributesToGetT = Aws::Vector<Aws::String>>
77 void SetAttributesToGet(AttributesToGetT&& value) {
78 m_attributesToGetHasBeenSet = true;
79 m_attributesToGet = std::forward<AttributesToGetT>(value);
80 }
81 template <typename AttributesToGetT = Aws::Vector<Aws::String>>
82 KeysAndAttributes& WithAttributesToGet(AttributesToGetT&& value) {
83 SetAttributesToGet(std::forward<AttributesToGetT>(value));
84 return *this;
85 }
86 template <typename AttributesToGetT = Aws::String>
87 KeysAndAttributes& AddAttributesToGet(AttributesToGetT&& value) {
88 m_attributesToGetHasBeenSet = true;
89 m_attributesToGet.emplace_back(std::forward<AttributesToGetT>(value));
90 return *this;
91 }
93
95
100 inline bool GetConsistentRead() const { return m_consistentRead; }
101 inline bool ConsistentReadHasBeenSet() const { return m_consistentReadHasBeenSet; }
102 inline void SetConsistentRead(bool value) {
103 m_consistentReadHasBeenSet = true;
104 m_consistentRead = value;
105 }
107 SetConsistentRead(value);
108 return *this;
109 }
111
113
123 inline const Aws::String& GetProjectionExpression() const { return m_projectionExpression; }
124 inline bool ProjectionExpressionHasBeenSet() const { return m_projectionExpressionHasBeenSet; }
125 template <typename ProjectionExpressionT = Aws::String>
126 void SetProjectionExpression(ProjectionExpressionT&& value) {
127 m_projectionExpressionHasBeenSet = true;
128 m_projectionExpression = std::forward<ProjectionExpressionT>(value);
129 }
130 template <typename ProjectionExpressionT = Aws::String>
131 KeysAndAttributes& WithProjectionExpression(ProjectionExpressionT&& value) {
132 SetProjectionExpression(std::forward<ProjectionExpressionT>(value));
133 return *this;
134 }
136
138
163 inline const Aws::Map<Aws::String, Aws::String>& GetExpressionAttributeNames() const { return m_expressionAttributeNames; }
164 inline bool ExpressionAttributeNamesHasBeenSet() const { return m_expressionAttributeNamesHasBeenSet; }
165 template <typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
166 void SetExpressionAttributeNames(ExpressionAttributeNamesT&& value) {
167 m_expressionAttributeNamesHasBeenSet = true;
168 m_expressionAttributeNames = std::forward<ExpressionAttributeNamesT>(value);
169 }
170 template <typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
171 KeysAndAttributes& WithExpressionAttributeNames(ExpressionAttributeNamesT&& value) {
172 SetExpressionAttributeNames(std::forward<ExpressionAttributeNamesT>(value));
173 return *this;
174 }
175 template <typename ExpressionAttributeNamesKeyT = Aws::String, typename ExpressionAttributeNamesValueT = Aws::String>
176 KeysAndAttributes& AddExpressionAttributeNames(ExpressionAttributeNamesKeyT&& key, ExpressionAttributeNamesValueT&& value) {
177 m_expressionAttributeNamesHasBeenSet = true;
178 m_expressionAttributeNames.emplace(std::forward<ExpressionAttributeNamesKeyT>(key),
179 std::forward<ExpressionAttributeNamesValueT>(value));
180 return *this;
181 }
183 private:
185
186 Aws::Vector<Aws::String> m_attributesToGet;
187
188 bool m_consistentRead{false};
189
190 Aws::String m_projectionExpression;
191
192 Aws::Map<Aws::String, Aws::String> m_expressionAttributeNames;
193 bool m_keysHasBeenSet = false;
194 bool m_attributesToGetHasBeenSet = false;
195 bool m_consistentReadHasBeenSet = false;
196 bool m_projectionExpressionHasBeenSet = false;
197 bool m_expressionAttributeNamesHasBeenSet = false;
198};
199
200} // namespace Model
201} // namespace DynamoDB
202} // namespace Aws
KeysAndAttributes & AddAttributesToGet(AttributesToGetT &&value)
KeysAndAttributes & WithProjectionExpression(ProjectionExpressionT &&value)
AWS_DYNAMODB_API KeysAndAttributes & operator=(Aws::Utils::Json::JsonView jsonValue)
KeysAndAttributes & AddKeys(KeysT &&value)
const Aws::Map< Aws::String, Aws::String > & GetExpressionAttributeNames() const
AWS_DYNAMODB_API KeysAndAttributes(Aws::Utils::Json::JsonView jsonValue)
void SetAttributesToGet(AttributesToGetT &&value)
void SetExpressionAttributeNames(ExpressionAttributeNamesT &&value)
KeysAndAttributes & AddExpressionAttributeNames(ExpressionAttributeNamesKeyT &&key, ExpressionAttributeNamesValueT &&value)
KeysAndAttributes & WithConsistentRead(bool value)
const Aws::Vector< Aws::Map< Aws::String, AttributeValue > > & GetKeys() const
AWS_DYNAMODB_API KeysAndAttributes()=default
const Aws::Vector< Aws::String > & GetAttributesToGet() const
KeysAndAttributes & WithAttributesToGet(AttributesToGetT &&value)
KeysAndAttributes & WithExpressionAttributeNames(ExpressionAttributeNamesT &&value)
KeysAndAttributes & WithKeys(KeysT &&value)
AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const
void SetProjectionExpression(ProjectionExpressionT &&value)
const Aws::String & GetProjectionExpression() 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
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue