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

import typing

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


class Uv(UniversalBaseModel):
    """
    Use `uv` to setup env.
    Your build context root must contain `pyproject.toml` and `uv.lock`
    """

    type: typing.Literal["uv"] = pydantic.Field(default="uv")
    """
    +value=uv
    """

    uv_version: typing.Optional[str] = pydantic.Field(default="latest")
    """
    UV version to use
    """

    sync_options: typing.Optional[str] = pydantic.Field(default=None)
    """
    Sync options to pass to uv command
    """

    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
