/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace DynamoDB { namespace Model { /** *

Represents a request to perform a PutItem operation on an * item.

See Also:

AWS * API Reference

*/ class PutRequest { public: AWS_DYNAMODB_API PutRequest(); AWS_DYNAMODB_API PutRequest(Aws::Utils::Json::JsonView jsonValue); AWS_DYNAMODB_API PutRequest& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

A map of attribute name to attribute values, representing the primary key of * an item to be processed by PutItem. All of the table's primary key * attributes must be specified, and their data types must match those of the * table's key schema. If any attributes are present in the item that are part of * an index key schema for the table, their types must match the index key * schema.

*/ inline const Aws::Map& GetItem() const{ return m_item; } /** *

A map of attribute name to attribute values, representing the primary key of * an item to be processed by PutItem. All of the table's primary key * attributes must be specified, and their data types must match those of the * table's key schema. If any attributes are present in the item that are part of * an index key schema for the table, their types must match the index key * schema.

*/ inline bool ItemHasBeenSet() const { return m_itemHasBeenSet; } /** *

A map of attribute name to attribute values, representing the primary key of * an item to be processed by PutItem. All of the table's primary key * attributes must be specified, and their data types must match those of the * table's key schema. If any attributes are present in the item that are part of * an index key schema for the table, their types must match the index key * schema.

*/ inline void SetItem(const Aws::Map& value) { m_itemHasBeenSet = true; m_item = value; } /** *

A map of attribute name to attribute values, representing the primary key of * an item to be processed by PutItem. All of the table's primary key * attributes must be specified, and their data types must match those of the * table's key schema. If any attributes are present in the item that are part of * an index key schema for the table, their types must match the index key * schema.

*/ inline void SetItem(Aws::Map&& value) { m_itemHasBeenSet = true; m_item = std::move(value); } /** *

A map of attribute name to attribute values, representing the primary key of * an item to be processed by PutItem. All of the table's primary key * attributes must be specified, and their data types must match those of the * table's key schema. If any attributes are present in the item that are part of * an index key schema for the table, their types must match the index key * schema.

*/ inline PutRequest& WithItem(const Aws::Map& value) { SetItem(value); return *this;} /** *

A map of attribute name to attribute values, representing the primary key of * an item to be processed by PutItem. All of the table's primary key * attributes must be specified, and their data types must match those of the * table's key schema. If any attributes are present in the item that are part of * an index key schema for the table, their types must match the index key * schema.

*/ inline PutRequest& WithItem(Aws::Map&& value) { SetItem(std::move(value)); return *this;} /** *

A map of attribute name to attribute values, representing the primary key of * an item to be processed by PutItem. All of the table's primary key * attributes must be specified, and their data types must match those of the * table's key schema. If any attributes are present in the item that are part of * an index key schema for the table, their types must match the index key * schema.

*/ inline PutRequest& AddItem(const Aws::String& key, const AttributeValue& value) { m_itemHasBeenSet = true; m_item.emplace(key, value); return *this; } /** *

A map of attribute name to attribute values, representing the primary key of * an item to be processed by PutItem. All of the table's primary key * attributes must be specified, and their data types must match those of the * table's key schema. If any attributes are present in the item that are part of * an index key schema for the table, their types must match the index key * schema.

*/ inline PutRequest& AddItem(Aws::String&& key, const AttributeValue& value) { m_itemHasBeenSet = true; m_item.emplace(std::move(key), value); return *this; } /** *

A map of attribute name to attribute values, representing the primary key of * an item to be processed by PutItem. All of the table's primary key * attributes must be specified, and their data types must match those of the * table's key schema. If any attributes are present in the item that are part of * an index key schema for the table, their types must match the index key * schema.

*/ inline PutRequest& AddItem(const Aws::String& key, AttributeValue&& value) { m_itemHasBeenSet = true; m_item.emplace(key, std::move(value)); return *this; } /** *

A map of attribute name to attribute values, representing the primary key of * an item to be processed by PutItem. All of the table's primary key * attributes must be specified, and their data types must match those of the * table's key schema. If any attributes are present in the item that are part of * an index key schema for the table, their types must match the index key * schema.

*/ inline PutRequest& AddItem(Aws::String&& key, AttributeValue&& value) { m_itemHasBeenSet = true; m_item.emplace(std::move(key), std::move(value)); return *this; } /** *

A map of attribute name to attribute values, representing the primary key of * an item to be processed by PutItem. All of the table's primary key * attributes must be specified, and their data types must match those of the * table's key schema. If any attributes are present in the item that are part of * an index key schema for the table, their types must match the index key * schema.

*/ inline PutRequest& AddItem(const char* key, AttributeValue&& value) { m_itemHasBeenSet = true; m_item.emplace(key, std::move(value)); return *this; } /** *

A map of attribute name to attribute values, representing the primary key of * an item to be processed by PutItem. All of the table's primary key * attributes must be specified, and their data types must match those of the * table's key schema. If any attributes are present in the item that are part of * an index key schema for the table, their types must match the index key * schema.

*/ inline PutRequest& AddItem(const char* key, const AttributeValue& value) { m_itemHasBeenSet = true; m_item.emplace(key, value); return *this; } private: Aws::Map m_item; bool m_itemHasBeenSet = false; }; } // namespace Model } // namespace DynamoDB } // namespace Aws