AWS SDK for C++  0.14.3
AWS SDK for C++
KeysAndAttributes.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
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Json
27 {
28  class JsonValue;
29 } // namespace Json
30 } // namespace Utils
31 namespace DynamoDB
32 {
33 namespace Model
34 {
35 
44  {
45  public:
48  KeysAndAttributes& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
49  Aws::Utils::Json::JsonValue Jsonize() const;
50 
55  inline const Aws::Vector<Aws::Map<Aws::String, AttributeValue>>& GetKeys() const{ return m_keys; }
56 
61  inline void SetKeys(const Aws::Vector<Aws::Map<Aws::String, AttributeValue>>& value) { m_keysHasBeenSet = true; m_keys = value; }
62 
67  inline void SetKeys(Aws::Vector<Aws::Map<Aws::String, AttributeValue>>&& value) { m_keysHasBeenSet = true; m_keys = value; }
68 
73  inline KeysAndAttributes& WithKeys(const Aws::Vector<Aws::Map<Aws::String, AttributeValue>>& value) { SetKeys(value); return *this;}
74 
79  inline KeysAndAttributes& WithKeys(Aws::Vector<Aws::Map<Aws::String, AttributeValue>>&& value) { SetKeys(value); return *this;}
80 
85  inline KeysAndAttributes& AddKeys(const Aws::Map<Aws::String, AttributeValue>& value) { m_keysHasBeenSet = true; m_keys.push_back(value); return *this; }
86 
91  inline KeysAndAttributes& AddKeys(Aws::Map<Aws::String, AttributeValue>&& value) { m_keysHasBeenSet = true; m_keys.push_back(value); return *this; }
92 
98  inline const Aws::Vector<Aws::String>& GetAttributesToGet() const{ return m_attributesToGet; }
99 
105  inline void SetAttributesToGet(const Aws::Vector<Aws::String>& value) { m_attributesToGetHasBeenSet = true; m_attributesToGet = value; }
106 
112  inline void SetAttributesToGet(Aws::Vector<Aws::String>&& value) { m_attributesToGetHasBeenSet = true; m_attributesToGet = value; }
113 
119  inline KeysAndAttributes& WithAttributesToGet(const Aws::Vector<Aws::String>& value) { SetAttributesToGet(value); return *this;}
120 
126  inline KeysAndAttributes& WithAttributesToGet(Aws::Vector<Aws::String>&& value) { SetAttributesToGet(value); return *this;}
127 
133  inline KeysAndAttributes& AddAttributesToGet(const Aws::String& value) { m_attributesToGetHasBeenSet = true; m_attributesToGet.push_back(value); return *this; }
134 
140  inline KeysAndAttributes& AddAttributesToGet(Aws::String&& value) { m_attributesToGetHasBeenSet = true; m_attributesToGet.push_back(value); return *this; }
141 
147  inline KeysAndAttributes& AddAttributesToGet(const char* value) { m_attributesToGetHasBeenSet = true; m_attributesToGet.push_back(value); return *this; }
148 
154  inline bool GetConsistentRead() const{ return m_consistentRead; }
155 
161  inline void SetConsistentRead(bool value) { m_consistentReadHasBeenSet = true; m_consistentRead = value; }
162 
168  inline KeysAndAttributes& WithConsistentRead(bool value) { SetConsistentRead(value); return *this;}
169 
182  inline const Aws::String& GetProjectionExpression() const{ return m_projectionExpression; }
183 
196  inline void SetProjectionExpression(const Aws::String& value) { m_projectionExpressionHasBeenSet = true; m_projectionExpression = value; }
197 
210  inline void SetProjectionExpression(Aws::String&& value) { m_projectionExpressionHasBeenSet = true; m_projectionExpression = value; }
211 
224  inline void SetProjectionExpression(const char* value) { m_projectionExpressionHasBeenSet = true; m_projectionExpression.assign(value); }
225 
238  inline KeysAndAttributes& WithProjectionExpression(const Aws::String& value) { SetProjectionExpression(value); return *this;}
239 
252  inline KeysAndAttributes& WithProjectionExpression(Aws::String&& value) { SetProjectionExpression(value); return *this;}
253 
266  inline KeysAndAttributes& WithProjectionExpression(const char* value) { SetProjectionExpression(value); return *this;}
267 
292  inline const Aws::Map<Aws::String, Aws::String>& GetExpressionAttributeNames() const{ return m_expressionAttributeNames; }
293 
318  inline void SetExpressionAttributeNames(const Aws::Map<Aws::String, Aws::String>& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames = value; }
319 
344  inline void SetExpressionAttributeNames(Aws::Map<Aws::String, Aws::String>&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames = value; }
345 
370  inline KeysAndAttributes& WithExpressionAttributeNames(const Aws::Map<Aws::String, Aws::String>& value) { SetExpressionAttributeNames(value); return *this;}
371 
396  inline KeysAndAttributes& WithExpressionAttributeNames(Aws::Map<Aws::String, Aws::String>&& value) { SetExpressionAttributeNames(value); return *this;}
397 
422  inline KeysAndAttributes& AddExpressionAttributeNames(const Aws::String& key, const Aws::String& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames[key] = value; return *this; }
423 
448  inline KeysAndAttributes& AddExpressionAttributeNames(Aws::String&& key, const Aws::String& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames[key] = value; return *this; }
449 
474  inline KeysAndAttributes& AddExpressionAttributeNames(const Aws::String& key, Aws::String&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames[key] = value; return *this; }
475 
500  inline KeysAndAttributes& AddExpressionAttributeNames(Aws::String&& key, Aws::String&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames[key] = value; return *this; }
501 
526  inline KeysAndAttributes& AddExpressionAttributeNames(const char* key, Aws::String&& value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames[key] = value; return *this; }
527 
552  inline KeysAndAttributes& AddExpressionAttributeNames(Aws::String&& key, const char* value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames[key] = value; return *this; }
553 
578  inline KeysAndAttributes& AddExpressionAttributeNames(const char* key, const char* value) { m_expressionAttributeNamesHasBeenSet = true; m_expressionAttributeNames[key] = value; return *this; }
579 
580  private:
582  bool m_keysHasBeenSet;
583  Aws::Vector<Aws::String> m_attributesToGet;
584  bool m_attributesToGetHasBeenSet;
585  bool m_consistentRead;
586  bool m_consistentReadHasBeenSet;
587  Aws::String m_projectionExpression;
588  bool m_projectionExpressionHasBeenSet;
589  Aws::Map<Aws::String, Aws::String> m_expressionAttributeNames;
590  bool m_expressionAttributeNamesHasBeenSet;
591  };
592 
593 } // namespace Model
594 } // namespace DynamoDB
595 } // namespace Aws
KeysAndAttributes & WithExpressionAttributeNames(const Aws::Map< Aws::String, Aws::String > &value)
void SetProjectionExpression(const Aws::String &value)
KeysAndAttributes & WithProjectionExpression(const char *value)
void SetExpressionAttributeNames(const Aws::Map< Aws::String, Aws::String > &value)
void SetProjectionExpression(Aws::String &&value)
KeysAndAttributes & WithProjectionExpression(Aws::String &&value)
KeysAndAttributes & AddExpressionAttributeNames(Aws::String &&key, const char *value)
KeysAndAttributes & AddKeys(Aws::Map< Aws::String, AttributeValue > &&value)
const Aws::Vector< Aws::Map< Aws::String, AttributeValue > > & GetKeys() const
KeysAndAttributes & AddExpressionAttributeNames(Aws::String &&key, Aws::String &&value)
KeysAndAttributes & AddExpressionAttributeNames(const char *key, const char *value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
KeysAndAttributes & WithKeys(const Aws::Vector< Aws::Map< Aws::String, AttributeValue >> &value)
KeysAndAttributes & AddExpressionAttributeNames(const Aws::String &key, Aws::String &&value)
KeysAndAttributes & WithAttributesToGet(Aws::Vector< Aws::String > &&value)
#define AWS_DYNAMODB_API
KeysAndAttributes & AddExpressionAttributeNames(Aws::String &&key, const Aws::String &value)
void SetKeys(Aws::Vector< Aws::Map< Aws::String, AttributeValue >> &&value)
KeysAndAttributes & AddAttributesToGet(Aws::String &&value)
KeysAndAttributes & AddAttributesToGet(const char *value)
void SetAttributesToGet(Aws::Vector< Aws::String > &&value)
KeysAndAttributes & WithExpressionAttributeNames(Aws::Map< Aws::String, Aws::String > &&value)
KeysAndAttributes & AddExpressionAttributeNames(const Aws::String &key, const Aws::String &value)
KeysAndAttributes & WithProjectionExpression(const Aws::String &value)
const Aws::String & GetProjectionExpression() const
void SetExpressionAttributeNames(Aws::Map< Aws::String, Aws::String > &&value)
KeysAndAttributes & AddAttributesToGet(const Aws::String &value)
KeysAndAttributes & WithConsistentRead(bool value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
KeysAndAttributes & AddKeys(const Aws::Map< Aws::String, AttributeValue > &value)
KeysAndAttributes & AddExpressionAttributeNames(const char *key, Aws::String &&value)
void SetKeys(const Aws::Vector< Aws::Map< Aws::String, AttributeValue >> &value)
void SetProjectionExpression(const char *value)
const Aws::Map< Aws::String, Aws::String > & GetExpressionAttributeNames() const
void SetAttributesToGet(const Aws::Vector< Aws::String > &value)
KeysAndAttributes & WithKeys(Aws::Vector< Aws::Map< Aws::String, AttributeValue >> &&value)
const Aws::Vector< Aws::String > & GetAttributesToGet() const
JSON (JavaScript Object Notation).
KeysAndAttributes & WithAttributesToGet(const Aws::Vector< Aws::String > &value)