# 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 UserModelItem(UniversalBaseModel):
    """
    Model usage for a specific user.
    """

    model: str = pydantic.Field()
    """
    Model identifier
    """

    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
    """

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

    percentage_of_user: typing.Optional[float] = pydantic.Field(default=None)
    """
    Percentage of user's 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
