AWS SDK for C++

AWS SDK for C++ Version 1.11.745

Loading...
Searching...
No Matches
ScanResult.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#include <aws/dynamodb/model/ConsumedCapacity.h>
13
14#include <utility>
15
16namespace Aws {
17template <typename RESULT_TYPE>
18class AmazonWebServiceResult;
19
20namespace Utils {
21namespace Json {
22class JsonValue;
23} // namespace Json
24} // namespace Utils
25namespace DynamoDB {
26namespace Model {
34 public:
35 AWS_DYNAMODB_API ScanResult() = default;
38
40
44 inline const Aws::Vector<Aws::Map<Aws::String, AttributeValue>>& GetItems() const { return m_items; }
45 template <typename ItemsT = Aws::Vector<Aws::Map<Aws::String, AttributeValue>>>
46 void SetItems(ItemsT&& value) {
47 m_itemsHasBeenSet = true;
48 m_items = std::forward<ItemsT>(value);
49 }
50 template <typename ItemsT = Aws::Vector<Aws::Map<Aws::String, AttributeValue>>>
51 ScanResult& WithItems(ItemsT&& value) {
52 SetItems(std::forward<ItemsT>(value));
53 return *this;
54 }
55 template <typename ItemsT = Aws::Map<Aws::String, AttributeValue>>
56 ScanResult& AddItems(ItemsT&& value) {
57 m_itemsHasBeenSet = true;
58 m_items.emplace_back(std::forward<ItemsT>(value));
59 return *this;
60 }
62
64
72 inline int GetCount() const { return m_count; }
73 inline void SetCount(int value) {
74 m_countHasBeenSet = true;
75 m_count = value;
76 }
77 inline ScanResult& WithCount(int value) {
78 SetCount(value);
79 return *this;
80 }
82
84
94 inline int GetScannedCount() const { return m_scannedCount; }
95 inline void SetScannedCount(int value) {
96 m_scannedCountHasBeenSet = true;
97 m_scannedCount = value;
98 }
99 inline ScanResult& WithScannedCount(int value) {
100 SetScannedCount(value);
101 return *this;
102 }
104
106
116 inline const Aws::Map<Aws::String, AttributeValue>& GetLastEvaluatedKey() const { return m_lastEvaluatedKey; }
117 template <typename LastEvaluatedKeyT = Aws::Map<Aws::String, AttributeValue>>
118 void SetLastEvaluatedKey(LastEvaluatedKeyT&& value) {
119 m_lastEvaluatedKeyHasBeenSet = true;
120 m_lastEvaluatedKey = std::forward<LastEvaluatedKeyT>(value);
121 }
122 template <typename LastEvaluatedKeyT = Aws::Map<Aws::String, AttributeValue>>
123 ScanResult& WithLastEvaluatedKey(LastEvaluatedKeyT&& value) {
124 SetLastEvaluatedKey(std::forward<LastEvaluatedKeyT>(value));
125 return *this;
126 }
127 template <typename LastEvaluatedKeyKeyT = Aws::String, typename LastEvaluatedKeyValueT = AttributeValue>
128 ScanResult& AddLastEvaluatedKey(LastEvaluatedKeyKeyT&& key, LastEvaluatedKeyValueT&& value) {
129 m_lastEvaluatedKeyHasBeenSet = true;
130 m_lastEvaluatedKey.emplace(std::forward<LastEvaluatedKeyKeyT>(key), std::forward<LastEvaluatedKeyValueT>(value));
131 return *this;
132 }
134
136
147 inline const ConsumedCapacity& GetConsumedCapacity() const { return m_consumedCapacity; }
148 template <typename ConsumedCapacityT = ConsumedCapacity>
149 void SetConsumedCapacity(ConsumedCapacityT&& value) {
150 m_consumedCapacityHasBeenSet = true;
151 m_consumedCapacity = std::forward<ConsumedCapacityT>(value);
152 }
153 template <typename ConsumedCapacityT = ConsumedCapacity>
154 ScanResult& WithConsumedCapacity(ConsumedCapacityT&& value) {
155 SetConsumedCapacity(std::forward<ConsumedCapacityT>(value));
156 return *this;
157 }
159
161
162 inline const Aws::String& GetRequestId() const { return m_requestId; }
163 template <typename RequestIdT = Aws::String>
164 void SetRequestId(RequestIdT&& value) {
165 m_requestIdHasBeenSet = true;
166 m_requestId = std::forward<RequestIdT>(value);
167 }
168 template <typename RequestIdT = Aws::String>
169 ScanResult& WithRequestId(RequestIdT&& value) {
170 SetRequestId(std::forward<RequestIdT>(value));
171 return *this;
172 }
174 private:
176
177 int m_count{0};
178
179 int m_scannedCount{0};
180
181 Aws::Map<Aws::String, AttributeValue> m_lastEvaluatedKey;
182
183 ConsumedCapacity m_consumedCapacity;
184
185 Aws::String m_requestId;
186 bool m_itemsHasBeenSet = false;
187 bool m_countHasBeenSet = false;
188 bool m_scannedCountHasBeenSet = false;
189 bool m_lastEvaluatedKeyHasBeenSet = false;
190 bool m_consumedCapacityHasBeenSet = false;
191 bool m_requestIdHasBeenSet = false;
192};
193
194} // namespace Model
195} // namespace DynamoDB
196} // namespace Aws
ScanResult & WithConsumedCapacity(ConsumedCapacityT &&value)
Definition ScanResult.h:154
void SetItems(ItemsT &&value)
Definition ScanResult.h:46
void SetRequestId(RequestIdT &&value)
Definition ScanResult.h:164
ScanResult & WithLastEvaluatedKey(LastEvaluatedKeyT &&value)
Definition ScanResult.h:123
ScanResult & WithRequestId(RequestIdT &&value)
Definition ScanResult.h:169
void SetLastEvaluatedKey(LastEvaluatedKeyT &&value)
Definition ScanResult.h:118
ScanResult & WithScannedCount(int value)
Definition ScanResult.h:99
ScanResult & WithItems(ItemsT &&value)
Definition ScanResult.h:51
const Aws::String & GetRequestId() const
Definition ScanResult.h:162
ScanResult & AddLastEvaluatedKey(LastEvaluatedKeyKeyT &&key, LastEvaluatedKeyValueT &&value)
Definition ScanResult.h:128
const Aws::Vector< Aws::Map< Aws::String, AttributeValue > > & GetItems() const
Definition ScanResult.h:44
ScanResult & AddItems(ItemsT &&value)
Definition ScanResult.h:56
const Aws::Map< Aws::String, AttributeValue > & GetLastEvaluatedKey() const
Definition ScanResult.h:116
AWS_DYNAMODB_API ScanResult & operator=(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
AWS_DYNAMODB_API ScanResult(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
void SetConsumedCapacity(ConsumedCapacityT &&value)
Definition ScanResult.h:149
const ConsumedCapacity & GetConsumedCapacity() const
Definition ScanResult.h:147
AWS_DYNAMODB_API ScanResult()=default
ScanResult & WithCount(int value)
Definition ScanResult.h:77
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