# 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 OrganizationLimits(UniversalBaseModel):
    """
    Organization-level spending limits.
    """

    monthly_limit: typing.Optional[float] = pydantic.Field(default=None)
    """
    Monthly limit in CHF
    """

    current_usage: float = pydantic.Field()
    """
    Current usage in CHF
    """

    utilization_percentage: float = pydantic.Field()
    """
    Utilization percentage (0-100+)
    """

    remaining_budget: float = pydantic.Field()
    """
    Remaining budget in CHF (can be negative)
    """

    status: str = pydantic.Field()
    """
    Status: ok, warning, exceeded, no_limit
    """

    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
