"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SqsSendMessage=void 0;const jsiiDeprecationWarnings=require("../../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),iam=require("../../../aws-iam"),sfn=require("../../../aws-stepfunctions"),task_utils_1=require("../private/task-utils");class SqsSendMessage extends sfn.TaskStateBase{constructor(scope,id,props){var _b;super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_stepfunctions_tasks_SqsSendMessageProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.constructor),error}if(this.integrationPattern=(_b=props.integrationPattern)!==null&&_b!==void 0?_b:sfn.IntegrationPattern.REQUEST_RESPONSE,task_utils_1.validatePatternSupported(this.integrationPattern,SqsSendMessage.SUPPORTED_INTEGRATION_PATTERNS),props.integrationPattern===sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN&&!sfn.FieldUtils.containsTaskToken(props.messageBody))throw new Error("Task Token is required in `messageBody` Use JsonPath.taskToken to set the token.");this.taskPolicies=[new iam.PolicyStatement({actions:["sqs:SendMessage"],resources:[this.props.queue.queueArn]})]}_renderTask(){var _b;return{Resource:task_utils_1.integrationResourceArn("sqs","sendMessage",this.integrationPattern),Parameters:sfn.FieldUtils.renderObject({QueueUrl:this.props.queue.queueUrl,MessageBody:this.props.messageBody.value,DelaySeconds:(_b=this.props.delay)===null||_b===void 0?void 0:_b.toSeconds(),MessageDeduplicationId:this.props.messageDeduplicationId,MessageGroupId:this.props.messageGroupId})}}}exports.SqsSendMessage=SqsSendMessage,_a=JSII_RTTI_SYMBOL_1,SqsSendMessage[_a]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.SqsSendMessage",version:"2.24.1"},SqsSendMessage.SUPPORTED_INTEGRATION_PATTERNS=[sfn.IntegrationPattern.REQUEST_RESPONSE,sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN];
//# sourceMappingURL=send-message.js.map
