"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.InstanceEndpoint=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var _util_1=()=>{var tmp=require("./_util");return _util_1=()=>tmp,tmp};class InstanceEndpoint{constructor(instance,options={}){this.instance=instance,this.options=options;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_IInstance(instance),jsiiDeprecationWarnings().aws_cdk_lib_aws_globalaccelerator_endpoints_InstanceEndpointProps(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,InstanceEndpoint),error}(0,_util_1().validateWeight)(options.weight),this.region=instance.env.region}renderEndpointConfiguration(){return{endpointId:this.instance.instanceId,weight:this.options.weight,clientIpPreservationEnabled:this.options.preserveClientIp}}}exports.InstanceEndpoint=InstanceEndpoint,_a=JSII_RTTI_SYMBOL_1,InstanceEndpoint[_a]={fqn:"aws-cdk-lib.aws_globalaccelerator_endpoints.InstanceEndpoint",version:"2.148.1"};
