"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PrivateDnsNamespace=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var namespace_1=()=>{var tmp=require("./namespace");return namespace_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},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp};class PrivateDnsNamespace extends core_1().Resource{static fromPrivateDnsNamespaceAttributes(scope,id,attrs){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_servicediscovery_PrivateDnsNamespaceAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromPrivateDnsNamespaceAttributes),error}class Import extends core_1().Resource{constructor(){super(...arguments),this.namespaceName=attrs.namespaceName,this.namespaceId=attrs.namespaceId,this.namespaceArn=attrs.namespaceArn,this.type=namespace_1().NamespaceType.DNS_PRIVATE}}return new Import(scope,id)}constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_servicediscovery_PrivateDnsNamespaceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,PrivateDnsNamespace),error}if(props.vpc===void 0)throw new Error("VPC must be specified for PrivateDNSNamespaces");const ns=new(servicediscovery_generated_1()).CfnPrivateDnsNamespace(this,"Resource",{name:props.name,description:props.description,vpc:props.vpc.vpcId});this.namespaceName=props.name,this.namespaceId=ns.attrId,this.namespaceArn=ns.attrArn,this.namespaceHostedZoneId=ns.attrHostedZoneId,this.type=namespace_1().NamespaceType.DNS_PRIVATE}get privateDnsNamespaceArn(){return this.namespaceArn}get privateDnsNamespaceName(){return this.namespaceName}get privateDnsNamespaceId(){return this.namespaceId}createService(id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_servicediscovery_DnsServiceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.createService),error}return new(service_1()).Service(this,id,{namespace:this,...props})}}exports.PrivateDnsNamespace=PrivateDnsNamespace,_a=JSII_RTTI_SYMBOL_1,PrivateDnsNamespace[_a]={fqn:"aws-cdk-lib.aws_servicediscovery.PrivateDnsNamespace",version:"2.159.0"};
