"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SplunkLogDriver=exports.SplunkLogFormat=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},SplunkLogFormat;(function(SplunkLogFormat2){SplunkLogFormat2.INLINE="inline",SplunkLogFormat2.JSON="json",SplunkLogFormat2.RAW="raw"})(SplunkLogFormat||(exports.SplunkLogFormat=SplunkLogFormat={}));class SplunkLogDriver extends log_driver_1().LogDriver{constructor(props){super(),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ecs_SplunkLogDriverProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SplunkLogDriver),error}if(!props.token&&!props.secretToken)throw new Error("Please provide either token or secretToken.");props.gzipLevel&&(0,utils_1().ensureInRange)(props.gzipLevel,-1,9)}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:"splunk",options:(0,utils_1().stringifyOptions)({"splunk-token":this.props.token?.unsafeUnwrap(),"splunk-url":this.props.url,"splunk-source":this.props.source,"splunk-sourcetype":this.props.sourceType,"splunk-index":this.props.index,"splunk-capath":this.props.caPath,"splunk-caname":this.props.caName,"splunk-insecureskipverify":this.props.insecureSkipVerify,"splunk-format":this.props.format,"splunk-verify-connection":this.props.verifyConnection,"splunk-gzip":this.props.gzip,"splunk-gzip-level":this.props.gzipLevel,...(0,utils_1().renderCommonLogDriverOptions)(this.props)}),secretOptions:this.props.secretToken&&(0,utils_1().renderLogDriverSecretOptions)({"splunk-token":this.props.secretToken},_containerDefinition.taskDefinition)}}}exports.SplunkLogDriver=SplunkLogDriver,_a=JSII_RTTI_SYMBOL_1,SplunkLogDriver[_a]={fqn:"aws-cdk-lib.aws_ecs.SplunkLogDriver",version:"2.148.1"};
