/** * 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 #include namespace Aws { namespace DynamoDB { namespace Model { /** */ class AWS_DYNAMODB_API TransactWriteItemsRequest : public DynamoDBRequest { public: TransactWriteItemsRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "TransactWriteItems"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

An ordered array of up to 25 TransactWriteItem objects, each of * which contains a ConditionCheck, Put, * Update, or Delete object. These can operate on items * in different tables, but the tables must reside in the same AWS account and * Region, and no two of them can operate on the same item.

*/ inline const Aws::Vector& GetTransactItems() const{ return m_transactItems; } /** *

An ordered array of up to 25 TransactWriteItem objects, each of * which contains a ConditionCheck, Put, * Update, or Delete object. These can operate on items * in different tables, but the tables must reside in the same AWS account and * Region, and no two of them can operate on the same item.

*/ inline bool TransactItemsHasBeenSet() const { return m_transactItemsHasBeenSet; } /** *

An ordered array of up to 25 TransactWriteItem objects, each of * which contains a ConditionCheck, Put, * Update, or Delete object. These can operate on items * in different tables, but the tables must reside in the same AWS account and * Region, and no two of them can operate on the same item.

*/ inline void SetTransactItems(const Aws::Vector& value) { m_transactItemsHasBeenSet = true; m_transactItems = value; } /** *

An ordered array of up to 25 TransactWriteItem objects, each of * which contains a ConditionCheck, Put, * Update, or Delete object. These can operate on items * in different tables, but the tables must reside in the same AWS account and * Region, and no two of them can operate on the same item.

*/ inline void SetTransactItems(Aws::Vector&& value) { m_transactItemsHasBeenSet = true; m_transactItems = std::move(value); } /** *

An ordered array of up to 25 TransactWriteItem objects, each of * which contains a ConditionCheck, Put, * Update, or Delete object. These can operate on items * in different tables, but the tables must reside in the same AWS account and * Region, and no two of them can operate on the same item.

*/ inline TransactWriteItemsRequest& WithTransactItems(const Aws::Vector& value) { SetTransactItems(value); return *this;} /** *

An ordered array of up to 25 TransactWriteItem objects, each of * which contains a ConditionCheck, Put, * Update, or Delete object. These can operate on items * in different tables, but the tables must reside in the same AWS account and * Region, and no two of them can operate on the same item.

*/ inline TransactWriteItemsRequest& WithTransactItems(Aws::Vector&& value) { SetTransactItems(std::move(value)); return *this;} /** *

An ordered array of up to 25 TransactWriteItem objects, each of * which contains a ConditionCheck, Put, * Update, or Delete object. These can operate on items * in different tables, but the tables must reside in the same AWS account and * Region, and no two of them can operate on the same item.

*/ inline TransactWriteItemsRequest& AddTransactItems(const TransactWriteItem& value) { m_transactItemsHasBeenSet = true; m_transactItems.push_back(value); return *this; } /** *

An ordered array of up to 25 TransactWriteItem objects, each of * which contains a ConditionCheck, Put, * Update, or Delete object. These can operate on items * in different tables, but the tables must reside in the same AWS account and * Region, and no two of them can operate on the same item.

*/ inline TransactWriteItemsRequest& AddTransactItems(TransactWriteItem&& value) { m_transactItemsHasBeenSet = true; m_transactItems.push_back(std::move(value)); return *this; } inline const ReturnConsumedCapacity& GetReturnConsumedCapacity() const{ return m_returnConsumedCapacity; } inline bool ReturnConsumedCapacityHasBeenSet() const { return m_returnConsumedCapacityHasBeenSet; } inline void SetReturnConsumedCapacity(const ReturnConsumedCapacity& value) { m_returnConsumedCapacityHasBeenSet = true; m_returnConsumedCapacity = value; } inline void SetReturnConsumedCapacity(ReturnConsumedCapacity&& value) { m_returnConsumedCapacityHasBeenSet = true; m_returnConsumedCapacity = std::move(value); } inline TransactWriteItemsRequest& WithReturnConsumedCapacity(const ReturnConsumedCapacity& value) { SetReturnConsumedCapacity(value); return *this;} inline TransactWriteItemsRequest& WithReturnConsumedCapacity(ReturnConsumedCapacity&& value) { SetReturnConsumedCapacity(std::move(value)); return *this;} /** *

Determines whether item collection metrics are returned. If set to * SIZE, the response includes statistics about item collections (if * any), that were modified during the operation and are returned in the response. * If set to NONE (the default), no statistics are returned.

*/ inline const ReturnItemCollectionMetrics& GetReturnItemCollectionMetrics() const{ return m_returnItemCollectionMetrics; } /** *

Determines whether item collection metrics are returned. If set to * SIZE, the response includes statistics about item collections (if * any), that were modified during the operation and are returned in the response. * If set to NONE (the default), no statistics are returned.

*/ inline bool ReturnItemCollectionMetricsHasBeenSet() const { return m_returnItemCollectionMetricsHasBeenSet; } /** *

Determines whether item collection metrics are returned. If set to * SIZE, the response includes statistics about item collections (if * any), that were modified during the operation and are returned in the response. * If set to NONE (the default), no statistics are returned.

*/ inline void SetReturnItemCollectionMetrics(const ReturnItemCollectionMetrics& value) { m_returnItemCollectionMetricsHasBeenSet = true; m_returnItemCollectionMetrics = value; } /** *

Determines whether item collection metrics are returned. If set to * SIZE, the response includes statistics about item collections (if * any), that were modified during the operation and are returned in the response. * If set to NONE (the default), no statistics are returned.

*/ inline void SetReturnItemCollectionMetrics(ReturnItemCollectionMetrics&& value) { m_returnItemCollectionMetricsHasBeenSet = true; m_returnItemCollectionMetrics = std::move(value); } /** *

Determines whether item collection metrics are returned. If set to * SIZE, the response includes statistics about item collections (if * any), that were modified during the operation and are returned in the response. * If set to NONE (the default), no statistics are returned.

*/ inline TransactWriteItemsRequest& WithReturnItemCollectionMetrics(const ReturnItemCollectionMetrics& value) { SetReturnItemCollectionMetrics(value); return *this;} /** *

Determines whether item collection metrics are returned. If set to * SIZE, the response includes statistics about item collections (if * any), that were modified during the operation and are returned in the response. * If set to NONE (the default), no statistics are returned.

*/ inline TransactWriteItemsRequest& WithReturnItemCollectionMetrics(ReturnItemCollectionMetrics&& value) { SetReturnItemCollectionMetrics(std::move(value)); return *this;} /** *

Providing a ClientRequestToken makes the call to * TransactWriteItems idempotent, meaning that multiple identical * calls have the same effect as one single call.

Although multiple * identical calls using the same client request token produce the same result on * the server (no side effects), the responses to the calls might not be the same. * If the ReturnConsumedCapacity> parameter is set, then the * initial TransactWriteItems call returns the amount of write * capacity units consumed in making the changes. Subsequent * TransactWriteItems calls with the same client token return the * number of read capacity units consumed in reading the item.

A client * request token is valid for 10 minutes after the first request that uses it is * completed. After 10 minutes, any request with the same client token is treated * as a new request. Do not resubmit the same request with the same client token * for more than 10 minutes, or the result might not be idempotent.

If you * submit a request with the same client token but a change in other parameters * within the 10-minute idempotency window, DynamoDB returns an * IdempotentParameterMismatch exception.

*/ inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; } /** *

Providing a ClientRequestToken makes the call to * TransactWriteItems idempotent, meaning that multiple identical * calls have the same effect as one single call.

Although multiple * identical calls using the same client request token produce the same result on * the server (no side effects), the responses to the calls might not be the same. * If the ReturnConsumedCapacity> parameter is set, then the * initial TransactWriteItems call returns the amount of write * capacity units consumed in making the changes. Subsequent * TransactWriteItems calls with the same client token return the * number of read capacity units consumed in reading the item.

A client * request token is valid for 10 minutes after the first request that uses it is * completed. After 10 minutes, any request with the same client token is treated * as a new request. Do not resubmit the same request with the same client token * for more than 10 minutes, or the result might not be idempotent.

If you * submit a request with the same client token but a change in other parameters * within the 10-minute idempotency window, DynamoDB returns an * IdempotentParameterMismatch exception.

*/ inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; } /** *

Providing a ClientRequestToken makes the call to * TransactWriteItems idempotent, meaning that multiple identical * calls have the same effect as one single call.

Although multiple * identical calls using the same client request token produce the same result on * the server (no side effects), the responses to the calls might not be the same. * If the ReturnConsumedCapacity> parameter is set, then the * initial TransactWriteItems call returns the amount of write * capacity units consumed in making the changes. Subsequent * TransactWriteItems calls with the same client token return the * number of read capacity units consumed in reading the item.

A client * request token is valid for 10 minutes after the first request that uses it is * completed. After 10 minutes, any request with the same client token is treated * as a new request. Do not resubmit the same request with the same client token * for more than 10 minutes, or the result might not be idempotent.

If you * submit a request with the same client token but a change in other parameters * within the 10-minute idempotency window, DynamoDB returns an * IdempotentParameterMismatch exception.

*/ inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; } /** *

Providing a ClientRequestToken makes the call to * TransactWriteItems idempotent, meaning that multiple identical * calls have the same effect as one single call.

Although multiple * identical calls using the same client request token produce the same result on * the server (no side effects), the responses to the calls might not be the same. * If the ReturnConsumedCapacity> parameter is set, then the * initial TransactWriteItems call returns the amount of write * capacity units consumed in making the changes. Subsequent * TransactWriteItems calls with the same client token return the * number of read capacity units consumed in reading the item.

A client * request token is valid for 10 minutes after the first request that uses it is * completed. After 10 minutes, any request with the same client token is treated * as a new request. Do not resubmit the same request with the same client token * for more than 10 minutes, or the result might not be idempotent.

If you * submit a request with the same client token but a change in other parameters * within the 10-minute idempotency window, DynamoDB returns an * IdempotentParameterMismatch exception.

*/ inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); } /** *

Providing a ClientRequestToken makes the call to * TransactWriteItems idempotent, meaning that multiple identical * calls have the same effect as one single call.

Although multiple * identical calls using the same client request token produce the same result on * the server (no side effects), the responses to the calls might not be the same. * If the ReturnConsumedCapacity> parameter is set, then the * initial TransactWriteItems call returns the amount of write * capacity units consumed in making the changes. Subsequent * TransactWriteItems calls with the same client token return the * number of read capacity units consumed in reading the item.

A client * request token is valid for 10 minutes after the first request that uses it is * completed. After 10 minutes, any request with the same client token is treated * as a new request. Do not resubmit the same request with the same client token * for more than 10 minutes, or the result might not be idempotent.

If you * submit a request with the same client token but a change in other parameters * within the 10-minute idempotency window, DynamoDB returns an * IdempotentParameterMismatch exception.

*/ inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); } /** *

Providing a ClientRequestToken makes the call to * TransactWriteItems idempotent, meaning that multiple identical * calls have the same effect as one single call.

Although multiple * identical calls using the same client request token produce the same result on * the server (no side effects), the responses to the calls might not be the same. * If the ReturnConsumedCapacity> parameter is set, then the * initial TransactWriteItems call returns the amount of write * capacity units consumed in making the changes. Subsequent * TransactWriteItems calls with the same client token return the * number of read capacity units consumed in reading the item.

A client * request token is valid for 10 minutes after the first request that uses it is * completed. After 10 minutes, any request with the same client token is treated * as a new request. Do not resubmit the same request with the same client token * for more than 10 minutes, or the result might not be idempotent.

If you * submit a request with the same client token but a change in other parameters * within the 10-minute idempotency window, DynamoDB returns an * IdempotentParameterMismatch exception.

*/ inline TransactWriteItemsRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;} /** *

Providing a ClientRequestToken makes the call to * TransactWriteItems idempotent, meaning that multiple identical * calls have the same effect as one single call.

Although multiple * identical calls using the same client request token produce the same result on * the server (no side effects), the responses to the calls might not be the same. * If the ReturnConsumedCapacity> parameter is set, then the * initial TransactWriteItems call returns the amount of write * capacity units consumed in making the changes. Subsequent * TransactWriteItems calls with the same client token return the * number of read capacity units consumed in reading the item.

A client * request token is valid for 10 minutes after the first request that uses it is * completed. After 10 minutes, any request with the same client token is treated * as a new request. Do not resubmit the same request with the same client token * for more than 10 minutes, or the result might not be idempotent.

If you * submit a request with the same client token but a change in other parameters * within the 10-minute idempotency window, DynamoDB returns an * IdempotentParameterMismatch exception.

*/ inline TransactWriteItemsRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;} /** *

Providing a ClientRequestToken makes the call to * TransactWriteItems idempotent, meaning that multiple identical * calls have the same effect as one single call.

Although multiple * identical calls using the same client request token produce the same result on * the server (no side effects), the responses to the calls might not be the same. * If the ReturnConsumedCapacity> parameter is set, then the * initial TransactWriteItems call returns the amount of write * capacity units consumed in making the changes. Subsequent * TransactWriteItems calls with the same client token return the * number of read capacity units consumed in reading the item.

A client * request token is valid for 10 minutes after the first request that uses it is * completed. After 10 minutes, any request with the same client token is treated * as a new request. Do not resubmit the same request with the same client token * for more than 10 minutes, or the result might not be idempotent.

If you * submit a request with the same client token but a change in other parameters * within the 10-minute idempotency window, DynamoDB returns an * IdempotentParameterMismatch exception.

*/ inline TransactWriteItemsRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;} private: Aws::Vector m_transactItems; bool m_transactItemsHasBeenSet; ReturnConsumedCapacity m_returnConsumedCapacity; bool m_returnConsumedCapacityHasBeenSet; ReturnItemCollectionMetrics m_returnItemCollectionMetrics; bool m_returnItemCollectionMetricsHasBeenSet; Aws::String m_clientRequestToken; bool m_clientRequestTokenHasBeenSet; }; } // namespace Model } // namespace DynamoDB } // namespace Aws