from typing import Optional, TypedDict

from moto.stepfunctions.parser.api import (
    ActivityFailedEventDetails,
    ActivityScheduledEventDetails,
    ActivityScheduleFailedEventDetails,
    ActivityStartedEventDetails,
    ActivitySucceededEventDetails,
    ActivityTimedOutEventDetails,
    EvaluationFailedEventDetails,
    ExecutionAbortedEventDetails,
    ExecutionFailedEventDetails,
    ExecutionStartedEventDetails,
    ExecutionSucceededEventDetails,
    ExecutionTimedOutEventDetails,
    LambdaFunctionFailedEventDetails,
    LambdaFunctionScheduledEventDetails,
    LambdaFunctionScheduleFailedEventDetails,
    LambdaFunctionStartFailedEventDetails,
    LambdaFunctionSucceededEventDetails,
    LambdaFunctionTimedOutEventDetails,
    MapIterationEventDetails,
    MapRunFailedEventDetails,
    MapRunStartedEventDetails,
    MapStateStartedEventDetails,
    StateEnteredEventDetails,
    StateExitedEventDetails,
    TaskFailedEventDetails,
    TaskScheduledEventDetails,
    TaskStartedEventDetails,
    TaskStartFailedEventDetails,
    TaskSubmitFailedEventDetails,
    TaskSubmittedEventDetails,
    TaskSucceededEventDetails,
    TaskTimedOutEventDetails,
)


class EventDetails(TypedDict):
    activityFailedEventDetails: ActivityFailedEventDetails | None
    activityScheduleFailedEventDetails: ActivityScheduleFailedEventDetails | None
    activityScheduledEventDetails: ActivityScheduledEventDetails | None
    activityStartedEventDetails: ActivityStartedEventDetails | None
    activitySucceededEventDetails: ActivitySucceededEventDetails | None
    activityTimedOutEventDetails: ActivityTimedOutEventDetails | None
    taskFailedEventDetails: TaskFailedEventDetails | None
    taskScheduledEventDetails: TaskScheduledEventDetails | None
    taskStartFailedEventDetails: TaskStartFailedEventDetails | None
    taskStartedEventDetails: TaskStartedEventDetails | None
    taskSubmitFailedEventDetails: TaskSubmitFailedEventDetails | None
    taskSubmittedEventDetails: TaskSubmittedEventDetails | None
    taskSucceededEventDetails: TaskSucceededEventDetails | None
    taskTimedOutEventDetails: TaskTimedOutEventDetails | None
    evaluationFailedEventDetails: EvaluationFailedEventDetails | None
    executionFailedEventDetails: ExecutionFailedEventDetails | None
    executionStartedEventDetails: ExecutionStartedEventDetails | None
    executionSucceededEventDetails: ExecutionSucceededEventDetails | None
    executionAbortedEventDetails: ExecutionAbortedEventDetails | None
    executionTimedOutEventDetails: ExecutionTimedOutEventDetails | None
    mapStateStartedEventDetails: MapStateStartedEventDetails | None
    mapIterationStartedEventDetails: MapIterationEventDetails | None
    mapIterationSucceededEventDetails: MapIterationEventDetails | None
    mapIterationFailedEventDetails: MapIterationEventDetails | None
    mapIterationAbortedEventDetails: MapIterationEventDetails | None
    lambdaFunctionFailedEventDetails: LambdaFunctionFailedEventDetails | None
    lambdaFunctionScheduleFailedEventDetails: Optional[
        LambdaFunctionScheduleFailedEventDetails
    ]
    lambdaFunctionScheduledEventDetails: LambdaFunctionScheduledEventDetails | None
    lambdaFunctionStartFailedEventDetails: Optional[
        LambdaFunctionStartFailedEventDetails
    ]
    lambdaFunctionSucceededEventDetails: LambdaFunctionSucceededEventDetails | None
    lambdaFunctionTimedOutEventDetails: LambdaFunctionTimedOutEventDetails | None
    stateEnteredEventDetails: StateEnteredEventDetails | None
    stateExitedEventDetails: StateExitedEventDetails | None
    mapRunStartedEventDetails: MapRunStartedEventDetails | None
    mapRunFailedEventDetails: MapRunFailedEventDetails | None
