# 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 .sandbox_provider import SandboxProvider


class CreateSandboxRequest(UniversalBaseModel):
    """
    Request to create a new sandbox (type is specified in URL path).
    """

    provider: typing.Optional[SandboxProvider] = pydantic.Field(default=None)
    """
    Provider to use (auto-detected if not specified)
    """

    region: typing.Optional[str] = pydantic.Field(default=None)
    """
    Preferred region for the sandbox
    """

    timeout: typing.Optional[int] = pydantic.Field(default=None)
    """
    Timeout in minutes
    """

    metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    Additional metadata
    """

    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
