# 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 CostForecastResponse(UniversalBaseModel):
    """
    Response for cost forecasting.
    """

    success: typing.Optional[bool] = None
    projected_cost_chf: typing.Optional[float] = pydantic.Field(default=None)
    """
    Projected cost for forecast period
    """

    daily_run_rate_chf: typing.Optional[float] = pydantic.Field(default=None)
    """
    Average daily spend
    """

    confidence: typing.Optional[str] = pydantic.Field(default=None)
    """
    Forecast confidence: high, medium, low
    """

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

    trend: typing.Optional[str] = pydantic.Field(default=None)
    """
    Cost trend: increasing, stable, decreasing
    """

    trend_change_pct: typing.Optional[float] = pydantic.Field(default=None)
    """
    Trend change percentage
    """

    historical_daily: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic.Field(default=None)
    """
    Historical daily costs
    """

    projected_daily: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic.Field(default=None)
    """
    Projected daily costs
    """

    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
