AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
ScanRequest.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/DynamoDBRequest.h>
11#include <aws/dynamodb/DynamoDB_EXPORTS.h>
12#include <aws/dynamodb/model/AttributeValue.h>
13#include <aws/dynamodb/model/Condition.h>
14#include <aws/dynamodb/model/ConditionalOperator.h>
15#include <aws/dynamodb/model/ReturnConsumedCapacity.h>
16#include <aws/dynamodb/model/Select.h>
17
18#include <utility>
19
20namespace Aws {
21namespace DynamoDB {
22namespace Model {
23
31 public:
32 AWS_DYNAMODB_API ScanRequest() = default;
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 "Scan"; }
39
40 AWS_DYNAMODB_API Aws::String SerializePayload() const override;
41
43
47 AWS_DYNAMODB_API EndpointParameters GetEndpointContextParams() const override;
48
50
56 inline const Aws::String& GetTableName() const { return m_tableName; }
57 inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
58 template <typename TableNameT = Aws::String>
59 void SetTableName(TableNameT&& value) {
60 m_tableNameHasBeenSet = true;
61 m_tableName = std::forward<TableNameT>(value);
62 }
63 template <typename TableNameT = Aws::String>
64 ScanRequest& WithTableName(TableNameT&& value) {
65 SetTableName(std::forward<TableNameT>(value));
66 return *this;
67 }
69
71
76 inline const Aws::String& GetIndexName() const { return m_indexName; }
77 inline bool IndexNameHasBeenSet() const { return m_indexNameHasBeenSet; }
78 template <typename IndexNameT = Aws::String>
79 void SetIndexName(IndexNameT&& value) {
80 m_indexNameHasBeenSet = true;
81 m_indexName = std::forward<IndexNameT>(value);
82 }
83 template <typename IndexNameT = Aws::String>
84 ScanRequest& WithIndexName(IndexNameT&& value) {
85 SetIndexName(std::forward<IndexNameT>(value));
86 return *this;
87 }
89
91
97 inline const Aws::Vector<Aws::String>& GetAttributesToGet() const { return m_attributesToGet; }
98 inline bool AttributesToGetHasBeenSet() const { return m_attributesToGetHasBeenSet; }
99 template <typename AttributesToGetT = Aws::Vector<Aws::String>>
100 void SetAttributesToGet(AttributesToGetT&& value) {
101 m_attributesToGetHasBeenSet = true;
102 m_attributesToGet = std::forward<AttributesToGetT>(value);
103 }
104 template <typename AttributesToGetT = Aws::Vector<Aws::String>>
105 ScanRequest& WithAttributesToGet(AttributesToGetT&& value) {
106 SetAttributesToGet(std::forward<AttributesToGetT>(value));
107 return *this;
108 }
109 template <typename AttributesToGetT = Aws::String>
110 ScanRequest& AddAttributesToGet(AttributesToGetT&& value) {
111 m_attributesToGetHasBeenSet = true;
112 m_attributesToGet.emplace_back(std::forward<AttributesToGetT>(value));
113 return *this;
114 }
116
118
131 inline int GetLimit() const { return m_limit; }
132 inline bool LimitHasBeenSet() const { return m_limitHasBeenSet; }
133 inline void SetLimit(int value) {
134 m_limitHasBeenSet = true;
135 m_limit = value;
136 }
137 inline ScanRequest& WithLimit(int value) {
138 SetLimit(value);
139 return *this;
140 }
142
144
184 inline Select GetSelect() const { return m_select; }
185 inline bool SelectHasBeenSet() const { return m_selectHasBeenSet; }
186 inline void SetSelect(Select value) {
187 m_selectHasBeenSet = true;
188 m_select = value;
189 }
191 SetSelect(value);
192 return *this;
193 }
195
197
203 inline const Aws::Map<Aws::String, Condition>& GetScanFilter() const { return m_scanFilter; }
204 inline bool ScanFilterHasBeenSet() const { return m_scanFilterHasBeenSet; }
205 template <typename ScanFilterT = Aws::Map<Aws::String, Condition>>
206 void SetScanFilter(ScanFilterT&& value) {
207 m_scanFilterHasBeenSet = true;
208 m_scanFilter = std::forward<ScanFilterT>(value);
209 }
210 template <typename ScanFilterT = Aws::Map<Aws::String, Condition>>
211 ScanRequest& WithScanFilter(ScanFilterT&& value) {
212 SetScanFilter(std::forward<ScanFilterT>(value));
213 return *this;
214 }
215 template <typename ScanFilterKeyT = Aws::String, typename ScanFilterValueT = Condition>
216 ScanRequest& AddScanFilter(ScanFilterKeyT&& key, ScanFilterValueT&& value) {
217 m_scanFilterHasBeenSet = true;
218 m_scanFilter.emplace(std::forward<ScanFilterKeyT>(key), std::forward<ScanFilterValueT>(value));
219 return *this;
220 }
222
224
230 inline ConditionalOperator GetConditionalOperator() const { return m_conditionalOperator; }
231 inline bool ConditionalOperatorHasBeenSet() const { return m_conditionalOperatorHasBeenSet; }
233 m_conditionalOperatorHasBeenSet = true;
234 m_conditionalOperator = value;
235 }
238 return *this;
239 }
241
243
252 inline const Aws::Map<Aws::String, AttributeValue>& GetExclusiveStartKey() const { return m_exclusiveStartKey; }
253 inline bool ExclusiveStartKeyHasBeenSet() const { return m_exclusiveStartKeyHasBeenSet; }
254 template <typename ExclusiveStartKeyT = Aws::Map<Aws::String, AttributeValue>>
255 void SetExclusiveStartKey(ExclusiveStartKeyT&& value) {
256 m_exclusiveStartKeyHasBeenSet = true;
257 m_exclusiveStartKey = std::forward<ExclusiveStartKeyT>(value);
258 }
259 template <typename ExclusiveStartKeyT = Aws::Map<Aws::String, AttributeValue>>
260 ScanRequest& WithExclusiveStartKey(ExclusiveStartKeyT&& value) {
261 SetExclusiveStartKey(std::forward<ExclusiveStartKeyT>(value));
262 return *this;
263 }
264 template <typename ExclusiveStartKeyKeyT = Aws::String, typename ExclusiveStartKeyValueT = AttributeValue>
265 ScanRequest& AddExclusiveStartKey(ExclusiveStartKeyKeyT&& key, ExclusiveStartKeyValueT&& value) {
266 m_exclusiveStartKeyHasBeenSet = true;
267 m_exclusiveStartKey.emplace(std::forward<ExclusiveStartKeyKeyT>(key), std::forward<ExclusiveStartKeyValueT>(value));
268 return *this;
269 }
271
273
274 inline ReturnConsumedCapacity GetReturnConsumedCapacity() const { return m_returnConsumedCapacity; }
275 inline bool ReturnConsumedCapacityHasBeenSet() const { return m_returnConsumedCapacityHasBeenSet; }
277 m_returnConsumedCapacityHasBeenSet = true;
278 m_returnConsumedCapacity = value;
279 }
282 return *this;
283 }
285
287
300 inline int GetTotalSegments() const { return m_totalSegments; }
301 inline bool TotalSegmentsHasBeenSet() const { return m_totalSegmentsHasBeenSet; }
302 inline void SetTotalSegments(int value) {
303 m_totalSegmentsHasBeenSet = true;
304 m_totalSegments = value;
305 }
306 inline ScanRequest& WithTotalSegments(int value) {
307 SetTotalSegments(value);
308 return *this;
309 }
311
313
327 inline int GetSegment() const { return m_segment; }
328 inline bool SegmentHasBeenSet() const { return m_segmentHasBeenSet; }
329 inline void SetSegment(int value) {
330 m_segmentHasBeenSet = true;
331 m_segment = value;
332 }
333 inline ScanRequest& WithSegment(int value) {
334 SetSegment(value);
335 return *this;
336 }
338
340
350 inline const Aws::String& GetProjectionExpression() const { return m_projectionExpression; }
351 inline bool ProjectionExpressionHasBeenSet() const { return m_projectionExpressionHasBeenSet; }
352 template <typename ProjectionExpressionT = Aws::String>
353 void SetProjectionExpression(ProjectionExpressionT&& value) {
354 m_projectionExpressionHasBeenSet = true;
355 m_projectionExpression = std::forward<ProjectionExpressionT>(value);
356 }
357 template <typename ProjectionExpressionT = Aws::String>
358 ScanRequest& WithProjectionExpression(ProjectionExpressionT&& value) {
359 SetProjectionExpression(std::forward<ProjectionExpressionT>(value));
360 return *this;
361 }
363
365
375 inline const Aws::String& GetFilterExpression() const { return m_filterExpression; }
376 inline bool FilterExpressionHasBeenSet() const { return m_filterExpressionHasBeenSet; }
377 template <typename FilterExpressionT = Aws::String>
378 void SetFilterExpression(FilterExpressionT&& value) {
379 m_filterExpressionHasBeenSet = true;
380 m_filterExpression = std::forward<FilterExpressionT>(value);
381 }
382 template <typename FilterExpressionT = Aws::String>
383 ScanRequest& WithFilterExpression(FilterExpressionT&& value) {
384 SetFilterExpression(std::forward<FilterExpressionT>(value));
385 return *this;
386 }
388
390
415 inline const Aws::Map<Aws::String, Aws::String>& GetExpressionAttributeNames() const { return m_expressionAttributeNames; }
416 inline bool ExpressionAttributeNamesHasBeenSet() const { return m_expressionAttributeNamesHasBeenSet; }
417 template <typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
418 void SetExpressionAttributeNames(ExpressionAttributeNamesT&& value) {
419 m_expressionAttributeNamesHasBeenSet = true;
420 m_expressionAttributeNames = std::forward<ExpressionAttributeNamesT>(value);
421 }
422 template <typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
423 ScanRequest& WithExpressionAttributeNames(ExpressionAttributeNamesT&& value) {
424 SetExpressionAttributeNames(std::forward<ExpressionAttributeNamesT>(value));
425 return *this;
426 }
427 template <typename ExpressionAttributeNamesKeyT = Aws::String, typename ExpressionAttributeNamesValueT = Aws::String>
428 ScanRequest& AddExpressionAttributeNames(ExpressionAttributeNamesKeyT&& key, ExpressionAttributeNamesValueT&& value) {
429 m_expressionAttributeNamesHasBeenSet = true;
430 m_expressionAttributeNames.emplace(std::forward<ExpressionAttributeNamesKeyT>(key),
431 std::forward<ExpressionAttributeNamesValueT>(value));
432 return *this;
433 }
435
437
452 inline const Aws::Map<Aws::String, AttributeValue>& GetExpressionAttributeValues() const { return m_expressionAttributeValues; }
453 inline bool ExpressionAttributeValuesHasBeenSet() const { return m_expressionAttributeValuesHasBeenSet; }
454 template <typename ExpressionAttributeValuesT = Aws::Map<Aws::String, AttributeValue>>
455 void SetExpressionAttributeValues(ExpressionAttributeValuesT&& value) {
456 m_expressionAttributeValuesHasBeenSet = true;
457 m_expressionAttributeValues = std::forward<ExpressionAttributeValuesT>(value);
458 }
459 template <typename ExpressionAttributeValuesT = Aws::Map<Aws::String, AttributeValue>>
460 ScanRequest& WithExpressionAttributeValues(ExpressionAttributeValuesT&& value) {
461 SetExpressionAttributeValues(std::forward<ExpressionAttributeValuesT>(value));
462 return *this;
463 }
464 template <typename ExpressionAttributeValuesKeyT = Aws::String, typename ExpressionAttributeValuesValueT = AttributeValue>
465 ScanRequest& AddExpressionAttributeValues(ExpressionAttributeValuesKeyT&& key, ExpressionAttributeValuesValueT&& value) {
466 m_expressionAttributeValuesHasBeenSet = true;
467 m_expressionAttributeValues.emplace(std::forward<ExpressionAttributeValuesKeyT>(key),
468 std::forward<ExpressionAttributeValuesValueT>(value));
469 return *this;
470 }
472
474
488 inline bool GetConsistentRead() const { return m_consistentRead; }
489 inline bool ConsistentReadHasBeenSet() const { return m_consistentReadHasBeenSet; }
490 inline void SetConsistentRead(bool value) {
491 m_consistentReadHasBeenSet = true;
492 m_consistentRead = value;
493 }
494 inline ScanRequest& WithConsistentRead(bool value) {
495 SetConsistentRead(value);
496 return *this;
497 }
499 private:
500 Aws::String m_tableName;
501
502 Aws::String m_indexName;
503
504 Aws::Vector<Aws::String> m_attributesToGet;
505
506 int m_limit{0};
507
508 Select m_select{Select::NOT_SET};
509
511
513
514 Aws::Map<Aws::String, AttributeValue> m_exclusiveStartKey;
515
517
518 int m_totalSegments{0};
519
520 int m_segment{0};
521
522 Aws::String m_projectionExpression;
523
524 Aws::String m_filterExpression;
525
526 Aws::Map<Aws::String, Aws::String> m_expressionAttributeNames;
527
528 Aws::Map<Aws::String, AttributeValue> m_expressionAttributeValues;
529
530 bool m_consistentRead{false};
531 bool m_tableNameHasBeenSet = false;
532 bool m_indexNameHasBeenSet = false;
533 bool m_attributesToGetHasBeenSet = false;
534 bool m_limitHasBeenSet = false;
535 bool m_selectHasBeenSet = false;
536 bool m_scanFilterHasBeenSet = false;
537 bool m_conditionalOperatorHasBeenSet = false;
538 bool m_exclusiveStartKeyHasBeenSet = false;
539 bool m_returnConsumedCapacityHasBeenSet = false;
540 bool m_totalSegmentsHasBeenSet = false;
541 bool m_segmentHasBeenSet = false;
542 bool m_projectionExpressionHasBeenSet = false;
543 bool m_filterExpressionHasBeenSet = false;
544 bool m_expressionAttributeNamesHasBeenSet = false;
545 bool m_expressionAttributeValuesHasBeenSet = false;
546 bool m_consistentReadHasBeenSet = false;
547};
548
549} // namespace Model
550} // namespace DynamoDB
551} // namespace Aws
Aws::Endpoint::EndpointParameters EndpointParameters
ScanRequest & WithConsistentRead(bool value)
const Aws::String & GetTableName() const
Definition ScanRequest.h:56
AWS_DYNAMODB_API Aws::String SerializePayload() const override
void SetAttributesToGet(AttributesToGetT &&value)
ScanRequest & WithSelect(Select value)
void SetExpressionAttributeValues(ExpressionAttributeValuesT &&value)
const Aws::Map< Aws::String, AttributeValue > & GetExpressionAttributeValues() const
ReturnConsumedCapacity GetReturnConsumedCapacity() const
ScanRequest & WithSegment(int value)
ScanRequest & AddExclusiveStartKey(ExclusiveStartKeyKeyT &&key, ExclusiveStartKeyValueT &&value)
bool ExpressionAttributeNamesHasBeenSet() const
void SetFilterExpression(FilterExpressionT &&value)
void SetIndexName(IndexNameT &&value)
Definition ScanRequest.h:79
const Aws::Map< Aws::String, AttributeValue > & GetExclusiveStartKey() const
const Aws::Vector< Aws::String > & GetAttributesToGet() const
Definition ScanRequest.h:97
void SetScanFilter(ScanFilterT &&value)
const Aws::String & GetIndexName() const
Definition ScanRequest.h:76
ScanRequest & AddAttributesToGet(AttributesToGetT &&value)
const Aws::Map< Aws::String, Aws::String > & GetExpressionAttributeNames() const
ScanRequest & WithExpressionAttributeNames(ExpressionAttributeNamesT &&value)
ScanRequest & AddExpressionAttributeNames(ExpressionAttributeNamesKeyT &&key, ExpressionAttributeNamesValueT &&value)
ScanRequest & WithExpressionAttributeValues(ExpressionAttributeValuesT &&value)
const Aws::String & GetProjectionExpression() const
void SetConditionalOperator(ConditionalOperator value)
ScanRequest & WithLimit(int value)
void SetReturnConsumedCapacity(ReturnConsumedCapacity value)
void SetExclusiveStartKey(ExclusiveStartKeyT &&value)
ScanRequest & WithReturnConsumedCapacity(ReturnConsumedCapacity value)
bool ExpressionAttributeValuesHasBeenSet() const
ScanRequest & WithTableName(TableNameT &&value)
Definition ScanRequest.h:64
bool ReturnConsumedCapacityHasBeenSet() const
AWS_DYNAMODB_API ScanRequest()=default
AWS_DYNAMODB_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::String & GetFilterExpression() const
ScanRequest & WithExclusiveStartKey(ExclusiveStartKeyT &&value)
ScanRequest & AddScanFilter(ScanFilterKeyT &&key, ScanFilterValueT &&value)
ScanRequest & WithProjectionExpression(ProjectionExpressionT &&value)
void SetProjectionExpression(ProjectionExpressionT &&value)
AWS_DYNAMODB_API EndpointParameters GetEndpointContextParams() const override
ConditionalOperator GetConditionalOperator() const
void SetExpressionAttributeNames(ExpressionAttributeNamesT &&value)
ScanRequest & WithTotalSegments(int value)
ScanRequest & WithConditionalOperator(ConditionalOperator value)
const Aws::Map< Aws::String, Condition > & GetScanFilter() const
ScanRequest & AddExpressionAttributeValues(ExpressionAttributeValuesKeyT &&key, ExpressionAttributeValuesValueT &&value)
virtual const char * GetServiceRequestName() const override
Definition ScanRequest.h:38
ScanRequest & WithIndexName(IndexNameT &&value)
Definition ScanRequest.h:84
ScanRequest & WithAttributesToGet(AttributesToGetT &&value)
void SetTableName(TableNameT &&value)
Definition ScanRequest.h:59
ScanRequest & WithScanFilter(ScanFilterT &&value)
ScanRequest & WithFilterExpression(FilterExpressionT &&value)
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