"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.GelfLogDriver=exports.GelfCompressionType=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var log_driver_1=()=>{var tmp=require("./log-driver");return log_driver_1=()=>tmp,tmp},utils_1=()=>{var tmp=require("./utils");return utils_1=()=>tmp,tmp},GelfCompressionType;(function(GelfCompressionType2){GelfCompressionType2.GZIP="gzip",GelfCompressionType2.ZLIB="zlib",GelfCompressionType2.NONE="none"})(GelfCompressionType||(exports.GelfCompressionType=GelfCompressionType={}));class GelfLogDriver extends log_driver_1().LogDriver{constructor(props){super(),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ecs_GelfLogDriverProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,GelfLogDriver),error}props.compressionLevel&&(0,utils_1().ensureInRange)(props.compressionLevel,-1,9),props.tcpMaxReconnect&&(0,utils_1().ensurePositiveInteger)(props.tcpMaxReconnect)}bind(_scope,_containerDefinition){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ecs_ContainerDefinition(_containerDefinition)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return{logDriver:"gelf",options:(0,utils_1().stringifyOptions)({"gelf-address":this.props.address,"gelf-compression-type":this.props.compressionType,"gelf-compression-level":this.props.compressionLevel,"gelf-tcp-max-reconnect":this.props.tcpMaxReconnect,"gelf-tcp-reconnect-delay":this.props.tcpReconnectDelay&&this.props.tcpReconnectDelay.toSeconds(),...(0,utils_1().renderCommonLogDriverOptions)(this.props)})}}}exports.GelfLogDriver=GelfLogDriver,_a=JSII_RTTI_SYMBOL_1,GelfLogDriver[_a]={fqn:"aws-cdk-lib.aws_ecs.GelfLogDriver",version:"2.159.0"};
