aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
1 lines • 98 kB
JavaScript
"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};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 Error("Unexpected IResolvable");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.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,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.130.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 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("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),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("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 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("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),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("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.wrap('supplied properties not correct for "PointInTimeRecoverySpecificationProperty"')}function convertCfnGlobalTablePointInTimeRecoverySpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTablePointInTimeRecoverySpecificationPropertyValidator(properties).assertSuccess(),{PointInTimeRecoveryEnabled:cdk().booleanToCloudFormation(properties.pointInTimeRecoveryEnabled)}):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.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().propertyValidator("readProvisionedThroughputSettings",CfnGlobalTableReadProvisionedThroughputSettingsPropertyValidator)(properties.readProvisionedThroughputSettings)),errors.collect(cdk().propertyValidator("region",cdk().requiredValidator)(properties.region)),errors.collect(cdk().propertyValidator("region",cdk().validateString)(properties.region)),errors.collect(cdk().propertyValidator("sseSpecification",CfnGlobalTableReplicaSSESpecificationPropertyValidator)(properties.sseSpecification)),errors.collect(cdk().propertyValidator("tableClass",cdk().validateString)(properties.tableClass)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "ReplicaSpecificationProperty"')}function convertCfnGlobalTableReplicaSpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableReplicaSpecificationPropertyValidator(properties).assertSuccess(),{ContributorInsightsSpecification:convertCfnGlobalTableContributorInsightsSpecificationPropertyToCloudFormation(properties.contributorInsightsSpecification),DeletionProtectionEnabled:cdk().booleanToCloudFormation(properties.deletionProtectionEnabled),GlobalSecondaryIndexes:cdk().listMapper(convertCfnGlobalTableReplicaGlobalSecondaryIndexSpecificationPropertyToCloudFormation)(properties.globalSecondaryIndexes),KinesisStreamSpecification:convertCfnGlobalTableKinesisStreamSpecificationPropertyToCloudFormation(properties.kinesisStreamSpecification),PointInTimeRecoverySpecification:convertCfnGlobalTablePointInTimeRecoverySpecificationPropertyToCloudFormation(properties.pointInTimeRecoverySpecification),ReadProvisionedThroughputSettings:convertCfnGlobalTableReadProvisionedThroughputSettingsPropertyToCloudFormation(properties.readProvisionedThroughputSettings),Region:cdk().stringToCloudFormation(properties.region),SSESpecification:convertCfnGlobalTableReplicaSSESpecificationPropertyToCloudFormation(properties.sseSpecification),TableClass:cdk().stringToCloudFormation(properties.tableClass),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnGlobalTableReplicaSpecificationPropertyFromCloudFormation(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("deletionProtectionEnabled","DeletionProtectionEnabled",properties.DeletionProtectionEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.DeletionProtectionEnabled):void 0),ret.addPropertyResult("globalSecondaryIndexes","GlobalSecondaryIndexes",properties.GlobalSecondaryIndexes!=null?cfn_parse().FromCloudFormation.getArray(CfnGlobalTableReplicaGlobalSecondaryIndexSpecificationPropertyFromCloudFormation)(properties.GlobalSecondaryIndexes):void 0),ret.addPropertyResult("kinesisStreamSpecification","KinesisStreamSpecification",properties.KinesisStreamSpecification!=null?CfnGlobalTableKinesisStreamSpecificationPropertyFromCloudFormation(properties.KinesisStreamSpecification):void 0),ret.addPropertyResult("pointInTimeRecoverySpecification","PointInTimeRecoverySpecification",properties.PointInTimeRecoverySpecification!=null?CfnGlobalTablePointInTimeRecoverySpecificationPropertyFromCloudFormation(properties.PointInTimeRecoverySpecification):void 0),ret.addPropertyResult("readProvisionedThroughputSettings","ReadProvisionedThroughputSettings",properties.ReadProvisionedThroughputSettings!=null?CfnGlobalTableReadProvisionedThroughputSettingsPropertyFromCloudFormation(properties.ReadProvisionedThroughputSettings):void 0),ret.addPropertyResult("region","Region",properties.Region!=null?cfn_parse().FromCloudFormation.getString(properties.Region):void 0),ret.addPropertyResult("sseSpecification","SSESpecification",properties.SSESpecification!=null?CfnGlobalTableReplicaSSESpecificationPropertyFromCloudFormation(properties.SSESpecification):void 0),ret.addPropertyResult("tableClass","TableClass",properties.TableClass!=null?cfn_parse().FromCloudFormation.getString(properties.TableClass):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTableTimeToLiveSpecificationPropertyValidator(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().validateString)(properties.attributeName)),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 "TimeToLiveSpecificationProperty"')}function convertCfnGlobalTableTimeToLiveSpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTableTimeToLiveSpecificationPropertyValidator(properties).assertSuccess(),{AttributeName:cdk().stringToCloudFormation(properties.attributeName),Enabled:cdk().booleanToCloudFormation(properties.enabled)}):properties}function CfnGlobalTableTimeToLiveSpecificationPropertyFromCloudFormation(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("enabled","Enabled",properties.Enabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.Enabled):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGlobalTablePropsValidator(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("attributeDefinitions",cdk().requiredValidator)(properties.attributeDefinitions)),errors.collect(cdk().propertyValidator("attributeDefinitions",cdk().listValidator(CfnGlobalTableAttributeDefinitionPropertyValidator))(properties.attributeDefinitions)),errors.collect(cdk().propertyValidator("billingMode",cdk().validateString)(properties.billingMode)),errors.collect(cdk().propertyValidator("globalSecondaryIndexes",cdk().listValidator(CfnGlobalTableGlobalSecondaryIndexPropertyValidator))(properties.globalSecondaryIndexes)),errors.collect(cdk().propertyValidator("keySchema",cdk().requiredValidator)(properties.keySchema)),errors.collect(cdk().propertyValidator("keySchema",cdk().listValidator(CfnGlobalTableKeySchemaPropertyValidator))(properties.keySchema)),errors.collect(cdk().propertyValidator("localSecondaryIndexes",cdk().listValidator(CfnGlobalTableLocalSecondaryIndexPropertyValidator))(properties.localSecondaryIndexes)),errors.collect(cdk().propertyValidator("replicas",cdk().requiredValidator)(properties.replicas)),errors.collect(cdk().propertyValidator("replicas",cdk().listValidator(CfnGlobalTableReplicaSpecificationPropertyValidator))(properties.replicas)),errors.collect(cdk().propertyValidator("sseSpecification",CfnGlobalTableSSESpecificationPropertyValidator)(properties.sseSpecification)),errors.collect(cdk().propertyValidator("streamSpecification",CfnGlobalTableStreamSpecificationPropertyValidator)(properties.streamSpecification)),errors.collect(cdk().propertyValidator("tableName",cdk().validateString)(properties.tableName)),errors.collect(cdk().propertyValidator("timeToLiveSpecification",CfnGlobalTableTimeToLiveSpecificationPropertyValidator)(properties.timeToLiveSpecification)),errors.collect(cdk().propertyValidator("writeProvisionedThroughputSettings",CfnGlobalTableWriteProvisionedThroughputSettingsPropertyValidator)(properties.writeProvisionedThroughputSettings)),errors.wrap('supplied properties not correct for "CfnGlobalTableProps"')}function convertCfnGlobalTablePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnGlobalTablePropsValidator(properties).assertSuccess(),{AttributeDefinitions:cdk().listMapper(convertCfnGlobalTableAttributeDefinitionPropertyToCloudFormation)(properties.attributeDefinitions),BillingMode:cdk().stringToCloudFormation(properties.billingMode),GlobalSecondaryIndexes:cdk().listMapper(convertCfnGlobalTableGlobalSecondaryIndexPropertyToCloudFormation)(properties.globalSecondaryIndexes),KeySchema:cdk().listMapper(convertCfnGlobalTableKeySchemaPropertyToCloudFormation)(properties.keySchema),LocalSecondaryIndexes:cdk().listMapper(convertCfnGlobalTableLocalSecondaryIndexPropertyToCloudFormation)(properties.localSecondaryIndexes),Replicas:cdk().listMapper(convertCfnGlobalTableReplicaSpecificationPropertyToCloudFormation)(properties.replicas),SSESpecification:convertCfnGlobalTableSSESpecificationPropertyToCloudFormation(properties.sseSpecification),StreamSpecification:convertCfnGlobalTableStreamSpecificationPropertyToCloudFormation(properties.streamSpecification),TableName:cdk().stringToCloudFormation(properties.tableName),TimeToLiveSpecification:convertCfnGlobalTableTimeToLiveSpecificationPropertyToCloudFormation(properties.timeToLiveSpecification),WriteProvisionedThroughputSettings:convertCfnGlobalTableWriteProvisionedThroughputSettingsPropertyToCloudFormation(properties.writeProvisionedThroughputSettings)}):properties}function CfnGlobalTablePropsFromCloudFormation(properties){if(cdk().isReso