"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SageMakerStartPipelineExecution=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var target_1=()=>{var tmp=require("./target");return target_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class SageMakerStartPipelineExecution extends target_1().ScheduleTargetBase{pipeline;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_scheduler_targets.SageMakerStartPipelineExecution",version:"2.256.1"};constructor(pipeline,props={}){super(props,pipeline.pipelineArn),this.pipeline=pipeline,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_sagemaker_IPipeline(pipeline),jsiiDeprecationWarnings().aws_cdk_lib_aws_scheduler_targets_SageMakerStartPipelineExecutionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SageMakerStartPipelineExecution),error}if(props.pipelineParameterList!==void 0&&props.pipelineParameterList.length>200)throw new(core_1()).ValidationError((0,literal_string_1().lit)`PipelineParameterListLength`,`pipelineParameterList length must be between 0 and 200, got ${props.pipelineParameterList.length}`,pipeline)}addTargetActionToRole(role){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_iam_IRole(role)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addTargetActionToRole),error}this.pipeline.grantStartPipelineExecution(role)}bindBaseTargetConfig(schedule){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_scheduler_ISchedule(schedule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bindBaseTargetConfig),error}const sageMakerPipelineParameters=this.props.pipelineParameterList?{pipelineParameterList:this.props.pipelineParameterList.map(param=>({name:param.name,value:param.value}))}:void 0;return{...super.bindBaseTargetConfig(schedule),sageMakerPipelineParameters}}}exports.SageMakerStartPipelineExecution=SageMakerStartPipelineExecution;
