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

import datetime as dt
import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata


class SignatureValueObjectResponseBody(UniversalBaseModel):
    """
    The value of a signature field. Only present for signature fields.
    """

    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Id of the signature field.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Name of the signee for a signature field.
    """

    signed_at_time: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="signedAtTime"),
        pydantic.Field(alias="signedAtTime", description="Time the signature was captured in RFC 3339 format."),
    ] = None
    url: typing.Optional[str] = pydantic.Field(default=None)
    """
    Url of a signature field's PNG signature image.
    """

    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
