"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PublicDnsNamespace=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),namespace_1=require("./namespace"),service_1=require("./service"),servicediscovery_generated_1=require("./servicediscovery.generated"),core_1=require("../../core");class PublicDnsNamespace extends core_1.Resource{static fromPublicDnsNamespaceAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicediscovery_PublicDnsNamespaceAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromPublicDnsNamespaceAttributes),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_PUBLIC}}return new Import(scope,id)}constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicediscovery_PublicDnsNamespaceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,PublicDnsNamespace),error}const ns=new servicediscovery_generated_1.CfnPublicDnsNamespace(this,"Resource",{name:props.name,description:props.description});this.namespaceName=props.name,this.namespaceId=ns.attrId,this.namespaceArn=ns.attrArn,this.namespaceHostedZoneId=ns.attrHostedZoneId,this.type=namespace_1.NamespaceType.DNS_PUBLIC}get publicDnsNamespaceArn(){return this.namespaceArn}get publicDnsNamespaceName(){return this.namespaceName}get publicDnsNamespaceId(){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.PublicDnsNamespace=PublicDnsNamespace,_a=JSII_RTTI_SYMBOL_1,PublicDnsNamespace[_a]={fqn:"aws-cdk-lib.aws_servicediscovery.PublicDnsNamespace",version:"2.96.1"};
