# 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 ApiKeyUsageSummary(UniversalBaseModel):
    """
    API Key usage summary response.
    """

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

    month: int = pydantic.Field()
    """
    Month
    """

    year: int = pydantic.Field()
    """
    Year
    """

    total_api_key_requests: int = pydantic.Field()
    """
    Total API key requests
    """

    total_api_key_cost: float = pydantic.Field()
    """
    Total API key cost in CHF
    """

    average_cost_per_request: float = pydantic.Field()
    """
    Average cost per API request
    """

    total_synapses: float = pydantic.Field()
    """
    Total synapses
    """

    total_neurons: float = pydantic.Field()
    """
    Total neurons
    """

    generated_at: str = pydantic.Field()
    """
    Report generation timestamp
    """

    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
