/** * 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 GetItemResult { public: AWS_DYNAMODB_API GetItemResult(); AWS_DYNAMODB_API GetItemResult(const Aws::AmazonWebServiceResult& result); AWS_DYNAMODB_API 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 Provisioned * Throughput 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 Provisioned * Throughput 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 Provisioned * Throughput 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 Provisioned * Throughput 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 Provisioned * Throughput in the Amazon DynamoDB Developer Guide.

*/ inline GetItemResult& WithConsumedCapacity(ConsumedCapacity&& value) { SetConsumedCapacity(std::move(value)); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline GetItemResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline GetItemResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline GetItemResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::Map m_item; ConsumedCapacity m_consumedCapacity; Aws::String m_requestId; }; } // namespace Model } // namespace DynamoDB } // namespace Aws