"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.Accelerator=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),cdk=require("../../core"),ga=require("./globalaccelerator.generated"),listener_1=require("./listener");class Accelerator extends cdk.Resource{constructor(scope,id,props={}){var _b,_c;super(scope,id);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_globalaccelerator_AcceleratorProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.constructor),error}const resource=new ga.CfnAccelerator(this,"Resource",{enabled:(_b=props.enabled)!==null&&_b!==void 0?_b:!0,name:(_c=props.acceleratorName)!==null&&_c!==void 0?_c:cdk.Names.uniqueId(this)});this.acceleratorArn=resource.attrAcceleratorArn,this.dnsName=resource.attrDnsName}static fromAcceleratorAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_globalaccelerator_AcceleratorAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromAcceleratorAttributes),error}class Import extends cdk.Resource{constructor(){super(...arguments),this.acceleratorArn=attrs.acceleratorArn,this.dnsName=attrs.dnsName}}return new Import(scope,id)}addListener(id,options){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_globalaccelerator_ListenerOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addListener),error}return new listener_1.Listener(this,id,{accelerator:this,...options})}}exports.Accelerator=Accelerator,_a=JSII_RTTI_SYMBOL_1,Accelerator[_a]={fqn:"aws-cdk-lib.aws_globalaccelerator.Accelerator",version:"2.24.1"};
//# sourceMappingURL=accelerator.js.map
