# 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 .workspace_version_opik_version import WorkspaceVersionOpikVersion


class WorkspaceVersion(UniversalBaseModel):
    """
    Workspace version response.
    The opik_version field indicates which navigation mode the frontend should render:
    'version_1' (legacy workspace-scoped) or 'version_2' (project-first).
    """

    opik_version: typing.Optional[WorkspaceVersionOpikVersion] = pydantic.Field(default=None)
    """
    The determined Opik navigation version for this workspace.
    'version_1' = legacy workspace-scoped navigation,
    'version_2' = new project-first navigation.
    """

    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
