AWS SDK for C++  0.12.9
AWS SDK for C++
PutRequest.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
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Json
26 {
27  class JsonValue;
28 } // namespace Json
29 } // namespace Utils
30 namespace DynamoDB
31 {
32 namespace Model
33 {
34 
39  {
40  public:
41  PutRequest();
42  PutRequest(const Aws::Utils::Json::JsonValue& jsonValue);
43  PutRequest& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
44  Aws::Utils::Json::JsonValue Jsonize() const;
45 
54  inline const Aws::Map<Aws::String, AttributeValue>& GetItem() const{ return m_item; }
55 
64  inline void SetItem(const Aws::Map<Aws::String, AttributeValue>& value) { m_itemHasBeenSet = true; m_item = value; }
65 
74  inline void SetItem(Aws::Map<Aws::String, AttributeValue>&& value) { m_itemHasBeenSet = true; m_item = value; }
75 
84  inline PutRequest& WithItem(const Aws::Map<Aws::String, AttributeValue>& value) { SetItem(value); return *this;}
85 
94  inline PutRequest& WithItem(Aws::Map<Aws::String, AttributeValue>&& value) { SetItem(value); return *this;}
95 
104  inline PutRequest& AddItem(const Aws::String& key, const AttributeValue& value) { m_itemHasBeenSet = true; m_item[key] = value; return *this; }
105 
114  inline PutRequest& AddItem(Aws::String&& key, const AttributeValue& value) { m_itemHasBeenSet = true; m_item[key] = value; return *this; }
115 
124  inline PutRequest& AddItem(const Aws::String& key, AttributeValue&& value) { m_itemHasBeenSet = true; m_item[key] = value; return *this; }
125 
134  inline PutRequest& AddItem(Aws::String&& key, AttributeValue&& value) { m_itemHasBeenSet = true; m_item[key] = value; return *this; }
135 
144  inline PutRequest& AddItem(const char* key, AttributeValue&& value) { m_itemHasBeenSet = true; m_item[key] = value; return *this; }
145 
154  inline PutRequest& AddItem(const char* key, const AttributeValue& value) { m_itemHasBeenSet = true; m_item[key] = value; return *this; }
155 
156  private:
158  bool m_itemHasBeenSet;
159  };
160 
161 } // namespace Model
162 } // namespace DynamoDB
163 } // namespace Aws
void SetItem(Aws::Map< Aws::String, AttributeValue > &&value)
Definition: PutRequest.h:74
const Aws::Map< Aws::String, AttributeValue > & GetItem() const
Definition: PutRequest.h:54
PutRequest & WithItem(Aws::Map< Aws::String, AttributeValue > &&value)
Definition: PutRequest.h:94
PutRequest & AddItem(Aws::String &&key, AttributeValue &&value)
Definition: PutRequest.h:134
PutRequest & AddItem(const char *key, AttributeValue &&value)
Definition: PutRequest.h:144
void SetItem(const Aws::Map< Aws::String, AttributeValue > &value)
Definition: PutRequest.h:64
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
PutRequest & AddItem(const Aws::String &key, const AttributeValue &value)
Definition: PutRequest.h:104
PutRequest & AddItem(const char *key, const AttributeValue &value)
Definition: PutRequest.h:154
#define AWS_DYNAMODB_API
http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html ...
PutRequest & AddItem(Aws::String &&key, const AttributeValue &value)
Definition: PutRequest.h:114
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
PutRequest & AddItem(const Aws::String &key, AttributeValue &&value)
Definition: PutRequest.h:124
PutRequest & WithItem(const Aws::Map< Aws::String, AttributeValue > &value)
Definition: PutRequest.h:84
JSON (JavaScript Object Notation).