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

from __future__ import annotations

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
from .span_link_type_enum import SpanLinkTypeEnum


class SpanLink(UniversalBaseModel):
    trace_id: str
    type: SpanLinkTypeEnum
    span_context: "ParentContext"

    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 .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(SpanLink)
