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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .barcode_value_object_request_body import BarcodeValueObjectRequestBody
from .date_time_value_object_request_body import DateTimeValueObjectRequestBody
from .multiple_choice_value_object_request_body import MultipleChoiceValueObjectRequestBody
from .photo_value_object_request_body import PhotoValueObjectRequestBody
from .scanned_document_value_object_request_body import ScannedDocumentValueObjectRequestBody
from .signature_value_object_request_body import SignatureValueObjectRequestBody


class FieldObjectValueRequestBody(UniversalBaseModel):
    """
    The value of the document field. The shape of value depends on the type.
    """

    barcode_value: typing_extensions.Annotated[
        typing.Optional[typing.List[BarcodeValueObjectRequestBody]],
        FieldMetadata(alias="barcodeValue"),
        pydantic.Field(
            alias="barcodeValue",
            description="The value of a barcode scanning field. Only present for barcode scanning fields.",
        ),
    ] = None
    date_time_value: typing_extensions.Annotated[
        typing.Optional[DateTimeValueObjectRequestBody],
        FieldMetadata(alias="dateTimeValue"),
        pydantic.Field(alias="dateTimeValue"),
    ] = None
    multiple_choice_value: typing_extensions.Annotated[
        typing.Optional[typing.List[MultipleChoiceValueObjectRequestBody]],
        FieldMetadata(alias="multipleChoiceValue"),
        pydantic.Field(
            alias="multipleChoiceValue",
            description="The value of a multiple choice field. Only present for multiple choice fields.",
        ),
    ] = None
    number_value: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="numberValue"),
        pydantic.Field(alias="numberValue", description="The value of a number field. Only present for number fields."),
    ] = None
    photo_value: typing_extensions.Annotated[
        typing.Optional[typing.List[PhotoValueObjectRequestBody]],
        FieldMetadata(alias="photoValue"),
        pydantic.Field(alias="photoValue", description="The value of a photo field. Only present for photo fields."),
    ] = None
    scanned_document_value: typing_extensions.Annotated[
        typing.Optional[typing.List[ScannedDocumentValueObjectRequestBody]],
        FieldMetadata(alias="scannedDocumentValue"),
        pydantic.Field(
            alias="scannedDocumentValue",
            description="The value of a scanned document field. Only present for scanned document fields.",
        ),
    ] = None
    signature_value: typing_extensions.Annotated[
        typing.Optional[SignatureValueObjectRequestBody],
        FieldMetadata(alias="signatureValue"),
        pydantic.Field(alias="signatureValue"),
    ] = None
    string_value: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="stringValue"),
        pydantic.Field(alias="stringValue", description="The value of a string field. Only present for string fields."),
    ] = 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
