"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.NonIpInstance=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var instance_1=()=>{var tmp=require("./instance");return instance_1=()=>tmp,tmp},utils_1=()=>{var tmp=require("./private/utils");return utils_1=()=>tmp,tmp},service_1=()=>{var tmp=require("./service");return service_1=()=>tmp,tmp},servicediscovery_generated_1=()=>{var tmp=require("./servicediscovery.generated");return servicediscovery_generated_1=()=>tmp,tmp};class NonIpInstance extends instance_1().InstanceBase{constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_servicediscovery_NonIpInstanceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,NonIpInstance),error}if((props.service.discoveryType||(0,utils_1().defaultDiscoveryType)(props.service.namespace))!==service_1().DiscoveryType.API)throw new Error("This type of instance can only be registered for HTTP namespaces.");if(props.customAttributes===void 0||Object.keys(props.customAttributes).length===0)throw new Error("You must specify at least one custom attribute for this instance type.");const resource=new(servicediscovery_generated_1()).CfnInstance(this,"Resource",{instanceId:props.instanceId||this.uniqueInstanceId(),serviceId:props.service.serviceId,instanceAttributes:{...props.customAttributes}});this.service=props.service,this.instanceId=resource.ref}}exports.NonIpInstance=NonIpInstance,_a=JSII_RTTI_SYMBOL_1,NonIpInstance[_a]={fqn:"aws-cdk-lib.aws_servicediscovery.NonIpInstance",version:"2.159.0"};
