"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnServerlessCache=exports.CfnUserGroup=exports.CfnUser=exports.CfnSubnetGroup=exports.CfnSecurityGroupIngress=exports.CfnSecurityGroup=exports.CfnReplicationGroup=exports.CfnParameterGroup=exports.CfnGlobalReplicationGroup=exports.CfnCacheCluster=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 CfnCacheCluster extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticache.CfnCacheCluster",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::ElastiCache::CacheCluster";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnCacheClusterPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnCacheCluster(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 isCfnCacheCluster(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnCacheCluster.CFN_RESOURCE_TYPE_NAME}_autoMinorVersionUpgrade;_azMode;_cacheNodeType;_cacheParameterGroupName;_cacheSecurityGroupNames;_cacheSubnetGroupName;_clusterName;_engine;_engineVersion;_ipDiscovery;_logDeliveryConfigurations;_networkType;_notificationTopicArn;_numCacheNodes;_port;_preferredAvailabilityZone;_preferredAvailabilityZones;_preferredMaintenanceWindow;_snapshotArns;_snapshotName;_snapshotRetentionLimit;_snapshotWindow;tags;_tagsRaw;_transitEncryptionEnabled;_vpcSecurityGroupIds;cfnPropertyNames={autoMinorVersionUpgrade:"AutoMinorVersionUpgrade",azMode:"AZMode",cacheNodeType:"CacheNodeType",cacheParameterGroupName:"CacheParameterGroupName",cacheSecurityGroupNames:"CacheSecurityGroupNames",cacheSubnetGroupName:"CacheSubnetGroupName",clusterName:"ClusterName",engine:"Engine",engineVersion:"EngineVersion",ipDiscovery:"IpDiscovery",logDeliveryConfigurations:"LogDeliveryConfigurations",networkType:"NetworkType",notificationTopicArn:"NotificationTopicArn",numCacheNodes:"NumCacheNodes",port:"Port",preferredAvailabilityZone:"PreferredAvailabilityZone",preferredAvailabilityZones:"PreferredAvailabilityZones",preferredMaintenanceWindow:"PreferredMaintenanceWindow",snapshotArns:"SnapshotArns",snapshotName:"SnapshotName",snapshotRetentionLimit:"SnapshotRetentionLimit",snapshotWindow:"SnapshotWindow",tags:"Tags",transitEncryptionEnabled:"TransitEncryptionEnabled",vpcSecurityGroupIds:"VpcSecurityGroupIds"};constructor(scope,id,props){super(scope,id,{type:CfnCacheCluster.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticache_CfnCacheClusterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnCacheCluster),error}cdk().requireProperty(props,"cacheNodeType",this),cdk().requireProperty(props,"engine",this),cdk().requireProperty(props,"numCacheNodes",this),this._autoMinorVersionUpgrade=props.autoMinorVersionUpgrade,this._azMode=props.azMode,this._cacheNodeType=props.cacheNodeType,this._cacheParameterGroupName=props.cacheParameterGroupName,this._cacheSecurityGroupNames=props.cacheSecurityGroupNames,this._cacheSubnetGroupName=props.cacheSubnetGroupName,this._clusterName=props.clusterName,this._engine=props.engine,this._engineVersion=props.engineVersion,this._ipDiscovery=props.ipDiscovery,this._logDeliveryConfigurations=props.logDeliveryConfigurations,this._networkType=props.networkType,this._notificationTopicArn=props.notificationTopicArn,this._numCacheNodes=props.numCacheNodes,this._port=props.port,this._preferredAvailabilityZone=props.preferredAvailabilityZone,this._preferredAvailabilityZones=props.preferredAvailabilityZones,this._preferredMaintenanceWindow=props.preferredMaintenanceWindow,this._snapshotArns=props.snapshotArns,this._snapshotName=props.snapshotName,this._snapshotRetentionLimit=props.snapshotRetentionLimit,this._snapshotWindow=props.snapshotWindow,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::ElastiCache::CacheCluster",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags,this._transitEncryptionEnabled=props.transitEncryptionEnabled,this._vpcSecurityGroupIds=props.vpcSecurityGroupIds,this.node.scope!=null&&cdk().Resource.isResource(this.node.scope)&&this.node.addValidation({validate:()=>this.cfnOptions.deletionPolicy===void 0?["'AWS::ElastiCache::CacheCluster' is a stateful resource type, and you must specify a Removal Policy for it. Call 'resource.applyRemovalPolicy()'."]:[]})}get cacheClusterRef(){return{clusterName:this.ref}}get autoMinorVersionUpgrade(){return this._autoMinorVersionUpgrade}set autoMinorVersionUpgrade(value){cdk().traceProperty(this.node,"AutoMinorVersionUpgrade"),this._autoMinorVersionUpgrade=value}get azMode(){return this._azMode}set azMode(value){cdk().traceProperty(this.node,"AZMode"),this._azMode=value}get cacheNodeType(){return this._cacheNodeType}set cacheNodeType(value){cdk().traceProperty(this.node,"CacheNodeType"),this._cacheNodeType=value}get cacheParameterGroupName(){return this._cacheParameterGroupName}set cacheParameterGroupName(value){cdk().traceProperty(this.node,"CacheParameterGroupName"),this._cacheParameterGroupName=value}get cacheSecurityGroupNames(){return this._cacheSecurityGroupNames}set cacheSecurityGroupNames(value){cdk().traceProperty(this.node,"CacheSecurityGroupNames"),this._cacheSecurityGroupNames=value}get cacheSubnetGroupName(){return this._cacheSubnetGroupName}set cacheSubnetGroupName(value){cdk().traceProperty(this.node,"CacheSubnetGroupName"),this._cacheSubnetGroupName=value}get clusterName(){return this._clusterName}set clusterName(value){cdk().traceProperty(this.node,"ClusterName"),this._clusterName=value}get engine(){return this._engine}set engine(value){cdk().traceProperty(this.node,"Engine"),this._engine=value}get engineVersion(){return this._engineVersion}set engineVersion(value){cdk().traceProperty(this.node,"EngineVersion"),this._engineVersion=value}get ipDiscovery(){return this._ipDiscovery}set ipDiscovery(value){cdk().traceProperty(this.node,"IpDiscovery"),this._ipDiscovery=value}get logDeliveryConfigurations(){return this._logDeliveryConfigurations}set logDeliveryConfigurations(value){cdk().traceProperty(this.node,"LogDeliveryConfigurations"),this._logDeliveryConfigurations=value}get networkType(){return this._networkType}set networkType(value){cdk().traceProperty(this.node,"NetworkType"),this._networkType=value}get notificationTopicArn(){return this._notificationTopicArn}set notificationTopicArn(value){cdk().traceProperty(this.node,"NotificationTopicArn"),this._notificationTopicArn=value}get numCacheNodes(){return this._numCacheNodes}set numCacheNodes(value){cdk().traceProperty(this.node,"NumCacheNodes"),this._numCacheNodes=value}get port(){return this._port}set port(value){cdk().traceProperty(this.node,"Port"),this._port=value}get preferredAvailabilityZone(){return this._preferredAvailabilityZone}set preferredAvailabilityZone(value){cdk().traceProperty(this.node,"PreferredAvailabilityZone"),this._preferredAvailabilityZone=value}get preferredAvailabilityZones(){return this._preferredAvailabilityZones}set preferredAvailabilityZones(value){cdk().traceProperty(this.node,"PreferredAvailabilityZones"),this._preferredAvailabilityZones=value}get preferredMaintenanceWindow(){return this._preferredMaintenanceWindow}set preferredMaintenanceWindow(value){cdk().traceProperty(this.node,"PreferredMaintenanceWindow"),this._preferredMaintenanceWindow=value}get snapshotArns(){return this._snapshotArns}set snapshotArns(value){cdk().traceProperty(this.node,"SnapshotArns"),this._snapshotArns=value}get snapshotName(){return this._snapshotName}set snapshotName(value){cdk().traceProperty(this.node,"SnapshotName"),this._snapshotName=value}get snapshotRetentionLimit(){return this._snapshotRetentionLimit}set snapshotRetentionLimit(value){cdk().traceProperty(this.node,"SnapshotRetentionLimit"),this._snapshotRetentionLimit=value}get snapshotWindow(){return this._snapshotWindow}set snapshotWindow(value){cdk().traceProperty(this.node,"SnapshotWindow"),this._snapshotWindow=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get transitEncryptionEnabled(){return this._transitEncryptionEnabled}set transitEncryptionEnabled(value){cdk().traceProperty(this.node,"TransitEncryptionEnabled"),this._transitEncryptionEnabled=value}get vpcSecurityGroupIds(){return this._vpcSecurityGroupIds}set vpcSecurityGroupIds(value){cdk().traceProperty(this.node,"VpcSecurityGroupIds"),this._vpcSecurityGroupIds=value}get attrConfigurationEndpointAddress(){return cdk().Token.asString(this.getAtt("ConfigurationEndpoint.Address",cdk().ResolutionTypeHint.STRING))}get attrConfigurationEndpointPort(){return cdk().Token.asString(this.getAtt("ConfigurationEndpoint.Port",cdk().ResolutionTypeHint.STRING))}get attrId(){return cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING))}get attrRedisEndpointAddress(){return cdk().Token.asString(this.getAtt("RedisEndpoint.Address",cdk().ResolutionTypeHint.STRING))}get attrRedisEndpointPort(){return cdk().Token.asString(this.getAtt("RedisEndpoint.Port",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{autoMinorVersionUpgrade:this._autoMinorVersionUpgrade,azMode:this._azMode,cacheNodeType:this._cacheNodeType,cacheParameterGroupName:this._cacheParameterGroupName,cacheSecurityGroupNames:this._cacheSecurityGroupNames,cacheSubnetGroupName:this._cacheSubnetGroupName,clusterName:this._clusterName,engine:this._engine,engineVersion:this._engineVersion,ipDiscovery:this._ipDiscovery,logDeliveryConfigurations:this._logDeliveryConfigurations,networkType:this._networkType,notificationTopicArn:this._notificationTopicArn,numCacheNodes:this._numCacheNodes,port:this._port,preferredAvailabilityZone:this._preferredAvailabilityZone,preferredAvailabilityZones:this._preferredAvailabilityZones,preferredMaintenanceWindow:this._preferredMaintenanceWindow,snapshotArns:this._snapshotArns,snapshotName:this._snapshotName,snapshotRetentionLimit:this._snapshotRetentionLimit,snapshotWindow:this._snapshotWindow,tags:this.tags.renderTags(),transitEncryptionEnabled:this._transitEncryptionEnabled,vpcSecurityGroupIds:this._vpcSecurityGroupIds}}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",CfnCacheCluster.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnCacheClusterPropsToCloudFormation(props)}}exports.CfnCacheCluster=CfnCacheCluster;function CfnCacheClusterCloudWatchLogsDestinationDetailsPropertyValidator(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("logGroup",cdk().requiredValidator)(properties.logGroup)),errors.collect(cdk().propertyValidator("logGroup",cdk().validateString)(properties.logGroup)),errors.wrap('supplied properties not correct for "CloudWatchLogsDestinationDetailsProperty"')}function convertCfnCacheClusterCloudWatchLogsDestinationDetailsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCacheClusterCloudWatchLogsDestinationDetailsPropertyValidator(properties).assertSuccess(),{LogGroup:cdk().stringToCloudFormation(properties.logGroup)}):properties}function CfnCacheClusterCloudWatchLogsDestinationDetailsPropertyFromCloudFormation(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("logGroup","LogGroup",properties.LogGroup!=null?cfn_parse().FromCloudFormation.getString(properties.LogGroup):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCacheClusterKinesisFirehoseDestinationDetailsPropertyValidator(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("deliveryStream",cdk().requiredValidator)(properties.deliveryStream)),errors.collect(cdk().propertyValidator("deliveryStream",cdk().validateString)(properties.deliveryStream)),errors.wrap('supplied properties not correct for "KinesisFirehoseDestinationDetailsProperty"')}function convertCfnCacheClusterKinesisFirehoseDestinationDetailsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCacheClusterKinesisFirehoseDestinationDetailsPropertyValidator(properties).assertSuccess(),{DeliveryStream:cdk().stringToCloudFormation(properties.deliveryStream)}):properties}function CfnCacheClusterKinesisFirehoseDestinationDetailsPropertyFromCloudFormation(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("deliveryStream","DeliveryStream",properties.DeliveryStream!=null?cfn_parse().FromCloudFormation.getString(properties.DeliveryStream):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCacheClusterDestinationDetailsPropertyValidator(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("cloudWatchLogsDetails",CfnCacheClusterCloudWatchLogsDestinationDetailsPropertyValidator)(properties.cloudWatchLogsDetails)),errors.collect(cdk().propertyValidator("kinesisFirehoseDetails",CfnCacheClusterKinesisFirehoseDestinationDetailsPropertyValidator)(properties.kinesisFirehoseDetails)),errors.wrap('supplied properties not correct for "DestinationDetailsProperty"')}function convertCfnCacheClusterDestinationDetailsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCacheClusterDestinationDetailsPropertyValidator(properties).assertSuccess(),{CloudWatchLogsDetails:convertCfnCacheClusterCloudWatchLogsDestinationDetailsPropertyToCloudFormation(properties.cloudWatchLogsDetails),KinesisFirehoseDetails:convertCfnCacheClusterKinesisFirehoseDestinationDetailsPropertyToCloudFormation(properties.kinesisFirehoseDetails)}):properties}function CfnCacheClusterDestinationDetailsPropertyFromCloudFormation(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("cloudWatchLogsDetails","CloudWatchLogsDetails",properties.CloudWatchLogsDetails!=null?CfnCacheClusterCloudWatchLogsDestinationDetailsPropertyFromCloudFormation(properties.CloudWatchLogsDetails):void 0),ret.addPropertyResult("kinesisFirehoseDetails","KinesisFirehoseDetails",properties.KinesisFirehoseDetails!=null?CfnCacheClusterKinesisFirehoseDestinationDetailsPropertyFromCloudFormation(properties.KinesisFirehoseDetails):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCacheClusterLogDeliveryConfigurationRequestPropertyValidator(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("destinationDetails",cdk().requiredValidator)(properties.destinationDetails)),errors.collect(cdk().propertyValidator("destinationDetails",CfnCacheClusterDestinationDetailsPropertyValidator)(properties.destinationDetails)),errors.collect(cdk().propertyValidator("destinationType",cdk().requiredValidator)(properties.destinationType)),errors.collect(cdk().propertyValidator("destinationType",cdk().validateString)(properties.destinationType)),errors.collect(cdk().propertyValidator("logFormat",cdk().requiredValidator)(properties.logFormat)),errors.collect(cdk().propertyValidator("logFormat",cdk().validateString)(properties.logFormat)),errors.collect(cdk().propertyValidator("logType",cdk().requiredValidator)(properties.logType)),errors.collect(cdk().propertyValidator("logType",cdk().validateString)(properties.logType)),errors.wrap('supplied properties not correct for "LogDeliveryConfigurationRequestProperty"')}function convertCfnCacheClusterLogDeliveryConfigurationRequestPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCacheClusterLogDeliveryConfigurationRequestPropertyValidator(properties).assertSuccess(),{DestinationDetails:convertCfnCacheClusterDestinationDetailsPropertyToCloudFormation(properties.destinationDetails),DestinationType:cdk().stringToCloudFormation(properties.destinationType),LogFormat:cdk().stringToCloudFormation(properties.logFormat),LogType:cdk().stringToCloudFormation(properties.logType)}):properties}function CfnCacheClusterLogDeliveryConfigurationRequestPropertyFromCloudFormation(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("destinationDetails","DestinationDetails",properties.DestinationDetails!=null?CfnCacheClusterDestinationDetailsPropertyFromCloudFormation(properties.DestinationDetails):void 0),ret.addPropertyResult("destinationType","DestinationType",properties.DestinationType!=null?cfn_parse().FromCloudFormation.getString(properties.DestinationType):void 0),ret.addPropertyResult("logFormat","LogFormat",properties.LogFormat!=null?cfn_parse().FromCloudFormation.getString(properties.LogFormat):void 0),ret.addPropertyResult("logType","LogType",properties.LogType!=null?cfn_parse().FromCloudFormation.getString(properties.LogType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCacheClusterPropsValidator(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("azMode",cdk().validateString)(properties.azMode)),errors.collect(cdk().propertyValidator("autoMinorVersionUpgrade",cdk().validateBoolean)(properties.autoMinorVersionUpgrade)),errors.collect(cdk().propertyValidator("cacheNodeType",cdk().requiredValidator)(properties.cacheNodeType)),errors.collect(cdk().propertyValidator("cacheNodeType",cdk().validateString)(properties.cacheNodeType)),errors.collect(cdk().propertyValidator("cacheParameterGroupName",cdk().validateString)(properties.cacheParameterGroupName)),errors.collect(cdk().propertyValidator("cacheSecurityGroupNames",cdk().listValidator(cdk().validateString))(properties.cacheSecurityGroupNames)),errors.collect(cdk().propertyValidator("cacheSubnetGroupName",cdk().validateString)(properties.cacheSubnetGroupName)),errors.collect(cdk().propertyValidator("clusterName",cdk().validateString)(properties.clusterName)),errors.collect(cdk().propertyValidator("engine",cdk().requiredValidator)(properties.engine)),errors.collect(cdk().propertyValidator("engine",cdk().validateString)(properties.engine)),errors.collect(cdk().propertyValidator("engineVersion",cdk().validateString)(properties.engineVersion)),errors.collect(cdk().propertyValidator("ipDiscovery",cdk().validateString)(properties.ipDiscovery)),errors.collect(cdk().propertyValidator("logDeliveryConfigurations",cdk().listValidator(CfnCacheClusterLogDeliveryConfigurationRequestPropertyValidator))(properties.logDeliveryConfigurations)),errors.collect(cdk().propertyValidator("networkType",cdk().validateString)(properties.networkType)),errors.collect(cdk().propertyValidator("notificationTopicArn",cdk().validateString)(properties.notificationTopicArn)),errors.collect(cdk().propertyValidator("numCacheNodes",cdk().requiredValidator)(properties.numCacheNodes)),errors.collect(cdk().propertyValidator("numCacheNodes",cdk().validateNumber)(properties.numCacheNodes)),errors.collect(cdk().propertyValidator("port",cdk().validateNumber)(properties.port)),errors.collect(cdk().propertyValidator("preferredAvailabilityZone",cdk().validateString)(properties.preferredAvailabilityZone)),errors.collect(cdk().propertyValidator("preferredAvailabilityZones",cdk().listValidator(cdk().validateString))(properties.preferredAvailabilityZones)),errors.collect(cdk().propertyValidator("preferredMaintenanceWindow",cdk().validateString)(properties.preferredMaintenanceWindow)),errors.collect(cdk().propertyValidator("snapshotArns",cdk().listValidator(cdk().validateString))(properties.snapshotArns)),errors.collect(cdk().propertyValidator("snapshotName",cdk().validateString)(properties.snapshotName)),errors.collect(cdk().propertyValidator("snapshotRetentionLimit",cdk().validateNumber)(properties.snapshotRetentionLimit)),errors.collect(cdk().propertyValidator("snapshotWindow",cdk().validateString)(properties.snapshotWindow)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("transitEncryptionEnabled",cdk().validateBoolean)(properties.transitEncryptionEnabled)),errors.collect(cdk().propertyValidator("vpcSecurityGroupIds",cdk().listValidator(cdk().validateString))(properties.vpcSecurityGroupIds)),errors.wrap('supplied properties not correct for "CfnCacheClusterProps"')}function convertCfnCacheClusterPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCacheClusterPropsValidator(properties).assertSuccess(),{AZMode:cdk().stringToCloudFormation(properties.azMode),AutoMinorVersionUpgrade:cdk().booleanToCloudFormation(properties.autoMinorVersionUpgrade),CacheNodeType:cdk().stringToCloudFormation(properties.cacheNodeType),CacheParameterGroupName:cdk().stringToCloudFormation(properties.cacheParameterGroupName),CacheSecurityGroupNames:cdk().listMapper(cdk().stringToCloudFormation)(properties.cacheSecurityGroupNames),CacheSubnetGroupName:cdk().stringToCloudFormation(properties.cacheSubnetGroupName),ClusterName:cdk().stringToCloudFormation(properties.clusterName),Engine:cdk().stringToCloudFormation(properties.engine),EngineVersion:cdk().stringToCloudFormation(properties.engineVersion),IpDiscovery:cdk().stringToCloudFormation(properties.ipDiscovery),LogDeliveryConfigurations:cdk().listMapper(convertCfnCacheClusterLogDeliveryConfigurationRequestPropertyToCloudFormation)(properties.logDeliveryConfigurations),NetworkType:cdk().stringToCloudFormation(properties.networkType),NotificationTopicArn:cdk().stringToCloudFormation(properties.notificationTopicArn),NumCacheNodes:cdk().numberToCloudFormation(properties.numCacheNodes),Port:cdk().numberToCloudFormation(properties.port),PreferredAvailabilityZone:cdk().stringToCloudFormation(properties.preferredAvailabilityZone),PreferredAvailabilityZones:cdk().listMapper(cdk().stringToCloudFormation)(properties.preferredAvailabilityZones),PreferredMaintenanceWindow:cdk().stringToCloudFormation(properties.preferredMaintenanceWindow),SnapshotArns:cdk().listMapper(cdk().stringToCloudFormation)(properties.snapshotArns),SnapshotName:cdk().stringToCloudFormation(properties.snapshotName),SnapshotRetentionLimit:cdk().numberToCloudFormation(properties.snapshotRetentionLimit),SnapshotWindow:cdk().stringToCloudFormation(properties.snapshotWindow),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),TransitEncryptionEnabled:cdk().booleanToCloudFormation(properties.transitEncryptionEnabled),VpcSecurityGroupIds:cdk().listMapper(cdk().stringToCloudFormation)(properties.vpcSecurityGroupIds)}):properties}function CfnCacheClusterPropsFromCloudFormation(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("autoMinorVersionUpgrade","AutoMinorVersionUpgrade",properties.AutoMinorVersionUpgrade!=null?cfn_parse().FromCloudFormation.getBoolean(properties.AutoMinorVersionUpgrade):void 0),ret.addPropertyResult("azMode","AZMode",properties.AZMode!=null?cfn_parse().FromCloudFormation.getString(properties.AZMode):void 0),ret.addPropertyResult("cacheNodeType","CacheNodeType",properties.CacheNodeType!=null?cfn_parse().FromCloudFormation.getString(properties.CacheNodeType):void 0),ret.addPropertyResult("cacheParameterGroupName","CacheParameterGroupName",properties.CacheParameterGroupName!=null?cfn_parse().FromCloudFormation.getString(properties.CacheParameterGroupName):void 0),ret.addPropertyResult("cacheSecurityGroupNames","CacheSecurityGroupNames",properties.CacheSecurityGroupNames!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.CacheSecurityGroupNames):void 0),ret.addPropertyResult("cacheSubnetGroupName","CacheSubnetGroupName",properties.CacheSubnetGroupName!=null?cfn_parse().FromCloudFormation.getString(properties.CacheSubnetGroupName):void 0),ret.addPropertyResult("clusterName","ClusterName",properties.ClusterName!=null?cfn_parse().FromCloudFormation.getString(properties.ClusterName):void 0),ret.addPropertyResult("engine","Engine",properties.Engine!=null?cfn_parse().FromCloudFormation.getString(properties.Engine):void 0),ret.addPropertyResult("engineVersion","EngineVersion",properties.EngineVersion!=null?cfn_parse().FromCloudFormation.getString(properties.EngineVersion):void 0),ret.addPropertyResult("ipDiscovery","IpDiscovery",properties.IpDiscovery!=null?cfn_parse().FromCloudFormation.getString(properties.IpDiscovery):void 0),ret.addPropertyResult("logDeliveryConfigurations","LogDeliveryConfigurations",properties.LogDeliveryConfigurations!=null?cfn_parse().FromCloudFormation.getArray(CfnCacheClusterLogDeliveryConfigurationRequestPropertyFromCloudFormation)(properties.LogDeliveryConfigurations):void 0),ret.addPropertyResult("networkType","NetworkType",properties.NetworkType!=null?cfn_parse().FromCloudFormation.getString(properties.NetworkType):void 0),ret.addPropertyResult("notificationTopicArn","NotificationTopicArn",properties.NotificationTopicArn!=null?cfn_parse().FromCloudFormation.getString(properties.NotificationTopicArn):void 0),ret.addPropertyResult("numCacheNodes","NumCacheNodes",properties.NumCacheNodes!=null?cfn_parse().FromCloudFormation.getNumber(properties.NumCacheNodes):void 0),ret.addPropertyResult("port","Port",properties.Port!=null?cfn_parse().FromCloudFormation.getNumber(properties.Port):void 0),ret.addPropertyResult("preferredAvailabilityZone","PreferredAvailabilityZone",properties.PreferredAvailabilityZone!=null?cfn_parse().FromCloudFormation.getString(properties.PreferredAvailabilityZone):void 0),ret.addPropertyResult("preferredAvailabilityZones","PreferredAvailabilityZones",properties.PreferredAvailabilityZones!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.PreferredAvailabilityZones):void 0),ret.addPropertyResult("preferredMaintenanceWindow","PreferredMaintenanceWindow",properties.PreferredMaintenanceWindow!=null?cfn_parse().FromCloudFormation.getString(properties.PreferredMaintenanceWindow):void 0),ret.addPropertyResult("snapshotArns","SnapshotArns",properties.SnapshotArns!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.SnapshotArns):void 0),ret.addPropertyResult("snapshotName","SnapshotName",properties.SnapshotName!=null?cfn_parse().FromCloudFormation.getString(properties.SnapshotName):void 0),ret.addPropertyResult("snapshotRetentionLimit","SnapshotRetentionLimit",properties.SnapshotRetentionLimit!=null?cfn_parse().FromCloudFormation.getNumber(properties.SnapshotRetentionLimit):void 0),ret.addPropertyResult("snapshotWindow","SnapshotWindow",properties.SnapshotWindow!=null?cfn_parse().FromCloudFormation.getString(properties.SnapshotWindow):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("transitEncryptionEnabled","TransitEncryptionEnabled",properties.TransitEncryptionEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.TransitEncryptionEnabled):void 0),ret.addPropertyResult("vpcSecurityGroupIds","VpcSecurityGroupIds",properties.VpcSecurityGroupIds!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.VpcSecurityGroupIds):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnGlobalReplicationGroup extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticache.CfnGlobalReplicationGroup",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::ElastiCache::GlobalReplicationGroup";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnGlobalReplicationGroupPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnGlobalReplicationGroup(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 isCfnGlobalReplicationGroup(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnGlobalReplicationGroup.CFN_RESOURCE_TYPE_NAME}static fromGlobalReplicationGroupId(scope,id,globalReplicationGroupId){class Import extends cdk().Resource{globalReplicationGroupRef;constructor(scope2,id2,globalReplicationGroupId2){super(scope2,id2),this.globalReplicationGroupRef={globalReplicationGroupId:globalReplicationGroupId2}}}return new Import(scope,id,globalReplicationGroupId)}static arnForGlobalReplicationGroup(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_elasticache_IGlobalReplicationGroupRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForGlobalReplicationGroup),error}return new(cfn_parse()).TemplateString("arn:${Partition}:elasticache::${Account}:globalreplicationgroup:${GlobalReplicationGroupId}").interpolate({Partition:cdk().Stack.of(resource).partition,Region:resource.env.region,Account:resource.env.account,GlobalReplicationGroupId:resource.globalReplicationGroupRef.globalReplicationGroupId})}_automaticFailoverEnabled;_cacheNodeType;_cacheParameterGroupName;_engine;_engineVersion;_globalNodeGroupCount;_globalReplicationGroupDescription;_globalReplicationGroupIdSuffix;_members;_regionalConfigurations;cfnPropertyNames={automaticFailoverEnabled:"AutomaticFailoverEnabled",cacheNodeType:"CacheNodeType",cacheParameterGroupName:"CacheParameterGroupName",engine:"Engine",engineVersion:"EngineVersion",globalNodeGroupCount:"GlobalNodeGroupCount",globalReplicationGroupDescription:"GlobalReplicationGroupDescription",globalReplicationGroupIdSuffix:"GlobalReplicationGroupIdSuffix",members:"Members",regionalConfigurations:"RegionalConfigurations"};constructor(scope,id,props){super(scope,id,{type:CfnGlobalReplicationGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticache_CfnGlobalReplicationGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnGlobalReplicationGroup),error}cdk().requireProperty(props,"members",this),this._automaticFailoverEnabled=props.automaticFailoverEnabled,this._cacheNodeType=props.cacheNodeType,this._cacheParameterGroupName=props.cacheParameterGroupName,this._engine=props.engine,this._engineVersion=props.engineVersion,this._globalNodeGroupCount=props.globalNodeGroupCount,this._globalReplicationGroupDescription=props.globalReplicationGroupDescription,this._globalReplicationGroupIdSuffix=props.globalReplicationGroupIdSuffix,this._members=props.members,this._regionalConfigurations=props.regionalConfigurations}get globalReplicationGroupRef(){return{globalReplicationGroupId:this.ref}}get automaticFailoverEnabled(){return this._automaticFailoverEnabled}set automaticFailoverEnabled(value){cdk().traceProperty(this.node,"AutomaticFailoverEnabled"),this._automaticFailoverEnabled=value}get cacheNodeType(){return this._cacheNodeType}set cacheNodeType(value){cdk().traceProperty(this.node,"CacheNodeType"),this._cacheNodeType=value}get cacheParameterGroupName(){return this._cacheParameterGroupName}set cacheParameterGroupName(value){cdk().traceProperty(this.node,"CacheParameterGroupName"),this._cacheParameterGroupName=value}get engine(){return this._engine}set engine(value){cdk().traceProperty(this.node,"Engine"),this._engine=value}get engineVersion(){return this._engineVersion}set engineVersion(value){cdk().traceProperty(this.node,"EngineVersion"),this._engineVersion=value}get globalNodeGroupCount(){return this._globalNodeGroupCount}set globalNodeGroupCount(value){cdk().traceProperty(this.node,"GlobalNodeGroupCount"),this._globalNodeGroupCount=value}get globalReplicationGroupDescription(){return this._globalReplicationGroupDescription}set globalReplicationGroupDescription(value){cdk().traceProperty(this.node,"GlobalReplicationGroupDescription"),this._globalReplicationGroupDescription=value}get globalReplicationGroupIdSuffix(){return this._globalReplicationGroupIdSuffix}set globalReplicationGroupIdSuffix(value){cdk().traceProperty(this.node,"GlobalReplicationGroupIdSuffix"),this._globalReplicationGroupIdSuffix=value}get members(){return this._members}set members(value){cdk().traceProperty(this.node,"Members"),this._members=value}get regionalConfigurations(){return this._regionalConfigurations}set regionalConfigurations(value){cdk().traceProperty(this.node,"RegionalConfigurations"),this._regionalConfigurations=value}get attrGlobalReplicationGroupId(){return cdk().Token.asString(this.getAtt("GlobalReplicationGroupId",cdk().ResolutionTypeHint.STRING))}get attrStatus(){return cdk().Token.asString(this.getAtt("Status",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{automaticFailoverEnabled:this._automaticFailoverEnabled,cacheNodeType:this._cacheNodeType,cacheParameterGroupName:this._cacheParameterGroupName,engine:this._engine,engineVersion:this._engineVersion,globalNodeGroupCount:this._globalNodeGroupCount,globalReplicationGroupDescription:this._globalReplicationGroupDescription,globalReplicationGroupIdSuffix:this._globalReplicationGroupIdSuffix,members:this._members,regionalConfigurations:this._regionalConfigurations}}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",CfnGlobalReplicationGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnGlobalReplicationGroupPropsToCloudFormation(props)}}exports.CfnGlobalReplicationGroup=CfnGlobalReplicationGroup;function CfnGlobalReplicationGroupReshardingConfigurationPropertyValidator(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("nodeGroupId",cdk().validateString)(properties.nodeGroupId)),errors.collect(cdk().propertyValidator("preferredAvailabilityZones",cdk().listValidator(cdk().validateString))(properties.preferredAvailabilityZones)),errors.wrap('supplied properties not correct for "ReshardingConfigurationProperty"')}function convertCfnGlobalReplicationGroupReshardingConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalReplicationGroupReshardingConfigurationPropertyValidator(properties).assertSuccess(),{NodeGroupId:cdk().stringToCloudFormation(properties.nodeGroupId),PreferredAvailabilityZones:cdk().listMapper(cdk().stringToCloudFormation)(properties.preferredAvailabilityZones)}):properties}function CfnGlobalReplicationGroupReshardingConfigurationPropertyFromCloudFormation(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("nodeGroupId","NodeGroupId",properties.NodeGroupId!=null?cfn_parse().FromCloudFormation.getString(properties.NodeGroupId):void 0),ret.addPropertyResult("preferredAvailabilityZones","PreferredAvailabilityZones",properties.PreferredAvailabilityZones!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.PreferredAvailabilityZones):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalReplicationGroupRegionalConfigurationPropertyValidator(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("replicationGroupId",cdk().validateString)(properties.replicationGroupId)),errors.collect(cdk().propertyValidator("replicationGroupRegion",cdk().validateString)(properties.replicationGroupRegion)),errors.collect(cdk().propertyValidator("reshardingConfigurations",cdk().listValidator(CfnGlobalReplicationGroupReshardingConfigurationPropertyValidator))(properties.reshardingConfigurations)),errors.wrap('supplied properties not correct for "RegionalConfigurationProperty"')}function convertCfnGlobalReplicationGroupRegionalConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalReplicationGroupRegionalConfigurationPropertyValidator(properties).assertSuccess(),{ReplicationGroupId:cdk().stringToCloudFormation(properties.replicationGroupId),ReplicationGroupRegion:cdk().stringToCloudFormation(properties.replicationGroupRegion),ReshardingConfigurations:cdk().listMapper(convertCfnGlobalReplicationGroupReshardingConfigurationPropertyToCloudFormation)(properties.reshardingConfigurations)}):properties}function CfnGlobalReplicationGroupRegionalConfigurationPropertyFromCloudFormation(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("replicationGroupId","ReplicationGroupId",properties.ReplicationGroupId!=null?cfn_parse().FromCloudFormation.getString(properties.ReplicationGroupId):void 0),ret.addPropertyResult("replicationGroupRegion","ReplicationGroupRegion",properties.ReplicationGroupRegion!=null?cfn_parse().FromCloudFormation.getString(properties.ReplicationGroupRegion):void 0),ret.addPropertyResult("reshardingConfigurations","ReshardingConfigurations",properties.ReshardingConfigurations!=null?cfn_parse().FromCloudFormation.getArray(CfnGlobalReplicationGroupReshardingConfigurationPropertyFromCloudFormation)(properties.ReshardingConfigurations):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalReplicationGroupGlobalReplicationGroupMemberPropertyValidator(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("replicationGroupId",cdk().validateString)(properties.replicationGroupId)),errors.collect(cdk().propertyValidator("replicationGroupRegion",cdk().validateString)(properties.replicationGroupRegion)),errors.collect(cdk().propertyValidator("role",cdk().validateString)(properties.role)),errors.wrap('supplied properties not correct for "GlobalReplicationGroupMemberProperty"')}function convertCfnGlobalReplicationGroupGlobalReplicationGroupMemberPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalReplicationGroupGlobalReplicationGroupMemberPropertyValidator(properties).assertSuccess(),{ReplicationGroupId:cdk().stringToCloudFormation(properties.replicationGroupId),ReplicationGroupRegion:cdk().stringToCloudFormation(properties.replicationGroupRegion),Role:cdk().stringToCloudFormation(properties.role)}):properties}function CfnGlobalReplicationGroupGlobalReplicationGroupMemberPropertyFromCloudFormation(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("replicationGroupId","ReplicationGroupId",properties.ReplicationGroupId!=null?cfn_parse().FromCloudFormation.getString(properties.ReplicationGroupId):void 0),ret.addPropertyResult("replicationGroupRegion","ReplicationGroupRegion",properties.ReplicationGroupRegion!=null?cfn_parse().FromCloudFormation.getString(properties.ReplicationGroupRegion):void 0),ret.addPropertyResult("role","Role",properties.Role!=null?cfn_parse().FromCloudFormation.getString(properties.Role):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalReplicationGroupPropsValidator(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("automaticFailoverEnabled",cdk().validateBoolean)(properties.automaticFailoverEnabled)),errors.collect(cdk().propertyValidator("cacheNodeType",cdk().validateString)(properties.cacheNodeType)),errors.collect(cdk().propertyValidator("cacheParameterGroupName",cdk().validateString)(properties.cacheParameterGroupName)),errors.collect(cdk().propertyValidator("engine",cdk().validateString)(properties.engine)),errors.collect(cdk().propertyValidator("engineVersion",cdk().validateString)(properties.engineVersion)),errors.collect(cdk().propertyValidator("globalNodeGroupCount",cdk().validateNumber)(properties.globalNodeGroupCount)),errors.collect(cdk().propertyValidator("globalReplicationGroupDescription",cdk().validateString)(properties.globalReplicationGroupDescription)),errors.collect(cdk().propertyValidator("globalReplicationGroupIdSuffix",cdk().validateString)(properties.globalReplicationGroupIdSuffix)),errors.collect(cdk().propertyValidator("members",cdk().requiredValidator)(properties.members)),errors.collect(cdk().propertyValidator("members",cdk().listValidator(CfnGlobalReplicationGroupGlobalReplicationGroupMemberPropertyValidator))(properties.members)),errors.collect(cdk().propertyValidator("regionalConfigurations",cdk().listValidator(CfnGlobalReplicationGroupRegionalConfigurationPropertyValidator))(properties.regionalConfigurations)),errors.wrap('supplied properties not correct for "CfnGlobalReplicationGroupProps"')}function convertCfnGlobalReplicationGroupPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalReplicationGroupPropsValidator(properties).assertSuccess(),{AutomaticFailoverEnabled:cdk().booleanToCloudFormation(properties.automaticFailoverEnabled),CacheNodeType:cdk().stringToCloudFormation(properties.cacheNodeType),CacheParameterGroupName:cdk().stringToCloudFormation(properties.cacheParameterGroupName),Engine:cdk().stringToCloudFormation(properties.engine),EngineVersion:cdk().stringToCloudFormation(properties.engineVersion),GlobalNodeGroupCount:cdk().numberToCloudFormation(properties.globalNodeGroupCount),GlobalReplicationGroupDescription:cdk().stringToCloudFormation(properties.globalReplicationGroupDescription),GlobalReplicationGroupIdSuffix:cdk().stringToCloudFormation(properties.globalReplicationGroupIdSuffix),Members:cdk().listMapper(convertCfnGlobalReplicationGroupGlobalReplicationGroupMemberPropertyToCloudFormation)(properties.members),RegionalConfigurations:cdk().listMapper(convertCfnGlobalReplicationGroupRegionalConfigurationPropertyToCloudFormation)(properties.regionalConfigurations)}):properties}function CfnGlobalReplicationGroupPropsFromCloudFormation(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("automaticFailoverEnabled","AutomaticFailoverEnabled",properties.AutomaticFailoverEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.AutomaticFailoverEnabled):void 0),ret.addPropertyResult("cacheNodeType","CacheNodeType",properties.CacheNodeType!=null?cfn_parse().FromCloudFormation.getString(properties.CacheNodeType):void 0),ret.addPropertyResult("cacheParameterGroupName","CacheParameterGroupName",properties.CacheParameterGroupName!=null?cfn_parse().FromCloudFormation.getString(properties.CacheParameterGroupName):void 0),ret.addPropertyResult("engine","Engine",properties.Engine!=null?cfn_parse().FromCloudFormation.getString(properties.Engine):void 0),ret.addPropertyResult("engineVersion","EngineVersion",properties.EngineVersion!=null?cfn_parse().FromCloudFormation.getString(properties.EngineVersion):void 0),ret.addPropertyResult("globalNodeGroupCount","GlobalNodeGroupCount",properties.GlobalNodeGroupCount!=null?cfn_parse().FromCloudFormation.getNumber(properties.GlobalNodeGroupCount):void 0),ret.addPropertyResult("globalReplicationGroupDescription","GlobalReplicationGroupDescription",properties.GlobalReplicationGroupDescription!=null?cfn_parse().FromCloudFormation.getString(properties.GlobalReplicationGroupDescription):void 0),ret.addPropertyResult("globalReplicationGroupIdSuffix","GlobalReplicationGroupIdSuffix",properties.GlobalReplicationGroupIdSuffix!=null?cfn_parse().FromCloudFormation.getString(properties.GlobalReplicationGroupIdSuffix):void 0),ret.addPropertyResult("members","Members",properties.Members!=null?cfn_parse().FromCloudFormation.getArray(CfnGlobalReplicationGroupGlobalReplicationGroupMemberPropertyFromCloudFormation)(properties.Members):void 0),ret.addPropertyResult("regionalConfigurations","RegionalConfigurations",properties.RegionalConfigurations!=null?cfn_parse().FromCloudFormation.getArray(CfnGlobalReplicationGroupRegionalConfigurationPropertyFromCloudFormation)(properties.RegionalConfigurations):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnParameterGroup extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticache.CfnParameterGroup",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::ElastiCache::ParameterGroup";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnParameterGroupPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnParameterGroup(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 isCfnParameterGroup(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnParameterGroup.CFN_RESOURCE_TYPE_NAME}static fromCacheParameterGroupName(scope,id,cacheParameterGroupName){class Import extends cdk().Resource{parameterGroupRef;constructor(scope2,id2,cacheParameterGroupName2){super(scope2,id2),this.parameterGroupRef={cacheParameterGroupName:cacheParameterGroupName2}}}return new Import(scope,id,cacheParameterGroupName)}static arnForParameterGroup(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_elasticache_IParameterGroupRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForParameterGroup),error}return new(cfn_parse()).TemplateString("arn:${Partition}:elasticache:${Region}:${Account}:parametergroup:${CacheParameterGroupName}").interpolate({Partition:cdk().Stack.of(resource).partition,Region:resource.env.region,Account:resource.env.account,CacheParameterGroupName:resource.parameterGroupRef.cacheParameterGroupName})}_cacheParameterGroupFamily;_description;_properties;tags;_tagsRaw;cfnPropertyNames={cacheParameterGroupFamily:"CacheParameterGroupFamily",description:"Description",properties:"Properties",tags:"Tags"};constructor(scope,id,props){super(scope,id,{type:CfnParameterGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticache_CfnParameterGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnParameterGroup),error}cdk().requireProperty(props,"cacheParameterGroupFamily",this),cdk().requireProperty(props,"description",this),this._cacheParameterGroupFamily=props.cacheParameterGroupFamily,this._description=props.description,this._properties=props.properties,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::ElastiCache::ParameterGroup",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags}get parameterGroupRef(){return{cacheParameterGroupName:this.ref}}get cacheParameterGroupFamily(){return this._cacheParameterGroupFamily}set cacheParameterGroupFamily(value){cdk().traceProperty(this.node,"CacheParameterGroupFamily"),this._cacheParameterGroupFamily=value}get description(){return this._description}set description(value){cdk().traceProperty(this.node,"Description"),this._description=value}get properties(){return this._properties}set properties(value){cdk().traceProperty(this.node,"Properties"),this._properties=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get attrCacheParameterGroupName(){return cdk().Token.asString(this.getAtt("CacheParameterGroupName",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{cacheParameterGroupFamily:this._cacheParameterGroupFamily,description:this._description,properties:this._properties,tags:this.tags.renderTags()}}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",CfnParameterGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnParameterGroupPropsToCloudFormation(props)}}exports.CfnParameterGroup=CfnParameterGroup;function CfnParameterGroupPropsValidator(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("cacheParameterGroupFamily",cdk().requiredValidator)(properties.cacheParameterGroupFamily)),errors.collect(cdk().propertyValidator("cacheParameterGroupFamily",cdk().validateString)(properties.cacheParameterGroupFamily)),errors.collect(cdk().propertyValidator("description",cdk().requiredValidator)(properties.description)),errors.collect(cdk().propertyValidator("description",cdk().validateString)(properties.description)),errors.collect(cdk().propertyValidator("properties",cdk().hashValidator(cdk().validateString))(properties.properties)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnParameterGroupProps"')}function convertCfnParameterGroupPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnParameterGroupPropsValidator(properties).assertSuccess(),{CacheParameterGroupFamily:cdk().stringToCloudFormation(properties.cacheParameterGroupFamily),Description:cdk().stringToCloudFormation(properties.description),Properties:cdk().hashMapper(cdk().stringToCloudFormation)(properties.properties),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnParameterGroupPropsFromCloudFormation(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("cacheParameterGroupFamily","CacheParameterGroupFamily",properties.CacheParameterGroupFamily!=null?cfn_parse().FromCloudFormation.getString(properties.CacheParameterGroupFamily):void 0),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse().FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("properties","Properties",properties.Properties!=null?cfn_parse().FromCloudFormation.getMap(cfn_parse().FromCloudFormation.getString)(properties.Properties):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnReplicationGroup extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticache.CfnReplicationGroup",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::ElastiCache::ReplicationGroup";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnReplicationGroupPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnReplicationGroup(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 isCfnReplicationGroup(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnReplicationGroup.CFN_RESOURCE_TYPE_NAME}static fromReplicationGroupId(scope,id,replicationGroupId){class Import extends cdk().Resource{replicationGroupRef;constructor(scope2,id2,replicationGroupId2){super(scope2,id2),this.replicationGroupRef={replicationGroupId:replicationGroupId2}}}return new Import(scope,id,replicationGroupId)}static arnForReplicationGroup(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_elasticache_IReplicationGroupRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForReplicationGroup),error}return new(cfn_parse()).TemplateString("arn:${Partition}:elasticache:${Region}:${Account}:replicationgroup:${ReplicationGroupId}").interpolate({Partition:cdk().Stack.of(resource).partition,Region:resource.env.region,Account:resource.env.account,ReplicationGroupId:resource.replicationGroupRef.replicationGroupId})}_atRestEncryptionEnabled;_authToken;_automaticFailoverEnabled;_autoMinorVersionUpgrade;_cacheNodeType;_cacheParameterGroupName;_cacheSecurityGroupNames;_cacheSubnetGroupName;_clusterMode;_dataTieringEnabled;_engine;_engineVersion;_globalReplicationGroupId;_ipDiscovery;_kmsKeyId;_logDeliveryConfigurations;_multiAzEnabled;_networkType;_nodeGroupConfiguration;_notificationTopicArn;_numCacheClusters;_numNodeGroups;_port;_preferredCacheClusterAZs;_preferredMaintenanceWindow;_primaryClusterId;_replicasPerNodeGroup;_replicationGroupDescription;_replicationGroupId;_securityGroupIds;_snapshotArns;_snapshotName;_snapshotRetentionLimit;_snapshottingClusterId;_snapshotWindow;tags;_tagsRaw;_transitEncryptionEnabled;_transitEncryptionMode;_userGroupIds;cfnPropertyNames={atRestEncryptionEnabled:"AtRestEncryptionEnabled",authToken:"AuthToken",automaticFailoverEnabled:"AutomaticFailoverEnabled",autoMinorVersionUpgrade:"AutoMinorVersionUpgrade",cacheNodeType:"CacheNodeType",cacheParameterGroupName:"CacheParameterGroupName",cacheSecurityGroupNames:"CacheSecurityGroupNames",cacheSubnetGroupName:"CacheSubnetGroupName",clusterMode:"ClusterMode",dataTieringEnabled:"DataTieringEnabled",engine:"Engine",engineVersion:"EngineVersion",globalReplicationGroupId:"GlobalReplicationGroupId",ipDiscovery:"IpDiscovery",kmsKeyId:"KmsKeyId",logDeliveryConfigurations:"LogDeliveryConfigurations",multiAzEnabled:"MultiAZEnabled",networkType:"NetworkType",nodeGroupConfiguration:"NodeGroupConfiguration",notificationTopicArn:"NotificationTopicArn",numCacheClusters:"NumCacheClusters",numNodeGroups:"NumNodeGroups",port:"Port",preferredCacheClusterAZs:"PreferredCacheClusterAZs",preferredMaintenanceWindow:"PreferredMaintenanceWindow",primaryClusterId:"PrimaryClusterId",replicasPerNodeGroup:"ReplicasPerNodeGroup",replicationGroupDescription:"ReplicationGroupDescription",replicationGroupId:"ReplicationGroupId",securityGroupIds:"SecurityGroupIds",snapshotArns:"SnapshotArns",snapshotName:"SnapshotName",snapshotRetentionLimit:"SnapshotRetentionLimit",snapshottingClusterId:"SnapshottingClusterId",snapshotWindow:"SnapshotWindow",tags:"Tags",transitEncryptionEnabled:"TransitEncryptionEnabled",transitEncryptionMode:"TransitEncryptionMode",userGroupIds:"UserGroupIds"};constructor(scope,id,props){super(scope,id,{type:CfnReplicationGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticache_CfnReplicationGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnReplicationGroup),error}cdk().requireProperty(props,"replicationGroupDescription",this),this._atRestEncryptionEnabled=props.atRestEncryptionEnabled,this._authToken=props.authToken,this._automaticFailoverEnabled=props.automaticFailoverEnabled,this._autoMinorVersionUpgrade=props.autoMinorVersionUpgrade,this._cacheNodeType=props.cacheNodeType,this._cacheParameterGroupName=props.cacheParameterGroupName,this._cacheSecurityGroupNames=props.cacheSecurityGroupNames,this._cacheSubnetGroupName=props.cacheSubnetGroupName,this._clusterMode=props.clusterMode,this._dataTieringEnabled=props.dataTieringEnabled,this._engine=props.engine,this._engineVersion=props.engineVersion,this._globalReplicationGroupId=props.globalReplicationGroupId,this._ipDiscovery=props.ipDiscovery,this._kmsKeyId=props.kmsKeyId,this._logDeliveryConfigurations=props.logDeliveryConfigurations,this._multiAzEnabled=props.multiAzEnabled,this._networkType=props.networkType,this._nodeGroupConfiguration=props.nodeGroupConfiguration,this._notificationTopicArn=props.notificationTopicArn,this._numCacheClusters=props.numCacheClusters,this._numNodeGroups=props.numNodeGroups,this._port=props.port,this._preferredCacheClusterAZs=props.preferredCacheClusterAZs,this._preferredMaintenanceWindow=props.preferredMaintenanceWindow,this._primaryClusterId=props.primaryClusterId,this._replicasPerNodeGroup=props.replicasPerNodeGroup,this._replicationGroupDescription=props.replicationGroupDescription,this._replicationGroupId=props.replicationGroupId,this._securityGroupIds=props.securityGroupIds,this._snapshotArns=props.snapshotArns,this._snapshotName=props.snapshotName,this._snapshotRetentionLimit=props.snapshotRetentionLimit,this._snapshottingClusterId=props.snapshottingClusterId,this._snapshotWindow=props.snapshotWindow,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::ElastiCache::ReplicationGroup",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags,this._transitEncryptionEnabled=props.transitEncryptionEnabled,this._transitEncryptionMode=props.transitEncryptionMode,this._userGroupIds=props.userGroupIds,this.node.scope!=null&&cdk().Resource.isResource(this.node.scope)&&this.node.addValidation({validate:()=>this.cfnOptions.deletionPolicy===void 0?["'AWS::ElastiCache::ReplicationGroup' is a stateful resource type, and you must specify a Removal Policy for it. Call 'resource.applyRemovalPolicy()'."]:[]})}get replicationGroupRef(){return{replicationGroupId:this.ref}}get atRestEncryptionEnabled(){return this._atRestEncryptionEnabled}set atRestEncryptionEnabled(value){cdk().traceProperty(this.node,"AtRestEncryptionEnabled"),this._atRestEncryptionEnabled=value}get authToken(){return this._authToken}set authToken(value){cdk().traceProperty(this.node,"AuthToken"),this._authToken=value}get automaticFailoverEnabled(){return this._automaticFailoverEnabled}set automaticFailoverEnabled(value){cdk().traceProperty(this.node,"AutomaticFailoverEnabled"),this._automaticFailoverEnabled=value}get autoMinorVersionUpgrade(){return this._autoMinorVersionUpgrade}set autoMinorVersionUpgrade(value){cdk().traceProperty(this.node,"AutoMinorVersionUpgrade"),this._autoMinorVersionUpgrade=value}get cacheNodeType(){return this._cacheNodeType}set cacheNodeType(value){cdk().traceProperty(this.node,"CacheNodeType"),this._cacheNodeType=value}get cacheParameterGroupName(){return this._cacheParameterGroupName}set cacheParameterGroupName(value){cdk().traceProperty(this.node,"CacheParameterGroupName"),this._cacheParameterGroupName=value}get cacheSecurityGroupNames(){try{jsiiDeprecationWarnings().print("aws-cdk-lib.aws_elasticache.CfnReplicationGroup#cacheSecurityGroupNames","this property has been deprecated")}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,jsiiDeprecationWarnings().getPropertyDescriptor(this,"cacheSecurityGroupNames").get),error}return this._cacheSecurityGroupNames}set cacheSecurityGroupNames(value){try{jsiiDeprecationWarnings().print("aws-cdk-lib.aws_elasticache.CfnReplicationGroup#cacheSecurityGroupNames","this property has been deprecated")}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,jsiiDeprecationWarnings().getPropertyDescriptor(this,"cacheSecurityGroupNames").set),error}cdk().traceProperty(this.node,"CacheSecurityGroupNames"),this._cacheSecurityGroupNames=value}get cacheSubnetGroupName(){return this._cacheSubnetGroupName}set cacheSubnetGroupName(value){cdk().traceProperty(this.node,"CacheSubnetGroupName"),this._cacheSubnetGroupName=value}get clusterMode(){return this._clusterMode}set clusterMode(value){cdk().traceProperty(this.node,"ClusterMode"),this._clusterMode=value}get dataTieringEnabled(){return this._dataTieringEnabled}set dataTieringEnabled(value){cdk().traceProperty(this.node,"DataTieringEnabled"),this._dataTieringEnabled=value}get engine(){return this._engine}set engine(value){cdk().traceProperty(this.node,"Engine"),this._engine=value}get engineVersion(){return this._engineVersion}set engineVersion(value){cdk().traceProperty(this.node,"EngineVersion"),this._engineVersion=value}get globalReplicationGroupId(){return this._globalReplicationGroupId}set globalReplicationGroupId(value){cdk().traceProperty(this.node,"GlobalReplicationGroupId"),this._globalReplicationGroupId=value}get ipDiscovery(){return this._ipDiscovery}set ipDiscovery(value){cdk().traceProperty(this.node,"IpDiscovery"),this._ipDiscovery=value}get kmsKeyId(){return this._kmsKeyId}set kmsKeyId(value){cdk().traceProperty(this.node,"KmsKeyId"),this._kmsKeyId=value}get logDeliveryConfigurations(){return this._logDeliveryConfigurations}set logDeliveryConfigurations(value){cdk().traceProperty(this.node,"LogDeliveryConfigurations"),this._logDeliveryConfigurations=value}get multiAzEnabled(){return this._multiAzEnabled}set multiAzEnabled(value){cdk().traceProperty(this.node,"MultiAZEnabled"),this._multiAzEnabled=value}get networkType(){return this._networkType}set networkType(value){cdk().traceProperty(this.node,"NetworkType"),this._networkType=value}get nodeGroupConfiguration(){return this._nodeGroupConfiguration}set nodeGroupConfiguration(value){cdk().traceProperty(this.node,"NodeGroupConfiguration"),this._nodeGroupConfiguration=value}get notificationTopicArn(){return this._notificationTopicArn}set notificationTopicArn(value){cdk().traceProperty(this.node,"NotificationTopicArn"),this._notificationTopicArn=value}get numCacheClusters(){return this._numCacheClusters}set numCacheClusters(value){cdk().traceProperty(this.node,"NumCacheClusters"),this._numCacheClusters=value}get numNodeGroups(){return this._numNodeGroups}set numNodeGroups(value){cdk().traceProperty(this.node,"NumNodeGroups"),this._numNodeGroups=value}get port(){return this._port}set port(value){cdk().traceProperty(this.node,"Port"),this._port=value}get preferredCacheClusterAZs(){return this._preferredCacheClusterAZs}set preferredCacheClusterAZs(value){cdk().traceProperty(this.node,"PreferredCacheClusterAZs"),this._preferredCacheClusterAZs=value}get preferredMaintenanceWindow(){return this._preferredMaintenanceWindow}set preferredMaintenanceWindow(value){cdk().traceProperty(this.node,"PreferredMaintenanceWindow"),this._preferredMaintenanceWindow=value}get primaryClusterId(){return this._primaryClusterId}set primaryClusterId(value){cdk().traceProperty(this.node,"PrimaryClusterId"),this._primaryClusterId=value}get replicasPerNodeGroup(){return this._replicasPerNodeGroup}set replicasPerNodeGroup(value){cdk().traceProperty(this.node,"ReplicasPerNodeGroup"),this._replicasPerNodeGroup=value}get replicationGroupDescription(){return this._replicationGroupDescription}set replicationGroupDescription(value){cdk().traceProperty(this.node,"ReplicationGroupDescription"),this._replicationGroupDescription=value}get replicationGroupId(){return this._replicationGroupId}set replicationGroupId(value){cdk().traceProperty(this.node,"ReplicationGroupId"),this._replicationGroupId=value}get securityGroupIds(){return this._securityGroupIds}set securityGroupIds(value){cdk().traceProperty(this.node,"SecurityGroupIds"),this._securityGroupIds=value}get snapshotArns(){return this._snapshotArns}set snapshotArns(value){cdk().traceProperty(this.node,"SnapshotArns"),this._snapshotArns=value}get snapshotName(){return this._snapshotName}set snapshotName(value){cdk().traceProperty(this.node,"SnapshotName"),this._snapshotName=value}get snapshotRetentionLimit(){return this._snapshotRetentionLimit}set snapshotRetentionLimit(value){cdk().traceProperty(this.node,"SnapshotRetentionLimit"),this._snapshotRetentionLimit=value}get snapshottingClusterId(){return this._snapshottingClusterId}set snapshottingClusterId(value){cdk().traceProperty(this.node,"SnapshottingClusterId"),this._snapshottingClusterId=value}get snapshotWindow(){return this._snapshotWindow}set snapshotWindow(value){cdk().traceProperty(this.node,"SnapshotWindow"),this._snapshotWindow=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get transitEncryptionEnabled(){return this._transitEncryptionEnabled}set transitEncryptionEnabled(value){cdk().traceProperty(this.node,"TransitEncryptionEnabled"),this._transitEncryptionEnabled=value}get transitEncryptionMode(){return this._transitEncryptionMode}set transitEncryptionMode(value){cdk().traceProperty(this.node,"TransitEncryptionMode"),this._transitEncryptionMode=value}get userGroupIds(){return this._userGroupIds}set userGroupIds(value){cdk().traceProperty(this.node,"UserGroupIds"),this._userGroupIds=value}get attrConfigurationEndPoint(){return this.getAtt("ConfigurationEndPoint")}get attrConfigurationEndPointAddress(){return cdk().Token.asString(this.getAtt("ConfigurationEndPoint.Address",cdk().ResolutionTypeHint.STRING))}get attrConfigurationEndPointPort(){return cdk().Token.asString(this.getAtt("ConfigurationEndPoint.Port",cdk().ResolutionTypeHint.STRING))}get attrPrimaryEndPoint(){return this.getAtt("PrimaryEndPoint")}get attrPrimaryEndPointAddress(){return cdk().Token.asString(this.getAtt("PrimaryEndPoint.Address",cdk().ResolutionTypeHint.STRING))}get attrPrimaryEndPointPort(){return cdk().Token.asString(this.getAtt("PrimaryEndPoint.Port",cdk().ResolutionTypeHint.STRING))}get attrReadEndPoint(){return this.getAtt("ReadEndPoint")}get attrReadEndPointAddresses(){return cdk().Token.asString(this.getAtt("ReadEndPoint.Addresses",cdk().ResolutionTypeHint.STRING))}get attrReadEndPointAddressesList(){return cdk().Token.asList(this.getAtt("ReadEndPoint.AddressesList",cdk().ResolutionTypeHint.STRING_LIST))}get attrReadEndPointPorts(){return cdk().Token.asString(this.getAtt("ReadEndPoint.Ports",cdk().ResolutionTypeHint.STRING))}get attrReadEndPointPortsList(){return cdk().Token.asList(this.getAtt("ReadEndPoint.PortsList",cdk().ResolutionTypeHint.STRING_LIST))}get attrReaderEndPoint(){return this.getAtt("ReaderEndPoint")}get attrReaderEndPointAddress(){return cdk().Token.asString(this.getAtt("ReaderEndPoint.Address",cdk().ResolutionTypeHint.STRING))}get attrReaderEndPointPort(){return cdk().Token.asString(this.getAtt("ReaderEndPoint.Port",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{atRestEncryptionEnabled:this._atRestEncryptionEnabled,authToken:this._authToken,automaticFailoverEnabled:this._automaticFailoverEnabled,autoMinorVersionUpgrade:this._autoMinorVersionUpgrade,cacheNodeType:this._cacheNodeType,cacheParameterGroupName:this._cacheParameterGroupName,cacheSecurityGroupNames:this._cacheSecurityGroupNames,cacheSubnetGroupName:this._cacheSubnetGroupName,clusterMode:this._clusterMode,dataTieringEnabled:this._dataTieringEnabled,engine:this._engine,engineVersion:this._engineVersion,globalReplicationGroupId:this._globalReplicationGroupId,ipDiscovery:this._ipDiscovery,kmsKeyId:this._kmsKeyId,logDeliveryConfigurations:this._logDeliveryConfigurations,multiAzEnabled:this._multiAzEnabled,networkType:this._networkType,nodeGroupConfiguration:this._nodeGroupConfiguration,notificationTopicArn:this._notificationTopicArn,numCacheClusters:this._numCacheClusters,numNodeGroups:this._numNodeGroups,port:this._port,preferredCacheClusterAZs:this._preferredCacheClusterAZs,preferredMaintenanceWindow:this._preferredMaintenanceWindow,primaryClusterId:this._primaryClusterId,replicasPerNodeGroup:this._replicasPerNodeGroup,replicationGroupDescription:this._replicationGroupDescription,replicationGroupId:this._replicationGroupId,securityGroupIds:this._securityGroupIds,snapshotArns:this._snapshotArns,snapshotName:this._snapshotName,snapshotRetentionLimit:this._snapshotRetentionLimit,snapshottingClusterId:this._snapshottingClusterId,snapshotWindow:this._snapshotWindow,tags:this.tags.renderTags(),transitEncryptionEnabled:this._transitEncryptionEnabled,transitEncryptionMode:this._transitEncryptionMode,userGroupIds:this._userGroupIds}}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",CfnReplicationGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnReplicationGroupPropsToCloudFormation(props)}}exports.CfnReplicationGroup=CfnReplicationGroup;function CfnReplicationGroupCloudWatchLogsDestinationDetailsPropertyValidator(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("logGroup",cdk().requiredValidator)(properties.logGroup)),errors.collect(cdk().propertyValidator("logGroup",cdk().validateString)(properties.logGroup)),errors.wrap('supplied properties not correct for "CloudWatchLogsDestinationDetailsProperty"')}function convertCfnReplicationGroupCloudWatchLogsDestinationDetailsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnReplicationGroupCloudWatchLogsDestinationDetailsPropertyValidator(properties).assertSuccess(),{LogGroup:cdk().stringToCloudFormation(properties.logGroup)}):properties}function CfnReplicationGroupCloudWatchLogsDestinationDetailsPropertyFromCloudFormation(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("logGroup","LogGroup",properties.LogGroup!=null?cfn_parse().FromCloudFormation.getString(properties.LogGroup):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnReplicationGroupKinesisFirehoseDestinationDetailsPropertyValidator(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("deliveryStream",cdk().requiredValidator)(properties.deliveryStream)),errors.collect(cdk().propertyValidator("deliveryStream",cdk().validateString)(properties.deliveryStream)),errors.wrap('supplied properties not correct for "KinesisFirehoseDestinationDetailsProperty"')}function convertCfnReplicationGroupKinesisFirehoseDestinationDetailsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnReplicationGroupKinesisFirehoseDestinationDetailsPropertyValidator(properties).assertSuccess(),{DeliveryStream:cdk().stringToCloudFormation(properties.deliveryStream)}):properties}function CfnReplicationGroupKinesisFirehoseDestinationDetailsPropertyFromCloudFormation(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("deliveryStream","DeliveryStream",properties.DeliveryStream!=null?cfn_parse().FromCloudFormation.getString(properties.DeliveryStream):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnReplicationGroupDestinationDetailsPropertyValidator(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("cloudWatchLogsDetails",CfnReplicationGroupCloudWatchLogsDestinationDetailsPropertyValidator)(properties.cloudWatchLogsDetails)),errors.collect(cdk().propertyValidator("kinesisFirehoseDetails",CfnReplicationGroupKinesisFirehoseDestinationDetailsPropertyValidator)(properties.kinesisFirehoseDetails)),errors.wrap('supplied properties not correct for "DestinationDetailsProperty"')}function convertCfnReplicationGroupDestinationDetailsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnReplicationGroupDestinationDetailsPropertyValidator(properties).assertSuccess(),{CloudWatchLogsDetails:convertCfnReplicationGroupCloudWatchLogsDestinationDetailsPropertyToCloudFormation(properties.cloudWatchLogsDetails),KinesisFirehoseDetails:convertCfnReplicationGroupKinesisFirehoseDestinationDetailsPropertyToCloudFormation(properties.kinesisFirehoseDetails)}):properties}function CfnReplicationGroupDestinationDetailsPropertyFromCloudFormation(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("cloudWatchLogsDetails","CloudWatchLogsDetails",properties.CloudWatchLogsDetails!=null?CfnReplicationGroupCloudWatchLogsDestinationDetailsPropertyFromCloudFormation(properties.CloudWatchLogsDetails):void 0),ret.addPropertyResult("kinesisFirehoseDetails","KinesisFirehoseDetails",properties.KinesisFirehoseDetails!=null?CfnReplicationGroupKinesisFirehoseDestinationDetailsPropertyFromCloudFormation(properties.KinesisFirehoseDetails):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnReplicationGroupLogDeliveryConfigurationRequestPropertyValidator(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("destinationDetails",cdk().requiredValidator)(properties.destinationDetails)),errors.collect(cdk().propertyValidator("destinationDetails",CfnReplicationGroupDestinationDetailsPropertyValidator)(properties.destinationDetails)),errors.collect(cdk().propertyValidator("destinationType",cdk().requiredValidator)(properties.destinationType)),errors.collect(cdk().propertyValidator("destinationType",cdk().validateString)(properties.destinationType)),errors.collect(cdk().propertyValidator("logFormat",cdk().requiredValidator)(properties.logFormat)),errors.collect(cdk().propertyValidator("logFormat",cdk().validateString)(properties.logFormat)),errors.collect(cdk().propertyValidator("logType",cdk().requiredValidator)(properties.logType)),errors.collect(cdk().propertyValidator("logType",cdk().validateString)(properties.logType)),errors.wrap('supplied properties not correct for "LogDeliveryConfigurationRequestProperty"')}function convertCfnReplicationGroupLogDeliveryConfigurationRequestPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnReplicationGroupLogDeliveryConfigurationRequestPropertyValidator(properties).assertSuccess(),{DestinationDetails:convertCfnReplicationGroupDestinationDetailsPropertyToCloudFormation(properties.destinationDetails),DestinationType:cdk().stringToCloudFormation(properties.destinationType),LogFormat:cdk().stringToCloudFormation(properties.logFormat),LogType:cdk().stringToCloudFormation(properties.logType)}):properties}function CfnReplicationGroupLogDeliveryConfigurationRequestPropertyFromCloudFormation(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("destinationDetails","DestinationDetails",properties.DestinationDetails!=null?CfnReplicationGroupDestinationDetailsPropertyFromCloudFormation(properties.DestinationDetails):void 0),ret.addPropertyResult("destinationType","DestinationType",properties.DestinationType!=null?cfn_parse().FromCloudFormation.getString(properties.DestinationType):void 0),ret.addPropertyResult("logFormat","LogFormat",properties.LogFormat!=null?cfn_parse().FromCloudFormation.getString(properties.LogFormat):void 0),ret.addPropertyResult("logType","LogType",properties.LogType!=null?cfn_parse().FromCloudFormation.getString(properties.LogType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnReplicationGroupNodeGroupConfigurationPropertyValidator(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("nodeGroupId",cdk().validateString)(properties.nodeGroupId)),errors.collect(cdk().propertyValidator("primaryAvailabilityZone",cdk().validateString)(properties.primaryAvailabilityZone)),errors.collect(cdk().propertyValidator("replicaAvailabilityZones",cdk().listValidator(cdk().validateString))(properties.replicaAvailabilityZones)),errors.collect(cdk().propertyValidator("replicaCount",cdk().validateNumber)(properties.replicaCount)),errors.collect(cdk().propertyValidator("slots",cdk().validateString)(properties.slots)),errors.wrap('supplied properties not correct for "NodeGroupConfigurationProperty"')}function convertCfnReplicationGroupNodeGroupConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnReplicationGroupNodeGroupConfigurationPropertyValidator(properties).assertSuccess(),{NodeGroupId:cdk().stringToCloudFormation(properties.nodeGroupId),PrimaryAvailabilityZone:cdk().stringToCloudFormation(properties.primaryAvailabilityZone),ReplicaAvailabilityZones:cdk().listMapper(cdk().stringToCloudFormation)(properties.replicaAvailabilityZones),ReplicaCount:cdk().numberToCloudFormation(properties.replicaCount),Slots:cdk().stringToCloudFormation(properties.slots)}):properties}function CfnReplicationGroupNodeGroupConfigurationPropertyFromCloudFormation(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("nodeGroupId","NodeGroupId",properties.NodeGroupId!=null?cfn_parse().FromCloudFormation.getString(properties.NodeGroupId):void 0),ret.addPropertyResult("primaryAvailabilityZone","PrimaryAvailabilityZone",properties.PrimaryAvailabilityZone!=null?cfn_parse().FromCloudFormation.getString(properties.PrimaryAvailabilityZone):void 0),ret.addPropertyResult("replicaAvailabilityZones","ReplicaAvailabilityZones",properties.ReplicaAvailabilityZones!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.ReplicaAvailabilityZones):void 0),ret.addPropertyResult("replicaCount","ReplicaCount",properties.ReplicaCount!=null?cfn_parse().FromCloudFormation.getNumber(properties.ReplicaCount):void 0),ret.addPropertyResult("slots","Slots",properties.Slots!=null?cfn_parse().FromCloudFormation.getString(properties.Slots):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnReplicationGroupEndpointPropertyValidator(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("address",cdk().validateString)(properties.address)),errors.collect(cdk().propertyValidator("port",cdk().validateString)(properties.port)),errors.wrap('supplied properties not correct for "EndpointProperty"')}function convertCfnReplicationGroupEndpointPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnReplicationGroupEndpointPropertyValidator(properties).assertSuccess(),{Address:cdk().stringToCloudFormation(properties.address),Port:cdk().stringToCloudFormation(properties.port)}):properties}function CfnReplicationGroupEndpointPropertyFromCloudFormation(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("address","Address",properties.Address!=null?cfn_parse().FromCloudFormation.getString(properties.Address):void 0),ret.addPropertyResult("port","Port",properties.Port!=null?cfn_parse().FromCloudFormation.getString(properties.Port):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnReplicationGroupReadEndPointPropertyValidator(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("addresses",cdk().validateString)(properties.addresses)),errors.collect(cdk().propertyValidator("addressesList",cdk().listValidator(cdk().validateString))(properties.addressesList)),errors.collect(cdk().propertyValidator("ports",cdk().validateString)(properties.ports)),errors.collect(cdk().propertyValidator("portsList",cdk().listValidator(cdk().validateString))(properties.portsList)),errors.wrap('supplied properties not correct for "ReadEndPointProperty"')}function convertCfnReplicationGroupReadEndPointPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnReplicationGroupReadEndPointPropertyValidator(properties).assertSuccess(),{Addresses:cdk().stringToCloudFormation(properties.addresses),AddressesList:cdk().listMapper(cdk().stringToCloudFormation)(properties.addressesList),Ports:cdk().stringToCloudFormation(properties.ports),PortsList:cdk().listMapper(cdk().stringToCloudFormation)(properties.portsList)}):properties}function CfnReplicationGroupReadEndPointPropertyFromCloudFormation(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("addresses","Addresses",properties.Addresses!=null?cfn_parse().FromCloudFormation.getString(properties.Addresses):void 0),ret.addPropertyResult("addressesList","AddressesList",properties.AddressesList!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.AddressesList):void 0),ret.addPropertyResult("ports","Ports",properties.Ports!=null?cfn_parse().FromCloudFormation.getString(properties.Ports):void 0),ret.addPropertyResult("portsList","PortsList",properties.PortsList!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.PortsList):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnReplicationGroupPropsValidator(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("atRestEncryptionEnabled",cdk().validateBoolean)(properties.atRestEncryptionEnabled)),errors.collect(cdk().propertyValidator("authToken",cdk().validateString)(properties.authToken)),errors.collect(cdk().propertyValidator("autoMinorVersionUpgrade",cdk().validateBoolean)(properties.autoMinorVersionUpgrade)),errors.collect(cdk().propertyValidator("automaticFailoverEnabled",cdk().validateBoolean)(properties.automaticFailoverEnabled)),errors.collect(cdk().propertyValidator("cacheNodeType",cdk().validateString)(properties.cacheNodeType)),errors.collect(cdk().propertyValidator("cacheParameterGroupName",cdk().validateString)(properties.cacheParameterGroupName)),errors.collect(cdk().propertyValidator("cacheSecurityGroupNames",cdk().listValidator(cdk().validateString))(properties.cacheSecurityGroupNames)),errors.collect(cdk().propertyValidator("cacheSubnetGroupName",cdk().validateString)(properties.cacheSubnetGroupName)),errors.collect(cdk().propertyValidator("clusterMode",cdk().validateString)(properties.clusterMode)),errors.collect(cdk().propertyValidator("dataTieringEnabled",cdk().validateBoolean)(properties.dataTieringEnabled)),errors.collect(cdk().propertyValidator("engine",cdk().validateString)(properties.engine)),errors.collect(cdk().propertyValidator("engineVersion",cdk().validateString)(properties.engineVersion)),errors.collect(cdk().propertyValidator("globalReplicationGroupId",cdk().validateString)(properties.globalReplicationGroupId)),errors.collect(cdk().propertyValidator("ipDiscovery",cdk().validateString)(properties.ipDiscovery)),errors.collect(cdk().propertyValidator("kmsKeyId",cdk().validateString)(properties.kmsKeyId)),errors.collect(cdk().propertyValidator("logDeliveryConfigurations",cdk().listValidator(CfnReplicationGroupLogDeliveryConfigurationRequestPropertyValidator))(properties.logDeliveryConfigurations)),errors.collect(cdk().propertyValidator("multiAzEnabled",cdk().validateBoolean)(properties.multiAzEnabled)),errors.collect(cdk().propertyValidator("networkType",cdk().validateString)(properties.networkType)),errors.collect(cdk().propertyValidator("nodeGroupConfiguration",cdk().listValidator(CfnReplicationGroupNodeGroupConfigurationPropertyValidator))(properties.nodeGroupConfiguration)),errors.collect(cdk().propertyValidator("notificationTopicArn",cdk().validateString)(properties.notificationTopicArn)),errors.collect(cdk().propertyValidator("numCacheClusters",cdk().validateNumber)(properties.numCacheClusters)),errors.collect(cdk().propertyValidator("numNodeGroups",cdk().validateNumber)(properties.numNodeGroups)),errors.collect(cdk().propertyValidator("port",cdk().validateNumber)(properties.port)),errors.collect(cdk().propertyValidator("preferredCacheClusterAZs",cdk().listValidator(cdk().validateString))(properties.preferredCacheClusterAZs)),errors.collect(cdk().propertyValidator("preferredMaintenanceWindow",cdk().validateString)(properties.preferredMaintenanceWindow)),errors.collect(cdk().propertyValidator("primaryClusterId",cdk().validateString)(properties.primaryClusterId)),errors.collect(cdk().propertyValidator("replicasPerNodeGroup",cdk().validateNumber)(properties.replicasPerNodeGroup)),errors.collect(cdk().propertyValidator("replicationGroupDescription",cdk().requiredValidator)(properties.replicationGroupDescription)),errors.collect(cdk().propertyValidator("replicationGroupDescription",cdk().validateString)(properties.replicationGroupDescription)),errors.collect(cdk().propertyValidator("replicationGroupId",cdk().validateString)(properties.replicationGroupId)),errors.collect(cdk().propertyValidator("securityGroupIds",cdk().listValidator(cdk().validateString))(properties.securityGroupIds)),errors.collect(cdk().propertyValidator("snapshotArns",cdk().listValidator(cdk().validateString))(properties.snapshotArns)),errors.collect(cdk().propertyValidator("snapshotName",cdk().validateString)(properties.snapshotName)),errors.collect(cdk().propertyValidator("snapshotRetentionLimit",cdk().validateNumber)(properties.snapshotRetentionLimit)),errors.collect(cdk().propertyValidator("snapshotWindow",cdk().validateString)(properties.snapshotWindow)),errors.collect(cdk().propertyValidator("snapshottingClusterId",cdk().validateString)(properties.snapshottingClusterId)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("transitEncryptionEnabled",cdk().validateBoolean)(properties.transitEncryptionEnabled)),errors.collect(cdk().propertyValidator("transitEncryptionMode",cdk().validateString)(properties.transitEncryptionMode)),errors.collect(cdk().propertyValidator("userGroupIds",cdk().listValidator(cdk().validateString))(properties.userGroupIds)),errors.wrap('supplied properties not correct for "CfnReplicationGroupProps"')}function convertCfnReplicationGroupPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnReplicationGroupPropsValidator(properties).assertSuccess(),{AtRestEncryptionEnabled:cdk().booleanToCloudFormation(properties.atRestEncryptionEnabled),AuthToken:cdk().stringToCloudFormation(properties.authToken),AutoMinorVersionUpgrade:cdk().booleanToCloudFormation(properties.autoMinorVersionUpgrade),AutomaticFailoverEnabled:cdk().booleanToCloudFormation(properties.automaticFailoverEnabled),CacheNodeType:cdk().stringToCloudFormation(properties.cacheNodeType),CacheParameterGroupName:cdk().stringToCloudFormation(properties.cacheParameterGroupName),CacheSecurityGroupNames:cdk().listMapper(cdk().stringToCloudFormation)(properties.cacheSecurityGroupNames),CacheSubnetGroupName:cdk().stringToCloudFormation(properties.cacheSubnetGroupName),ClusterMode:cdk().stringToCloudFormation(properties.clusterMode),DataTieringEnabled:cdk().booleanToCloudFormation(properties.dataTieringEnabled),Engine:cdk().stringToCloudFormation(properties.engine),EngineVersion:cdk().stringToCloudFormation(properties.engineVersion),GlobalReplicationGroupId:cdk().stringToCloudFormation(properties.globalReplicationGroupId),IpDiscovery:cdk().stringToCloudFormation(properties.ipDiscovery),KmsKeyId:cdk().stringToCloudFormation(properties.kmsKeyId),LogDeliveryConfigurations:cdk().listMapper(convertCfnReplicationGroupLogDeliveryConfigurationRequestPropertyToCloudFormation)(properties.logDeliveryConfigurations),MultiAZEnabled:cdk().booleanToCloudFormation(properties.multiAzEnabled),NetworkType:cdk().stringToCloudFormation(properties.networkType),NodeGroupConfiguration:cdk().listMapper(convertCfnReplicationGroupNodeGroupConfigurationPropertyToCloudFormation)(properties.nodeGroupConfiguration),NotificationTopicArn:cdk().stringToCloudFormation(properties.notificationTopicArn),NumCacheClusters:cdk().numberToCloudFormation(properties.numCacheClusters),NumNodeGroups:cdk().numberToCloudFormation(properties.numNodeGroups),Port:cdk().numberToCloudFormation(properties.port),PreferredCacheClusterAZs:cdk().listMapper(cdk().stringToCloudFormation)(properties.preferredCacheClusterAZs),PreferredMaintenanceWindow:cdk().stringToCloudFormation(properties.preferredMaintenanceWindow),PrimaryClusterId:cdk().stringToCloudFormation(properties.primaryClusterId),ReplicasPerNodeGroup:cdk().numberToCloudFormation(properties.replicasPerNodeGroup),ReplicationGroupDescription:cdk().stringToCloudFormation(properties.replicationGroupDescription),ReplicationGroupId:cdk().stringToCloudFormation(properties.replicationGroupId),SecurityGroupIds:cdk().listMapper(cdk().stringToCloudFormation)(properties.securityGroupIds),SnapshotArns:cdk().listMapper(cdk().stringToCloudFormation)(properties.snapshotArns),SnapshotName:cdk().stringToCloudFormation(properties.snapshotName),SnapshotRetentionLimit:cdk().numberToCloudFormation(properties.snapshotRetentionLimit),SnapshotWindow:cdk().stringToCloudFormation(properties.snapshotWindow),SnapshottingClusterId:cdk().stringToCloudFormation(properties.snapshottingClusterId),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),TransitEncryptionEnabled:cdk().booleanToCloudFormation(properties.transitEncryptionEnabled),TransitEncryptionMode:cdk().stringToCloudFormation(properties.transitEncryptionMode),UserGroupIds:cdk().listMapper(cdk().stringToCloudFormation)(properties.userGroupIds)}):properties}function CfnReplicationGroupPropsFromCloudFormation(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("atRestEncryptionEnabled","AtRestEncryptionEnabled",properties.AtRestEncryptionEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.AtRestEncryptionEnabled):void 0),ret.addPropertyResult("authToken","AuthToken",properties.AuthToken!=null?cfn_parse().FromCloudFormation.getString(properties.AuthToken):void 0),ret.addPropertyResult("automaticFailoverEnabled","AutomaticFailoverEnabled",properties.AutomaticFailoverEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.AutomaticFailoverEnabled):void 0),ret.addPropertyResult("autoMinorVersionUpgrade","AutoMinorVersionUpgrade",properties.AutoMinorVersionUpgrade!=null?cfn_parse().FromCloudFormation.getBoolean(properties.AutoMinorVersionUpgrade):void 0),ret.addPropertyResult("cacheNodeType","CacheNodeType",properties.CacheNodeType!=null?cfn_parse().FromCloudFormation.getString(properties.CacheNodeType):void 0),ret.addPropertyResult("cacheParameterGroupName","CacheParameterGroupName",properties.CacheParameterGroupName!=null?cfn_parse().FromCloudFormation.getString(properties.CacheParameterGroupName):void 0),ret.addPropertyResult("cacheSecurityGroupNames","CacheSecurityGroupNames",properties.CacheSecurityGroupNames!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.CacheSecurityGroupNames):void 0),ret.addPropertyResult("cacheSubnetGroupName","CacheSubnetGroupName",properties.CacheSubnetGroupName!=null?cfn_parse().FromCloudFormation.getString(properties.CacheSubnetGroupName):void 0),ret.addPropertyResult("clusterMode","ClusterMode",properties.ClusterMode!=null?cfn_parse().FromCloudFormation.getString(properties.ClusterMode):void 0),ret.addPropertyResult("dataTieringEnabled","DataTieringEnabled",properties.DataTieringEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.DataTieringEnabled):void 0),ret.addPropertyResult("engine","Engine",properties.Engine!=null?cfn_parse().FromCloudFormation.getString(properties.Engine):void 0),ret.addPropertyResult("engineVersion","EngineVersion",properties.EngineVersion!=null?cfn_parse().FromCloudFormation.getString(properties.EngineVersion):void 0),ret.addPropertyResult("globalReplicationGroupId","GlobalReplicationGroupId",properties.GlobalReplicationGroupId!=null?cfn_parse().FromCloudFormation.getString(properties.GlobalReplicationGroupId):void 0),ret.addPropertyResult("ipDiscovery","IpDiscovery",properties.IpDiscovery!=null?cfn_parse().FromCloudFormation.getString(properties.IpDiscovery):void 0),ret.addPropertyResult("kmsKeyId","KmsKeyId",properties.KmsKeyId!=null?cfn_parse().FromCloudFormation.getString(properties.KmsKeyId):void 0),ret.addPropertyResult("logDeliveryConfigurations","LogDeliveryConfigurations",properties.LogDeliveryConfigurations!=null?cfn_parse().FromCloudFormation.getArray(CfnReplicationGroupLogDeliveryConfigurationRequestPropertyFromCloudFormation)(properties.LogDeliveryConfigurations):void 0),ret.addPropertyResult("multiAzEnabled","MultiAZEnabled",properties.MultiAZEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.MultiAZEnabled):void 0),ret.addPropertyResult("networkType","NetworkType",properties.NetworkType!=null?cfn_parse().FromCloudFormation.getString(properties.NetworkType):void 0),ret.addPropertyResult("nodeGroupConfiguration","NodeGroupConfiguration",properties.NodeGroupConfiguration!=null?cfn_parse().FromCloudFormation.getArray(CfnReplicationGroupNodeGroupConfigurationPropertyFromCloudFormation)(properties.NodeGroupConfiguration):void 0),ret.addPropertyResult("notificationTopicArn","NotificationTopicArn",properties.NotificationTopicArn!=null?cfn_parse().FromCloudFormation.getString(properties.NotificationTopicArn):void 0),ret.addPropertyResult("numCacheClusters","NumCacheClusters",properties.NumCacheClusters!=null?cfn_parse().FromCloudFormation.getNumber(properties.NumCacheClusters):void 0),ret.addPropertyResult("numNodeGroups","NumNodeGroups",properties.NumNodeGroups!=null?cfn_parse().FromCloudFormation.getNumber(properties.NumNodeGroups):void 0),ret.addPropertyResult("port","Port",properties.Port!=null?cfn_parse().FromCloudFormation.getNumber(properties.Port):void 0),ret.addPropertyResult("preferredCacheClusterAZs","PreferredCacheClusterAZs",properties.PreferredCacheClusterAZs!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.PreferredCacheClusterAZs):void 0),ret.addPropertyResult("preferredMaintenanceWindow","PreferredMaintenanceWindow",properties.PreferredMaintenanceWindow!=null?cfn_parse().FromCloudFormation.getString(properties.PreferredMaintenanceWindow):void 0),ret.addPropertyResult("primaryClusterId","PrimaryClusterId",properties.PrimaryClusterId!=null?cfn_parse().FromCloudFormation.getString(properties.PrimaryClusterId):void 0),ret.addPropertyResult("replicasPerNodeGroup","ReplicasPerNodeGroup",properties.ReplicasPerNodeGroup!=null?cfn_parse().FromCloudFormation.getNumber(properties.ReplicasPerNodeGroup):void 0),ret.addPropertyResult("replicationGroupDescription","ReplicationGroupDescription",properties.ReplicationGroupDescription!=null?cfn_parse().FromCloudFormation.getString(properties.ReplicationGroupDescription):void 0),ret.addPropertyResult("replicationGroupId","ReplicationGroupId",properties.ReplicationGroupId!=null?cfn_parse().FromCloudFormation.getString(properties.ReplicationGroupId):void 0),ret.addPropertyResult("securityGroupIds","SecurityGroupIds",properties.SecurityGroupIds!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.SecurityGroupIds):void 0),ret.addPropertyResult("snapshotArns","SnapshotArns",properties.SnapshotArns!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.SnapshotArns):void 0),ret.addPropertyResult("snapshotName","SnapshotName",properties.SnapshotName!=null?cfn_parse().FromCloudFormation.getString(properties.SnapshotName):void 0),ret.addPropertyResult("snapshotRetentionLimit","SnapshotRetentionLimit",properties.SnapshotRetentionLimit!=null?cfn_parse().FromCloudFormation.getNumber(properties.SnapshotRetentionLimit):void 0),ret.addPropertyResult("snapshottingClusterId","SnapshottingClusterId",properties.SnapshottingClusterId!=null?cfn_parse().FromCloudFormation.getString(properties.SnapshottingClusterId):void 0),ret.addPropertyResult("snapshotWindow","SnapshotWindow",properties.SnapshotWindow!=null?cfn_parse().FromCloudFormation.getString(properties.SnapshotWindow):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("transitEncryptionEnabled","TransitEncryptionEnabled",properties.TransitEncryptionEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.TransitEncryptionEnabled):void 0),ret.addPropertyResult("transitEncryptionMode","TransitEncryptionMode",properties.TransitEncryptionMode!=null?cfn_parse().FromCloudFormation.getString(properties.TransitEncryptionMode):void 0),ret.addPropertyResult("userGroupIds","UserGroupIds",properties.UserGroupIds!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.UserGroupIds):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnSecurityGroup extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticache.CfnSecurityGroup",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::ElastiCache::SecurityGroup";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnSecurityGroupPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnSecurityGroup(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 isCfnSecurityGroup(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnSecurityGroup.CFN_RESOURCE_TYPE_NAME}_description;tags;_tagsRaw;cfnPropertyNames={description:"Description",tags:"Tags"};constructor(scope,id,props){super(scope,id,{type:CfnSecurityGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticache_CfnSecurityGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnSecurityGroup),error}cdk().requireProperty(props,"description",this),this._description=props.description,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::ElastiCache::SecurityGroup",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags}get securityGroupRef(){return{securityGroupId:this.ref}}get description(){return this._description}set description(value){cdk().traceProperty(this.node,"Description"),this._description=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get attrId(){return cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{description:this._description,tags:this.tags.renderTags()}}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",CfnSecurityGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnSecurityGroupPropsToCloudFormation(props)}}exports.CfnSecurityGroup=CfnSecurityGroup;function CfnSecurityGroupPropsValidator(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().requiredValidator)(properties.description)),errors.collect(cdk().propertyValidator("description",cdk().validateString)(properties.description)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnSecurityGroupProps"')}function convertCfnSecurityGroupPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnSecurityGroupPropsValidator(properties).assertSuccess(),{Description:cdk().stringToCloudFormation(properties.description),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnSecurityGroupPropsFromCloudFormation(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("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnSecurityGroupIngress extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticache.CfnSecurityGroupIngress",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::ElastiCache::SecurityGroupIngress";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnSecurityGroupIngressPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnSecurityGroupIngress(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 isCfnSecurityGroupIngress(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnSecurityGroupIngress.CFN_RESOURCE_TYPE_NAME}_cacheSecurityGroupName;_ec2SecurityGroupName;_ec2SecurityGroupOwnerId;cfnPropertyNames={cacheSecurityGroupName:"CacheSecurityGroupName",ec2SecurityGroupName:"EC2SecurityGroupName",ec2SecurityGroupOwnerId:"EC2SecurityGroupOwnerId"};constructor(scope,id,props){super(scope,id,{type:CfnSecurityGroupIngress.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticache_CfnSecurityGroupIngressProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnSecurityGroupIngress),error}cdk().requireProperty(props,"cacheSecurityGroupName",this),cdk().requireProperty(props,"ec2SecurityGroupName",this),this._cacheSecurityGroupName=props.cacheSecurityGroupName,this._ec2SecurityGroupName=props.ec2SecurityGroupName,this._ec2SecurityGroupOwnerId=props.ec2SecurityGroupOwnerId}get securityGroupIngressRef(){return{securityGroupIngressId:this.ref}}get cacheSecurityGroupName(){return this._cacheSecurityGroupName}set cacheSecurityGroupName(value){cdk().traceProperty(this.node,"CacheSecurityGroupName"),this._cacheSecurityGroupName=value}get ec2SecurityGroupName(){return this._ec2SecurityGroupName}set ec2SecurityGroupName(value){cdk().traceProperty(this.node,"EC2SecurityGroupName"),this._ec2SecurityGroupName=value}get ec2SecurityGroupOwnerId(){return this._ec2SecurityGroupOwnerId}set ec2SecurityGroupOwnerId(value){cdk().traceProperty(this.node,"EC2SecurityGroupOwnerId"),this._ec2SecurityGroupOwnerId=value}get attrId(){return cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{cacheSecurityGroupName:this._cacheSecurityGroupName,ec2SecurityGroupName:this._ec2SecurityGroupName,ec2SecurityGroupOwnerId:this._ec2SecurityGroupOwnerId}}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",CfnSecurityGroupIngress.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnSecurityGroupIngressPropsToCloudFormation(props)}}exports.CfnSecurityGroupIngress=CfnSecurityGroupIngress;function CfnSecurityGroupIngressPropsValidator(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("cacheSecurityGroupName",cdk().requiredValidator)(properties.cacheSecurityGroupName)),errors.collect(cdk().propertyValidator("cacheSecurityGroupName",cdk().validateString)(properties.cacheSecurityGroupName)),errors.collect(cdk().propertyValidator("ec2SecurityGroupName",cdk().requiredValidator)(properties.ec2SecurityGroupName)),errors.collect(cdk().propertyValidator("ec2SecurityGroupName",cdk().validateString)(properties.ec2SecurityGroupName)),errors.collect(cdk().propertyValidator("ec2SecurityGroupOwnerId",cdk().validateString)(properties.ec2SecurityGroupOwnerId)),errors.wrap('supplied properties not correct for "CfnSecurityGroupIngressProps"')}function convertCfnSecurityGroupIngressPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnSecurityGroupIngressPropsValidator(properties).assertSuccess(),{CacheSecurityGroupName:cdk().stringToCloudFormation(properties.cacheSecurityGroupName),EC2SecurityGroupName:cdk().stringToCloudFormation(properties.ec2SecurityGroupName),EC2SecurityGroupOwnerId:cdk().stringToCloudFormation(properties.ec2SecurityGroupOwnerId)}):properties}function CfnSecurityGroupIngressPropsFromCloudFormation(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("cacheSecurityGroupName","CacheSecurityGroupName",properties.CacheSecurityGroupName!=null?cfn_parse().FromCloudFormation.getString(properties.CacheSecurityGroupName):void 0),ret.addPropertyResult("ec2SecurityGroupName","EC2SecurityGroupName",properties.EC2SecurityGroupName!=null?cfn_parse().FromCloudFormation.getString(properties.EC2SecurityGroupName):void 0),ret.addPropertyResult("ec2SecurityGroupOwnerId","EC2SecurityGroupOwnerId",properties.EC2SecurityGroupOwnerId!=null?cfn_parse().FromCloudFormation.getString(properties.EC2SecurityGroupOwnerId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnSubnetGroup extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticache.CfnSubnetGroup",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::ElastiCache::SubnetGroup";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnSubnetGroupPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnSubnetGroup(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 isCfnSubnetGroup(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnSubnetGroup.CFN_RESOURCE_TYPE_NAME}static fromCacheSubnetGroupName(scope,id,cacheSubnetGroupName){class Import extends cdk().Resource{subnetGroupRef;constructor(scope2,id2,cacheSubnetGroupName2){super(scope2,id2),this.subnetGroupRef={cacheSubnetGroupName:cacheSubnetGroupName2}}}return new Import(scope,id,cacheSubnetGroupName)}static arnForSubnetGroup(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_elasticache_ISubnetGroupRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForSubnetGroup),error}return new(cfn_parse()).TemplateString("arn:${Partition}:elasticache:${Region}:${Account}:subnetgroup:${CacheSubnetGroupName}").interpolate({Partition:cdk().Stack.of(resource).partition,Region:resource.env.region,Account:resource.env.account,CacheSubnetGroupName:resource.subnetGroupRef.cacheSubnetGroupName})}_cacheSubnetGroupName;_description;_subnetIds;tags;_tagsRaw;cfnPropertyNames={cacheSubnetGroupName:"CacheSubnetGroupName",description:"Description",subnetIds:"SubnetIds",tags:"Tags"};constructor(scope,id,props){super(scope,id,{type:CfnSubnetGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticache_CfnSubnetGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnSubnetGroup),error}cdk().requireProperty(props,"description",this),cdk().requireProperty(props,"subnetIds",this),this._cacheSubnetGroupName=props.cacheSubnetGroupName,this._description=props.description,this._subnetIds=cdk().mapArrayInPlace(props.subnetIds,item=>cdk().getRefProperty(item?.subnetRef,"subnetId")??cdk().ensureStringOrUndefined(item,"subnetIds","ec2.ISubnetRef | string")),this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::ElastiCache::SubnetGroup",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags}get subnetGroupRef(){return{cacheSubnetGroupName:this.ref}}get cacheSubnetGroupName(){return this._cacheSubnetGroupName}set cacheSubnetGroupName(value){cdk().traceProperty(this.node,"CacheSubnetGroupName"),this._cacheSubnetGroupName=value}get description(){return this._description}set description(value){cdk().traceProperty(this.node,"Description"),this._description=value}get subnetIds(){return this._subnetIds}set subnetIds(value){cdk().traceProperty(this.node,"SubnetIds"),this._subnetIds=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get cfnProperties(){return{cacheSubnetGroupName:this._cacheSubnetGroupName,description:this._description,subnetIds:this._subnetIds,tags:this.tags.renderTags()}}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",CfnSubnetGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnSubnetGroupPropsToCloudFormation(props)}}exports.CfnSubnetGroup=CfnSubnetGroup;function CfnSubnetGroupPropsValidator(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("cacheSubnetGroupName",cdk().validateString)(properties.cacheSubnetGroupName)),errors.collect(cdk().propertyValidator("description",cdk().requiredValidator)(properties.description)),errors.collect(cdk().propertyValidator("description",cdk().validateString)(properties.description)),errors.collect(cdk().propertyValidator("subnetIds",cdk().requiredValidator)(properties.subnetIds)),errors.collect(cdk().propertyValidator("subnetIds",cdk().listValidator(cdk().validateString))(properties.subnetIds)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnSubnetGroupProps"')}function convertCfnSubnetGroupPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnSubnetGroupPropsValidator(properties).assertSuccess(),{CacheSubnetGroupName:cdk().stringToCloudFormation(properties.cacheSubnetGroupName),Description:cdk().stringToCloudFormation(properties.description),SubnetIds:cdk().listMapper(cdk().stringToCloudFormation)(properties.subnetIds),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnSubnetGroupPropsFromCloudFormation(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("cacheSubnetGroupName","CacheSubnetGroupName",properties.CacheSubnetGroupName!=null?cfn_parse().FromCloudFormation.getString(properties.CacheSubnetGroupName):void 0),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse().FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("subnetIds","SubnetIds",properties.SubnetIds!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.SubnetIds):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnUser extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticache.CfnUser",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::ElastiCache::User";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnUserPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnUser(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 isCfnUser(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnUser.CFN_RESOURCE_TYPE_NAME}static arnForUser(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_elasticache_IUserRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForUser),error}return resource.userRef.userArn}_accessString;_authenticationMode;_engine;_noPasswordRequired;_passwords;tags;_tagsRaw;_userId;_userName;cfnPropertyNames={accessString:"AccessString",authenticationMode:"AuthenticationMode",engine:"Engine",noPasswordRequired:"NoPasswordRequired",passwords:"Passwords",tags:"Tags",userId:"UserId",userName:"UserName"};constructor(scope,id,props){super(scope,id,{type:CfnUser.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticache_CfnUserProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnUser),error}cdk().requireProperty(props,"engine",this),cdk().requireProperty(props,"userId",this),cdk().requireProperty(props,"userName",this),this._accessString=props.accessString,this._authenticationMode=props.authenticationMode,this._engine=props.engine,this._noPasswordRequired=props.noPasswordRequired,this._passwords=props.passwords,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::ElastiCache::User",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags,this._userId=props.userId,this._userName=props.userName}get userRef(){return{userName:this.ref,userArn:this.attrArn}}get accessString(){return this._accessString}set accessString(value){cdk().traceProperty(this.node,"AccessString"),this._accessString=value}get authenticationMode(){return this._authenticationMode}set authenticationMode(value){cdk().traceProperty(this.node,"AuthenticationMode"),this._authenticationMode=value}get engine(){return this._engine}set engine(value){cdk().traceProperty(this.node,"Engine"),this._engine=value}get noPasswordRequired(){return this._noPasswordRequired}set noPasswordRequired(value){cdk().traceProperty(this.node,"NoPasswordRequired"),this._noPasswordRequired=value}get passwords(){return this._passwords}set passwords(value){cdk().traceProperty(this.node,"Passwords"),this._passwords=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get userId(){return this._userId}set userId(value){cdk().traceProperty(this.node,"UserId"),this._userId=value}get userName(){return this._userName}set userName(value){cdk().traceProperty(this.node,"UserName"),this._userName=value}get attrArn(){return cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING))}get attrStatus(){return cdk().Token.asString(this.getAtt("Status",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{accessString:this._accessString,authenticationMode:this._authenticationMode,engine:this._engine,noPasswordRequired:this._noPasswordRequired,passwords:this._passwords,tags:this.tags.renderTags(),userId:this._userId,userName:this._userName}}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",CfnUser.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnUserPropsToCloudFormation(props)}}exports.CfnUser=CfnUser;function CfnUserAuthenticationModePropertyValidator(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("passwords",cdk().listValidator(cdk().validateString))(properties.passwords)),errors.collect(cdk().propertyValidator("type",cdk().requiredValidator)(properties.type)),errors.collect(cdk().propertyValidator("type",cdk().validateString)(properties.type)),errors.wrap('supplied properties not correct for "AuthenticationModeProperty"')}function convertCfnUserAuthenticationModePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnUserAuthenticationModePropertyValidator(properties).assertSuccess(),{Passwords:cdk().listMapper(cdk().stringToCloudFormation)(properties.passwords),Type:cdk().stringToCloudFormation(properties.type)}):properties}function CfnUserAuthenticationModePropertyFromCloudFormation(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("passwords","Passwords",properties.Passwords!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.Passwords):void 0),ret.addPropertyResult("type","Type",properties.Type!=null?cfn_parse().FromCloudFormation.getString(properties.Type):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnUserPropsValidator(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("accessString",cdk().validateString)(properties.accessString)),errors.collect(cdk().propertyValidator("authenticationMode",cdk().validateObject)(properties.authenticationMode)),errors.collect(cdk().propertyValidator("engine",cdk().requiredValidator)(properties.engine)),errors.collect(cdk().propertyValidator("engine",cdk().validateString)(properties.engine)),errors.collect(cdk().propertyValidator("noPasswordRequired",cdk().validateBoolean)(properties.noPasswordRequired)),errors.collect(cdk().propertyValidator("passwords",cdk().listValidator(cdk().validateString))(properties.passwords)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("userId",cdk().requiredValidator)(properties.userId)),errors.collect(cdk().propertyValidator("userId",cdk().validateString)(properties.userId)),errors.collect(cdk().propertyValidator("userName",cdk().requiredValidator)(properties.userName)),errors.collect(cdk().propertyValidator("userName",cdk().validateString)(properties.userName)),errors.wrap('supplied properties not correct for "CfnUserProps"')}function convertCfnUserPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnUserPropsValidator(properties).assertSuccess(),{AccessString:cdk().stringToCloudFormation(properties.accessString),AuthenticationMode:cdk().objectToCloudFormation(properties.authenticationMode),Engine:cdk().stringToCloudFormation(properties.engine),NoPasswordRequired:cdk().booleanToCloudFormation(properties.noPasswordRequired),Passwords:cdk().listMapper(cdk().stringToCloudFormation)(properties.passwords),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),UserId:cdk().stringToCloudFormation(properties.userId),UserName:cdk().stringToCloudFormation(properties.userName)}):properties}function CfnUserPropsFromCloudFormation(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("accessString","AccessString",properties.AccessString!=null?cfn_parse().FromCloudFormation.getString(properties.AccessString):void 0),ret.addPropertyResult("authenticationMode","AuthenticationMode",properties.AuthenticationMode!=null?cfn_parse().FromCloudFormation.getAny(properties.AuthenticationMode):void 0),ret.addPropertyResult("engine","Engine",properties.Engine!=null?cfn_parse().FromCloudFormation.getString(properties.Engine):void 0),ret.addPropertyResult("noPasswordRequired","NoPasswordRequired",properties.NoPasswordRequired!=null?cfn_parse().FromCloudFormation.getBoolean(properties.NoPasswordRequired):void 0),ret.addPropertyResult("passwords","Passwords",properties.Passwords!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.Passwords):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("userId","UserId",properties.UserId!=null?cfn_parse().FromCloudFormation.getString(properties.UserId):void 0),ret.addPropertyResult("userName","UserName",properties.UserName!=null?cfn_parse().FromCloudFormation.getString(properties.UserName):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnUserGroup extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticache.CfnUserGroup",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::ElastiCache::UserGroup";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnUserGroupPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnUserGroup(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 isCfnUserGroup(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnUserGroup.CFN_RESOURCE_TYPE_NAME}static fromUserGroupArn(scope,id,arn){class Import extends cdk().Resource{userGroupRef;constructor(scope2,id2,arn2){super(scope2,id2,{environmentFromArn:arn2});const variables=new(cfn_parse()).TemplateString("arn:${Partition}:elasticache:${Region}:${Account}:usergroup:${UserGroupId}").parse(arn2);this.userGroupRef={userGroupId:variables.UserGroupId,userGroupArn:arn2}}}return new Import(scope,id,arn)}static fromUserGroupId(scope,id,userGroupId){class Import extends cdk().Resource{userGroupRef;constructor(scope2,id2,userGroupId2){const arn=new(cfn_parse()).TemplateString("arn:${Partition}:elasticache:${Region}:${Account}:usergroup:${UserGroupId}").interpolate({Partition:cdk().Stack.of(scope2).partition,Region:cdk().Stack.of(scope2).region,Account:cdk().Stack.of(scope2).account,UserGroupId:userGroupId2});super(scope2,id2,{environmentFromArn:arn}),this.userGroupRef={userGroupId:userGroupId2,userGroupArn:arn}}}return new Import(scope,id,userGroupId)}static arnForUserGroup(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_elasticache_IUserGroupRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForUserGroup),error}return resource.userGroupRef.userGroupArn}_engine;tags;_tagsRaw;_userGroupId;_userIds;cfnPropertyNames={engine:"Engine",tags:"Tags",userGroupId:"UserGroupId",userIds:"UserIds"};constructor(scope,id,props){super(scope,id,{type:CfnUserGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticache_CfnUserGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnUserGroup),error}cdk().requireProperty(props,"engine",this),cdk().requireProperty(props,"userGroupId",this),cdk().requireProperty(props,"userIds",this),this._engine=props.engine,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::ElastiCache::UserGroup",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags,this._userGroupId=props.userGroupId,this._userIds=props.userIds}get userGroupRef(){return{userGroupId:this.ref,userGroupArn:this.attrArn}}get engine(){return this._engine}set engine(value){cdk().traceProperty(this.node,"Engine"),this._engine=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get userGroupId(){return this._userGroupId}set userGroupId(value){cdk().traceProperty(this.node,"UserGroupId"),this._userGroupId=value}get userIds(){return this._userIds}set userIds(value){cdk().traceProperty(this.node,"UserIds"),this._userIds=value}get attrArn(){return cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING))}get attrStatus(){return cdk().Token.asString(this.getAtt("Status",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{engine:this._engine,tags:this.tags.renderTags(),userGroupId:this._userGroupId,userIds:this._userIds}}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",CfnUserGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnUserGroupPropsToCloudFormation(props)}}exports.CfnUserGroup=CfnUserGroup;function CfnUserGroupPropsValidator(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("engine",cdk().requiredValidator)(properties.engine)),errors.collect(cdk().propertyValidator("engine",cdk().validateString)(properties.engine)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("userGroupId",cdk().requiredValidator)(properties.userGroupId)),errors.collect(cdk().propertyValidator("userGroupId",cdk().validateString)(properties.userGroupId)),errors.collect(cdk().propertyValidator("userIds",cdk().requiredValidator)(properties.userIds)),errors.collect(cdk().propertyValidator("userIds",cdk().listValidator(cdk().validateString))(properties.userIds)),errors.wrap('supplied properties not correct for "CfnUserGroupProps"')}function convertCfnUserGroupPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnUserGroupPropsValidator(properties).assertSuccess(),{Engine:cdk().stringToCloudFormation(properties.engine),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),UserGroupId:cdk().stringToCloudFormation(properties.userGroupId),UserIds:cdk().listMapper(cdk().stringToCloudFormation)(properties.userIds)}):properties}function CfnUserGroupPropsFromCloudFormation(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("engine","Engine",properties.Engine!=null?cfn_parse().FromCloudFormation.getString(properties.Engine):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("userGroupId","UserGroupId",properties.UserGroupId!=null?cfn_parse().FromCloudFormation.getString(properties.UserGroupId):void 0),ret.addPropertyResult("userIds","UserIds",properties.UserIds!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.UserIds):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnServerlessCache extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticache.CfnServerlessCache",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::ElastiCache::ServerlessCache";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnServerlessCachePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnServerlessCache(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 isCfnServerlessCache(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnServerlessCache.CFN_RESOURCE_TYPE_NAME}static fromServerlessCacheArn(scope,id,arn){class Import extends cdk().Resource{serverlessCacheRef;constructor(scope2,id2,arn2){super(scope2,id2,{environmentFromArn:arn2});const variables=new(cfn_parse()).TemplateString("arn:${Partition}:elasticache:${Region}:${Account}:serverlesscache:${ServerlessCacheName}").parse(arn2);this.serverlessCacheRef={serverlessCacheName:variables.ServerlessCacheName,serverlessCacheArn:arn2}}}return new Import(scope,id,arn)}static fromServerlessCacheName(scope,id,serverlessCacheName){class Import extends cdk().Resource{serverlessCacheRef;constructor(scope2,id2,serverlessCacheName2){const arn=new(cfn_parse()).TemplateString("arn:${Partition}:elasticache:${Region}:${Account}:serverlesscache:${ServerlessCacheName}").interpolate({Partition:cdk().Stack.of(scope2).partition,Region:cdk().Stack.of(scope2).region,Account:cdk().Stack.of(scope2).account,ServerlessCacheName:serverlessCacheName2});super(scope2,id2,{environmentFromArn:arn}),this.serverlessCacheRef={serverlessCacheName:serverlessCacheName2,serverlessCacheArn:arn}}}return new Import(scope,id,serverlessCacheName)}static arnForServerlessCache(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_elasticache_IServerlessCacheRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForServerlessCache),error}return resource.serverlessCacheRef.serverlessCacheArn}_cacheUsageLimits;cdkTagManager;_dailySnapshotTime;_description;_endpoint;_engine;_finalSnapshotName;_kmsKeyId;_majorEngineVersion;_readerEndpoint;_securityGroupIds;_serverlessCacheName;_snapshotArnsToRestore;_snapshotRetentionLimit;_subnetIds;_tags;_userGroupId;cfnPropertyNames={cacheUsageLimits:"CacheUsageLimits",tags:"Tags",dailySnapshotTime:"DailySnapshotTime",description:"Description",endpoint:"Endpoint",engine:"Engine",finalSnapshotName:"FinalSnapshotName",kmsKeyId:"KmsKeyId",majorEngineVersion:"MajorEngineVersion",readerEndpoint:"ReaderEndpoint",securityGroupIds:"SecurityGroupIds",serverlessCacheName:"ServerlessCacheName",snapshotArnsToRestore:"SnapshotArnsToRestore",snapshotRetentionLimit:"SnapshotRetentionLimit",subnetIds:"SubnetIds",userGroupId:"UserGroupId"};constructor(scope,id,props){super(scope,id,{type:CfnServerlessCache.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticache_CfnServerlessCacheProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnServerlessCache),error}cdk().requireProperty(props,"engine",this),cdk().requireProperty(props,"serverlessCacheName",this),this._cacheUsageLimits=props.cacheUsageLimits,this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::ElastiCache::ServerlessCache",void 0,{tagPropertyName:"tags"}),this._dailySnapshotTime=props.dailySnapshotTime,this._description=props.description,this._endpoint=props.endpoint,this._engine=props.engine,this._finalSnapshotName=props.finalSnapshotName,this._kmsKeyId=cdk().getRefProperty(props.kmsKeyId?.keyRef,"keyId")??cdk().ensureStringOrUndefined(props.kmsKeyId,"kmsKeyId","kms.IKeyRef | string"),this._majorEngineVersion=props.majorEngineVersion,this._readerEndpoint=props.readerEndpoint,this._securityGroupIds=cdk().mapArrayInPlace(props.securityGroupIds,item=>cdk().getRefProperty(item?.securityGroupRef,"securityGroupId")??cdk().ensureStringOrUndefined(item,"securityGroupIds","ec2.ISecurityGroupRef | string")),this._serverlessCacheName=props.serverlessCacheName,this._snapshotArnsToRestore=props.snapshotArnsToRestore,this._snapshotRetentionLimit=props.snapshotRetentionLimit,this._subnetIds=cdk().mapArrayInPlace(props.subnetIds,item=>cdk().getRefProperty(item?.subnetRef,"subnetId")??cdk().ensureStringOrUndefined(item,"subnetIds","ec2.ISubnetRef | string")),this._tags=props.tags,this._userGroupId=cdk().getRefProperty(props.userGroupId?.userGroupRef,"userGroupId")??cdk().ensureStringOrUndefined(props.userGroupId,"userGroupId","elasticache.IUserGroupRef | string")}get serverlessCacheRef(){return{serverlessCacheName:this.ref,serverlessCacheArn:this.attrArn}}get cacheUsageLimits(){return this._cacheUsageLimits}set cacheUsageLimits(value){cdk().traceProperty(this.node,"CacheUsageLimits"),this._cacheUsageLimits=value}get dailySnapshotTime(){return this._dailySnapshotTime}set dailySnapshotTime(value){cdk().traceProperty(this.node,"DailySnapshotTime"),this._dailySnapshotTime=value}get description(){return this._description}set description(value){cdk().traceProperty(this.node,"Description"),this._description=value}get endpoint(){return this._endpoint}set endpoint(value){cdk().traceProperty(this.node,"Endpoint"),this._endpoint=value}get engine(){return this._engine}set engine(value){cdk().traceProperty(this.node,"Engine"),this._engine=value}get finalSnapshotName(){return this._finalSnapshotName}set finalSnapshotName(value){cdk().traceProperty(this.node,"FinalSnapshotName"),this._finalSnapshotName=value}get kmsKeyId(){return this._kmsKeyId}set kmsKeyId(value){cdk().traceProperty(this.node,"KmsKeyId"),this._kmsKeyId=value}get majorEngineVersion(){return this._majorEngineVersion}set majorEngineVersion(value){cdk().traceProperty(this.node,"MajorEngineVersion"),this._majorEngineVersion=value}get readerEndpoint(){return this._readerEndpoint}set readerEndpoint(value){cdk().traceProperty(this.node,"ReaderEndpoint"),this._readerEndpoint=value}get securityGroupIds(){return this._securityGroupIds}set securityGroupIds(value){cdk().traceProperty(this.node,"SecurityGroupIds"),this._securityGroupIds=value}get serverlessCacheName(){return this._serverlessCacheName}set serverlessCacheName(value){cdk().traceProperty(this.node,"ServerlessCacheName"),this._serverlessCacheName=value}get snapshotArnsToRestore(){return this._snapshotArnsToRestore}set snapshotArnsToRestore(value){cdk().traceProperty(this.node,"SnapshotArnsToRestore"),this._snapshotArnsToRestore=value}get snapshotRetentionLimit(){return this._snapshotRetentionLimit}set snapshotRetentionLimit(value){cdk().traceProperty(this.node,"SnapshotRetentionLimit"),this._snapshotRetentionLimit=value}get subnetIds(){return this._subnetIds}set subnetIds(value){cdk().traceProperty(this.node,"SubnetIds"),this._subnetIds=value}get tags(){return this._tags}set tags(value){cdk().traceProperty(this.node,"Tags"),this._tags=value}get userGroupId(){return this._userGroupId}set userGroupId(value){cdk().traceProperty(this.node,"UserGroupId"),this._userGroupId=value}get attrArn(){return cdk().Token.asString(this.getAtt("ARN",cdk().ResolutionTypeHint.STRING))}get attrCreateTime(){return cdk().Token.asString(this.getAtt("CreateTime",cdk().ResolutionTypeHint.STRING))}get attrEndpointAddress(){return cdk().Token.asString(this.getAtt("Endpoint.Address",cdk().ResolutionTypeHint.STRING))}get attrEndpointPort(){return cdk().Token.asString(this.getAtt("Endpoint.Port",cdk().ResolutionTypeHint.STRING))}get attrFullEngineVersion(){return cdk().Token.asString(this.getAtt("FullEngineVersion",cdk().ResolutionTypeHint.STRING))}get attrReaderEndpointAddress(){return cdk().Token.asString(this.getAtt("ReaderEndpoint.Address",cdk().ResolutionTypeHint.STRING))}get attrReaderEndpointPort(){return cdk().Token.asString(this.getAtt("ReaderEndpoint.Port",cdk().ResolutionTypeHint.STRING))}get attrStatus(){return cdk().Token.asString(this.getAtt("Status",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{cacheUsageLimits:this._cacheUsageLimits,tags:this.cdkTagManager.renderTags(this._tags),dailySnapshotTime:this._dailySnapshotTime,description:this._description,endpoint:this._endpoint,engine:this._engine,finalSnapshotName:this._finalSnapshotName,kmsKeyId:this._kmsKeyId,majorEngineVersion:this._majorEngineVersion,readerEndpoint:this._readerEndpoint,securityGroupIds:this._securityGroupIds,serverlessCacheName:this._serverlessCacheName,snapshotArnsToRestore:this._snapshotArnsToRestore,snapshotRetentionLimit:this._snapshotRetentionLimit,subnetIds:this._subnetIds,userGroupId:this._userGroupId}}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",CfnServerlessCache.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnServerlessCachePropsToCloudFormation(props)}}exports.CfnServerlessCache=CfnServerlessCache;function CfnServerlessCacheDataStoragePropertyValidator(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("maximum",cdk().validateNumber)(properties.maximum)),errors.collect(cdk().propertyValidator("minimum",cdk().validateNumber)(properties.minimum)),errors.collect(cdk().propertyValidator("unit",cdk().requiredValidator)(properties.unit)),errors.collect(cdk().propertyValidator("unit",cdk().validateString)(properties.unit)),errors.wrap('supplied properties not correct for "DataStorageProperty"')}function convertCfnServerlessCacheDataStoragePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnServerlessCacheDataStoragePropertyValidator(properties).assertSuccess(),{Maximum:cdk().numberToCloudFormation(properties.maximum),Minimum:cdk().numberToCloudFormation(properties.minimum),Unit:cdk().stringToCloudFormation(properties.unit)}):properties}function CfnServerlessCacheDataStoragePropertyFromCloudFormation(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("maximum","Maximum",properties.Maximum!=null?cfn_parse().FromCloudFormation.getNumber(properties.Maximum):void 0),ret.addPropertyResult("minimum","Minimum",properties.Minimum!=null?cfn_parse().FromCloudFormation.getNumber(properties.Minimum):void 0),ret.addPropertyResult("unit","Unit",properties.Unit!=null?cfn_parse().FromCloudFormation.getString(properties.Unit):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnServerlessCacheECPUPerSecondPropertyValidator(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("maximum",cdk().validateNumber)(properties.maximum)),errors.collect(cdk().propertyValidator("minimum",cdk().validateNumber)(properties.minimum)),errors.wrap('supplied properties not correct for "ECPUPerSecondProperty"')}function convertCfnServerlessCacheECPUPerSecondPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnServerlessCacheECPUPerSecondPropertyValidator(properties).assertSuccess(),{Maximum:cdk().numberToCloudFormation(properties.maximum),Minimum:cdk().numberToCloudFormation(properties.minimum)}):properties}function CfnServerlessCacheECPUPerSecondPropertyFromCloudFormation(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("maximum","Maximum",properties.Maximum!=null?cfn_parse().FromCloudFormation.getNumber(properties.Maximum):void 0),ret.addPropertyResult("minimum","Minimum",properties.Minimum!=null?cfn_parse().FromCloudFormation.getNumber(properties.Minimum):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnServerlessCacheCacheUsageLimitsPropertyValidator(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("dataStorage",CfnServerlessCacheDataStoragePropertyValidator)(properties.dataStorage)),errors.collect(cdk().propertyValidator("ecpuPerSecond",CfnServerlessCacheECPUPerSecondPropertyValidator)(properties.ecpuPerSecond)),errors.wrap('supplied properties not correct for "CacheUsageLimitsProperty"')}function convertCfnServerlessCacheCacheUsageLimitsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnServerlessCacheCacheUsageLimitsPropertyValidator(properties).assertSuccess(),{DataStorage:convertCfnServerlessCacheDataStoragePropertyToCloudFormation(properties.dataStorage),ECPUPerSecond:convertCfnServerlessCacheECPUPerSecondPropertyToCloudFormation(properties.ecpuPerSecond)}):properties}function CfnServerlessCacheCacheUsageLimitsPropertyFromCloudFormation(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("dataStorage","DataStorage",properties.DataStorage!=null?CfnServerlessCacheDataStoragePropertyFromCloudFormation(properties.DataStorage):void 0),ret.addPropertyResult("ecpuPerSecond","ECPUPerSecond",properties.ECPUPerSecond!=null?CfnServerlessCacheECPUPerSecondPropertyFromCloudFormation(properties.ECPUPerSecond):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnServerlessCacheEndpointPropertyValidator(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("address",cdk().validateString)(properties.address)),errors.collect(cdk().propertyValidator("port",cdk().validateString)(properties.port)),errors.wrap('supplied properties not correct for "EndpointProperty"')}function convertCfnServerlessCacheEndpointPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnServerlessCacheEndpointPropertyValidator(properties).assertSuccess(),{Address:cdk().stringToCloudFormation(properties.address),Port:cdk().stringToCloudFormation(properties.port)}):properties}function CfnServerlessCacheEndpointPropertyFromCloudFormation(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("address","Address",properties.Address!=null?cfn_parse().FromCloudFormation.getString(properties.Address):void 0),ret.addPropertyResult("port","Port",properties.Port!=null?cfn_parse().FromCloudFormation.getString(properties.Port):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnServerlessCachePropsValidator(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("cacheUsageLimits",CfnServerlessCacheCacheUsageLimitsPropertyValidator)(properties.cacheUsageLimits)),errors.collect(cdk().propertyValidator("dailySnapshotTime",cdk().validateString)(properties.dailySnapshotTime)),errors.collect(cdk().propertyValidator("description",cdk().validateString)(properties.description)),errors.collect(cdk().propertyValidator("endpoint",CfnServerlessCacheEndpointPropertyValidator)(properties.endpoint)),errors.collect(cdk().propertyValidator("engine",cdk().requiredValidator)(properties.engine)),errors.collect(cdk().propertyValidator("engine",cdk().validateString)(properties.engine)),errors.collect(cdk().propertyValidator("finalSnapshotName",cdk().validateString)(properties.finalSnapshotName)),errors.collect(cdk().propertyValidator("kmsKeyId",cdk().validateString)(properties.kmsKeyId)),errors.collect(cdk().propertyValidator("majorEngineVersion",cdk().validateString)(properties.majorEngineVersion)),errors.collect(cdk().propertyValidator("readerEndpoint",CfnServerlessCacheEndpointPropertyValidator)(properties.readerEndpoint)),errors.collect(cdk().propertyValidator("securityGroupIds",cdk().listValidator(cdk().validateString))(properties.securityGroupIds)),errors.collect(cdk().propertyValidator("serverlessCacheName",cdk().requiredValidator)(properties.serverlessCacheName)),errors.collect(cdk().propertyValidator("serverlessCacheName",cdk().validateString)(properties.serverlessCacheName)),errors.collect(cdk().propertyValidator("snapshotArnsToRestore",cdk().listValidator(cdk().validateString))(properties.snapshotArnsToRestore)),errors.collect(cdk().propertyValidator("snapshotRetentionLimit",cdk().validateNumber)(properties.snapshotRetentionLimit)),errors.collect(cdk().propertyValidator("subnetIds",cdk().listValidator(cdk().validateString))(properties.subnetIds)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("userGroupId",cdk().validateString)(properties.userGroupId)),errors.wrap('supplied properties not correct for "CfnServerlessCacheProps"')}function convertCfnServerlessCachePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnServerlessCachePropsValidator(properties).assertSuccess(),{CacheUsageLimits:convertCfnServerlessCacheCacheUsageLimitsPropertyToCloudFormation(properties.cacheUsageLimits),DailySnapshotTime:cdk().stringToCloudFormation(properties.dailySnapshotTime),Description:cdk().stringToCloudFormation(properties.description),Endpoint:convertCfnServerlessCacheEndpointPropertyToCloudFormation(properties.endpoint),Engine:cdk().stringToCloudFormation(properties.engine),FinalSnapshotName:cdk().stringToCloudFormation(properties.finalSnapshotName),KmsKeyId:cdk().stringToCloudFormation(properties.kmsKeyId),MajorEngineVersion:cdk().stringToCloudFormation(properties.majorEngineVersion),ReaderEndpoint:convertCfnServerlessCacheEndpointPropertyToCloudFormation(properties.readerEndpoint),SecurityGroupIds:cdk().listMapper(cdk().stringToCloudFormation)(properties.securityGroupIds),ServerlessCacheName:cdk().stringToCloudFormation(properties.serverlessCacheName),SnapshotArnsToRestore:cdk().listMapper(cdk().stringToCloudFormation)(properties.snapshotArnsToRestore),SnapshotRetentionLimit:cdk().numberToCloudFormation(properties.snapshotRetentionLimit),SubnetIds:cdk().listMapper(cdk().stringToCloudFormation)(properties.subnetIds),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),UserGroupId:cdk().stringToCloudFormation(properties.userGroupId)}):properties}function CfnServerlessCachePropsFromCloudFormation(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("cacheUsageLimits","CacheUsageLimits",properties.CacheUsageLimits!=null?CfnServerlessCacheCacheUsageLimitsPropertyFromCloudFormation(properties.CacheUsageLimits):void 0),ret.addPropertyResult("dailySnapshotTime","DailySnapshotTime",properties.DailySnapshotTime!=null?cfn_parse().FromCloudFormation.getString(properties.DailySnapshotTime):void 0),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse().FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("endpoint","Endpoint",properties.Endpoint!=null?CfnServerlessCacheEndpointPropertyFromCloudFormation(properties.Endpoint):void 0),ret.addPropertyResult("engine","Engine",properties.Engine!=null?cfn_parse().FromCloudFormation.getString(properties.Engine):void 0),ret.addPropertyResult("finalSnapshotName","FinalSnapshotName",properties.FinalSnapshotName!=null?cfn_parse().FromCloudFormation.getString(properties.FinalSnapshotName):void 0),ret.addPropertyResult("kmsKeyId","KmsKeyId",properties.KmsKeyId!=null?cfn_parse().FromCloudFormation.getString(properties.KmsKeyId):void 0),ret.addPropertyResult("majorEngineVersion","MajorEngineVersion",properties.MajorEngineVersion!=null?cfn_parse().FromCloudFormation.getString(properties.MajorEngineVersion):void 0),ret.addPropertyResult("readerEndpoint","ReaderEndpoint",properties.ReaderEndpoint!=null?CfnServerlessCacheEndpointPropertyFromCloudFormation(properties.ReaderEndpoint):void 0),ret.addPropertyResult("securityGroupIds","SecurityGroupIds",properties.SecurityGroupIds!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.SecurityGroupIds):void 0),ret.addPropertyResult("serverlessCacheName","ServerlessCacheName",properties.ServerlessCacheName!=null?cfn_parse().FromCloudFormation.getString(properties.ServerlessCacheName):void 0),ret.addPropertyResult("snapshotArnsToRestore","SnapshotArnsToRestore",properties.SnapshotArnsToRestore!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.SnapshotArnsToRestore):void 0),ret.addPropertyResult("snapshotRetentionLimit","SnapshotRetentionLimit",properties.SnapshotRetentionLimit!=null?cfn_parse().FromCloudFormation.getNumber(properties.SnapshotRetentionLimit):void 0),ret.addPropertyResult("subnetIds","SubnetIds",properties.SubnetIds!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.SubnetIds):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("userGroupId","UserGroupId",properties.UserGroupId!=null?cfn_parse().FromCloudFormation.getString(properties.UserGroupId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}