UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 35.5 kB
"use strict";var _a,_b,_c,_d;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnService=exports.CfnRoute=exports.CfnEnvironment=exports.CfnApplication=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");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 CfnApplication extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnApplicationPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnApplication(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}constructor(scope,id,props){super(scope,id,{type:CfnApplication.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_refactorspaces_CfnApplicationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnApplication),error}cdk().requireProperty(props,"environmentIdentifier",this),cdk().requireProperty(props,"name",this),cdk().requireProperty(props,"proxyType",this),cdk().requireProperty(props,"vpcId",this),this.attrApiGatewayId=cdk().Token.asString(this.getAtt("ApiGatewayId",cdk().ResolutionTypeHint.STRING)),this.attrApplicationIdentifier=cdk().Token.asString(this.getAtt("ApplicationIdentifier",cdk().ResolutionTypeHint.STRING)),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrNlbArn=cdk().Token.asString(this.getAtt("NlbArn",cdk().ResolutionTypeHint.STRING)),this.attrNlbName=cdk().Token.asString(this.getAtt("NlbName",cdk().ResolutionTypeHint.STRING)),this.attrProxyUrl=cdk().Token.asString(this.getAtt("ProxyUrl",cdk().ResolutionTypeHint.STRING)),this.attrStageName=cdk().Token.asString(this.getAtt("StageName",cdk().ResolutionTypeHint.STRING)),this.attrVpcLinkId=cdk().Token.asString(this.getAtt("VpcLinkId",cdk().ResolutionTypeHint.STRING)),this.apiGatewayProxy=props.apiGatewayProxy,this.environmentIdentifier=props.environmentIdentifier,this.name=props.name,this.proxyType=props.proxyType,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::RefactorSpaces::Application",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags,this.vpcId=props.vpcId}get cfnProperties(){return{apiGatewayProxy:this.apiGatewayProxy,environmentIdentifier:this.environmentIdentifier,name:this.name,proxyType:this.proxyType,tags:this.tags.renderTags(),vpcId:this.vpcId}}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",CfnApplication.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnApplicationPropsToCloudFormation(props)}}exports.CfnApplication=CfnApplication,_a=JSII_RTTI_SYMBOL_1,CfnApplication[_a]={fqn:"aws-cdk-lib.aws_refactorspaces.CfnApplication",version:"2.202.0"},CfnApplication.CFN_RESOURCE_TYPE_NAME="AWS::RefactorSpaces::Application";function CfnApplicationApiGatewayProxyInputPropertyValidator(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("endpointType",cdk().validateString)(properties.endpointType)),errors.collect(cdk().propertyValidator("stageName",cdk().validateString)(properties.stageName)),errors.wrap('supplied properties not correct for "ApiGatewayProxyInputProperty"')}function convertCfnApplicationApiGatewayProxyInputPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnApplicationApiGatewayProxyInputPropertyValidator(properties).assertSuccess(),{EndpointType:cdk().stringToCloudFormation(properties.endpointType),StageName:cdk().stringToCloudFormation(properties.stageName)}):properties}function CfnApplicationApiGatewayProxyInputPropertyFromCloudFormation(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("endpointType","EndpointType",properties.EndpointType!=null?cfn_parse().FromCloudFormation.getString(properties.EndpointType):void 0),ret.addPropertyResult("stageName","StageName",properties.StageName!=null?cfn_parse().FromCloudFormation.getString(properties.StageName):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnApplicationPropsValidator(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("apiGatewayProxy",CfnApplicationApiGatewayProxyInputPropertyValidator)(properties.apiGatewayProxy)),errors.collect(cdk().propertyValidator("environmentIdentifier",cdk().requiredValidator)(properties.environmentIdentifier)),errors.collect(cdk().propertyValidator("environmentIdentifier",cdk().validateString)(properties.environmentIdentifier)),errors.collect(cdk().propertyValidator("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("proxyType",cdk().requiredValidator)(properties.proxyType)),errors.collect(cdk().propertyValidator("proxyType",cdk().validateString)(properties.proxyType)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("vpcId",cdk().requiredValidator)(properties.vpcId)),errors.collect(cdk().propertyValidator("vpcId",cdk().validateString)(properties.vpcId)),errors.wrap('supplied properties not correct for "CfnApplicationProps"')}function convertCfnApplicationPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnApplicationPropsValidator(properties).assertSuccess(),{ApiGatewayProxy:convertCfnApplicationApiGatewayProxyInputPropertyToCloudFormation(properties.apiGatewayProxy),EnvironmentIdentifier:cdk().stringToCloudFormation(properties.environmentIdentifier),Name:cdk().stringToCloudFormation(properties.name),ProxyType:cdk().stringToCloudFormation(properties.proxyType),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),VpcId:cdk().stringToCloudFormation(properties.vpcId)}):properties}function CfnApplicationPropsFromCloudFormation(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("apiGatewayProxy","ApiGatewayProxy",properties.ApiGatewayProxy!=null?CfnApplicationApiGatewayProxyInputPropertyFromCloudFormation(properties.ApiGatewayProxy):void 0),ret.addPropertyResult("environmentIdentifier","EnvironmentIdentifier",properties.EnvironmentIdentifier!=null?cfn_parse().FromCloudFormation.getString(properties.EnvironmentIdentifier):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("proxyType","ProxyType",properties.ProxyType!=null?cfn_parse().FromCloudFormation.getString(properties.ProxyType):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("vpcId","VpcId",properties.VpcId!=null?cfn_parse().FromCloudFormation.getString(properties.VpcId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnEnvironment extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnEnvironmentPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnEnvironment(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}constructor(scope,id,props={}){super(scope,id,{type:CfnEnvironment.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_refactorspaces_CfnEnvironmentProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnEnvironment),error}this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrEnvironmentIdentifier=cdk().Token.asString(this.getAtt("EnvironmentIdentifier",cdk().ResolutionTypeHint.STRING)),this.attrTransitGatewayId=cdk().Token.asString(this.getAtt("TransitGatewayId",cdk().ResolutionTypeHint.STRING)),this.description=props.description,this.name=props.name,this.networkFabricType=props.networkFabricType,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::RefactorSpaces::Environment",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags}get cfnProperties(){return{description:this.description,name:this.name,networkFabricType:this.networkFabricType,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",CfnEnvironment.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnEnvironmentPropsToCloudFormation(props)}}exports.CfnEnvironment=CfnEnvironment,_b=JSII_RTTI_SYMBOL_1,CfnEnvironment[_b]={fqn:"aws-cdk-lib.aws_refactorspaces.CfnEnvironment",version:"2.202.0"},CfnEnvironment.CFN_RESOURCE_TYPE_NAME="AWS::RefactorSpaces::Environment";function CfnEnvironmentPropsValidator(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("description",cdk().validateString)(properties.description)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("networkFabricType",cdk().validateString)(properties.networkFabricType)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnEnvironmentProps"')}function convertCfnEnvironmentPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnEnvironmentPropsValidator(properties).assertSuccess(),{Description:cdk().stringToCloudFormation(properties.description),Name:cdk().stringToCloudFormation(properties.name),NetworkFabricType:cdk().stringToCloudFormation(properties.networkFabricType),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnEnvironmentPropsFromCloudFormation(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("description","Description",properties.Description!=null?cfn_parse().FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("networkFabricType","NetworkFabricType",properties.NetworkFabricType!=null?cfn_parse().FromCloudFormation.getString(properties.NetworkFabricType):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 CfnRoute extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnRoutePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnRoute(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}constructor(scope,id,props){super(scope,id,{type:CfnRoute.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_refactorspaces_CfnRouteProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnRoute),error}cdk().requireProperty(props,"applicationIdentifier",this),cdk().requireProperty(props,"environmentIdentifier",this),cdk().requireProperty(props,"routeType",this),cdk().requireProperty(props,"serviceIdentifier",this),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrPathResourceToId=cdk().Token.asString(this.getAtt("PathResourceToId",cdk().ResolutionTypeHint.STRING)),this.attrRouteIdentifier=cdk().Token.asString(this.getAtt("RouteIdentifier",cdk().ResolutionTypeHint.STRING)),this.applicationIdentifier=props.applicationIdentifier,this.defaultRoute=props.defaultRoute,this.environmentIdentifier=props.environmentIdentifier,this.routeType=props.routeType,this.serviceIdentifier=props.serviceIdentifier,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::RefactorSpaces::Route",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags,this.uriPathRoute=props.uriPathRoute}get cfnProperties(){return{applicationIdentifier:this.applicationIdentifier,defaultRoute:this.defaultRoute,environmentIdentifier:this.environmentIdentifier,routeType:this.routeType,serviceIdentifier:this.serviceIdentifier,tags:this.tags.renderTags(),uriPathRoute:this.uriPathRoute}}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",CfnRoute.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnRoutePropsToCloudFormation(props)}}exports.CfnRoute=CfnRoute,_c=JSII_RTTI_SYMBOL_1,CfnRoute[_c]={fqn:"aws-cdk-lib.aws_refactorspaces.CfnRoute",version:"2.202.0"},CfnRoute.CFN_RESOURCE_TYPE_NAME="AWS::RefactorSpaces::Route";function CfnRouteUriPathRouteInputPropertyValidator(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("activationState",cdk().requiredValidator)(properties.activationState)),errors.collect(cdk().propertyValidator("activationState",cdk().validateString)(properties.activationState)),errors.collect(cdk().propertyValidator("appendSourcePath",cdk().validateBoolean)(properties.appendSourcePath)),errors.collect(cdk().propertyValidator("includeChildPaths",cdk().validateBoolean)(properties.includeChildPaths)),errors.collect(cdk().propertyValidator("methods",cdk().listValidator(cdk().validateString))(properties.methods)),errors.collect(cdk().propertyValidator("sourcePath",cdk().validateString)(properties.sourcePath)),errors.wrap('supplied properties not correct for "UriPathRouteInputProperty"')}function convertCfnRouteUriPathRouteInputPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnRouteUriPathRouteInputPropertyValidator(properties).assertSuccess(),{ActivationState:cdk().stringToCloudFormation(properties.activationState),AppendSourcePath:cdk().booleanToCloudFormation(properties.appendSourcePath),IncludeChildPaths:cdk().booleanToCloudFormation(properties.includeChildPaths),Methods:cdk().listMapper(cdk().stringToCloudFormation)(properties.methods),SourcePath:cdk().stringToCloudFormation(properties.sourcePath)}):properties}function CfnRouteUriPathRouteInputPropertyFromCloudFormation(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("activationState","ActivationState",properties.ActivationState!=null?cfn_parse().FromCloudFormation.getString(properties.ActivationState):void 0),ret.addPropertyResult("appendSourcePath","AppendSourcePath",properties.AppendSourcePath!=null?cfn_parse().FromCloudFormation.getBoolean(properties.AppendSourcePath):void 0),ret.addPropertyResult("includeChildPaths","IncludeChildPaths",properties.IncludeChildPaths!=null?cfn_parse().FromCloudFormation.getBoolean(properties.IncludeChildPaths):void 0),ret.addPropertyResult("methods","Methods",properties.Methods!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.Methods):void 0),ret.addPropertyResult("sourcePath","SourcePath",properties.SourcePath!=null?cfn_parse().FromCloudFormation.getString(properties.SourcePath):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRouteDefaultRouteInputPropertyValidator(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("activationState",cdk().requiredValidator)(properties.activationState)),errors.collect(cdk().propertyValidator("activationState",cdk().validateString)(properties.activationState)),errors.wrap('supplied properties not correct for "DefaultRouteInputProperty"')}function convertCfnRouteDefaultRouteInputPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnRouteDefaultRouteInputPropertyValidator(properties).assertSuccess(),{ActivationState:cdk().stringToCloudFormation(properties.activationState)}):properties}function CfnRouteDefaultRouteInputPropertyFromCloudFormation(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("activationState","ActivationState",properties.ActivationState!=null?cfn_parse().FromCloudFormation.getString(properties.ActivationState):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRoutePropsValidator(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("applicationIdentifier",cdk().requiredValidator)(properties.applicationIdentifier)),errors.collect(cdk().propertyValidator("applicationIdentifier",cdk().validateString)(properties.applicationIdentifier)),errors.collect(cdk().propertyValidator("defaultRoute",CfnRouteDefaultRouteInputPropertyValidator)(properties.defaultRoute)),errors.collect(cdk().propertyValidator("environmentIdentifier",cdk().requiredValidator)(properties.environmentIdentifier)),errors.collect(cdk().propertyValidator("environmentIdentifier",cdk().validateString)(properties.environmentIdentifier)),errors.collect(cdk().propertyValidator("routeType",cdk().requiredValidator)(properties.routeType)),errors.collect(cdk().propertyValidator("routeType",cdk().validateString)(properties.routeType)),errors.collect(cdk().propertyValidator("serviceIdentifier",cdk().requiredValidator)(properties.serviceIdentifier)),errors.collect(cdk().propertyValidator("serviceIdentifier",cdk().validateString)(properties.serviceIdentifier)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("uriPathRoute",CfnRouteUriPathRouteInputPropertyValidator)(properties.uriPathRoute)),errors.wrap('supplied properties not correct for "CfnRouteProps"')}function convertCfnRoutePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnRoutePropsValidator(properties).assertSuccess(),{ApplicationIdentifier:cdk().stringToCloudFormation(properties.applicationIdentifier),DefaultRoute:convertCfnRouteDefaultRouteInputPropertyToCloudFormation(properties.defaultRoute),EnvironmentIdentifier:cdk().stringToCloudFormation(properties.environmentIdentifier),RouteType:cdk().stringToCloudFormation(properties.routeType),ServiceIdentifier:cdk().stringToCloudFormation(properties.serviceIdentifier),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),UriPathRoute:convertCfnRouteUriPathRouteInputPropertyToCloudFormation(properties.uriPathRoute)}):properties}function CfnRoutePropsFromCloudFormation(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("applicationIdentifier","ApplicationIdentifier",properties.ApplicationIdentifier!=null?cfn_parse().FromCloudFormation.getString(properties.ApplicationIdentifier):void 0),ret.addPropertyResult("defaultRoute","DefaultRoute",properties.DefaultRoute!=null?CfnRouteDefaultRouteInputPropertyFromCloudFormation(properties.DefaultRoute):void 0),ret.addPropertyResult("environmentIdentifier","EnvironmentIdentifier",properties.EnvironmentIdentifier!=null?cfn_parse().FromCloudFormation.getString(properties.EnvironmentIdentifier):void 0),ret.addPropertyResult("routeType","RouteType",properties.RouteType!=null?cfn_parse().FromCloudFormation.getString(properties.RouteType):void 0),ret.addPropertyResult("serviceIdentifier","ServiceIdentifier",properties.ServiceIdentifier!=null?cfn_parse().FromCloudFormation.getString(properties.ServiceIdentifier):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("uriPathRoute","UriPathRoute",properties.UriPathRoute!=null?CfnRouteUriPathRouteInputPropertyFromCloudFormation(properties.UriPathRoute):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnService extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnServicePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnService(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}constructor(scope,id,props){super(scope,id,{type:CfnService.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_refactorspaces_CfnServiceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnService),error}cdk().requireProperty(props,"applicationIdentifier",this),cdk().requireProperty(props,"endpointType",this),cdk().requireProperty(props,"environmentIdentifier",this),cdk().requireProperty(props,"name",this),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrServiceIdentifier=cdk().Token.asString(this.getAtt("ServiceIdentifier",cdk().ResolutionTypeHint.STRING)),this.applicationIdentifier=props.applicationIdentifier,this.description=props.description,this.endpointType=props.endpointType,this.environmentIdentifier=props.environmentIdentifier,this.lambdaEndpoint=props.lambdaEndpoint,this.name=props.name,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::RefactorSpaces::Service",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags,this.urlEndpoint=props.urlEndpoint,this.vpcId=props.vpcId}get cfnProperties(){return{applicationIdentifier:this.applicationIdentifier,description:this.description,endpointType:this.endpointType,environmentIdentifier:this.environmentIdentifier,lambdaEndpoint:this.lambdaEndpoint,name:this.name,tags:this.tags.renderTags(),urlEndpoint:this.urlEndpoint,vpcId:this.vpcId}}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",CfnService.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnServicePropsToCloudFormation(props)}}exports.CfnService=CfnService,_d=JSII_RTTI_SYMBOL_1,CfnService[_d]={fqn:"aws-cdk-lib.aws_refactorspaces.CfnService",version:"2.202.0"},CfnService.CFN_RESOURCE_TYPE_NAME="AWS::RefactorSpaces::Service";function CfnServiceLambdaEndpointInputPropertyValidator(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().requiredValidator)(properties.arn)),errors.collect(cdk().propertyValidator("arn",cdk().validateString)(properties.arn)),errors.wrap('supplied properties not correct for "LambdaEndpointInputProperty"')}function convertCfnServiceLambdaEndpointInputPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnServiceLambdaEndpointInputPropertyValidator(properties).assertSuccess(),{Arn:cdk().stringToCloudFormation(properties.arn)}):properties}function CfnServiceLambdaEndpointInputPropertyFromCloudFormation(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 CfnServiceUrlEndpointInputPropertyValidator(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("healthUrl",cdk().validateString)(properties.healthUrl)),errors.collect(cdk().propertyValidator("url",cdk().requiredValidator)(properties.url)),errors.collect(cdk().propertyValidator("url",cdk().validateString)(properties.url)),errors.wrap('supplied properties not correct for "UrlEndpointInputProperty"')}function convertCfnServiceUrlEndpointInputPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnServiceUrlEndpointInputPropertyValidator(properties).assertSuccess(),{HealthUrl:cdk().stringToCloudFormation(properties.healthUrl),Url:cdk().stringToCloudFormation(properties.url)}):properties}function CfnServiceUrlEndpointInputPropertyFromCloudFormation(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("healthUrl","HealthUrl",properties.HealthUrl!=null?cfn_parse().FromCloudFormation.getString(properties.HealthUrl):void 0),ret.addPropertyResult("url","Url",properties.Url!=null?cfn_parse().FromCloudFormation.getString(properties.Url):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnServicePropsValidator(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("applicationIdentifier",cdk().requiredValidator)(properties.applicationIdentifier)),errors.collect(cdk().propertyValidator("applicationIdentifier",cdk().validateString)(properties.applicationIdentifier)),errors.collect(cdk().propertyValidator("description",cdk().validateString)(properties.description)),errors.collect(cdk().propertyValidator("endpointType",cdk().requiredValidator)(properties.endpointType)),errors.collect(cdk().propertyValidator("endpointType",cdk().validateString)(properties.endpointType)),errors.collect(cdk().propertyValidator("environmentIdentifier",cdk().requiredValidator)(properties.environmentIdentifier)),errors.collect(cdk().propertyValidator("environmentIdentifier",cdk().validateString)(properties.environmentIdentifier)),errors.collect(cdk().propertyValidator("lambdaEndpoint",CfnServiceLambdaEndpointInputPropertyValidator)(properties.lambdaEndpoint)),errors.collect(cdk().propertyValidator("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("urlEndpoint",CfnServiceUrlEndpointInputPropertyValidator)(properties.urlEndpoint)),errors.collect(cdk().propertyValidator("vpcId",cdk().validateString)(properties.vpcId)),errors.wrap('supplied properties not correct for "CfnServiceProps"')}function convertCfnServicePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnServicePropsValidator(properties).assertSuccess(),{ApplicationIdentifier:cdk().stringToCloudFormation(properties.applicationIdentifier),Description:cdk().stringToCloudFormation(properties.description),EndpointType:cdk().stringToCloudFormation(properties.endpointType),EnvironmentIdentifier:cdk().stringToCloudFormation(properties.environmentIdentifier),LambdaEndpoint:convertCfnServiceLambdaEndpointInputPropertyToCloudFormation(properties.lambdaEndpoint),Name:cdk().stringToCloudFormation(properties.name),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),UrlEndpoint:convertCfnServiceUrlEndpointInputPropertyToCloudFormation(properties.urlEndpoint),VpcId:cdk().stringToCloudFormation(properties.vpcId)}):properties}function CfnServicePropsFromCloudFormation(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("applicationIdentifier","ApplicationIdentifier",properties.ApplicationIdentifier!=null?cfn_parse().FromCloudFormation.getString(properties.ApplicationIdentifier):void 0),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse().FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("endpointType","EndpointType",properties.EndpointType!=null?cfn_parse().FromCloudFormation.getString(properties.EndpointType):void 0),ret.addPropertyResult("environmentIdentifier","EnvironmentIdentifier",properties.EnvironmentIdentifier!=null?cfn_parse().FromCloudFormation.getString(properties.EnvironmentIdentifier):void 0),ret.addPropertyResult("lambdaEndpoint","LambdaEndpoint",properties.LambdaEndpoint!=null?CfnServiceLambdaEndpointInputPropertyFromCloudFormation(properties.LambdaEndpoint):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("urlEndpoint","UrlEndpoint",properties.UrlEndpoint!=null?CfnServiceUrlEndpointInputPropertyFromCloudFormation(properties.UrlEndpoint):void 0),ret.addPropertyResult("vpcId","VpcId",properties.VpcId!=null?cfn_parse().FromCloudFormation.getString(properties.VpcId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}