AWS SDK for C++

AWS SDK for C++ Version 1.11.774

Loading...
Searching...
No Matches
ScanResult.h
1
6#pragma once
7#include <aws/core/http/HttpResponse.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/dynamodb/DynamoDB_EXPORTS.h>
12#include <aws/dynamodb/model/AttributeValue.h>
13#include <aws/dynamodb/model/ConsumedCapacity.h>
14
15#include <utility>
16
17namespace Aws {
18template <typename RESULT_TYPE>
19class AmazonWebServiceResult;
20
21namespace Utils {
22namespace Json {
23class JsonValue;
24} // namespace Json
25} // namespace Utils
26namespace DynamoDB {
27namespace Model {
35 public:
36 AWS_DYNAMODB_API ScanResult() = default;
39
41
45 inline const Aws::Vector<Aws::Map<Aws::String, AttributeValue>>& GetItems() const { return m_items; }
46 template <typename ItemsT = Aws::Vector<Aws::Map<Aws::String, AttributeValue>>>
47 void SetItems(ItemsT&& value) {
48 m_itemsHasBeenSet = true;
49 m_items = std::forward<ItemsT>(value);
50 }
51 template <typename ItemsT = Aws::Vector<Aws::Map<Aws::String, AttributeValue>>>
52 ScanResult& WithItems(ItemsT&& value) {
53 SetItems(std::forward<ItemsT>(value));
54 return *this;
55 }
56 template <typename ItemsT = Aws::Map<Aws::String, AttributeValue>>
57 ScanResult& AddItems(ItemsT&& value) {
58 m_itemsHasBeenSet = true;
59 m_items.emplace_back(std::forward<ItemsT>(value));
60 return *this;
61 }
63
65
73 inline int GetCount() const { return m_count; }
74 inline void SetCount(int value) {
75 m_countHasBeenSet = true;
76 m_count = value;
77 }
78 inline ScanResult& WithCount(int value) {
79 SetCount(value);
80 return *this;
81 }
83
85
95 inline int GetScannedCount() const { return m_scannedCount; }
96 inline void SetScannedCount(int value) {
97 m_scannedCountHasBeenSet = true;
98 m_scannedCount = value;
99 }
100 inline ScanResult& WithScannedCount(int value) {
101 SetScannedCount(value);
102 return *this;
103 }
105
107
117 inline const Aws::Map<Aws::String, AttributeValue>& GetLastEvaluatedKey() const { return m_lastEvaluatedKey; }
118 template <typename LastEvaluatedKeyT = Aws::Map<Aws::String, AttributeValue>>
119 void SetLastEvaluatedKey(LastEvaluatedKeyT&& value) {
120 m_lastEvaluatedKeyHasBeenSet = true;
121 m_lastEvaluatedKey = std::forward<LastEvaluatedKeyT>(value);
122 }
123 template <typename LastEvaluatedKeyT = Aws::Map<Aws::String, AttributeValue>>
124 ScanResult& WithLastEvaluatedKey(LastEvaluatedKeyT&& value) {
125 SetLastEvaluatedKey(std::forward<LastEvaluatedKeyT>(value));
126 return *this;
127 }
128 template <typename LastEvaluatedKeyKeyT = Aws::String, typename LastEvaluatedKeyValueT = AttributeValue>
129 ScanResult& AddLastEvaluatedKey(LastEvaluatedKeyKeyT&& key, LastEvaluatedKeyValueT&& value) {
130 m_lastEvaluatedKeyHasBeenSet = true;
131 m_lastEvaluatedKey.emplace(std::forward<LastEvaluatedKeyKeyT>(key), std::forward<LastEvaluatedKeyValueT>(value));
132 return *this;
133 }
135
137
148 inline const ConsumedCapacity& GetConsumedCapacity() const { return m_consumedCapacity; }
149 template <typename ConsumedCapacityT = ConsumedCapacity>
150 void SetConsumedCapacity(ConsumedCapacityT&& value) {
151 m_consumedCapacityHasBeenSet = true;
152 m_consumedCapacity = std::forward<ConsumedCapacityT>(value);
153 }
154 template <typename ConsumedCapacityT = ConsumedCapacity>
155 ScanResult& WithConsumedCapacity(ConsumedCapacityT&& value) {
156 SetConsumedCapacity(std::forward<ConsumedCapacityT>(value));
157 return *this;
158 }
160
162
163 inline const Aws::String& GetRequestId() const { return m_requestId; }
164 template <typename RequestIdT = Aws::String>
165 void SetRequestId(RequestIdT&& value) {
166 m_requestIdHasBeenSet = true;
167 m_requestId = std::forward<RequestIdT>(value);
168 }
169 template <typename RequestIdT = Aws::String>
170 ScanResult& WithRequestId(RequestIdT&& value) {
171 SetRequestId(std::forward<RequestIdT>(value));
172 return *this;
173 }
175 inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; }
176
177 private:
179
180 int m_count{0};
181
182 int m_scannedCount{0};
183
184 Aws::Map<Aws::String, AttributeValue> m_lastEvaluatedKey;
185
186 ConsumedCapacity m_consumedCapacity;
187
188 Aws::String m_requestId;
189 Aws::Http::HttpResponseCode m_HttpResponseCode;
190 bool m_itemsHasBeenSet = false;
191 bool m_countHasBeenSet = false;
192 bool m_scannedCountHasBeenSet = false;
193 bool m_lastEvaluatedKeyHasBeenSet = false;
194 bool m_consumedCapacityHasBeenSet = false;
195 bool m_requestIdHasBeenSet = false;
196};
197
198} // namespace Model
199} // namespace DynamoDB
200} // namespace Aws
ScanResult & WithConsumedCapacity(ConsumedCapacityT &&value)
Definition ScanResult.h:155
void SetItems(ItemsT &&value)
Definition ScanResult.h:47
void SetRequestId(RequestIdT &&value)
Definition ScanResult.h:165
ScanResult & WithLastEvaluatedKey(LastEvaluatedKeyT &&value)
Definition ScanResult.h:124
ScanResult & WithRequestId(RequestIdT &&value)
Definition ScanResult.h:170
void SetLastEvaluatedKey(LastEvaluatedKeyT &&value)
Definition ScanResult.h:119
ScanResult & WithScannedCount(int value)
Definition ScanResult.h:100
ScanResult & WithItems(ItemsT &&value)
Definition ScanResult.h:52
const Aws::String & GetRequestId() const
Definition ScanResult.h:163
ScanResult & AddLastEvaluatedKey(LastEvaluatedKeyKeyT &&key, LastEvaluatedKeyValueT &&value)
Definition ScanResult.h:129
const Aws::Vector< Aws::Map< Aws::String, AttributeValue > > & GetItems() const
Definition ScanResult.h:45
ScanResult & AddItems(ItemsT &&value)
Definition ScanResult.h:57
const Aws::Map< Aws::String, AttributeValue > & GetLastEvaluatedKey() const
Definition ScanResult.h:117
Aws::Http::HttpResponseCode GetHttpResponseCode() const
Definition ScanResult.h:175
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:150
const ConsumedCapacity & GetConsumedCapacity() const
Definition ScanResult.h:148
AWS_DYNAMODB_API ScanResult()=default
ScanResult & WithCount(int value)
Definition ScanResult.h:78
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