/** * 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 { /** *

The capacity units consumed by an 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 request asked for it. For more information, see Provisioned * Throughput in the Amazon DynamoDB Developer Guide.

See * Also:

AWS * API Reference

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

The name of the table that was affected by the operation.

*/ inline const Aws::String& GetTableName() const{ return m_tableName; } /** *

The name of the table that was affected by the operation.

*/ inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; } /** *

The name of the table that was affected by the operation.

*/ inline void SetTableName(const Aws::String& value) { m_tableNameHasBeenSet = true; m_tableName = value; } /** *

The name of the table that was affected by the operation.

*/ inline void SetTableName(Aws::String&& value) { m_tableNameHasBeenSet = true; m_tableName = std::move(value); } /** *

The name of the table that was affected by the operation.

*/ inline void SetTableName(const char* value) { m_tableNameHasBeenSet = true; m_tableName.assign(value); } /** *

The name of the table that was affected by the operation.

*/ inline ConsumedCapacity& WithTableName(const Aws::String& value) { SetTableName(value); return *this;} /** *

The name of the table that was affected by the operation.

*/ inline ConsumedCapacity& WithTableName(Aws::String&& value) { SetTableName(std::move(value)); return *this;} /** *

The name of the table that was affected by the operation.

*/ inline ConsumedCapacity& WithTableName(const char* value) { SetTableName(value); return *this;} /** *

The total number of capacity units consumed by the operation.

*/ inline double GetCapacityUnits() const{ return m_capacityUnits; } /** *

The total number of capacity units consumed by the operation.

*/ inline bool CapacityUnitsHasBeenSet() const { return m_capacityUnitsHasBeenSet; } /** *

The total number of capacity units consumed by the operation.

*/ inline void SetCapacityUnits(double value) { m_capacityUnitsHasBeenSet = true; m_capacityUnits = value; } /** *

The total number of capacity units consumed by the operation.

*/ inline ConsumedCapacity& WithCapacityUnits(double value) { SetCapacityUnits(value); return *this;} /** *

The total number of read capacity units consumed by the operation.

*/ inline double GetReadCapacityUnits() const{ return m_readCapacityUnits; } /** *

The total number of read capacity units consumed by the operation.

*/ inline bool ReadCapacityUnitsHasBeenSet() const { return m_readCapacityUnitsHasBeenSet; } /** *

The total number of read capacity units consumed by the operation.

*/ inline void SetReadCapacityUnits(double value) { m_readCapacityUnitsHasBeenSet = true; m_readCapacityUnits = value; } /** *

The total number of read capacity units consumed by the operation.

*/ inline ConsumedCapacity& WithReadCapacityUnits(double value) { SetReadCapacityUnits(value); return *this;} /** *

The total number of write capacity units consumed by the operation.

*/ inline double GetWriteCapacityUnits() const{ return m_writeCapacityUnits; } /** *

The total number of write capacity units consumed by the operation.

*/ inline bool WriteCapacityUnitsHasBeenSet() const { return m_writeCapacityUnitsHasBeenSet; } /** *

The total number of write capacity units consumed by the operation.

*/ inline void SetWriteCapacityUnits(double value) { m_writeCapacityUnitsHasBeenSet = true; m_writeCapacityUnits = value; } /** *

The total number of write capacity units consumed by the operation.

*/ inline ConsumedCapacity& WithWriteCapacityUnits(double value) { SetWriteCapacityUnits(value); return *this;} /** *

The amount of throughput consumed on the table affected by the operation.

*/ inline const Capacity& GetTable() const{ return m_table; } /** *

The amount of throughput consumed on the table affected by the operation.

*/ inline bool TableHasBeenSet() const { return m_tableHasBeenSet; } /** *

The amount of throughput consumed on the table affected by the operation.

*/ inline void SetTable(const Capacity& value) { m_tableHasBeenSet = true; m_table = value; } /** *

The amount of throughput consumed on the table affected by the operation.

*/ inline void SetTable(Capacity&& value) { m_tableHasBeenSet = true; m_table = std::move(value); } /** *

The amount of throughput consumed on the table affected by the operation.

*/ inline ConsumedCapacity& WithTable(const Capacity& value) { SetTable(value); return *this;} /** *

The amount of throughput consumed on the table affected by the operation.

*/ inline ConsumedCapacity& WithTable(Capacity&& value) { SetTable(std::move(value)); return *this;} /** *

The amount of throughput consumed on each local index affected by the * operation.

*/ inline const Aws::Map& GetLocalSecondaryIndexes() const{ return m_localSecondaryIndexes; } /** *

The amount of throughput consumed on each local index affected by the * operation.

*/ inline bool LocalSecondaryIndexesHasBeenSet() const { return m_localSecondaryIndexesHasBeenSet; } /** *

The amount of throughput consumed on each local index affected by the * operation.

*/ inline void SetLocalSecondaryIndexes(const Aws::Map& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes = value; } /** *

The amount of throughput consumed on each local index affected by the * operation.

*/ inline void SetLocalSecondaryIndexes(Aws::Map&& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes = std::move(value); } /** *

The amount of throughput consumed on each local index affected by the * operation.

*/ inline ConsumedCapacity& WithLocalSecondaryIndexes(const Aws::Map& value) { SetLocalSecondaryIndexes(value); return *this;} /** *

The amount of throughput consumed on each local index affected by the * operation.

*/ inline ConsumedCapacity& WithLocalSecondaryIndexes(Aws::Map&& value) { SetLocalSecondaryIndexes(std::move(value)); return *this;} /** *

The amount of throughput consumed on each local index affected by the * operation.

*/ inline ConsumedCapacity& AddLocalSecondaryIndexes(const Aws::String& key, const Capacity& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes.emplace(key, value); return *this; } /** *

The amount of throughput consumed on each local index affected by the * operation.

*/ inline ConsumedCapacity& AddLocalSecondaryIndexes(Aws::String&& key, const Capacity& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes.emplace(std::move(key), value); return *this; } /** *

The amount of throughput consumed on each local index affected by the * operation.

*/ inline ConsumedCapacity& AddLocalSecondaryIndexes(const Aws::String& key, Capacity&& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes.emplace(key, std::move(value)); return *this; } /** *

The amount of throughput consumed on each local index affected by the * operation.

*/ inline ConsumedCapacity& AddLocalSecondaryIndexes(Aws::String&& key, Capacity&& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes.emplace(std::move(key), std::move(value)); return *this; } /** *

The amount of throughput consumed on each local index affected by the * operation.

*/ inline ConsumedCapacity& AddLocalSecondaryIndexes(const char* key, Capacity&& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes.emplace(key, std::move(value)); return *this; } /** *

The amount of throughput consumed on each local index affected by the * operation.

*/ inline ConsumedCapacity& AddLocalSecondaryIndexes(const char* key, const Capacity& value) { m_localSecondaryIndexesHasBeenSet = true; m_localSecondaryIndexes.emplace(key, value); return *this; } /** *

The amount of throughput consumed on each global index affected by the * operation.

*/ inline const Aws::Map& GetGlobalSecondaryIndexes() const{ return m_globalSecondaryIndexes; } /** *

The amount of throughput consumed on each global index affected by the * operation.

*/ inline bool GlobalSecondaryIndexesHasBeenSet() const { return m_globalSecondaryIndexesHasBeenSet; } /** *

The amount of throughput consumed on each global index affected by the * operation.

*/ inline void SetGlobalSecondaryIndexes(const Aws::Map& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes = value; } /** *

The amount of throughput consumed on each global index affected by the * operation.

*/ inline void SetGlobalSecondaryIndexes(Aws::Map&& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes = std::move(value); } /** *

The amount of throughput consumed on each global index affected by the * operation.

*/ inline ConsumedCapacity& WithGlobalSecondaryIndexes(const Aws::Map& value) { SetGlobalSecondaryIndexes(value); return *this;} /** *

The amount of throughput consumed on each global index affected by the * operation.

*/ inline ConsumedCapacity& WithGlobalSecondaryIndexes(Aws::Map&& value) { SetGlobalSecondaryIndexes(std::move(value)); return *this;} /** *

The amount of throughput consumed on each global index affected by the * operation.

*/ inline ConsumedCapacity& AddGlobalSecondaryIndexes(const Aws::String& key, const Capacity& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes.emplace(key, value); return *this; } /** *

The amount of throughput consumed on each global index affected by the * operation.

*/ inline ConsumedCapacity& AddGlobalSecondaryIndexes(Aws::String&& key, const Capacity& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes.emplace(std::move(key), value); return *this; } /** *

The amount of throughput consumed on each global index affected by the * operation.

*/ inline ConsumedCapacity& AddGlobalSecondaryIndexes(const Aws::String& key, Capacity&& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes.emplace(key, std::move(value)); return *this; } /** *

The amount of throughput consumed on each global index affected by the * operation.

*/ inline ConsumedCapacity& AddGlobalSecondaryIndexes(Aws::String&& key, Capacity&& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes.emplace(std::move(key), std::move(value)); return *this; } /** *

The amount of throughput consumed on each global index affected by the * operation.

*/ inline ConsumedCapacity& AddGlobalSecondaryIndexes(const char* key, Capacity&& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes.emplace(key, std::move(value)); return *this; } /** *

The amount of throughput consumed on each global index affected by the * operation.

*/ inline ConsumedCapacity& AddGlobalSecondaryIndexes(const char* key, const Capacity& value) { m_globalSecondaryIndexesHasBeenSet = true; m_globalSecondaryIndexes.emplace(key, value); return *this; } private: Aws::String m_tableName; bool m_tableNameHasBeenSet = false; double m_capacityUnits; bool m_capacityUnitsHasBeenSet = false; double m_readCapacityUnits; bool m_readCapacityUnitsHasBeenSet = false; double m_writeCapacityUnits; bool m_writeCapacityUnitsHasBeenSet = false; Capacity m_table; bool m_tableHasBeenSet = false; Aws::Map m_localSecondaryIndexes; bool m_localSecondaryIndexesHasBeenSet = false; Aws::Map m_globalSecondaryIndexes; bool m_globalSecondaryIndexesHasBeenSet = false; }; } // namespace Model } // namespace DynamoDB } // namespace Aws