"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SubjectAlternativeNames=exports.MutualTlsValidationTrust=exports.TlsValidationTrust=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var errors_1=()=>{var tmp=require("../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class TlsValidationTrust{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_appmesh.TlsValidationTrust",version:"2.256.1"};static file(certificateChain){return new TlsValidationFileTrust(certificateChain)}static acm(certificateAuthorities){return new TlsValidationAcmTrust(certificateAuthorities)}static sds(secretName){return new TlsValidationSdsTrust(secretName)}}exports.TlsValidationTrust=TlsValidationTrust;class MutualTlsValidationTrust extends TlsValidationTrust{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_appmesh.MutualTlsValidationTrust",version:"2.256.1"};differentiator=!1}exports.MutualTlsValidationTrust=MutualTlsValidationTrust;class TlsValidationAcmTrust extends TlsValidationTrust{_certificateAuthorities;constructor(certificateAuthorities){super(),this._certificateAuthorities=certificateAuthorities}get certificateAuthorities(){if(this._certificateAuthorities.some(x=>!("certificateAuthorityArn"in x)))throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`CertificateAuthoritiesNotImplemented`,"Not all elements of 'certificateAuthorities' parameter implement ICertificateAuthority");return this._certificateAuthorities}bind(scope){if(this.certificateAuthorities.length===0)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`CertificateAuthorityRequired`,"you must provide at least one Certificate Authority when creating an ACM Trust ClientPolicy",scope);return{tlsValidationTrust:{acm:{certificateAuthorityArns:this.certificateAuthorities.map(certificateArn=>certificateArn.certificateAuthorityArn)}}}}}class TlsValidationFileTrust extends MutualTlsValidationTrust{certificateChain;constructor(certificateChain){super(),this.certificateChain=certificateChain}bind(_scope){return{tlsValidationTrust:{file:{certificateChain:this.certificateChain}}}}}class TlsValidationSdsTrust extends MutualTlsValidationTrust{secretName;constructor(secretName){super(),this.secretName=secretName}bind(_scope){return{tlsValidationTrust:{sds:{secretName:this.secretName}}}}}class SubjectAlternativeNames{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_appmesh.SubjectAlternativeNames",version:"2.256.1"};static matchingExactly(...names){return new SubjectAlternativeNamesImpl({exact:names})}}exports.SubjectAlternativeNames=SubjectAlternativeNames;class SubjectAlternativeNamesImpl extends SubjectAlternativeNames{matchProperty;constructor(matchProperty){super(),this.matchProperty=matchProperty}bind(_scope){return{subjectAlternativeNamesMatch:this.matchProperty}}}
