# 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 NvidiaTimeslicingGpu(UniversalBaseModel):
    type: typing.Literal["nvidia_timeslicing_gpu"] = pydantic.Field(default="nvidia_timeslicing_gpu")
    """
    +value=nvidia_timeslicing_gpu
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Name of the Nvidia GPU. One of [P4, P100, V100, T4, A10G, A100_40GB, A100_80GB]
    This field is required for Node Selector and can be ignored in Nodepool Selector.
    One instance of the card contains the following amount of memory -
    P4: 8 GB, P100: 16 GB, V100: 16 GB, T4: 16 GB, A10G: 24 GB, A100_40GB: 40GB, A100_80GB: 80 GB
    """

    gpu_memory: int = pydantic.Field()
    """
    Amount of GPU memory (in MB) to allocate. Please note, this limit is not being enforced today but will be in future. Applications are expected to operate in co-opertative mode
    """

    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
