aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 38.2 kB
JavaScript
"use strict";var _a,_b,_c,_d,_e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnService=exports.CfnPublicDnsNamespace=exports.CfnPrivateDnsNamespace=exports.CfnInstance=exports.CfnHttpNamespace=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 CfnHttpNamespacePropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("description",cdk.validateString)(properties.description)),errors.collect(cdk.propertyValidator("name",cdk.requiredValidator)(properties.name)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnHttpNamespaceProps"')}function cfnHttpNamespacePropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnHttpNamespacePropsValidator(properties).assertSuccess(),{Name:cdk.stringToCloudFormation(properties.name),Description:cdk.stringToCloudFormation(properties.description),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnHttpNamespacePropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("name","Name",cfn_parse.FromCloudFormation.getString(properties.Name)),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnHttpNamespace extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnHttpNamespace.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicediscovery_CfnHttpNamespaceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnHttpNamespace),error}cdk.requireProperty(props,"name",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.name=props.name,this.description=props.description,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::ServiceDiscovery::HttpNamespace",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnHttpNamespacePropsFromCloudFormation(resourceProperties),ret=new CfnHttpNamespace(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",CfnHttpNamespace.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{name:this.name,description:this.description,tags:this.tags.renderTags()}}renderProperties(props){return cfnHttpNamespacePropsToCloudFormation(props)}}exports.CfnHttpNamespace=CfnHttpNamespace,_a=JSII_RTTI_SYMBOL_1,CfnHttpNamespace[_a]={fqn:"aws-cdk-lib.aws_servicediscovery.CfnHttpNamespace",version:"2.70.0"},CfnHttpNamespace.CFN_RESOURCE_TYPE_NAME="AWS::ServiceDiscovery::HttpNamespace";function CfnInstancePropsValidator(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("instanceAttributes",cdk.requiredValidator)(properties.instanceAttributes)),errors.collect(cdk.propertyValidator("instanceAttributes",cdk.validateObject)(properties.instanceAttributes)),errors.collect(cdk.propertyValidator("instanceId",cdk.validateString)(properties.instanceId)),errors.collect(cdk.propertyValidator("serviceId",cdk.requiredValidator)(properties.serviceId)),errors.collect(cdk.propertyValidator("serviceId",cdk.validateString)(properties.serviceId)),errors.wrap('supplied properties not correct for "CfnInstanceProps"')}function cfnInstancePropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnInstancePropsValidator(properties).assertSuccess(),{InstanceAttributes:cdk.objectToCloudFormation(properties.instanceAttributes),ServiceId:cdk.stringToCloudFormation(properties.serviceId),InstanceId:cdk.stringToCloudFormation(properties.instanceId)}):properties}function CfnInstancePropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("instanceAttributes","InstanceAttributes",cfn_parse.FromCloudFormation.getAny(properties.InstanceAttributes)),ret.addPropertyResult("serviceId","ServiceId",cfn_parse.FromCloudFormation.getString(properties.ServiceId)),ret.addPropertyResult("instanceId","InstanceId",properties.InstanceId!=null?cfn_parse.FromCloudFormation.getString(properties.InstanceId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnInstance extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnInstance.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicediscovery_CfnInstanceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnInstance),error}cdk.requireProperty(props,"instanceAttributes",this),cdk.requireProperty(props,"serviceId",this),this.instanceAttributes=props.instanceAttributes,this.serviceId=props.serviceId,this.instanceId=props.instanceId}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnInstancePropsFromCloudFormation(resourceProperties),ret=new CfnInstance(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",CfnInstance.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{instanceAttributes:this.instanceAttributes,serviceId:this.serviceId,instanceId:this.instanceId}}renderProperties(props){return cfnInstancePropsToCloudFormation(props)}}exports.CfnInstance=CfnInstance,_b=JSII_RTTI_SYMBOL_1,CfnInstance[_b]={fqn:"aws-cdk-lib.aws_servicediscovery.CfnInstance",version:"2.70.0"},CfnInstance.CFN_RESOURCE_TYPE_NAME="AWS::ServiceDiscovery::Instance";function CfnPrivateDnsNamespacePropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("description",cdk.validateString)(properties.description)),errors.collect(cdk.propertyValidator("name",cdk.requiredValidator)(properties.name)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("properties",CfnPrivateDnsNamespace_PropertiesPropertyValidator)(properties.properties)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.collect(cdk.propertyValidator("vpc",cdk.requiredValidator)(properties.vpc)),errors.collect(cdk.propertyValidator("vpc",cdk.validateString)(properties.vpc)),errors.wrap('supplied properties not correct for "CfnPrivateDnsNamespaceProps"')}function cfnPrivateDnsNamespacePropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPrivateDnsNamespacePropsValidator(properties).assertSuccess(),{Name:cdk.stringToCloudFormation(properties.name),Vpc:cdk.stringToCloudFormation(properties.vpc),Description:cdk.stringToCloudFormation(properties.description),Properties:cfnPrivateDnsNamespacePropertiesPropertyToCloudFormation(properties.properties),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnPrivateDnsNamespacePropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("name","Name",cfn_parse.FromCloudFormation.getString(properties.Name)),ret.addPropertyResult("vpc","Vpc",cfn_parse.FromCloudFormation.getString(properties.Vpc)),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("properties","Properties",properties.Properties!=null?CfnPrivateDnsNamespacePropertiesPropertyFromCloudFormation(properties.Properties):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 CfnPrivateDnsNamespace extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnPrivateDnsNamespace.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicediscovery_CfnPrivateDnsNamespaceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPrivateDnsNamespace),error}cdk.requireProperty(props,"name",this),cdk.requireProperty(props,"vpc",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrHostedZoneId=cdk.Token.asString(this.getAtt("HostedZoneId",cdk.ResolutionTypeHint.STRING)),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.name=props.name,this.vpc=props.vpc,this.description=props.description,this.properties=props.properties,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::ServiceDiscovery::PrivateDnsNamespace",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPrivateDnsNamespacePropsFromCloudFormation(resourceProperties),ret=new CfnPrivateDnsNamespace(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",CfnPrivateDnsNamespace.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{name:this.name,vpc:this.vpc,description:this.description,properties:this.properties,tags:this.tags.renderTags()}}renderProperties(props){return cfnPrivateDnsNamespacePropsToCloudFormation(props)}}exports.CfnPrivateDnsNamespace=CfnPrivateDnsNamespace,_c=JSII_RTTI_SYMBOL_1,CfnPrivateDnsNamespace[_c]={fqn:"aws-cdk-lib.aws_servicediscovery.CfnPrivateDnsNamespace",version:"2.70.0"},CfnPrivateDnsNamespace.CFN_RESOURCE_TYPE_NAME="AWS::ServiceDiscovery::PrivateDnsNamespace";function CfnPrivateDnsNamespace_PrivateDnsPropertiesMutablePropertyValidator(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("soa",CfnPrivateDnsNamespace_SOAPropertyValidator)(properties.soa)),errors.wrap('supplied properties not correct for "PrivateDnsPropertiesMutableProperty"')}function cfnPrivateDnsNamespacePrivateDnsPropertiesMutablePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPrivateDnsNamespace_PrivateDnsPropertiesMutablePropertyValidator(properties).assertSuccess(),{SOA:cfnPrivateDnsNamespaceSOAPropertyToCloudFormation(properties.soa)}):properties}function CfnPrivateDnsNamespacePrivateDnsPropertiesMutablePropertyFromCloudFormation(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("soa","SOA",properties.SOA!=null?CfnPrivateDnsNamespaceSOAPropertyFromCloudFormation(properties.SOA):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPrivateDnsNamespace_PropertiesPropertyValidator(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("dnsProperties",CfnPrivateDnsNamespace_PrivateDnsPropertiesMutablePropertyValidator)(properties.dnsProperties)),errors.wrap('supplied properties not correct for "PropertiesProperty"')}function cfnPrivateDnsNamespacePropertiesPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPrivateDnsNamespace_PropertiesPropertyValidator(properties).assertSuccess(),{DnsProperties:cfnPrivateDnsNamespacePrivateDnsPropertiesMutablePropertyToCloudFormation(properties.dnsProperties)}):properties}function CfnPrivateDnsNamespacePropertiesPropertyFromCloudFormation(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("dnsProperties","DnsProperties",properties.DnsProperties!=null?CfnPrivateDnsNamespacePrivateDnsPropertiesMutablePropertyFromCloudFormation(properties.DnsProperties):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPrivateDnsNamespace_SOAPropertyValidator(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("ttl",cdk.validateNumber)(properties.ttl)),errors.wrap('supplied properties not correct for "SOAProperty"')}function cfnPrivateDnsNamespaceSOAPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPrivateDnsNamespace_SOAPropertyValidator(properties).assertSuccess(),{TTL:cdk.numberToCloudFormation(properties.ttl)}):properties}function CfnPrivateDnsNamespaceSOAPropertyFromCloudFormation(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("ttl","TTL",properties.TTL!=null?cfn_parse.FromCloudFormation.getNumber(properties.TTL):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPublicDnsNamespacePropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("description",cdk.validateString)(properties.description)),errors.collect(cdk.propertyValidator("name",cdk.requiredValidator)(properties.name)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("properties",CfnPublicDnsNamespace_PropertiesPropertyValidator)(properties.properties)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnPublicDnsNamespaceProps"')}function cfnPublicDnsNamespacePropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPublicDnsNamespacePropsValidator(properties).assertSuccess(),{Name:cdk.stringToCloudFormation(properties.name),Description:cdk.stringToCloudFormation(properties.description),Properties:cfnPublicDnsNamespacePropertiesPropertyToCloudFormation(properties.properties),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnPublicDnsNamespacePropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("name","Name",cfn_parse.FromCloudFormation.getString(properties.Name)),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("properties","Properties",properties.Properties!=null?CfnPublicDnsNamespacePropertiesPropertyFromCloudFormation(properties.Properties):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 CfnPublicDnsNamespace extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnPublicDnsNamespace.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicediscovery_CfnPublicDnsNamespaceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPublicDnsNamespace),error}cdk.requireProperty(props,"name",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrHostedZoneId=cdk.Token.asString(this.getAtt("HostedZoneId",cdk.ResolutionTypeHint.STRING)),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.name=props.name,this.description=props.description,this.properties=props.properties,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::ServiceDiscovery::PublicDnsNamespace",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPublicDnsNamespacePropsFromCloudFormation(resourceProperties),ret=new CfnPublicDnsNamespace(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",CfnPublicDnsNamespace.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{name:this.name,description:this.description,properties:this.properties,tags:this.tags.renderTags()}}renderProperties(props){return cfnPublicDnsNamespacePropsToCloudFormation(props)}}exports.CfnPublicDnsNamespace=CfnPublicDnsNamespace,_d=JSII_RTTI_SYMBOL_1,CfnPublicDnsNamespace[_d]={fqn:"aws-cdk-lib.aws_servicediscovery.CfnPublicDnsNamespace",version:"2.70.0"},CfnPublicDnsNamespace.CFN_RESOURCE_TYPE_NAME="AWS::ServiceDiscovery::PublicDnsNamespace";function CfnPublicDnsNamespace_PropertiesPropertyValidator(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("dnsProperties",CfnPublicDnsNamespace_PublicDnsPropertiesMutablePropertyValidator)(properties.dnsProperties)),errors.wrap('supplied properties not correct for "PropertiesProperty"')}function cfnPublicDnsNamespacePropertiesPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPublicDnsNamespace_PropertiesPropertyValidator(properties).assertSuccess(),{DnsProperties:cfnPublicDnsNamespacePublicDnsPropertiesMutablePropertyToCloudFormation(properties.dnsProperties)}):properties}function CfnPublicDnsNamespacePropertiesPropertyFromCloudFormation(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("dnsProperties","DnsProperties",properties.DnsProperties!=null?CfnPublicDnsNamespacePublicDnsPropertiesMutablePropertyFromCloudFormation(properties.DnsProperties):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPublicDnsNamespace_PublicDnsPropertiesMutablePropertyValidator(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("soa",CfnPublicDnsNamespace_SOAPropertyValidator)(properties.soa)),errors.wrap('supplied properties not correct for "PublicDnsPropertiesMutableProperty"')}function cfnPublicDnsNamespacePublicDnsPropertiesMutablePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPublicDnsNamespace_PublicDnsPropertiesMutablePropertyValidator(properties).assertSuccess(),{SOA:cfnPublicDnsNamespaceSOAPropertyToCloudFormation(properties.soa)}):properties}function CfnPublicDnsNamespacePublicDnsPropertiesMutablePropertyFromCloudFormation(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("soa","SOA",properties.SOA!=null?CfnPublicDnsNamespaceSOAPropertyFromCloudFormation(properties.SOA):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPublicDnsNamespace_SOAPropertyValidator(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("ttl",cdk.validateNumber)(properties.ttl)),errors.wrap('supplied properties not correct for "SOAProperty"')}function cfnPublicDnsNamespaceSOAPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnPublicDnsNamespace_SOAPropertyValidator(properties).assertSuccess(),{TTL:cdk.numberToCloudFormation(properties.ttl)}):properties}function CfnPublicDnsNamespaceSOAPropertyFromCloudFormation(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("ttl","TTL",properties.TTL!=null?cfn_parse.FromCloudFormation.getNumber(properties.TTL):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnServicePropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("description",cdk.validateString)(properties.description)),errors.collect(cdk.propertyValidator("dnsConfig",CfnService_DnsConfigPropertyValidator)(properties.dnsConfig)),errors.collect(cdk.propertyValidator("healthCheckConfig",CfnService_HealthCheckConfigPropertyValidator)(properties.healthCheckConfig)),errors.collect(cdk.propertyValidator("healthCheckCustomConfig",CfnService_HealthCheckCustomConfigPropertyValidator)(properties.healthCheckCustomConfig)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("namespaceId",cdk.validateString)(properties.namespaceId)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.collect(cdk.propertyValidator("type",cdk.validateString)(properties.type)),errors.wrap('supplied properties not correct for "CfnServiceProps"')}function cfnServicePropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnServicePropsValidator(properties).assertSuccess(),{Description:cdk.stringToCloudFormation(properties.description),DnsConfig:cfnServiceDnsConfigPropertyToCloudFormation(properties.dnsConfig),HealthCheckConfig:cfnServiceHealthCheckConfigPropertyToCloudFormation(properties.healthCheckConfig),HealthCheckCustomConfig:cfnServiceHealthCheckCustomConfigPropertyToCloudFormation(properties.healthCheckCustomConfig),Name:cdk.stringToCloudFormation(properties.name),NamespaceId:cdk.stringToCloudFormation(properties.namespaceId),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags),Type:cdk.stringToCloudFormation(properties.type)}):properties}function CfnServicePropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")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("dnsConfig","DnsConfig",properties.DnsConfig!=null?CfnServiceDnsConfigPropertyFromCloudFormation(properties.DnsConfig):void 0),ret.addPropertyResult("healthCheckConfig","HealthCheckConfig",properties.HealthCheckConfig!=null?CfnServiceHealthCheckConfigPropertyFromCloudFormation(properties.HealthCheckConfig):void 0),ret.addPropertyResult("healthCheckCustomConfig","HealthCheckCustomConfig",properties.HealthCheckCustomConfig!=null?CfnServiceHealthCheckCustomConfigPropertyFromCloudFormation(properties.HealthCheckCustomConfig):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse.FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("namespaceId","NamespaceId",properties.NamespaceId!=null?cfn_parse.FromCloudFormation.getString(properties.NamespaceId):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("type","Type",properties.Type!=null?cfn_parse.FromCloudFormation.getString(properties.Type):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnService extends cdk.CfnResource{constructor(scope,id,props={}){super(scope,id,{type:CfnService.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicediscovery_CfnServiceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnService),error}this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.attrName=cdk.Token.asString(this.getAtt("Name",cdk.ResolutionTypeHint.STRING)),this.description=props.description,this.dnsConfig=props.dnsConfig,this.healthCheckConfig=props.healthCheckConfig,this.healthCheckCustomConfig=props.healthCheckCustomConfig,this.name=props.name,this.namespaceId=props.namespaceId,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::ServiceDiscovery::Service",props.tags,{tagPropertyName:"tags"}),this.type=props.type}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnServicePropsFromCloudFormation(resourceProperties),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}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)}get cfnProperties(){return{description:this.description,dnsConfig:this.dnsConfig,healthCheckConfig:this.healthCheckConfig,healthCheckCustomConfig:this.healthCheckCustomConfig,name:this.name,namespaceId:this.namespaceId,tags:this.tags.renderTags(),type:this.type}}renderProperties(props){return cfnServicePropsToCloudFormation(props)}}exports.CfnService=CfnService,_e=JSII_RTTI_SYMBOL_1,CfnService[_e]={fqn:"aws-cdk-lib.aws_servicediscovery.CfnService",version:"2.70.0"},CfnService.CFN_RESOURCE_TYPE_NAME="AWS::ServiceDiscovery::Service";function CfnService_DnsConfigPropertyValidator(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("dnsRecords",cdk.requiredValidator)(properties.dnsRecords)),errors.collect(cdk.propertyValidator("dnsRecords",cdk.listValidator(CfnService_DnsRecordPropertyValidator))(properties.dnsRecords)),errors.collect(cdk.propertyValidator("namespaceId",cdk.validateString)(properties.namespaceId)),errors.collect(cdk.propertyValidator("routingPolicy",cdk.validateString)(properties.routingPolicy)),errors.wrap('supplied properties not correct for "DnsConfigProperty"')}function cfnServiceDnsConfigPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnService_DnsConfigPropertyValidator(properties).assertSuccess(),{DnsRecords:cdk.listMapper(cfnServiceDnsRecordPropertyToCloudFormation)(properties.dnsRecords),NamespaceId:cdk.stringToCloudFormation(properties.namespaceId),RoutingPolicy:cdk.stringToCloudFormation(properties.routingPolicy)}):properties}function CfnServiceDnsConfigPropertyFromCloudFormation(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("dnsRecords","DnsRecords",cfn_parse.FromCloudFormation.getArray(CfnServiceDnsRecordPropertyFromCloudFormation)(properties.DnsRecords)),ret.addPropertyResult("namespaceId","NamespaceId",properties.NamespaceId!=null?cfn_parse.FromCloudFormation.getString(properties.NamespaceId):void 0),ret.addPropertyResult("routingPolicy","RoutingPolicy",properties.RoutingPolicy!=null?cfn_parse.FromCloudFormation.getString(properties.RoutingPolicy):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnService_DnsRecordPropertyValidator(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("ttl",cdk.requiredValidator)(properties.ttl)),errors.collect(cdk.propertyValidator("ttl",cdk.validateNumber)(properties.ttl)),errors.collect(cdk.propertyValidator("type",cdk.requiredValidator)(properties.type)),errors.collect(cdk.propertyValidator("type",cdk.validateString)(properties.type)),errors.wrap('supplied properties not correct for "DnsRecordProperty"')}function cfnServiceDnsRecordPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnService_DnsRecordPropertyValidator(properties).assertSuccess(),{TTL:cdk.numberToCloudFormation(properties.ttl),Type:cdk.stringToCloudFormation(properties.type)}):properties}function CfnServiceDnsRecordPropertyFromCloudFormation(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("ttl","TTL",cfn_parse.FromCloudFormation.getNumber(properties.TTL)),ret.addPropertyResult("type","Type",cfn_parse.FromCloudFormation.getString(properties.Type)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnService_HealthCheckConfigPropertyValidator(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("failureThreshold",cdk.validateNumber)(properties.failureThreshold)),errors.collect(cdk.propertyValidator("resourcePath",cdk.validateString)(properties.resourcePath)),errors.collect(cdk.propertyValidator("type",cdk.requiredValidator)(properties.type)),errors.collect(cdk.propertyValidator("type",cdk.validateString)(properties.type)),errors.wrap('supplied properties not correct for "HealthCheckConfigProperty"')}function cfnServiceHealthCheckConfigPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnService_HealthCheckConfigPropertyValidator(properties).assertSuccess(),{FailureThreshold:cdk.numberToCloudFormation(properties.failureThreshold),ResourcePath:cdk.stringToCloudFormation(properties.resourcePath),Type:cdk.stringToCloudFormation(properties.type)}):properties}function CfnServiceHealthCheckConfigPropertyFromCloudFormation(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("failureThreshold","FailureThreshold",properties.FailureThreshold!=null?cfn_parse.FromCloudFormation.getNumber(properties.FailureThreshold):void 0),ret.addPropertyResult("resourcePath","ResourcePath",properties.ResourcePath!=null?cfn_parse.FromCloudFormation.getString(properties.ResourcePath):void 0),ret.addPropertyResult("type","Type",cfn_parse.FromCloudFormation.getString(properties.Type)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnService_HealthCheckCustomConfigPropertyValidator(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("failureThreshold",cdk.validateNumber)(properties.failureThreshold)),errors.wrap('supplied properties not correct for "HealthCheckCustomConfigProperty"')}function cfnServiceHealthCheckCustomConfigPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnService_HealthCheckCustomConfigPropertyValidator(properties).assertSuccess(),{FailureThreshold:cdk.numberToCloudFormation(properties.failureThreshold)}):properties}function CfnServiceHealthCheckCustomConfigPropertyFromCloudFormation(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("failureThreshold","FailureThreshold",properties.FailureThreshold!=null?cfn_parse.FromCloudFormation.getNumber(properties.FailureThreshold):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}