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

Represents the output of a GetItem operation.

See * Also:

AWS * API Reference

*/ class AWS_DYNAMODB_API GetItemResult { public: GetItemResult(); GetItemResult(const Aws::AmazonWebServiceResult& result); GetItemResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

A map of attribute names to AttributeValue objects, as specified * by ProjectionExpression.

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

A map of attribute names to AttributeValue objects, as specified * by ProjectionExpression.

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

A map of attribute names to AttributeValue objects, as specified * by ProjectionExpression.

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

A map of attribute names to AttributeValue objects, as specified * by ProjectionExpression.

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

A map of attribute names to AttributeValue objects, as specified * by ProjectionExpression.

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

A map of attribute names to AttributeValue objects, as specified * by ProjectionExpression.

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

A map of attribute names to AttributeValue objects, as specified * by ProjectionExpression.

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

A map of attribute names to AttributeValue objects, as specified * by ProjectionExpression.

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

A map of attribute names to AttributeValue objects, as specified * by ProjectionExpression.

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

A map of attribute names to AttributeValue objects, as specified * by ProjectionExpression.

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

A map of attribute names to AttributeValue objects, as specified * by ProjectionExpression.

*/ inline GetItemResult& AddItem(const char* key, const AttributeValue& value) { m_item.emplace(key, value); return *this; } /** *

The capacity units consumed by the GetItem operation. The data * returned includes the total provisioned throughput consumed, along with * statistics for the table and any indexes involved in the operation. * ConsumedCapacity is only returned if the * ReturnConsumedCapacity parameter was specified. For more * information, see Read/Write * Capacity Mode in the Amazon DynamoDB Developer Guide.

*/ inline const ConsumedCapacity& GetConsumedCapacity() const{ return m_consumedCapacity; } /** *

The capacity units consumed by the GetItem operation. The data * returned includes the total provisioned throughput consumed, along with * statistics for the table and any indexes involved in the operation. * ConsumedCapacity is only returned if the * ReturnConsumedCapacity parameter was specified. For more * information, see Read/Write * Capacity Mode in the Amazon DynamoDB Developer Guide.

*/ inline void SetConsumedCapacity(const ConsumedCapacity& value) { m_consumedCapacity = value; } /** *

The capacity units consumed by the GetItem operation. The data * returned includes the total provisioned throughput consumed, along with * statistics for the table and any indexes involved in the operation. * ConsumedCapacity is only returned if the * ReturnConsumedCapacity parameter was specified. For more * information, see Read/Write * Capacity Mode in the Amazon DynamoDB Developer Guide.

*/ inline void SetConsumedCapacity(ConsumedCapacity&& value) { m_consumedCapacity = std::move(value); } /** *

The capacity units consumed by the GetItem operation. The data * returned includes the total provisioned throughput consumed, along with * statistics for the table and any indexes involved in the operation. * ConsumedCapacity is only returned if the * ReturnConsumedCapacity parameter was specified. For more * information, see Read/Write * Capacity Mode in the Amazon DynamoDB Developer Guide.

*/ inline GetItemResult& WithConsumedCapacity(const ConsumedCapacity& value) { SetConsumedCapacity(value); return *this;} /** *

The capacity units consumed by the GetItem operation. The data * returned includes the total provisioned throughput consumed, along with * statistics for the table and any indexes involved in the operation. * ConsumedCapacity is only returned if the * ReturnConsumedCapacity parameter was specified. For more * information, see Read/Write * Capacity Mode in the Amazon DynamoDB Developer Guide.

*/ inline GetItemResult& WithConsumedCapacity(ConsumedCapacity&& value) { SetConsumedCapacity(std::move(value)); return *this;} private: Aws::Map m_item; ConsumedCapacity m_consumedCapacity; }; } // namespace Model } // namespace DynamoDB } // namespace Aws