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

from __future__ import annotations
from .revenuetimebucket import RevenueTimeBucket, RevenueTimeBucketTypedDict
from paygentic_sdk.types import BaseModel
from paygentic_sdk.utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import List, Literal
from typing_extensions import Annotated, TypedDict


class RevenueTimeSeriesResponseTypedDict(TypedDict):
    buckets: List[RevenueTimeBucketTypedDict]
    r"""Time-bucketed revenue data"""
    object: Literal["revenue_time_series"]
    r"""Object type identifier"""


class RevenueTimeSeriesResponse(BaseModel):
    buckets: List[RevenueTimeBucket]
    r"""Time-bucketed revenue data"""

    object: Annotated[
        Annotated[
            Literal["revenue_time_series"],
            AfterValidator(validate_const("revenue_time_series")),
        ],
        pydantic.Field(alias="object"),
    ] = "revenue_time_series"
    r"""Object type identifier"""


try:
    RevenueTimeSeriesResponse.model_rebuild()
except NameError:
    pass
