UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 12.1 kB
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnFHIRDatastore=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 CfnFHIRDatastorePropsValidator(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("datastoreName",cdk.validateString)(properties.datastoreName)),errors.collect(cdk.propertyValidator("datastoreTypeVersion",cdk.requiredValidator)(properties.datastoreTypeVersion)),errors.collect(cdk.propertyValidator("datastoreTypeVersion",cdk.validateString)(properties.datastoreTypeVersion)),errors.collect(cdk.propertyValidator("preloadDataConfig",CfnFHIRDatastore_PreloadDataConfigPropertyValidator)(properties.preloadDataConfig)),errors.collect(cdk.propertyValidator("sseConfiguration",CfnFHIRDatastore_SseConfigurationPropertyValidator)(properties.sseConfiguration)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnFHIRDatastoreProps"')}function cfnFHIRDatastorePropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnFHIRDatastorePropsValidator(properties).assertSuccess(),{DatastoreTypeVersion:cdk.stringToCloudFormation(properties.datastoreTypeVersion),DatastoreName:cdk.stringToCloudFormation(properties.datastoreName),PreloadDataConfig:cfnFHIRDatastorePreloadDataConfigPropertyToCloudFormation(properties.preloadDataConfig),SseConfiguration:cfnFHIRDatastoreSseConfigurationPropertyToCloudFormation(properties.sseConfiguration),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnFHIRDatastorePropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("datastoreTypeVersion","DatastoreTypeVersion",cfn_parse.FromCloudFormation.getString(properties.DatastoreTypeVersion)),ret.addPropertyResult("datastoreName","DatastoreName",properties.DatastoreName!=null?cfn_parse.FromCloudFormation.getString(properties.DatastoreName):void 0),ret.addPropertyResult("preloadDataConfig","PreloadDataConfig",properties.PreloadDataConfig!=null?CfnFHIRDatastorePreloadDataConfigPropertyFromCloudFormation(properties.PreloadDataConfig):void 0),ret.addPropertyResult("sseConfiguration","SseConfiguration",properties.SseConfiguration!=null?CfnFHIRDatastoreSseConfigurationPropertyFromCloudFormation(properties.SseConfiguration):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 CfnFHIRDatastore extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnFHIRDatastore.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_healthlake_CfnFHIRDatastoreProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnFHIRDatastore),error}cdk.requireProperty(props,"datastoreTypeVersion",this),this.attrCreatedAtNanos=cdk.Token.asNumber(this.getAtt("CreatedAt.Nanos",cdk.ResolutionTypeHint.NUMBER)),this.attrCreatedAtSeconds=cdk.Token.asString(this.getAtt("CreatedAt.Seconds",cdk.ResolutionTypeHint.STRING)),this.attrDatastoreArn=cdk.Token.asString(this.getAtt("DatastoreArn",cdk.ResolutionTypeHint.STRING)),this.attrDatastoreEndpoint=cdk.Token.asString(this.getAtt("DatastoreEndpoint",cdk.ResolutionTypeHint.STRING)),this.attrDatastoreId=cdk.Token.asString(this.getAtt("DatastoreId",cdk.ResolutionTypeHint.STRING)),this.attrDatastoreStatus=cdk.Token.asString(this.getAtt("DatastoreStatus",cdk.ResolutionTypeHint.STRING)),this.datastoreTypeVersion=props.datastoreTypeVersion,this.datastoreName=props.datastoreName,this.preloadDataConfig=props.preloadDataConfig,this.sseConfiguration=props.sseConfiguration,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::HealthLake::FHIRDatastore",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnFHIRDatastorePropsFromCloudFormation(resourceProperties),ret=new CfnFHIRDatastore(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",CfnFHIRDatastore.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{datastoreTypeVersion:this.datastoreTypeVersion,datastoreName:this.datastoreName,preloadDataConfig:this.preloadDataConfig,sseConfiguration:this.sseConfiguration,tags:this.tags.renderTags()}}renderProperties(props){return cfnFHIRDatastorePropsToCloudFormation(props)}}exports.CfnFHIRDatastore=CfnFHIRDatastore,_a=JSII_RTTI_SYMBOL_1,CfnFHIRDatastore[_a]={fqn:"aws-cdk-lib.aws_healthlake.CfnFHIRDatastore",version:"2.70.0"},CfnFHIRDatastore.CFN_RESOURCE_TYPE_NAME="AWS::HealthLake::FHIRDatastore";function CfnFHIRDatastore_CreatedAtPropertyValidator(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("nanos",cdk.requiredValidator)(properties.nanos)),errors.collect(cdk.propertyValidator("nanos",cdk.validateNumber)(properties.nanos)),errors.collect(cdk.propertyValidator("seconds",cdk.requiredValidator)(properties.seconds)),errors.collect(cdk.propertyValidator("seconds",cdk.validateString)(properties.seconds)),errors.wrap('supplied properties not correct for "CreatedAtProperty"')}function cfnFHIRDatastoreCreatedAtPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnFHIRDatastore_CreatedAtPropertyValidator(properties).assertSuccess(),{Nanos:cdk.numberToCloudFormation(properties.nanos),Seconds:cdk.stringToCloudFormation(properties.seconds)}):properties}function CfnFHIRDatastoreCreatedAtPropertyFromCloudFormation(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("nanos","Nanos",cfn_parse.FromCloudFormation.getNumber(properties.Nanos)),ret.addPropertyResult("seconds","Seconds",cfn_parse.FromCloudFormation.getString(properties.Seconds)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnFHIRDatastore_KmsEncryptionConfigPropertyValidator(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("cmkType",cdk.requiredValidator)(properties.cmkType)),errors.collect(cdk.propertyValidator("cmkType",cdk.validateString)(properties.cmkType)),errors.collect(cdk.propertyValidator("kmsKeyId",cdk.validateString)(properties.kmsKeyId)),errors.wrap('supplied properties not correct for "KmsEncryptionConfigProperty"')}function cfnFHIRDatastoreKmsEncryptionConfigPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnFHIRDatastore_KmsEncryptionConfigPropertyValidator(properties).assertSuccess(),{CmkType:cdk.stringToCloudFormation(properties.cmkType),KmsKeyId:cdk.stringToCloudFormation(properties.kmsKeyId)}):properties}function CfnFHIRDatastoreKmsEncryptionConfigPropertyFromCloudFormation(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("cmkType","CmkType",cfn_parse.FromCloudFormation.getString(properties.CmkType)),ret.addPropertyResult("kmsKeyId","KmsKeyId",properties.KmsKeyId!=null?cfn_parse.FromCloudFormation.getString(properties.KmsKeyId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnFHIRDatastore_PreloadDataConfigPropertyValidator(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("preloadDataType",cdk.requiredValidator)(properties.preloadDataType)),errors.collect(cdk.propertyValidator("preloadDataType",cdk.validateString)(properties.preloadDataType)),errors.wrap('supplied properties not correct for "PreloadDataConfigProperty"')}function cfnFHIRDatastorePreloadDataConfigPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnFHIRDatastore_PreloadDataConfigPropertyValidator(properties).assertSuccess(),{PreloadDataType:cdk.stringToCloudFormation(properties.preloadDataType)}):properties}function CfnFHIRDatastorePreloadDataConfigPropertyFromCloudFormation(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("preloadDataType","PreloadDataType",cfn_parse.FromCloudFormation.getString(properties.PreloadDataType)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnFHIRDatastore_SseConfigurationPropertyValidator(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("kmsEncryptionConfig",cdk.requiredValidator)(properties.kmsEncryptionConfig)),errors.collect(cdk.propertyValidator("kmsEncryptionConfig",CfnFHIRDatastore_KmsEncryptionConfigPropertyValidator)(properties.kmsEncryptionConfig)),errors.wrap('supplied properties not correct for "SseConfigurationProperty"')}function cfnFHIRDatastoreSseConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnFHIRDatastore_SseConfigurationPropertyValidator(properties).assertSuccess(),{KmsEncryptionConfig:cfnFHIRDatastoreKmsEncryptionConfigPropertyToCloudFormation(properties.kmsEncryptionConfig)}):properties}function CfnFHIRDatastoreSseConfigurationPropertyFromCloudFormation(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("kmsEncryptionConfig","KmsEncryptionConfig",CfnFHIRDatastoreKmsEncryptionConfigPropertyFromCloudFormation(properties.KmsEncryptionConfig)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}