AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
ScanRequest.h
1
6#pragma once
7#include <aws/dynamodb/DynamoDB_EXPORTS.h>
8#include <aws/dynamodb/DynamoDBRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/dynamodb/model/Select.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/dynamodb/model/ConditionalOperator.h>
14#include <aws/dynamodb/model/ReturnConsumedCapacity.h>
15#include <aws/dynamodb/model/Condition.h>
16#include <aws/dynamodb/model/AttributeValue.h>
17#include <utility>
18
19namespace Aws
20{
21namespace DynamoDB
22{
23namespace Model
24{
25
33 {
34 public:
35 AWS_DYNAMODB_API ScanRequest() = default;
36
37 // Service request name is the Operation name which will send this request out,
38 // each operation should has unique request name, so that we can get operation's name from this request.
39 // Note: this is not true for response, multiple operations may have the same response name,
40 // so we can not get operation's name from response.
41 inline virtual const char* GetServiceRequestName() const override { return "Scan"; }
42
43 AWS_DYNAMODB_API Aws::String SerializePayload() const override;
44
46
50 AWS_DYNAMODB_API EndpointParameters GetEndpointContextParams() const override;
51
53
59 inline const Aws::String& GetTableName() const { return m_tableName; }
60 inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
61 template<typename TableNameT = Aws::String>
62 void SetTableName(TableNameT&& value) { m_tableNameHasBeenSet = true; m_tableName = std::forward<TableNameT>(value); }
63 template<typename TableNameT = Aws::String>
64 ScanRequest& WithTableName(TableNameT&& value) { SetTableName(std::forward<TableNameT>(value)); return *this;}
66
68
73 inline const Aws::String& GetIndexName() const { return m_indexName; }
74 inline bool IndexNameHasBeenSet() const { return m_indexNameHasBeenSet; }
75 template<typename IndexNameT = Aws::String>
76 void SetIndexName(IndexNameT&& value) { m_indexNameHasBeenSet = true; m_indexName = std::forward<IndexNameT>(value); }
77 template<typename IndexNameT = Aws::String>
78 ScanRequest& WithIndexName(IndexNameT&& value) { SetIndexName(std::forward<IndexNameT>(value)); return *this;}
80
82
88 inline const Aws::Vector<Aws::String>& GetAttributesToGet() const { return m_attributesToGet; }
89 inline bool AttributesToGetHasBeenSet() const { return m_attributesToGetHasBeenSet; }
90 template<typename AttributesToGetT = Aws::Vector<Aws::String>>
91 void SetAttributesToGet(AttributesToGetT&& value) { m_attributesToGetHasBeenSet = true; m_attributesToGet = std::forward<AttributesToGetT>(value); }
92 template<typename AttributesToGetT = Aws::Vector<Aws::String>>
93 ScanRequest& WithAttributesToGet(AttributesToGetT&& value) { SetAttributesToGet(std::forward<AttributesToGetT>(value)); return *this;}
94 template<typename AttributesToGetT = Aws::String>
95 ScanRequest& AddAttributesToGet(AttributesToGetT&& value) { m_attributesToGetHasBeenSet = true; m_attributesToGet.emplace_back(std::forward<AttributesToGetT>(value)); return *this; }
97
99
112 inline int GetLimit() const { return m_limit; }
113 inline bool LimitHasBeenSet() const { return m_limitHasBeenSet; }
114 inline void SetLimit(int value) { m_limitHasBeenSet = true; m_limit = value; }
115 inline ScanRequest& WithLimit(int value) { SetLimit(value); return *this;}
117
119
159 inline Select GetSelect() const { return m_select; }
160 inline bool SelectHasBeenSet() const { return m_selectHasBeenSet; }
161 inline void SetSelect(Select value) { m_selectHasBeenSet = true; m_select = value; }
162 inline ScanRequest& WithSelect(Select value) { SetSelect(value); return *this;}
164
166
172 inline const Aws::Map<Aws::String, Condition>& GetScanFilter() const { return m_scanFilter; }
173 inline bool ScanFilterHasBeenSet() const { return m_scanFilterHasBeenSet; }
174 template<typename ScanFilterT = Aws::Map<Aws::String, Condition>>
175 void SetScanFilter(ScanFilterT&& value) { m_scanFilterHasBeenSet = true; m_scanFilter = std::forward<ScanFilterT>(value); }
176 template<typename ScanFilterT = Aws::Map<Aws::String, Condition>>
177 ScanRequest& WithScanFilter(ScanFilterT&& value) { SetScanFilter(std::forward<ScanFilterT>(value)); return *this;}
178 template<typename ScanFilterKeyT = Aws::String, typename ScanFilterValueT = Condition>
179 ScanRequest& AddScanFilter(ScanFilterKeyT&& key, ScanFilterValueT&& value) {
180 m_scanFilterHasBeenSet = true; m_scanFilter.emplace(std::forward<ScanFilterKeyT>(key), std::forward<ScanFilterValueT>(value)); return *this;
181 }
183
185
191 inline ConditionalOperator GetConditionalOperator() const { return m_conditionalOperator; }
192 inline bool ConditionalOperatorHasBeenSet() const { return m_conditionalOperatorHasBeenSet; }
193 inline void SetConditionalOperator(ConditionalOperator value) { m_conditionalOperatorHasBeenSet = true; m_conditionalOperator = value; }
196
198
207 inline const Aws::Map<Aws::String, AttributeValue>& GetExclusiveStartKey() const { return m_exclusiveStartKey; }
208 inline bool ExclusiveStartKeyHasBeenSet() const { return m_exclusiveStartKeyHasBeenSet; }
209 template<typename ExclusiveStartKeyT = Aws::Map<Aws::String, AttributeValue>>
210 void SetExclusiveStartKey(ExclusiveStartKeyT&& value) { m_exclusiveStartKeyHasBeenSet = true; m_exclusiveStartKey = std::forward<ExclusiveStartKeyT>(value); }
211 template<typename ExclusiveStartKeyT = Aws::Map<Aws::String, AttributeValue>>
212 ScanRequest& WithExclusiveStartKey(ExclusiveStartKeyT&& value) { SetExclusiveStartKey(std::forward<ExclusiveStartKeyT>(value)); return *this;}
213 template<typename ExclusiveStartKeyKeyT = Aws::String, typename ExclusiveStartKeyValueT = AttributeValue>
214 ScanRequest& AddExclusiveStartKey(ExclusiveStartKeyKeyT&& key, ExclusiveStartKeyValueT&& value) {
215 m_exclusiveStartKeyHasBeenSet = true; m_exclusiveStartKey.emplace(std::forward<ExclusiveStartKeyKeyT>(key), std::forward<ExclusiveStartKeyValueT>(value)); return *this;
216 }
218
220
221 inline ReturnConsumedCapacity GetReturnConsumedCapacity() const { return m_returnConsumedCapacity; }
222 inline bool ReturnConsumedCapacityHasBeenSet() const { return m_returnConsumedCapacityHasBeenSet; }
223 inline void SetReturnConsumedCapacity(ReturnConsumedCapacity value) { m_returnConsumedCapacityHasBeenSet = true; m_returnConsumedCapacity = value; }
226
228
241 inline int GetTotalSegments() const { return m_totalSegments; }
242 inline bool TotalSegmentsHasBeenSet() const { return m_totalSegmentsHasBeenSet; }
243 inline void SetTotalSegments(int value) { m_totalSegmentsHasBeenSet = true; m_totalSegments = value; }
244 inline ScanRequest& WithTotalSegments(int value) { SetTotalSegments(value); return *this;}
246
248
262 inline int GetSegment() const { return m_segment; }
263 inline bool SegmentHasBeenSet() const { return m_segmentHasBeenSet; }
264 inline void SetSegment(int value) { m_segmentHasBeenSet = true; m_segment = value; }
265 inline ScanRequest& WithSegment(int value) { SetSegment(value); return *this;}
267
269
279 inline const Aws::String& GetProjectionExpression() const { return m_projectionExpression; }
280 inline bool ProjectionExpressionHasBeenSet() const { return m_projectionExpressionHasBeenSet; }
281 template<typename ProjectionExpressionT = Aws::String>
282 void SetProjectionExpression(ProjectionExpressionT&& value) { m_projectionExpressionHasBeenSet = true; m_projectionExpression = std::forward<ProjectionExpressionT>(value); }
283 template<typename ProjectionExpressionT = Aws::String>
284 ScanRequest& WithProjectionExpression(ProjectionExpressionT&& value) { SetProjectionExpression(std::forward<ProjectionExpressionT>(value)); return *this;}
286
288
298 inline const Aws::String& GetFilterExpression() const { return m_filterExpression; }
299 inline bool FilterExpressionHasBeenSet() const { return m_filterExpressionHasBeenSet; }
300 template<typename FilterExpressionT = Aws::String>
301 void SetFilterExpression(FilterExpressionT&& value) { m_filterExpressionHasBeenSet = true; m_filterExpression = std::forward<FilterExpressionT>(value); }
302 template<typename FilterExpressionT = Aws::String>
303 ScanRequest& WithFilterExpression(FilterExpressionT&& value) { SetFilterExpression(std::forward<FilterExpressionT>(value)); return *this;}
305
307
332 inline const Aws::Map<Aws::String, Aws::String>& GetExpressionAttributeNames() const { return m_expressionAttributeNames; }
333 inline bool ExpressionAttributeNamesHasBeenSet() const { return m_expressionAttributeNamesHasBeenSet; }
334 template<typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
335 void SetExpressionAttributeNames(ExpressionAttributeNamesT&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames = std::forward<ExpressionAttributeNamesT>(value); }
336 template<typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
337 ScanRequest& WithExpressionAttributeNames(ExpressionAttributeNamesT&& value) { SetExpressionAttributeNames(std::forward<ExpressionAttributeNamesT>(value)); return *this;}
338 template<typename ExpressionAttributeNamesKeyT = Aws::String, typename ExpressionAttributeNamesValueT = Aws::String>
339 ScanRequest& AddExpressionAttributeNames(ExpressionAttributeNamesKeyT&& key, ExpressionAttributeNamesValueT&& value) {
340 m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames.emplace(std::forward<ExpressionAttributeNamesKeyT>(key), std::forward<ExpressionAttributeNamesValueT>(value)); return *this;
341 }
343
345
360 inline const Aws::Map<Aws::String, AttributeValue>& GetExpressionAttributeValues() const { return m_expressionAttributeValues; }
361 inline bool ExpressionAttributeValuesHasBeenSet() const { return m_expressionAttributeValuesHasBeenSet; }
362 template<typename ExpressionAttributeValuesT = Aws::Map<Aws::String, AttributeValue>>
363 void SetExpressionAttributeValues(ExpressionAttributeValuesT&& value) { m_expressionAttributeValuesHasBeenSet = true; m_expressionAttributeValues = std::forward<ExpressionAttributeValuesT>(value); }
364 template<typename ExpressionAttributeValuesT = Aws::Map<Aws::String, AttributeValue>>
365 ScanRequest& WithExpressionAttributeValues(ExpressionAttributeValuesT&& value) { SetExpressionAttributeValues(std::forward<ExpressionAttributeValuesT>(value)); return *this;}
366 template<typename ExpressionAttributeValuesKeyT = Aws::String, typename ExpressionAttributeValuesValueT = AttributeValue>
367 ScanRequest& AddExpressionAttributeValues(ExpressionAttributeValuesKeyT&& key, ExpressionAttributeValuesValueT&& value) {
368 m_expressionAttributeValuesHasBeenSet = true; m_expressionAttributeValues.emplace(std::forward<ExpressionAttributeValuesKeyT>(key), std::forward<ExpressionAttributeValuesValueT>(value)); return *this;
369 }
371
373
387 inline bool GetConsistentRead() const { return m_consistentRead; }
388 inline bool ConsistentReadHasBeenSet() const { return m_consistentReadHasBeenSet; }
389 inline void SetConsistentRead(bool value) { m_consistentReadHasBeenSet = true; m_consistentRead = value; }
390 inline ScanRequest& WithConsistentRead(bool value) { SetConsistentRead(value); return *this;}
392 private:
393
394 Aws::String m_tableName;
395 bool m_tableNameHasBeenSet = false;
396
397 Aws::String m_indexName;
398 bool m_indexNameHasBeenSet = false;
399
400 Aws::Vector<Aws::String> m_attributesToGet;
401 bool m_attributesToGetHasBeenSet = false;
402
403 int m_limit{0};
404 bool m_limitHasBeenSet = false;
405
406 Select m_select{Select::NOT_SET};
407 bool m_selectHasBeenSet = false;
408
410 bool m_scanFilterHasBeenSet = false;
411
413 bool m_conditionalOperatorHasBeenSet = false;
414
415 Aws::Map<Aws::String, AttributeValue> m_exclusiveStartKey;
416 bool m_exclusiveStartKeyHasBeenSet = false;
417
419 bool m_returnConsumedCapacityHasBeenSet = false;
420
421 int m_totalSegments{0};
422 bool m_totalSegmentsHasBeenSet = false;
423
424 int m_segment{0};
425 bool m_segmentHasBeenSet = false;
426
427 Aws::String m_projectionExpression;
428 bool m_projectionExpressionHasBeenSet = false;
429
430 Aws::String m_filterExpression;
431 bool m_filterExpressionHasBeenSet = false;
432
433 Aws::Map<Aws::String, Aws::String> m_expressionAttributeNames;
434 bool m_expressionAttributeNamesHasBeenSet = false;
435
436 Aws::Map<Aws::String, AttributeValue> m_expressionAttributeValues;
437 bool m_expressionAttributeValuesHasBeenSet = false;
438
439 bool m_consistentRead{false};
440 bool m_consistentReadHasBeenSet = false;
441 };
442
443} // namespace Model
444} // namespace DynamoDB
445} // namespace Aws
Aws::Endpoint::EndpointParameters EndpointParameters
ScanRequest & WithConsistentRead(bool value)
const Aws::String & GetTableName() const
Definition ScanRequest.h:59
AWS_DYNAMODB_API Aws::String SerializePayload() const override
void SetAttributesToGet(AttributesToGetT &&value)
Definition ScanRequest.h:91
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:76
const Aws::Map< Aws::String, AttributeValue > & GetExclusiveStartKey() const
const Aws::Vector< Aws::String > & GetAttributesToGet() const
Definition ScanRequest.h:88
void SetScanFilter(ScanFilterT &&value)
const Aws::String & GetIndexName() const
Definition ScanRequest.h:73
ScanRequest & AddAttributesToGet(AttributesToGetT &&value)
Definition ScanRequest.h:95
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:41
ScanRequest & WithIndexName(IndexNameT &&value)
Definition ScanRequest.h:78
ScanRequest & WithAttributesToGet(AttributesToGetT &&value)
Definition ScanRequest.h:93
void SetTableName(TableNameT &&value)
Definition ScanRequest.h:62
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