aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
1 lines • 63.2 kB
JavaScript
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnCampaign=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 CfnCampaign extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnCampaignPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnCampaign(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:CfnCampaign.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_connectcampaignsv2_CfnCampaignProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnCampaign),error}cdk().requireProperty(props,"channelSubtypeConfig",this),cdk().requireProperty(props,"connectInstanceId",this),cdk().requireProperty(props,"name",this),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::ConnectCampaignsV2::Campaign",void 0,{tagPropertyName:"tags"}),this.channelSubtypeConfig=props.channelSubtypeConfig,this.communicationLimitsOverride=props.communicationLimitsOverride,this.communicationTimeConfig=props.communicationTimeConfig,this.connectCampaignFlowArn=props.connectCampaignFlowArn,this.connectInstanceId=props.connectInstanceId,this.name=props.name,this.schedule=props.schedule,this.source=props.source,this.tags=props.tags}get cfnProperties(){return{tags:this.cdkTagManager.renderTags(this.tags),channelSubtypeConfig:this.channelSubtypeConfig,communicationLimitsOverride:this.communicationLimitsOverride,communicationTimeConfig:this.communicationTimeConfig,connectCampaignFlowArn:this.connectCampaignFlowArn,connectInstanceId:this.connectInstanceId,name:this.name,schedule:this.schedule,source:this.source}}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",CfnCampaign.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnCampaignPropsToCloudFormation(props)}}exports.CfnCampaign=CfnCampaign,_a=JSII_RTTI_SYMBOL_1,CfnCampaign[_a]={fqn:"aws-cdk-lib.aws_connectcampaignsv2.CfnCampaign",version:"2.202.0"},CfnCampaign.CFN_RESOURCE_TYPE_NAME="AWS::ConnectCampaignsV2::Campaign";function CfnCampaignProgressiveConfigPropertyValidator(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("bandwidthAllocation",cdk().requiredValidator)(properties.bandwidthAllocation)),errors.collect(cdk().propertyValidator("bandwidthAllocation",cdk().validateNumber)(properties.bandwidthAllocation)),errors.wrap('supplied properties not correct for "ProgressiveConfigProperty"')}function convertCfnCampaignProgressiveConfigPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignProgressiveConfigPropertyValidator(properties).assertSuccess(),{BandwidthAllocation:cdk().numberToCloudFormation(properties.bandwidthAllocation)}):properties}function CfnCampaignProgressiveConfigPropertyFromCloudFormation(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("bandwidthAllocation","BandwidthAllocation",properties.BandwidthAllocation!=null?cfn_parse().FromCloudFormation.getNumber(properties.BandwidthAllocation):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignPredictiveConfigPropertyValidator(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("bandwidthAllocation",cdk().requiredValidator)(properties.bandwidthAllocation)),errors.collect(cdk().propertyValidator("bandwidthAllocation",cdk().validateNumber)(properties.bandwidthAllocation)),errors.wrap('supplied properties not correct for "PredictiveConfigProperty"')}function convertCfnCampaignPredictiveConfigPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignPredictiveConfigPropertyValidator(properties).assertSuccess(),{BandwidthAllocation:cdk().numberToCloudFormation(properties.bandwidthAllocation)}):properties}function CfnCampaignPredictiveConfigPropertyFromCloudFormation(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("bandwidthAllocation","BandwidthAllocation",properties.BandwidthAllocation!=null?cfn_parse().FromCloudFormation.getNumber(properties.BandwidthAllocation):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignTelephonyOutboundModePropertyValidator(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("agentlessConfig",cdk().validateObject)(properties.agentlessConfig)),errors.collect(cdk().propertyValidator("predictiveConfig",CfnCampaignPredictiveConfigPropertyValidator)(properties.predictiveConfig)),errors.collect(cdk().propertyValidator("progressiveConfig",CfnCampaignProgressiveConfigPropertyValidator)(properties.progressiveConfig)),errors.wrap('supplied properties not correct for "TelephonyOutboundModeProperty"')}function convertCfnCampaignTelephonyOutboundModePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignTelephonyOutboundModePropertyValidator(properties).assertSuccess(),{AgentlessConfig:cdk().objectToCloudFormation(properties.agentlessConfig),PredictiveConfig:convertCfnCampaignPredictiveConfigPropertyToCloudFormation(properties.predictiveConfig),ProgressiveConfig:convertCfnCampaignProgressiveConfigPropertyToCloudFormation(properties.progressiveConfig)}):properties}function CfnCampaignTelephonyOutboundModePropertyFromCloudFormation(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("agentlessConfig","AgentlessConfig",properties.AgentlessConfig!=null?cfn_parse().FromCloudFormation.getAny(properties.AgentlessConfig):void 0),ret.addPropertyResult("predictiveConfig","PredictiveConfig",properties.PredictiveConfig!=null?CfnCampaignPredictiveConfigPropertyFromCloudFormation(properties.PredictiveConfig):void 0),ret.addPropertyResult("progressiveConfig","ProgressiveConfig",properties.ProgressiveConfig!=null?CfnCampaignProgressiveConfigPropertyFromCloudFormation(properties.ProgressiveConfig):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignAnswerMachineDetectionConfigPropertyValidator(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("awaitAnswerMachinePrompt",cdk().validateBoolean)(properties.awaitAnswerMachinePrompt)),errors.collect(cdk().propertyValidator("enableAnswerMachineDetection",cdk().requiredValidator)(properties.enableAnswerMachineDetection)),errors.collect(cdk().propertyValidator("enableAnswerMachineDetection",cdk().validateBoolean)(properties.enableAnswerMachineDetection)),errors.wrap('supplied properties not correct for "AnswerMachineDetectionConfigProperty"')}function convertCfnCampaignAnswerMachineDetectionConfigPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignAnswerMachineDetectionConfigPropertyValidator(properties).assertSuccess(),{AwaitAnswerMachinePrompt:cdk().booleanToCloudFormation(properties.awaitAnswerMachinePrompt),EnableAnswerMachineDetection:cdk().booleanToCloudFormation(properties.enableAnswerMachineDetection)}):properties}function CfnCampaignAnswerMachineDetectionConfigPropertyFromCloudFormation(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("awaitAnswerMachinePrompt","AwaitAnswerMachinePrompt",properties.AwaitAnswerMachinePrompt!=null?cfn_parse().FromCloudFormation.getBoolean(properties.AwaitAnswerMachinePrompt):void 0),ret.addPropertyResult("enableAnswerMachineDetection","EnableAnswerMachineDetection",properties.EnableAnswerMachineDetection!=null?cfn_parse().FromCloudFormation.getBoolean(properties.EnableAnswerMachineDetection):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignTelephonyOutboundConfigPropertyValidator(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("answerMachineDetectionConfig",CfnCampaignAnswerMachineDetectionConfigPropertyValidator)(properties.answerMachineDetectionConfig)),errors.collect(cdk().propertyValidator("connectContactFlowId",cdk().requiredValidator)(properties.connectContactFlowId)),errors.collect(cdk().propertyValidator("connectContactFlowId",cdk().validateString)(properties.connectContactFlowId)),errors.collect(cdk().propertyValidator("connectSourcePhoneNumber",cdk().validateString)(properties.connectSourcePhoneNumber)),errors.wrap('supplied properties not correct for "TelephonyOutboundConfigProperty"')}function convertCfnCampaignTelephonyOutboundConfigPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignTelephonyOutboundConfigPropertyValidator(properties).assertSuccess(),{AnswerMachineDetectionConfig:convertCfnCampaignAnswerMachineDetectionConfigPropertyToCloudFormation(properties.answerMachineDetectionConfig),ConnectContactFlowId:cdk().stringToCloudFormation(properties.connectContactFlowId),ConnectSourcePhoneNumber:cdk().stringToCloudFormation(properties.connectSourcePhoneNumber)}):properties}function CfnCampaignTelephonyOutboundConfigPropertyFromCloudFormation(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("answerMachineDetectionConfig","AnswerMachineDetectionConfig",properties.AnswerMachineDetectionConfig!=null?CfnCampaignAnswerMachineDetectionConfigPropertyFromCloudFormation(properties.AnswerMachineDetectionConfig):void 0),ret.addPropertyResult("connectContactFlowId","ConnectContactFlowId",properties.ConnectContactFlowId!=null?cfn_parse().FromCloudFormation.getString(properties.ConnectContactFlowId):void 0),ret.addPropertyResult("connectSourcePhoneNumber","ConnectSourcePhoneNumber",properties.ConnectSourcePhoneNumber!=null?cfn_parse().FromCloudFormation.getString(properties.ConnectSourcePhoneNumber):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignTelephonyChannelSubtypeConfigPropertyValidator(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("capacity",cdk().validateNumber)(properties.capacity)),errors.collect(cdk().propertyValidator("connectQueueId",cdk().validateString)(properties.connectQueueId)),errors.collect(cdk().propertyValidator("defaultOutboundConfig",cdk().requiredValidator)(properties.defaultOutboundConfig)),errors.collect(cdk().propertyValidator("defaultOutboundConfig",CfnCampaignTelephonyOutboundConfigPropertyValidator)(properties.defaultOutboundConfig)),errors.collect(cdk().propertyValidator("outboundMode",cdk().requiredValidator)(properties.outboundMode)),errors.collect(cdk().propertyValidator("outboundMode",CfnCampaignTelephonyOutboundModePropertyValidator)(properties.outboundMode)),errors.wrap('supplied properties not correct for "TelephonyChannelSubtypeConfigProperty"')}function convertCfnCampaignTelephonyChannelSubtypeConfigPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignTelephonyChannelSubtypeConfigPropertyValidator(properties).assertSuccess(),{Capacity:cdk().numberToCloudFormation(properties.capacity),ConnectQueueId:cdk().stringToCloudFormation(properties.connectQueueId),DefaultOutboundConfig:convertCfnCampaignTelephonyOutboundConfigPropertyToCloudFormation(properties.defaultOutboundConfig),OutboundMode:convertCfnCampaignTelephonyOutboundModePropertyToCloudFormation(properties.outboundMode)}):properties}function CfnCampaignTelephonyChannelSubtypeConfigPropertyFromCloudFormation(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("capacity","Capacity",properties.Capacity!=null?cfn_parse().FromCloudFormation.getNumber(properties.Capacity):void 0),ret.addPropertyResult("connectQueueId","ConnectQueueId",properties.ConnectQueueId!=null?cfn_parse().FromCloudFormation.getString(properties.ConnectQueueId):void 0),ret.addPropertyResult("defaultOutboundConfig","DefaultOutboundConfig",properties.DefaultOutboundConfig!=null?CfnCampaignTelephonyOutboundConfigPropertyFromCloudFormation(properties.DefaultOutboundConfig):void 0),ret.addPropertyResult("outboundMode","OutboundMode",properties.OutboundMode!=null?CfnCampaignTelephonyOutboundModePropertyFromCloudFormation(properties.OutboundMode):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignSmsOutboundModePropertyValidator(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("agentlessConfig",cdk().validateObject)(properties.agentlessConfig)),errors.wrap('supplied properties not correct for "SmsOutboundModeProperty"')}function convertCfnCampaignSmsOutboundModePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignSmsOutboundModePropertyValidator(properties).assertSuccess(),{AgentlessConfig:cdk().objectToCloudFormation(properties.agentlessConfig)}):properties}function CfnCampaignSmsOutboundModePropertyFromCloudFormation(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("agentlessConfig","AgentlessConfig",properties.AgentlessConfig!=null?cfn_parse().FromCloudFormation.getAny(properties.AgentlessConfig):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignSmsOutboundConfigPropertyValidator(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("connectSourcePhoneNumberArn",cdk().requiredValidator)(properties.connectSourcePhoneNumberArn)),errors.collect(cdk().propertyValidator("connectSourcePhoneNumberArn",cdk().validateString)(properties.connectSourcePhoneNumberArn)),errors.collect(cdk().propertyValidator("wisdomTemplateArn",cdk().requiredValidator)(properties.wisdomTemplateArn)),errors.collect(cdk().propertyValidator("wisdomTemplateArn",cdk().validateString)(properties.wisdomTemplateArn)),errors.wrap('supplied properties not correct for "SmsOutboundConfigProperty"')}function convertCfnCampaignSmsOutboundConfigPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignSmsOutboundConfigPropertyValidator(properties).assertSuccess(),{ConnectSourcePhoneNumberArn:cdk().stringToCloudFormation(properties.connectSourcePhoneNumberArn),WisdomTemplateArn:cdk().stringToCloudFormation(properties.wisdomTemplateArn)}):properties}function CfnCampaignSmsOutboundConfigPropertyFromCloudFormation(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("connectSourcePhoneNumberArn","ConnectSourcePhoneNumberArn",properties.ConnectSourcePhoneNumberArn!=null?cfn_parse().FromCloudFormation.getString(properties.ConnectSourcePhoneNumberArn):void 0),ret.addPropertyResult("wisdomTemplateArn","WisdomTemplateArn",properties.WisdomTemplateArn!=null?cfn_parse().FromCloudFormation.getString(properties.WisdomTemplateArn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignSmsChannelSubtypeConfigPropertyValidator(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("capacity",cdk().validateNumber)(properties.capacity)),errors.collect(cdk().propertyValidator("defaultOutboundConfig",cdk().requiredValidator)(properties.defaultOutboundConfig)),errors.collect(cdk().propertyValidator("defaultOutboundConfig",CfnCampaignSmsOutboundConfigPropertyValidator)(properties.defaultOutboundConfig)),errors.collect(cdk().propertyValidator("outboundMode",cdk().requiredValidator)(properties.outboundMode)),errors.collect(cdk().propertyValidator("outboundMode",CfnCampaignSmsOutboundModePropertyValidator)(properties.outboundMode)),errors.wrap('supplied properties not correct for "SmsChannelSubtypeConfigProperty"')}function convertCfnCampaignSmsChannelSubtypeConfigPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignSmsChannelSubtypeConfigPropertyValidator(properties).assertSuccess(),{Capacity:cdk().numberToCloudFormation(properties.capacity),DefaultOutboundConfig:convertCfnCampaignSmsOutboundConfigPropertyToCloudFormation(properties.defaultOutboundConfig),OutboundMode:convertCfnCampaignSmsOutboundModePropertyToCloudFormation(properties.outboundMode)}):properties}function CfnCampaignSmsChannelSubtypeConfigPropertyFromCloudFormation(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("capacity","Capacity",properties.Capacity!=null?cfn_parse().FromCloudFormation.getNumber(properties.Capacity):void 0),ret.addPropertyResult("defaultOutboundConfig","DefaultOutboundConfig",properties.DefaultOutboundConfig!=null?CfnCampaignSmsOutboundConfigPropertyFromCloudFormation(properties.DefaultOutboundConfig):void 0),ret.addPropertyResult("outboundMode","OutboundMode",properties.OutboundMode!=null?CfnCampaignSmsOutboundModePropertyFromCloudFormation(properties.OutboundMode):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignEmailOutboundModePropertyValidator(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("agentlessConfig",cdk().validateObject)(properties.agentlessConfig)),errors.wrap('supplied properties not correct for "EmailOutboundModeProperty"')}function convertCfnCampaignEmailOutboundModePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignEmailOutboundModePropertyValidator(properties).assertSuccess(),{AgentlessConfig:cdk().objectToCloudFormation(properties.agentlessConfig)}):properties}function CfnCampaignEmailOutboundModePropertyFromCloudFormation(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("agentlessConfig","AgentlessConfig",properties.AgentlessConfig!=null?cfn_parse().FromCloudFormation.getAny(properties.AgentlessConfig):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignEmailOutboundConfigPropertyValidator(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("connectSourceEmailAddress",cdk().requiredValidator)(properties.connectSourceEmailAddress)),errors.collect(cdk().propertyValidator("connectSourceEmailAddress",cdk().validateString)(properties.connectSourceEmailAddress)),errors.collect(cdk().propertyValidator("sourceEmailAddressDisplayName",cdk().validateString)(properties.sourceEmailAddressDisplayName)),errors.collect(cdk().propertyValidator("wisdomTemplateArn",cdk().requiredValidator)(properties.wisdomTemplateArn)),errors.collect(cdk().propertyValidator("wisdomTemplateArn",cdk().validateString)(properties.wisdomTemplateArn)),errors.wrap('supplied properties not correct for "EmailOutboundConfigProperty"')}function convertCfnCampaignEmailOutboundConfigPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignEmailOutboundConfigPropertyValidator(properties).assertSuccess(),{ConnectSourceEmailAddress:cdk().stringToCloudFormation(properties.connectSourceEmailAddress),SourceEmailAddressDisplayName:cdk().stringToCloudFormation(properties.sourceEmailAddressDisplayName),WisdomTemplateArn:cdk().stringToCloudFormation(properties.wisdomTemplateArn)}):properties}function CfnCampaignEmailOutboundConfigPropertyFromCloudFormation(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("connectSourceEmailAddress","ConnectSourceEmailAddress",properties.ConnectSourceEmailAddress!=null?cfn_parse().FromCloudFormation.getString(properties.ConnectSourceEmailAddress):void 0),ret.addPropertyResult("sourceEmailAddressDisplayName","SourceEmailAddressDisplayName",properties.SourceEmailAddressDisplayName!=null?cfn_parse().FromCloudFormation.getString(properties.SourceEmailAddressDisplayName):void 0),ret.addPropertyResult("wisdomTemplateArn","WisdomTemplateArn",properties.WisdomTemplateArn!=null?cfn_parse().FromCloudFormation.getString(properties.WisdomTemplateArn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignEmailChannelSubtypeConfigPropertyValidator(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("capacity",cdk().validateNumber)(properties.capacity)),errors.collect(cdk().propertyValidator("defaultOutboundConfig",cdk().requiredValidator)(properties.defaultOutboundConfig)),errors.collect(cdk().propertyValidator("defaultOutboundConfig",CfnCampaignEmailOutboundConfigPropertyValidator)(properties.defaultOutboundConfig)),errors.collect(cdk().propertyValidator("outboundMode",cdk().requiredValidator)(properties.outboundMode)),errors.collect(cdk().propertyValidator("outboundMode",CfnCampaignEmailOutboundModePropertyValidator)(properties.outboundMode)),errors.wrap('supplied properties not correct for "EmailChannelSubtypeConfigProperty"')}function convertCfnCampaignEmailChannelSubtypeConfigPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignEmailChannelSubtypeConfigPropertyValidator(properties).assertSuccess(),{Capacity:cdk().numberToCloudFormation(properties.capacity),DefaultOutboundConfig:convertCfnCampaignEmailOutboundConfigPropertyToCloudFormation(properties.defaultOutboundConfig),OutboundMode:convertCfnCampaignEmailOutboundModePropertyToCloudFormation(properties.outboundMode)}):properties}function CfnCampaignEmailChannelSubtypeConfigPropertyFromCloudFormation(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("capacity","Capacity",properties.Capacity!=null?cfn_parse().FromCloudFormation.getNumber(properties.Capacity):void 0),ret.addPropertyResult("defaultOutboundConfig","DefaultOutboundConfig",properties.DefaultOutboundConfig!=null?CfnCampaignEmailOutboundConfigPropertyFromCloudFormation(properties.DefaultOutboundConfig):void 0),ret.addPropertyResult("outboundMode","OutboundMode",properties.OutboundMode!=null?CfnCampaignEmailOutboundModePropertyFromCloudFormation(properties.OutboundMode):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignChannelSubtypeConfigPropertyValidator(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("email",CfnCampaignEmailChannelSubtypeConfigPropertyValidator)(properties.email)),errors.collect(cdk().propertyValidator("sms",CfnCampaignSmsChannelSubtypeConfigPropertyValidator)(properties.sms)),errors.collect(cdk().propertyValidator("telephony",CfnCampaignTelephonyChannelSubtypeConfigPropertyValidator)(properties.telephony)),errors.wrap('supplied properties not correct for "ChannelSubtypeConfigProperty"')}function convertCfnCampaignChannelSubtypeConfigPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignChannelSubtypeConfigPropertyValidator(properties).assertSuccess(),{Email:convertCfnCampaignEmailChannelSubtypeConfigPropertyToCloudFormation(properties.email),Sms:convertCfnCampaignSmsChannelSubtypeConfigPropertyToCloudFormation(properties.sms),Telephony:convertCfnCampaignTelephonyChannelSubtypeConfigPropertyToCloudFormation(properties.telephony)}):properties}function CfnCampaignChannelSubtypeConfigPropertyFromCloudFormation(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("email","Email",properties.Email!=null?CfnCampaignEmailChannelSubtypeConfigPropertyFromCloudFormation(properties.Email):void 0),ret.addPropertyResult("sms","Sms",properties.Sms!=null?CfnCampaignSmsChannelSubtypeConfigPropertyFromCloudFormation(properties.Sms):void 0),ret.addPropertyResult("telephony","Telephony",properties.Telephony!=null?CfnCampaignTelephonyChannelSubtypeConfigPropertyFromCloudFormation(properties.Telephony):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignEventTriggerPropertyValidator(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("customerProfilesDomainArn",cdk().validateString)(properties.customerProfilesDomainArn)),errors.wrap('supplied properties not correct for "EventTriggerProperty"')}function convertCfnCampaignEventTriggerPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignEventTriggerPropertyValidator(properties).assertSuccess(),{CustomerProfilesDomainArn:cdk().stringToCloudFormation(properties.customerProfilesDomainArn)}):properties}function CfnCampaignEventTriggerPropertyFromCloudFormation(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("customerProfilesDomainArn","CustomerProfilesDomainArn",properties.CustomerProfilesDomainArn!=null?cfn_parse().FromCloudFormation.getString(properties.CustomerProfilesDomainArn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignSourcePropertyValidator(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("customerProfilesSegmentArn",cdk().validateString)(properties.customerProfilesSegmentArn)),errors.collect(cdk().propertyValidator("eventTrigger",CfnCampaignEventTriggerPropertyValidator)(properties.eventTrigger)),errors.wrap('supplied properties not correct for "SourceProperty"')}function convertCfnCampaignSourcePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignSourcePropertyValidator(properties).assertSuccess(),{CustomerProfilesSegmentArn:cdk().stringToCloudFormation(properties.customerProfilesSegmentArn),EventTrigger:convertCfnCampaignEventTriggerPropertyToCloudFormation(properties.eventTrigger)}):properties}function CfnCampaignSourcePropertyFromCloudFormation(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("customerProfilesSegmentArn","CustomerProfilesSegmentArn",properties.CustomerProfilesSegmentArn!=null?cfn_parse().FromCloudFormation.getString(properties.CustomerProfilesSegmentArn):void 0),ret.addPropertyResult("eventTrigger","EventTrigger",properties.EventTrigger!=null?CfnCampaignEventTriggerPropertyFromCloudFormation(properties.EventTrigger):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignSchedulePropertyValidator(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("endTime",cdk().requiredValidator)(properties.endTime)),errors.collect(cdk().propertyValidator("endTime",cdk().validateString)(properties.endTime)),errors.collect(cdk().propertyValidator("refreshFrequency",cdk().validateString)(properties.refreshFrequency)),errors.collect(cdk().propertyValidator("startTime",cdk().requiredValidator)(properties.startTime)),errors.collect(cdk().propertyValidator("startTime",cdk().validateString)(properties.startTime)),errors.wrap('supplied properties not correct for "ScheduleProperty"')}function convertCfnCampaignSchedulePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignSchedulePropertyValidator(properties).assertSuccess(),{EndTime:cdk().stringToCloudFormation(properties.endTime),RefreshFrequency:cdk().stringToCloudFormation(properties.refreshFrequency),StartTime:cdk().stringToCloudFormation(properties.startTime)}):properties}function CfnCampaignSchedulePropertyFromCloudFormation(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("endTime","EndTime",properties.EndTime!=null?cfn_parse().FromCloudFormation.getString(properties.EndTime):void 0),ret.addPropertyResult("refreshFrequency","RefreshFrequency",properties.RefreshFrequency!=null?cfn_parse().FromCloudFormation.getString(properties.RefreshFrequency):void 0),ret.addPropertyResult("startTime","StartTime",properties.StartTime!=null?cfn_parse().FromCloudFormation.getString(properties.StartTime):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignLocalTimeZoneConfigPropertyValidator(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("defaultTimeZone",cdk().validateString)(properties.defaultTimeZone)),errors.collect(cdk().propertyValidator("localTimeZoneDetection",cdk().listValidator(cdk().validateString))(properties.localTimeZoneDetection)),errors.wrap('supplied properties not correct for "LocalTimeZoneConfigProperty"')}function convertCfnCampaignLocalTimeZoneConfigPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignLocalTimeZoneConfigPropertyValidator(properties).assertSuccess(),{DefaultTimeZone:cdk().stringToCloudFormation(properties.defaultTimeZone),LocalTimeZoneDetection:cdk().listMapper(cdk().stringToCloudFormation)(properties.localTimeZoneDetection)}):properties}function CfnCampaignLocalTimeZoneConfigPropertyFromCloudFormation(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("defaultTimeZone","DefaultTimeZone",properties.DefaultTimeZone!=null?cfn_parse().FromCloudFormation.getString(properties.DefaultTimeZone):void 0),ret.addPropertyResult("localTimeZoneDetection","LocalTimeZoneDetection",properties.LocalTimeZoneDetection!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.LocalTimeZoneDetection):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignTimeRangePropertyValidator(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("endTime",cdk().requiredValidator)(properties.endTime)),errors.collect(cdk().propertyValidator("endTime",cdk().validateString)(properties.endTime)),errors.collect(cdk().propertyValidator("startTime",cdk().requiredValidator)(properties.startTime)),errors.collect(cdk().propertyValidator("startTime",cdk().validateString)(properties.startTime)),errors.wrap('supplied properties not correct for "TimeRangeProperty"')}function convertCfnCampaignTimeRangePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignTimeRangePropertyValidator(properties).assertSuccess(),{EndTime:cdk().stringToCloudFormation(properties.endTime),StartTime:cdk().stringToCloudFormation(properties.startTime)}):properties}function CfnCampaignTimeRangePropertyFromCloudFormation(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("endTime","EndTime",properties.EndTime!=null?cfn_parse().FromCloudFormation.getString(properties.EndTime):void 0),ret.addPropertyResult("startTime","StartTime",properties.StartTime!=null?cfn_parse().FromCloudFormation.getString(properties.StartTime):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignDailyHourPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("key",cdk().validateString)(properties.key)),errors.collect(cdk().propertyValidator("value",cdk().listValidator(CfnCampaignTimeRangePropertyValidator))(properties.value)),errors.wrap('supplied properties not correct for "DailyHourProperty"')}function convertCfnCampaignDailyHourPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignDailyHourPropertyValidator(properties).assertSuccess(),{Key:cdk().stringToCloudFormation(properties.key),Value:cdk().listMapper(convertCfnCampaignTimeRangePropertyToCloudFormation)(properties.value)}):properties}function CfnCampaignDailyHourPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("key","Key",properties.Key!=null?cfn_parse().FromCloudFormation.getString(properties.Key):void 0),ret.addPropertyResult("value","Value",properties.Value!=null?cfn_parse().FromCloudFormation.getArray(CfnCampaignTimeRangePropertyFromCloudFormation)(properties.Value):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignOpenHoursPropertyValidator(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("dailyHours",cdk().requiredValidator)(properties.dailyHours)),errors.collect(cdk().propertyValidator("dailyHours",cdk().listValidator(CfnCampaignDailyHourPropertyValidator))(properties.dailyHours)),errors.wrap('supplied properties not correct for "OpenHoursProperty"')}function convertCfnCampaignOpenHoursPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignOpenHoursPropertyValidator(properties).assertSuccess(),{DailyHours:cdk().listMapper(convertCfnCampaignDailyHourPropertyToCloudFormation)(properties.dailyHours)}):properties}function CfnCampaignOpenHoursPropertyFromCloudFormation(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("dailyHours","DailyHours",properties.DailyHours!=null?cfn_parse().FromCloudFormation.getArray(CfnCampaignDailyHourPropertyFromCloudFormation)(properties.DailyHours):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignRestrictedPeriodPropertyValidator(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("endDate",cdk().requiredValidator)(properties.endDate)),errors.collect(cdk().propertyValidator("endDate",cdk().validateString)(properties.endDate)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("startDate",cdk().requiredValidator)(properties.startDate)),errors.collect(cdk().propertyValidator("startDate",cdk().validateString)(properties.startDate)),errors.wrap('supplied properties not correct for "RestrictedPeriodProperty"')}function convertCfnCampaignRestrictedPeriodPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignRestrictedPeriodPropertyValidator(properties).assertSuccess(),{EndDate:cdk().stringToCloudFormation(properties.endDate),Name:cdk().stringToCloudFormation(properties.name),StartDate:cdk().stringToCloudFormation(properties.startDate)}):properties}function CfnCampaignRestrictedPeriodPropertyFromCloudFormation(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("endDate","EndDate",properties.EndDate!=null?cfn_parse().FromCloudFormation.getString(properties.EndDate):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("startDate","StartDate",properties.StartDate!=null?cfn_parse().FromCloudFormation.getString(properties.StartDate):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignRestrictedPeriodsPropertyValidator(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("restrictedPeriodList",cdk().requiredValidator)(properties.restrictedPeriodList)),errors.collect(cdk().propertyValidator("restrictedPeriodList",cdk().listValidator(CfnCampaignRestrictedPeriodPropertyValidator))(properties.restrictedPeriodList)),errors.wrap('supplied properties not correct for "RestrictedPeriodsProperty"')}function convertCfnCampaignRestrictedPeriodsPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignRestrictedPeriodsPropertyValidator(properties).assertSuccess(),{RestrictedPeriodList:cdk().listMapper(convertCfnCampaignRestrictedPeriodPropertyToCloudFormation)(properties.restrictedPeriodList)}):properties}function CfnCampaignRestrictedPeriodsPropertyFromCloudFormation(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("restrictedPeriodList","RestrictedPeriodList",properties.RestrictedPeriodList!=null?cfn_parse().FromCloudFormation.getArray(CfnCampaignRestrictedPeriodPropertyFromCloudFormation)(properties.RestrictedPeriodList):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignTimeWindowPropertyValidator(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("openHours",cdk().requiredValidator)(properties.openHours)),errors.collect(cdk().propertyValidator("openHours",CfnCampaignOpenHoursPropertyValidator)(properties.openHours)),errors.collect(cdk().propertyValidator("restrictedPeriods",CfnCampaignRestrictedPeriodsPropertyValidator)(properties.restrictedPeriods)),errors.wrap('supplied properties not correct for "TimeWindowProperty"')}function convertCfnCampaignTimeWindowPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCampaignTimeWindowPropertyValidator(properties).assertSuccess(),{OpenHours:convertCfnCampaignOpenHoursPropertyToCloudFormation(properties.openHours),RestrictedPeriods:convertCfnCampaignRestrictedPeriodsPropertyToCloudFormation(properties.restrictedPeriods)}):properties}function CfnCampaignTimeWindowPropertyFromCloudFormation(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("openHours","OpenHours",properties.OpenHours!=null?CfnCampaignOpenHoursPropertyFromCloudFormation(properties.OpenHours):void 0),ret.addPropertyResult("restrictedPeriods","RestrictedPeriods",properties.RestrictedPeriods!=null?CfnCampaignRestrictedPeriodsPropertyFromCloudFormation(properties.RestrictedPeriods):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCampaignCo