"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AddHeader=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};class AddHeader{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ses_actions.AddHeader",version:"2.256.1"};name;value;constructor(props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ses_actions_AddHeaderProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AddHeader),error}if(!/^[a-zA-Z0-9-]{1,50}$/.test(props.name))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`MustBeHeaderBetweenCharacters`,"Header `name` must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.");if(!/^[^\n\r]{0,2047}$/.test(props.value))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`MustBeHeaderLessThan`,'Header `value` must be less than 2048 characters, and must not contain newline characters ("\r" or "\n").');this.name=props.name,this.value=props.value}bind(_rule){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_ses_IReceiptRuleRef(_rule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return{addHeaderAction:{headerName:this.name,headerValue:this.value}}}}exports.AddHeader=AddHeader;
