AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
KeysAndAttributes.h
1
6#pragma once
7#include <aws/dynamodb/DynamoDB_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/dynamodb/model/AttributeValue.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace DynamoDB
25{
26namespace Model
27{
28
40 {
41 public:
42 AWS_DYNAMODB_API KeysAndAttributes() = default;
43 AWS_DYNAMODB_API KeysAndAttributes(Aws::Utils::Json::JsonView jsonValue);
45 AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const;
46
47
49
53 inline const Aws::Vector<Aws::Map<Aws::String, AttributeValue>>& GetKeys() const { return m_keys; }
54 inline bool KeysHasBeenSet() const { return m_keysHasBeenSet; }
55 template<typename KeysT = Aws::Vector<Aws::Map<Aws::String, AttributeValue>>>
56 void SetKeys(KeysT&& value) { m_keysHasBeenSet = true; m_keys = std::forward<KeysT>(value); }
57 template<typename KeysT = Aws::Vector<Aws::Map<Aws::String, AttributeValue>>>
58 KeysAndAttributes& WithKeys(KeysT&& value) { SetKeys(std::forward<KeysT>(value)); return *this;}
59 template<typename KeysT = Aws::Map<Aws::String, AttributeValue>>
60 KeysAndAttributes& AddKeys(KeysT&& value) { m_keysHasBeenSet = true; m_keys.emplace_back(std::forward<KeysT>(value)); return *this; }
62
64
70 inline const Aws::Vector<Aws::String>& GetAttributesToGet() const { return m_attributesToGet; }
71 inline bool AttributesToGetHasBeenSet() const { return m_attributesToGetHasBeenSet; }
72 template<typename AttributesToGetT = Aws::Vector<Aws::String>>
73 void SetAttributesToGet(AttributesToGetT&& value) { m_attributesToGetHasBeenSet = true; m_attributesToGet = std::forward<AttributesToGetT>(value); }
74 template<typename AttributesToGetT = Aws::Vector<Aws::String>>
75 KeysAndAttributes& WithAttributesToGet(AttributesToGetT&& value) { SetAttributesToGet(std::forward<AttributesToGetT>(value)); return *this;}
76 template<typename AttributesToGetT = Aws::String>
77 KeysAndAttributes& AddAttributesToGet(AttributesToGetT&& value) { m_attributesToGetHasBeenSet = true; m_attributesToGet.emplace_back(std::forward<AttributesToGetT>(value)); return *this; }
79
81
86 inline bool GetConsistentRead() const { return m_consistentRead; }
87 inline bool ConsistentReadHasBeenSet() const { return m_consistentReadHasBeenSet; }
88 inline void SetConsistentRead(bool value) { m_consistentReadHasBeenSet = true; m_consistentRead = value; }
89 inline KeysAndAttributes& WithConsistentRead(bool value) { SetConsistentRead(value); return *this;}
91
93
103 inline const Aws::String& GetProjectionExpression() const { return m_projectionExpression; }
104 inline bool ProjectionExpressionHasBeenSet() const { return m_projectionExpressionHasBeenSet; }
105 template<typename ProjectionExpressionT = Aws::String>
106 void SetProjectionExpression(ProjectionExpressionT&& value) { m_projectionExpressionHasBeenSet = true; m_projectionExpression = std::forward<ProjectionExpressionT>(value); }
107 template<typename ProjectionExpressionT = Aws::String>
108 KeysAndAttributes& WithProjectionExpression(ProjectionExpressionT&& value) { SetProjectionExpression(std::forward<ProjectionExpressionT>(value)); return *this;}
110
112
137 inline const Aws::Map<Aws::String, Aws::String>& GetExpressionAttributeNames() const { return m_expressionAttributeNames; }
138 inline bool ExpressionAttributeNamesHasBeenSet() const { return m_expressionAttributeNamesHasBeenSet; }
139 template<typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
140 void SetExpressionAttributeNames(ExpressionAttributeNamesT&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames = std::forward<ExpressionAttributeNamesT>(value); }
141 template<typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
142 KeysAndAttributes& WithExpressionAttributeNames(ExpressionAttributeNamesT&& value) { SetExpressionAttributeNames(std::forward<ExpressionAttributeNamesT>(value)); return *this;}
143 template<typename ExpressionAttributeNamesKeyT = Aws::String, typename ExpressionAttributeNamesValueT = Aws::String>
144 KeysAndAttributes& AddExpressionAttributeNames(ExpressionAttributeNamesKeyT&& key, ExpressionAttributeNamesValueT&& value) {
145 m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(std::forward<ExpressionAttributeNamesKeyT>(key), std::forward<ExpressionAttributeNamesValueT>(value)); return *this;
146 }
148 private:
149
151 bool m_keysHasBeenSet = false;
152
153 Aws::Vector<Aws::String> m_attributesToGet;
154 bool m_attributesToGetHasBeenSet = false;
155
156 bool m_consistentRead{false};
157 bool m_consistentReadHasBeenSet = false;
158
159 Aws::String m_projectionExpression;
160 bool m_projectionExpressionHasBeenSet = false;
161
162 Aws::Map<Aws::String, Aws::String> m_expressionAttributeNames;
163 bool m_expressionAttributeNamesHasBeenSet = false;
164 };
165
166} // namespace Model
167} // namespace DynamoDB
168} // 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