"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RecordDeAggregationProcessor=exports.SubRecordType=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};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},SubRecordType;(function(SubRecordType2){SubRecordType2.JSON="JSON",SubRecordType2.DELIMITED="DELIMITED"})(SubRecordType||(exports.SubRecordType=SubRecordType={}));class RecordDeAggregationProcessor{options;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_kinesisfirehose.RecordDeAggregationProcessor",version:"2.256.1"};static json(){return new RecordDeAggregationProcessor({subRecordType:SubRecordType.JSON})}static delimited(delimiter){return new RecordDeAggregationProcessor({subRecordType:SubRecordType.DELIMITED,delimiter:Buffer.from(delimiter).toString("base64")})}props={};constructor(options){this.options=options;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_kinesisfirehose_RecordDeAggregationProcessorOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,RecordDeAggregationProcessor),error}}bind(scope,options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_kinesisfirehose_DataProcessorBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const parameters=[{parameterName:"SubRecordType",parameterValue:this.options.subRecordType}];if(!options.dynamicPartitioningEnabled)throw new(core_1()).ValidationError((0,literal_string_1().lit)`RecordDeAggregationProcessorRequiresDynamicPartitioning`,"RecordDeAggregationProcessor can only be present when Dynamic Partitioning is enabled.",scope);if(this.options.subRecordType===SubRecordType.DELIMITED){if(!this.options.delimiter)throw new(core_1()).ValidationError((0,literal_string_1().lit)`DelimiterRequiredForDelimitedSubRecordType`,"The delimiter must be specified when subRecordType is DELIMITED.",scope);parameters.push({parameterName:"Delimiter",parameterValue:this.options.delimiter})}return{processorType:"RecordDeAggregation",processorIdentifier:{parameterName:"",parameterValue:""},parameters}}}exports.RecordDeAggregationProcessor=RecordDeAggregationProcessor;
