# 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 .forms_date_time_value_object_response_body_type import FormsDateTimeValueObjectResponseBodyType


class FormsDateTimeValueObjectResponseBody(UniversalBaseModel):
    """
    The value of a datetime form input field.
    """

    type: FormsDateTimeValueObjectResponseBodyType = pydantic.Field()
    """
    The type of datetime format.  Valid values: `datetime`, `date`, `time`
    """

    value: dt.datetime = pydantic.Field()
    """
    UTC timestamp in RFC 3339 format.
    """

    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
