UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 29.3 kB
"use strict";var _a,_b,_c;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnResourceSet=exports.CfnPolicy=exports.CfnNotificationChannel=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),cdk=require("../../core"),cfn_parse=require("../../core/lib/helpers-internal");function CfnNotificationChannelPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("snsRoleName",cdk.requiredValidator)(properties.snsRoleName)),errors.collect(cdk.propertyValidator("snsRoleName",cdk.validateString)(properties.snsRoleName)),errors.collect(cdk.propertyValidator("snsTopicArn",cdk.requiredValidator)(properties.snsTopicArn)),errors.collect(cdk.propertyValidator("snsTopicArn",cdk.validateString)(properties.snsTopicArn)),errors.wrap('supplied properties not correct for "CfnNotificationChannelProps"')}function cfnNotificationChannelPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnNotificationChannelPropsValidator(properties).assertSuccess(),{SnsRoleName:cdk.stringToCloudFormation(properties.snsRoleName),SnsTopicArn:cdk.stringToCloudFormation(properties.snsTopicArn)}):properties}function CfnNotificationChannelPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("snsRoleName","SnsRoleName",cfn_parse.FromCloudFormation.getString(properties.SnsRoleName)),ret.addPropertyResult("snsTopicArn","SnsTopicArn",cfn_parse.FromCloudFormation.getString(properties.SnsTopicArn)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnNotificationChannel extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnNotificationChannel.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_fms_CfnNotificationChannelProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnNotificationChannel),error}cdk.requireProperty(props,"snsRoleName",this),cdk.requireProperty(props,"snsTopicArn",this),this.snsRoleName=props.snsRoleName,this.snsTopicArn=props.snsTopicArn}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnNotificationChannelPropsFromCloudFormation(resourceProperties),ret=new CfnNotificationChannel(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}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",CfnNotificationChannel.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{snsRoleName:this.snsRoleName,snsTopicArn:this.snsTopicArn}}renderProperties(props){return cfnNotificationChannelPropsToCloudFormation(props)}}exports.CfnNotificationChannel=CfnNotificationChannel,_a=JSII_RTTI_SYMBOL_1,CfnNotificationChannel[_a]={fqn:"aws-cdk-lib.aws_fms.CfnNotificationChannel",version:"2.70.0"},CfnNotificationChannel.CFN_RESOURCE_TYPE_NAME="AWS::FMS::NotificationChannel";function CfnPolicyPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("deleteAllPolicyResources",cdk.validateBoolean)(properties.deleteAllPolicyResources)),errors.collect(cdk.propertyValidator("excludeMap",CfnPolicy_IEMapPropertyValidator)(properties.excludeMap)),errors.collect(cdk.propertyValidator("excludeResourceTags",cdk.requiredValidator)(properties.excludeResourceTags)),errors.collect(cdk.propertyValidator("excludeResourceTags",cdk.validateBoolean)(properties.excludeResourceTags)),errors.collect(cdk.propertyValidator("includeMap",CfnPolicy_IEMapPropertyValidator)(properties.includeMap)),errors.collect(cdk.propertyValidator("policyDescription",cdk.validateString)(properties.policyDescription)),errors.collect(cdk.propertyValidator("policyName",cdk.requiredValidator)(properties.policyName)),errors.collect(cdk.propertyValidator("policyName",cdk.validateString)(properties.policyName)),errors.collect(cdk.propertyValidator("remediationEnabled",cdk.requiredValidator)(properties.remediationEnabled)),errors.collect(cdk.propertyValidator("remediationEnabled",cdk.validateBoolean)(properties.remediationEnabled)),errors.collect(cdk.propertyValidator("resourceSetIds",cdk.listValidator(cdk.validateString))(properties.resourceSetIds)),errors.collect(cdk.propertyValidator("resourceTags",cdk.listValidator(CfnPolicy_ResourceTagPropertyValidator))(properties.resourceTags)),errors.collect(cdk.propertyValidator("resourceType",cdk.validateString)(properties.resourceType)),errors.collect(cdk.propertyValidator("resourceTypeList",cdk.listValidator(cdk.validateString))(properties.resourceTypeList)),errors.collect(cdk.propertyValidator("resourcesCleanUp",cdk.validateBoolean)(properties.resourcesCleanUp)),errors.collect(cdk.propertyValidator("securityServicePolicyData",cdk.requiredValidator)(properties.securityServicePolicyData)),errors.collect(cdk.propertyValidator("securityServicePolicyData",CfnPolicy_SecurityServicePolicyDataPropertyValidator)(properties.securityServicePolicyData)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(CfnPolicy_PolicyTagPropertyValidator))(properties.tags)),errors.wrap('supplied properties not correct for "CfnPolicyProps"')}function cfnPolicyPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPolicyPropsValidator(properties).assertSuccess(),{ExcludeResourceTags:cdk.booleanToCloudFormation(properties.excludeResourceTags),PolicyName:cdk.stringToCloudFormation(properties.policyName),RemediationEnabled:cdk.booleanToCloudFormation(properties.remediationEnabled),SecurityServicePolicyData:cfnPolicySecurityServicePolicyDataPropertyToCloudFormation(properties.securityServicePolicyData),DeleteAllPolicyResources:cdk.booleanToCloudFormation(properties.deleteAllPolicyResources),ExcludeMap:cfnPolicyIEMapPropertyToCloudFormation(properties.excludeMap),IncludeMap:cfnPolicyIEMapPropertyToCloudFormation(properties.includeMap),PolicyDescription:cdk.stringToCloudFormation(properties.policyDescription),ResourcesCleanUp:cdk.booleanToCloudFormation(properties.resourcesCleanUp),ResourceSetIds:cdk.listMapper(cdk.stringToCloudFormation)(properties.resourceSetIds),ResourceTags:cdk.listMapper(cfnPolicyResourceTagPropertyToCloudFormation)(properties.resourceTags),ResourceType:cdk.stringToCloudFormation(properties.resourceType),ResourceTypeList:cdk.listMapper(cdk.stringToCloudFormation)(properties.resourceTypeList),Tags:cdk.listMapper(cfnPolicyPolicyTagPropertyToCloudFormation)(properties.tags)}):properties}function CfnPolicyPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("excludeResourceTags","ExcludeResourceTags",cfn_parse.FromCloudFormation.getBoolean(properties.ExcludeResourceTags)),ret.addPropertyResult("policyName","PolicyName",cfn_parse.FromCloudFormation.getString(properties.PolicyName)),ret.addPropertyResult("remediationEnabled","RemediationEnabled",cfn_parse.FromCloudFormation.getBoolean(properties.RemediationEnabled)),ret.addPropertyResult("securityServicePolicyData","SecurityServicePolicyData",CfnPolicySecurityServicePolicyDataPropertyFromCloudFormation(properties.SecurityServicePolicyData)),ret.addPropertyResult("deleteAllPolicyResources","DeleteAllPolicyResources",properties.DeleteAllPolicyResources!=null?cfn_parse.FromCloudFormation.getBoolean(properties.DeleteAllPolicyResources):void 0),ret.addPropertyResult("excludeMap","ExcludeMap",properties.ExcludeMap!=null?CfnPolicyIEMapPropertyFromCloudFormation(properties.ExcludeMap):void 0),ret.addPropertyResult("includeMap","IncludeMap",properties.IncludeMap!=null?CfnPolicyIEMapPropertyFromCloudFormation(properties.IncludeMap):void 0),ret.addPropertyResult("policyDescription","PolicyDescription",properties.PolicyDescription!=null?cfn_parse.FromCloudFormation.getString(properties.PolicyDescription):void 0),ret.addPropertyResult("resourcesCleanUp","ResourcesCleanUp",properties.ResourcesCleanUp!=null?cfn_parse.FromCloudFormation.getBoolean(properties.ResourcesCleanUp):void 0),ret.addPropertyResult("resourceSetIds","ResourceSetIds",properties.ResourceSetIds!=null?cfn_parse.FromCloudFormation.getStringArray(properties.ResourceSetIds):void 0),ret.addPropertyResult("resourceTags","ResourceTags",properties.ResourceTags!=null?cfn_parse.FromCloudFormation.getArray(CfnPolicyResourceTagPropertyFromCloudFormation)(properties.ResourceTags):void 0),ret.addPropertyResult("resourceType","ResourceType",properties.ResourceType!=null?cfn_parse.FromCloudFormation.getString(properties.ResourceType):void 0),ret.addPropertyResult("resourceTypeList","ResourceTypeList",properties.ResourceTypeList!=null?cfn_parse.FromCloudFormation.getStringArray(properties.ResourceTypeList):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(CfnPolicyPolicyTagPropertyFromCloudFormation)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnPolicy extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnPolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_fms_CfnPolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPolicy),error}cdk.requireProperty(props,"excludeResourceTags",this),cdk.requireProperty(props,"policyName",this),cdk.requireProperty(props,"remediationEnabled",this),cdk.requireProperty(props,"securityServicePolicyData",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.excludeResourceTags=props.excludeResourceTags,this.policyName=props.policyName,this.remediationEnabled=props.remediationEnabled,this.securityServicePolicyData=props.securityServicePolicyData,this.deleteAllPolicyResources=props.deleteAllPolicyResources,this.excludeMap=props.excludeMap,this.includeMap=props.includeMap,this.policyDescription=props.policyDescription,this.resourcesCleanUp=props.resourcesCleanUp,this.resourceSetIds=props.resourceSetIds,this.resourceTags=props.resourceTags,this.resourceType=props.resourceType,this.resourceTypeList=props.resourceTypeList,this.tags=props.tags}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPolicyPropsFromCloudFormation(resourceProperties),ret=new CfnPolicy(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}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",CfnPolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{excludeResourceTags:this.excludeResourceTags,policyName:this.policyName,remediationEnabled:this.remediationEnabled,securityServicePolicyData:this.securityServicePolicyData,deleteAllPolicyResources:this.deleteAllPolicyResources,excludeMap:this.excludeMap,includeMap:this.includeMap,policyDescription:this.policyDescription,resourcesCleanUp:this.resourcesCleanUp,resourceSetIds:this.resourceSetIds,resourceTags:this.resourceTags,resourceType:this.resourceType,resourceTypeList:this.resourceTypeList,tags:this.tags}}renderProperties(props){return cfnPolicyPropsToCloudFormation(props)}}exports.CfnPolicy=CfnPolicy,_b=JSII_RTTI_SYMBOL_1,CfnPolicy[_b]={fqn:"aws-cdk-lib.aws_fms.CfnPolicy",version:"2.70.0"},CfnPolicy.CFN_RESOURCE_TYPE_NAME="AWS::FMS::Policy";function CfnPolicy_IEMapPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("account",cdk.listValidator(cdk.validateString))(properties.account)),errors.collect(cdk.propertyValidator("orgunit",cdk.listValidator(cdk.validateString))(properties.orgunit)),errors.wrap('supplied properties not correct for "IEMapProperty"')}function cfnPolicyIEMapPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPolicy_IEMapPropertyValidator(properties).assertSuccess(),{ACCOUNT:cdk.listMapper(cdk.stringToCloudFormation)(properties.account),ORGUNIT:cdk.listMapper(cdk.stringToCloudFormation)(properties.orgunit)}):properties}function CfnPolicyIEMapPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("account","ACCOUNT",properties.ACCOUNT!=null?cfn_parse.FromCloudFormation.getStringArray(properties.ACCOUNT):void 0),ret.addPropertyResult("orgunit","ORGUNIT",properties.ORGUNIT!=null?cfn_parse.FromCloudFormation.getStringArray(properties.ORGUNIT):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPolicy_NetworkFirewallPolicyPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("firewallDeploymentModel",cdk.requiredValidator)(properties.firewallDeploymentModel)),errors.collect(cdk.propertyValidator("firewallDeploymentModel",cdk.validateString)(properties.firewallDeploymentModel)),errors.wrap('supplied properties not correct for "NetworkFirewallPolicyProperty"')}function cfnPolicyNetworkFirewallPolicyPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPolicy_NetworkFirewallPolicyPropertyValidator(properties).assertSuccess(),{FirewallDeploymentModel:cdk.stringToCloudFormation(properties.firewallDeploymentModel)}):properties}function CfnPolicyNetworkFirewallPolicyPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("firewallDeploymentModel","FirewallDeploymentModel",cfn_parse.FromCloudFormation.getString(properties.FirewallDeploymentModel)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPolicy_PolicyOptionPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("networkFirewallPolicy",CfnPolicy_NetworkFirewallPolicyPropertyValidator)(properties.networkFirewallPolicy)),errors.collect(cdk.propertyValidator("thirdPartyFirewallPolicy",CfnPolicy_ThirdPartyFirewallPolicyPropertyValidator)(properties.thirdPartyFirewallPolicy)),errors.wrap('supplied properties not correct for "PolicyOptionProperty"')}function cfnPolicyPolicyOptionPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPolicy_PolicyOptionPropertyValidator(properties).assertSuccess(),{NetworkFirewallPolicy:cfnPolicyNetworkFirewallPolicyPropertyToCloudFormation(properties.networkFirewallPolicy),ThirdPartyFirewallPolicy:cfnPolicyThirdPartyFirewallPolicyPropertyToCloudFormation(properties.thirdPartyFirewallPolicy)}):properties}function CfnPolicyPolicyOptionPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("networkFirewallPolicy","NetworkFirewallPolicy",properties.NetworkFirewallPolicy!=null?CfnPolicyNetworkFirewallPolicyPropertyFromCloudFormation(properties.NetworkFirewallPolicy):void 0),ret.addPropertyResult("thirdPartyFirewallPolicy","ThirdPartyFirewallPolicy",properties.ThirdPartyFirewallPolicy!=null?CfnPolicyThirdPartyFirewallPolicyPropertyFromCloudFormation(properties.ThirdPartyFirewallPolicy):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPolicy_PolicyTagPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("key",cdk.requiredValidator)(properties.key)),errors.collect(cdk.propertyValidator("key",cdk.validateString)(properties.key)),errors.collect(cdk.propertyValidator("value",cdk.requiredValidator)(properties.value)),errors.collect(cdk.propertyValidator("value",cdk.validateString)(properties.value)),errors.wrap('supplied properties not correct for "PolicyTagProperty"')}function cfnPolicyPolicyTagPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPolicy_PolicyTagPropertyValidator(properties).assertSuccess(),{Key:cdk.stringToCloudFormation(properties.key),Value:cdk.stringToCloudFormation(properties.value)}):properties}function CfnPolicyPolicyTagPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("key","Key",cfn_parse.FromCloudFormation.getString(properties.Key)),ret.addPropertyResult("value","Value",cfn_parse.FromCloudFormation.getString(properties.Value)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPolicy_ResourceTagPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("key",cdk.requiredValidator)(properties.key)),errors.collect(cdk.propertyValidator("key",cdk.validateString)(properties.key)),errors.collect(cdk.propertyValidator("value",cdk.validateString)(properties.value)),errors.wrap('supplied properties not correct for "ResourceTagProperty"')}function cfnPolicyResourceTagPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPolicy_ResourceTagPropertyValidator(properties).assertSuccess(),{Key:cdk.stringToCloudFormation(properties.key),Value:cdk.stringToCloudFormation(properties.value)}):properties}function CfnPolicyResourceTagPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("key","Key",cfn_parse.FromCloudFormation.getString(properties.Key)),ret.addPropertyResult("value","Value",properties.Value!=null?cfn_parse.FromCloudFormation.getString(properties.Value):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPolicy_SecurityServicePolicyDataPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("managedServiceData",cdk.validateString)(properties.managedServiceData)),errors.collect(cdk.propertyValidator("policyOption",CfnPolicy_PolicyOptionPropertyValidator)(properties.policyOption)),errors.collect(cdk.propertyValidator("type",cdk.requiredValidator)(properties.type)),errors.collect(cdk.propertyValidator("type",cdk.validateString)(properties.type)),errors.wrap('supplied properties not correct for "SecurityServicePolicyDataProperty"')}function cfnPolicySecurityServicePolicyDataPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPolicy_SecurityServicePolicyDataPropertyValidator(properties).assertSuccess(),{ManagedServiceData:cdk.stringToCloudFormation(properties.managedServiceData),PolicyOption:cfnPolicyPolicyOptionPropertyToCloudFormation(properties.policyOption),Type:cdk.stringToCloudFormation(properties.type)}):properties}function CfnPolicySecurityServicePolicyDataPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("managedServiceData","ManagedServiceData",properties.ManagedServiceData!=null?cfn_parse.FromCloudFormation.getString(properties.ManagedServiceData):void 0),ret.addPropertyResult("policyOption","PolicyOption",properties.PolicyOption!=null?CfnPolicyPolicyOptionPropertyFromCloudFormation(properties.PolicyOption):void 0),ret.addPropertyResult("type","Type",cfn_parse.FromCloudFormation.getString(properties.Type)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPolicy_ThirdPartyFirewallPolicyPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("firewallDeploymentModel",cdk.requiredValidator)(properties.firewallDeploymentModel)),errors.collect(cdk.propertyValidator("firewallDeploymentModel",cdk.validateString)(properties.firewallDeploymentModel)),errors.wrap('supplied properties not correct for "ThirdPartyFirewallPolicyProperty"')}function cfnPolicyThirdPartyFirewallPolicyPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPolicy_ThirdPartyFirewallPolicyPropertyValidator(properties).assertSuccess(),{FirewallDeploymentModel:cdk.stringToCloudFormation(properties.firewallDeploymentModel)}):properties}function CfnPolicyThirdPartyFirewallPolicyPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("firewallDeploymentModel","FirewallDeploymentModel",cfn_parse.FromCloudFormation.getString(properties.FirewallDeploymentModel)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnResourceSetPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("description",cdk.validateString)(properties.description)),errors.collect(cdk.propertyValidator("name",cdk.requiredValidator)(properties.name)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("resourceTypeList",cdk.requiredValidator)(properties.resourceTypeList)),errors.collect(cdk.propertyValidator("resourceTypeList",cdk.listValidator(cdk.validateString))(properties.resourceTypeList)),errors.collect(cdk.propertyValidator("resources",cdk.listValidator(cdk.validateString))(properties.resources)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnResourceSetProps"')}function cfnResourceSetPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnResourceSetPropsValidator(properties).assertSuccess(),{Name:cdk.stringToCloudFormation(properties.name),ResourceTypeList:cdk.listMapper(cdk.stringToCloudFormation)(properties.resourceTypeList),Description:cdk.stringToCloudFormation(properties.description),Resources:cdk.listMapper(cdk.stringToCloudFormation)(properties.resources),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnResourceSetPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("name","Name",cfn_parse.FromCloudFormation.getString(properties.Name)),ret.addPropertyResult("resourceTypeList","ResourceTypeList",cfn_parse.FromCloudFormation.getStringArray(properties.ResourceTypeList)),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("resources","Resources",properties.Resources!=null?cfn_parse.FromCloudFormation.getStringArray(properties.Resources):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 CfnResourceSet extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnResourceSet.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_fms_CfnResourceSetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnResourceSet),error}cdk.requireProperty(props,"name",this),cdk.requireProperty(props,"resourceTypeList",this),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.name=props.name,this.resourceTypeList=props.resourceTypeList,this.description=props.description,this.resources=props.resources,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::FMS::ResourceSet",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnResourceSetPropsFromCloudFormation(resourceProperties),ret=new CfnResourceSet(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}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",CfnResourceSet.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{name:this.name,resourceTypeList:this.resourceTypeList,description:this.description,resources:this.resources,tags:this.tags.renderTags()}}renderProperties(props){return cfnResourceSetPropsToCloudFormation(props)}}exports.CfnResourceSet=CfnResourceSet,_c=JSII_RTTI_SYMBOL_1,CfnResourceSet[_c]={fqn:"aws-cdk-lib.aws_fms.CfnResourceSet",version:"2.70.0"},CfnResourceSet.CFN_RESOURCE_TYPE_NAME="AWS::FMS::ResourceSet";