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

from .common_properties import CommonProperties
import typing
from .id import Id
import datetime as dt
from ....core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class Relationships(CommonProperties):
    relationship_type: str
    description: typing.Optional[str] = None
    source_ref: Id
    target_ref: Id
    start_time: typing.Optional[dt.datetime] = None
    stop_time: typing.Optional[dt.datetime] = None

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

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