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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .version_response import VersionResponse


class VersionListResponse(UniversalBaseModel):
    """
    Response for listing versions of a branch.
    """

    branch_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Branch ID
    """

    total: int = pydantic.Field()
    """
    Total count
    """

    versions: typing.List[VersionResponse] = pydantic.Field()
    """
    List of versions
    """

    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
