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

from ......core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from .gpu_info_bus_type_id import GpuInfoBusTypeId
from .gpu_info_vram_mode_id import GpuInfoVramModeId
from ......core.pydantic_utilities import IS_PYDANTIC_V2


class GpuInfo(UncheckedBaseModel):
    """
    The GPU information object contains attributes describing graphical processing hardware.
    """

    bus_type: typing.Optional[str] = pydantic.Field(default=None)
    """
    The attachment bus or interface standard, normalized to the caption of the bus_type_id value. In the case of 'Other', it is defined by the event source.
    """

    bus_type_id: typing.Optional[GpuInfoBusTypeId] = pydantic.Field(default=None)
    """
    The normalized identifier of the attachment bus or interface standard.
    """

    cores: typing.Optional[int] = pydantic.Field(default=None)
    """
    The number of processing cores or compute units for the component.
    """

    model: typing.Optional[str] = pydantic.Field(default=None)
    """
    The model name of the GPU. For example: <code>GeForce RTX A6000</code>, <code>Radeon PRO W7900</code>, or <code>Intel Data Center GPU Max 1550</code>.
    """

    vendor_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of the vendor of the GPU. For example: <code>NVIDIA</code>, <code>AMD</code>, or <code>Intel</code>.
    """

    vram_mode: typing.Optional[str] = pydantic.Field(default=None)
    """
    The video memory attachment mode, indicating how the VRAM hardware is integrated with the system (e.g., shared or dedicated), normalized to the caption of the vram_mode_id value. For 'Other', the exact attachment mode is defined by the event source.
    """

    vram_mode_id: typing.Optional[GpuInfoVramModeId] = pydantic.Field(default=None)
    """
    The normalized identifier of the video memory attachment mode.
    """

    vram_size: typing.Optional[int] = pydantic.Field(default=None)
    """
    The total amount of installed video RAM.
    """

    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
