"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations

from typing import Optional

from typing_extensions import NotRequired, TypedDict

from friendli_core.types import BaseModel

from .serverlesspriceunittype import ServerlessPriceUnitType


class PricingModelTypedDict(TypedDict):
    r"""Pricing model supporting both token-based and time-based pricing."""

    input: float
    r"""Price per input token"""
    output: float
    r"""Price per output token"""
    response_time: NotRequired[float]
    r"""Price per response time in seconds"""
    unit_type: NotRequired[ServerlessPriceUnitType]
    r"""Serverless price unit type."""


class PricingModel(BaseModel):
    r"""Pricing model supporting both token-based and time-based pricing."""

    input: float
    r"""Price per input token"""

    output: float
    r"""Price per output token"""

    response_time: Optional[float] = 0
    r"""Price per response time in seconds"""

    unit_type: Optional[ServerlessPriceUnitType] = None
    r"""Serverless price unit type."""
