# 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 BudgetStatusResponse(UniversalBaseModel):
    """
    Response for budget status tracking.
    """

    success: typing.Optional[bool] = None
    current_month_cost_chf: typing.Optional[float] = pydantic.Field(default=None)
    """
    Current month spend
    """

    org_limit_chf: typing.Optional[float] = pydantic.Field(default=None)
    """
    Organization spending limit
    """

    utilization_pct: typing.Optional[float] = pydantic.Field(default=None)
    """
    Budget utilization percentage
    """

    days_remaining: typing.Optional[int] = pydantic.Field(default=None)
    """
    Days remaining in current month
    """

    projected_month_end_chf: typing.Optional[float] = pydantic.Field(default=None)
    """
    Projected month-end cost
    """

    projected_utilization_pct: typing.Optional[float] = pydantic.Field(default=None)
    """
    Projected utilization at month end
    """

    status: typing.Optional[str] = pydantic.Field(default=None)
    """
    Budget status: on_track, warning, projected_overage, exceeded
    """

    daily_budget_chf: typing.Optional[float] = pydantic.Field(default=None)
    """
    Daily budget allowance
    """

    today_spend_chf: typing.Optional[float] = pydantic.Field(default=None)
    """
    Today's spend so far
    """

    today_vs_budget: typing.Optional[str] = pydantic.Field(default=None)
    """
    Today vs daily budget: under, over
    """

    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
