/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #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 DeleteItem operation.

See * Also:

AWS * API Reference

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

A map of attribute names to AttributeValue objects, representing * the item as it appeared before the DeleteItem operation. This map * appears in the response only if ReturnValues was specified as * ALL_OLD in the request.

*/ inline const Aws::Map& GetAttributes() const{ return m_attributes; } /** *

A map of attribute names to AttributeValue objects, representing * the item as it appeared before the DeleteItem operation. This map * appears in the response only if ReturnValues was specified as * ALL_OLD in the request.

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

A map of attribute names to AttributeValue objects, representing * the item as it appeared before the DeleteItem operation. This map * appears in the response only if ReturnValues was specified as * ALL_OLD in the request.

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

A map of attribute names to AttributeValue objects, representing * the item as it appeared before the DeleteItem operation. This map * appears in the response only if ReturnValues was specified as * ALL_OLD in the request.

*/ inline DeleteItemResult& WithAttributes(const Aws::Map& value) { SetAttributes(value); return *this;} /** *

A map of attribute names to AttributeValue objects, representing * the item as it appeared before the DeleteItem operation. This map * appears in the response only if ReturnValues was specified as * ALL_OLD in the request.

*/ inline DeleteItemResult& WithAttributes(Aws::Map&& value) { SetAttributes(std::move(value)); return *this;} /** *

A map of attribute names to AttributeValue objects, representing * the item as it appeared before the DeleteItem operation. This map * appears in the response only if ReturnValues was specified as * ALL_OLD in the request.

*/ inline DeleteItemResult& AddAttributes(const Aws::String& key, const AttributeValue& value) { m_attributes.emplace(key, value); return *this; } /** *

A map of attribute names to AttributeValue objects, representing * the item as it appeared before the DeleteItem operation. This map * appears in the response only if ReturnValues was specified as * ALL_OLD in the request.

*/ inline DeleteItemResult& AddAttributes(Aws::String&& key, const AttributeValue& value) { m_attributes.emplace(std::move(key), value); return *this; } /** *

A map of attribute names to AttributeValue objects, representing * the item as it appeared before the DeleteItem operation. This map * appears in the response only if ReturnValues was specified as * ALL_OLD in the request.

*/ inline DeleteItemResult& AddAttributes(const Aws::String& key, AttributeValue&& value) { m_attributes.emplace(key, std::move(value)); return *this; } /** *

A map of attribute names to AttributeValue objects, representing * the item as it appeared before the DeleteItem operation. This map * appears in the response only if ReturnValues was specified as * ALL_OLD in the request.

*/ inline DeleteItemResult& AddAttributes(Aws::String&& key, AttributeValue&& value) { m_attributes.emplace(std::move(key), std::move(value)); return *this; } /** *

A map of attribute names to AttributeValue objects, representing * the item as it appeared before the DeleteItem operation. This map * appears in the response only if ReturnValues was specified as * ALL_OLD in the request.

*/ inline DeleteItemResult& AddAttributes(const char* key, AttributeValue&& value) { m_attributes.emplace(key, std::move(value)); return *this; } /** *

A map of attribute names to AttributeValue objects, representing * the item as it appeared before the DeleteItem operation. This map * appears in the response only if ReturnValues was specified as * ALL_OLD in the request.

*/ inline DeleteItemResult& AddAttributes(const char* key, const AttributeValue& value) { m_attributes.emplace(key, value); return *this; } /** *

The capacity units consumed by the DeleteItem 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 DeleteItem 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 DeleteItem 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 DeleteItem 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 DeleteItemResult& WithConsumedCapacity(const ConsumedCapacity& value) { SetConsumedCapacity(value); return *this;} /** *

The capacity units consumed by the DeleteItem 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 DeleteItemResult& WithConsumedCapacity(ConsumedCapacity&& value) { SetConsumedCapacity(std::move(value)); return *this;} /** *

Information about item collections, if any, that were affected by the * DeleteItem operation. ItemCollectionMetrics is only * returned if the ReturnItemCollectionMetrics parameter was * specified. If the table does not have any local secondary indexes, this * information is not returned in the response.

Each * ItemCollectionMetrics element consists of:

  • * ItemCollectionKey - The partition key value of the item collection. * This is the same as the partition key value of the item itself.

  • *

    SizeEstimateRangeGB - An estimate of item collection size, in * gigabytes. This value is a two-element array containing a lower bound and an * upper bound for the estimate. The estimate includes the size of all the items in * the table, plus the size of all attributes projected into all of the local * secondary indexes on that table. Use this estimate to measure whether a local * secondary index is approaching its size limit.

    The estimate is subject to * change over time; therefore, do not rely on the precision or accuracy of the * estimate.

*/ inline const ItemCollectionMetrics& GetItemCollectionMetrics() const{ return m_itemCollectionMetrics; } /** *

Information about item collections, if any, that were affected by the * DeleteItem operation. ItemCollectionMetrics is only * returned if the ReturnItemCollectionMetrics parameter was * specified. If the table does not have any local secondary indexes, this * information is not returned in the response.

Each * ItemCollectionMetrics element consists of:

  • * ItemCollectionKey - The partition key value of the item collection. * This is the same as the partition key value of the item itself.

  • *

    SizeEstimateRangeGB - An estimate of item collection size, in * gigabytes. This value is a two-element array containing a lower bound and an * upper bound for the estimate. The estimate includes the size of all the items in * the table, plus the size of all attributes projected into all of the local * secondary indexes on that table. Use this estimate to measure whether a local * secondary index is approaching its size limit.

    The estimate is subject to * change over time; therefore, do not rely on the precision or accuracy of the * estimate.

*/ inline void SetItemCollectionMetrics(const ItemCollectionMetrics& value) { m_itemCollectionMetrics = value; } /** *

Information about item collections, if any, that were affected by the * DeleteItem operation. ItemCollectionMetrics is only * returned if the ReturnItemCollectionMetrics parameter was * specified. If the table does not have any local secondary indexes, this * information is not returned in the response.

Each * ItemCollectionMetrics element consists of:

  • * ItemCollectionKey - The partition key value of the item collection. * This is the same as the partition key value of the item itself.

  • *

    SizeEstimateRangeGB - An estimate of item collection size, in * gigabytes. This value is a two-element array containing a lower bound and an * upper bound for the estimate. The estimate includes the size of all the items in * the table, plus the size of all attributes projected into all of the local * secondary indexes on that table. Use this estimate to measure whether a local * secondary index is approaching its size limit.

    The estimate is subject to * change over time; therefore, do not rely on the precision or accuracy of the * estimate.

*/ inline void SetItemCollectionMetrics(ItemCollectionMetrics&& value) { m_itemCollectionMetrics = std::move(value); } /** *

Information about item collections, if any, that were affected by the * DeleteItem operation. ItemCollectionMetrics is only * returned if the ReturnItemCollectionMetrics parameter was * specified. If the table does not have any local secondary indexes, this * information is not returned in the response.

Each * ItemCollectionMetrics element consists of:

  • * ItemCollectionKey - The partition key value of the item collection. * This is the same as the partition key value of the item itself.

  • *

    SizeEstimateRangeGB - An estimate of item collection size, in * gigabytes. This value is a two-element array containing a lower bound and an * upper bound for the estimate. The estimate includes the size of all the items in * the table, plus the size of all attributes projected into all of the local * secondary indexes on that table. Use this estimate to measure whether a local * secondary index is approaching its size limit.

    The estimate is subject to * change over time; therefore, do not rely on the precision or accuracy of the * estimate.

*/ inline DeleteItemResult& WithItemCollectionMetrics(const ItemCollectionMetrics& value) { SetItemCollectionMetrics(value); return *this;} /** *

Information about item collections, if any, that were affected by the * DeleteItem operation. ItemCollectionMetrics is only * returned if the ReturnItemCollectionMetrics parameter was * specified. If the table does not have any local secondary indexes, this * information is not returned in the response.

Each * ItemCollectionMetrics element consists of:

  • * ItemCollectionKey - The partition key value of the item collection. * This is the same as the partition key value of the item itself.

  • *

    SizeEstimateRangeGB - An estimate of item collection size, in * gigabytes. This value is a two-element array containing a lower bound and an * upper bound for the estimate. The estimate includes the size of all the items in * the table, plus the size of all attributes projected into all of the local * secondary indexes on that table. Use this estimate to measure whether a local * secondary index is approaching its size limit.

    The estimate is subject to * change over time; therefore, do not rely on the precision or accuracy of the * estimate.

*/ inline DeleteItemResult& WithItemCollectionMetrics(ItemCollectionMetrics&& value) { SetItemCollectionMetrics(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 DeleteItemResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline DeleteItemResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline DeleteItemResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::Map m_attributes; ConsumedCapacity m_consumedCapacity; ItemCollectionMetrics m_itemCollectionMetrics; Aws::String m_requestId; }; } // namespace Model } // namespace DynamoDB } // namespace Aws