aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 25.8 kB
JavaScript
"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnTelemetryRule=exports.CfnOrganizationTelemetryRule=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 CfnOrganizationTelemetryRule extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnOrganizationTelemetryRulePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnOrganizationTelemetryRule(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:CfnOrganizationTelemetryRule.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_observabilityadmin_CfnOrganizationTelemetryRuleProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnOrganizationTelemetryRule),error}cdk().requireProperty(props,"rule",this),cdk().requireProperty(props,"ruleName",this),this.attrRuleArn=cdk().Token.asString(this.getAtt("RuleArn",cdk().ResolutionTypeHint.STRING)),this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::ObservabilityAdmin::OrganizationTelemetryRule",void 0,{tagPropertyName:"tags"}),this.rule=props.rule,this.ruleName=props.ruleName,this.tags=props.tags}get cfnProperties(){return{tags:this.cdkTagManager.renderTags(this.tags),rule:this.rule,ruleName:this.ruleName}}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",CfnOrganizationTelemetryRule.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnOrganizationTelemetryRulePropsToCloudFormation(props)}}exports.CfnOrganizationTelemetryRule=CfnOrganizationTelemetryRule,_a=JSII_RTTI_SYMBOL_1,CfnOrganizationTelemetryRule[_a]={fqn:"aws-cdk-lib.aws_observabilityadmin.CfnOrganizationTelemetryRule",version:"2.211.0"},CfnOrganizationTelemetryRule.CFN_RESOURCE_TYPE_NAME="AWS::ObservabilityAdmin::OrganizationTelemetryRule";function CfnOrganizationTelemetryRuleVPCFlowLogParametersPropertyValidator(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("logFormat",cdk().validateString)(properties.logFormat)),errors.collect(cdk().propertyValidator("maxAggregationInterval",cdk().validateNumber)(properties.maxAggregationInterval)),errors.collect(cdk().propertyValidator("trafficType",cdk().validateString)(properties.trafficType)),errors.wrap('supplied properties not correct for "VPCFlowLogParametersProperty"')}function convertCfnOrganizationTelemetryRuleVPCFlowLogParametersPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnOrganizationTelemetryRuleVPCFlowLogParametersPropertyValidator(properties).assertSuccess(),{LogFormat:cdk().stringToCloudFormation(properties.logFormat),MaxAggregationInterval:cdk().numberToCloudFormation(properties.maxAggregationInterval),TrafficType:cdk().stringToCloudFormation(properties.trafficType)}):properties}function CfnOrganizationTelemetryRuleVPCFlowLogParametersPropertyFromCloudFormation(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("logFormat","LogFormat",properties.LogFormat!=null?cfn_parse().FromCloudFormation.getString(properties.LogFormat):void 0),ret.addPropertyResult("maxAggregationInterval","MaxAggregationInterval",properties.MaxAggregationInterval!=null?cfn_parse().FromCloudFormation.getNumber(properties.MaxAggregationInterval):void 0),ret.addPropertyResult("trafficType","TrafficType",properties.TrafficType!=null?cfn_parse().FromCloudFormation.getString(properties.TrafficType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnOrganizationTelemetryRuleTelemetryDestinationConfigurationPropertyValidator(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("destinationPattern",cdk().validateString)(properties.destinationPattern)),errors.collect(cdk().propertyValidator("destinationType",cdk().validateString)(properties.destinationType)),errors.collect(cdk().propertyValidator("retentionInDays",cdk().validateNumber)(properties.retentionInDays)),errors.collect(cdk().propertyValidator("vpcFlowLogParameters",CfnOrganizationTelemetryRuleVPCFlowLogParametersPropertyValidator)(properties.vpcFlowLogParameters)),errors.wrap('supplied properties not correct for "TelemetryDestinationConfigurationProperty"')}function convertCfnOrganizationTelemetryRuleTelemetryDestinationConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnOrganizationTelemetryRuleTelemetryDestinationConfigurationPropertyValidator(properties).assertSuccess(),{DestinationPattern:cdk().stringToCloudFormation(properties.destinationPattern),DestinationType:cdk().stringToCloudFormation(properties.destinationType),RetentionInDays:cdk().numberToCloudFormation(properties.retentionInDays),VPCFlowLogParameters:convertCfnOrganizationTelemetryRuleVPCFlowLogParametersPropertyToCloudFormation(properties.vpcFlowLogParameters)}):properties}function CfnOrganizationTelemetryRuleTelemetryDestinationConfigurationPropertyFromCloudFormation(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("destinationPattern","DestinationPattern",properties.DestinationPattern!=null?cfn_parse().FromCloudFormation.getString(properties.DestinationPattern):void 0),ret.addPropertyResult("destinationType","DestinationType",properties.DestinationType!=null?cfn_parse().FromCloudFormation.getString(properties.DestinationType):void 0),ret.addPropertyResult("retentionInDays","RetentionInDays",properties.RetentionInDays!=null?cfn_parse().FromCloudFormation.getNumber(properties.RetentionInDays):void 0),ret.addPropertyResult("vpcFlowLogParameters","VPCFlowLogParameters",properties.VPCFlowLogParameters!=null?CfnOrganizationTelemetryRuleVPCFlowLogParametersPropertyFromCloudFormation(properties.VPCFlowLogParameters):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnOrganizationTelemetryRuleTelemetryRulePropertyValidator(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("destinationConfiguration",CfnOrganizationTelemetryRuleTelemetryDestinationConfigurationPropertyValidator)(properties.destinationConfiguration)),errors.collect(cdk().propertyValidator("resourceType",cdk().requiredValidator)(properties.resourceType)),errors.collect(cdk().propertyValidator("resourceType",cdk().validateString)(properties.resourceType)),errors.collect(cdk().propertyValidator("scope",cdk().validateString)(properties.scope)),errors.collect(cdk().propertyValidator("selectionCriteria",cdk().validateString)(properties.selectionCriteria)),errors.collect(cdk().propertyValidator("telemetryType",cdk().requiredValidator)(properties.telemetryType)),errors.collect(cdk().propertyValidator("telemetryType",cdk().validateString)(properties.telemetryType)),errors.wrap('supplied properties not correct for "TelemetryRuleProperty"')}function convertCfnOrganizationTelemetryRuleTelemetryRulePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnOrganizationTelemetryRuleTelemetryRulePropertyValidator(properties).assertSuccess(),{DestinationConfiguration:convertCfnOrganizationTelemetryRuleTelemetryDestinationConfigurationPropertyToCloudFormation(properties.destinationConfiguration),ResourceType:cdk().stringToCloudFormation(properties.resourceType),Scope:cdk().stringToCloudFormation(properties.scope),SelectionCriteria:cdk().stringToCloudFormation(properties.selectionCriteria),TelemetryType:cdk().stringToCloudFormation(properties.telemetryType)}):properties}function CfnOrganizationTelemetryRuleTelemetryRulePropertyFromCloudFormation(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("destinationConfiguration","DestinationConfiguration",properties.DestinationConfiguration!=null?CfnOrganizationTelemetryRuleTelemetryDestinationConfigurationPropertyFromCloudFormation(properties.DestinationConfiguration):void 0),ret.addPropertyResult("resourceType","ResourceType",properties.ResourceType!=null?cfn_parse().FromCloudFormation.getString(properties.ResourceType):void 0),ret.addPropertyResult("scope","Scope",properties.Scope!=null?cfn_parse().FromCloudFormation.getString(properties.Scope):void 0),ret.addPropertyResult("selectionCriteria","SelectionCriteria",properties.SelectionCriteria!=null?cfn_parse().FromCloudFormation.getString(properties.SelectionCriteria):void 0),ret.addPropertyResult("telemetryType","TelemetryType",properties.TelemetryType!=null?cfn_parse().FromCloudFormation.getString(properties.TelemetryType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnOrganizationTelemetryRulePropsValidator(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("rule",cdk().requiredValidator)(properties.rule)),errors.collect(cdk().propertyValidator("rule",CfnOrganizationTelemetryRuleTelemetryRulePropertyValidator)(properties.rule)),errors.collect(cdk().propertyValidator("ruleName",cdk().requiredValidator)(properties.ruleName)),errors.collect(cdk().propertyValidator("ruleName",cdk().validateString)(properties.ruleName)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnOrganizationTelemetryRuleProps"')}function convertCfnOrganizationTelemetryRulePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnOrganizationTelemetryRulePropsValidator(properties).assertSuccess(),{Rule:convertCfnOrganizationTelemetryRuleTelemetryRulePropertyToCloudFormation(properties.rule),RuleName:cdk().stringToCloudFormation(properties.ruleName),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnOrganizationTelemetryRulePropsFromCloudFormation(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("rule","Rule",properties.Rule!=null?CfnOrganizationTelemetryRuleTelemetryRulePropertyFromCloudFormation(properties.Rule):void 0),ret.addPropertyResult("ruleName","RuleName",properties.RuleName!=null?cfn_parse().FromCloudFormation.getString(properties.RuleName):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 CfnTelemetryRule extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnTelemetryRulePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnTelemetryRule(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:CfnTelemetryRule.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_observabilityadmin_CfnTelemetryRuleProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnTelemetryRule),error}cdk().requireProperty(props,"rule",this),cdk().requireProperty(props,"ruleName",this),this.attrRuleArn=cdk().Token.asString(this.getAtt("RuleArn",cdk().ResolutionTypeHint.STRING)),this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::ObservabilityAdmin::TelemetryRule",void 0,{tagPropertyName:"tags"}),this.rule=props.rule,this.ruleName=props.ruleName,this.tags=props.tags}get cfnProperties(){return{tags:this.cdkTagManager.renderTags(this.tags),rule:this.rule,ruleName:this.ruleName}}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",CfnTelemetryRule.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnTelemetryRulePropsToCloudFormation(props)}}exports.CfnTelemetryRule=CfnTelemetryRule,_b=JSII_RTTI_SYMBOL_1,CfnTelemetryRule[_b]={fqn:"aws-cdk-lib.aws_observabilityadmin.CfnTelemetryRule",version:"2.211.0"},CfnTelemetryRule.CFN_RESOURCE_TYPE_NAME="AWS::ObservabilityAdmin::TelemetryRule";function CfnTelemetryRuleVPCFlowLogParametersPropertyValidator(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("logFormat",cdk().validateString)(properties.logFormat)),errors.collect(cdk().propertyValidator("maxAggregationInterval",cdk().validateNumber)(properties.maxAggregationInterval)),errors.collect(cdk().propertyValidator("trafficType",cdk().validateString)(properties.trafficType)),errors.wrap('supplied properties not correct for "VPCFlowLogParametersProperty"')}function convertCfnTelemetryRuleVPCFlowLogParametersPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTelemetryRuleVPCFlowLogParametersPropertyValidator(properties).assertSuccess(),{LogFormat:cdk().stringToCloudFormation(properties.logFormat),MaxAggregationInterval:cdk().numberToCloudFormation(properties.maxAggregationInterval),TrafficType:cdk().stringToCloudFormation(properties.trafficType)}):properties}function CfnTelemetryRuleVPCFlowLogParametersPropertyFromCloudFormation(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("logFormat","LogFormat",properties.LogFormat!=null?cfn_parse().FromCloudFormation.getString(properties.LogFormat):void 0),ret.addPropertyResult("maxAggregationInterval","MaxAggregationInterval",properties.MaxAggregationInterval!=null?cfn_parse().FromCloudFormation.getNumber(properties.MaxAggregationInterval):void 0),ret.addPropertyResult("trafficType","TrafficType",properties.TrafficType!=null?cfn_parse().FromCloudFormation.getString(properties.TrafficType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTelemetryRuleTelemetryDestinationConfigurationPropertyValidator(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("destinationPattern",cdk().validateString)(properties.destinationPattern)),errors.collect(cdk().propertyValidator("destinationType",cdk().validateString)(properties.destinationType)),errors.collect(cdk().propertyValidator("retentionInDays",cdk().validateNumber)(properties.retentionInDays)),errors.collect(cdk().propertyValidator("vpcFlowLogParameters",CfnTelemetryRuleVPCFlowLogParametersPropertyValidator)(properties.vpcFlowLogParameters)),errors.wrap('supplied properties not correct for "TelemetryDestinationConfigurationProperty"')}function convertCfnTelemetryRuleTelemetryDestinationConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTelemetryRuleTelemetryDestinationConfigurationPropertyValidator(properties).assertSuccess(),{DestinationPattern:cdk().stringToCloudFormation(properties.destinationPattern),DestinationType:cdk().stringToCloudFormation(properties.destinationType),RetentionInDays:cdk().numberToCloudFormation(properties.retentionInDays),VPCFlowLogParameters:convertCfnTelemetryRuleVPCFlowLogParametersPropertyToCloudFormation(properties.vpcFlowLogParameters)}):properties}function CfnTelemetryRuleTelemetryDestinationConfigurationPropertyFromCloudFormation(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("destinationPattern","DestinationPattern",properties.DestinationPattern!=null?cfn_parse().FromCloudFormation.getString(properties.DestinationPattern):void 0),ret.addPropertyResult("destinationType","DestinationType",properties.DestinationType!=null?cfn_parse().FromCloudFormation.getString(properties.DestinationType):void 0),ret.addPropertyResult("retentionInDays","RetentionInDays",properties.RetentionInDays!=null?cfn_parse().FromCloudFormation.getNumber(properties.RetentionInDays):void 0),ret.addPropertyResult("vpcFlowLogParameters","VPCFlowLogParameters",properties.VPCFlowLogParameters!=null?CfnTelemetryRuleVPCFlowLogParametersPropertyFromCloudFormation(properties.VPCFlowLogParameters):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTelemetryRuleTelemetryRulePropertyValidator(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("destinationConfiguration",CfnTelemetryRuleTelemetryDestinationConfigurationPropertyValidator)(properties.destinationConfiguration)),errors.collect(cdk().propertyValidator("resourceType",cdk().requiredValidator)(properties.resourceType)),errors.collect(cdk().propertyValidator("resourceType",cdk().validateString)(properties.resourceType)),errors.collect(cdk().propertyValidator("selectionCriteria",cdk().validateString)(properties.selectionCriteria)),errors.collect(cdk().propertyValidator("telemetryType",cdk().requiredValidator)(properties.telemetryType)),errors.collect(cdk().propertyValidator("telemetryType",cdk().validateString)(properties.telemetryType)),errors.wrap('supplied properties not correct for "TelemetryRuleProperty"')}function convertCfnTelemetryRuleTelemetryRulePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTelemetryRuleTelemetryRulePropertyValidator(properties).assertSuccess(),{DestinationConfiguration:convertCfnTelemetryRuleTelemetryDestinationConfigurationPropertyToCloudFormation(properties.destinationConfiguration),ResourceType:cdk().stringToCloudFormation(properties.resourceType),SelectionCriteria:cdk().stringToCloudFormation(properties.selectionCriteria),TelemetryType:cdk().stringToCloudFormation(properties.telemetryType)}):properties}function CfnTelemetryRuleTelemetryRulePropertyFromCloudFormation(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("destinationConfiguration","DestinationConfiguration",properties.DestinationConfiguration!=null?CfnTelemetryRuleTelemetryDestinationConfigurationPropertyFromCloudFormation(properties.DestinationConfiguration):void 0),ret.addPropertyResult("resourceType","ResourceType",properties.ResourceType!=null?cfn_parse().FromCloudFormation.getString(properties.ResourceType):void 0),ret.addPropertyResult("selectionCriteria","SelectionCriteria",properties.SelectionCriteria!=null?cfn_parse().FromCloudFormation.getString(properties.SelectionCriteria):void 0),ret.addPropertyResult("telemetryType","TelemetryType",properties.TelemetryType!=null?cfn_parse().FromCloudFormation.getString(properties.TelemetryType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTelemetryRulePropsValidator(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("rule",cdk().requiredValidator)(properties.rule)),errors.collect(cdk().propertyValidator("rule",CfnTelemetryRuleTelemetryRulePropertyValidator)(properties.rule)),errors.collect(cdk().propertyValidator("ruleName",cdk().requiredValidator)(properties.ruleName)),errors.collect(cdk().propertyValidator("ruleName",cdk().validateString)(properties.ruleName)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnTelemetryRuleProps"')}function convertCfnTelemetryRulePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTelemetryRulePropsValidator(properties).assertSuccess(),{Rule:convertCfnTelemetryRuleTelemetryRulePropertyToCloudFormation(properties.rule),RuleName:cdk().stringToCloudFormation(properties.ruleName),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnTelemetryRulePropsFromCloudFormation(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("rule","Rule",properties.Rule!=null?CfnTelemetryRuleTelemetryRulePropertyFromCloudFormation(properties.Rule):void 0),ret.addPropertyResult("ruleName","RuleName",properties.RuleName!=null?cfn_parse().FromCloudFormation.getString(properties.RuleName):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}