"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Endpoint=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class Endpoint{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_docdb.Endpoint",version:"2.256.1"};static MIN_PORT=1;static MAX_PORT=65535;static isValidPort(port){return Number.isInteger(port)&&port>=Endpoint.MIN_PORT&&port<=Endpoint.MAX_PORT}hostname;port;constructor(address,port){if(!core_1().Token.isUnresolved(port)&&!Endpoint.isValidPort(port))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`MustBePortIntegerBetween`,`Port must be an integer between [${Endpoint.MIN_PORT}, ${Endpoint.MAX_PORT}] but got: ${port}`);this.hostname=address,this.port=port}get socketAddress(){const portDesc=core_1().Token.isUnresolved(this.port)?core_1().Token.asString(this.port):this.port;return`${this.hostname}:${portDesc}`}portAsString(){return core_1().Token.isUnresolved(this.port)?core_1().Token.asString(this.port):this.port.toString()}}exports.Endpoint=Endpoint;
