"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EventBridgePutEvents=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var target_1=()=>{var tmp=require("./target");return target_1=()=>tmp,tmp},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 EventBridgePutEvents extends target_1().ScheduleTargetBase{entry;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_scheduler_targets.EventBridgePutEvents",version:"2.256.1"};constructor(entry,props={}){super(props,entry.eventBus.eventBusArn),this.entry=entry,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_scheduler_targets_EventBridgePutEventsEntry(entry),jsiiDeprecationWarnings().aws_cdk_lib_aws_scheduler_targets_ScheduleTargetBaseProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EventBridgePutEvents),error}if(this.props.input)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ScheduleTargetBasePropsInput`,"ScheduleTargetBaseProps.input is not supported for EventBridgePutEvents. Please use entry.detail instead.")}addTargetActionToRole(role){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_iam_IRole(role)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addTargetActionToRole),error}this.entry.eventBus.grantPutEventsTo(role)}bindBaseTargetConfig(_schedule){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_scheduler_ISchedule(_schedule)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bindBaseTargetConfig),error}return{...super.bindBaseTargetConfig(_schedule),input:this.entry.detail,eventBridgeParameters:{detailType:this.entry.detailType,source:this.entry.source}}}}exports.EventBridgePutEvents=EventBridgePutEvents;
