/** * 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 #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 BatchGetItem operation.

See * Also:

AWS * API Reference

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

A map of table name to a list of items. Each object in Responses * consists of a table name, along with a map of attribute data consisting of the * data type and attribute value.

*/ inline const Aws::Map>>& GetResponses() const{ return m_responses; } /** *

A map of table name to a list of items. Each object in Responses * consists of a table name, along with a map of attribute data consisting of the * data type and attribute value.

*/ inline void SetResponses(const Aws::Map>>& value) { m_responses = value; } /** *

A map of table name to a list of items. Each object in Responses * consists of a table name, along with a map of attribute data consisting of the * data type and attribute value.

*/ inline void SetResponses(Aws::Map>>&& value) { m_responses = std::move(value); } /** *

A map of table name to a list of items. Each object in Responses * consists of a table name, along with a map of attribute data consisting of the * data type and attribute value.

*/ inline BatchGetItemResult& WithResponses(const Aws::Map>>& value) { SetResponses(value); return *this;} /** *

A map of table name to a list of items. Each object in Responses * consists of a table name, along with a map of attribute data consisting of the * data type and attribute value.

*/ inline BatchGetItemResult& WithResponses(Aws::Map>>&& value) { SetResponses(std::move(value)); return *this;} /** *

A map of table name to a list of items. Each object in Responses * consists of a table name, along with a map of attribute data consisting of the * data type and attribute value.

*/ inline BatchGetItemResult& AddResponses(const Aws::String& key, const Aws::Vector>& value) { m_responses.emplace(key, value); return *this; } /** *

A map of table name to a list of items. Each object in Responses * consists of a table name, along with a map of attribute data consisting of the * data type and attribute value.

*/ inline BatchGetItemResult& AddResponses(Aws::String&& key, const Aws::Vector>& value) { m_responses.emplace(std::move(key), value); return *this; } /** *

A map of table name to a list of items. Each object in Responses * consists of a table name, along with a map of attribute data consisting of the * data type and attribute value.

*/ inline BatchGetItemResult& AddResponses(const Aws::String& key, Aws::Vector>&& value) { m_responses.emplace(key, std::move(value)); return *this; } /** *

A map of table name to a list of items. Each object in Responses * consists of a table name, along with a map of attribute data consisting of the * data type and attribute value.

*/ inline BatchGetItemResult& AddResponses(Aws::String&& key, Aws::Vector>&& value) { m_responses.emplace(std::move(key), std::move(value)); return *this; } /** *

A map of table name to a list of items. Each object in Responses * consists of a table name, along with a map of attribute data consisting of the * data type and attribute value.

*/ inline BatchGetItemResult& AddResponses(const char* key, Aws::Vector>&& value) { m_responses.emplace(key, std::move(value)); return *this; } /** *

A map of table name to a list of items. Each object in Responses * consists of a table name, along with a map of attribute data consisting of the * data type and attribute value.

*/ inline BatchGetItemResult& AddResponses(const char* key, const Aws::Vector>& value) { m_responses.emplace(key, value); return *this; } /** *

A map of tables and their respective keys that were not processed with the * current response. The UnprocessedKeys value is in the same form as * RequestItems, so the value can be provided directly to a subsequent * BatchGetItem operation. For more information, see * RequestItems in the Request Parameters section.

Each element * consists of:

  • Keys - An array of primary key * attribute values that define specific items in the table.

  • * ProjectionExpression - One or more attributes to be retrieved from * the table or index. By default, all attributes are returned. If a requested * attribute is not found, it does not appear in the result.

  • * ConsistentRead - The consistency of a read operation. If set to * true, then a strongly consistent read is used; otherwise, an * eventually consistent read is used.

If there are no * unprocessed keys remaining, the response contains an empty * UnprocessedKeys map.

*/ inline const Aws::Map& GetUnprocessedKeys() const{ return m_unprocessedKeys; } /** *

A map of tables and their respective keys that were not processed with the * current response. The UnprocessedKeys value is in the same form as * RequestItems, so the value can be provided directly to a subsequent * BatchGetItem operation. For more information, see * RequestItems in the Request Parameters section.

Each element * consists of:

  • Keys - An array of primary key * attribute values that define specific items in the table.

  • * ProjectionExpression - One or more attributes to be retrieved from * the table or index. By default, all attributes are returned. If a requested * attribute is not found, it does not appear in the result.

  • * ConsistentRead - The consistency of a read operation. If set to * true, then a strongly consistent read is used; otherwise, an * eventually consistent read is used.

If there are no * unprocessed keys remaining, the response contains an empty * UnprocessedKeys map.

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

A map of tables and their respective keys that were not processed with the * current response. The UnprocessedKeys value is in the same form as * RequestItems, so the value can be provided directly to a subsequent * BatchGetItem operation. For more information, see * RequestItems in the Request Parameters section.

Each element * consists of:

  • Keys - An array of primary key * attribute values that define specific items in the table.

  • * ProjectionExpression - One or more attributes to be retrieved from * the table or index. By default, all attributes are returned. If a requested * attribute is not found, it does not appear in the result.

  • * ConsistentRead - The consistency of a read operation. If set to * true, then a strongly consistent read is used; otherwise, an * eventually consistent read is used.

If there are no * unprocessed keys remaining, the response contains an empty * UnprocessedKeys map.

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

A map of tables and their respective keys that were not processed with the * current response. The UnprocessedKeys value is in the same form as * RequestItems, so the value can be provided directly to a subsequent * BatchGetItem operation. For more information, see * RequestItems in the Request Parameters section.

Each element * consists of:

  • Keys - An array of primary key * attribute values that define specific items in the table.

  • * ProjectionExpression - One or more attributes to be retrieved from * the table or index. By default, all attributes are returned. If a requested * attribute is not found, it does not appear in the result.

  • * ConsistentRead - The consistency of a read operation. If set to * true, then a strongly consistent read is used; otherwise, an * eventually consistent read is used.

If there are no * unprocessed keys remaining, the response contains an empty * UnprocessedKeys map.

*/ inline BatchGetItemResult& WithUnprocessedKeys(const Aws::Map& value) { SetUnprocessedKeys(value); return *this;} /** *

A map of tables and their respective keys that were not processed with the * current response. The UnprocessedKeys value is in the same form as * RequestItems, so the value can be provided directly to a subsequent * BatchGetItem operation. For more information, see * RequestItems in the Request Parameters section.

Each element * consists of:

  • Keys - An array of primary key * attribute values that define specific items in the table.

  • * ProjectionExpression - One or more attributes to be retrieved from * the table or index. By default, all attributes are returned. If a requested * attribute is not found, it does not appear in the result.

  • * ConsistentRead - The consistency of a read operation. If set to * true, then a strongly consistent read is used; otherwise, an * eventually consistent read is used.

If there are no * unprocessed keys remaining, the response contains an empty * UnprocessedKeys map.

*/ inline BatchGetItemResult& WithUnprocessedKeys(Aws::Map&& value) { SetUnprocessedKeys(std::move(value)); return *this;} /** *

A map of tables and their respective keys that were not processed with the * current response. The UnprocessedKeys value is in the same form as * RequestItems, so the value can be provided directly to a subsequent * BatchGetItem operation. For more information, see * RequestItems in the Request Parameters section.

Each element * consists of:

  • Keys - An array of primary key * attribute values that define specific items in the table.

  • * ProjectionExpression - One or more attributes to be retrieved from * the table or index. By default, all attributes are returned. If a requested * attribute is not found, it does not appear in the result.

  • * ConsistentRead - The consistency of a read operation. If set to * true, then a strongly consistent read is used; otherwise, an * eventually consistent read is used.

If there are no * unprocessed keys remaining, the response contains an empty * UnprocessedKeys map.

*/ inline BatchGetItemResult& AddUnprocessedKeys(const Aws::String& key, const KeysAndAttributes& value) { m_unprocessedKeys.emplace(key, value); return *this; } /** *

A map of tables and their respective keys that were not processed with the * current response. The UnprocessedKeys value is in the same form as * RequestItems, so the value can be provided directly to a subsequent * BatchGetItem operation. For more information, see * RequestItems in the Request Parameters section.

Each element * consists of:

  • Keys - An array of primary key * attribute values that define specific items in the table.

  • * ProjectionExpression - One or more attributes to be retrieved from * the table or index. By default, all attributes are returned. If a requested * attribute is not found, it does not appear in the result.

  • * ConsistentRead - The consistency of a read operation. If set to * true, then a strongly consistent read is used; otherwise, an * eventually consistent read is used.

If there are no * unprocessed keys remaining, the response contains an empty * UnprocessedKeys map.

*/ inline BatchGetItemResult& AddUnprocessedKeys(Aws::String&& key, const KeysAndAttributes& value) { m_unprocessedKeys.emplace(std::move(key), value); return *this; } /** *

A map of tables and their respective keys that were not processed with the * current response. The UnprocessedKeys value is in the same form as * RequestItems, so the value can be provided directly to a subsequent * BatchGetItem operation. For more information, see * RequestItems in the Request Parameters section.

Each element * consists of:

  • Keys - An array of primary key * attribute values that define specific items in the table.

  • * ProjectionExpression - One or more attributes to be retrieved from * the table or index. By default, all attributes are returned. If a requested * attribute is not found, it does not appear in the result.

  • * ConsistentRead - The consistency of a read operation. If set to * true, then a strongly consistent read is used; otherwise, an * eventually consistent read is used.

If there are no * unprocessed keys remaining, the response contains an empty * UnprocessedKeys map.

*/ inline BatchGetItemResult& AddUnprocessedKeys(const Aws::String& key, KeysAndAttributes&& value) { m_unprocessedKeys.emplace(key, std::move(value)); return *this; } /** *

A map of tables and their respective keys that were not processed with the * current response. The UnprocessedKeys value is in the same form as * RequestItems, so the value can be provided directly to a subsequent * BatchGetItem operation. For more information, see * RequestItems in the Request Parameters section.

Each element * consists of:

  • Keys - An array of primary key * attribute values that define specific items in the table.

  • * ProjectionExpression - One or more attributes to be retrieved from * the table or index. By default, all attributes are returned. If a requested * attribute is not found, it does not appear in the result.

  • * ConsistentRead - The consistency of a read operation. If set to * true, then a strongly consistent read is used; otherwise, an * eventually consistent read is used.

If there are no * unprocessed keys remaining, the response contains an empty * UnprocessedKeys map.

*/ inline BatchGetItemResult& AddUnprocessedKeys(Aws::String&& key, KeysAndAttributes&& value) { m_unprocessedKeys.emplace(std::move(key), std::move(value)); return *this; } /** *

A map of tables and their respective keys that were not processed with the * current response. The UnprocessedKeys value is in the same form as * RequestItems, so the value can be provided directly to a subsequent * BatchGetItem operation. For more information, see * RequestItems in the Request Parameters section.

Each element * consists of:

  • Keys - An array of primary key * attribute values that define specific items in the table.

  • * ProjectionExpression - One or more attributes to be retrieved from * the table or index. By default, all attributes are returned. If a requested * attribute is not found, it does not appear in the result.

  • * ConsistentRead - The consistency of a read operation. If set to * true, then a strongly consistent read is used; otherwise, an * eventually consistent read is used.

If there are no * unprocessed keys remaining, the response contains an empty * UnprocessedKeys map.

*/ inline BatchGetItemResult& AddUnprocessedKeys(const char* key, KeysAndAttributes&& value) { m_unprocessedKeys.emplace(key, std::move(value)); return *this; } /** *

A map of tables and their respective keys that were not processed with the * current response. The UnprocessedKeys value is in the same form as * RequestItems, so the value can be provided directly to a subsequent * BatchGetItem operation. For more information, see * RequestItems in the Request Parameters section.

Each element * consists of:

  • Keys - An array of primary key * attribute values that define specific items in the table.

  • * ProjectionExpression - One or more attributes to be retrieved from * the table or index. By default, all attributes are returned. If a requested * attribute is not found, it does not appear in the result.

  • * ConsistentRead - The consistency of a read operation. If set to * true, then a strongly consistent read is used; otherwise, an * eventually consistent read is used.

If there are no * unprocessed keys remaining, the response contains an empty * UnprocessedKeys map.

*/ inline BatchGetItemResult& AddUnprocessedKeys(const char* key, const KeysAndAttributes& value) { m_unprocessedKeys.emplace(key, value); return *this; } /** *

The read capacity units consumed by the entire BatchGetItem * operation.

Each element consists of:

  • * TableName - The table that consumed the provisioned throughput.

    *
  • CapacityUnits - The total number of capacity units * consumed.

*/ inline const Aws::Vector& GetConsumedCapacity() const{ return m_consumedCapacity; } /** *

The read capacity units consumed by the entire BatchGetItem * operation.

Each element consists of:

  • * TableName - The table that consumed the provisioned throughput.

    *
  • CapacityUnits - The total number of capacity units * consumed.

*/ inline void SetConsumedCapacity(const Aws::Vector& value) { m_consumedCapacity = value; } /** *

The read capacity units consumed by the entire BatchGetItem * operation.

Each element consists of:

  • * TableName - The table that consumed the provisioned throughput.

    *
  • CapacityUnits - The total number of capacity units * consumed.

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

The read capacity units consumed by the entire BatchGetItem * operation.

Each element consists of:

  • * TableName - The table that consumed the provisioned throughput.

    *
  • CapacityUnits - The total number of capacity units * consumed.

*/ inline BatchGetItemResult& WithConsumedCapacity(const Aws::Vector& value) { SetConsumedCapacity(value); return *this;} /** *

The read capacity units consumed by the entire BatchGetItem * operation.

Each element consists of:

  • * TableName - The table that consumed the provisioned throughput.

    *
  • CapacityUnits - The total number of capacity units * consumed.

*/ inline BatchGetItemResult& WithConsumedCapacity(Aws::Vector&& value) { SetConsumedCapacity(std::move(value)); return *this;} /** *

The read capacity units consumed by the entire BatchGetItem * operation.

Each element consists of:

  • * TableName - The table that consumed the provisioned throughput.

    *
  • CapacityUnits - The total number of capacity units * consumed.

*/ inline BatchGetItemResult& AddConsumedCapacity(const ConsumedCapacity& value) { m_consumedCapacity.push_back(value); return *this; } /** *

The read capacity units consumed by the entire BatchGetItem * operation.

Each element consists of:

  • * TableName - The table that consumed the provisioned throughput.

    *
  • CapacityUnits - The total number of capacity units * consumed.

*/ inline BatchGetItemResult& AddConsumedCapacity(ConsumedCapacity&& value) { m_consumedCapacity.push_back(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 BatchGetItemResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline BatchGetItemResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline BatchGetItemResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::Map>> m_responses; Aws::Map m_unprocessedKeys; Aws::Vector m_consumedCapacity; Aws::String m_requestId; }; } // namespace Model } // namespace DynamoDB } // namespace Aws