UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

1 lines 65.6 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnPolicyTemplate=exports.CfnPolicyStore=exports.CfnPolicy=exports.CfnIdentitySource=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cdk=()=>{var tmp=require("../../core/lib");return cdk=()=>tmp,tmp},cfn_parse=()=>{var tmp=require("../../core/lib/helpers-internal");return cfn_parse=()=>tmp,tmp},cdk_errors=()=>{var tmp=require("../../core/lib/errors");return cdk_errors=()=>tmp,tmp};class CfnIdentitySource extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_verifiedpermissions.CfnIdentitySource",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::VerifiedPermissions::IdentitySource";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnIdentitySourcePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnIdentitySource(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}static isCfnIdentitySource(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnIdentitySource.CFN_RESOURCE_TYPE_NAME}_configuration;_policyStoreId;_principalEntityType;constructor(scope,id,props){super(scope,id,{type:CfnIdentitySource.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_verifiedpermissions_CfnIdentitySourceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnIdentitySource),error}cdk().requireProperty(props,"configuration",this),cdk().requireProperty(props,"policyStoreId",this),this._configuration=props.configuration,this._policyStoreId=props.policyStoreId,this._principalEntityType=props.principalEntityType}get identitySourceRef(){return{identitySourceId:cdk().Fn.select(0,cdk().Fn.split("|",this.ref)),policyStoreId:cdk().Fn.select(1,cdk().Fn.split("|",this.ref))}}get configuration(){return this._configuration}set configuration(value){cdk().traceProperty(this.node,"Configuration"),this._configuration=value}get policyStoreId(){return this._policyStoreId}set policyStoreId(value){cdk().traceProperty(this.node,"PolicyStoreId"),this._policyStoreId=value}get principalEntityType(){return this._principalEntityType}set principalEntityType(value){cdk().traceProperty(this.node,"PrincipalEntityType"),this._principalEntityType=value}get attrDetails(){return this.getAtt("Details")}get attrDetailsClientIds(){return cdk().Token.asList(this.getAtt("Details.ClientIds",cdk().ResolutionTypeHint.STRING_LIST))}get attrDetailsDiscoveryUrl(){return cdk().Token.asString(this.getAtt("Details.DiscoveryUrl",cdk().ResolutionTypeHint.STRING))}get attrDetailsOpenIdIssuer(){return cdk().Token.asString(this.getAtt("Details.OpenIdIssuer",cdk().ResolutionTypeHint.STRING))}get attrDetailsUserPoolArn(){return cdk().Token.asString(this.getAtt("Details.UserPoolArn",cdk().ResolutionTypeHint.STRING))}get attrIdentitySourceId(){return cdk().Token.asString(this.getAtt("IdentitySourceId",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{configuration:this._configuration,policyStoreId:this._policyStoreId,principalEntityType:this._principalEntityType}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnIdentitySource.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnIdentitySourcePropsToCloudFormation(props)}}exports.CfnIdentitySource=CfnIdentitySource;function CfnIdentitySourceCognitoGroupConfigurationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("groupEntityType",cdk().requiredValidator)(properties.groupEntityType)),errors.collect(cdk().propertyValidator("groupEntityType",cdk().validateString)(properties.groupEntityType)),errors.wrap('supplied properties not correct for "CognitoGroupConfigurationProperty"')}function convertCfnIdentitySourceCognitoGroupConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnIdentitySourceCognitoGroupConfigurationPropertyValidator(properties).assertSuccess(),{GroupEntityType:cdk().stringToCloudFormation(properties.groupEntityType)}):properties}function CfnIdentitySourceCognitoGroupConfigurationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("groupEntityType","GroupEntityType",properties.GroupEntityType!=null?cfn_parse().FromCloudFormation.getString(properties.GroupEntityType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnIdentitySourceCognitoUserPoolConfigurationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("clientIds",cdk().listValidator(cdk().validateString))(properties.clientIds)),errors.collect(cdk().propertyValidator("groupConfiguration",CfnIdentitySourceCognitoGroupConfigurationPropertyValidator)(properties.groupConfiguration)),errors.collect(cdk().propertyValidator("userPoolArn",cdk().requiredValidator)(properties.userPoolArn)),errors.collect(cdk().propertyValidator("userPoolArn",cdk().validateString)(properties.userPoolArn)),errors.wrap('supplied properties not correct for "CognitoUserPoolConfigurationProperty"')}function convertCfnIdentitySourceCognitoUserPoolConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnIdentitySourceCognitoUserPoolConfigurationPropertyValidator(properties).assertSuccess(),{ClientIds:cdk().listMapper(cdk().stringToCloudFormation)(properties.clientIds),GroupConfiguration:convertCfnIdentitySourceCognitoGroupConfigurationPropertyToCloudFormation(properties.groupConfiguration),UserPoolArn:cdk().stringToCloudFormation(properties.userPoolArn)}):properties}function CfnIdentitySourceCognitoUserPoolConfigurationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("clientIds","ClientIds",properties.ClientIds!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.ClientIds):void 0),ret.addPropertyResult("groupConfiguration","GroupConfiguration",properties.GroupConfiguration!=null?CfnIdentitySourceCognitoGroupConfigurationPropertyFromCloudFormation(properties.GroupConfiguration):void 0),ret.addPropertyResult("userPoolArn","UserPoolArn",properties.UserPoolArn!=null?cfn_parse().FromCloudFormation.getString(properties.UserPoolArn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnIdentitySourceOpenIdConnectGroupConfigurationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("groupClaim",cdk().requiredValidator)(properties.groupClaim)),errors.collect(cdk().propertyValidator("groupClaim",cdk().validateString)(properties.groupClaim)),errors.collect(cdk().propertyValidator("groupEntityType",cdk().requiredValidator)(properties.groupEntityType)),errors.collect(cdk().propertyValidator("groupEntityType",cdk().validateString)(properties.groupEntityType)),errors.wrap('supplied properties not correct for "OpenIdConnectGroupConfigurationProperty"')}function convertCfnIdentitySourceOpenIdConnectGroupConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnIdentitySourceOpenIdConnectGroupConfigurationPropertyValidator(properties).assertSuccess(),{GroupClaim:cdk().stringToCloudFormation(properties.groupClaim),GroupEntityType:cdk().stringToCloudFormation(properties.groupEntityType)}):properties}function CfnIdentitySourceOpenIdConnectGroupConfigurationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("groupClaim","GroupClaim",properties.GroupClaim!=null?cfn_parse().FromCloudFormation.getString(properties.GroupClaim):void 0),ret.addPropertyResult("groupEntityType","GroupEntityType",properties.GroupEntityType!=null?cfn_parse().FromCloudFormation.getString(properties.GroupEntityType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnIdentitySourceOpenIdConnectAccessTokenConfigurationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("audiences",cdk().listValidator(cdk().validateString))(properties.audiences)),errors.collect(cdk().propertyValidator("principalIdClaim",cdk().validateString)(properties.principalIdClaim)),errors.wrap('supplied properties not correct for "OpenIdConnectAccessTokenConfigurationProperty"')}function convertCfnIdentitySourceOpenIdConnectAccessTokenConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnIdentitySourceOpenIdConnectAccessTokenConfigurationPropertyValidator(properties).assertSuccess(),{Audiences:cdk().listMapper(cdk().stringToCloudFormation)(properties.audiences),PrincipalIdClaim:cdk().stringToCloudFormation(properties.principalIdClaim)}):properties}function CfnIdentitySourceOpenIdConnectAccessTokenConfigurationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("audiences","Audiences",properties.Audiences!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.Audiences):void 0),ret.addPropertyResult("principalIdClaim","PrincipalIdClaim",properties.PrincipalIdClaim!=null?cfn_parse().FromCloudFormation.getString(properties.PrincipalIdClaim):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnIdentitySourceOpenIdConnectIdentityTokenConfigurationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("clientIds",cdk().listValidator(cdk().validateString))(properties.clientIds)),errors.collect(cdk().propertyValidator("principalIdClaim",cdk().validateString)(properties.principalIdClaim)),errors.wrap('supplied properties not correct for "OpenIdConnectIdentityTokenConfigurationProperty"')}function convertCfnIdentitySourceOpenIdConnectIdentityTokenConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnIdentitySourceOpenIdConnectIdentityTokenConfigurationPropertyValidator(properties).assertSuccess(),{ClientIds:cdk().listMapper(cdk().stringToCloudFormation)(properties.clientIds),PrincipalIdClaim:cdk().stringToCloudFormation(properties.principalIdClaim)}):properties}function CfnIdentitySourceOpenIdConnectIdentityTokenConfigurationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("clientIds","ClientIds",properties.ClientIds!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.ClientIds):void 0),ret.addPropertyResult("principalIdClaim","PrincipalIdClaim",properties.PrincipalIdClaim!=null?cfn_parse().FromCloudFormation.getString(properties.PrincipalIdClaim):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnIdentitySourceOpenIdConnectTokenSelectionPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("accessTokenOnly",CfnIdentitySourceOpenIdConnectAccessTokenConfigurationPropertyValidator)(properties.accessTokenOnly)),errors.collect(cdk().propertyValidator("identityTokenOnly",CfnIdentitySourceOpenIdConnectIdentityTokenConfigurationPropertyValidator)(properties.identityTokenOnly)),errors.wrap('supplied properties not correct for "OpenIdConnectTokenSelectionProperty"')}function convertCfnIdentitySourceOpenIdConnectTokenSelectionPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnIdentitySourceOpenIdConnectTokenSelectionPropertyValidator(properties).assertSuccess(),{AccessTokenOnly:convertCfnIdentitySourceOpenIdConnectAccessTokenConfigurationPropertyToCloudFormation(properties.accessTokenOnly),IdentityTokenOnly:convertCfnIdentitySourceOpenIdConnectIdentityTokenConfigurationPropertyToCloudFormation(properties.identityTokenOnly)}):properties}function CfnIdentitySourceOpenIdConnectTokenSelectionPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("accessTokenOnly","AccessTokenOnly",properties.AccessTokenOnly!=null?CfnIdentitySourceOpenIdConnectAccessTokenConfigurationPropertyFromCloudFormation(properties.AccessTokenOnly):void 0),ret.addPropertyResult("identityTokenOnly","IdentityTokenOnly",properties.IdentityTokenOnly!=null?CfnIdentitySourceOpenIdConnectIdentityTokenConfigurationPropertyFromCloudFormation(properties.IdentityTokenOnly):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnIdentitySourceOpenIdConnectConfigurationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("entityIdPrefix",cdk().validateString)(properties.entityIdPrefix)),errors.collect(cdk().propertyValidator("groupConfiguration",CfnIdentitySourceOpenIdConnectGroupConfigurationPropertyValidator)(properties.groupConfiguration)),errors.collect(cdk().propertyValidator("issuer",cdk().requiredValidator)(properties.issuer)),errors.collect(cdk().propertyValidator("issuer",cdk().validateString)(properties.issuer)),errors.collect(cdk().propertyValidator("tokenSelection",cdk().requiredValidator)(properties.tokenSelection)),errors.collect(cdk().propertyValidator("tokenSelection",CfnIdentitySourceOpenIdConnectTokenSelectionPropertyValidator)(properties.tokenSelection)),errors.wrap('supplied properties not correct for "OpenIdConnectConfigurationProperty"')}function convertCfnIdentitySourceOpenIdConnectConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnIdentitySourceOpenIdConnectConfigurationPropertyValidator(properties).assertSuccess(),{EntityIdPrefix:cdk().stringToCloudFormation(properties.entityIdPrefix),GroupConfiguration:convertCfnIdentitySourceOpenIdConnectGroupConfigurationPropertyToCloudFormation(properties.groupConfiguration),Issuer:cdk().stringToCloudFormation(properties.issuer),TokenSelection:convertCfnIdentitySourceOpenIdConnectTokenSelectionPropertyToCloudFormation(properties.tokenSelection)}):properties}function CfnIdentitySourceOpenIdConnectConfigurationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("entityIdPrefix","EntityIdPrefix",properties.EntityIdPrefix!=null?cfn_parse().FromCloudFormation.getString(properties.EntityIdPrefix):void 0),ret.addPropertyResult("groupConfiguration","GroupConfiguration",properties.GroupConfiguration!=null?CfnIdentitySourceOpenIdConnectGroupConfigurationPropertyFromCloudFormation(properties.GroupConfiguration):void 0),ret.addPropertyResult("issuer","Issuer",properties.Issuer!=null?cfn_parse().FromCloudFormation.getString(properties.Issuer):void 0),ret.addPropertyResult("tokenSelection","TokenSelection",properties.TokenSelection!=null?CfnIdentitySourceOpenIdConnectTokenSelectionPropertyFromCloudFormation(properties.TokenSelection):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnIdentitySourceIdentitySourceConfigurationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("cognitoUserPoolConfiguration",CfnIdentitySourceCognitoUserPoolConfigurationPropertyValidator)(properties.cognitoUserPoolConfiguration)),errors.collect(cdk().propertyValidator("openIdConnectConfiguration",CfnIdentitySourceOpenIdConnectConfigurationPropertyValidator)(properties.openIdConnectConfiguration)),errors.wrap('supplied properties not correct for "IdentitySourceConfigurationProperty"')}function convertCfnIdentitySourceIdentitySourceConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnIdentitySourceIdentitySourceConfigurationPropertyValidator(properties).assertSuccess(),{CognitoUserPoolConfiguration:convertCfnIdentitySourceCognitoUserPoolConfigurationPropertyToCloudFormation(properties.cognitoUserPoolConfiguration),OpenIdConnectConfiguration:convertCfnIdentitySourceOpenIdConnectConfigurationPropertyToCloudFormation(properties.openIdConnectConfiguration)}):properties}function CfnIdentitySourceIdentitySourceConfigurationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("cognitoUserPoolConfiguration","CognitoUserPoolConfiguration",properties.CognitoUserPoolConfiguration!=null?CfnIdentitySourceCognitoUserPoolConfigurationPropertyFromCloudFormation(properties.CognitoUserPoolConfiguration):void 0),ret.addPropertyResult("openIdConnectConfiguration","OpenIdConnectConfiguration",properties.OpenIdConnectConfiguration!=null?CfnIdentitySourceOpenIdConnectConfigurationPropertyFromCloudFormation(properties.OpenIdConnectConfiguration):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnIdentitySourceIdentitySourceDetailsPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("clientIds",cdk().listValidator(cdk().validateString))(properties.clientIds)),errors.collect(cdk().propertyValidator("discoveryUrl",cdk().validateString)(properties.discoveryUrl)),errors.collect(cdk().propertyValidator("openIdIssuer",cdk().validateString)(properties.openIdIssuer)),errors.collect(cdk().propertyValidator("userPoolArn",cdk().validateString)(properties.userPoolArn)),errors.wrap('supplied properties not correct for "IdentitySourceDetailsProperty"')}function convertCfnIdentitySourceIdentitySourceDetailsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnIdentitySourceIdentitySourceDetailsPropertyValidator(properties).assertSuccess(),{ClientIds:cdk().listMapper(cdk().stringToCloudFormation)(properties.clientIds),DiscoveryUrl:cdk().stringToCloudFormation(properties.discoveryUrl),OpenIdIssuer:cdk().stringToCloudFormation(properties.openIdIssuer),UserPoolArn:cdk().stringToCloudFormation(properties.userPoolArn)}):properties}function CfnIdentitySourceIdentitySourceDetailsPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("clientIds","ClientIds",properties.ClientIds!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.ClientIds):void 0),ret.addPropertyResult("discoveryUrl","DiscoveryUrl",properties.DiscoveryUrl!=null?cfn_parse().FromCloudFormation.getString(properties.DiscoveryUrl):void 0),ret.addPropertyResult("openIdIssuer","OpenIdIssuer",properties.OpenIdIssuer!=null?cfn_parse().FromCloudFormation.getString(properties.OpenIdIssuer):void 0),ret.addPropertyResult("userPoolArn","UserPoolArn",properties.UserPoolArn!=null?cfn_parse().FromCloudFormation.getString(properties.UserPoolArn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnIdentitySourcePropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("configuration",cdk().requiredValidator)(properties.configuration)),errors.collect(cdk().propertyValidator("configuration",CfnIdentitySourceIdentitySourceConfigurationPropertyValidator)(properties.configuration)),errors.collect(cdk().propertyValidator("policyStoreId",cdk().requiredValidator)(properties.policyStoreId)),errors.collect(cdk().propertyValidator("policyStoreId",cdk().validateString)(properties.policyStoreId)),errors.collect(cdk().propertyValidator("principalEntityType",cdk().validateString)(properties.principalEntityType)),errors.wrap('supplied properties not correct for "CfnIdentitySourceProps"')}function convertCfnIdentitySourcePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnIdentitySourcePropsValidator(properties).assertSuccess(),{Configuration:convertCfnIdentitySourceIdentitySourceConfigurationPropertyToCloudFormation(properties.configuration),PolicyStoreId:cdk().stringToCloudFormation(properties.policyStoreId),PrincipalEntityType:cdk().stringToCloudFormation(properties.principalEntityType)}):properties}function CfnIdentitySourcePropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("configuration","Configuration",properties.Configuration!=null?CfnIdentitySourceIdentitySourceConfigurationPropertyFromCloudFormation(properties.Configuration):void 0),ret.addPropertyResult("policyStoreId","PolicyStoreId",properties.PolicyStoreId!=null?cfn_parse().FromCloudFormation.getString(properties.PolicyStoreId):void 0),ret.addPropertyResult("principalEntityType","PrincipalEntityType",properties.PrincipalEntityType!=null?cfn_parse().FromCloudFormation.getString(properties.PrincipalEntityType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnPolicy extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_verifiedpermissions.CfnPolicy",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::VerifiedPermissions::Policy";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPolicyPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnPolicy(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}static isCfnPolicy(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnPolicy.CFN_RESOURCE_TYPE_NAME}_definition;_policyStoreId;constructor(scope,id,props){super(scope,id,{type:CfnPolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_verifiedpermissions_CfnPolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPolicy),error}cdk().requireProperty(props,"definition",this),cdk().requireProperty(props,"policyStoreId",this),this._definition=props.definition,this._policyStoreId=props.policyStoreId}get policyRef(){return{policyId:cdk().Fn.select(0,cdk().Fn.split("|",this.ref)),policyStoreId:cdk().Fn.select(1,cdk().Fn.split("|",this.ref))}}get definition(){return this._definition}set definition(value){cdk().traceProperty(this.node,"Definition"),this._definition=value}get policyStoreId(){return this._policyStoreId}set policyStoreId(value){cdk().traceProperty(this.node,"PolicyStoreId"),this._policyStoreId=value}get attrPolicyId(){return cdk().Token.asString(this.getAtt("PolicyId",cdk().ResolutionTypeHint.STRING))}get attrPolicyType(){return cdk().Token.asString(this.getAtt("PolicyType",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{definition:this._definition,policyStoreId:this._policyStoreId}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnPolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnPolicyPropsToCloudFormation(props)}}exports.CfnPolicy=CfnPolicy;function CfnPolicyStaticPolicyDefinitionPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("description",cdk().validateString)(properties.description)),errors.collect(cdk().propertyValidator("statement",cdk().requiredValidator)(properties.statement)),errors.collect(cdk().propertyValidator("statement",cdk().validateString)(properties.statement)),errors.wrap('supplied properties not correct for "StaticPolicyDefinitionProperty"')}function convertCfnPolicyStaticPolicyDefinitionPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPolicyStaticPolicyDefinitionPropertyValidator(properties).assertSuccess(),{Description:cdk().stringToCloudFormation(properties.description),Statement:cdk().stringToCloudFormation(properties.statement)}):properties}function CfnPolicyStaticPolicyDefinitionPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse().FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("statement","Statement",properties.Statement!=null?cfn_parse().FromCloudFormation.getString(properties.Statement):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPolicyEntityIdentifierPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("entityId",cdk().requiredValidator)(properties.entityId)),errors.collect(cdk().propertyValidator("entityId",cdk().validateString)(properties.entityId)),errors.collect(cdk().propertyValidator("entityType",cdk().requiredValidator)(properties.entityType)),errors.collect(cdk().propertyValidator("entityType",cdk().validateString)(properties.entityType)),errors.wrap('supplied properties not correct for "EntityIdentifierProperty"')}function convertCfnPolicyEntityIdentifierPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPolicyEntityIdentifierPropertyValidator(properties).assertSuccess(),{EntityId:cdk().stringToCloudFormation(properties.entityId),EntityType:cdk().stringToCloudFormation(properties.entityType)}):properties}function CfnPolicyEntityIdentifierPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("entityId","EntityId",properties.EntityId!=null?cfn_parse().FromCloudFormation.getString(properties.EntityId):void 0),ret.addPropertyResult("entityType","EntityType",properties.EntityType!=null?cfn_parse().FromCloudFormation.getString(properties.EntityType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPolicyTemplateLinkedPolicyDefinitionPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("policyTemplateId",cdk().requiredValidator)(properties.policyTemplateId)),errors.collect(cdk().propertyValidator("policyTemplateId",cdk().validateString)(properties.policyTemplateId)),errors.collect(cdk().propertyValidator("principal",CfnPolicyEntityIdentifierPropertyValidator)(properties.principal)),errors.collect(cdk().propertyValidator("resource",CfnPolicyEntityIdentifierPropertyValidator)(properties.resource)),errors.wrap('supplied properties not correct for "TemplateLinkedPolicyDefinitionProperty"')}function convertCfnPolicyTemplateLinkedPolicyDefinitionPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPolicyTemplateLinkedPolicyDefinitionPropertyValidator(properties).assertSuccess(),{PolicyTemplateId:cdk().stringToCloudFormation(properties.policyTemplateId),Principal:convertCfnPolicyEntityIdentifierPropertyToCloudFormation(properties.principal),Resource:convertCfnPolicyEntityIdentifierPropertyToCloudFormation(properties.resource)}):properties}function CfnPolicyTemplateLinkedPolicyDefinitionPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("policyTemplateId","PolicyTemplateId",properties.PolicyTemplateId!=null?cfn_parse().FromCloudFormation.getString(properties.PolicyTemplateId):void 0),ret.addPropertyResult("principal","Principal",properties.Principal!=null?CfnPolicyEntityIdentifierPropertyFromCloudFormation(properties.Principal):void 0),ret.addPropertyResult("resource","Resource",properties.Resource!=null?CfnPolicyEntityIdentifierPropertyFromCloudFormation(properties.Resource):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPolicyPolicyDefinitionPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("static",CfnPolicyStaticPolicyDefinitionPropertyValidator)(properties.static)),errors.collect(cdk().propertyValidator("templateLinked",CfnPolicyTemplateLinkedPolicyDefinitionPropertyValidator)(properties.templateLinked)),errors.wrap('supplied properties not correct for "PolicyDefinitionProperty"')}function convertCfnPolicyPolicyDefinitionPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPolicyPolicyDefinitionPropertyValidator(properties).assertSuccess(),{Static:convertCfnPolicyStaticPolicyDefinitionPropertyToCloudFormation(properties.static),TemplateLinked:convertCfnPolicyTemplateLinkedPolicyDefinitionPropertyToCloudFormation(properties.templateLinked)}):properties}function CfnPolicyPolicyDefinitionPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("static","Static",properties.Static!=null?CfnPolicyStaticPolicyDefinitionPropertyFromCloudFormation(properties.Static):void 0),ret.addPropertyResult("templateLinked","TemplateLinked",properties.TemplateLinked!=null?CfnPolicyTemplateLinkedPolicyDefinitionPropertyFromCloudFormation(properties.TemplateLinked):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPolicyPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("definition",cdk().requiredValidator)(properties.definition)),errors.collect(cdk().propertyValidator("definition",CfnPolicyPolicyDefinitionPropertyValidator)(properties.definition)),errors.collect(cdk().propertyValidator("policyStoreId",cdk().requiredValidator)(properties.policyStoreId)),errors.collect(cdk().propertyValidator("policyStoreId",cdk().validateString)(properties.policyStoreId)),errors.wrap('supplied properties not correct for "CfnPolicyProps"')}function convertCfnPolicyPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPolicyPropsValidator(properties).assertSuccess(),{Definition:convertCfnPolicyPolicyDefinitionPropertyToCloudFormation(properties.definition),PolicyStoreId:cdk().stringToCloudFormation(properties.policyStoreId)}):properties}function CfnPolicyPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("definition","Definition",properties.Definition!=null?CfnPolicyPolicyDefinitionPropertyFromCloudFormation(properties.Definition):void 0),ret.addPropertyResult("policyStoreId","PolicyStoreId",properties.PolicyStoreId!=null?cfn_parse().FromCloudFormation.getString(properties.PolicyStoreId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnPolicyStore extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_verifiedpermissions.CfnPolicyStore",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::VerifiedPermissions::PolicyStore";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPolicyStorePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnPolicyStore(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}static isCfnPolicyStore(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnPolicyStore.CFN_RESOURCE_TYPE_NAME}static fromPolicyStoreArn(scope,id,arn){class Import extends cdk().Resource{policyStoreRef;constructor(scope2,id2,arn2){super(scope2,id2,{environmentFromArn:arn2});const variables=new(cfn_parse()).TemplateString("arn:${Partition}:verifiedpermissions::${Account}:policy-store/${PolicyStoreId}").parse(arn2);this.policyStoreRef={policyStoreId:variables.PolicyStoreId,policyStoreArn:arn2}}}return new Import(scope,id,arn)}static fromPolicyStoreId(scope,id,policyStoreId){class Import extends cdk().Resource{policyStoreRef;constructor(scope2,id2,policyStoreId2){const arn=new(cfn_parse()).TemplateString("arn:${Partition}:verifiedpermissions::${Account}:policy-store/${PolicyStoreId}").interpolate({Partition:cdk().Stack.of(scope2).partition,Region:cdk().Stack.of(scope2).region,Account:cdk().Stack.of(scope2).account,PolicyStoreId:policyStoreId2});super(scope2,id2,{environmentFromArn:arn}),this.policyStoreRef={policyStoreId:policyStoreId2,policyStoreArn:arn}}}return new Import(scope,id,policyStoreId)}static arnForPolicyStore(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_verifiedpermissions_IPolicyStoreRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForPolicyStore),error}return resource.policyStoreRef.policyStoreArn}cdkTagManager;_deletionProtection;_description;_encryptionSettings;_schema;_tags;_validationSettings;constructor(scope,id,props){super(scope,id,{type:CfnPolicyStore.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_verifiedpermissions_CfnPolicyStoreProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPolicyStore),error}cdk().requireProperty(props,"validationSettings",this),this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::VerifiedPermissions::PolicyStore",void 0,{tagPropertyName:"tags"}),this._deletionProtection=props.deletionProtection,this._description=props.description,this._encryptionSettings=props.encryptionSettings,this._schema=props.schema,this._tags=props.tags,this._validationSettings=props.validationSettings}get policyStoreRef(){return{policyStoreId:this.ref,policyStoreArn:this.attrArn}}get deletionProtection(){return this._deletionProtection}set deletionProtection(value){cdk().traceProperty(this.node,"DeletionProtection"),this._deletionProtection=value}get description(){return this._description}set description(value){cdk().traceProperty(this.node,"Description"),this._description=value}get encryptionSettings(){return this._encryptionSettings}set encryptionSettings(value){cdk().traceProperty(this.node,"EncryptionSettings"),this._encryptionSettings=value}get schema(){return this._schema}set schema(value){cdk().traceProperty(this.node,"Schema"),this._schema=value}get tags(){return this._tags}set tags(value){cdk().traceProperty(this.node,"Tags"),this._tags=value}get validationSettings(){return this._validationSettings}set validationSettings(value){cdk().traceProperty(this.node,"ValidationSettings"),this._validationSettings=value}get attrArn(){return cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING))}get attrEncryptionState(){return this.getAtt("EncryptionState")}get attrPolicyStoreId(){return cdk().Token.asString(this.getAtt("PolicyStoreId",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{tags:this.cdkTagManager.renderTags(this._tags),deletionProtection:this._deletionProtection,description:this._description,encryptionSettings:this._encryptionSettings,schema:this._schema,validationSettings:this._validationSettings}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnPolicyStore.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnPolicyStorePropsToCloudFormation(props)}}exports.CfnPolicyStore=CfnPolicyStore;function CfnPolicyStoreValidationSettingsPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("mode",cdk().requiredValidator)(properties.mode)),errors.collect(cdk().propertyValidator("mode",cdk().validateString)(properties.mode)),errors.wrap('supplied properties not correct for "ValidationSettingsProperty"')}function convertCfnPolicyStoreValidationSettingsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPolicyStoreValidationSettingsPropertyValidator(properties).assertSuccess(),{Mode:cdk().stringToCloudFormation(properties.mode)}):properties}function CfnPolicyStoreValidationSettingsPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("mode","Mode",properties.Mode!=null?cfn_parse().FromCloudFormation.getString(properties.Mode):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPolicyStoreSchemaDefinitionPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("cedarJson",cdk().validateString)(properties.cedarJson)),errors.wrap('supplied properties not correct for "SchemaDefinitionProperty"')}function convertCfnPolicyStoreSchemaDefinitionPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPolicyStoreSchemaDefinitionPropertyValidator(properties).assertSuccess(),{CedarJson:cdk().stringToCloudFormation(properties.cedarJson)}):properties}function CfnPolicyStoreSchemaDefinitionPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("cedarJson","CedarJson",properties.CedarJson!=null?cfn_parse().FromCloudFormation.getString(properties.CedarJson):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPolicyStoreDeletionProtectionPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("mode",cdk().requiredValidator)(properties.mode)),errors.collect(cdk().propertyValidator("mode",cdk().validateString)(properties.mode)),errors.wrap('supplied properties not correct for "DeletionProtectionProperty"')}function convertCfnPolicyStoreDeletionProtectionPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPolicyStoreDeletionProtectionPropertyValidator(properties).assertSuccess(),{Mode:cdk().stringToCloudFormation(properties.mode)}):properties}function CfnPolicyStoreDeletionProtectionPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("mode","Mode",properties.Mode!=null?cfn_parse().FromCloudFormation.getString(properties.Mode):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPolicyStoreKmsEncryptionSettingsPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("encryptionContext",cdk().hashValidator(cdk().validateString))(properties.encryptionContext)),errors.collect(cdk().propertyValidator("key",cdk().requiredValidator)(properties.key)),errors.collect(cdk().propertyValidator("key",cdk().validateString)(properties.key)),errors.wrap('supplied properties not correct for "KmsEncryptionSettingsProperty"')}function convertCfnPolicyStoreKmsEncryptionSettingsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPolicyStoreKmsEncryptionSettingsPropertyValidator(properties).assertSuccess(),{EncryptionContext:cdk().hashMapper(cdk().stringTo