"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SamlProvider=exports.SamlMetadataDocument=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),fs=require("fs"),iam_generated_1=require("./iam.generated"),core_1=require("../../core");class SamlMetadataDocument{static fromXml(xml){return{xml}}static fromFile(path){return{xml:fs.readFileSync(path,"utf-8")}}}exports.SamlMetadataDocument=SamlMetadataDocument,_a=JSII_RTTI_SYMBOL_1,SamlMetadataDocument[_a]={fqn:"aws-cdk-lib.aws_iam.SamlMetadataDocument",version:"2.96.1"};class SamlProvider extends core_1.Resource{static fromSamlProviderArn(scope,id,samlProviderArn){class Import extends core_1.Resource{constructor(){super(...arguments),this.samlProviderArn=samlProviderArn}}return new Import(scope,id)}constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_SamlProviderProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SamlProvider),error}if(props.name&&!core_1.Token.isUnresolved(props.name)&&!/^[\w+=,.@-]{1,128}$/.test(props.name))throw new Error("Invalid SAML provider name. The name must be a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. Length must be between 1 and 128 characters.");const samlProvider=new iam_generated_1.CfnSAMLProvider(this,"Resource",{name:props.name,samlMetadataDocument:props.metadataDocument.xml});this.samlProviderArn=samlProvider.ref}}exports.SamlProvider=SamlProvider,_b=JSII_RTTI_SYMBOL_1,SamlProvider[_b]={fqn:"aws-cdk-lib.aws_iam.SamlProvider",version:"2.96.1"};
