UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

1 lines 150 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnDataset=exports.CfnComputationModel=exports.CfnProject=exports.CfnPortal=exports.CfnGateway=exports.CfnDashboard=exports.CfnAssetModel=exports.CfnAsset=exports.CfnAccessPolicy=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 CfnAccessPolicy extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_iotsitewise.CfnAccessPolicy",version:"2.234.1"};static CFN_RESOURCE_TYPE_NAME="AWS::IoTSiteWise::AccessPolicy";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAccessPolicyPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnAccessPolicy(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 isCfnAccessPolicy(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnAccessPolicy.CFN_RESOURCE_TYPE_NAME}static fromAccessPolicyArn(scope,id,arn){class Import extends cdk().Resource{accessPolicyRef;constructor(scope2,id2,arn2){super(scope2,id2,{environmentFromArn:arn2});const variables=new(cfn_parse()).TemplateString("arn:${Partition}:iotsitewise:${Region}:${Account}:access-policy/${AccessPolicyId}").parse(arn2);this.accessPolicyRef={accessPolicyId:variables.AccessPolicyId,accessPolicyArn:arn2}}}return new Import(scope,id,arn)}static fromAccessPolicyId(scope,id,accessPolicyId){class Import extends cdk().Resource{accessPolicyRef;constructor(scope2,id2,accessPolicyId2){const arn=new(cfn_parse()).TemplateString("arn:${Partition}:iotsitewise:${Region}:${Account}:access-policy/${AccessPolicyId}").interpolate({Partition:cdk().Stack.of(scope2).partition,Region:cdk().Stack.of(scope2).region,Account:cdk().Stack.of(scope2).account,AccessPolicyId:accessPolicyId2});super(scope2,id2,{environmentFromArn:arn}),this.accessPolicyRef={accessPolicyId:accessPolicyId2,accessPolicyArn:arn}}}return new Import(scope,id,accessPolicyId)}static arnForAccessPolicy(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_iotsitewise_IAccessPolicyRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForAccessPolicy),error}return resource.accessPolicyRef.accessPolicyArn}attrAccessPolicyArn;attrAccessPolicyId;accessPolicyIdentity;accessPolicyPermission;accessPolicyResource;constructor(scope,id,props){super(scope,id,{type:CfnAccessPolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_iotsitewise_CfnAccessPolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAccessPolicy),error}cdk().requireProperty(props,"accessPolicyIdentity",this),cdk().requireProperty(props,"accessPolicyPermission",this),cdk().requireProperty(props,"accessPolicyResource",this),this.attrAccessPolicyArn=cdk().Token.asString(this.getAtt("AccessPolicyArn",cdk().ResolutionTypeHint.STRING)),this.attrAccessPolicyId=cdk().Token.asString(this.getAtt("AccessPolicyId",cdk().ResolutionTypeHint.STRING)),this.accessPolicyIdentity=props.accessPolicyIdentity,this.accessPolicyPermission=props.accessPolicyPermission,this.accessPolicyResource=props.accessPolicyResource}get accessPolicyRef(){return{accessPolicyId:this.ref,accessPolicyArn:this.attrAccessPolicyArn}}get cfnProperties(){return{accessPolicyIdentity:this.accessPolicyIdentity,accessPolicyPermission:this.accessPolicyPermission,accessPolicyResource:this.accessPolicyResource}}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",CfnAccessPolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnAccessPolicyPropsToCloudFormation(props)}}exports.CfnAccessPolicy=CfnAccessPolicy;function CfnAccessPolicyProjectPropertyValidator(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("id",cdk().validateString)(properties.id)),errors.wrap('supplied properties not correct for "ProjectProperty"')}function convertCfnAccessPolicyProjectPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAccessPolicyProjectPropertyValidator(properties).assertSuccess(),{id:cdk().stringToCloudFormation(properties.id)}):properties}function CfnAccessPolicyProjectPropertyFromCloudFormation(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("id","id",properties.id!=null?cfn_parse().FromCloudFormation.getString(properties.id):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAccessPolicyPortalPropertyValidator(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("id",cdk().validateString)(properties.id)),errors.wrap('supplied properties not correct for "PortalProperty"')}function convertCfnAccessPolicyPortalPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAccessPolicyPortalPropertyValidator(properties).assertSuccess(),{id:cdk().stringToCloudFormation(properties.id)}):properties}function CfnAccessPolicyPortalPropertyFromCloudFormation(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("id","id",properties.id!=null?cfn_parse().FromCloudFormation.getString(properties.id):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAccessPolicyAccessPolicyResourcePropertyValidator(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("portal",CfnAccessPolicyPortalPropertyValidator)(properties.portal)),errors.collect(cdk().propertyValidator("project",CfnAccessPolicyProjectPropertyValidator)(properties.project)),errors.wrap('supplied properties not correct for "AccessPolicyResourceProperty"')}function convertCfnAccessPolicyAccessPolicyResourcePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAccessPolicyAccessPolicyResourcePropertyValidator(properties).assertSuccess(),{Portal:convertCfnAccessPolicyPortalPropertyToCloudFormation(properties.portal),Project:convertCfnAccessPolicyProjectPropertyToCloudFormation(properties.project)}):properties}function CfnAccessPolicyAccessPolicyResourcePropertyFromCloudFormation(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("portal","Portal",properties.Portal!=null?CfnAccessPolicyPortalPropertyFromCloudFormation(properties.Portal):void 0),ret.addPropertyResult("project","Project",properties.Project!=null?CfnAccessPolicyProjectPropertyFromCloudFormation(properties.Project):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAccessPolicyUserPropertyValidator(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("id",cdk().validateString)(properties.id)),errors.wrap('supplied properties not correct for "UserProperty"')}function convertCfnAccessPolicyUserPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAccessPolicyUserPropertyValidator(properties).assertSuccess(),{id:cdk().stringToCloudFormation(properties.id)}):properties}function CfnAccessPolicyUserPropertyFromCloudFormation(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("id","id",properties.id!=null?cfn_parse().FromCloudFormation.getString(properties.id):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAccessPolicyIamUserPropertyValidator(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("arn",cdk().validateString)(properties.arn)),errors.wrap('supplied properties not correct for "IamUserProperty"')}function convertCfnAccessPolicyIamUserPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAccessPolicyIamUserPropertyValidator(properties).assertSuccess(),{arn:cdk().stringToCloudFormation(properties.arn)}):properties}function CfnAccessPolicyIamUserPropertyFromCloudFormation(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("arn","arn",properties.arn!=null?cfn_parse().FromCloudFormation.getString(properties.arn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAccessPolicyIamRolePropertyValidator(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("arn",cdk().validateString)(properties.arn)),errors.wrap('supplied properties not correct for "IamRoleProperty"')}function convertCfnAccessPolicyIamRolePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAccessPolicyIamRolePropertyValidator(properties).assertSuccess(),{arn:cdk().stringToCloudFormation(properties.arn)}):properties}function CfnAccessPolicyIamRolePropertyFromCloudFormation(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("arn","arn",properties.arn!=null?cfn_parse().FromCloudFormation.getString(properties.arn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAccessPolicyAccessPolicyIdentityPropertyValidator(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("iamRole",CfnAccessPolicyIamRolePropertyValidator)(properties.iamRole)),errors.collect(cdk().propertyValidator("iamUser",CfnAccessPolicyIamUserPropertyValidator)(properties.iamUser)),errors.collect(cdk().propertyValidator("user",CfnAccessPolicyUserPropertyValidator)(properties.user)),errors.wrap('supplied properties not correct for "AccessPolicyIdentityProperty"')}function convertCfnAccessPolicyAccessPolicyIdentityPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAccessPolicyAccessPolicyIdentityPropertyValidator(properties).assertSuccess(),{IamRole:convertCfnAccessPolicyIamRolePropertyToCloudFormation(properties.iamRole),IamUser:convertCfnAccessPolicyIamUserPropertyToCloudFormation(properties.iamUser),User:convertCfnAccessPolicyUserPropertyToCloudFormation(properties.user)}):properties}function CfnAccessPolicyAccessPolicyIdentityPropertyFromCloudFormation(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("iamRole","IamRole",properties.IamRole!=null?CfnAccessPolicyIamRolePropertyFromCloudFormation(properties.IamRole):void 0),ret.addPropertyResult("iamUser","IamUser",properties.IamUser!=null?CfnAccessPolicyIamUserPropertyFromCloudFormation(properties.IamUser):void 0),ret.addPropertyResult("user","User",properties.User!=null?CfnAccessPolicyUserPropertyFromCloudFormation(properties.User):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAccessPolicyPropsValidator(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("accessPolicyIdentity",cdk().requiredValidator)(properties.accessPolicyIdentity)),errors.collect(cdk().propertyValidator("accessPolicyIdentity",CfnAccessPolicyAccessPolicyIdentityPropertyValidator)(properties.accessPolicyIdentity)),errors.collect(cdk().propertyValidator("accessPolicyPermission",cdk().requiredValidator)(properties.accessPolicyPermission)),errors.collect(cdk().propertyValidator("accessPolicyPermission",cdk().validateString)(properties.accessPolicyPermission)),errors.collect(cdk().propertyValidator("accessPolicyResource",cdk().requiredValidator)(properties.accessPolicyResource)),errors.collect(cdk().propertyValidator("accessPolicyResource",CfnAccessPolicyAccessPolicyResourcePropertyValidator)(properties.accessPolicyResource)),errors.wrap('supplied properties not correct for "CfnAccessPolicyProps"')}function convertCfnAccessPolicyPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAccessPolicyPropsValidator(properties).assertSuccess(),{AccessPolicyIdentity:convertCfnAccessPolicyAccessPolicyIdentityPropertyToCloudFormation(properties.accessPolicyIdentity),AccessPolicyPermission:cdk().stringToCloudFormation(properties.accessPolicyPermission),AccessPolicyResource:convertCfnAccessPolicyAccessPolicyResourcePropertyToCloudFormation(properties.accessPolicyResource)}):properties}function CfnAccessPolicyPropsFromCloudFormation(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("accessPolicyIdentity","AccessPolicyIdentity",properties.AccessPolicyIdentity!=null?CfnAccessPolicyAccessPolicyIdentityPropertyFromCloudFormation(properties.AccessPolicyIdentity):void 0),ret.addPropertyResult("accessPolicyPermission","AccessPolicyPermission",properties.AccessPolicyPermission!=null?cfn_parse().FromCloudFormation.getString(properties.AccessPolicyPermission):void 0),ret.addPropertyResult("accessPolicyResource","AccessPolicyResource",properties.AccessPolicyResource!=null?CfnAccessPolicyAccessPolicyResourcePropertyFromCloudFormation(properties.AccessPolicyResource):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnAsset extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_iotsitewise.CfnAsset",version:"2.234.1"};static CFN_RESOURCE_TYPE_NAME="AWS::IoTSiteWise::Asset";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAssetPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnAsset(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 isCfnAsset(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnAsset.CFN_RESOURCE_TYPE_NAME}static fromAssetArn(scope,id,arn){class Import extends cdk().Resource{assetRef;constructor(scope2,id2,arn2){super(scope2,id2,{environmentFromArn:arn2});const variables=new(cfn_parse()).TemplateString("arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}").parse(arn2);this.assetRef={assetId:variables.AssetId,assetArn:arn2}}}return new Import(scope,id,arn)}static fromAssetId(scope,id,assetId){class Import extends cdk().Resource{assetRef;constructor(scope2,id2,assetId2){const arn=new(cfn_parse()).TemplateString("arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}").interpolate({Partition:cdk().Stack.of(scope2).partition,Region:cdk().Stack.of(scope2).region,Account:cdk().Stack.of(scope2).account,AssetId:assetId2});super(scope2,id2,{environmentFromArn:arn}),this.assetRef={assetId:assetId2,assetArn:arn}}}return new Import(scope,id,assetId)}static arnForAsset(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_iotsitewise_IAssetRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForAsset),error}return resource.assetRef.assetArn}attrAssetArn;attrAssetId;assetDescription;assetExternalId;assetHierarchies;assetModelId;assetName;assetProperties;tags;tagsRaw;constructor(scope,id,props){super(scope,id,{type:CfnAsset.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_iotsitewise_CfnAssetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAsset),error}cdk().requireProperty(props,"assetModelId",this),cdk().requireProperty(props,"assetName",this),this.attrAssetArn=cdk().Token.asString(this.getAtt("AssetArn",cdk().ResolutionTypeHint.STRING)),this.attrAssetId=cdk().Token.asString(this.getAtt("AssetId",cdk().ResolutionTypeHint.STRING)),this.assetDescription=props.assetDescription,this.assetExternalId=props.assetExternalId,this.assetHierarchies=props.assetHierarchies,this.assetModelId=props.assetModelId?.assetModelRef?.assetModelId??cdk().ensureStringOrUndefined(props.assetModelId,"assetModelId","iotsitewise.IAssetModelRef | string"),this.assetName=props.assetName,this.assetProperties=props.assetProperties,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::IoTSiteWise::Asset",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags}get assetRef(){return{assetId:this.ref,assetArn:this.attrAssetArn}}get cfnProperties(){return{assetDescription:this.assetDescription,assetExternalId:this.assetExternalId,assetHierarchies:this.assetHierarchies,assetModelId:this.assetModelId,assetName:this.assetName,assetProperties:this.assetProperties,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",CfnAsset.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnAssetPropsToCloudFormation(props)}}exports.CfnAsset=CfnAsset;function CfnAssetAssetPropertyPropertyValidator(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("alias",cdk().validateString)(properties.alias)),errors.collect(cdk().propertyValidator("externalId",cdk().validateString)(properties.externalId)),errors.collect(cdk().propertyValidator("id",cdk().validateString)(properties.id)),errors.collect(cdk().propertyValidator("logicalId",cdk().validateString)(properties.logicalId)),errors.collect(cdk().propertyValidator("notificationState",cdk().validateString)(properties.notificationState)),errors.collect(cdk().propertyValidator("unit",cdk().validateString)(properties.unit)),errors.wrap('supplied properties not correct for "AssetPropertyProperty"')}function convertCfnAssetAssetPropertyPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAssetAssetPropertyPropertyValidator(properties).assertSuccess(),{Alias:cdk().stringToCloudFormation(properties.alias),ExternalId:cdk().stringToCloudFormation(properties.externalId),Id:cdk().stringToCloudFormation(properties.id),LogicalId:cdk().stringToCloudFormation(properties.logicalId),NotificationState:cdk().stringToCloudFormation(properties.notificationState),Unit:cdk().stringToCloudFormation(properties.unit)}):properties}function CfnAssetAssetPropertyPropertyFromCloudFormation(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("alias","Alias",properties.Alias!=null?cfn_parse().FromCloudFormation.getString(properties.Alias):void 0),ret.addPropertyResult("externalId","ExternalId",properties.ExternalId!=null?cfn_parse().FromCloudFormation.getString(properties.ExternalId):void 0),ret.addPropertyResult("id","Id",properties.Id!=null?cfn_parse().FromCloudFormation.getString(properties.Id):void 0),ret.addPropertyResult("logicalId","LogicalId",properties.LogicalId!=null?cfn_parse().FromCloudFormation.getString(properties.LogicalId):void 0),ret.addPropertyResult("notificationState","NotificationState",properties.NotificationState!=null?cfn_parse().FromCloudFormation.getString(properties.NotificationState):void 0),ret.addPropertyResult("unit","Unit",properties.Unit!=null?cfn_parse().FromCloudFormation.getString(properties.Unit):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAssetAssetHierarchyPropertyValidator(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("childAssetId",cdk().requiredValidator)(properties.childAssetId)),errors.collect(cdk().propertyValidator("childAssetId",cdk().validateString)(properties.childAssetId)),errors.collect(cdk().propertyValidator("externalId",cdk().validateString)(properties.externalId)),errors.collect(cdk().propertyValidator("id",cdk().validateString)(properties.id)),errors.collect(cdk().propertyValidator("logicalId",cdk().validateString)(properties.logicalId)),errors.wrap('supplied properties not correct for "AssetHierarchyProperty"')}function convertCfnAssetAssetHierarchyPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAssetAssetHierarchyPropertyValidator(properties).assertSuccess(),{ChildAssetId:cdk().stringToCloudFormation(properties.childAssetId),ExternalId:cdk().stringToCloudFormation(properties.externalId),Id:cdk().stringToCloudFormation(properties.id),LogicalId:cdk().stringToCloudFormation(properties.logicalId)}):properties}function CfnAssetAssetHierarchyPropertyFromCloudFormation(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("childAssetId","ChildAssetId",properties.ChildAssetId!=null?cfn_parse().FromCloudFormation.getString(properties.ChildAssetId):void 0),ret.addPropertyResult("externalId","ExternalId",properties.ExternalId!=null?cfn_parse().FromCloudFormation.getString(properties.ExternalId):void 0),ret.addPropertyResult("id","Id",properties.Id!=null?cfn_parse().FromCloudFormation.getString(properties.Id):void 0),ret.addPropertyResult("logicalId","LogicalId",properties.LogicalId!=null?cfn_parse().FromCloudFormation.getString(properties.LogicalId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAssetPropsValidator(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("assetDescription",cdk().validateString)(properties.assetDescription)),errors.collect(cdk().propertyValidator("assetExternalId",cdk().validateString)(properties.assetExternalId)),errors.collect(cdk().propertyValidator("assetHierarchies",cdk().listValidator(CfnAssetAssetHierarchyPropertyValidator))(properties.assetHierarchies)),errors.collect(cdk().propertyValidator("assetModelId",cdk().requiredValidator)(properties.assetModelId)),errors.collect(cdk().propertyValidator("assetModelId",cdk().validateString)(properties.assetModelId)),errors.collect(cdk().propertyValidator("assetName",cdk().requiredValidator)(properties.assetName)),errors.collect(cdk().propertyValidator("assetName",cdk().validateString)(properties.assetName)),errors.collect(cdk().propertyValidator("assetProperties",cdk().listValidator(CfnAssetAssetPropertyPropertyValidator))(properties.assetProperties)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnAssetProps"')}function convertCfnAssetPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAssetPropsValidator(properties).assertSuccess(),{AssetDescription:cdk().stringToCloudFormation(properties.assetDescription),AssetExternalId:cdk().stringToCloudFormation(properties.assetExternalId),AssetHierarchies:cdk().listMapper(convertCfnAssetAssetHierarchyPropertyToCloudFormation)(properties.assetHierarchies),AssetModelId:cdk().stringToCloudFormation(properties.assetModelId),AssetName:cdk().stringToCloudFormation(properties.assetName),AssetProperties:cdk().listMapper(convertCfnAssetAssetPropertyPropertyToCloudFormation)(properties.assetProperties),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnAssetPropsFromCloudFormation(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("assetDescription","AssetDescription",properties.AssetDescription!=null?cfn_parse().FromCloudFormation.getString(properties.AssetDescription):void 0),ret.addPropertyResult("assetExternalId","AssetExternalId",properties.AssetExternalId!=null?cfn_parse().FromCloudFormation.getString(properties.AssetExternalId):void 0),ret.addPropertyResult("assetHierarchies","AssetHierarchies",properties.AssetHierarchies!=null?cfn_parse().FromCloudFormation.getArray(CfnAssetAssetHierarchyPropertyFromCloudFormation)(properties.AssetHierarchies):void 0),ret.addPropertyResult("assetModelId","AssetModelId",properties.AssetModelId!=null?cfn_parse().FromCloudFormation.getString(properties.AssetModelId):void 0),ret.addPropertyResult("assetName","AssetName",properties.AssetName!=null?cfn_parse().FromCloudFormation.getString(properties.AssetName):void 0),ret.addPropertyResult("assetProperties","AssetProperties",properties.AssetProperties!=null?cfn_parse().FromCloudFormation.getArray(CfnAssetAssetPropertyPropertyFromCloudFormation)(properties.AssetProperties):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 CfnAssetModel extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_iotsitewise.CfnAssetModel",version:"2.234.1"};static CFN_RESOURCE_TYPE_NAME="AWS::IoTSiteWise::AssetModel";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAssetModelPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnAssetModel(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 isCfnAssetModel(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnAssetModel.CFN_RESOURCE_TYPE_NAME}static fromAssetModelArn(scope,id,arn){class Import extends cdk().Resource{assetModelRef;constructor(scope2,id2,arn2){super(scope2,id2,{environmentFromArn:arn2});const variables=new(cfn_parse()).TemplateString("arn:${Partition}:iotsitewise:${Region}:${Account}:asset-model/${AssetModelId}").parse(arn2);this.assetModelRef={assetModelId:variables.AssetModelId,assetModelArn:arn2}}}return new Import(scope,id,arn)}static fromAssetModelId(scope,id,assetModelId){class Import extends cdk().Resource{assetModelRef;constructor(scope2,id2,assetModelId2){const arn=new(cfn_parse()).TemplateString("arn:${Partition}:iotsitewise:${Region}:${Account}:asset-model/${AssetModelId}").interpolate({Partition:cdk().Stack.of(scope2).partition,Region:cdk().Stack.of(scope2).region,Account:cdk().Stack.of(scope2).account,AssetModelId:assetModelId2});super(scope2,id2,{environmentFromArn:arn}),this.assetModelRef={assetModelId:assetModelId2,assetModelArn:arn}}}return new Import(scope,id,assetModelId)}static arnForAssetModel(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_iotsitewise_IAssetModelRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForAssetModel),error}return resource.assetModelRef.assetModelArn}attrAssetModelArn;attrAssetModelId;assetModelCompositeModels;assetModelDescription;assetModelExternalId;assetModelHierarchies;assetModelName;assetModelProperties;assetModelType;enforcedAssetModelInterfaceRelationships;tags;tagsRaw;constructor(scope,id,props){super(scope,id,{type:CfnAssetModel.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_iotsitewise_CfnAssetModelProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAssetModel),error}cdk().requireProperty(props,"assetModelName",this),this.attrAssetModelArn=cdk().Token.asString(this.getAtt("AssetModelArn",cdk().ResolutionTypeHint.STRING)),this.attrAssetModelId=cdk().Token.asString(this.getAtt("AssetModelId",cdk().ResolutionTypeHint.STRING)),this.assetModelCompositeModels=props.assetModelCompositeModels,this.assetModelDescription=props.assetModelDescription,this.assetModelExternalId=props.assetModelExternalId,this.assetModelHierarchies=props.assetModelHierarchies,this.assetModelName=props.assetModelName,this.assetModelProperties=props.assetModelProperties,this.assetModelType=props.assetModelType,this.enforcedAssetModelInterfaceRelationships=props.enforcedAssetModelInterfaceRelationships,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::IoTSiteWise::AssetModel",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags}get assetModelRef(){return{assetModelId:this.ref,assetModelArn:this.attrAssetModelArn}}get cfnProperties(){return{assetModelCompositeModels:this.assetModelCompositeModels,assetModelDescription:this.assetModelDescription,assetModelExternalId:this.assetModelExternalId,assetModelHierarchies:this.assetModelHierarchies,assetModelName:this.assetModelName,assetModelProperties:this.assetModelProperties,assetModelType:this.assetModelType,enforcedAssetModelInterfaceRelationships:this.enforcedAssetModelInterfaceRelationships,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",CfnAssetModel.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnAssetModelPropsToCloudFormation(props)}}exports.CfnAssetModel=CfnAssetModel;function CfnAssetModelAttributePropertyValidator(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("defaultValue",cdk().validateString)(properties.defaultValue)),errors.wrap('supplied properties not correct for "AttributeProperty"')}function convertCfnAssetModelAttributePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAssetModelAttributePropertyValidator(properties).assertSuccess(),{DefaultValue:cdk().stringToCloudFormation(properties.defaultValue)}):properties}function CfnAssetModelAttributePropertyFromCloudFormation(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("defaultValue","DefaultValue",properties.DefaultValue!=null?cfn_parse().FromCloudFormation.getString(properties.DefaultValue):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAssetModelPropertyPathDefinitionPropertyValidator(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("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.wrap('supplied properties not correct for "PropertyPathDefinitionProperty"')}function convertCfnAssetModelPropertyPathDefinitionPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAssetModelPropertyPathDefinitionPropertyValidator(properties).assertSuccess(),{Name:cdk().stringToCloudFormation(properties.name)}):properties}function CfnAssetModelPropertyPathDefinitionPropertyFromCloudFormation(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("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAssetModelVariableValuePropertyValidator(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("hierarchyExternalId",cdk().validateString)(properties.hierarchyExternalId)),errors.collect(cdk().propertyValidator("hierarchyId",cdk().validateString)(properties.hierarchyId)),errors.collect(cdk().propertyValidator("hierarchyLogicalId",cdk().validateString)(properties.hierarchyLogicalId)),errors.collect(cdk().propertyValidator("propertyExternalId",cdk().validateString)(properties.propertyExternalId)),errors.collect(cdk().propertyValidator("propertyId",cdk().validateString)(properties.propertyId)),errors.collect(cdk().propertyValidator("propertyLogicalId",cdk().validateString)(properties.propertyLogicalId)),errors.collect(cdk().propertyValidator("propertyPath",cdk().listValidator(CfnAssetModelPropertyPathDefinitionPropertyValidator))(properties.propertyPath)),errors.wrap('supplied properties not correct for "VariableValueProperty"')}function convertCfnAssetModelVariableValuePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAssetModelVariableValuePropertyValidator(properties).assertSuccess(),{HierarchyExternalId:cdk().stringToCloudFormation(properties.hierarchyExternalId),HierarchyId:cdk().stringToCloudFormation(properties.hierarchyId),HierarchyLogicalId:cdk().stringToCloudFormation(properties.hierarchyLogicalId),PropertyExternalId:cdk().stringToCloudFormation(properties.propertyExternalId),PropertyId:cdk().stringToCloudFormation(properties.propertyId),PropertyLogicalId:cdk().stringToCloudFormation(properties.propertyLogicalId),PropertyPath:cdk().listMapper(convertCfnAssetModelPropertyPathDefinitionPropertyToCloudFormation)(properties.propertyPath)}):properties}function CfnAssetModelVariableValuePropertyFromCloudFormation(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("hierarchyExternalId","HierarchyExternalId",properties.HierarchyExternalId!=null?cfn_parse().FromCloudFormation.getString(properties.HierarchyExternalId):void 0),ret.addPropertyResult("hierarchyId","HierarchyId",properties.HierarchyId!=null?cfn_parse().FromCloudFormation.getString(properties.HierarchyId):void 0),ret.addPropertyResult("hierarchyLogicalId","HierarchyLogicalId",properties.HierarchyLogicalId!=null?cfn_parse().FromCloudFormation.getString(properties.HierarchyLogicalId):void 0),ret.addPropertyResult("propertyExternalId","PropertyExternalId",properties.PropertyExternalId!=null?cfn_parse().FromCloudFormation.getString(properties.PropertyExternalId):void 0),ret.addPropertyResult("propertyId","PropertyId",properties.PropertyId!=null?cfn_parse().FromCloudFormation.getString(properties.PropertyId):void 0),ret.addPropertyResult("propertyLogicalId","PropertyLogicalId",properties.PropertyLogicalId!=null?cfn_parse().FromCloudFormation.getString(properties.PropertyLogicalId):void 0),ret.addPropertyResult("propertyPath","PropertyPath",properties.PropertyPath!=null?cfn_parse().FromCloudFormation.getArray(CfnAssetModelPropertyPathDefinitionPropertyFromCloudFormation)(properties.PropertyPath):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAssetModelExpressionVariablePropertyValidator(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("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("value",cdk().requiredValidator)(properties.value)),errors.collect(cdk().propertyValidator("value",CfnAssetModelVariableValuePropertyValidator)(properties.value)),errors.wrap('supplied properties not correct for "ExpressionVariableProperty"')}function convertCfnAssetModelExpressionVariablePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAssetModelExpressionVariablePropertyValidator(properties).assertSuccess(),{Name:cdk().stringToCloudFormation(properties.name),Value:convertCfnAssetModelVariableValuePropertyToCloudFormation(properties.value)}):properties}function CfnAssetModelExpressionVariablePropertyFromCloudFormation(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("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("value","Value",properties.Value!=null?CfnAssetModelVariableValuePropertyFromCloudFormation(properties.Value):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAssetModelTumblingWindowPropertyValidator(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("interval",cdk().requiredValidator)(properties.interval)),errors.collect(cdk().propertyValidator("interval",cdk().validateString)(properties.interval)),errors.collect(cdk().propertyValidator("offset",cdk().validateString)(properties.offset)),errors.wrap('supplied properties not correct for "TumblingWindowProperty"')}function convertCfnAssetModelTumblingWindowPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAssetModelTumblingWindowPropertyValidator(properties).assertSuccess(),{Interval:cdk().stringToCloudFormation(properties.interval),Offset:cdk().stringToCloudFormation(properties.offset)}):properties}function CfnAssetModelTumblingWindowPropertyFromCloudFormation(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("interval","Interval",properties.Interval!=null?cfn_parse().FromCloudFormation.getString(properties.Interval):void 0),ret.addPropertyResult("offset","Offset",properties.Offset!=null?cfn_parse().FromCloudFormation.getString(properties.Offset):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAssetModelMetricWindowPropertyValidator(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("tumbling",CfnAssetModelTumblingWindowPropertyValidator)(properties.tumbling)),errors.wrap('supplied properties not correct for "MetricWindowProperty"')}function convertCfnAssetModelMetricWindowPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAssetModelMetricWindowPropertyValidator(properties).assertSuccess(),{Tumbling:convertCfnAssetModelTumblingWindowPropertyToCloudFormation(properties.tumbling)}):properties}function CfnAssetModelMetricWindowPropertyFromCloudFormation(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("tumbling","Tumbling",properties.Tumbling!=null?CfnAssetModelTumblingWindowPropertyFromCloudFormation(properties.Tumbling):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAssetModelMetricPropertyValidator(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("expression",cdk().requiredValidator)(properties.expression)),errors.collect(cdk().propertyValidator("expression",cdk().validateString)(properties.expression)),errors.collect(cdk().propertyValidator("variables",cdk().requiredValidator)(properties.variables)),errors.collect(cdk().propertyValidator("variables",cdk().listValidator(CfnAssetModelExpressionVariablePropertyValidator))(properties.variables)),errors.collect(cdk().propertyValidator("window",cdk().requiredValidator)(properties.window)),errors.collect(cdk().propertyValidator("window",CfnAssetModelMetricWindowPropertyValidator)(properties.window)),errors.wrap('supplied properties not correct for "MetricProperty"')}function convertCfnAssetModelMetricPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAssetModelMetricPropertyValidator(properties).assertSuccess(),{Expression:cdk().stringToCloudFormation(properties.expression),Variables:cdk().listMapper(convertCfnAssetModelExpressionVariablePropertyToCloudFormation)(properties.variables),Window:convertCfnAssetModelMetricWindowPropertyToCloudFormation(properties.window)}):properties}function CfnAssetModelMetricPropertyFromCloudFormation(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("expression","Expression",properties.Expression!=null?cfn_parse().FromCloudFormation.getString(properties.Expression):void 0),ret.addPropertyResult("variables","Variables",properties.Variables!=null?cfn_parse().FromCloudFormation.getArray(CfnAssetModelExpressionVariablePropertyFromCloudFormation)(properties.Variables):void 0),ret.addPropertyResult("window","Window",properties.Window!=null?CfnAssetModelMetricWindowPropertyFromCloudFormation(properties.Window):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAssetModelTransformPr