UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 37.1 kB
"use strict";var _a,_b,_c,_d;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnPricingRule=exports.CfnPricingPlan=exports.CfnCustomLineItem=exports.CfnBillingGroup=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 CfnBillingGroupPropsValidator(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("accountGrouping",cdk.requiredValidator)(properties.accountGrouping)),errors.collect(cdk.propertyValidator("accountGrouping",CfnBillingGroup_AccountGroupingPropertyValidator)(properties.accountGrouping)),errors.collect(cdk.propertyValidator("computationPreference",cdk.requiredValidator)(properties.computationPreference)),errors.collect(cdk.propertyValidator("computationPreference",CfnBillingGroup_ComputationPreferencePropertyValidator)(properties.computationPreference)),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("primaryAccountId",cdk.requiredValidator)(properties.primaryAccountId)),errors.collect(cdk.propertyValidator("primaryAccountId",cdk.validateString)(properties.primaryAccountId)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnBillingGroupProps"')}function cfnBillingGroupPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnBillingGroupPropsValidator(properties).assertSuccess(),{AccountGrouping:cfnBillingGroupAccountGroupingPropertyToCloudFormation(properties.accountGrouping),ComputationPreference:cfnBillingGroupComputationPreferencePropertyToCloudFormation(properties.computationPreference),Name:cdk.stringToCloudFormation(properties.name),PrimaryAccountId:cdk.stringToCloudFormation(properties.primaryAccountId),Description:cdk.stringToCloudFormation(properties.description),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnBillingGroupPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("accountGrouping","AccountGrouping",CfnBillingGroupAccountGroupingPropertyFromCloudFormation(properties.AccountGrouping)),ret.addPropertyResult("computationPreference","ComputationPreference",CfnBillingGroupComputationPreferencePropertyFromCloudFormation(properties.ComputationPreference)),ret.addPropertyResult("name","Name",cfn_parse.FromCloudFormation.getString(properties.Name)),ret.addPropertyResult("primaryAccountId","PrimaryAccountId",cfn_parse.FromCloudFormation.getString(properties.PrimaryAccountId)),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):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 CfnBillingGroup extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnBillingGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_billingconductor_CfnBillingGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnBillingGroup),error}cdk.requireProperty(props,"accountGrouping",this),cdk.requireProperty(props,"computationPreference",this),cdk.requireProperty(props,"name",this),cdk.requireProperty(props,"primaryAccountId",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrCreationTime=cdk.Token.asNumber(this.getAtt("CreationTime",cdk.ResolutionTypeHint.NUMBER)),this.attrLastModifiedTime=cdk.Token.asNumber(this.getAtt("LastModifiedTime",cdk.ResolutionTypeHint.NUMBER)),this.attrSize=cdk.Token.asNumber(this.getAtt("Size",cdk.ResolutionTypeHint.NUMBER)),this.attrStatus=cdk.Token.asString(this.getAtt("Status",cdk.ResolutionTypeHint.STRING)),this.attrStatusReason=cdk.Token.asString(this.getAtt("StatusReason",cdk.ResolutionTypeHint.STRING)),this.accountGrouping=props.accountGrouping,this.computationPreference=props.computationPreference,this.name=props.name,this.primaryAccountId=props.primaryAccountId,this.description=props.description,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::BillingConductor::BillingGroup",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnBillingGroupPropsFromCloudFormation(resourceProperties),ret=new CfnBillingGroup(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",CfnBillingGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{accountGrouping:this.accountGrouping,computationPreference:this.computationPreference,name:this.name,primaryAccountId:this.primaryAccountId,description:this.description,tags:this.tags.renderTags()}}renderProperties(props){return cfnBillingGroupPropsToCloudFormation(props)}}exports.CfnBillingGroup=CfnBillingGroup,_a=JSII_RTTI_SYMBOL_1,CfnBillingGroup[_a]={fqn:"aws-cdk-lib.aws_billingconductor.CfnBillingGroup",version:"2.70.0"},CfnBillingGroup.CFN_RESOURCE_TYPE_NAME="AWS::BillingConductor::BillingGroup";function CfnBillingGroup_AccountGroupingPropertyValidator(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("linkedAccountIds",cdk.requiredValidator)(properties.linkedAccountIds)),errors.collect(cdk.propertyValidator("linkedAccountIds",cdk.listValidator(cdk.validateString))(properties.linkedAccountIds)),errors.wrap('supplied properties not correct for "AccountGroupingProperty"')}function cfnBillingGroupAccountGroupingPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnBillingGroup_AccountGroupingPropertyValidator(properties).assertSuccess(),{LinkedAccountIds:cdk.listMapper(cdk.stringToCloudFormation)(properties.linkedAccountIds)}):properties}function CfnBillingGroupAccountGroupingPropertyFromCloudFormation(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("linkedAccountIds","LinkedAccountIds",cfn_parse.FromCloudFormation.getStringArray(properties.LinkedAccountIds)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBillingGroup_ComputationPreferencePropertyValidator(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("pricingPlanArn",cdk.requiredValidator)(properties.pricingPlanArn)),errors.collect(cdk.propertyValidator("pricingPlanArn",cdk.validateString)(properties.pricingPlanArn)),errors.wrap('supplied properties not correct for "ComputationPreferenceProperty"')}function cfnBillingGroupComputationPreferencePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnBillingGroup_ComputationPreferencePropertyValidator(properties).assertSuccess(),{PricingPlanArn:cdk.stringToCloudFormation(properties.pricingPlanArn)}):properties}function CfnBillingGroupComputationPreferencePropertyFromCloudFormation(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("pricingPlanArn","PricingPlanArn",cfn_parse.FromCloudFormation.getString(properties.PricingPlanArn)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCustomLineItemPropsValidator(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("billingGroupArn",cdk.requiredValidator)(properties.billingGroupArn)),errors.collect(cdk.propertyValidator("billingGroupArn",cdk.validateString)(properties.billingGroupArn)),errors.collect(cdk.propertyValidator("billingPeriodRange",CfnCustomLineItem_BillingPeriodRangePropertyValidator)(properties.billingPeriodRange)),errors.collect(cdk.propertyValidator("customLineItemChargeDetails",CfnCustomLineItem_CustomLineItemChargeDetailsPropertyValidator)(properties.customLineItemChargeDetails)),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("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnCustomLineItemProps"')}function cfnCustomLineItemPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCustomLineItemPropsValidator(properties).assertSuccess(),{BillingGroupArn:cdk.stringToCloudFormation(properties.billingGroupArn),Name:cdk.stringToCloudFormation(properties.name),BillingPeriodRange:cfnCustomLineItemBillingPeriodRangePropertyToCloudFormation(properties.billingPeriodRange),CustomLineItemChargeDetails:cfnCustomLineItemCustomLineItemChargeDetailsPropertyToCloudFormation(properties.customLineItemChargeDetails),Description:cdk.stringToCloudFormation(properties.description),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnCustomLineItemPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("billingGroupArn","BillingGroupArn",cfn_parse.FromCloudFormation.getString(properties.BillingGroupArn)),ret.addPropertyResult("name","Name",cfn_parse.FromCloudFormation.getString(properties.Name)),ret.addPropertyResult("billingPeriodRange","BillingPeriodRange",properties.BillingPeriodRange!=null?CfnCustomLineItemBillingPeriodRangePropertyFromCloudFormation(properties.BillingPeriodRange):void 0),ret.addPropertyResult("customLineItemChargeDetails","CustomLineItemChargeDetails",properties.CustomLineItemChargeDetails!=null?CfnCustomLineItemCustomLineItemChargeDetailsPropertyFromCloudFormation(properties.CustomLineItemChargeDetails):void 0),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):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 CfnCustomLineItem extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnCustomLineItem.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_billingconductor_CfnCustomLineItemProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnCustomLineItem),error}cdk.requireProperty(props,"billingGroupArn",this),cdk.requireProperty(props,"name",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrAssociationSize=cdk.Token.asNumber(this.getAtt("AssociationSize",cdk.ResolutionTypeHint.NUMBER)),this.attrCreationTime=cdk.Token.asNumber(this.getAtt("CreationTime",cdk.ResolutionTypeHint.NUMBER)),this.attrCurrencyCode=cdk.Token.asString(this.getAtt("CurrencyCode",cdk.ResolutionTypeHint.STRING)),this.attrLastModifiedTime=cdk.Token.asNumber(this.getAtt("LastModifiedTime",cdk.ResolutionTypeHint.NUMBER)),this.attrProductCode=cdk.Token.asString(this.getAtt("ProductCode",cdk.ResolutionTypeHint.STRING)),this.billingGroupArn=props.billingGroupArn,this.name=props.name,this.billingPeriodRange=props.billingPeriodRange,this.customLineItemChargeDetails=props.customLineItemChargeDetails,this.description=props.description,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::BillingConductor::CustomLineItem",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnCustomLineItemPropsFromCloudFormation(resourceProperties),ret=new CfnCustomLineItem(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",CfnCustomLineItem.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{billingGroupArn:this.billingGroupArn,name:this.name,billingPeriodRange:this.billingPeriodRange,customLineItemChargeDetails:this.customLineItemChargeDetails,description:this.description,tags:this.tags.renderTags()}}renderProperties(props){return cfnCustomLineItemPropsToCloudFormation(props)}}exports.CfnCustomLineItem=CfnCustomLineItem,_b=JSII_RTTI_SYMBOL_1,CfnCustomLineItem[_b]={fqn:"aws-cdk-lib.aws_billingconductor.CfnCustomLineItem",version:"2.70.0"},CfnCustomLineItem.CFN_RESOURCE_TYPE_NAME="AWS::BillingConductor::CustomLineItem";function CfnCustomLineItem_BillingPeriodRangePropertyValidator(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("exclusiveEndBillingPeriod",cdk.validateString)(properties.exclusiveEndBillingPeriod)),errors.collect(cdk.propertyValidator("inclusiveStartBillingPeriod",cdk.validateString)(properties.inclusiveStartBillingPeriod)),errors.wrap('supplied properties not correct for "BillingPeriodRangeProperty"')}function cfnCustomLineItemBillingPeriodRangePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCustomLineItem_BillingPeriodRangePropertyValidator(properties).assertSuccess(),{ExclusiveEndBillingPeriod:cdk.stringToCloudFormation(properties.exclusiveEndBillingPeriod),InclusiveStartBillingPeriod:cdk.stringToCloudFormation(properties.inclusiveStartBillingPeriod)}):properties}function CfnCustomLineItemBillingPeriodRangePropertyFromCloudFormation(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("exclusiveEndBillingPeriod","ExclusiveEndBillingPeriod",properties.ExclusiveEndBillingPeriod!=null?cfn_parse.FromCloudFormation.getString(properties.ExclusiveEndBillingPeriod):void 0),ret.addPropertyResult("inclusiveStartBillingPeriod","InclusiveStartBillingPeriod",properties.InclusiveStartBillingPeriod!=null?cfn_parse.FromCloudFormation.getString(properties.InclusiveStartBillingPeriod):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCustomLineItem_CustomLineItemChargeDetailsPropertyValidator(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("flat",CfnCustomLineItem_CustomLineItemFlatChargeDetailsPropertyValidator)(properties.flat)),errors.collect(cdk.propertyValidator("percentage",CfnCustomLineItem_CustomLineItemPercentageChargeDetailsPropertyValidator)(properties.percentage)),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 "CustomLineItemChargeDetailsProperty"')}function cfnCustomLineItemCustomLineItemChargeDetailsPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCustomLineItem_CustomLineItemChargeDetailsPropertyValidator(properties).assertSuccess(),{Flat:cfnCustomLineItemCustomLineItemFlatChargeDetailsPropertyToCloudFormation(properties.flat),Percentage:cfnCustomLineItemCustomLineItemPercentageChargeDetailsPropertyToCloudFormation(properties.percentage),Type:cdk.stringToCloudFormation(properties.type)}):properties}function CfnCustomLineItemCustomLineItemChargeDetailsPropertyFromCloudFormation(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("flat","Flat",properties.Flat!=null?CfnCustomLineItemCustomLineItemFlatChargeDetailsPropertyFromCloudFormation(properties.Flat):void 0),ret.addPropertyResult("percentage","Percentage",properties.Percentage!=null?CfnCustomLineItemCustomLineItemPercentageChargeDetailsPropertyFromCloudFormation(properties.Percentage):void 0),ret.addPropertyResult("type","Type",cfn_parse.FromCloudFormation.getString(properties.Type)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCustomLineItem_CustomLineItemFlatChargeDetailsPropertyValidator(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("chargeValue",cdk.requiredValidator)(properties.chargeValue)),errors.collect(cdk.propertyValidator("chargeValue",cdk.validateNumber)(properties.chargeValue)),errors.wrap('supplied properties not correct for "CustomLineItemFlatChargeDetailsProperty"')}function cfnCustomLineItemCustomLineItemFlatChargeDetailsPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCustomLineItem_CustomLineItemFlatChargeDetailsPropertyValidator(properties).assertSuccess(),{ChargeValue:cdk.numberToCloudFormation(properties.chargeValue)}):properties}function CfnCustomLineItemCustomLineItemFlatChargeDetailsPropertyFromCloudFormation(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("chargeValue","ChargeValue",cfn_parse.FromCloudFormation.getNumber(properties.ChargeValue)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCustomLineItem_CustomLineItemPercentageChargeDetailsPropertyValidator(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("childAssociatedResources",cdk.listValidator(cdk.validateString))(properties.childAssociatedResources)),errors.collect(cdk.propertyValidator("percentageValue",cdk.requiredValidator)(properties.percentageValue)),errors.collect(cdk.propertyValidator("percentageValue",cdk.validateNumber)(properties.percentageValue)),errors.wrap('supplied properties not correct for "CustomLineItemPercentageChargeDetailsProperty"')}function cfnCustomLineItemCustomLineItemPercentageChargeDetailsPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCustomLineItem_CustomLineItemPercentageChargeDetailsPropertyValidator(properties).assertSuccess(),{ChildAssociatedResources:cdk.listMapper(cdk.stringToCloudFormation)(properties.childAssociatedResources),PercentageValue:cdk.numberToCloudFormation(properties.percentageValue)}):properties}function CfnCustomLineItemCustomLineItemPercentageChargeDetailsPropertyFromCloudFormation(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("childAssociatedResources","ChildAssociatedResources",properties.ChildAssociatedResources!=null?cfn_parse.FromCloudFormation.getStringArray(properties.ChildAssociatedResources):void 0),ret.addPropertyResult("percentageValue","PercentageValue",cfn_parse.FromCloudFormation.getNumber(properties.PercentageValue)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPricingPlanPropsValidator(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("pricingRuleArns",cdk.listValidator(cdk.validateString))(properties.pricingRuleArns)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnPricingPlanProps"')}function cfnPricingPlanPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPricingPlanPropsValidator(properties).assertSuccess(),{Name:cdk.stringToCloudFormation(properties.name),Description:cdk.stringToCloudFormation(properties.description),PricingRuleArns:cdk.listMapper(cdk.stringToCloudFormation)(properties.pricingRuleArns),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnPricingPlanPropsFromCloudFormation(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("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("pricingRuleArns","PricingRuleArns",properties.PricingRuleArns!=null?cfn_parse.FromCloudFormation.getStringArray(properties.PricingRuleArns):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 CfnPricingPlan extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnPricingPlan.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_billingconductor_CfnPricingPlanProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPricingPlan),error}cdk.requireProperty(props,"name",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrCreationTime=cdk.Token.asNumber(this.getAtt("CreationTime",cdk.ResolutionTypeHint.NUMBER)),this.attrLastModifiedTime=cdk.Token.asNumber(this.getAtt("LastModifiedTime",cdk.ResolutionTypeHint.NUMBER)),this.attrSize=cdk.Token.asNumber(this.getAtt("Size",cdk.ResolutionTypeHint.NUMBER)),this.name=props.name,this.description=props.description,this.pricingRuleArns=props.pricingRuleArns,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::BillingConductor::PricingPlan",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPricingPlanPropsFromCloudFormation(resourceProperties),ret=new CfnPricingPlan(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",CfnPricingPlan.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{name:this.name,description:this.description,pricingRuleArns:this.pricingRuleArns,tags:this.tags.renderTags()}}renderProperties(props){return cfnPricingPlanPropsToCloudFormation(props)}}exports.CfnPricingPlan=CfnPricingPlan,_c=JSII_RTTI_SYMBOL_1,CfnPricingPlan[_c]={fqn:"aws-cdk-lib.aws_billingconductor.CfnPricingPlan",version:"2.70.0"},CfnPricingPlan.CFN_RESOURCE_TYPE_NAME="AWS::BillingConductor::PricingPlan";function CfnPricingRulePropsValidator(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("billingEntity",cdk.validateString)(properties.billingEntity)),errors.collect(cdk.propertyValidator("description",cdk.validateString)(properties.description)),errors.collect(cdk.propertyValidator("modifierPercentage",cdk.validateNumber)(properties.modifierPercentage)),errors.collect(cdk.propertyValidator("name",cdk.requiredValidator)(properties.name)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("operation",cdk.validateString)(properties.operation)),errors.collect(cdk.propertyValidator("scope",cdk.requiredValidator)(properties.scope)),errors.collect(cdk.propertyValidator("scope",cdk.validateString)(properties.scope)),errors.collect(cdk.propertyValidator("service",cdk.validateString)(properties.service)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.collect(cdk.propertyValidator("tiering",CfnPricingRule_TieringPropertyValidator)(properties.tiering)),errors.collect(cdk.propertyValidator("type",cdk.requiredValidator)(properties.type)),errors.collect(cdk.propertyValidator("type",cdk.validateString)(properties.type)),errors.collect(cdk.propertyValidator("usageType",cdk.validateString)(properties.usageType)),errors.wrap('supplied properties not correct for "CfnPricingRuleProps"')}function cfnPricingRulePropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPricingRulePropsValidator(properties).assertSuccess(),{Name:cdk.stringToCloudFormation(properties.name),Scope:cdk.stringToCloudFormation(properties.scope),Type:cdk.stringToCloudFormation(properties.type),BillingEntity:cdk.stringToCloudFormation(properties.billingEntity),Description:cdk.stringToCloudFormation(properties.description),ModifierPercentage:cdk.numberToCloudFormation(properties.modifierPercentage),Operation:cdk.stringToCloudFormation(properties.operation),Service:cdk.stringToCloudFormation(properties.service),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags),Tiering:cfnPricingRuleTieringPropertyToCloudFormation(properties.tiering),UsageType:cdk.stringToCloudFormation(properties.usageType)}):properties}function CfnPricingRulePropsFromCloudFormation(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("scope","Scope",cfn_parse.FromCloudFormation.getString(properties.Scope)),ret.addPropertyResult("type","Type",cfn_parse.FromCloudFormation.getString(properties.Type)),ret.addPropertyResult("billingEntity","BillingEntity",properties.BillingEntity!=null?cfn_parse.FromCloudFormation.getString(properties.BillingEntity):void 0),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("modifierPercentage","ModifierPercentage",properties.ModifierPercentage!=null?cfn_parse.FromCloudFormation.getNumber(properties.ModifierPercentage):void 0),ret.addPropertyResult("operation","Operation",properties.Operation!=null?cfn_parse.FromCloudFormation.getString(properties.Operation):void 0),ret.addPropertyResult("service","Service",properties.Service!=null?cfn_parse.FromCloudFormation.getString(properties.Service):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("tiering","Tiering",properties.Tiering!=null?CfnPricingRuleTieringPropertyFromCloudFormation(properties.Tiering):void 0),ret.addPropertyResult("usageType","UsageType",properties.UsageType!=null?cfn_parse.FromCloudFormation.getString(properties.UsageType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnPricingRule extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnPricingRule.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_billingconductor_CfnPricingRuleProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPricingRule),error}cdk.requireProperty(props,"name",this),cdk.requireProperty(props,"scope",this),cdk.requireProperty(props,"type",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrAssociatedPricingPlanCount=cdk.Token.asNumber(this.getAtt("AssociatedPricingPlanCount",cdk.ResolutionTypeHint.NUMBER)),this.attrCreationTime=cdk.Token.asNumber(this.getAtt("CreationTime",cdk.ResolutionTypeHint.NUMBER)),this.attrLastModifiedTime=cdk.Token.asNumber(this.getAtt("LastModifiedTime",cdk.ResolutionTypeHint.NUMBER)),this.name=props.name,this.scope=props.scope,this.type=props.type,this.billingEntity=props.billingEntity,this.description=props.description,this.modifierPercentage=props.modifierPercentage,this.operation=props.operation,this.service=props.service,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::BillingConductor::PricingRule",props.tags,{tagPropertyName:"tags"}),this.tiering=props.tiering,this.usageType=props.usageType}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPricingRulePropsFromCloudFormation(resourceProperties),ret=new CfnPricingRule(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",CfnPricingRule.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{name:this.name,scope:this.scope,type:this.type,billingEntity:this.billingEntity,description:this.description,modifierPercentage:this.modifierPercentage,operation:this.operation,service:this.service,tags:this.tags.renderTags(),tiering:this.tiering,usageType:this.usageType}}renderProperties(props){return cfnPricingRulePropsToCloudFormation(props)}}exports.CfnPricingRule=CfnPricingRule,_d=JSII_RTTI_SYMBOL_1,CfnPricingRule[_d]={fqn:"aws-cdk-lib.aws_billingconductor.CfnPricingRule",version:"2.70.0"},CfnPricingRule.CFN_RESOURCE_TYPE_NAME="AWS::BillingConductor::PricingRule";function CfnPricingRule_FreeTierPropertyValidator(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("activated",cdk.requiredValidator)(properties.activated)),errors.collect(cdk.propertyValidator("activated",cdk.validateBoolean)(properties.activated)),errors.wrap('supplied properties not correct for "FreeTierProperty"')}function cfnPricingRuleFreeTierPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPricingRule_FreeTierPropertyValidator(properties).assertSuccess(),{Activated:cdk.booleanToCloudFormation(properties.activated)}):properties}function CfnPricingRuleFreeTierPropertyFromCloudFormation(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("activated","Activated",cfn_parse.FromCloudFormation.getBoolean(properties.Activated)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPricingRule_TieringPropertyValidator(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("freeTier",CfnPricingRule_FreeTierPropertyValidator)(properties.freeTier)),errors.wrap('supplied properties not correct for "TieringProperty"')}function cfnPricingRuleTieringPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPricingRule_TieringPropertyValidator(properties).assertSuccess(),{FreeTier:cfnPricingRuleFreeTierPropertyToCloudFormation(properties.freeTier)}):properties}function CfnPricingRuleTieringPropertyFromCloudFormation(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("freeTier","FreeTier",properties.FreeTier!=null?CfnPricingRuleFreeTierPropertyFromCloudFormation(properties.FreeTier):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}