/** * 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 { namespace DynamoDB { namespace Model { /** */ class ExecuteStatementRequest : public DynamoDBRequest { public: AWS_DYNAMODB_API ExecuteStatementRequest(); // 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 "ExecuteStatement"; } AWS_DYNAMODB_API Aws::String SerializePayload() const override; AWS_DYNAMODB_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The PartiQL statement representing the operation to run.

*/ inline const Aws::String& GetStatement() const{ return m_statement; } /** *

The PartiQL statement representing the operation to run.

*/ inline bool StatementHasBeenSet() const { return m_statementHasBeenSet; } /** *

The PartiQL statement representing the operation to run.

*/ inline void SetStatement(const Aws::String& value) { m_statementHasBeenSet = true; m_statement = value; } /** *

The PartiQL statement representing the operation to run.

*/ inline void SetStatement(Aws::String&& value) { m_statementHasBeenSet = true; m_statement = std::move(value); } /** *

The PartiQL statement representing the operation to run.

*/ inline void SetStatement(const char* value) { m_statementHasBeenSet = true; m_statement.assign(value); } /** *

The PartiQL statement representing the operation to run.

*/ inline ExecuteStatementRequest& WithStatement(const Aws::String& value) { SetStatement(value); return *this;} /** *

The PartiQL statement representing the operation to run.

*/ inline ExecuteStatementRequest& WithStatement(Aws::String&& value) { SetStatement(std::move(value)); return *this;} /** *

The PartiQL statement representing the operation to run.

*/ inline ExecuteStatementRequest& WithStatement(const char* value) { SetStatement(value); return *this;} /** *

The parameters for the PartiQL statement, if any.

*/ inline const Aws::Vector& GetParameters() const{ return m_parameters; } /** *

The parameters for the PartiQL statement, if any.

*/ inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; } /** *

The parameters for the PartiQL statement, if any.

*/ inline void SetParameters(const Aws::Vector& value) { m_parametersHasBeenSet = true; m_parameters = value; } /** *

The parameters for the PartiQL statement, if any.

*/ inline void SetParameters(Aws::Vector&& value) { m_parametersHasBeenSet = true; m_parameters = std::move(value); } /** *

The parameters for the PartiQL statement, if any.

*/ inline ExecuteStatementRequest& WithParameters(const Aws::Vector& value) { SetParameters(value); return *this;} /** *

The parameters for the PartiQL statement, if any.

*/ inline ExecuteStatementRequest& WithParameters(Aws::Vector&& value) { SetParameters(std::move(value)); return *this;} /** *

The parameters for the PartiQL statement, if any.

*/ inline ExecuteStatementRequest& AddParameters(const AttributeValue& value) { m_parametersHasBeenSet = true; m_parameters.push_back(value); return *this; } /** *

The parameters for the PartiQL statement, if any.

*/ inline ExecuteStatementRequest& AddParameters(AttributeValue&& value) { m_parametersHasBeenSet = true; m_parameters.push_back(std::move(value)); return *this; } /** *

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

*/ inline bool GetConsistentRead() const{ return m_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.

*/ inline bool ConsistentReadHasBeenSet() const { return m_consistentReadHasBeenSet; } /** *

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

*/ inline void SetConsistentRead(bool value) { m_consistentReadHasBeenSet = true; m_consistentRead = value; } /** *

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

*/ inline ExecuteStatementRequest& WithConsistentRead(bool value) { SetConsistentRead(value); return *this;} /** *

Set this value to get remaining results, if NextToken was * returned in the statement response.

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

Set this value to get remaining results, if NextToken was * returned in the statement response.

*/ inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } /** *

Set this value to get remaining results, if NextToken was * returned in the statement response.

*/ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** *

Set this value to get remaining results, if NextToken was * returned in the statement response.

*/ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** *

Set this value to get remaining results, if NextToken was * returned in the statement response.

*/ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** *

Set this value to get remaining results, if NextToken was * returned in the statement response.

*/ inline ExecuteStatementRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

Set this value to get remaining results, if NextToken was * returned in the statement response.

*/ inline ExecuteStatementRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

Set this value to get remaining results, if NextToken was * returned in the statement response.

*/ inline ExecuteStatementRequest& WithNextToken(const char* value) { SetNextToken(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 ExecuteStatementRequest& WithReturnConsumedCapacity(const ReturnConsumedCapacity& value) { SetReturnConsumedCapacity(value); return *this;} inline ExecuteStatementRequest& WithReturnConsumedCapacity(ReturnConsumedCapacity&& value) { SetReturnConsumedCapacity(std::move(value)); return *this;} /** *

The maximum number of items to evaluate (not necessarily the number of * matching items). If DynamoDB processes the number of items up to the limit while * processing the results, it stops the operation and returns the matching values * up to that point, along with a key in LastEvaluatedKey to apply in * a subsequent operation so you can pick up where you left off. Also, if the * processed dataset size exceeds 1 MB before DynamoDB reaches this limit, it stops * the operation and returns the matching values up to the limit, and a key in * LastEvaluatedKey to apply in a subsequent operation to continue the * operation.

*/ inline int GetLimit() const{ return m_limit; } /** *

The maximum number of items to evaluate (not necessarily the number of * matching items). If DynamoDB processes the number of items up to the limit while * processing the results, it stops the operation and returns the matching values * up to that point, along with a key in LastEvaluatedKey to apply in * a subsequent operation so you can pick up where you left off. Also, if the * processed dataset size exceeds 1 MB before DynamoDB reaches this limit, it stops * the operation and returns the matching values up to the limit, and a key in * LastEvaluatedKey to apply in a subsequent operation to continue the * operation.

*/ inline bool LimitHasBeenSet() const { return m_limitHasBeenSet; } /** *

The maximum number of items to evaluate (not necessarily the number of * matching items). If DynamoDB processes the number of items up to the limit while * processing the results, it stops the operation and returns the matching values * up to that point, along with a key in LastEvaluatedKey to apply in * a subsequent operation so you can pick up where you left off. Also, if the * processed dataset size exceeds 1 MB before DynamoDB reaches this limit, it stops * the operation and returns the matching values up to the limit, and a key in * LastEvaluatedKey to apply in a subsequent operation to continue the * operation.

*/ inline void SetLimit(int value) { m_limitHasBeenSet = true; m_limit = value; } /** *

The maximum number of items to evaluate (not necessarily the number of * matching items). If DynamoDB processes the number of items up to the limit while * processing the results, it stops the operation and returns the matching values * up to that point, along with a key in LastEvaluatedKey to apply in * a subsequent operation so you can pick up where you left off. Also, if the * processed dataset size exceeds 1 MB before DynamoDB reaches this limit, it stops * the operation and returns the matching values up to the limit, and a key in * LastEvaluatedKey to apply in a subsequent operation to continue the * operation.

*/ inline ExecuteStatementRequest& WithLimit(int value) { SetLimit(value); return *this;} /** *

An optional parameter that returns the item attributes for an * ExecuteStatement operation that failed a condition check.

*

There is no additional cost associated with requesting a return value aside * from the small network and processing overhead of receiving a larger response. * No read capacity units are consumed.

*/ inline const ReturnValuesOnConditionCheckFailure& GetReturnValuesOnConditionCheckFailure() const{ return m_returnValuesOnConditionCheckFailure; } /** *

An optional parameter that returns the item attributes for an * ExecuteStatement operation that failed a condition check.

*

There is no additional cost associated with requesting a return value aside * from the small network and processing overhead of receiving a larger response. * No read capacity units are consumed.

*/ inline bool ReturnValuesOnConditionCheckFailureHasBeenSet() const { return m_returnValuesOnConditionCheckFailureHasBeenSet; } /** *

An optional parameter that returns the item attributes for an * ExecuteStatement operation that failed a condition check.

*

There is no additional cost associated with requesting a return value aside * from the small network and processing overhead of receiving a larger response. * No read capacity units are consumed.

*/ inline void SetReturnValuesOnConditionCheckFailure(const ReturnValuesOnConditionCheckFailure& value) { m_returnValuesOnConditionCheckFailureHasBeenSet = true; m_returnValuesOnConditionCheckFailure = value; } /** *

An optional parameter that returns the item attributes for an * ExecuteStatement operation that failed a condition check.

*

There is no additional cost associated with requesting a return value aside * from the small network and processing overhead of receiving a larger response. * No read capacity units are consumed.

*/ inline void SetReturnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure&& value) { m_returnValuesOnConditionCheckFailureHasBeenSet = true; m_returnValuesOnConditionCheckFailure = std::move(value); } /** *

An optional parameter that returns the item attributes for an * ExecuteStatement operation that failed a condition check.

*

There is no additional cost associated with requesting a return value aside * from the small network and processing overhead of receiving a larger response. * No read capacity units are consumed.

*/ inline ExecuteStatementRequest& WithReturnValuesOnConditionCheckFailure(const ReturnValuesOnConditionCheckFailure& value) { SetReturnValuesOnConditionCheckFailure(value); return *this;} /** *

An optional parameter that returns the item attributes for an * ExecuteStatement operation that failed a condition check.

*

There is no additional cost associated with requesting a return value aside * from the small network and processing overhead of receiving a larger response. * No read capacity units are consumed.

*/ inline ExecuteStatementRequest& WithReturnValuesOnConditionCheckFailure(ReturnValuesOnConditionCheckFailure&& value) { SetReturnValuesOnConditionCheckFailure(std::move(value)); return *this;} private: Aws::String m_statement; bool m_statementHasBeenSet = false; Aws::Vector m_parameters; bool m_parametersHasBeenSet = false; bool m_consistentRead; bool m_consistentReadHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; ReturnConsumedCapacity m_returnConsumedCapacity; bool m_returnConsumedCapacityHasBeenSet = false; int m_limit; bool m_limitHasBeenSet = false; ReturnValuesOnConditionCheckFailure m_returnValuesOnConditionCheckFailure; bool m_returnValuesOnConditionCheckFailureHasBeenSet = false; }; } // namespace Model } // namespace DynamoDB } // namespace Aws