aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 37.9 kB
JavaScript
"use strict";var _a,_b,_c,_d,_e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnTablePolicy=exports.CfnTableBucketPolicy=exports.CfnTableBucket=exports.CfnTable=exports.CfnNamespace=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");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 CfnNamespace extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnNamespacePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnNamespace(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}constructor(scope,id,props){super(scope,id,{type:CfnNamespace.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_s3tables_CfnNamespaceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnNamespace),error}cdk().requireProperty(props,"namespace",this),cdk().requireProperty(props,"tableBucketArn",this),this.namespace=props.namespace,this.tableBucketArn=props.tableBucketArn}get namespaceRef(){return{tableBucketArn:cdk().Fn.select(0,cdk().Fn.split("|",this.ref)),namespace:cdk().Fn.select(1,cdk().Fn.split("|",this.ref))}}get cfnProperties(){return{namespace:this.namespace,tableBucketArn:this.tableBucketArn}}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",CfnNamespace.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnNamespacePropsToCloudFormation(props)}}exports.CfnNamespace=CfnNamespace,_a=JSII_RTTI_SYMBOL_1,CfnNamespace[_a]={fqn:"aws-cdk-lib.aws_s3tables.CfnNamespace",version:"2.216.0"},CfnNamespace.CFN_RESOURCE_TYPE_NAME="AWS::S3Tables::Namespace";function CfnNamespacePropsValidator(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("namespace",cdk().requiredValidator)(properties.namespace)),errors.collect(cdk().propertyValidator("namespace",cdk().validateString)(properties.namespace)),errors.collect(cdk().propertyValidator("tableBucketArn",cdk().requiredValidator)(properties.tableBucketArn)),errors.collect(cdk().propertyValidator("tableBucketArn",cdk().validateString)(properties.tableBucketArn)),errors.wrap('supplied properties not correct for "CfnNamespaceProps"')}function convertCfnNamespacePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnNamespacePropsValidator(properties).assertSuccess(),{Namespace:cdk().stringToCloudFormation(properties.namespace),TableBucketARN:cdk().stringToCloudFormation(properties.tableBucketArn)}):properties}function CfnNamespacePropsFromCloudFormation(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("namespace","Namespace",properties.Namespace!=null?cfn_parse().FromCloudFormation.getString(properties.Namespace):void 0),ret.addPropertyResult("tableBucketArn","TableBucketARN",properties.TableBucketARN!=null?cfn_parse().FromCloudFormation.getString(properties.TableBucketARN):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnTable extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnTablePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnTable(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}constructor(scope,id,props){super(scope,id,{type:CfnTable.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_s3tables_CfnTableProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnTable),error}cdk().requireProperty(props,"namespace",this),cdk().requireProperty(props,"openTableFormat",this),cdk().requireProperty(props,"tableBucketArn",this),cdk().requireProperty(props,"tableName",this),this.attrTableArn=cdk().Token.asString(this.getAtt("TableARN",cdk().ResolutionTypeHint.STRING)),this.attrVersionToken=cdk().Token.asString(this.getAtt("VersionToken",cdk().ResolutionTypeHint.STRING)),this.attrWarehouseLocation=cdk().Token.asString(this.getAtt("WarehouseLocation",cdk().ResolutionTypeHint.STRING)),this.compaction=props.compaction,this.icebergMetadata=props.icebergMetadata,this.namespace=props.namespace,this.openTableFormat=props.openTableFormat,this.snapshotManagement=props.snapshotManagement,this.tableBucketArn=props.tableBucketArn,this.tableName=props.tableName,this.withoutMetadata=props.withoutMetadata}get tableRef(){return{tableArn:this.ref}}get cfnProperties(){return{compaction:this.compaction,icebergMetadata:this.icebergMetadata,namespace:this.namespace,openTableFormat:this.openTableFormat,snapshotManagement:this.snapshotManagement,tableBucketArn:this.tableBucketArn,tableName:this.tableName,withoutMetadata:this.withoutMetadata}}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",CfnTable.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnTablePropsToCloudFormation(props)}}exports.CfnTable=CfnTable,_b=JSII_RTTI_SYMBOL_1,CfnTable[_b]={fqn:"aws-cdk-lib.aws_s3tables.CfnTable",version:"2.216.0"},CfnTable.CFN_RESOURCE_TYPE_NAME="AWS::S3Tables::Table";function CfnTableCompactionPropertyValidator(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("status",cdk().validateString)(properties.status)),errors.collect(cdk().propertyValidator("targetFileSizeMb",cdk().validateNumber)(properties.targetFileSizeMb)),errors.wrap('supplied properties not correct for "CompactionProperty"')}function convertCfnTableCompactionPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTableCompactionPropertyValidator(properties).assertSuccess(),{Status:cdk().stringToCloudFormation(properties.status),TargetFileSizeMB:cdk().numberToCloudFormation(properties.targetFileSizeMb)}):properties}function CfnTableCompactionPropertyFromCloudFormation(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("status","Status",properties.Status!=null?cfn_parse().FromCloudFormation.getString(properties.Status):void 0),ret.addPropertyResult("targetFileSizeMb","TargetFileSizeMB",properties.TargetFileSizeMB!=null?cfn_parse().FromCloudFormation.getNumber(properties.TargetFileSizeMB):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTableSchemaFieldPropertyValidator(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("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("required",cdk().validateBoolean)(properties.required)),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 "SchemaFieldProperty"')}function convertCfnTableSchemaFieldPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTableSchemaFieldPropertyValidator(properties).assertSuccess(),{Name:cdk().stringToCloudFormation(properties.name),Required:cdk().booleanToCloudFormation(properties.required),Type:cdk().stringToCloudFormation(properties.type)}):properties}function CfnTableSchemaFieldPropertyFromCloudFormation(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("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("required","Required",properties.Required!=null?cfn_parse().FromCloudFormation.getBoolean(properties.Required):void 0),ret.addPropertyResult("type","Type",properties.Type!=null?cfn_parse().FromCloudFormation.getString(properties.Type):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTableIcebergSchemaPropertyValidator(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("schemaFieldList",cdk().requiredValidator)(properties.schemaFieldList)),errors.collect(cdk().propertyValidator("schemaFieldList",cdk().listValidator(CfnTableSchemaFieldPropertyValidator))(properties.schemaFieldList)),errors.wrap('supplied properties not correct for "IcebergSchemaProperty"')}function convertCfnTableIcebergSchemaPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTableIcebergSchemaPropertyValidator(properties).assertSuccess(),{SchemaFieldList:cdk().listMapper(convertCfnTableSchemaFieldPropertyToCloudFormation)(properties.schemaFieldList)}):properties}function CfnTableIcebergSchemaPropertyFromCloudFormation(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("schemaFieldList","SchemaFieldList",properties.SchemaFieldList!=null?cfn_parse().FromCloudFormation.getArray(CfnTableSchemaFieldPropertyFromCloudFormation)(properties.SchemaFieldList):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTableIcebergMetadataPropertyValidator(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("icebergSchema",cdk().requiredValidator)(properties.icebergSchema)),errors.collect(cdk().propertyValidator("icebergSchema",CfnTableIcebergSchemaPropertyValidator)(properties.icebergSchema)),errors.wrap('supplied properties not correct for "IcebergMetadataProperty"')}function convertCfnTableIcebergMetadataPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTableIcebergMetadataPropertyValidator(properties).assertSuccess(),{IcebergSchema:convertCfnTableIcebergSchemaPropertyToCloudFormation(properties.icebergSchema)}):properties}function CfnTableIcebergMetadataPropertyFromCloudFormation(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("icebergSchema","IcebergSchema",properties.IcebergSchema!=null?CfnTableIcebergSchemaPropertyFromCloudFormation(properties.IcebergSchema):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTableSnapshotManagementPropertyValidator(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("maxSnapshotAgeHours",cdk().validateNumber)(properties.maxSnapshotAgeHours)),errors.collect(cdk().propertyValidator("minSnapshotsToKeep",cdk().validateNumber)(properties.minSnapshotsToKeep)),errors.collect(cdk().propertyValidator("status",cdk().validateString)(properties.status)),errors.wrap('supplied properties not correct for "SnapshotManagementProperty"')}function convertCfnTableSnapshotManagementPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTableSnapshotManagementPropertyValidator(properties).assertSuccess(),{MaxSnapshotAgeHours:cdk().numberToCloudFormation(properties.maxSnapshotAgeHours),MinSnapshotsToKeep:cdk().numberToCloudFormation(properties.minSnapshotsToKeep),Status:cdk().stringToCloudFormation(properties.status)}):properties}function CfnTableSnapshotManagementPropertyFromCloudFormation(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("maxSnapshotAgeHours","MaxSnapshotAgeHours",properties.MaxSnapshotAgeHours!=null?cfn_parse().FromCloudFormation.getNumber(properties.MaxSnapshotAgeHours):void 0),ret.addPropertyResult("minSnapshotsToKeep","MinSnapshotsToKeep",properties.MinSnapshotsToKeep!=null?cfn_parse().FromCloudFormation.getNumber(properties.MinSnapshotsToKeep):void 0),ret.addPropertyResult("status","Status",properties.Status!=null?cfn_parse().FromCloudFormation.getString(properties.Status):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTablePropsValidator(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("compaction",CfnTableCompactionPropertyValidator)(properties.compaction)),errors.collect(cdk().propertyValidator("icebergMetadata",CfnTableIcebergMetadataPropertyValidator)(properties.icebergMetadata)),errors.collect(cdk().propertyValidator("namespace",cdk().requiredValidator)(properties.namespace)),errors.collect(cdk().propertyValidator("namespace",cdk().validateString)(properties.namespace)),errors.collect(cdk().propertyValidator("openTableFormat",cdk().requiredValidator)(properties.openTableFormat)),errors.collect(cdk().propertyValidator("openTableFormat",cdk().validateString)(properties.openTableFormat)),errors.collect(cdk().propertyValidator("snapshotManagement",CfnTableSnapshotManagementPropertyValidator)(properties.snapshotManagement)),errors.collect(cdk().propertyValidator("tableBucketArn",cdk().requiredValidator)(properties.tableBucketArn)),errors.collect(cdk().propertyValidator("tableBucketArn",cdk().validateString)(properties.tableBucketArn)),errors.collect(cdk().propertyValidator("tableName",cdk().requiredValidator)(properties.tableName)),errors.collect(cdk().propertyValidator("tableName",cdk().validateString)(properties.tableName)),errors.collect(cdk().propertyValidator("withoutMetadata",cdk().validateString)(properties.withoutMetadata)),errors.wrap('supplied properties not correct for "CfnTableProps"')}function convertCfnTablePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTablePropsValidator(properties).assertSuccess(),{Compaction:convertCfnTableCompactionPropertyToCloudFormation(properties.compaction),IcebergMetadata:convertCfnTableIcebergMetadataPropertyToCloudFormation(properties.icebergMetadata),Namespace:cdk().stringToCloudFormation(properties.namespace),OpenTableFormat:cdk().stringToCloudFormation(properties.openTableFormat),SnapshotManagement:convertCfnTableSnapshotManagementPropertyToCloudFormation(properties.snapshotManagement),TableBucketARN:cdk().stringToCloudFormation(properties.tableBucketArn),TableName:cdk().stringToCloudFormation(properties.tableName),WithoutMetadata:cdk().stringToCloudFormation(properties.withoutMetadata)}):properties}function CfnTablePropsFromCloudFormation(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("compaction","Compaction",properties.Compaction!=null?CfnTableCompactionPropertyFromCloudFormation(properties.Compaction):void 0),ret.addPropertyResult("icebergMetadata","IcebergMetadata",properties.IcebergMetadata!=null?CfnTableIcebergMetadataPropertyFromCloudFormation(properties.IcebergMetadata):void 0),ret.addPropertyResult("namespace","Namespace",properties.Namespace!=null?cfn_parse().FromCloudFormation.getString(properties.Namespace):void 0),ret.addPropertyResult("openTableFormat","OpenTableFormat",properties.OpenTableFormat!=null?cfn_parse().FromCloudFormation.getString(properties.OpenTableFormat):void 0),ret.addPropertyResult("snapshotManagement","SnapshotManagement",properties.SnapshotManagement!=null?CfnTableSnapshotManagementPropertyFromCloudFormation(properties.SnapshotManagement):void 0),ret.addPropertyResult("tableBucketArn","TableBucketARN",properties.TableBucketARN!=null?cfn_parse().FromCloudFormation.getString(properties.TableBucketARN):void 0),ret.addPropertyResult("tableName","TableName",properties.TableName!=null?cfn_parse().FromCloudFormation.getString(properties.TableName):void 0),ret.addPropertyResult("withoutMetadata","WithoutMetadata",properties.WithoutMetadata!=null?cfn_parse().FromCloudFormation.getString(properties.WithoutMetadata):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnTableBucket extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnTableBucketPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnTableBucket(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}constructor(scope,id,props){super(scope,id,{type:CfnTableBucket.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_s3tables_CfnTableBucketProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnTableBucket),error}cdk().requireProperty(props,"tableBucketName",this),this.attrTableBucketArn=cdk().Token.asString(this.getAtt("TableBucketARN",cdk().ResolutionTypeHint.STRING)),this.encryptionConfiguration=props.encryptionConfiguration,this.tableBucketName=props.tableBucketName,this.unreferencedFileRemoval=props.unreferencedFileRemoval}get tableBucketRef(){return{tableBucketArn:this.ref}}get cfnProperties(){return{encryptionConfiguration:this.encryptionConfiguration,tableBucketName:this.tableBucketName,unreferencedFileRemoval:this.unreferencedFileRemoval}}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",CfnTableBucket.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnTableBucketPropsToCloudFormation(props)}}exports.CfnTableBucket=CfnTableBucket,_c=JSII_RTTI_SYMBOL_1,CfnTableBucket[_c]={fqn:"aws-cdk-lib.aws_s3tables.CfnTableBucket",version:"2.216.0"},CfnTableBucket.CFN_RESOURCE_TYPE_NAME="AWS::S3Tables::TableBucket";function CfnTableBucketUnreferencedFileRemovalPropertyValidator(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("noncurrentDays",cdk().validateNumber)(properties.noncurrentDays)),errors.collect(cdk().propertyValidator("status",cdk().validateString)(properties.status)),errors.collect(cdk().propertyValidator("unreferencedDays",cdk().validateNumber)(properties.unreferencedDays)),errors.wrap('supplied properties not correct for "UnreferencedFileRemovalProperty"')}function convertCfnTableBucketUnreferencedFileRemovalPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTableBucketUnreferencedFileRemovalPropertyValidator(properties).assertSuccess(),{NoncurrentDays:cdk().numberToCloudFormation(properties.noncurrentDays),Status:cdk().stringToCloudFormation(properties.status),UnreferencedDays:cdk().numberToCloudFormation(properties.unreferencedDays)}):properties}function CfnTableBucketUnreferencedFileRemovalPropertyFromCloudFormation(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("noncurrentDays","NoncurrentDays",properties.NoncurrentDays!=null?cfn_parse().FromCloudFormation.getNumber(properties.NoncurrentDays):void 0),ret.addPropertyResult("status","Status",properties.Status!=null?cfn_parse().FromCloudFormation.getString(properties.Status):void 0),ret.addPropertyResult("unreferencedDays","UnreferencedDays",properties.UnreferencedDays!=null?cfn_parse().FromCloudFormation.getNumber(properties.UnreferencedDays):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTableBucketEncryptionConfigurationPropertyValidator(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("kmsKeyArn",cdk().validateString)(properties.kmsKeyArn)),errors.collect(cdk().propertyValidator("sseAlgorithm",cdk().validateString)(properties.sseAlgorithm)),errors.wrap('supplied properties not correct for "EncryptionConfigurationProperty"')}function convertCfnTableBucketEncryptionConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTableBucketEncryptionConfigurationPropertyValidator(properties).assertSuccess(),{KMSKeyArn:cdk().stringToCloudFormation(properties.kmsKeyArn),SSEAlgorithm:cdk().stringToCloudFormation(properties.sseAlgorithm)}):properties}function CfnTableBucketEncryptionConfigurationPropertyFromCloudFormation(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("kmsKeyArn","KMSKeyArn",properties.KMSKeyArn!=null?cfn_parse().FromCloudFormation.getString(properties.KMSKeyArn):void 0),ret.addPropertyResult("sseAlgorithm","SSEAlgorithm",properties.SSEAlgorithm!=null?cfn_parse().FromCloudFormation.getString(properties.SSEAlgorithm):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTableBucketPropsValidator(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("encryptionConfiguration",CfnTableBucketEncryptionConfigurationPropertyValidator)(properties.encryptionConfiguration)),errors.collect(cdk().propertyValidator("tableBucketName",cdk().requiredValidator)(properties.tableBucketName)),errors.collect(cdk().propertyValidator("tableBucketName",cdk().validateString)(properties.tableBucketName)),errors.collect(cdk().propertyValidator("unreferencedFileRemoval",CfnTableBucketUnreferencedFileRemovalPropertyValidator)(properties.unreferencedFileRemoval)),errors.wrap('supplied properties not correct for "CfnTableBucketProps"')}function convertCfnTableBucketPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTableBucketPropsValidator(properties).assertSuccess(),{EncryptionConfiguration:convertCfnTableBucketEncryptionConfigurationPropertyToCloudFormation(properties.encryptionConfiguration),TableBucketName:cdk().stringToCloudFormation(properties.tableBucketName),UnreferencedFileRemoval:convertCfnTableBucketUnreferencedFileRemovalPropertyToCloudFormation(properties.unreferencedFileRemoval)}):properties}function CfnTableBucketPropsFromCloudFormation(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("encryptionConfiguration","EncryptionConfiguration",properties.EncryptionConfiguration!=null?CfnTableBucketEncryptionConfigurationPropertyFromCloudFormation(properties.EncryptionConfiguration):void 0),ret.addPropertyResult("tableBucketName","TableBucketName",properties.TableBucketName!=null?cfn_parse().FromCloudFormation.getString(properties.TableBucketName):void 0),ret.addPropertyResult("unreferencedFileRemoval","UnreferencedFileRemoval",properties.UnreferencedFileRemoval!=null?CfnTableBucketUnreferencedFileRemovalPropertyFromCloudFormation(properties.UnreferencedFileRemoval):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnTableBucketPolicy extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnTableBucketPolicyPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnTableBucketPolicy(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}constructor(scope,id,props){super(scope,id,{type:CfnTableBucketPolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_s3tables_CfnTableBucketPolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnTableBucketPolicy),error}cdk().requireProperty(props,"resourcePolicy",this),cdk().requireProperty(props,"tableBucketArn",this),this.resourcePolicy=props.resourcePolicy,this.tableBucketArn=props.tableBucketArn}get tableBucketPolicyRef(){return{tableBucketArn:this.ref}}get cfnProperties(){return{resourcePolicy:this.resourcePolicy,tableBucketArn:this.tableBucketArn}}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",CfnTableBucketPolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnTableBucketPolicyPropsToCloudFormation(props)}}exports.CfnTableBucketPolicy=CfnTableBucketPolicy,_d=JSII_RTTI_SYMBOL_1,CfnTableBucketPolicy[_d]={fqn:"aws-cdk-lib.aws_s3tables.CfnTableBucketPolicy",version:"2.216.0"},CfnTableBucketPolicy.CFN_RESOURCE_TYPE_NAME="AWS::S3Tables::TableBucketPolicy";function CfnTableBucketPolicyPropsValidator(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("resourcePolicy",cdk().requiredValidator)(properties.resourcePolicy)),errors.collect(cdk().propertyValidator("resourcePolicy",cdk().unionValidator(cdk().validateString,cdk().validateObject))(properties.resourcePolicy)),errors.collect(cdk().propertyValidator("tableBucketArn",cdk().requiredValidator)(properties.tableBucketArn)),errors.collect(cdk().propertyValidator("tableBucketArn",cdk().validateString)(properties.tableBucketArn)),errors.wrap('supplied properties not correct for "CfnTableBucketPolicyProps"')}function convertCfnTableBucketPolicyPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTableBucketPolicyPropsValidator(properties).assertSuccess(),{ResourcePolicy:cdk().unionMapper([cdk().validateString,cdk().validateObject],[cdk().stringToCloudFormation,cdk().objectToCloudFormation])(properties.resourcePolicy),TableBucketARN:cdk().stringToCloudFormation(properties.tableBucketArn)}):properties}function CfnTableBucketPolicyPropsFromCloudFormation(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("resourcePolicy","ResourcePolicy",properties.ResourcePolicy!=null?cfn_parse().FromCloudFormation.getTypeUnion([cdk().validateString,cdk().validateObject],[cfn_parse().FromCloudFormation.getString,cfn_parse().FromCloudFormation.getAny])(properties.ResourcePolicy):void 0),ret.addPropertyResult("tableBucketArn","TableBucketARN",properties.TableBucketARN!=null?cfn_parse().FromCloudFormation.getString(properties.TableBucketARN):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnTablePolicy extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnTablePolicyPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnTablePolicy(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}constructor(scope,id,props){super(scope,id,{type:CfnTablePolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_s3tables_CfnTablePolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnTablePolicy),error}cdk().requireProperty(props,"resourcePolicy",this),cdk().requireProperty(props,"tableArn",this),this.attrNamespace=cdk().Token.asString(this.getAtt("Namespace",cdk().ResolutionTypeHint.STRING)),this.attrTableBucketArn=cdk().Token.asString(this.getAtt("TableBucketARN",cdk().ResolutionTypeHint.STRING)),this.attrTableName=cdk().Token.asString(this.getAtt("TableName",cdk().ResolutionTypeHint.STRING)),this.resourcePolicy=props.resourcePolicy,this.tableArn=props.tableArn}get tablePolicyRef(){return{tableArn:this.ref}}get cfnProperties(){return{resourcePolicy:this.resourcePolicy,tableArn:this.tableArn}}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",CfnTablePolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnTablePolicyPropsToCloudFormation(props)}}exports.CfnTablePolicy=CfnTablePolicy,_e=JSII_RTTI_SYMBOL_1,CfnTablePolicy[_e]={fqn:"aws-cdk-lib.aws_s3tables.CfnTablePolicy",version:"2.216.0"},CfnTablePolicy.CFN_RESOURCE_TYPE_NAME="AWS::S3Tables::TablePolicy";function CfnTablePolicyPropsValidator(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("resourcePolicy",cdk().requiredValidator)(properties.resourcePolicy)),errors.collect(cdk().propertyValidator("resourcePolicy",cdk().unionValidator(cdk().validateString,cdk().validateObject))(properties.resourcePolicy)),errors.collect(cdk().propertyValidator("tableArn",cdk().requiredValidator)(properties.tableArn)),errors.collect(cdk().propertyValidator("tableArn",cdk().validateString)(properties.tableArn)),errors.wrap('supplied properties not correct for "CfnTablePolicyProps"')}function convertCfnTablePolicyPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTablePolicyPropsValidator(properties).assertSuccess(),{ResourcePolicy:cdk().unionMapper([cdk().validateString,cdk().validateObject],[cdk().stringToCloudFormation,cdk().objectToCloudFormation])(properties.resourcePolicy),TableARN:cdk().stringToCloudFormation(properties.tableArn)}):properties}function CfnTablePolicyPropsFromCloudFormation(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("resourcePolicy","ResourcePolicy",properties.ResourcePolicy!=null?cfn_parse().FromCloudFormation.getTypeUnion([cdk().validateString,cdk().validateObject],[cfn_parse().FromCloudFormation.getString,cfn_parse().FromCloudFormation.getAny])(properties.ResourcePolicy):void 0),ret.addPropertyResult("tableArn","TableARN",properties.TableARN!=null?cfn_parse().FromCloudFormation.getString(properties.TableARN):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}