AWS SDK for C++  0.14.3
AWS SDK for C++
ScanResult.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
22 
23 namespace Aws
24 {
25 template<typename RESULT_TYPE>
26 class AmazonWebServiceResult;
27 
28 namespace Utils
29 {
30 namespace Json
31 {
32  class JsonValue;
33 } // namespace Json
34 } // namespace Utils
35 namespace DynamoDB
36 {
37 namespace Model
38 {
43  {
44  public:
45  ScanResult();
48 
53  inline const Aws::Vector<Aws::Map<Aws::String, AttributeValue>>& GetItems() const{ return m_items; }
54 
59  inline void SetItems(const Aws::Vector<Aws::Map<Aws::String, AttributeValue>>& value) { m_items = value; }
60 
65  inline void SetItems(Aws::Vector<Aws::Map<Aws::String, AttributeValue>>&& value) { m_items = value; }
66 
71  inline ScanResult& WithItems(const Aws::Vector<Aws::Map<Aws::String, AttributeValue>>& value) { SetItems(value); return *this;}
72 
77  inline ScanResult& WithItems(Aws::Vector<Aws::Map<Aws::String, AttributeValue>>&& value) { SetItems(value); return *this;}
78 
83  inline ScanResult& AddItems(const Aws::Map<Aws::String, AttributeValue>& value) { m_items.push_back(value); return *this; }
84 
89  inline ScanResult& AddItems(Aws::Map<Aws::String, AttributeValue>&& value) { m_items.push_back(value); return *this; }
90 
98  inline int GetCount() const{ return m_count; }
99 
107  inline void SetCount(int value) { m_count = value; }
108 
116  inline ScanResult& WithCount(int value) { SetCount(value); return *this;}
117 
127  inline int GetScannedCount() const{ return m_scannedCount; }
128 
138  inline void SetScannedCount(int value) { m_scannedCount = value; }
139 
149  inline ScanResult& WithScannedCount(int value) { SetScannedCount(value); return *this;}
150 
161  inline const Aws::Map<Aws::String, AttributeValue>& GetLastEvaluatedKey() const{ return m_lastEvaluatedKey; }
162 
173  inline void SetLastEvaluatedKey(const Aws::Map<Aws::String, AttributeValue>& value) { m_lastEvaluatedKey = value; }
174 
185  inline void SetLastEvaluatedKey(Aws::Map<Aws::String, AttributeValue>&& value) { m_lastEvaluatedKey = value; }
186 
197  inline ScanResult& WithLastEvaluatedKey(const Aws::Map<Aws::String, AttributeValue>& value) { SetLastEvaluatedKey(value); return *this;}
198 
209  inline ScanResult& WithLastEvaluatedKey(Aws::Map<Aws::String, AttributeValue>&& value) { SetLastEvaluatedKey(value); return *this;}
210 
221  inline ScanResult& AddLastEvaluatedKey(const Aws::String& key, const AttributeValue& value) { m_lastEvaluatedKey[key] = value; return *this; }
222 
233  inline ScanResult& AddLastEvaluatedKey(Aws::String&& key, const AttributeValue& value) { m_lastEvaluatedKey[key] = value; return *this; }
234 
245  inline ScanResult& AddLastEvaluatedKey(const Aws::String& key, AttributeValue&& value) { m_lastEvaluatedKey[key] = value; return *this; }
246 
257  inline ScanResult& AddLastEvaluatedKey(Aws::String&& key, AttributeValue&& value) { m_lastEvaluatedKey[key] = value; return *this; }
258 
269  inline ScanResult& AddLastEvaluatedKey(const char* key, AttributeValue&& value) { m_lastEvaluatedKey[key] = value; return *this; }
270 
281  inline ScanResult& AddLastEvaluatedKey(const char* key, const AttributeValue& value) { m_lastEvaluatedKey[key] = value; return *this; }
282 
283 
284  inline const ConsumedCapacity& GetConsumedCapacity() const{ return m_consumedCapacity; }
285 
286 
287  inline void SetConsumedCapacity(const ConsumedCapacity& value) { m_consumedCapacity = value; }
288 
289 
290  inline void SetConsumedCapacity(ConsumedCapacity&& value) { m_consumedCapacity = value; }
291 
292 
293  inline ScanResult& WithConsumedCapacity(const ConsumedCapacity& value) { SetConsumedCapacity(value); return *this;}
294 
295 
296  inline ScanResult& WithConsumedCapacity(ConsumedCapacity&& value) { SetConsumedCapacity(value); return *this;}
297 
298  private:
300  int m_count;
301  int m_scannedCount;
302  Aws::Map<Aws::String, AttributeValue> m_lastEvaluatedKey;
303  ConsumedCapacity m_consumedCapacity;
304  };
305 
306 } // namespace Model
307 } // namespace DynamoDB
308 } // namespace Aws
ScanResult & AddLastEvaluatedKey(const Aws::String &key, const AttributeValue &value)
Definition: ScanResult.h:221
ScanResult & WithConsumedCapacity(const ConsumedCapacity &value)
Definition: ScanResult.h:293
ScanResult & AddLastEvaluatedKey(const char *key, const AttributeValue &value)
Definition: ScanResult.h:281
void SetLastEvaluatedKey(const Aws::Map< Aws::String, AttributeValue > &value)
Definition: ScanResult.h:173
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
void SetLastEvaluatedKey(Aws::Map< Aws::String, AttributeValue > &&value)
Definition: ScanResult.h:185
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
ScanResult & AddItems(const Aws::Map< Aws::String, AttributeValue > &value)
Definition: ScanResult.h:83
ScanResult & AddLastEvaluatedKey(const Aws::String &key, AttributeValue &&value)
Definition: ScanResult.h:245
ScanResult & AddLastEvaluatedKey(Aws::String &&key, const AttributeValue &value)
Definition: ScanResult.h:233
const Aws::Vector< Aws::Map< Aws::String, AttributeValue > > & GetItems() const
Definition: ScanResult.h:53
ScanResult & WithConsumedCapacity(ConsumedCapacity &&value)
Definition: ScanResult.h:296
#define AWS_DYNAMODB_API
void SetItems(const Aws::Vector< Aws::Map< Aws::String, AttributeValue >> &value)
Definition: ScanResult.h:59
ScanResult & WithItems(Aws::Vector< Aws::Map< Aws::String, AttributeValue >> &&value)
Definition: ScanResult.h:77
ScanResult & AddLastEvaluatedKey(Aws::String &&key, AttributeValue &&value)
Definition: ScanResult.h:257
ScanResult & WithCount(int value)
Definition: ScanResult.h:116
ScanResult & WithScannedCount(int value)
Definition: ScanResult.h:149
const ConsumedCapacity & GetConsumedCapacity() const
Definition: ScanResult.h:284
ScanResult & WithLastEvaluatedKey(const Aws::Map< Aws::String, AttributeValue > &value)
Definition: ScanResult.h:197
void SetItems(Aws::Vector< Aws::Map< Aws::String, AttributeValue >> &&value)
Definition: ScanResult.h:65
http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html ...
ScanResult & WithLastEvaluatedKey(Aws::Map< Aws::String, AttributeValue > &&value)
Definition: ScanResult.h:209
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
ScanResult & AddItems(Aws::Map< Aws::String, AttributeValue > &&value)
Definition: ScanResult.h:89
ScanResult & WithItems(const Aws::Vector< Aws::Map< Aws::String, AttributeValue >> &value)
Definition: ScanResult.h:71
void SetConsumedCapacity(ConsumedCapacity &&value)
Definition: ScanResult.h:290
void SetConsumedCapacity(const ConsumedCapacity &value)
Definition: ScanResult.h:287
const Aws::Map< Aws::String, AttributeValue > & GetLastEvaluatedKey() const
Definition: ScanResult.h:161
JSON (JavaScript Object Notation).
ScanResult & AddLastEvaluatedKey(const char *key, AttributeValue &&value)
Definition: ScanResult.h:269