aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 35 kB
JavaScript
"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnWorkgroup=exports.CfnNamespace=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 CfnNamespacePropsValidator(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("adminUserPassword",cdk.validateString)(properties.adminUserPassword)),errors.collect(cdk.propertyValidator("adminUsername",cdk.validateString)(properties.adminUsername)),errors.collect(cdk.propertyValidator("dbName",cdk.validateString)(properties.dbName)),errors.collect(cdk.propertyValidator("defaultIamRoleArn",cdk.validateString)(properties.defaultIamRoleArn)),errors.collect(cdk.propertyValidator("finalSnapshotName",cdk.validateString)(properties.finalSnapshotName)),errors.collect(cdk.propertyValidator("finalSnapshotRetentionPeriod",cdk.validateNumber)(properties.finalSnapshotRetentionPeriod)),errors.collect(cdk.propertyValidator("iamRoles",cdk.listValidator(cdk.validateString))(properties.iamRoles)),errors.collect(cdk.propertyValidator("kmsKeyId",cdk.validateString)(properties.kmsKeyId)),errors.collect(cdk.propertyValidator("logExports",cdk.listValidator(cdk.validateString))(properties.logExports)),errors.collect(cdk.propertyValidator("namespaceName",cdk.requiredValidator)(properties.namespaceName)),errors.collect(cdk.propertyValidator("namespaceName",cdk.validateString)(properties.namespaceName)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnNamespaceProps"')}function cfnNamespacePropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnNamespacePropsValidator(properties).assertSuccess(),{NamespaceName:cdk.stringToCloudFormation(properties.namespaceName),AdminUsername:cdk.stringToCloudFormation(properties.adminUsername),AdminUserPassword:cdk.stringToCloudFormation(properties.adminUserPassword),DbName:cdk.stringToCloudFormation(properties.dbName),DefaultIamRoleArn:cdk.stringToCloudFormation(properties.defaultIamRoleArn),FinalSnapshotName:cdk.stringToCloudFormation(properties.finalSnapshotName),FinalSnapshotRetentionPeriod:cdk.numberToCloudFormation(properties.finalSnapshotRetentionPeriod),IamRoles:cdk.listMapper(cdk.stringToCloudFormation)(properties.iamRoles),KmsKeyId:cdk.stringToCloudFormation(properties.kmsKeyId),LogExports:cdk.listMapper(cdk.stringToCloudFormation)(properties.logExports),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnNamespacePropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("namespaceName","NamespaceName",cfn_parse.FromCloudFormation.getString(properties.NamespaceName)),ret.addPropertyResult("adminUsername","AdminUsername",properties.AdminUsername!=null?cfn_parse.FromCloudFormation.getString(properties.AdminUsername):void 0),ret.addPropertyResult("adminUserPassword","AdminUserPassword",properties.AdminUserPassword!=null?cfn_parse.FromCloudFormation.getString(properties.AdminUserPassword):void 0),ret.addPropertyResult("dbName","DbName",properties.DbName!=null?cfn_parse.FromCloudFormation.getString(properties.DbName):void 0),ret.addPropertyResult("defaultIamRoleArn","DefaultIamRoleArn",properties.DefaultIamRoleArn!=null?cfn_parse.FromCloudFormation.getString(properties.DefaultIamRoleArn):void 0),ret.addPropertyResult("finalSnapshotName","FinalSnapshotName",properties.FinalSnapshotName!=null?cfn_parse.FromCloudFormation.getString(properties.FinalSnapshotName):void 0),ret.addPropertyResult("finalSnapshotRetentionPeriod","FinalSnapshotRetentionPeriod",properties.FinalSnapshotRetentionPeriod!=null?cfn_parse.FromCloudFormation.getNumber(properties.FinalSnapshotRetentionPeriod):void 0),ret.addPropertyResult("iamRoles","IamRoles",properties.IamRoles!=null?cfn_parse.FromCloudFormation.getStringArray(properties.IamRoles):void 0),ret.addPropertyResult("kmsKeyId","KmsKeyId",properties.KmsKeyId!=null?cfn_parse.FromCloudFormation.getString(properties.KmsKeyId):void 0),ret.addPropertyResult("logExports","LogExports",properties.LogExports!=null?cfn_parse.FromCloudFormation.getStringArray(properties.LogExports):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 CfnNamespace extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnNamespace.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_redshiftserverless_CfnNamespaceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnNamespace),error}cdk.requireProperty(props,"namespaceName",this),this.attrNamespaceAdminUsername=cdk.Token.asString(this.getAtt("Namespace.AdminUsername",cdk.ResolutionTypeHint.STRING)),this.attrNamespaceCreationDate=cdk.Token.asString(this.getAtt("Namespace.CreationDate",cdk.ResolutionTypeHint.STRING)),this.attrNamespaceDbName=cdk.Token.asString(this.getAtt("Namespace.DbName",cdk.ResolutionTypeHint.STRING)),this.attrNamespaceDefaultIamRoleArn=cdk.Token.asString(this.getAtt("Namespace.DefaultIamRoleArn",cdk.ResolutionTypeHint.STRING)),this.attrNamespaceIamRoles=cdk.Token.asList(this.getAtt("Namespace.IamRoles",cdk.ResolutionTypeHint.STRING_LIST)),this.attrNamespaceKmsKeyId=cdk.Token.asString(this.getAtt("Namespace.KmsKeyId",cdk.ResolutionTypeHint.STRING)),this.attrNamespaceLogExports=cdk.Token.asList(this.getAtt("Namespace.LogExports",cdk.ResolutionTypeHint.STRING_LIST)),this.attrNamespaceNamespaceArn=cdk.Token.asString(this.getAtt("Namespace.NamespaceArn",cdk.ResolutionTypeHint.STRING)),this.attrNamespaceNamespaceId=cdk.Token.asString(this.getAtt("Namespace.NamespaceId",cdk.ResolutionTypeHint.STRING)),this.attrNamespaceNamespaceName=cdk.Token.asString(this.getAtt("Namespace.NamespaceName",cdk.ResolutionTypeHint.STRING)),this.attrNamespaceStatus=cdk.Token.asString(this.getAtt("Namespace.Status",cdk.ResolutionTypeHint.STRING)),this.namespaceName=props.namespaceName,this.adminUsername=props.adminUsername,this.adminUserPassword=props.adminUserPassword,this.dbName=props.dbName,this.defaultIamRoleArn=props.defaultIamRoleArn,this.finalSnapshotName=props.finalSnapshotName,this.finalSnapshotRetentionPeriod=props.finalSnapshotRetentionPeriod,this.iamRoles=props.iamRoles,this.kmsKeyId=props.kmsKeyId,this.logExports=props.logExports,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::RedshiftServerless::Namespace",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnNamespacePropsFromCloudFormation(resourceProperties),ret=new CfnNamespace(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",CfnNamespace.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{namespaceName:this.namespaceName,adminUsername:this.adminUsername,adminUserPassword:this.adminUserPassword,dbName:this.dbName,defaultIamRoleArn:this.defaultIamRoleArn,finalSnapshotName:this.finalSnapshotName,finalSnapshotRetentionPeriod:this.finalSnapshotRetentionPeriod,iamRoles:this.iamRoles,kmsKeyId:this.kmsKeyId,logExports:this.logExports,tags:this.tags.renderTags()}}renderProperties(props){return cfnNamespacePropsToCloudFormation(props)}}exports.CfnNamespace=CfnNamespace,_a=JSII_RTTI_SYMBOL_1,CfnNamespace[_a]={fqn:"aws-cdk-lib.aws_redshiftserverless.CfnNamespace",version:"2.70.0"},CfnNamespace.CFN_RESOURCE_TYPE_NAME="AWS::RedshiftServerless::Namespace";function CfnNamespace_NamespacePropertyValidator(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("adminUsername",cdk.validateString)(properties.adminUsername)),errors.collect(cdk.propertyValidator("creationDate",cdk.validateString)(properties.creationDate)),errors.collect(cdk.propertyValidator("dbName",cdk.validateString)(properties.dbName)),errors.collect(cdk.propertyValidator("defaultIamRoleArn",cdk.validateString)(properties.defaultIamRoleArn)),errors.collect(cdk.propertyValidator("iamRoles",cdk.listValidator(cdk.validateString))(properties.iamRoles)),errors.collect(cdk.propertyValidator("kmsKeyId",cdk.validateString)(properties.kmsKeyId)),errors.collect(cdk.propertyValidator("logExports",cdk.listValidator(cdk.validateString))(properties.logExports)),errors.collect(cdk.propertyValidator("namespaceArn",cdk.validateString)(properties.namespaceArn)),errors.collect(cdk.propertyValidator("namespaceId",cdk.validateString)(properties.namespaceId)),errors.collect(cdk.propertyValidator("namespaceName",cdk.validateString)(properties.namespaceName)),errors.collect(cdk.propertyValidator("status",cdk.validateString)(properties.status)),errors.wrap('supplied properties not correct for "NamespaceProperty"')}function cfnNamespaceNamespacePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnNamespace_NamespacePropertyValidator(properties).assertSuccess(),{AdminUsername:cdk.stringToCloudFormation(properties.adminUsername),CreationDate:cdk.stringToCloudFormation(properties.creationDate),DbName:cdk.stringToCloudFormation(properties.dbName),DefaultIamRoleArn:cdk.stringToCloudFormation(properties.defaultIamRoleArn),IamRoles:cdk.listMapper(cdk.stringToCloudFormation)(properties.iamRoles),KmsKeyId:cdk.stringToCloudFormation(properties.kmsKeyId),LogExports:cdk.listMapper(cdk.stringToCloudFormation)(properties.logExports),NamespaceArn:cdk.stringToCloudFormation(properties.namespaceArn),NamespaceId:cdk.stringToCloudFormation(properties.namespaceId),NamespaceName:cdk.stringToCloudFormation(properties.namespaceName),Status:cdk.stringToCloudFormation(properties.status)}):properties}function CfnNamespaceNamespacePropertyFromCloudFormation(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("adminUsername","AdminUsername",properties.AdminUsername!=null?cfn_parse.FromCloudFormation.getString(properties.AdminUsername):void 0),ret.addPropertyResult("creationDate","CreationDate",properties.CreationDate!=null?cfn_parse.FromCloudFormation.getString(properties.CreationDate):void 0),ret.addPropertyResult("dbName","DbName",properties.DbName!=null?cfn_parse.FromCloudFormation.getString(properties.DbName):void 0),ret.addPropertyResult("defaultIamRoleArn","DefaultIamRoleArn",properties.DefaultIamRoleArn!=null?cfn_parse.FromCloudFormation.getString(properties.DefaultIamRoleArn):void 0),ret.addPropertyResult("iamRoles","IamRoles",properties.IamRoles!=null?cfn_parse.FromCloudFormation.getStringArray(properties.IamRoles):void 0),ret.addPropertyResult("kmsKeyId","KmsKeyId",properties.KmsKeyId!=null?cfn_parse.FromCloudFormation.getString(properties.KmsKeyId):void 0),ret.addPropertyResult("logExports","LogExports",properties.LogExports!=null?cfn_parse.FromCloudFormation.getStringArray(properties.LogExports):void 0),ret.addPropertyResult("namespaceArn","NamespaceArn",properties.NamespaceArn!=null?cfn_parse.FromCloudFormation.getString(properties.NamespaceArn):void 0),ret.addPropertyResult("namespaceId","NamespaceId",properties.NamespaceId!=null?cfn_parse.FromCloudFormation.getString(properties.NamespaceId):void 0),ret.addPropertyResult("namespaceName","NamespaceName",properties.NamespaceName!=null?cfn_parse.FromCloudFormation.getString(properties.NamespaceName):void 0),ret.addPropertyResult("status","Status",properties.Status!=null?cfn_parse.FromCloudFormation.getString(properties.Status):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnWorkgroupPropsValidator(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("baseCapacity",cdk.validateNumber)(properties.baseCapacity)),errors.collect(cdk.propertyValidator("configParameters",cdk.listValidator(CfnWorkgroup_ConfigParameterPropertyValidator))(properties.configParameters)),errors.collect(cdk.propertyValidator("enhancedVpcRouting",cdk.validateBoolean)(properties.enhancedVpcRouting)),errors.collect(cdk.propertyValidator("namespaceName",cdk.validateString)(properties.namespaceName)),errors.collect(cdk.propertyValidator("port",cdk.validateNumber)(properties.port)),errors.collect(cdk.propertyValidator("publiclyAccessible",cdk.validateBoolean)(properties.publiclyAccessible)),errors.collect(cdk.propertyValidator("securityGroupIds",cdk.listValidator(cdk.validateString))(properties.securityGroupIds)),errors.collect(cdk.propertyValidator("subnetIds",cdk.listValidator(cdk.validateString))(properties.subnetIds)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.collect(cdk.propertyValidator("workgroupName",cdk.requiredValidator)(properties.workgroupName)),errors.collect(cdk.propertyValidator("workgroupName",cdk.validateString)(properties.workgroupName)),errors.wrap('supplied properties not correct for "CfnWorkgroupProps"')}function cfnWorkgroupPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnWorkgroupPropsValidator(properties).assertSuccess(),{WorkgroupName:cdk.stringToCloudFormation(properties.workgroupName),BaseCapacity:cdk.numberToCloudFormation(properties.baseCapacity),ConfigParameters:cdk.listMapper(cfnWorkgroupConfigParameterPropertyToCloudFormation)(properties.configParameters),EnhancedVpcRouting:cdk.booleanToCloudFormation(properties.enhancedVpcRouting),NamespaceName:cdk.stringToCloudFormation(properties.namespaceName),Port:cdk.numberToCloudFormation(properties.port),PubliclyAccessible:cdk.booleanToCloudFormation(properties.publiclyAccessible),SecurityGroupIds:cdk.listMapper(cdk.stringToCloudFormation)(properties.securityGroupIds),SubnetIds:cdk.listMapper(cdk.stringToCloudFormation)(properties.subnetIds),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnWorkgroupPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("workgroupName","WorkgroupName",cfn_parse.FromCloudFormation.getString(properties.WorkgroupName)),ret.addPropertyResult("baseCapacity","BaseCapacity",properties.BaseCapacity!=null?cfn_parse.FromCloudFormation.getNumber(properties.BaseCapacity):void 0),ret.addPropertyResult("configParameters","ConfigParameters",properties.ConfigParameters!=null?cfn_parse.FromCloudFormation.getArray(CfnWorkgroupConfigParameterPropertyFromCloudFormation)(properties.ConfigParameters):void 0),ret.addPropertyResult("enhancedVpcRouting","EnhancedVpcRouting",properties.EnhancedVpcRouting!=null?cfn_parse.FromCloudFormation.getBoolean(properties.EnhancedVpcRouting):void 0),ret.addPropertyResult("namespaceName","NamespaceName",properties.NamespaceName!=null?cfn_parse.FromCloudFormation.getString(properties.NamespaceName):void 0),ret.addPropertyResult("port","Port",properties.Port!=null?cfn_parse.FromCloudFormation.getNumber(properties.Port):void 0),ret.addPropertyResult("publiclyAccessible","PubliclyAccessible",properties.PubliclyAccessible!=null?cfn_parse.FromCloudFormation.getBoolean(properties.PubliclyAccessible):void 0),ret.addPropertyResult("securityGroupIds","SecurityGroupIds",properties.SecurityGroupIds!=null?cfn_parse.FromCloudFormation.getStringArray(properties.SecurityGroupIds):void 0),ret.addPropertyResult("subnetIds","SubnetIds",properties.SubnetIds!=null?cfn_parse.FromCloudFormation.getStringArray(properties.SubnetIds):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 CfnWorkgroup extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnWorkgroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_redshiftserverless_CfnWorkgroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnWorkgroup),error}cdk.requireProperty(props,"workgroupName",this),this.attrWorkgroupBaseCapacity=cdk.Token.asNumber(this.getAtt("Workgroup.BaseCapacity",cdk.ResolutionTypeHint.NUMBER)),this.attrWorkgroupConfigParameters=this.getAtt("Workgroup.ConfigParameters",cdk.ResolutionTypeHint.STRING),this.attrWorkgroupCreationDate=cdk.Token.asString(this.getAtt("Workgroup.CreationDate",cdk.ResolutionTypeHint.STRING)),this.attrWorkgroupEndpointAddress=cdk.Token.asString(this.getAtt("Workgroup.Endpoint.Address",cdk.ResolutionTypeHint.STRING)),this.attrWorkgroupEndpointPort=cdk.Token.asNumber(this.getAtt("Workgroup.Endpoint.Port",cdk.ResolutionTypeHint.NUMBER)),this.attrWorkgroupEndpointVpcEndpoints=this.getAtt("Workgroup.Endpoint.VpcEndpoints",cdk.ResolutionTypeHint.STRING),this.attrWorkgroupEnhancedVpcRouting=this.getAtt("Workgroup.EnhancedVpcRouting",cdk.ResolutionTypeHint.STRING),this.attrWorkgroupNamespaceName=cdk.Token.asString(this.getAtt("Workgroup.NamespaceName",cdk.ResolutionTypeHint.STRING)),this.attrWorkgroupPubliclyAccessible=this.getAtt("Workgroup.PubliclyAccessible",cdk.ResolutionTypeHint.STRING),this.attrWorkgroupSecurityGroupIds=cdk.Token.asList(this.getAtt("Workgroup.SecurityGroupIds",cdk.ResolutionTypeHint.STRING_LIST)),this.attrWorkgroupStatus=cdk.Token.asString(this.getAtt("Workgroup.Status",cdk.ResolutionTypeHint.STRING)),this.attrWorkgroupSubnetIds=cdk.Token.asList(this.getAtt("Workgroup.SubnetIds",cdk.ResolutionTypeHint.STRING_LIST)),this.attrWorkgroupWorkgroupArn=cdk.Token.asString(this.getAtt("Workgroup.WorkgroupArn",cdk.ResolutionTypeHint.STRING)),this.attrWorkgroupWorkgroupId=cdk.Token.asString(this.getAtt("Workgroup.WorkgroupId",cdk.ResolutionTypeHint.STRING)),this.attrWorkgroupWorkgroupName=cdk.Token.asString(this.getAtt("Workgroup.WorkgroupName",cdk.ResolutionTypeHint.STRING)),this.workgroupName=props.workgroupName,this.baseCapacity=props.baseCapacity,this.configParameters=props.configParameters,this.enhancedVpcRouting=props.enhancedVpcRouting,this.namespaceName=props.namespaceName,this.port=props.port,this.publiclyAccessible=props.publiclyAccessible,this.securityGroupIds=props.securityGroupIds,this.subnetIds=props.subnetIds,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::RedshiftServerless::Workgroup",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnWorkgroupPropsFromCloudFormation(resourceProperties),ret=new CfnWorkgroup(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",CfnWorkgroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{workgroupName:this.workgroupName,baseCapacity:this.baseCapacity,configParameters:this.configParameters,enhancedVpcRouting:this.enhancedVpcRouting,namespaceName:this.namespaceName,port:this.port,publiclyAccessible:this.publiclyAccessible,securityGroupIds:this.securityGroupIds,subnetIds:this.subnetIds,tags:this.tags.renderTags()}}renderProperties(props){return cfnWorkgroupPropsToCloudFormation(props)}}exports.CfnWorkgroup=CfnWorkgroup,_b=JSII_RTTI_SYMBOL_1,CfnWorkgroup[_b]={fqn:"aws-cdk-lib.aws_redshiftserverless.CfnWorkgroup",version:"2.70.0"},CfnWorkgroup.CFN_RESOURCE_TYPE_NAME="AWS::RedshiftServerless::Workgroup";function CfnWorkgroup_ConfigParameterPropertyValidator(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("parameterKey",cdk.validateString)(properties.parameterKey)),errors.collect(cdk.propertyValidator("parameterValue",cdk.validateString)(properties.parameterValue)),errors.wrap('supplied properties not correct for "ConfigParameterProperty"')}function cfnWorkgroupConfigParameterPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnWorkgroup_ConfigParameterPropertyValidator(properties).assertSuccess(),{ParameterKey:cdk.stringToCloudFormation(properties.parameterKey),ParameterValue:cdk.stringToCloudFormation(properties.parameterValue)}):properties}function CfnWorkgroupConfigParameterPropertyFromCloudFormation(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("parameterKey","ParameterKey",properties.ParameterKey!=null?cfn_parse.FromCloudFormation.getString(properties.ParameterKey):void 0),ret.addPropertyResult("parameterValue","ParameterValue",properties.ParameterValue!=null?cfn_parse.FromCloudFormation.getString(properties.ParameterValue):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnWorkgroup_EndpointPropertyValidator(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("address",cdk.validateString)(properties.address)),errors.collect(cdk.propertyValidator("port",cdk.validateNumber)(properties.port)),errors.collect(cdk.propertyValidator("vpcEndpoints",cdk.listValidator(CfnWorkgroup_VpcEndpointPropertyValidator))(properties.vpcEndpoints)),errors.wrap('supplied properties not correct for "EndpointProperty"')}function cfnWorkgroupEndpointPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnWorkgroup_EndpointPropertyValidator(properties).assertSuccess(),{Address:cdk.stringToCloudFormation(properties.address),Port:cdk.numberToCloudFormation(properties.port),VpcEndpoints:cdk.listMapper(cfnWorkgroupVpcEndpointPropertyToCloudFormation)(properties.vpcEndpoints)}):properties}function CfnWorkgroupEndpointPropertyFromCloudFormation(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("address","Address",properties.Address!=null?cfn_parse.FromCloudFormation.getString(properties.Address):void 0),ret.addPropertyResult("port","Port",properties.Port!=null?cfn_parse.FromCloudFormation.getNumber(properties.Port):void 0),ret.addPropertyResult("vpcEndpoints","VpcEndpoints",properties.VpcEndpoints!=null?cfn_parse.FromCloudFormation.getArray(CfnWorkgroupVpcEndpointPropertyFromCloudFormation)(properties.VpcEndpoints):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnWorkgroup_NetworkInterfacePropertyValidator(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("availabilityZone",cdk.validateString)(properties.availabilityZone)),errors.collect(cdk.propertyValidator("networkInterfaceId",cdk.validateString)(properties.networkInterfaceId)),errors.collect(cdk.propertyValidator("privateIpAddress",cdk.validateString)(properties.privateIpAddress)),errors.collect(cdk.propertyValidator("subnetId",cdk.validateString)(properties.subnetId)),errors.wrap('supplied properties not correct for "NetworkInterfaceProperty"')}function cfnWorkgroupNetworkInterfacePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnWorkgroup_NetworkInterfacePropertyValidator(properties).assertSuccess(),{AvailabilityZone:cdk.stringToCloudFormation(properties.availabilityZone),NetworkInterfaceId:cdk.stringToCloudFormation(properties.networkInterfaceId),PrivateIpAddress:cdk.stringToCloudFormation(properties.privateIpAddress),SubnetId:cdk.stringToCloudFormation(properties.subnetId)}):properties}function CfnWorkgroupNetworkInterfacePropertyFromCloudFormation(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("availabilityZone","AvailabilityZone",properties.AvailabilityZone!=null?cfn_parse.FromCloudFormation.getString(properties.AvailabilityZone):void 0),ret.addPropertyResult("networkInterfaceId","NetworkInterfaceId",properties.NetworkInterfaceId!=null?cfn_parse.FromCloudFormation.getString(properties.NetworkInterfaceId):void 0),ret.addPropertyResult("privateIpAddress","PrivateIpAddress",properties.PrivateIpAddress!=null?cfn_parse.FromCloudFormation.getString(properties.PrivateIpAddress):void 0),ret.addPropertyResult("subnetId","SubnetId",properties.SubnetId!=null?cfn_parse.FromCloudFormation.getString(properties.SubnetId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnWorkgroup_VpcEndpointPropertyValidator(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("networkInterfaces",cdk.listValidator(CfnWorkgroup_NetworkInterfacePropertyValidator))(properties.networkInterfaces)),errors.collect(cdk.propertyValidator("vpcEndpointId",cdk.validateString)(properties.vpcEndpointId)),errors.collect(cdk.propertyValidator("vpcId",cdk.validateString)(properties.vpcId)),errors.wrap('supplied properties not correct for "VpcEndpointProperty"')}function cfnWorkgroupVpcEndpointPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnWorkgroup_VpcEndpointPropertyValidator(properties).assertSuccess(),{NetworkInterfaces:cdk.listMapper(cfnWorkgroupNetworkInterfacePropertyToCloudFormation)(properties.networkInterfaces),VpcEndpointId:cdk.stringToCloudFormation(properties.vpcEndpointId),VpcId:cdk.stringToCloudFormation(properties.vpcId)}):properties}function CfnWorkgroupVpcEndpointPropertyFromCloudFormation(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("networkInterfaces","NetworkInterfaces",properties.NetworkInterfaces!=null?cfn_parse.FromCloudFormation.getArray(CfnWorkgroupNetworkInterfacePropertyFromCloudFormation)(properties.NetworkInterfaces):void 0),ret.addPropertyResult("vpcEndpointId","VpcEndpointId",properties.VpcEndpointId!=null?cfn_parse.FromCloudFormation.getString(properties.VpcEndpointId):void 0),ret.addPropertyResult("vpcId","VpcId",properties.VpcId!=null?cfn_parse.FromCloudFormation.getString(properties.VpcId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnWorkgroup_WorkgroupPropertyValidator(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("baseCapacity",cdk.validateNumber)(properties.baseCapacity)),errors.collect(cdk.propertyValidator("configParameters",cdk.listValidator(CfnWorkgroup_ConfigParameterPropertyValidator))(properties.configParameters)),errors.collect(cdk.propertyValidator("creationDate",cdk.validateString)(properties.creationDate)),errors.collect(cdk.propertyValidator("endpoint",CfnWorkgroup_EndpointPropertyValidator)(properties.endpoint)),errors.collect(cdk.propertyValidator("enhancedVpcRouting",cdk.validateBoolean)(properties.enhancedVpcRouting)),errors.collect(cdk.propertyValidator("namespaceName",cdk.validateString)(properties.namespaceName)),errors.collect(cdk.propertyValidator("publiclyAccessible",cdk.validateBoolean)(properties.publiclyAccessible)),errors.collect(cdk.propertyValidator("securityGroupIds",cdk.listValidator(cdk.validateString))(properties.securityGroupIds)),errors.collect(cdk.propertyValidator("status",cdk.validateString)(properties.status)),errors.collect(cdk.propertyValidator("subnetIds",cdk.listValidator(cdk.validateString))(properties.subnetIds)),errors.collect(cdk.propertyValidator("workgroupArn",cdk.validateString)(properties.workgroupArn)),errors.collect(cdk.propertyValidator("workgroupId",cdk.validateString)(properties.workgroupId)),errors.collect(cdk.propertyValidator("workgroupName",cdk.validateString)(properties.workgroupName)),errors.wrap('supplied properties not correct for "WorkgroupProperty"')}function cfnWorkgroupWorkgroupPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnWorkgroup_WorkgroupPropertyValidator(properties).assertSuccess(),{BaseCapacity:cdk.numberToCloudFormation(properties.baseCapacity),ConfigParameters:cdk.listMapper(cfnWorkgroupConfigParameterPropertyToCloudFormation)(properties.configParameters),CreationDate:cdk.stringToCloudFormation(properties.creationDate),Endpoint:cfnWorkgroupEndpointPropertyToCloudFormation(properties.endpoint),EnhancedVpcRouting:cdk.booleanToCloudFormation(properties.enhancedVpcRouting),NamespaceName:cdk.stringToCloudFormation(properties.namespaceName),PubliclyAccessible:cdk.booleanToCloudFormation(properties.publiclyAccessible),SecurityGroupIds:cdk.listMapper(cdk.stringToCloudFormation)(properties.securityGroupIds),Status:cdk.stringToCloudFormation(properties.status),SubnetIds:cdk.listMapper(cdk.stringToCloudFormation)(properties.subnetIds),WorkgroupArn:cdk.stringToCloudFormation(properties.workgroupArn),WorkgroupId:cdk.stringToCloudFormation(properties.workgroupId),WorkgroupName:cdk.stringToCloudFormation(properties.workgroupName)}):properties}function CfnWorkgroupWorkgroupPropertyFromCloudFormation(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("baseCapacity","BaseCapacity",properties.BaseCapacity!=null?cfn_parse.FromCloudFormation.getNumber(properties.BaseCapacity):void 0),ret.addPropertyResult("configParameters","ConfigParameters",properties.ConfigParameters!=null?cfn_parse.FromCloudFormation.getArray(CfnWorkgroupConfigParameterPropertyFromCloudFormation)(properties.ConfigParameters):void 0),ret.addPropertyResult("creationDate","CreationDate",properties.CreationDate!=null?cfn_parse.FromCloudFormation.getString(properties.CreationDate):void 0),ret.addPropertyResult("endpoint","Endpoint",properties.Endpoint!=null?CfnWorkgroupEndpointPropertyFromCloudFormation(properties.Endpoint):void 0),ret.addPropertyResult("enhancedVpcRouting","EnhancedVpcRouting",properties.EnhancedVpcRouting!=null?cfn_parse.FromCloudFormation.getBoolean(properties.EnhancedVpcRouting):void 0),ret.addPropertyResult("namespaceName","NamespaceName",properties.NamespaceName!=null?cfn_parse.FromCloudFormation.getString(properties.NamespaceName):void 0),ret.addPropertyResult("publiclyAccessible","PubliclyAccessible",properties.PubliclyAccessible!=null?cfn_parse.FromCloudFormation.getBoolean(properties.PubliclyAccessible):void 0),ret.addPropertyResult("securityGroupIds","SecurityGroupIds",properties.SecurityGroupIds!=null?cfn_parse.FromCloudFormation.getStringArray(properties.SecurityGroupIds):void 0),ret.addPropertyResult("status","Status",properties.Status!=null?cfn_parse.FromCloudFormation.getString(properties.Status):void 0),ret.addPropertyResult("subnetIds","SubnetIds",properties.SubnetIds!=null?cfn_parse.FromCloudFormation.getStringArray(properties.SubnetIds):void 0),ret.addPropertyResult("workgroupArn","WorkgroupArn",properties.WorkgroupArn!=null?cfn_parse.FromCloudFormation.getString(properties.WorkgroupArn):void 0),ret.addPropertyResult("workgroupId","WorkgroupId",properties.WorkgroupId!=null?cfn_parse.FromCloudFormation.getString(properties.WorkgroupId):void 0),ret.addPropertyResult("workgroupName","WorkgroupName",properties.WorkgroupName!=null?cfn_parse.FromCloudFormation.getString(properties.WorkgroupName):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}