"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodePipelineStartPipelineExecution=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},aws_codepipeline_1=()=>{var tmp=require("../../aws-codepipeline");return aws_codepipeline_1=()=>tmp,tmp},aws_iam_1=()=>{var tmp=require("../../aws-iam");return aws_iam_1=()=>tmp,tmp};class CodePipelineStartPipelineExecution extends target_1().ScheduleTargetBase{pipeline;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_scheduler_targets.CodePipelineStartPipelineExecution",version:"2.256.1"};constructor(pipeline,props={}){super(props,pipelineArn(pipeline)),this.pipeline=pipeline;try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_codepipeline_IPipelineRef(pipeline),jsiiDeprecationWarnings().aws_cdk_lib_aws_scheduler_targets_ScheduleTargetBaseProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CodePipelineStartPipelineExecution),error}}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}role.addToPrincipalPolicy(new(aws_iam_1()).PolicyStatement({actions:["codepipeline:StartPipelineExecution"],resources:[pipelineArn(this.pipeline)]}))}}exports.CodePipelineStartPipelineExecution=CodePipelineStartPipelineExecution;function pipelineArn(pipeline){return isIPipeline(pipeline)?pipeline.pipelineArn:aws_codepipeline_1().CfnPipeline.arnForPipeline(pipeline)}function isIPipeline(pipeline){return"pipelineArn"in pipeline}
