UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

1 lines 119 kB
"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnTable=exports.CfnGlobalTable=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 CfnGlobalTable extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnGlobalTablePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnGlobalTable(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:CfnGlobalTable.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_dynamodb_CfnGlobalTableProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnGlobalTable),error}cdk().requireProperty(props,"attributeDefinitions",this),cdk().requireProperty(props,"keySchema",this),cdk().requireProperty(props,"replicas",this),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrStreamArn=cdk().Token.asString(this.getAtt("StreamArn",cdk().ResolutionTypeHint.STRING)),this.attrTableId=cdk().Token.asString(this.getAtt("TableId",cdk().ResolutionTypeHint.STRING)),this.attributeDefinitions=props.attributeDefinitions,this.billingMode=props.billingMode,this.globalSecondaryIndexes=props.globalSecondaryIndexes,this.keySchema=props.keySchema,this.localSecondaryIndexes=props.localSecondaryIndexes,this.replicas=props.replicas,this.sseSpecification=props.sseSpecification,this.streamSpecification=props.streamSpecification,this.tableName=props.tableName,this.timeToLiveSpecification=props.timeToLiveSpecification,this.warmThroughput=props.warmThroughput,this.writeOnDemandThroughputSettings=props.writeOnDemandThroughputSettings,this.writeProvisionedThroughputSettings=props.writeProvisionedThroughputSettings,this.node.scope!=null&&cdk().Resource.isResource(this.node.scope)&&this.node.addValidation({validate:()=>this.cfnOptions.deletionPolicy===void 0?["'AWS::DynamoDB::GlobalTable' is a stateful resource type, and you must specify a Removal Policy for it. Call 'resource.applyRemovalPolicy()'."]:[]})}get cfnProperties(){return{attributeDefinitions:this.attributeDefinitions,billingMode:this.billingMode,globalSecondaryIndexes:this.globalSecondaryIndexes,keySchema:this.keySchema,localSecondaryIndexes:this.localSecondaryIndexes,replicas:this.replicas,sseSpecification:this.sseSpecification,streamSpecification:this.streamSpecification,tableName:this.tableName,timeToLiveSpecification:this.timeToLiveSpecification,warmThroughput:this.warmThroughput,writeOnDemandThroughputSettings:this.writeOnDemandThroughputSettings,writeProvisionedThroughputSettings:this.writeProvisionedThroughputSettings}}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",CfnGlobalTable.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnGlobalTablePropsToCloudFormation(props)}}exports.CfnGlobalTable=CfnGlobalTable,_a=JSII_RTTI_SYMBOL_1,CfnGlobalTable[_a]={fqn:"aws-cdk-lib.aws_dynamodb.CfnGlobalTable",version:"2.185.0"},CfnGlobalTable.CFN_RESOURCE_TYPE_NAME="AWS::DynamoDB::GlobalTable";function CfnGlobalTableSSESpecificationPropertyValidator(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("sseEnabled",cdk().requiredValidator)(properties.sseEnabled)),errors.collect(cdk().propertyValidator("sseEnabled",cdk().validateBoolean)(properties.sseEnabled)),errors.collect(cdk().propertyValidator("sseType",cdk().validateString)(properties.sseType)),errors.wrap('supplied properties not correct for "SSESpecificationProperty"')}function convertCfnGlobalTableSSESpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableSSESpecificationPropertyValidator(properties).assertSuccess(),{SSEEnabled:cdk().booleanToCloudFormation(properties.sseEnabled),SSEType:cdk().stringToCloudFormation(properties.sseType)}):properties}function CfnGlobalTableSSESpecificationPropertyFromCloudFormation(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("sseEnabled","SSEEnabled",properties.SSEEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.SSEEnabled):void 0),ret.addPropertyResult("sseType","SSEType",properties.SSEType!=null?cfn_parse().FromCloudFormation.getString(properties.SSEType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableAttributeDefinitionPropertyValidator(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("attributeName",cdk().requiredValidator)(properties.attributeName)),errors.collect(cdk().propertyValidator("attributeName",cdk().validateString)(properties.attributeName)),errors.collect(cdk().propertyValidator("attributeType",cdk().requiredValidator)(properties.attributeType)),errors.collect(cdk().propertyValidator("attributeType",cdk().validateString)(properties.attributeType)),errors.wrap('supplied properties not correct for "AttributeDefinitionProperty"')}function convertCfnGlobalTableAttributeDefinitionPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableAttributeDefinitionPropertyValidator(properties).assertSuccess(),{AttributeName:cdk().stringToCloudFormation(properties.attributeName),AttributeType:cdk().stringToCloudFormation(properties.attributeType)}):properties}function CfnGlobalTableAttributeDefinitionPropertyFromCloudFormation(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("attributeName","AttributeName",properties.AttributeName!=null?cfn_parse().FromCloudFormation.getString(properties.AttributeName):void 0),ret.addPropertyResult("attributeType","AttributeType",properties.AttributeType!=null?cfn_parse().FromCloudFormation.getString(properties.AttributeType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableStreamSpecificationPropertyValidator(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("streamViewType",cdk().requiredValidator)(properties.streamViewType)),errors.collect(cdk().propertyValidator("streamViewType",cdk().validateString)(properties.streamViewType)),errors.wrap('supplied properties not correct for "StreamSpecificationProperty"')}function convertCfnGlobalTableStreamSpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableStreamSpecificationPropertyValidator(properties).assertSuccess(),{StreamViewType:cdk().stringToCloudFormation(properties.streamViewType)}):properties}function CfnGlobalTableStreamSpecificationPropertyFromCloudFormation(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("streamViewType","StreamViewType",properties.StreamViewType!=null?cfn_parse().FromCloudFormation.getString(properties.StreamViewType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableProjectionPropertyValidator(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("nonKeyAttributes",cdk().listValidator(cdk().validateString))(properties.nonKeyAttributes)),errors.collect(cdk().propertyValidator("projectionType",cdk().validateString)(properties.projectionType)),errors.wrap('supplied properties not correct for "ProjectionProperty"')}function convertCfnGlobalTableProjectionPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableProjectionPropertyValidator(properties).assertSuccess(),{NonKeyAttributes:cdk().listMapper(cdk().stringToCloudFormation)(properties.nonKeyAttributes),ProjectionType:cdk().stringToCloudFormation(properties.projectionType)}):properties}function CfnGlobalTableProjectionPropertyFromCloudFormation(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("nonKeyAttributes","NonKeyAttributes",properties.NonKeyAttributes!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.NonKeyAttributes):void 0),ret.addPropertyResult("projectionType","ProjectionType",properties.ProjectionType!=null?cfn_parse().FromCloudFormation.getString(properties.ProjectionType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableKeySchemaPropertyValidator(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("attributeName",cdk().requiredValidator)(properties.attributeName)),errors.collect(cdk().propertyValidator("attributeName",cdk().validateString)(properties.attributeName)),errors.collect(cdk().propertyValidator("keyType",cdk().requiredValidator)(properties.keyType)),errors.collect(cdk().propertyValidator("keyType",cdk().validateString)(properties.keyType)),errors.wrap('supplied properties not correct for "KeySchemaProperty"')}function convertCfnGlobalTableKeySchemaPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableKeySchemaPropertyValidator(properties).assertSuccess(),{AttributeName:cdk().stringToCloudFormation(properties.attributeName),KeyType:cdk().stringToCloudFormation(properties.keyType)}):properties}function CfnGlobalTableKeySchemaPropertyFromCloudFormation(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("attributeName","AttributeName",properties.AttributeName!=null?cfn_parse().FromCloudFormation.getString(properties.AttributeName):void 0),ret.addPropertyResult("keyType","KeyType",properties.KeyType!=null?cfn_parse().FromCloudFormation.getString(properties.KeyType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableTargetTrackingScalingPolicyConfigurationPropertyValidator(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("disableScaleIn",cdk().validateBoolean)(properties.disableScaleIn)),errors.collect(cdk().propertyValidator("scaleInCooldown",cdk().validateNumber)(properties.scaleInCooldown)),errors.collect(cdk().propertyValidator("scaleOutCooldown",cdk().validateNumber)(properties.scaleOutCooldown)),errors.collect(cdk().propertyValidator("targetValue",cdk().requiredValidator)(properties.targetValue)),errors.collect(cdk().propertyValidator("targetValue",cdk().validateNumber)(properties.targetValue)),errors.wrap('supplied properties not correct for "TargetTrackingScalingPolicyConfigurationProperty"')}function convertCfnGlobalTableTargetTrackingScalingPolicyConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableTargetTrackingScalingPolicyConfigurationPropertyValidator(properties).assertSuccess(),{DisableScaleIn:cdk().booleanToCloudFormation(properties.disableScaleIn),ScaleInCooldown:cdk().numberToCloudFormation(properties.scaleInCooldown),ScaleOutCooldown:cdk().numberToCloudFormation(properties.scaleOutCooldown),TargetValue:cdk().numberToCloudFormation(properties.targetValue)}):properties}function CfnGlobalTableTargetTrackingScalingPolicyConfigurationPropertyFromCloudFormation(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("disableScaleIn","DisableScaleIn",properties.DisableScaleIn!=null?cfn_parse().FromCloudFormation.getBoolean(properties.DisableScaleIn):void 0),ret.addPropertyResult("scaleInCooldown","ScaleInCooldown",properties.ScaleInCooldown!=null?cfn_parse().FromCloudFormation.getNumber(properties.ScaleInCooldown):void 0),ret.addPropertyResult("scaleOutCooldown","ScaleOutCooldown",properties.ScaleOutCooldown!=null?cfn_parse().FromCloudFormation.getNumber(properties.ScaleOutCooldown):void 0),ret.addPropertyResult("targetValue","TargetValue",properties.TargetValue!=null?cfn_parse().FromCloudFormation.getNumber(properties.TargetValue):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableCapacityAutoScalingSettingsPropertyValidator(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("maxCapacity",cdk().requiredValidator)(properties.maxCapacity)),errors.collect(cdk().propertyValidator("maxCapacity",cdk().validateNumber)(properties.maxCapacity)),errors.collect(cdk().propertyValidator("minCapacity",cdk().requiredValidator)(properties.minCapacity)),errors.collect(cdk().propertyValidator("minCapacity",cdk().validateNumber)(properties.minCapacity)),errors.collect(cdk().propertyValidator("seedCapacity",cdk().validateNumber)(properties.seedCapacity)),errors.collect(cdk().propertyValidator("targetTrackingScalingPolicyConfiguration",cdk().requiredValidator)(properties.targetTrackingScalingPolicyConfiguration)),errors.collect(cdk().propertyValidator("targetTrackingScalingPolicyConfiguration",CfnGlobalTableTargetTrackingScalingPolicyConfigurationPropertyValidator)(properties.targetTrackingScalingPolicyConfiguration)),errors.wrap('supplied properties not correct for "CapacityAutoScalingSettingsProperty"')}function convertCfnGlobalTableCapacityAutoScalingSettingsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableCapacityAutoScalingSettingsPropertyValidator(properties).assertSuccess(),{MaxCapacity:cdk().numberToCloudFormation(properties.maxCapacity),MinCapacity:cdk().numberToCloudFormation(properties.minCapacity),SeedCapacity:cdk().numberToCloudFormation(properties.seedCapacity),TargetTrackingScalingPolicyConfiguration:convertCfnGlobalTableTargetTrackingScalingPolicyConfigurationPropertyToCloudFormation(properties.targetTrackingScalingPolicyConfiguration)}):properties}function CfnGlobalTableCapacityAutoScalingSettingsPropertyFromCloudFormation(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("maxCapacity","MaxCapacity",properties.MaxCapacity!=null?cfn_parse().FromCloudFormation.getNumber(properties.MaxCapacity):void 0),ret.addPropertyResult("minCapacity","MinCapacity",properties.MinCapacity!=null?cfn_parse().FromCloudFormation.getNumber(properties.MinCapacity):void 0),ret.addPropertyResult("seedCapacity","SeedCapacity",properties.SeedCapacity!=null?cfn_parse().FromCloudFormation.getNumber(properties.SeedCapacity):void 0),ret.addPropertyResult("targetTrackingScalingPolicyConfiguration","TargetTrackingScalingPolicyConfiguration",properties.TargetTrackingScalingPolicyConfiguration!=null?CfnGlobalTableTargetTrackingScalingPolicyConfigurationPropertyFromCloudFormation(properties.TargetTrackingScalingPolicyConfiguration):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableWriteProvisionedThroughputSettingsPropertyValidator(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("writeCapacityAutoScalingSettings",CfnGlobalTableCapacityAutoScalingSettingsPropertyValidator)(properties.writeCapacityAutoScalingSettings)),errors.wrap('supplied properties not correct for "WriteProvisionedThroughputSettingsProperty"')}function convertCfnGlobalTableWriteProvisionedThroughputSettingsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableWriteProvisionedThroughputSettingsPropertyValidator(properties).assertSuccess(),{WriteCapacityAutoScalingSettings:convertCfnGlobalTableCapacityAutoScalingSettingsPropertyToCloudFormation(properties.writeCapacityAutoScalingSettings)}):properties}function CfnGlobalTableWriteProvisionedThroughputSettingsPropertyFromCloudFormation(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("writeCapacityAutoScalingSettings","WriteCapacityAutoScalingSettings",properties.WriteCapacityAutoScalingSettings!=null?CfnGlobalTableCapacityAutoScalingSettingsPropertyFromCloudFormation(properties.WriteCapacityAutoScalingSettings):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableWriteOnDemandThroughputSettingsPropertyValidator(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("maxWriteRequestUnits",cdk().validateNumber)(properties.maxWriteRequestUnits)),errors.wrap('supplied properties not correct for "WriteOnDemandThroughputSettingsProperty"')}function convertCfnGlobalTableWriteOnDemandThroughputSettingsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableWriteOnDemandThroughputSettingsPropertyValidator(properties).assertSuccess(),{MaxWriteRequestUnits:cdk().numberToCloudFormation(properties.maxWriteRequestUnits)}):properties}function CfnGlobalTableWriteOnDemandThroughputSettingsPropertyFromCloudFormation(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("maxWriteRequestUnits","MaxWriteRequestUnits",properties.MaxWriteRequestUnits!=null?cfn_parse().FromCloudFormation.getNumber(properties.MaxWriteRequestUnits):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableWarmThroughputPropertyValidator(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("readUnitsPerSecond",cdk().validateNumber)(properties.readUnitsPerSecond)),errors.collect(cdk().propertyValidator("writeUnitsPerSecond",cdk().validateNumber)(properties.writeUnitsPerSecond)),errors.wrap('supplied properties not correct for "WarmThroughputProperty"')}function convertCfnGlobalTableWarmThroughputPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableWarmThroughputPropertyValidator(properties).assertSuccess(),{ReadUnitsPerSecond:cdk().numberToCloudFormation(properties.readUnitsPerSecond),WriteUnitsPerSecond:cdk().numberToCloudFormation(properties.writeUnitsPerSecond)}):properties}function CfnGlobalTableWarmThroughputPropertyFromCloudFormation(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("readUnitsPerSecond","ReadUnitsPerSecond",properties.ReadUnitsPerSecond!=null?cfn_parse().FromCloudFormation.getNumber(properties.ReadUnitsPerSecond):void 0),ret.addPropertyResult("writeUnitsPerSecond","WriteUnitsPerSecond",properties.WriteUnitsPerSecond!=null?cfn_parse().FromCloudFormation.getNumber(properties.WriteUnitsPerSecond):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableGlobalSecondaryIndexPropertyValidator(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("indexName",cdk().requiredValidator)(properties.indexName)),errors.collect(cdk().propertyValidator("indexName",cdk().validateString)(properties.indexName)),errors.collect(cdk().propertyValidator("keySchema",cdk().requiredValidator)(properties.keySchema)),errors.collect(cdk().propertyValidator("keySchema",cdk().listValidator(CfnGlobalTableKeySchemaPropertyValidator))(properties.keySchema)),errors.collect(cdk().propertyValidator("projection",cdk().requiredValidator)(properties.projection)),errors.collect(cdk().propertyValidator("projection",CfnGlobalTableProjectionPropertyValidator)(properties.projection)),errors.collect(cdk().propertyValidator("warmThroughput",CfnGlobalTableWarmThroughputPropertyValidator)(properties.warmThroughput)),errors.collect(cdk().propertyValidator("writeOnDemandThroughputSettings",CfnGlobalTableWriteOnDemandThroughputSettingsPropertyValidator)(properties.writeOnDemandThroughputSettings)),errors.collect(cdk().propertyValidator("writeProvisionedThroughputSettings",CfnGlobalTableWriteProvisionedThroughputSettingsPropertyValidator)(properties.writeProvisionedThroughputSettings)),errors.wrap('supplied properties not correct for "GlobalSecondaryIndexProperty"')}function convertCfnGlobalTableGlobalSecondaryIndexPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableGlobalSecondaryIndexPropertyValidator(properties).assertSuccess(),{IndexName:cdk().stringToCloudFormation(properties.indexName),KeySchema:cdk().listMapper(convertCfnGlobalTableKeySchemaPropertyToCloudFormation)(properties.keySchema),Projection:convertCfnGlobalTableProjectionPropertyToCloudFormation(properties.projection),WarmThroughput:convertCfnGlobalTableWarmThroughputPropertyToCloudFormation(properties.warmThroughput),WriteOnDemandThroughputSettings:convertCfnGlobalTableWriteOnDemandThroughputSettingsPropertyToCloudFormation(properties.writeOnDemandThroughputSettings),WriteProvisionedThroughputSettings:convertCfnGlobalTableWriteProvisionedThroughputSettingsPropertyToCloudFormation(properties.writeProvisionedThroughputSettings)}):properties}function CfnGlobalTableGlobalSecondaryIndexPropertyFromCloudFormation(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("indexName","IndexName",properties.IndexName!=null?cfn_parse().FromCloudFormation.getString(properties.IndexName):void 0),ret.addPropertyResult("keySchema","KeySchema",properties.KeySchema!=null?cfn_parse().FromCloudFormation.getArray(CfnGlobalTableKeySchemaPropertyFromCloudFormation)(properties.KeySchema):void 0),ret.addPropertyResult("projection","Projection",properties.Projection!=null?CfnGlobalTableProjectionPropertyFromCloudFormation(properties.Projection):void 0),ret.addPropertyResult("warmThroughput","WarmThroughput",properties.WarmThroughput!=null?CfnGlobalTableWarmThroughputPropertyFromCloudFormation(properties.WarmThroughput):void 0),ret.addPropertyResult("writeOnDemandThroughputSettings","WriteOnDemandThroughputSettings",properties.WriteOnDemandThroughputSettings!=null?CfnGlobalTableWriteOnDemandThroughputSettingsPropertyFromCloudFormation(properties.WriteOnDemandThroughputSettings):void 0),ret.addPropertyResult("writeProvisionedThroughputSettings","WriteProvisionedThroughputSettings",properties.WriteProvisionedThroughputSettings!=null?CfnGlobalTableWriteProvisionedThroughputSettingsPropertyFromCloudFormation(properties.WriteProvisionedThroughputSettings):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableLocalSecondaryIndexPropertyValidator(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("indexName",cdk().requiredValidator)(properties.indexName)),errors.collect(cdk().propertyValidator("indexName",cdk().validateString)(properties.indexName)),errors.collect(cdk().propertyValidator("keySchema",cdk().requiredValidator)(properties.keySchema)),errors.collect(cdk().propertyValidator("keySchema",cdk().listValidator(CfnGlobalTableKeySchemaPropertyValidator))(properties.keySchema)),errors.collect(cdk().propertyValidator("projection",cdk().requiredValidator)(properties.projection)),errors.collect(cdk().propertyValidator("projection",CfnGlobalTableProjectionPropertyValidator)(properties.projection)),errors.wrap('supplied properties not correct for "LocalSecondaryIndexProperty"')}function convertCfnGlobalTableLocalSecondaryIndexPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableLocalSecondaryIndexPropertyValidator(properties).assertSuccess(),{IndexName:cdk().stringToCloudFormation(properties.indexName),KeySchema:cdk().listMapper(convertCfnGlobalTableKeySchemaPropertyToCloudFormation)(properties.keySchema),Projection:convertCfnGlobalTableProjectionPropertyToCloudFormation(properties.projection)}):properties}function CfnGlobalTableLocalSecondaryIndexPropertyFromCloudFormation(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("indexName","IndexName",properties.IndexName!=null?cfn_parse().FromCloudFormation.getString(properties.IndexName):void 0),ret.addPropertyResult("keySchema","KeySchema",properties.KeySchema!=null?cfn_parse().FromCloudFormation.getArray(CfnGlobalTableKeySchemaPropertyFromCloudFormation)(properties.KeySchema):void 0),ret.addPropertyResult("projection","Projection",properties.Projection!=null?CfnGlobalTableProjectionPropertyFromCloudFormation(properties.Projection):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableReplicaSSESpecificationPropertyValidator(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().requiredValidator)(properties.kmsMasterKeyId)),errors.collect(cdk().propertyValidator("kmsMasterKeyId",cdk().validateString)(properties.kmsMasterKeyId)),errors.wrap('supplied properties not correct for "ReplicaSSESpecificationProperty"')}function convertCfnGlobalTableReplicaSSESpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableReplicaSSESpecificationPropertyValidator(properties).assertSuccess(),{KMSMasterKeyId:cdk().stringToCloudFormation(properties.kmsMasterKeyId)}):properties}function CfnGlobalTableReplicaSSESpecificationPropertyFromCloudFormation(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.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableKinesisStreamSpecificationPropertyValidator(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("approximateCreationDateTimePrecision",cdk().validateString)(properties.approximateCreationDateTimePrecision)),errors.collect(cdk().propertyValidator("streamArn",cdk().requiredValidator)(properties.streamArn)),errors.collect(cdk().propertyValidator("streamArn",cdk().validateString)(properties.streamArn)),errors.wrap('supplied properties not correct for "KinesisStreamSpecificationProperty"')}function convertCfnGlobalTableKinesisStreamSpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableKinesisStreamSpecificationPropertyValidator(properties).assertSuccess(),{ApproximateCreationDateTimePrecision:cdk().stringToCloudFormation(properties.approximateCreationDateTimePrecision),StreamArn:cdk().stringToCloudFormation(properties.streamArn)}):properties}function CfnGlobalTableKinesisStreamSpecificationPropertyFromCloudFormation(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("approximateCreationDateTimePrecision","ApproximateCreationDateTimePrecision",properties.ApproximateCreationDateTimePrecision!=null?cfn_parse().FromCloudFormation.getString(properties.ApproximateCreationDateTimePrecision):void 0),ret.addPropertyResult("streamArn","StreamArn",properties.StreamArn!=null?cfn_parse().FromCloudFormation.getString(properties.StreamArn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableContributorInsightsSpecificationPropertyValidator(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("enabled",cdk().requiredValidator)(properties.enabled)),errors.collect(cdk().propertyValidator("enabled",cdk().validateBoolean)(properties.enabled)),errors.wrap('supplied properties not correct for "ContributorInsightsSpecificationProperty"')}function convertCfnGlobalTableContributorInsightsSpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableContributorInsightsSpecificationPropertyValidator(properties).assertSuccess(),{Enabled:cdk().booleanToCloudFormation(properties.enabled)}):properties}function CfnGlobalTableContributorInsightsSpecificationPropertyFromCloudFormation(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("enabled","Enabled",properties.Enabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.Enabled):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableReadProvisionedThroughputSettingsPropertyValidator(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("readCapacityAutoScalingSettings",CfnGlobalTableCapacityAutoScalingSettingsPropertyValidator)(properties.readCapacityAutoScalingSettings)),errors.collect(cdk().propertyValidator("readCapacityUnits",cdk().validateNumber)(properties.readCapacityUnits)),errors.wrap('supplied properties not correct for "ReadProvisionedThroughputSettingsProperty"')}function convertCfnGlobalTableReadProvisionedThroughputSettingsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableReadProvisionedThroughputSettingsPropertyValidator(properties).assertSuccess(),{ReadCapacityAutoScalingSettings:convertCfnGlobalTableCapacityAutoScalingSettingsPropertyToCloudFormation(properties.readCapacityAutoScalingSettings),ReadCapacityUnits:cdk().numberToCloudFormation(properties.readCapacityUnits)}):properties}function CfnGlobalTableReadProvisionedThroughputSettingsPropertyFromCloudFormation(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("readCapacityAutoScalingSettings","ReadCapacityAutoScalingSettings",properties.ReadCapacityAutoScalingSettings!=null?CfnGlobalTableCapacityAutoScalingSettingsPropertyFromCloudFormation(properties.ReadCapacityAutoScalingSettings):void 0),ret.addPropertyResult("readCapacityUnits","ReadCapacityUnits",properties.ReadCapacityUnits!=null?cfn_parse().FromCloudFormation.getNumber(properties.ReadCapacityUnits):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableReadOnDemandThroughputSettingsPropertyValidator(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("maxReadRequestUnits",cdk().validateNumber)(properties.maxReadRequestUnits)),errors.wrap('supplied properties not correct for "ReadOnDemandThroughputSettingsProperty"')}function convertCfnGlobalTableReadOnDemandThroughputSettingsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableReadOnDemandThroughputSettingsPropertyValidator(properties).assertSuccess(),{MaxReadRequestUnits:cdk().numberToCloudFormation(properties.maxReadRequestUnits)}):properties}function CfnGlobalTableReadOnDemandThroughputSettingsPropertyFromCloudFormation(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("maxReadRequestUnits","MaxReadRequestUnits",properties.MaxReadRequestUnits!=null?cfn_parse().FromCloudFormation.getNumber(properties.MaxReadRequestUnits):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableReplicaGlobalSecondaryIndexSpecificationPropertyValidator(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("contributorInsightsSpecification",CfnGlobalTableContributorInsightsSpecificationPropertyValidator)(properties.contributorInsightsSpecification)),errors.collect(cdk().propertyValidator("indexName",cdk().requiredValidator)(properties.indexName)),errors.collect(cdk().propertyValidator("indexName",cdk().validateString)(properties.indexName)),errors.collect(cdk().propertyValidator("readOnDemandThroughputSettings",CfnGlobalTableReadOnDemandThroughputSettingsPropertyValidator)(properties.readOnDemandThroughputSettings)),errors.collect(cdk().propertyValidator("readProvisionedThroughputSettings",CfnGlobalTableReadProvisionedThroughputSettingsPropertyValidator)(properties.readProvisionedThroughputSettings)),errors.wrap('supplied properties not correct for "ReplicaGlobalSecondaryIndexSpecificationProperty"')}function convertCfnGlobalTableReplicaGlobalSecondaryIndexSpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableReplicaGlobalSecondaryIndexSpecificationPropertyValidator(properties).assertSuccess(),{ContributorInsightsSpecification:convertCfnGlobalTableContributorInsightsSpecificationPropertyToCloudFormation(properties.contributorInsightsSpecification),IndexName:cdk().stringToCloudFormation(properties.indexName),ReadOnDemandThroughputSettings:convertCfnGlobalTableReadOnDemandThroughputSettingsPropertyToCloudFormation(properties.readOnDemandThroughputSettings),ReadProvisionedThroughputSettings:convertCfnGlobalTableReadProvisionedThroughputSettingsPropertyToCloudFormation(properties.readProvisionedThroughputSettings)}):properties}function CfnGlobalTableReplicaGlobalSecondaryIndexSpecificationPropertyFromCloudFormation(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("contributorInsightsSpecification","ContributorInsightsSpecification",properties.ContributorInsightsSpecification!=null?CfnGlobalTableContributorInsightsSpecificationPropertyFromCloudFormation(properties.ContributorInsightsSpecification):void 0),ret.addPropertyResult("indexName","IndexName",properties.IndexName!=null?cfn_parse().FromCloudFormation.getString(properties.IndexName):void 0),ret.addPropertyResult("readOnDemandThroughputSettings","ReadOnDemandThroughputSettings",properties.ReadOnDemandThroughputSettings!=null?CfnGlobalTableReadOnDemandThroughputSettingsPropertyFromCloudFormation(properties.ReadOnDemandThroughputSettings):void 0),ret.addPropertyResult("readProvisionedThroughputSettings","ReadProvisionedThroughputSettings",properties.ReadProvisionedThroughputSettings!=null?CfnGlobalTableReadProvisionedThroughputSettingsPropertyFromCloudFormation(properties.ReadProvisionedThroughputSettings):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTablePointInTimeRecoverySpecificationPropertyValidator(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("pointInTimeRecoveryEnabled",cdk().validateBoolean)(properties.pointInTimeRecoveryEnabled)),errors.collect(cdk().propertyValidator("recoveryPeriodInDays",cdk().validateNumber)(properties.recoveryPeriodInDays)),errors.wrap('supplied properties not correct for "PointInTimeRecoverySpecificationProperty"')}function convertCfnGlobalTablePointInTimeRecoverySpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTablePointInTimeRecoverySpecificationPropertyValidator(properties).assertSuccess(),{PointInTimeRecoveryEnabled:cdk().booleanToCloudFormation(properties.pointInTimeRecoveryEnabled),RecoveryPeriodInDays:cdk().numberToCloudFormation(properties.recoveryPeriodInDays)}):properties}function CfnGlobalTablePointInTimeRecoverySpecificationPropertyFromCloudFormation(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("pointInTimeRecoveryEnabled","PointInTimeRecoveryEnabled",properties.PointInTimeRecoveryEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.PointInTimeRecoveryEnabled):void 0),ret.addPropertyResult("recoveryPeriodInDays","RecoveryPeriodInDays",properties.RecoveryPeriodInDays!=null?cfn_parse().FromCloudFormation.getNumber(properties.RecoveryPeriodInDays):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableResourcePolicyPropertyValidator(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("policyDocument",cdk().requiredValidator)(properties.policyDocument)),errors.collect(cdk().propertyValidator("policyDocument",cdk().validateObject)(properties.policyDocument)),errors.wrap('supplied properties not correct for "ResourcePolicyProperty"')}function convertCfnGlobalTableResourcePolicyPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableResourcePolicyPropertyValidator(properties).assertSuccess(),{PolicyDocument:cdk().objectToCloudFormation(properties.policyDocument)}):properties}function CfnGlobalTableResourcePolicyPropertyFromCloudFormation(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("policyDocument","PolicyDocument",properties.PolicyDocument!=null?cfn_parse().FromCloudFormation.getAny(properties.PolicyDocument):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableReplicaStreamSpecificationPropertyValidator(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",CfnGlobalTableResourcePolicyPropertyValidator)(properties.resourcePolicy)),errors.wrap('supplied properties not correct for "ReplicaStreamSpecificationProperty"')}function convertCfnGlobalTableReplicaStreamSpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableReplicaStreamSpecificationPropertyValidator(properties).assertSuccess(),{ResourcePolicy:convertCfnGlobalTableResourcePolicyPropertyToCloudFormation(properties.resourcePolicy)}):properties}function CfnGlobalTableReplicaStreamSpecificationPropertyFromCloudFormation(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?CfnGlobalTableResourcePolicyPropertyFromCloudFormation(properties.ResourcePolicy):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableReplicaSpecificationPropertyValidator(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("contributorInsightsSpecification",CfnGlobalTableContributorInsightsSpecificationPropertyValidator)(properties.contributorInsightsSpecification)),errors.collect(cdk().propertyValidator("deletionProtectionEnabled",cdk().validateBoolean)(properties.deletionProtectionEnabled)),errors.collect(cdk().propertyValidator("globalSecondaryIndexes",cdk().listValidator(CfnGlobalTableReplicaGlobalSecondaryIndexSpecificationPropertyValidator))(properties.globalSecondaryIndexes)),errors.collect(cdk().propertyValidator("kinesisStreamSpecification",CfnGlobalTableKinesisStreamSpecificationPropertyValidator)(properties.kinesisStreamSpecification)),errors.collect(cdk().propertyValidator("pointInTimeRecoverySpecification",CfnGlobalTablePointInTimeRecoverySpecificationPropertyValidator)(properties.pointInTimeRecoverySpecification)),errors.collect(cdk().propertyVal