aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
1 lines • 303 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnStorageLensGroup=exports.CfnAccessGrantsLocation=exports.CfnAccessGrantsInstance=exports.CfnAccessGrant=exports.CfnStorageLens=exports.CfnMultiRegionAccessPointPolicy=exports.CfnMultiRegionAccessPoint=exports.CfnBucketPolicy=exports.CfnBucket=exports.CfnAccessPoint=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 CfnAccessPoint extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_s3.CfnAccessPoint",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::S3::AccessPoint";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAccessPointPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnAccessPoint(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 isCfnAccessPoint(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnAccessPoint.CFN_RESOURCE_TYPE_NAME}static fromAccessPointArn(scope,id,arn){class Import extends cdk().Resource{accessPointRef;constructor(scope2,id2,arn2){super(scope2,id2,{environmentFromArn:arn2});const variables=new(cfn_parse()).TemplateString("arn:${Partition}:s3:${Region}:${Account}:accesspoint/${AccessPointName}").parse(arn2);this.accessPointRef={accessPointName:variables.AccessPointName,accessPointArn:arn2}}}return new Import(scope,id,arn)}static fromAccessPointName(scope,id,accessPointName){class Import extends cdk().Resource{accessPointRef;constructor(scope2,id2,accessPointName2){const arn=new(cfn_parse()).TemplateString("arn:${Partition}:s3:${Region}:${Account}:accesspoint/${AccessPointName}").interpolate({Partition:cdk().Stack.of(scope2).partition,Region:cdk().Stack.of(scope2).region,Account:cdk().Stack.of(scope2).account,AccessPointName:accessPointName2});super(scope2,id2,{environmentFromArn:arn}),this.accessPointRef={accessPointName:accessPointName2,accessPointArn:arn}}}return new Import(scope,id,accessPointName)}static arnForAccessPoint(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_s3_IAccessPointRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForAccessPoint),error}return resource.accessPointRef.accessPointArn}_bucket;_bucketAccountId;cdkTagManager;_name;_policy;_publicAccessBlockConfiguration;_tags;_vpcConfiguration;constructor(scope,id,props){super(scope,id,{type:CfnAccessPoint.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_s3_CfnAccessPointProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAccessPoint),error}cdk().requireProperty(props,"bucket",this),this._bucket=cdk().getRefProperty(props.bucket?.bucketRef,"bucketName")??cdk().ensureStringOrUndefined(props.bucket,"bucket","s3.IBucketRef | string"),this._bucketAccountId=props.bucketAccountId,this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::S3::AccessPoint",void 0,{tagPropertyName:"tags"}),this._name=props.name,this._policy=props.policy,this._publicAccessBlockConfiguration=props.publicAccessBlockConfiguration,this._tags=props.tags,this._vpcConfiguration=props.vpcConfiguration}get accessPointRef(){return{accessPointName:this.ref,accessPointArn:this.attrArn}}get bucket(){return this._bucket}set bucket(value){cdk().traceProperty(this.node,"Bucket"),this._bucket=value}get bucketAccountId(){return this._bucketAccountId}set bucketAccountId(value){cdk().traceProperty(this.node,"BucketAccountId"),this._bucketAccountId=value}get name(){return this._name}set name(value){cdk().traceProperty(this.node,"Name"),this._name=value}get policy(){return this._policy}set policy(value){cdk().traceProperty(this.node,"Policy"),this._policy=value}get publicAccessBlockConfiguration(){return this._publicAccessBlockConfiguration}set publicAccessBlockConfiguration(value){cdk().traceProperty(this.node,"PublicAccessBlockConfiguration"),this._publicAccessBlockConfiguration=value}get tags(){return this._tags}set tags(value){cdk().traceProperty(this.node,"Tags"),this._tags=value}get vpcConfiguration(){return this._vpcConfiguration}set vpcConfiguration(value){cdk().traceProperty(this.node,"VpcConfiguration"),this._vpcConfiguration=value}get attrAlias(){return cdk().Token.asString(this.getAtt("Alias",cdk().ResolutionTypeHint.STRING))}get attrArn(){return cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING))}get attrName(){return cdk().Token.asString(this.getAtt("Name",cdk().ResolutionTypeHint.STRING))}get attrNetworkOrigin(){return cdk().Token.asString(this.getAtt("NetworkOrigin",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{bucket:this._bucket,bucketAccountId:this._bucketAccountId,tags:this.cdkTagManager.renderTags(this._tags),name:this._name,policy:this._policy,publicAccessBlockConfiguration:this._publicAccessBlockConfiguration,vpcConfiguration:this._vpcConfiguration}}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",CfnAccessPoint.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnAccessPointPropsToCloudFormation(props)}}exports.CfnAccessPoint=CfnAccessPoint;function CfnAccessPointPublicAccessBlockConfigurationPropertyValidator(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("blockPublicAcls",cdk().validateBoolean)(properties.blockPublicAcls)),errors.collect(cdk().propertyValidator("blockPublicPolicy",cdk().validateBoolean)(properties.blockPublicPolicy)),errors.collect(cdk().propertyValidator("ignorePublicAcls",cdk().validateBoolean)(properties.ignorePublicAcls)),errors.collect(cdk().propertyValidator("restrictPublicBuckets",cdk().validateBoolean)(properties.restrictPublicBuckets)),errors.wrap('supplied properties not correct for "PublicAccessBlockConfigurationProperty"')}function convertCfnAccessPointPublicAccessBlockConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAccessPointPublicAccessBlockConfigurationPropertyValidator(properties).assertSuccess(),{BlockPublicAcls:cdk().booleanToCloudFormation(properties.blockPublicAcls),BlockPublicPolicy:cdk().booleanToCloudFormation(properties.blockPublicPolicy),IgnorePublicAcls:cdk().booleanToCloudFormation(properties.ignorePublicAcls),RestrictPublicBuckets:cdk().booleanToCloudFormation(properties.restrictPublicBuckets)}):properties}function CfnAccessPointPublicAccessBlockConfigurationPropertyFromCloudFormation(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("blockPublicAcls","BlockPublicAcls",properties.BlockPublicAcls!=null?cfn_parse().FromCloudFormation.getBoolean(properties.BlockPublicAcls):void 0),ret.addPropertyResult("blockPublicPolicy","BlockPublicPolicy",properties.BlockPublicPolicy!=null?cfn_parse().FromCloudFormation.getBoolean(properties.BlockPublicPolicy):void 0),ret.addPropertyResult("ignorePublicAcls","IgnorePublicAcls",properties.IgnorePublicAcls!=null?cfn_parse().FromCloudFormation.getBoolean(properties.IgnorePublicAcls):void 0),ret.addPropertyResult("restrictPublicBuckets","RestrictPublicBuckets",properties.RestrictPublicBuckets!=null?cfn_parse().FromCloudFormation.getBoolean(properties.RestrictPublicBuckets):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAccessPointVpcConfigurationPropertyValidator(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("vpcId",cdk().validateString)(properties.vpcId)),errors.wrap('supplied properties not correct for "VpcConfigurationProperty"')}function convertCfnAccessPointVpcConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAccessPointVpcConfigurationPropertyValidator(properties).assertSuccess(),{VpcId:cdk().stringToCloudFormation(properties.vpcId)}):properties}function CfnAccessPointVpcConfigurationPropertyFromCloudFormation(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("vpcId","VpcId",properties.VpcId!=null?cfn_parse().FromCloudFormation.getString(properties.VpcId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAccessPointPropsValidator(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("bucket",cdk().requiredValidator)(properties.bucket)),errors.collect(cdk().propertyValidator("bucket",cdk().validateString)(properties.bucket)),errors.collect(cdk().propertyValidator("bucketAccountId",cdk().validateString)(properties.bucketAccountId)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("policy",cdk().validateObject)(properties.policy)),errors.collect(cdk().propertyValidator("publicAccessBlockConfiguration",CfnAccessPointPublicAccessBlockConfigurationPropertyValidator)(properties.publicAccessBlockConfiguration)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("vpcConfiguration",CfnAccessPointVpcConfigurationPropertyValidator)(properties.vpcConfiguration)),errors.wrap('supplied properties not correct for "CfnAccessPointProps"')}function convertCfnAccessPointPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAccessPointPropsValidator(properties).assertSuccess(),{Bucket:cdk().stringToCloudFormation(properties.bucket),BucketAccountId:cdk().stringToCloudFormation(properties.bucketAccountId),Name:cdk().stringToCloudFormation(properties.name),Policy:cdk().objectToCloudFormation(properties.policy),PublicAccessBlockConfiguration:convertCfnAccessPointPublicAccessBlockConfigurationPropertyToCloudFormation(properties.publicAccessBlockConfiguration),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),VpcConfiguration:convertCfnAccessPointVpcConfigurationPropertyToCloudFormation(properties.vpcConfiguration)}):properties}function CfnAccessPointPropsFromCloudFormation(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("bucket","Bucket",properties.Bucket!=null?cfn_parse().FromCloudFormation.getString(properties.Bucket):void 0),ret.addPropertyResult("bucketAccountId","BucketAccountId",properties.BucketAccountId!=null?cfn_parse().FromCloudFormation.getString(properties.BucketAccountId):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("policy","Policy",properties.Policy!=null?cfn_parse().FromCloudFormation.getAny(properties.Policy):void 0),ret.addPropertyResult("publicAccessBlockConfiguration","PublicAccessBlockConfiguration",properties.PublicAccessBlockConfiguration!=null?CfnAccessPointPublicAccessBlockConfigurationPropertyFromCloudFormation(properties.PublicAccessBlockConfiguration):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("vpcConfiguration","VpcConfiguration",properties.VpcConfiguration!=null?CfnAccessPointVpcConfigurationPropertyFromCloudFormation(properties.VpcConfiguration):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnBucket extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_s3.CfnBucket",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::S3::Bucket";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnBucketPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnBucket(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 isCfnBucket(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnBucket.CFN_RESOURCE_TYPE_NAME}static fromBucketArn(scope,id,arn){class Import extends cdk().Resource{bucketRef;constructor(scope2,id2,arn2){super(scope2,id2,{environmentFromArn:arn2});const variables=new(cfn_parse()).TemplateString("arn:${Partition}:s3:::${BucketName}").parse(arn2);this.bucketRef={bucketName:variables.BucketName,bucketArn:arn2}}}return new Import(scope,id,arn)}static fromBucketName(scope,id,bucketName){class Import extends cdk().Resource{bucketRef;constructor(scope2,id2,bucketName2){const arn=new(cfn_parse()).TemplateString("arn:${Partition}:s3:::${BucketName}").interpolate({Partition:cdk().Stack.of(scope2).partition,Region:cdk().Stack.of(scope2).region,Account:cdk().Stack.of(scope2).account,BucketName:bucketName2});super(scope2,id2,{environmentFromArn:arn}),this.bucketRef={bucketName:bucketName2,bucketArn:arn}}}return new Import(scope,id,bucketName)}static arnForBucket(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_s3_IBucketRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForBucket),error}return resource.bucketRef.bucketArn}_abacStatus;_accelerateConfiguration;_accessControl;_analyticsConfigurations;_bucketEncryption;_bucketName;_bucketNamePrefix;_bucketNamespace;_corsConfiguration;_intelligentTieringConfigurations;_inventoryConfigurations;_lifecycleConfiguration;_loggingConfiguration;_metadataConfiguration;_metadataTableConfiguration;_metricsConfigurations;_notificationConfiguration;_objectLockConfiguration;_objectLockEnabled;_ownershipControls;_publicAccessBlockConfiguration;_replicationConfiguration;tags;_tagsRaw;_versioningConfiguration;_websiteConfiguration;constructor(scope,id,props={}){super(scope,id,{type:CfnBucket.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_s3_CfnBucketProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnBucket),error}this._abacStatus=props.abacStatus,this._accelerateConfiguration=props.accelerateConfiguration,this._accessControl=props.accessControl,this._analyticsConfigurations=props.analyticsConfigurations,this._bucketEncryption=props.bucketEncryption,this._bucketName=props.bucketName,this._bucketNamePrefix=props.bucketNamePrefix,this._bucketNamespace=props.bucketNamespace,this._corsConfiguration=props.corsConfiguration,this._intelligentTieringConfigurations=props.intelligentTieringConfigurations,this._inventoryConfigurations=props.inventoryConfigurations,this._lifecycleConfiguration=props.lifecycleConfiguration,this._loggingConfiguration=props.loggingConfiguration,this._metadataConfiguration=props.metadataConfiguration,this._metadataTableConfiguration=props.metadataTableConfiguration,this._metricsConfigurations=props.metricsConfigurations,this._notificationConfiguration=props.notificationConfiguration,this._objectLockConfiguration=props.objectLockConfiguration,this._objectLockEnabled=props.objectLockEnabled,this._ownershipControls=props.ownershipControls,this._publicAccessBlockConfiguration=props.publicAccessBlockConfiguration,this._replicationConfiguration=props.replicationConfiguration,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::S3::Bucket",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags,this._versioningConfiguration=props.versioningConfiguration,this._websiteConfiguration=props.websiteConfiguration,this.node.scope!=null&&cdk().Resource.isResource(this.node.scope)&&this.node.addValidation({validate:()=>this.cfnOptions.deletionPolicy===void 0?["'AWS::S3::Bucket' is a stateful resource type, and you must specify a Removal Policy for it. Call 'resource.applyRemovalPolicy()'."]:[]})}get bucketRef(){return{bucketName:this.ref,bucketArn:this.attrArn}}get abacStatus(){return this._abacStatus}set abacStatus(value){cdk().traceProperty(this.node,"AbacStatus"),this._abacStatus=value}get accelerateConfiguration(){return this._accelerateConfiguration}set accelerateConfiguration(value){cdk().traceProperty(this.node,"AccelerateConfiguration"),this._accelerateConfiguration=value}get accessControl(){return this._accessControl}set accessControl(value){cdk().traceProperty(this.node,"AccessControl"),this._accessControl=value}get analyticsConfigurations(){return this._analyticsConfigurations}set analyticsConfigurations(value){cdk().traceProperty(this.node,"AnalyticsConfigurations"),this._analyticsConfigurations=value}get bucketEncryption(){return this._bucketEncryption}set bucketEncryption(value){cdk().traceProperty(this.node,"BucketEncryption"),this._bucketEncryption=value}get bucketName(){return this._bucketName}set bucketName(value){cdk().traceProperty(this.node,"BucketName"),this._bucketName=value}get bucketNamePrefix(){return this._bucketNamePrefix}set bucketNamePrefix(value){cdk().traceProperty(this.node,"BucketNamePrefix"),this._bucketNamePrefix=value}get bucketNamespace(){return this._bucketNamespace}set bucketNamespace(value){cdk().traceProperty(this.node,"BucketNamespace"),this._bucketNamespace=value}get corsConfiguration(){return this._corsConfiguration}set corsConfiguration(value){cdk().traceProperty(this.node,"CorsConfiguration"),this._corsConfiguration=value}get intelligentTieringConfigurations(){return this._intelligentTieringConfigurations}set intelligentTieringConfigurations(value){cdk().traceProperty(this.node,"IntelligentTieringConfigurations"),this._intelligentTieringConfigurations=value}get inventoryConfigurations(){return this._inventoryConfigurations}set inventoryConfigurations(value){cdk().traceProperty(this.node,"InventoryConfigurations"),this._inventoryConfigurations=value}get lifecycleConfiguration(){return this._lifecycleConfiguration}set lifecycleConfiguration(value){cdk().traceProperty(this.node,"LifecycleConfiguration"),this._lifecycleConfiguration=value}get loggingConfiguration(){return this._loggingConfiguration}set loggingConfiguration(value){cdk().traceProperty(this.node,"LoggingConfiguration"),this._loggingConfiguration=value}get metadataConfiguration(){return this._metadataConfiguration}set metadataConfiguration(value){cdk().traceProperty(this.node,"MetadataConfiguration"),this._metadataConfiguration=value}get metadataTableConfiguration(){return this._metadataTableConfiguration}set metadataTableConfiguration(value){cdk().traceProperty(this.node,"MetadataTableConfiguration"),this._metadataTableConfiguration=value}get metricsConfigurations(){return this._metricsConfigurations}set metricsConfigurations(value){cdk().traceProperty(this.node,"MetricsConfigurations"),this._metricsConfigurations=value}get notificationConfiguration(){return this._notificationConfiguration}set notificationConfiguration(value){cdk().traceProperty(this.node,"NotificationConfiguration"),this._notificationConfiguration=value}get objectLockConfiguration(){return this._objectLockConfiguration}set objectLockConfiguration(value){cdk().traceProperty(this.node,"ObjectLockConfiguration"),this._objectLockConfiguration=value}get objectLockEnabled(){return this._objectLockEnabled}set objectLockEnabled(value){cdk().traceProperty(this.node,"ObjectLockEnabled"),this._objectLockEnabled=value}get ownershipControls(){return this._ownershipControls}set ownershipControls(value){cdk().traceProperty(this.node,"OwnershipControls"),this._ownershipControls=value}get publicAccessBlockConfiguration(){return this._publicAccessBlockConfiguration}set publicAccessBlockConfiguration(value){cdk().traceProperty(this.node,"PublicAccessBlockConfiguration"),this._publicAccessBlockConfiguration=value}get replicationConfiguration(){return this._replicationConfiguration}set replicationConfiguration(value){cdk().traceProperty(this.node,"ReplicationConfiguration"),this._replicationConfiguration=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get versioningConfiguration(){return this._versioningConfiguration}set versioningConfiguration(value){cdk().traceProperty(this.node,"VersioningConfiguration"),this._versioningConfiguration=value}get websiteConfiguration(){return this._websiteConfiguration}set websiteConfiguration(value){cdk().traceProperty(this.node,"WebsiteConfiguration"),this._websiteConfiguration=value}get attrArn(){return cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING))}get attrDomainName(){return cdk().Token.asString(this.getAtt("DomainName",cdk().ResolutionTypeHint.STRING))}get attrDualStackDomainName(){return cdk().Token.asString(this.getAtt("DualStackDomainName",cdk().ResolutionTypeHint.STRING))}get attrMetadataConfigurationDestination(){return this.getAtt("MetadataConfiguration.Destination")}get attrMetadataConfigurationInventoryTableConfigurationTableArn(){return cdk().Token.asString(this.getAtt("MetadataConfiguration.InventoryTableConfiguration.TableArn",cdk().ResolutionTypeHint.STRING))}get attrMetadataConfigurationInventoryTableConfigurationTableName(){return cdk().Token.asString(this.getAtt("MetadataConfiguration.InventoryTableConfiguration.TableName",cdk().ResolutionTypeHint.STRING))}get attrMetadataConfigurationJournalTableConfigurationTableArn(){return cdk().Token.asString(this.getAtt("MetadataConfiguration.JournalTableConfiguration.TableArn",cdk().ResolutionTypeHint.STRING))}get attrMetadataConfigurationJournalTableConfigurationTableName(){return cdk().Token.asString(this.getAtt("MetadataConfiguration.JournalTableConfiguration.TableName",cdk().ResolutionTypeHint.STRING))}get attrMetadataTableConfigurationS3TablesDestinationTableArn(){return cdk().Token.asString(this.getAtt("MetadataTableConfiguration.S3TablesDestination.TableArn",cdk().ResolutionTypeHint.STRING))}get attrMetadataTableConfigurationS3TablesDestinationTableNamespace(){return cdk().Token.asString(this.getAtt("MetadataTableConfiguration.S3TablesDestination.TableNamespace",cdk().ResolutionTypeHint.STRING))}get attrRegionalDomainName(){return cdk().Token.asString(this.getAtt("RegionalDomainName",cdk().ResolutionTypeHint.STRING))}get attrWebsiteUrl(){return cdk().Token.asString(this.getAtt("WebsiteURL",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{abacStatus:this._abacStatus,accelerateConfiguration:this._accelerateConfiguration,accessControl:this._accessControl,analyticsConfigurations:this._analyticsConfigurations,bucketEncryption:this._bucketEncryption,bucketName:this._bucketName,bucketNamePrefix:this._bucketNamePrefix,bucketNamespace:this._bucketNamespace,corsConfiguration:this._corsConfiguration,intelligentTieringConfigurations:this._intelligentTieringConfigurations,inventoryConfigurations:this._inventoryConfigurations,lifecycleConfiguration:this._lifecycleConfiguration,loggingConfiguration:this._loggingConfiguration,metadataConfiguration:this._metadataConfiguration,metadataTableConfiguration:this._metadataTableConfiguration,metricsConfigurations:this._metricsConfigurations,notificationConfiguration:this._notificationConfiguration,objectLockConfiguration:this._objectLockConfiguration,objectLockEnabled:this._objectLockEnabled,ownershipControls:this._ownershipControls,publicAccessBlockConfiguration:this._publicAccessBlockConfiguration,replicationConfiguration:this._replicationConfiguration,tags:this.tags.renderTags(),versioningConfiguration:this._versioningConfiguration,websiteConfiguration:this._websiteConfiguration}}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",CfnBucket.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnBucketPropsToCloudFormation(props)}}exports.CfnBucket=CfnBucket;function CfnBucketAccelerateConfigurationPropertyValidator(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("accelerationStatus",cdk().requiredValidator)(properties.accelerationStatus)),errors.collect(cdk().propertyValidator("accelerationStatus",cdk().validateString)(properties.accelerationStatus)),errors.wrap('supplied properties not correct for "AccelerateConfigurationProperty"')}function convertCfnBucketAccelerateConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnBucketAccelerateConfigurationPropertyValidator(properties).assertSuccess(),{AccelerationStatus:cdk().stringToCloudFormation(properties.accelerationStatus)}):properties}function CfnBucketAccelerateConfigurationPropertyFromCloudFormation(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("accelerationStatus","AccelerationStatus",properties.AccelerationStatus!=null?cfn_parse().FromCloudFormation.getString(properties.AccelerationStatus):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucketDestinationPropertyValidator(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("bucketAccountId",cdk().validateString)(properties.bucketAccountId)),errors.collect(cdk().propertyValidator("bucketArn",cdk().requiredValidator)(properties.bucketArn)),errors.collect(cdk().propertyValidator("bucketArn",cdk().validateString)(properties.bucketArn)),errors.collect(cdk().propertyValidator("format",cdk().requiredValidator)(properties.format)),errors.collect(cdk().propertyValidator("format",cdk().validateString)(properties.format)),errors.collect(cdk().propertyValidator("prefix",cdk().validateString)(properties.prefix)),errors.wrap('supplied properties not correct for "DestinationProperty"')}function convertCfnBucketDestinationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnBucketDestinationPropertyValidator(properties).assertSuccess(),{BucketAccountId:cdk().stringToCloudFormation(properties.bucketAccountId),BucketArn:cdk().stringToCloudFormation(properties.bucketArn),Format:cdk().stringToCloudFormation(properties.format),Prefix:cdk().stringToCloudFormation(properties.prefix)}):properties}function CfnBucketDestinationPropertyFromCloudFormation(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("bucketAccountId","BucketAccountId",properties.BucketAccountId!=null?cfn_parse().FromCloudFormation.getString(properties.BucketAccountId):void 0),ret.addPropertyResult("bucketArn","BucketArn",properties.BucketArn!=null?cfn_parse().FromCloudFormation.getString(properties.BucketArn):void 0),ret.addPropertyResult("format","Format",properties.Format!=null?cfn_parse().FromCloudFormation.getString(properties.Format):void 0),ret.addPropertyResult("prefix","Prefix",properties.Prefix!=null?cfn_parse().FromCloudFormation.getString(properties.Prefix):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucketDataExportPropertyValidator(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("destination",cdk().requiredValidator)(properties.destination)),errors.collect(cdk().propertyValidator("destination",CfnBucketDestinationPropertyValidator)(properties.destination)),errors.collect(cdk().propertyValidator("outputSchemaVersion",cdk().requiredValidator)(properties.outputSchemaVersion)),errors.collect(cdk().propertyValidator("outputSchemaVersion",cdk().validateString)(properties.outputSchemaVersion)),errors.wrap('supplied properties not correct for "DataExportProperty"')}function convertCfnBucketDataExportPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnBucketDataExportPropertyValidator(properties).assertSuccess(),{Destination:convertCfnBucketDestinationPropertyToCloudFormation(properties.destination),OutputSchemaVersion:cdk().stringToCloudFormation(properties.outputSchemaVersion)}):properties}function CfnBucketDataExportPropertyFromCloudFormation(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("destination","Destination",properties.Destination!=null?CfnBucketDestinationPropertyFromCloudFormation(properties.Destination):void 0),ret.addPropertyResult("outputSchemaVersion","OutputSchemaVersion",properties.OutputSchemaVersion!=null?cfn_parse().FromCloudFormation.getString(properties.OutputSchemaVersion):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucketStorageClassAnalysisPropertyValidator(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("dataExport",CfnBucketDataExportPropertyValidator)(properties.dataExport)),errors.wrap('supplied properties not correct for "StorageClassAnalysisProperty"')}function convertCfnBucketStorageClassAnalysisPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnBucketStorageClassAnalysisPropertyValidator(properties).assertSuccess(),{DataExport:convertCfnBucketDataExportPropertyToCloudFormation(properties.dataExport)}):properties}function CfnBucketStorageClassAnalysisPropertyFromCloudFormation(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("dataExport","DataExport",properties.DataExport!=null?CfnBucketDataExportPropertyFromCloudFormation(properties.DataExport):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucketTagFilterPropertyValidator(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("key",cdk().requiredValidator)(properties.key)),errors.collect(cdk().propertyValidator("key",cdk().validateString)(properties.key)),errors.collect(cdk().propertyValidator("value",cdk().requiredValidator)(properties.value)),errors.collect(cdk().propertyValidator("value",cdk().validateString)(properties.value)),errors.wrap('supplied properties not correct for "TagFilterProperty"')}function convertCfnBucketTagFilterPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnBucketTagFilterPropertyValidator(properties).assertSuccess(),{Key:cdk().stringToCloudFormation(properties.key),Value:cdk().stringToCloudFormation(properties.value)}):properties}function CfnBucketTagFilterPropertyFromCloudFormation(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("key","Key",properties.Key!=null?cfn_parse().FromCloudFormation.getString(properties.Key):void 0),ret.addPropertyResult("value","Value",properties.Value!=null?cfn_parse().FromCloudFormation.getString(properties.Value):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucketAnalyticsConfigurationPropertyValidator(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("id",cdk().requiredValidator)(properties.id)),errors.collect(cdk().propertyValidator("id",cdk().validateString)(properties.id)),errors.collect(cdk().propertyValidator("prefix",cdk().validateString)(properties.prefix)),errors.collect(cdk().propertyValidator("storageClassAnalysis",cdk().requiredValidator)(properties.storageClassAnalysis)),errors.collect(cdk().propertyValidator("storageClassAnalysis",CfnBucketStorageClassAnalysisPropertyValidator)(properties.storageClassAnalysis)),errors.collect(cdk().propertyValidator("tagFilters",cdk().listValidator(CfnBucketTagFilterPropertyValidator))(properties.tagFilters)),errors.wrap('supplied properties not correct for "AnalyticsConfigurationProperty"')}function convertCfnBucketAnalyticsConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnBucketAnalyticsConfigurationPropertyValidator(properties).assertSuccess(),{Id:cdk().stringToCloudFormation(properties.id),Prefix:cdk().stringToCloudFormation(properties.prefix),StorageClassAnalysis:convertCfnBucketStorageClassAnalysisPropertyToCloudFormation(properties.storageClassAnalysis),TagFilters:cdk().listMapper(convertCfnBucketTagFilterPropertyToCloudFormation)(properties.tagFilters)}):properties}function CfnBucketAnalyticsConfigurationPropertyFromCloudFormation(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("id","Id",properties.Id!=null?cfn_parse().FromCloudFormation.getString(properties.Id):void 0),ret.addPropertyResult("prefix","Prefix",properties.Prefix!=null?cfn_parse().FromCloudFormation.getString(properties.Prefix):void 0),ret.addPropertyResult("storageClassAnalysis","StorageClassAnalysis",properties.StorageClassAnalysis!=null?CfnBucketStorageClassAnalysisPropertyFromCloudFormation(properties.StorageClassAnalysis):void 0),ret.addPropertyResult("tagFilters","TagFilters",properties.TagFilters!=null?cfn_parse().FromCloudFormation.getArray(CfnBucketTagFilterPropertyFromCloudFormation)(properties.TagFilters):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucketServerSideEncryptionByDefaultPropertyValidator(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("kmsMasterKeyId",cdk().validateString)(properties.kmsMasterKeyId)),errors.collect(cdk().propertyValidator("sseAlgorithm",cdk().requiredValidator)(properties.sseAlgorithm)),errors.collect(cdk().propertyValidator("sseAlgorithm",cdk().validateString)(properties.sseAlgorithm)),errors.wrap('supplied properties not correct for "ServerSideEncryptionByDefaultProperty"')}function convertCfnBucketServerSideEncryptionByDefaultPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnBucketServerSideEncryptionByDefaultPropertyValidator(properties).assertSuccess(),{KMSMasterKeyID:cdk().stringToCloudFormation(properties.kmsMasterKeyId),SSEAlgorithm:cdk().stringToCloudFormation(properties.sseAlgorithm)}):properties}function CfnBucketServerSideEncryptionByDefaultPropertyFromCloudFormation(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("kmsMasterKeyId","KMSMasterKeyID",properties.KMSMasterKeyID!=null?cfn_parse().FromCloudFormation.getString(properties.KMSMasterKeyID):void 0),ret.addPropertyResult("sseAlgorithm","SSEAlgorithm",properties.SSEAlgorithm!=null?cfn_parse().FromCloudFormation.getString(properties.SSEAlgorithm):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucketBlockedEncryptionTypesPropertyValidator(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("encryptionType",cdk().listValidator(cdk().validateString))(properties.encryptionType)),errors.wrap('supplied properties not correct for "BlockedEncryptionTypesProperty"')}function convertCfnBucketBlockedEncryptionTypesPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnBucketBlockedEncryptionTypesPropertyValidator(properties).assertSuccess(),{EncryptionType:cdk().listMapper(cdk().stringToCloudFormation)(properties.encryptionType)}):properties}function CfnBucketBlockedEncryptionTypesPropertyFromCloudFormation(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("encryptionType","EncryptionType",properties.EncryptionType!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.EncryptionType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucketServerSideEncryptionRulePropertyValidator(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("blockedEncryptionTypes",CfnBucketBlockedEncryptionTypesPropertyValidator)(properties.blockedEncryptionTypes)),errors.collect(cdk().propertyValidator("bucketKeyEnabled",cdk().validateBoolean)(properties.bucketKeyEnabled)),errors.collect(cdk().propertyValidator("serverSideEncryptionByDefault",CfnBucketServerSideEncryptionByDefaultPropertyValidator)(properties.serverSideEncryptionByDefault)),errors.wrap('supplied properties not correct for "ServerSideEncryptionRuleProperty"')}function convertCfnBucketServerSideEncryptionRulePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnBucketServerSideEncryptionRulePropertyValidator(properties).assertSuccess(),{BlockedEncryptionTypes:convertCfnBucketBlockedEncryptionTypesPropertyToCloudFormation(properties.blockedEncryptionTypes),BucketKeyEnabled:cdk().booleanToCloudFormation(properties.bucketKeyEnabled),ServerSideEncryptionByDefault:convertCfnBucketServerSideEncryptionByDefaultPropertyToCloudFormation(properties.serverSideEncryptionByDefault)}):properties}function CfnBucketServerSideEncryptionRulePropertyFromCloudFormation(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("blockedEncryptionTypes","BlockedEncryptionTypes",properties.BlockedEncryptionTypes!=null?CfnBucketBlockedEncryptionTypesPropertyFromCloudFormation(properties.BlockedEncryptionTypes):void 0),ret.addPropertyResult("bucketKeyEnabled","BucketKeyEnabled",properties.BucketKeyEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.BucketKeyEnabled):void 0),ret.addPropertyResult("serverSideEncryptionByDefault","ServerSideEncryptionByDefault",properties.ServerSideEncryptionByDefault!=null?CfnBucketServerSideEncryptionByDefaultPropertyFromCloudFormation(properties.ServerSideEncryptionByDefault):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucketBucketEncryptionPropertyValidator(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("serverSideEncryptionConfiguration",cdk().requiredValidator)(properties.serverSideEncryptionConfiguration)),errors.collect(cdk().propertyValidator("serverSideEncryptionConfiguration",cdk().listValidator(CfnBucketServerSideEncryptionRulePropertyValidator))(properties.serverSideEncryptionConfiguration)),errors.wrap('supplied properties not correct for "BucketEncryptionProperty"')}function convertCfnBucketBucketEncryptionPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnBucketBucketEncryptionPropertyValidator(properties).assertSuccess(),{ServerSideEncryptionConfiguration:cdk().listMapper(convertCfnBucketServerSideEncryptionRulePropertyToCloudFormation)(properties.serverSideEncryptionConfiguration)}):properties}function CfnBucketBucketEncryptionPropertyFromCloudFormation(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("serverSideEncryptionConfiguration","ServerSideEncryptionConfiguration",properties.ServerSideEncryptionConfiguration!=null?cfn_parse().FromCloudFormation.getArray(CfnBucketServerSideEncryptionRulePropertyFromCloudFormation)(properties.ServerSideEncryptionConfiguration):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucketCorsRulePropertyValidator(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("allowedHeaders",cdk().listValidator(cdk().validateString))(properties.allowedHeaders)),errors.collect(cdk().propertyValidator("allowedMethods",cdk().requiredValidator)(properties.allowedMethods)),errors.collect(cdk().propertyValidator("allowedMethods",cdk().listValidator(cdk().validateString))(properties.allowedMethods)),errors.collect(cdk().propertyValidator("allowedOrigins",cdk().requiredValidator)(properties.allowedOrigins)),errors.collect(cdk().propertyValidator("allowedOrigins",cdk().listValidator(cdk().validateString))(properties.allowedOrigins)),errors.collect(cdk().propertyValidator("exposedHeaders",cdk().listValidator(cdk().validateString))(properties.exposedHeaders)),errors.collect(cdk().propertyValidator("id",cdk().validateString)(properties.id)),errors.collect(cdk().propertyValidator("maxAge",cdk().validateNumber)(properties.maxAge)),errors.wrap('supplied properties not correct for "CorsRuleProperty"')}function convertCfnBucketCorsRulePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnBucketCorsRulePropertyValidator(properties).assertSuccess(),{AllowedHeaders:cdk().listMapper(cdk().stringToCloudFormation)(properties.allowedHeaders),AllowedMethods:cdk().listMapper(cdk().stringToCloudFormation)(properties.allowedMethods),AllowedOrigins:cdk().listMapper(cdk().stringToCloudFormation)(properties.allowedOrigins),ExposedHeaders:cdk().listMapper(cdk().stringToCloudFormation)(properties.exposedHeaders),Id:cdk().stringToCloudFormation(properties.id),MaxAge:cdk().numberToCloudFormation(properties.maxAge)}):properties}function CfnBucketCorsRulePropertyFromCloudFormation(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("allowedHeaders","AllowedHeaders",properties.AllowedHeaders!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.AllowedHeaders):void 0),ret.addPropertyResult("allowedMethods","AllowedMethods",properties.AllowedMethods!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.AllowedMethods):void 0),ret.addPropertyResult("allowedOrigins","AllowedOrigins",properties.AllowedOrigins!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.AllowedOrigins):void 0),ret.addPropertyResult("exposedHeaders","ExposedHeaders",properties.ExposedHeaders!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.ExposedHeaders):void 0),r