aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
1 lines • 80.1 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnDashboard=exports.CfnTrail=exports.CfnResourcePolicy=exports.CfnEventDataStore=exports.CfnChannel=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/lib");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 CfnChannel extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudtrail.CfnChannel",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::CloudTrail::Channel";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnChannelPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnChannel(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}static isCfnChannel(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnChannel.CFN_RESOURCE_TYPE_NAME}static arnForChannel(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_cloudtrail_IChannelRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForChannel),error}return resource.channelRef.channelArn}_destinations;_name;_source;tags;_tagsRaw;constructor(scope,id,props={}){super(scope,id,{type:CfnChannel.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudtrail_CfnChannelProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnChannel),error}this._destinations=props.destinations,this._name=props.name,this._source=props.source,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::CloudTrail::Channel",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags}get channelRef(){return{channelArn:this.ref}}get destinations(){return this._destinations}set destinations(value){cdk().traceProperty(this.node,"Destinations"),this._destinations=value}get name(){return this._name}set name(value){cdk().traceProperty(this.node,"Name"),this._name=value}get source(){return this._source}set source(value){cdk().traceProperty(this.node,"Source"),this._source=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get attrChannelArn(){return cdk().Token.asString(this.getAtt("ChannelArn",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{destinations:this._destinations,name:this._name,source:this._source,tags:this.tags.renderTags()}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnChannel.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnChannelPropsToCloudFormation(props)}}exports.CfnChannel=CfnChannel;function CfnChannelDestinationPropertyValidator(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("location",cdk().requiredValidator)(properties.location)),errors.collect(cdk().propertyValidator("location",cdk().validateString)(properties.location)),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 "DestinationProperty"')}function convertCfnChannelDestinationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnChannelDestinationPropertyValidator(properties).assertSuccess(),{Location:cdk().stringToCloudFormation(properties.location),Type:cdk().stringToCloudFormation(properties.type)}):properties}function CfnChannelDestinationPropertyFromCloudFormation(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("location","Location",properties.Location!=null?cfn_parse().FromCloudFormation.getString(properties.Location):void 0),ret.addPropertyResult("type","Type",properties.Type!=null?cfn_parse().FromCloudFormation.getString(properties.Type):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnChannelPropsValidator(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("destinations",cdk().listValidator(CfnChannelDestinationPropertyValidator))(properties.destinations)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("source",cdk().validateString)(properties.source)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnChannelProps"')}function convertCfnChannelPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnChannelPropsValidator(properties).assertSuccess(),{Destinations:cdk().listMapper(convertCfnChannelDestinationPropertyToCloudFormation)(properties.destinations),Name:cdk().stringToCloudFormation(properties.name),Source:cdk().stringToCloudFormation(properties.source),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnChannelPropsFromCloudFormation(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("destinations","Destinations",properties.Destinations!=null?cfn_parse().FromCloudFormation.getArray(CfnChannelDestinationPropertyFromCloudFormation)(properties.Destinations):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("source","Source",properties.Source!=null?cfn_parse().FromCloudFormation.getString(properties.Source):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 CfnEventDataStore extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudtrail.CfnEventDataStore",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::CloudTrail::EventDataStore";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnEventDataStorePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnEventDataStore(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}static isCfnEventDataStore(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnEventDataStore.CFN_RESOURCE_TYPE_NAME}static arnForEventDataStore(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_cloudtrail_IEventDataStoreRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForEventDataStore),error}return resource.eventDataStoreRef.eventDataStoreArn}_advancedEventSelectors;_billingMode;_contextKeySelectors;_federationEnabled;_federationRoleArn;_ingestionEnabled;_insightsDestination;_insightSelectors;_kmsKeyId;_maxEventSize;_multiRegionEnabled;_name;_organizationEnabled;_retentionPeriod;tags;_tagsRaw;_terminationProtectionEnabled;constructor(scope,id,props={}){super(scope,id,{type:CfnEventDataStore.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudtrail_CfnEventDataStoreProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnEventDataStore),error}this._advancedEventSelectors=props.advancedEventSelectors,this._billingMode=props.billingMode,this._contextKeySelectors=props.contextKeySelectors,this._federationEnabled=props.federationEnabled,this._federationRoleArn=props.federationRoleArn,this._ingestionEnabled=props.ingestionEnabled,this._insightsDestination=props.insightsDestination,this._insightSelectors=props.insightSelectors,this._kmsKeyId=props.kmsKeyId,this._maxEventSize=props.maxEventSize,this._multiRegionEnabled=props.multiRegionEnabled,this._name=props.name,this._organizationEnabled=props.organizationEnabled,this._retentionPeriod=props.retentionPeriod,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::CloudTrail::EventDataStore",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags,this._terminationProtectionEnabled=props.terminationProtectionEnabled}get eventDataStoreRef(){return{eventDataStoreArn:this.ref}}get advancedEventSelectors(){return this._advancedEventSelectors}set advancedEventSelectors(value){cdk().traceProperty(this.node,"AdvancedEventSelectors"),this._advancedEventSelectors=value}get billingMode(){return this._billingMode}set billingMode(value){cdk().traceProperty(this.node,"BillingMode"),this._billingMode=value}get contextKeySelectors(){return this._contextKeySelectors}set contextKeySelectors(value){cdk().traceProperty(this.node,"ContextKeySelectors"),this._contextKeySelectors=value}get federationEnabled(){return this._federationEnabled}set federationEnabled(value){cdk().traceProperty(this.node,"FederationEnabled"),this._federationEnabled=value}get federationRoleArn(){return this._federationRoleArn}set federationRoleArn(value){cdk().traceProperty(this.node,"FederationRoleArn"),this._federationRoleArn=value}get ingestionEnabled(){return this._ingestionEnabled}set ingestionEnabled(value){cdk().traceProperty(this.node,"IngestionEnabled"),this._ingestionEnabled=value}get insightsDestination(){return this._insightsDestination}set insightsDestination(value){cdk().traceProperty(this.node,"InsightsDestination"),this._insightsDestination=value}get insightSelectors(){return this._insightSelectors}set insightSelectors(value){cdk().traceProperty(this.node,"InsightSelectors"),this._insightSelectors=value}get kmsKeyId(){return this._kmsKeyId}set kmsKeyId(value){cdk().traceProperty(this.node,"KmsKeyId"),this._kmsKeyId=value}get maxEventSize(){return this._maxEventSize}set maxEventSize(value){cdk().traceProperty(this.node,"MaxEventSize"),this._maxEventSize=value}get multiRegionEnabled(){return this._multiRegionEnabled}set multiRegionEnabled(value){cdk().traceProperty(this.node,"MultiRegionEnabled"),this._multiRegionEnabled=value}get name(){return this._name}set name(value){cdk().traceProperty(this.node,"Name"),this._name=value}get organizationEnabled(){return this._organizationEnabled}set organizationEnabled(value){cdk().traceProperty(this.node,"OrganizationEnabled"),this._organizationEnabled=value}get retentionPeriod(){return this._retentionPeriod}set retentionPeriod(value){cdk().traceProperty(this.node,"RetentionPeriod"),this._retentionPeriod=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get terminationProtectionEnabled(){return this._terminationProtectionEnabled}set terminationProtectionEnabled(value){cdk().traceProperty(this.node,"TerminationProtectionEnabled"),this._terminationProtectionEnabled=value}get attrCreatedTimestamp(){return cdk().Token.asString(this.getAtt("CreatedTimestamp",cdk().ResolutionTypeHint.STRING))}get attrEventDataStoreArn(){return cdk().Token.asString(this.getAtt("EventDataStoreArn",cdk().ResolutionTypeHint.STRING))}get attrStatus(){return cdk().Token.asString(this.getAtt("Status",cdk().ResolutionTypeHint.STRING))}get attrUpdatedTimestamp(){return cdk().Token.asString(this.getAtt("UpdatedTimestamp",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{advancedEventSelectors:this._advancedEventSelectors,billingMode:this._billingMode,contextKeySelectors:this._contextKeySelectors,federationEnabled:this._federationEnabled,federationRoleArn:this._federationRoleArn,ingestionEnabled:this._ingestionEnabled,insightsDestination:this._insightsDestination,insightSelectors:this._insightSelectors,kmsKeyId:this._kmsKeyId,maxEventSize:this._maxEventSize,multiRegionEnabled:this._multiRegionEnabled,name:this._name,organizationEnabled:this._organizationEnabled,retentionPeriod:this._retentionPeriod,tags:this.tags.renderTags(),terminationProtectionEnabled:this._terminationProtectionEnabled}}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",CfnEventDataStore.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnEventDataStorePropsToCloudFormation(props)}}exports.CfnEventDataStore=CfnEventDataStore;function CfnEventDataStoreAdvancedFieldSelectorPropertyValidator(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("endsWith",cdk().listValidator(cdk().validateString))(properties.endsWith)),errors.collect(cdk().propertyValidator("equalTo",cdk().listValidator(cdk().validateString))(properties.equalTo)),errors.collect(cdk().propertyValidator("field",cdk().requiredValidator)(properties.field)),errors.collect(cdk().propertyValidator("field",cdk().validateString)(properties.field)),errors.collect(cdk().propertyValidator("notEndsWith",cdk().listValidator(cdk().validateString))(properties.notEndsWith)),errors.collect(cdk().propertyValidator("notEquals",cdk().listValidator(cdk().validateString))(properties.notEquals)),errors.collect(cdk().propertyValidator("notStartsWith",cdk().listValidator(cdk().validateString))(properties.notStartsWith)),errors.collect(cdk().propertyValidator("startsWith",cdk().listValidator(cdk().validateString))(properties.startsWith)),errors.wrap('supplied properties not correct for "AdvancedFieldSelectorProperty"')}function convertCfnEventDataStoreAdvancedFieldSelectorPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnEventDataStoreAdvancedFieldSelectorPropertyValidator(properties).assertSuccess(),{EndsWith:cdk().listMapper(cdk().stringToCloudFormation)(properties.endsWith),Equals:cdk().listMapper(cdk().stringToCloudFormation)(properties.equalTo),Field:cdk().stringToCloudFormation(properties.field),NotEndsWith:cdk().listMapper(cdk().stringToCloudFormation)(properties.notEndsWith),NotEquals:cdk().listMapper(cdk().stringToCloudFormation)(properties.notEquals),NotStartsWith:cdk().listMapper(cdk().stringToCloudFormation)(properties.notStartsWith),StartsWith:cdk().listMapper(cdk().stringToCloudFormation)(properties.startsWith)}):properties}function CfnEventDataStoreAdvancedFieldSelectorPropertyFromCloudFormation(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("endsWith","EndsWith",properties.EndsWith!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.EndsWith):void 0),ret.addPropertyResult("equalTo","Equals",properties.Equals!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.Equals):void 0),ret.addPropertyResult("field","Field",properties.Field!=null?cfn_parse().FromCloudFormation.getString(properties.Field):void 0),ret.addPropertyResult("notEndsWith","NotEndsWith",properties.NotEndsWith!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.NotEndsWith):void 0),ret.addPropertyResult("notEquals","NotEquals",properties.NotEquals!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.NotEquals):void 0),ret.addPropertyResult("notStartsWith","NotStartsWith",properties.NotStartsWith!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.NotStartsWith):void 0),ret.addPropertyResult("startsWith","StartsWith",properties.StartsWith!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.StartsWith):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventDataStoreAdvancedEventSelectorPropertyValidator(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("fieldSelectors",cdk().requiredValidator)(properties.fieldSelectors)),errors.collect(cdk().propertyValidator("fieldSelectors",cdk().listValidator(CfnEventDataStoreAdvancedFieldSelectorPropertyValidator))(properties.fieldSelectors)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.wrap('supplied properties not correct for "AdvancedEventSelectorProperty"')}function convertCfnEventDataStoreAdvancedEventSelectorPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnEventDataStoreAdvancedEventSelectorPropertyValidator(properties).assertSuccess(),{FieldSelectors:cdk().listMapper(convertCfnEventDataStoreAdvancedFieldSelectorPropertyToCloudFormation)(properties.fieldSelectors),Name:cdk().stringToCloudFormation(properties.name)}):properties}function CfnEventDataStoreAdvancedEventSelectorPropertyFromCloudFormation(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("fieldSelectors","FieldSelectors",properties.FieldSelectors!=null?cfn_parse().FromCloudFormation.getArray(CfnEventDataStoreAdvancedFieldSelectorPropertyFromCloudFormation)(properties.FieldSelectors):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventDataStoreInsightSelectorPropertyValidator(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("insightType",cdk().validateString)(properties.insightType)),errors.wrap('supplied properties not correct for "InsightSelectorProperty"')}function convertCfnEventDataStoreInsightSelectorPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnEventDataStoreInsightSelectorPropertyValidator(properties).assertSuccess(),{InsightType:cdk().stringToCloudFormation(properties.insightType)}):properties}function CfnEventDataStoreInsightSelectorPropertyFromCloudFormation(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("insightType","InsightType",properties.InsightType!=null?cfn_parse().FromCloudFormation.getString(properties.InsightType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventDataStoreContextKeySelectorPropertyValidator(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("equalTo",cdk().requiredValidator)(properties.equalTo)),errors.collect(cdk().propertyValidator("equalTo",cdk().listValidator(cdk().validateString))(properties.equalTo)),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 "ContextKeySelectorProperty"')}function convertCfnEventDataStoreContextKeySelectorPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnEventDataStoreContextKeySelectorPropertyValidator(properties).assertSuccess(),{Equals:cdk().listMapper(cdk().stringToCloudFormation)(properties.equalTo),Type:cdk().stringToCloudFormation(properties.type)}):properties}function CfnEventDataStoreContextKeySelectorPropertyFromCloudFormation(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("equalTo","Equals",properties.Equals!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.Equals):void 0),ret.addPropertyResult("type","Type",properties.Type!=null?cfn_parse().FromCloudFormation.getString(properties.Type):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventDataStorePropsValidator(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("advancedEventSelectors",cdk().listValidator(CfnEventDataStoreAdvancedEventSelectorPropertyValidator))(properties.advancedEventSelectors)),errors.collect(cdk().propertyValidator("billingMode",cdk().validateString)(properties.billingMode)),errors.collect(cdk().propertyValidator("contextKeySelectors",cdk().listValidator(CfnEventDataStoreContextKeySelectorPropertyValidator))(properties.contextKeySelectors)),errors.collect(cdk().propertyValidator("federationEnabled",cdk().validateBoolean)(properties.federationEnabled)),errors.collect(cdk().propertyValidator("federationRoleArn",cdk().validateString)(properties.federationRoleArn)),errors.collect(cdk().propertyValidator("ingestionEnabled",cdk().validateBoolean)(properties.ingestionEnabled)),errors.collect(cdk().propertyValidator("insightSelectors",cdk().listValidator(CfnEventDataStoreInsightSelectorPropertyValidator))(properties.insightSelectors)),errors.collect(cdk().propertyValidator("insightsDestination",cdk().validateString)(properties.insightsDestination)),errors.collect(cdk().propertyValidator("kmsKeyId",cdk().validateString)(properties.kmsKeyId)),errors.collect(cdk().propertyValidator("maxEventSize",cdk().validateString)(properties.maxEventSize)),errors.collect(cdk().propertyValidator("multiRegionEnabled",cdk().validateBoolean)(properties.multiRegionEnabled)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("organizationEnabled",cdk().validateBoolean)(properties.organizationEnabled)),errors.collect(cdk().propertyValidator("retentionPeriod",cdk().validateNumber)(properties.retentionPeriod)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("terminationProtectionEnabled",cdk().validateBoolean)(properties.terminationProtectionEnabled)),errors.wrap('supplied properties not correct for "CfnEventDataStoreProps"')}function convertCfnEventDataStorePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnEventDataStorePropsValidator(properties).assertSuccess(),{AdvancedEventSelectors:cdk().listMapper(convertCfnEventDataStoreAdvancedEventSelectorPropertyToCloudFormation)(properties.advancedEventSelectors),BillingMode:cdk().stringToCloudFormation(properties.billingMode),ContextKeySelectors:cdk().listMapper(convertCfnEventDataStoreContextKeySelectorPropertyToCloudFormation)(properties.contextKeySelectors),FederationEnabled:cdk().booleanToCloudFormation(properties.federationEnabled),FederationRoleArn:cdk().stringToCloudFormation(properties.federationRoleArn),IngestionEnabled:cdk().booleanToCloudFormation(properties.ingestionEnabled),InsightSelectors:cdk().listMapper(convertCfnEventDataStoreInsightSelectorPropertyToCloudFormation)(properties.insightSelectors),InsightsDestination:cdk().stringToCloudFormation(properties.insightsDestination),KmsKeyId:cdk().stringToCloudFormation(properties.kmsKeyId),MaxEventSize:cdk().stringToCloudFormation(properties.maxEventSize),MultiRegionEnabled:cdk().booleanToCloudFormation(properties.multiRegionEnabled),Name:cdk().stringToCloudFormation(properties.name),OrganizationEnabled:cdk().booleanToCloudFormation(properties.organizationEnabled),RetentionPeriod:cdk().numberToCloudFormation(properties.retentionPeriod),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),TerminationProtectionEnabled:cdk().booleanToCloudFormation(properties.terminationProtectionEnabled)}):properties}function CfnEventDataStorePropsFromCloudFormation(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("advancedEventSelectors","AdvancedEventSelectors",properties.AdvancedEventSelectors!=null?cfn_parse().FromCloudFormation.getArray(CfnEventDataStoreAdvancedEventSelectorPropertyFromCloudFormation)(properties.AdvancedEventSelectors):void 0),ret.addPropertyResult("billingMode","BillingMode",properties.BillingMode!=null?cfn_parse().FromCloudFormation.getString(properties.BillingMode):void 0),ret.addPropertyResult("contextKeySelectors","ContextKeySelectors",properties.ContextKeySelectors!=null?cfn_parse().FromCloudFormation.getArray(CfnEventDataStoreContextKeySelectorPropertyFromCloudFormation)(properties.ContextKeySelectors):void 0),ret.addPropertyResult("federationEnabled","FederationEnabled",properties.FederationEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.FederationEnabled):void 0),ret.addPropertyResult("federationRoleArn","FederationRoleArn",properties.FederationRoleArn!=null?cfn_parse().FromCloudFormation.getString(properties.FederationRoleArn):void 0),ret.addPropertyResult("ingestionEnabled","IngestionEnabled",properties.IngestionEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.IngestionEnabled):void 0),ret.addPropertyResult("insightsDestination","InsightsDestination",properties.InsightsDestination!=null?cfn_parse().FromCloudFormation.getString(properties.InsightsDestination):void 0),ret.addPropertyResult("insightSelectors","InsightSelectors",properties.InsightSelectors!=null?cfn_parse().FromCloudFormation.getArray(CfnEventDataStoreInsightSelectorPropertyFromCloudFormation)(properties.InsightSelectors):void 0),ret.addPropertyResult("kmsKeyId","KmsKeyId",properties.KmsKeyId!=null?cfn_parse().FromCloudFormation.getString(properties.KmsKeyId):void 0),ret.addPropertyResult("maxEventSize","MaxEventSize",properties.MaxEventSize!=null?cfn_parse().FromCloudFormation.getString(properties.MaxEventSize):void 0),ret.addPropertyResult("multiRegionEnabled","MultiRegionEnabled",properties.MultiRegionEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.MultiRegionEnabled):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("organizationEnabled","OrganizationEnabled",properties.OrganizationEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.OrganizationEnabled):void 0),ret.addPropertyResult("retentionPeriod","RetentionPeriod",properties.RetentionPeriod!=null?cfn_parse().FromCloudFormation.getNumber(properties.RetentionPeriod):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("terminationProtectionEnabled","TerminationProtectionEnabled",properties.TerminationProtectionEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.TerminationProtectionEnabled):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnResourcePolicy extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudtrail.CfnResourcePolicy",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::CloudTrail::ResourcePolicy";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnResourcePolicyPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnResourcePolicy(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}static isCfnResourcePolicy(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME}_resourceArn;_resourcePolicy;constructor(scope,id,props){super(scope,id,{type:CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudtrail_CfnResourcePolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnResourcePolicy),error}cdk().requireProperty(props,"resourceArn",this),cdk().requireProperty(props,"resourcePolicy",this),this._resourceArn=props.resourceArn,this._resourcePolicy=props.resourcePolicy}get resourcePolicyRef(){return{resourceArn:this.ref}}get resourceArn(){return this._resourceArn}set resourceArn(value){cdk().traceProperty(this.node,"ResourceArn"),this._resourceArn=value}get resourcePolicy(){return this._resourcePolicy}set resourcePolicy(value){cdk().traceProperty(this.node,"ResourcePolicy"),this._resourcePolicy=value}get cfnProperties(){return{resourceArn:this._resourceArn,resourcePolicy:this._resourcePolicy}}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",CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnResourcePolicyPropsToCloudFormation(props)}}exports.CfnResourcePolicy=CfnResourcePolicy;function CfnResourcePolicyPropsValidator(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("resourceArn",cdk().requiredValidator)(properties.resourceArn)),errors.collect(cdk().propertyValidator("resourceArn",cdk().validateString)(properties.resourceArn)),errors.collect(cdk().propertyValidator("resourcePolicy",cdk().requiredValidator)(properties.resourcePolicy)),errors.collect(cdk().propertyValidator("resourcePolicy",cdk().validateObject)(properties.resourcePolicy)),errors.wrap('supplied properties not correct for "CfnResourcePolicyProps"')}function convertCfnResourcePolicyPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnResourcePolicyPropsValidator(properties).assertSuccess(),{ResourceArn:cdk().stringToCloudFormation(properties.resourceArn),ResourcePolicy:cdk().objectToCloudFormation(properties.resourcePolicy)}):properties}function CfnResourcePolicyPropsFromCloudFormation(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("resourceArn","ResourceArn",properties.ResourceArn!=null?cfn_parse().FromCloudFormation.getString(properties.ResourceArn):void 0),ret.addPropertyResult("resourcePolicy","ResourcePolicy",properties.ResourcePolicy!=null?cfn_parse().FromCloudFormation.getAny(properties.ResourcePolicy):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnTrail extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudtrail.CfnTrail",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::CloudTrail::Trail";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnTrailPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnTrail(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}static isCfnTrail(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnTrail.CFN_RESOURCE_TYPE_NAME}static fromTrailArn(scope,id,arn){class Import extends cdk().Resource{trailRef;constructor(scope2,id2,arn2){super(scope2,id2,{environmentFromArn:arn2});const variables=new(cfn_parse()).TemplateString("arn:${Partition}:cloudtrail:${Region}:${Account}:trail/${TrailName}").parse(arn2);this.trailRef={trailName:variables.TrailName,trailArn:arn2}}}return new Import(scope,id,arn)}static fromTrailName(scope,id,trailName){class Import extends cdk().Resource{trailRef;constructor(scope2,id2,trailName2){const arn=new(cfn_parse()).TemplateString("arn:${Partition}:cloudtrail:${Region}:${Account}:trail/${TrailName}").interpolate({Partition:cdk().Stack.of(scope2).partition,Region:cdk().Stack.of(scope2).region,Account:cdk().Stack.of(scope2).account,TrailName:trailName2});super(scope2,id2,{environmentFromArn:arn}),this.trailRef={trailName:trailName2,trailArn:arn}}}return new Import(scope,id,trailName)}static arnForTrail(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_cloudtrail_ITrailRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForTrail),error}return resource.trailRef.trailArn}_advancedEventSelectors;_aggregationConfigurations;_cloudWatchLogsLogGroupArn;_cloudWatchLogsRoleArn;_enableLogFileValidation;_eventSelectors;_includeGlobalServiceEvents;_insightSelectors;_isLogging;_isMultiRegionTrail;_isOrganizationTrail;_kmsKeyId;_s3BucketName;_s3KeyPrefix;_snsTopicName;tags;_tagsRaw;_trailName;constructor(scope,id,props){super(scope,id,{type:CfnTrail.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudtrail_CfnTrailProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnTrail),error}cdk().requireProperty(props,"isLogging",this),cdk().requireProperty(props,"s3BucketName",this),this._advancedEventSelectors=props.advancedEventSelectors,this._aggregationConfigurations=props.aggregationConfigurations,this._cloudWatchLogsLogGroupArn=cdk().getRefProperty(props.cloudWatchLogsLogGroupArn?.logGroupRef,"logGroupArn")??cdk().ensureStringOrUndefined(props.cloudWatchLogsLogGroupArn,"cloudWatchLogsLogGroupArn","logs.ILogGroupRef | string"),this._cloudWatchLogsRoleArn=cdk().getRefProperty(props.cloudWatchLogsRoleArn?.roleRef,"roleArn")??cdk().ensureStringOrUndefined(props.cloudWatchLogsRoleArn,"cloudWatchLogsRoleArn","iam.IRoleRef | string"),this._enableLogFileValidation=props.enableLogFileValidation,this._eventSelectors=props.eventSelectors,this._includeGlobalServiceEvents=props.includeGlobalServiceEvents,this._insightSelectors=props.insightSelectors,this._isLogging=props.isLogging,this._isMultiRegionTrail=props.isMultiRegionTrail,this._isOrganizationTrail=props.isOrganizationTrail,this._kmsKeyId=cdk().getRefProperty(props.kmsKeyId?.keyRef,"keyArn")??cdk().getRefProperty(props.kmsKeyId?.aliasRef,"aliasName")??cdk().getRefProperty(props.kmsKeyId?.keyRef,"keyId")??cdk().ensureStringOrUndefined(props.kmsKeyId,"kmsKeyId","kms.IKeyRef | kms.IAliasRef | string"),this._s3BucketName=cdk().getRefProperty(props.s3BucketName?.bucketRef,"bucketName")??cdk().ensureStringOrUndefined(props.s3BucketName,"s3BucketName","s3.IBucketRef | string"),this._s3KeyPrefix=props.s3KeyPrefix,this._snsTopicName=props.snsTopicName,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::CloudTrail::Trail",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags,this._trailName=props.trailName}get trailRef(){return{trailName:this.ref,trailArn:this.attrArn}}get advancedEventSelectors(){return this._advancedEventSelectors}set advancedEventSelectors(value){cdk().traceProperty(this.node,"AdvancedEventSelectors"),this._advancedEventSelectors=value}get aggregationConfigurations(){return this._aggregationConfigurations}set aggregationConfigurations(value){cdk().traceProperty(this.node,"AggregationConfigurations"),this._aggregationConfigurations=value}get cloudWatchLogsLogGroupArn(){return this._cloudWatchLogsLogGroupArn}set cloudWatchLogsLogGroupArn(value){cdk().traceProperty(this.node,"CloudWatchLogsLogGroupArn"),this._cloudWatchLogsLogGroupArn=value}get cloudWatchLogsRoleArn(){return this._cloudWatchLogsRoleArn}set cloudWatchLogsRoleArn(value){cdk().traceProperty(this.node,"CloudWatchLogsRoleArn"),this._cloudWatchLogsRoleArn=value}get enableLogFileValidation(){return this._enableLogFileValidation}set enableLogFileValidation(value){cdk().traceProperty(this.node,"EnableLogFileValidation"),this._enableLogFileValidation=value}get eventSelectors(){return this._eventSelectors}set eventSelectors(value){cdk().traceProperty(this.node,"EventSelectors"),this._eventSelectors=value}get includeGlobalServiceEvents(){return this._includeGlobalServiceEvents}set includeGlobalServiceEvents(value){cdk().traceProperty(this.node,"IncludeGlobalServiceEvents"),this._includeGlobalServiceEvents=value}get insightSelectors(){return this._insightSelectors}set insightSelectors(value){cdk().traceProperty(this.node,"InsightSelectors"),this._insightSelectors=value}get isLogging(){return this._isLogging}set isLogging(value){cdk().traceProperty(this.node,"IsLogging"),this._isLogging=value}get isMultiRegionTrail(){return this._isMultiRegionTrail}set isMultiRegionTrail(value){cdk().traceProperty(this.node,"IsMultiRegionTrail"),this._isMultiRegionTrail=value}get isOrganizationTrail(){return this._isOrganizationTrail}set isOrganizationTrail(value){cdk().traceProperty(this.node,"IsOrganizationTrail"),this._isOrganizationTrail=value}get kmsKeyId(){return this._kmsKeyId}set kmsKeyId(value){cdk().traceProperty(this.node,"KMSKeyId"),this._kmsKeyId=value}get s3BucketName(){return this._s3BucketName}set s3BucketName(value){cdk().traceProperty(this.node,"S3BucketName"),this._s3BucketName=value}get s3KeyPrefix(){return this._s3KeyPrefix}set s3KeyPrefix(value){cdk().traceProperty(this.node,"S3KeyPrefix"),this._s3KeyPrefix=value}get snsTopicName(){return this._snsTopicName}set snsTopicName(value){cdk().traceProperty(this.node,"SnsTopicName"),this._snsTopicName=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get trailName(){return this._trailName}set trailName(value){cdk().traceProperty(this.node,"TrailName"),this._trailName=value}get attrArn(){return cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING))}get attrSnsTopicArn(){return cdk().Token.asString(this.getAtt("SnsTopicArn",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{advancedEventSelectors:this._advancedEventSelectors,aggregationConfigurations:this._aggregationConfigurations,cloudWatchLogsLogGroupArn:this._cloudWatchLogsLogGroupArn,cloudWatchLogsRoleArn:this._cloudWatchLogsRoleArn,enableLogFileValidation:this._enableLogFileValidation,eventSelectors:this._eventSelectors,includeGlobalServiceEvents:this._includeGlobalServiceEvents,insightSelectors:this._insightSelectors,isLogging:this._isLogging,isMultiRegionTrail:this._isMultiRegionTrail,isOrganizationTrail:this._isOrganizationTrail,kmsKeyId:this._kmsKeyId,s3BucketName:this._s3BucketName,s3KeyPrefix:this._s3KeyPrefix,snsTopicName:this._snsTopicName,tags:this.tags.renderTags(),trailName:this._trailName}}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",CfnTrail.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnTrailPropsToCloudFormation(props)}}exports.CfnTrail=CfnTrail;function CfnTrailDataResourcePropertyValidator(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("type",cdk().requiredValidator)(properties.type)),errors.collect(cdk().propertyValidator("type",cdk().validateString)(properties.type)),errors.collect(cdk().propertyValidator("values",cdk().listValidator(cdk().validateString))(properties.values)),errors.wrap('supplied properties not correct for "DataResourceProperty"')}function convertCfnTrailDataResourcePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTrailDataResourcePropertyValidator(properties).assertSuccess(),{Type:cdk().stringToCloudFormation(properties.type),Values:cdk().listMapper(cdk().stringToCloudFormation)(properties.values)}):properties}function CfnTrailDataResourcePropertyFromCloudFormation(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("type","Type",properties.Type!=null?cfn_parse().FromCloudFormation.getString(properties.Type):void 0),ret.addPropertyResult("values","Values",properties.Values!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.Values):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTrailEventSelectorPropertyValidator(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("dataResources",cdk().listValidator(CfnTrailDataResourcePropertyValidator))(properties.dataResources)),errors.collect(cdk().propertyValidator("excludeManagementEventSources",cdk().listValidator(cdk().validateString))(properties.excludeManagementEventSources)),errors.collect(cdk().propertyValidator("includeManagementEvents",cdk().validateBoolean)(properties.includeManagementEvents)),errors.collect(cdk().propertyValidator("readWriteType",cdk().validateString)(properties.readWriteType)),errors.wrap('supplied properties not correct for "EventSelectorProperty"')}function convertCfnTrailEventSelectorPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTrailEventSelectorPropertyValidator(properties).assertSuccess(),{DataResources:cdk().listMapper(convertCfnTrailDataResourcePropertyToCloudFormation)(properties.dataResources),ExcludeManagementEventSources:cdk().listMapper(cdk().stringToCloudFormation)(properties.excludeManagementEventSources),IncludeManagementEvents:cdk().booleanToCloudFormation(properties.includeManagementEvents),ReadWriteType:cdk().stringToCloudFormation(properties.readWriteType)}):properties}function CfnTrailEventSelectorPropertyFromCloudFormation(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("dataResources","DataResources",properties.DataResources!=null?cfn_parse().FromCloudFormation.getArray(CfnTrailDataResourcePropertyFromCloudFormation)(properties.DataResources):void 0),ret.addPropertyResult("excludeManagementEventSources","ExcludeManagementEventSources",properties.ExcludeManagementEventSources!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.ExcludeManagementEventSources):void 0),ret.addPropertyResult("includeManagementEvents","IncludeManagementEvents",properties.IncludeManagementEvents!=null?cfn_parse().FromCloudFormation.getBoolean(properties.IncludeManagementEvents):void 0),ret.addPropertyResult("readWriteType","ReadWriteType",properties.ReadWriteType!=null?cfn_parse().FromCloudFormation.getString(properties.ReadWriteType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTrailAdvancedFieldSelectorPropertyValidator(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("endsWith",cdk().listValidator(cdk().validateString))(properties.endsWith)),errors.collect(cdk().propertyValidator("equalTo",cdk().listValidator(cdk().validateString))(properties.equalTo)),errors.collect(cdk().propertyValidator("field",