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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class TimezoneResponse(UniversalBaseModel):
    """
    Response schema for timezone data.
    """

    id: str = pydantic.Field()
    """
    Timezone ID with tz_ prefix
    """

    name: str = pydantic.Field()
    """
    IANA timezone name (e.g., America/New_York)
    """

    display_name: str = pydantic.Field()
    """
    User-friendly name (e.g., Eastern Time (US & Canada))
    """

    offset: str = pydantic.Field()
    """
    UTC offset (e.g., -05:00, +01:00)
    """

    offset_minutes: int = pydantic.Field()
    """
    Offset in minutes from UTC
    """

    country_code: typing.Optional[str] = pydantic.Field(default=None)
    """
    ISO 3166-1 alpha-2 country code
    """

    is_active: bool = pydantic.Field()
    """
    Whether timezone is active
    """

    order: int = pydantic.Field()
    """
    Display order
    """

    created_at: dt.datetime = pydantic.Field()
    """
    Creation timestamp
    """

    updated_at: dt.datetime = pydantic.Field()
    """
    Last update timestamp
    """

    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
