"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.DynamoGetItem=void 0;const jsiiDeprecationWarnings=require("../../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),iam=require("../../../aws-iam"),sfn=require("../../../aws-stepfunctions"),core_1=require("../../../core"),utils_1=require("./private/utils");class DynamoGetItem extends sfn.TaskStateBase{constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_stepfunctions_tasks_DynamoGetItemProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.constructor),error}this.taskPolicies=[new iam.PolicyStatement({resources:[core_1.Stack.of(this).formatArn({service:"dynamodb",resource:"table",resourceName:props.table.tableName})],actions:[`dynamodb:${utils_1.DynamoMethod.GET}Item`]})]}_renderTask(){var _b;return{Resource:utils_1.getDynamoResourceArn(utils_1.DynamoMethod.GET),Parameters:sfn.FieldUtils.renderObject({Key:utils_1.transformAttributeValueMap(this.props.key),TableName:this.props.table.tableName,ConsistentRead:(_b=this.props.consistentRead)!==null&&_b!==void 0?_b:!1,ExpressionAttributeNames:this.props.expressionAttributeNames,ProjectionExpression:this.configureProjectionExpression(this.props.projectionExpression),ReturnConsumedCapacity:this.props.returnConsumedCapacity})}}configureProjectionExpression(expressions){return expressions?expressions.map(expression=>expression.toString()).join(","):void 0}}exports.DynamoGetItem=DynamoGetItem,_a=JSII_RTTI_SYMBOL_1,DynamoGetItem[_a]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.DynamoGetItem",version:"2.24.1"};
//# sourceMappingURL=get-item.js.map
