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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .version_status import VersionStatus


class VersionSummary(UniversalBaseModel):
    """
    Abbreviated version info for embedding in branch responses.
    """

    deployed_at: dt.datetime = pydantic.Field()
    """
    When this version was deployed
    """

    git_hash: str = pydantic.Field()
    """
    Git commit hash
    """

    git_message: typing.Optional[str] = pydantic.Field(default=None)
    """
    Git commit message
    """

    id: str = pydantic.Field()
    """
    Version ID
    """

    status: VersionStatus = pydantic.Field()
    """
    Version lifecycle status
    """

    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
