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

from ...core.pydantic_utilities import UniversalBaseModel
from ...shared_types.types.entity_details import EntityDetails
from ...shared_types.types.entity_relationships import EntityRelationships
from ...shared_types.types.relationship_data import RelationshipData
import typing
from ...generated_types.types.relationships import Relationships
from .traversal_relationship_data import TraversalRelationshipData
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class TraversalPath(UniversalBaseModel):
    field: str
    entity: EntityDetails
    relationships: typing.Dict[Relationships, TraversalRelationshipData]

    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
