# 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 .model_usage_item import ModelUsageItem


class ModelUsageResponse(UniversalBaseModel):
    """
    Response for model usage ranking.
    """

    success: typing.Optional[bool] = None
    models: typing.Optional[typing.List[ModelUsageItem]] = pydantic.Field(default=None)
    """
    Ranked list of models
    """

    period: typing.Dict[str, typing.Any] = pydantic.Field()
    """
    Date range of the analysis
    """

    organization_id: str = pydantic.Field()
    """
    Organization ID
    """

    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
