"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DomainlessCredentialSpec=exports.DomainJoinedCredentialSpec=exports.CredentialSpec=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var 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 CredentialSpec{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ecs.CredentialSpec",version:"2.256.1"};static arnForS3Object(bucket,key){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_s3_IBucket(bucket)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForS3Object),error}if(!key)throw new(core_1()).ValidationError((0,literal_string_1().lit)`Undefined`,"key is undefined",bucket);return bucket.arnForObjects(key)}static arnForSsmParameter(parameter){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ssm_IParameter(parameter)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForSsmParameter),error}return parameter.parameterArn}prefixId;fileLocation;constructor(prefixId,fileLocation){this.prefixId=prefixId,this.fileLocation=fileLocation}bind(){return{typePrefix:this.prefixId,location:this.fileLocation}}}exports.CredentialSpec=CredentialSpec;class DomainJoinedCredentialSpec extends CredentialSpec{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ecs.DomainJoinedCredentialSpec",version:"2.256.1"};static fromS3Bucket(bucket,key){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_s3_IBucket(bucket)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromS3Bucket),error}return new DomainJoinedCredentialSpec(CredentialSpec.arnForS3Object(bucket,key))}static fromSsmParameter(parameter){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ssm_IParameter(parameter)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromSsmParameter),error}return new DomainJoinedCredentialSpec(CredentialSpec.arnForSsmParameter(parameter))}constructor(fileLocation){super("credentialspec",fileLocation)}}exports.DomainJoinedCredentialSpec=DomainJoinedCredentialSpec;class DomainlessCredentialSpec extends CredentialSpec{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ecs.DomainlessCredentialSpec",version:"2.256.1"};static fromS3Bucket(bucket,key){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_s3_IBucket(bucket)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromS3Bucket),error}return new DomainlessCredentialSpec(CredentialSpec.arnForS3Object(bucket,key))}static fromSsmParameter(parameter){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ssm_IParameter(parameter)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromSsmParameter),error}return new DomainlessCredentialSpec(CredentialSpec.arnForSsmParameter(parameter))}constructor(fileLocation){super("credentialspecdomainless",fileLocation)}}exports.DomainlessCredentialSpec=DomainlessCredentialSpec;
