# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ...core.datetime_utils import serialize_datetime
from ...core.pydantic_utilities import pydantic_v1


class CallLengthSummary(pydantic_v1.BaseModel):
    _0_5: int = pydantic_v1.Field(alias="0-5")
    _5_10: int = pydantic_v1.Field(alias="5-10")
    _10_15: int = pydantic_v1.Field(alias="10-15")
    _15_20: int = pydantic_v1.Field(alias="15-20")
    _20_30: int = pydantic_v1.Field(alias="20-30")
    _30_45: int = pydantic_v1.Field(alias="30-45")
    _45_60: int = pydantic_v1.Field(alias="45-60")
    _60_90: int = pydantic_v1.Field(alias="60-90")
    _90_120: int = pydantic_v1.Field(alias="90-120")
    _120: int = pydantic_v1.Field(alias="120+")

    def json(self, **kwargs: typing.Any) -> str:
        kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
        return super().json(**kwargs_with_defaults)

    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
        kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
        return super().dict(**kwargs_with_defaults)

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True
        extra = pydantic_v1.Extra.allow
        json_encoders = {dt.datetime: serialize_datetime}
