"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.QueryDefinition=exports.QueryString=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),core_1=require("../../core"),_1=require(".");class QueryString{constructor(props={}){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_logs_QueryStringProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,QueryString),error}this.fields=props.fields,this.parse=props.parse,this.filter=props.filter,this.stats=props.stats,this.sort=props.sort,this.limit=props.limit,this.display=props.display}toString(){return noUndef({fields:this.fields!==void 0?this.fields.join(", "):this.fields,parse:this.parse,filter:this.filter,stats:this.stats,sort:this.sort,limit:this.limit,display:this.display}).join(" | ")}}exports.QueryString=QueryString,_a=JSII_RTTI_SYMBOL_1,QueryString[_a]={fqn:"aws-cdk-lib.aws_logs.QueryString",version:"2.29.0"};function noUndef(x){const ret=[];for(const[key,value]of Object.entries(x))value!==void 0&&ret.push(`${key} ${value}`);return ret}class QueryDefinition extends core_1.Resource{constructor(scope,id,props){super(scope,id,{physicalName:props.queryDefinitionName});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_logs_QueryDefinitionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,QueryDefinition),error}const queryDefinition=new _1.CfnQueryDefinition(this,"Resource",{name:props.queryDefinitionName,queryString:props.queryString.toString(),logGroupNames:typeof props.logGroups>"u"?[]:props.logGroups.flatMap(logGroup=>logGroup.logGroupName)});this.queryDefinitionId=queryDefinition.attrQueryDefinitionId}}exports.QueryDefinition=QueryDefinition,_b=JSII_RTTI_SYMBOL_1,QueryDefinition[_b]={fqn:"aws-cdk-lib.aws_logs.QueryDefinition",version:"2.29.0"};
//# sourceMappingURL=query-definition.js.map
