"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ArtifactPath=exports.Artifact=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var validation=()=>{var tmp=require("./private/validation");return validation=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},helpers_internal_1=()=>{var tmp=require("../../core/lib/helpers-internal");return helpers_internal_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class Artifact{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_codepipeline.Artifact",version:"2.256.1"};static artifact(name,files){return new Artifact(name,files)}_artifactName;_artifactFiles;metadata={};constructor(artifactName,artifactFiles){if(validation().validateArtifactName(artifactName),artifactFiles!==void 0&&(artifactFiles.length<1||artifactFiles.length>10))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`MustBeLengthArtifactfilesArray`,`The length of the artifactFiles array must be between 1 and 10, got: ${artifactFiles.length}`);this._artifactName=helpers_internal_1().Box.fromValue(artifactName),this._artifactFiles=artifactFiles}get artifactName(){return this._artifactName.get()}get _artifactNameBox(){return this._artifactName}get artifactFiles(){return this._artifactFiles}atPath(fileName){return new ArtifactPath(this,fileName)}get bucketName(){return artifactAttribute(this,"BucketName")}get objectKey(){return artifactAttribute(this,"ObjectKey")}get url(){return artifactAttribute(this,"URL")}getParam(jsonFile,keyName){return artifactGetParam(this,jsonFile,keyName)}get s3Location(){return{bucketName:this.bucketName,objectKey:this.objectKey}}setMetadata(key,value){this.metadata[key]=value}getMetadata(key){return this.metadata[key]}toString(){return this.artifactName}_setName(name){if(this._artifactName.get())throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ArtifactAlreadyName`,`Artifact already has name '${this._artifactName.get()}', cannot override it`);this._artifactName.set(name)}}exports.Artifact=Artifact;class ArtifactPath{artifact;fileName;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_codepipeline.ArtifactPath",version:"2.256.1"};static artifactPath(artifactName,fileName){return new ArtifactPath(Artifact.artifact(artifactName),fileName)}constructor(artifact,fileName){this.artifact=artifact,this.fileName=fileName;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codepipeline_Artifact(artifact)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ArtifactPath),error}}get location(){return`${this.artifact.artifactName?this.artifact.artifactName:core_1().Token.asString(this.artifact._artifactNameBox)}::${this.fileName}`}}exports.ArtifactPath=ArtifactPath;function artifactAttribute(artifact,attributeName){return core_1().Token.asString({"Fn::GetArtifactAtt":[core_1().Token.asString(artifact._artifactNameBox),attributeName]})}function artifactGetParam(artifact,jsonFile,keyName){return core_1().Token.asString({"Fn::GetParam":[core_1().Token.asString(artifact._artifactNameBox),jsonFile,keyName]})}
