aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 33.7 kB
JavaScript
"use strict";var _a,_b,_c;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnStreamProcessor=exports.CfnProject=exports.CfnCollection=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 CfnCollection extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnCollectionPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnCollection(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:CfnCollection.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_rekognition_CfnCollectionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnCollection),error}cdk().requireProperty(props,"collectionId",this),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.collectionId=props.collectionId,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::Rekognition::Collection",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags}get cfnProperties(){return{collectionId:this.collectionId,tags:this.tags.renderTags()}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnCollection.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnCollectionPropsToCloudFormation(props)}}exports.CfnCollection=CfnCollection,_a=JSII_RTTI_SYMBOL_1,CfnCollection[_a]={fqn:"aws-cdk-lib.aws_rekognition.CfnCollection",version:"2.185.0"},CfnCollection.CFN_RESOURCE_TYPE_NAME="AWS::Rekognition::Collection";function CfnCollectionPropsValidator(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("collectionId",cdk().requiredValidator)(properties.collectionId)),errors.collect(cdk().propertyValidator("collectionId",cdk().validateString)(properties.collectionId)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnCollectionProps"')}function convertCfnCollectionPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCollectionPropsValidator(properties).assertSuccess(),{CollectionId:cdk().stringToCloudFormation(properties.collectionId),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnCollectionPropsFromCloudFormation(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("collectionId","CollectionId",properties.CollectionId!=null?cfn_parse().FromCloudFormation.getString(properties.CollectionId):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnProject extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnProjectPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnProject(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:CfnProject.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_rekognition_CfnProjectProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnProject),error}cdk().requireProperty(props,"projectName",this),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.projectName=props.projectName}get cfnProperties(){return{projectName:this.projectName}}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",CfnProject.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnProjectPropsToCloudFormation(props)}}exports.CfnProject=CfnProject,_b=JSII_RTTI_SYMBOL_1,CfnProject[_b]={fqn:"aws-cdk-lib.aws_rekognition.CfnProject",version:"2.185.0"},CfnProject.CFN_RESOURCE_TYPE_NAME="AWS::Rekognition::Project";function CfnProjectPropsValidator(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("projectName",cdk().requiredValidator)(properties.projectName)),errors.collect(cdk().propertyValidator("projectName",cdk().validateString)(properties.projectName)),errors.wrap('supplied properties not correct for "CfnProjectProps"')}function convertCfnProjectPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnProjectPropsValidator(properties).assertSuccess(),{ProjectName:cdk().stringToCloudFormation(properties.projectName)}):properties}function CfnProjectPropsFromCloudFormation(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("projectName","ProjectName",properties.ProjectName!=null?cfn_parse().FromCloudFormation.getString(properties.ProjectName):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnStreamProcessor extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnStreamProcessorPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnStreamProcessor(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:CfnStreamProcessor.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_rekognition_CfnStreamProcessorProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnStreamProcessor),error}cdk().requireProperty(props,"kinesisVideoStream",this),cdk().requireProperty(props,"roleArn",this),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrStatus=cdk().Token.asString(this.getAtt("Status",cdk().ResolutionTypeHint.STRING)),this.attrStatusMessage=cdk().Token.asString(this.getAtt("StatusMessage",cdk().ResolutionTypeHint.STRING)),this.boundingBoxRegionsOfInterest=props.boundingBoxRegionsOfInterest,this.connectedHomeSettings=props.connectedHomeSettings,this.dataSharingPreference=props.dataSharingPreference,this.faceSearchSettings=props.faceSearchSettings,this.kinesisDataStream=props.kinesisDataStream,this.kinesisVideoStream=props.kinesisVideoStream,this.kmsKeyId=props.kmsKeyId,this.name=props.name,this.notificationChannel=props.notificationChannel,this.polygonRegionsOfInterest=props.polygonRegionsOfInterest,this.roleArn=props.roleArn,this.s3Destination=props.s3Destination,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::Rekognition::StreamProcessor",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags}get cfnProperties(){return{boundingBoxRegionsOfInterest:this.boundingBoxRegionsOfInterest,connectedHomeSettings:this.connectedHomeSettings,dataSharingPreference:this.dataSharingPreference,faceSearchSettings:this.faceSearchSettings,kinesisDataStream:this.kinesisDataStream,kinesisVideoStream:this.kinesisVideoStream,kmsKeyId:this.kmsKeyId,name:this.name,notificationChannel:this.notificationChannel,polygonRegionsOfInterest:this.polygonRegionsOfInterest,roleArn:this.roleArn,s3Destination:this.s3Destination,tags:this.tags.renderTags()}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnStreamProcessor.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnStreamProcessorPropsToCloudFormation(props)}}exports.CfnStreamProcessor=CfnStreamProcessor,_c=JSII_RTTI_SYMBOL_1,CfnStreamProcessor[_c]={fqn:"aws-cdk-lib.aws_rekognition.CfnStreamProcessor",version:"2.185.0"},CfnStreamProcessor.CFN_RESOURCE_TYPE_NAME="AWS::Rekognition::StreamProcessor";function CfnStreamProcessorS3DestinationPropertyValidator(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("bucketName",cdk().requiredValidator)(properties.bucketName)),errors.collect(cdk().propertyValidator("bucketName",cdk().validateString)(properties.bucketName)),errors.collect(cdk().propertyValidator("objectKeyPrefix",cdk().validateString)(properties.objectKeyPrefix)),errors.wrap('supplied properties not correct for "S3DestinationProperty"')}function convertCfnStreamProcessorS3DestinationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnStreamProcessorS3DestinationPropertyValidator(properties).assertSuccess(),{BucketName:cdk().stringToCloudFormation(properties.bucketName),ObjectKeyPrefix:cdk().stringToCloudFormation(properties.objectKeyPrefix)}):properties}function CfnStreamProcessorS3DestinationPropertyFromCloudFormation(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("bucketName","BucketName",properties.BucketName!=null?cfn_parse().FromCloudFormation.getString(properties.BucketName):void 0),ret.addPropertyResult("objectKeyPrefix","ObjectKeyPrefix",properties.ObjectKeyPrefix!=null?cfn_parse().FromCloudFormation.getString(properties.ObjectKeyPrefix):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnStreamProcessorDataSharingPreferencePropertyValidator(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("optIn",cdk().requiredValidator)(properties.optIn)),errors.collect(cdk().propertyValidator("optIn",cdk().validateBoolean)(properties.optIn)),errors.wrap('supplied properties not correct for "DataSharingPreferenceProperty"')}function convertCfnStreamProcessorDataSharingPreferencePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnStreamProcessorDataSharingPreferencePropertyValidator(properties).assertSuccess(),{OptIn:cdk().booleanToCloudFormation(properties.optIn)}):properties}function CfnStreamProcessorDataSharingPreferencePropertyFromCloudFormation(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("optIn","OptIn",properties.OptIn!=null?cfn_parse().FromCloudFormation.getBoolean(properties.OptIn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnStreamProcessorFaceSearchSettingsPropertyValidator(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("collectionId",cdk().requiredValidator)(properties.collectionId)),errors.collect(cdk().propertyValidator("collectionId",cdk().validateString)(properties.collectionId)),errors.collect(cdk().propertyValidator("faceMatchThreshold",cdk().validateNumber)(properties.faceMatchThreshold)),errors.wrap('supplied properties not correct for "FaceSearchSettingsProperty"')}function convertCfnStreamProcessorFaceSearchSettingsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnStreamProcessorFaceSearchSettingsPropertyValidator(properties).assertSuccess(),{CollectionId:cdk().stringToCloudFormation(properties.collectionId),FaceMatchThreshold:cdk().numberToCloudFormation(properties.faceMatchThreshold)}):properties}function CfnStreamProcessorFaceSearchSettingsPropertyFromCloudFormation(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("collectionId","CollectionId",properties.CollectionId!=null?cfn_parse().FromCloudFormation.getString(properties.CollectionId):void 0),ret.addPropertyResult("faceMatchThreshold","FaceMatchThreshold",properties.FaceMatchThreshold!=null?cfn_parse().FromCloudFormation.getNumber(properties.FaceMatchThreshold):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnStreamProcessorPointPropertyValidator(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("x",cdk().requiredValidator)(properties.x)),errors.collect(cdk().propertyValidator("x",cdk().validateNumber)(properties.x)),errors.collect(cdk().propertyValidator("y",cdk().requiredValidator)(properties.y)),errors.collect(cdk().propertyValidator("y",cdk().validateNumber)(properties.y)),errors.wrap('supplied properties not correct for "PointProperty"')}function convertCfnStreamProcessorPointPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnStreamProcessorPointPropertyValidator(properties).assertSuccess(),{X:cdk().numberToCloudFormation(properties.x),Y:cdk().numberToCloudFormation(properties.y)}):properties}function CfnStreamProcessorPointPropertyFromCloudFormation(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("x","X",properties.X!=null?cfn_parse().FromCloudFormation.getNumber(properties.X):void 0),ret.addPropertyResult("y","Y",properties.Y!=null?cfn_parse().FromCloudFormation.getNumber(properties.Y):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnStreamProcessorConnectedHomeSettingsPropertyValidator(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("labels",cdk().requiredValidator)(properties.labels)),errors.collect(cdk().propertyValidator("labels",cdk().listValidator(cdk().validateString))(properties.labels)),errors.collect(cdk().propertyValidator("minConfidence",cdk().validateNumber)(properties.minConfidence)),errors.wrap('supplied properties not correct for "ConnectedHomeSettingsProperty"')}function convertCfnStreamProcessorConnectedHomeSettingsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnStreamProcessorConnectedHomeSettingsPropertyValidator(properties).assertSuccess(),{Labels:cdk().listMapper(cdk().stringToCloudFormation)(properties.labels),MinConfidence:cdk().numberToCloudFormation(properties.minConfidence)}):properties}function CfnStreamProcessorConnectedHomeSettingsPropertyFromCloudFormation(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("labels","Labels",properties.Labels!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.Labels):void 0),ret.addPropertyResult("minConfidence","MinConfidence",properties.MinConfidence!=null?cfn_parse().FromCloudFormation.getNumber(properties.MinConfidence):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnStreamProcessorNotificationChannelPropertyValidator(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("arn",cdk().requiredValidator)(properties.arn)),errors.collect(cdk().propertyValidator("arn",cdk().validateString)(properties.arn)),errors.wrap('supplied properties not correct for "NotificationChannelProperty"')}function convertCfnStreamProcessorNotificationChannelPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnStreamProcessorNotificationChannelPropertyValidator(properties).assertSuccess(),{Arn:cdk().stringToCloudFormation(properties.arn)}):properties}function CfnStreamProcessorNotificationChannelPropertyFromCloudFormation(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("arn","Arn",properties.Arn!=null?cfn_parse().FromCloudFormation.getString(properties.Arn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnStreamProcessorKinesisVideoStreamPropertyValidator(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("arn",cdk().requiredValidator)(properties.arn)),errors.collect(cdk().propertyValidator("arn",cdk().validateString)(properties.arn)),errors.wrap('supplied properties not correct for "KinesisVideoStreamProperty"')}function convertCfnStreamProcessorKinesisVideoStreamPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnStreamProcessorKinesisVideoStreamPropertyValidator(properties).assertSuccess(),{Arn:cdk().stringToCloudFormation(properties.arn)}):properties}function CfnStreamProcessorKinesisVideoStreamPropertyFromCloudFormation(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("arn","Arn",properties.Arn!=null?cfn_parse().FromCloudFormation.getString(properties.Arn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnStreamProcessorBoundingBoxPropertyValidator(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("height",cdk().requiredValidator)(properties.height)),errors.collect(cdk().propertyValidator("height",cdk().validateNumber)(properties.height)),errors.collect(cdk().propertyValidator("left",cdk().requiredValidator)(properties.left)),errors.collect(cdk().propertyValidator("left",cdk().validateNumber)(properties.left)),errors.collect(cdk().propertyValidator("top",cdk().requiredValidator)(properties.top)),errors.collect(cdk().propertyValidator("top",cdk().validateNumber)(properties.top)),errors.collect(cdk().propertyValidator("width",cdk().requiredValidator)(properties.width)),errors.collect(cdk().propertyValidator("width",cdk().validateNumber)(properties.width)),errors.wrap('supplied properties not correct for "BoundingBoxProperty"')}function convertCfnStreamProcessorBoundingBoxPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnStreamProcessorBoundingBoxPropertyValidator(properties).assertSuccess(),{Height:cdk().numberToCloudFormation(properties.height),Left:cdk().numberToCloudFormation(properties.left),Top:cdk().numberToCloudFormation(properties.top),Width:cdk().numberToCloudFormation(properties.width)}):properties}function CfnStreamProcessorBoundingBoxPropertyFromCloudFormation(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("height","Height",properties.Height!=null?cfn_parse().FromCloudFormation.getNumber(properties.Height):void 0),ret.addPropertyResult("left","Left",properties.Left!=null?cfn_parse().FromCloudFormation.getNumber(properties.Left):void 0),ret.addPropertyResult("top","Top",properties.Top!=null?cfn_parse().FromCloudFormation.getNumber(properties.Top):void 0),ret.addPropertyResult("width","Width",properties.Width!=null?cfn_parse().FromCloudFormation.getNumber(properties.Width):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnStreamProcessorKinesisDataStreamPropertyValidator(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("arn",cdk().requiredValidator)(properties.arn)),errors.collect(cdk().propertyValidator("arn",cdk().validateString)(properties.arn)),errors.wrap('supplied properties not correct for "KinesisDataStreamProperty"')}function convertCfnStreamProcessorKinesisDataStreamPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnStreamProcessorKinesisDataStreamPropertyValidator(properties).assertSuccess(),{Arn:cdk().stringToCloudFormation(properties.arn)}):properties}function CfnStreamProcessorKinesisDataStreamPropertyFromCloudFormation(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("arn","Arn",properties.Arn!=null?cfn_parse().FromCloudFormation.getString(properties.Arn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnStreamProcessorPropsValidator(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("boundingBoxRegionsOfInterest",cdk().listValidator(CfnStreamProcessorBoundingBoxPropertyValidator))(properties.boundingBoxRegionsOfInterest)),errors.collect(cdk().propertyValidator("connectedHomeSettings",CfnStreamProcessorConnectedHomeSettingsPropertyValidator)(properties.connectedHomeSettings)),errors.collect(cdk().propertyValidator("dataSharingPreference",CfnStreamProcessorDataSharingPreferencePropertyValidator)(properties.dataSharingPreference)),errors.collect(cdk().propertyValidator("faceSearchSettings",CfnStreamProcessorFaceSearchSettingsPropertyValidator)(properties.faceSearchSettings)),errors.collect(cdk().propertyValidator("kinesisDataStream",CfnStreamProcessorKinesisDataStreamPropertyValidator)(properties.kinesisDataStream)),errors.collect(cdk().propertyValidator("kinesisVideoStream",cdk().requiredValidator)(properties.kinesisVideoStream)),errors.collect(cdk().propertyValidator("kinesisVideoStream",CfnStreamProcessorKinesisVideoStreamPropertyValidator)(properties.kinesisVideoStream)),errors.collect(cdk().propertyValidator("kmsKeyId",cdk().validateString)(properties.kmsKeyId)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("notificationChannel",CfnStreamProcessorNotificationChannelPropertyValidator)(properties.notificationChannel)),errors.collect(cdk().propertyValidator("polygonRegionsOfInterest",cdk().validateObject)(properties.polygonRegionsOfInterest)),errors.collect(cdk().propertyValidator("roleArn",cdk().requiredValidator)(properties.roleArn)),errors.collect(cdk().propertyValidator("roleArn",cdk().validateString)(properties.roleArn)),errors.collect(cdk().propertyValidator("s3Destination",CfnStreamProcessorS3DestinationPropertyValidator)(properties.s3Destination)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnStreamProcessorProps"')}function convertCfnStreamProcessorPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnStreamProcessorPropsValidator(properties).assertSuccess(),{BoundingBoxRegionsOfInterest:cdk().listMapper(convertCfnStreamProcessorBoundingBoxPropertyToCloudFormation)(properties.boundingBoxRegionsOfInterest),ConnectedHomeSettings:convertCfnStreamProcessorConnectedHomeSettingsPropertyToCloudFormation(properties.connectedHomeSettings),DataSharingPreference:convertCfnStreamProcessorDataSharingPreferencePropertyToCloudFormation(properties.dataSharingPreference),FaceSearchSettings:convertCfnStreamProcessorFaceSearchSettingsPropertyToCloudFormation(properties.faceSearchSettings),KinesisDataStream:convertCfnStreamProcessorKinesisDataStreamPropertyToCloudFormation(properties.kinesisDataStream),KinesisVideoStream:convertCfnStreamProcessorKinesisVideoStreamPropertyToCloudFormation(properties.kinesisVideoStream),KmsKeyId:cdk().stringToCloudFormation(properties.kmsKeyId),Name:cdk().stringToCloudFormation(properties.name),NotificationChannel:convertCfnStreamProcessorNotificationChannelPropertyToCloudFormation(properties.notificationChannel),PolygonRegionsOfInterest:cdk().objectToCloudFormation(properties.polygonRegionsOfInterest),RoleArn:cdk().stringToCloudFormation(properties.roleArn),S3Destination:convertCfnStreamProcessorS3DestinationPropertyToCloudFormation(properties.s3Destination),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnStreamProcessorPropsFromCloudFormation(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("boundingBoxRegionsOfInterest","BoundingBoxRegionsOfInterest",properties.BoundingBoxRegionsOfInterest!=null?cfn_parse().FromCloudFormation.getArray(CfnStreamProcessorBoundingBoxPropertyFromCloudFormation)(properties.BoundingBoxRegionsOfInterest):void 0),ret.addPropertyResult("connectedHomeSettings","ConnectedHomeSettings",properties.ConnectedHomeSettings!=null?CfnStreamProcessorConnectedHomeSettingsPropertyFromCloudFormation(properties.ConnectedHomeSettings):void 0),ret.addPropertyResult("dataSharingPreference","DataSharingPreference",properties.DataSharingPreference!=null?CfnStreamProcessorDataSharingPreferencePropertyFromCloudFormation(properties.DataSharingPreference):void 0),ret.addPropertyResult("faceSearchSettings","FaceSearchSettings",properties.FaceSearchSettings!=null?CfnStreamProcessorFaceSearchSettingsPropertyFromCloudFormation(properties.FaceSearchSettings):void 0),ret.addPropertyResult("kinesisDataStream","KinesisDataStream",properties.KinesisDataStream!=null?CfnStreamProcessorKinesisDataStreamPropertyFromCloudFormation(properties.KinesisDataStream):void 0),ret.addPropertyResult("kinesisVideoStream","KinesisVideoStream",properties.KinesisVideoStream!=null?CfnStreamProcessorKinesisVideoStreamPropertyFromCloudFormation(properties.KinesisVideoStream):void 0),ret.addPropertyResult("kmsKeyId","KmsKeyId",properties.KmsKeyId!=null?cfn_parse().FromCloudFormation.getString(properties.KmsKeyId):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("notificationChannel","NotificationChannel",properties.NotificationChannel!=null?CfnStreamProcessorNotificationChannelPropertyFromCloudFormation(properties.NotificationChannel):void 0),ret.addPropertyResult("polygonRegionsOfInterest","PolygonRegionsOfInterest",properties.PolygonRegionsOfInterest!=null?cfn_parse().FromCloudFormation.getAny(properties.PolygonRegionsOfInterest):void 0),ret.addPropertyResult("roleArn","RoleArn",properties.RoleArn!=null?cfn_parse().FromCloudFormation.getString(properties.RoleArn):void 0),ret.addPropertyResult("s3Destination","S3Destination",properties.S3Destination!=null?CfnStreamProcessorS3DestinationPropertyFromCloudFormation(properties.S3Destination):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}