"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ApiDestination=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),connection_1=require("./connection"),events_generated_1=require("./events.generated"),core_1=require("../../core");class ApiDestination extends core_1.Resource{constructor(scope,id,props){super(scope,id,{physicalName:props.apiDestinationName});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_events_ApiDestinationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ApiDestination),error}this.connection=props.connection;let apiDestination=new events_generated_1.CfnApiDestination(this,"ApiDestination",{connectionArn:this.connection.connectionArn,description:props.description,httpMethod:props.httpMethod??connection_1.HttpMethod.POST,invocationEndpoint:props.endpoint,invocationRateLimitPerSecond:props.rateLimitPerSecond,name:this.physicalName});this.apiDestinationName=this.getResourceNameAttribute(apiDestination.ref),this.apiDestinationArn=apiDestination.attrArn}}exports.ApiDestination=ApiDestination,_a=JSII_RTTI_SYMBOL_1,ApiDestination[_a]={fqn:"aws-cdk-lib.aws_events.ApiDestination",version:"2.96.1"};
