# 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
from .status import Status


class MarketStatusResponse(UniversalBaseModel):
    mic: str
    day_of_week: str
    is_weekend: bool
    is_business_day: bool
    status: Status
    is_early_close: typing.Optional[bool] = None
    local_time: dt.datetime
    open_time: typing.Optional[dt.datetime] = None
    close_time: typing.Optional[dt.datetime] = None
    holiday_name: typing.Optional[str] = None

    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
