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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class TimeRange(UncheckedBaseModel):
    """
    Represents a generic time range. The start and end values are
    represented in RFC 3339 format. Time ranges are customized to be
    inclusive or exclusive based on the needs of a particular endpoint.
    Refer to the relevant endpoint-specific documentation to determine
    how time ranges are handled.
    """

    start_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    A datetime value in RFC 3339 format indicating when the time range
    starts.
    """

    end_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    A datetime value in RFC 3339 format indicating when the time range
    ends.
    """

    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
