# 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 SystemUsageItem(UniversalBaseModel):
    """
    Individual system usage in the unified view.
    """

    system: str = pydantic.Field()
    """
    System category key (e.g., 'ai_models', 'scraping')
    """

    display_name: str = pydantic.Field()
    """
    Human-readable system name
    """

    total_cost_chf: typing.Optional[float] = pydantic.Field(default=None)
    """
    Total cost in CHF
    """

    total_requests: typing.Optional[int] = pydantic.Field(default=None)
    """
    Total requests
    """

    percentage_of_total: typing.Optional[float] = pydantic.Field(default=None)
    """
    Percentage of total cost
    """

    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
