# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
from .api_version_enum import ApiVersionEnum
from .node_execution_rejected_body import NodeExecutionRejectedBody


class NodeExecutionRejectedEvent(UniversalBaseModel):
    parent: typing.Optional["ParentContext"] = None
    links: typing.Optional[typing.List["SpanLink"]] = None
    name: typing.Literal["node.execution.rejected"] = "node.execution.rejected"
    body: NodeExecutionRejectedBody
    id: str
    timestamp: dt.datetime
    api_version: typing.Optional[ApiVersionEnum] = None
    trace_id: str
    span_id: str

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow


from .api_request_parent_context import ApiRequestParentContext  # noqa: E402, F401, I001
from .external_parent_context import ExternalParentContext  # noqa: E402, F401, I001
from .integration_trigger_context import IntegrationTriggerContext  # noqa: E402, F401, I001
from .node_parent_context import NodeParentContext  # noqa: E402, F401, I001
from .prompt_deployment_parent_context import PromptDeploymentParentContext  # noqa: E402, F401, I001
from .scheduled_trigger_context import ScheduledTriggerContext  # noqa: E402, F401, I001
from .span_link import SpanLink  # noqa: E402, F401, I001
from .workflow_deployment_parent_context import WorkflowDeploymentParentContext  # noqa: E402, F401, I001
from .workflow_parent_context import WorkflowParentContext  # noqa: E402, F401, I001
from .workflow_sandbox_parent_context import WorkflowSandboxParentContext  # noqa: E402, F401, I001
from .parent_context import ParentContext  # noqa: E402, F401, I001

update_forward_refs(NodeExecutionRejectedEvent)
