"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.jenkinsArtifactsBounds=exports.JenkinsProvider=exports.BaseJenkinsProvider=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},codepipeline=()=>{var tmp=require("../../../aws-codepipeline");return codepipeline=()=>tmp,tmp};class BaseJenkinsProvider extends constructs_1().Construct{constructor(scope,id,version){super(scope,id),this.version=version||"1"}}exports.BaseJenkinsProvider=BaseJenkinsProvider,_a=JSII_RTTI_SYMBOL_1,BaseJenkinsProvider[_a]={fqn:"aws-cdk-lib.aws_codepipeline_actions.BaseJenkinsProvider",version:"2.148.1"};class JenkinsProvider extends BaseJenkinsProvider{static fromJenkinsProviderAttributes(scope,id,attrs){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codepipeline_actions_JenkinsProviderAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromJenkinsProviderAttributes),error}return new ImportedJenkinsProvider(scope,id,attrs)}constructor(scope,id,props){super(scope,id,props.version),this.buildIncluded=!1,this.testIncluded=!1;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codepipeline_actions_JenkinsProviderProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,JenkinsProvider),error}this.providerName=props.providerName,this.serverUrl=props.serverUrl,props.forBuild===!0&&this._registerBuildProvider(),props.forTest===!0&&this._registerTestProvider()}_registerBuildProvider(){this.buildIncluded||(this.buildIncluded=!0,this.registerJenkinsCustomAction("JenkinsBuildProviderResource",codepipeline().ActionCategory.BUILD))}_registerTestProvider(){this.testIncluded||(this.testIncluded=!0,this.registerJenkinsCustomAction("JenkinsTestProviderResource",codepipeline().ActionCategory.TEST))}registerJenkinsCustomAction(id,category){new(codepipeline()).CustomActionRegistration(this,id,{category,artifactBounds:exports.jenkinsArtifactsBounds,provider:this.providerName,version:this.version,entityUrl:appendToUrl(this.serverUrl,"job/{Config:ProjectName}"),executionUrl:appendToUrl(this.serverUrl,"job/{Config:ProjectName}/{ExternalExecutionId}"),actionProperties:[{name:"ProjectName",required:!0,key:!0,queryable:!0}]})}}exports.JenkinsProvider=JenkinsProvider,_b=JSII_RTTI_SYMBOL_1,JenkinsProvider[_b]={fqn:"aws-cdk-lib.aws_codepipeline_actions.JenkinsProvider",version:"2.148.1"};class ImportedJenkinsProvider extends BaseJenkinsProvider{constructor(scope,id,props){super(scope,id,props.version),this.providerName=props.providerName,this.serverUrl=props.serverUrl}_registerBuildProvider(){}_registerTestProvider(){}}function appendToUrl(baseUrl,path){return baseUrl.endsWith("/")?baseUrl+path:`${baseUrl}/${path}`}exports.jenkinsArtifactsBounds={minInputs:0,maxInputs:5,minOutputs:0,maxOutputs:5};
