# 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 .forms_asset_value_object_response_body import FormsAssetValueObjectResponseBody
from .forms_check_boxes_value_object_response_body import FormsCheckBoxesValueObjectResponseBody
from .forms_date_time_value_object_response_body import FormsDateTimeValueObjectResponseBody
from .forms_field_input_object_response_body_type import FormsFieldInputObjectResponseBodyType
from .forms_geofence_value_object_response_body import FormsGeofenceValueObjectResponseBody
from .forms_issue_created_by_field_object_response_body import FormsIssueCreatedByFieldObjectResponseBody
from .forms_media_record_object_response_body import FormsMediaRecordObjectResponseBody
from .forms_media_value_object_response_body import FormsMediaValueObjectResponseBody
from .forms_multiple_choice_value_object_response_body import FormsMultipleChoiceValueObjectResponseBody
from .forms_number_value_object_response_body import FormsNumberValueObjectResponseBody
from .forms_person_value_object_response_body import FormsPersonValueObjectResponseBody
from .forms_signature_value_object_response_body import FormsSignatureValueObjectResponseBody
from .forms_table_value_object_response_body import FormsTableValueObjectResponseBody
from .forms_text_value_object_response_body import FormsTextValueObjectResponseBody


class FormsFieldInputObjectResponseBody(UniversalBaseModel):
    """
    Forms input field object.
    """

    asset_value: typing_extensions.Annotated[
        typing.Optional[FormsAssetValueObjectResponseBody],
        FieldMetadata(alias="assetValue"),
        pydantic.Field(alias="assetValue"),
    ] = None
    check_boxes_value: typing_extensions.Annotated[
        typing.Optional[FormsCheckBoxesValueObjectResponseBody],
        FieldMetadata(alias="checkBoxesValue"),
        pydantic.Field(alias="checkBoxesValue"),
    ] = None
    date_time_value: typing_extensions.Annotated[
        typing.Optional[FormsDateTimeValueObjectResponseBody],
        FieldMetadata(alias="dateTimeValue"),
        pydantic.Field(alias="dateTimeValue"),
    ] = None
    geofence_value: typing_extensions.Annotated[
        typing.Optional[FormsGeofenceValueObjectResponseBody],
        FieldMetadata(alias="geofenceValue"),
        pydantic.Field(alias="geofenceValue"),
    ] = None
    id: str = pydantic.Field()
    """
    ID of the forms input field object.
    """

    issue: typing.Optional[FormsIssueCreatedByFieldObjectResponseBody] = None
    label: typing.Optional[str] = pydantic.Field(default=None)
    """
    Forms input field label.
    """

    media_list: typing_extensions.Annotated[
        typing.Optional[typing.List[FormsMediaRecordObjectResponseBody]],
        FieldMetadata(alias="mediaList"),
        pydantic.Field(alias="mediaList", description="List of forms media record objects."),
    ] = None
    media_value: typing_extensions.Annotated[
        typing.Optional[FormsMediaValueObjectResponseBody],
        FieldMetadata(alias="mediaValue"),
        pydantic.Field(alias="mediaValue"),
    ] = None
    multiple_choice_value: typing_extensions.Annotated[
        typing.Optional[FormsMultipleChoiceValueObjectResponseBody],
        FieldMetadata(alias="multipleChoiceValue"),
        pydantic.Field(alias="multipleChoiceValue"),
    ] = None
    note: typing.Optional[str] = pydantic.Field(default=None)
    """
    A note attached to the field input.
    """

    number_value: typing_extensions.Annotated[
        typing.Optional[FormsNumberValueObjectResponseBody],
        FieldMetadata(alias="numberValue"),
        pydantic.Field(alias="numberValue"),
    ] = None
    person_value: typing_extensions.Annotated[
        typing.Optional[FormsPersonValueObjectResponseBody],
        FieldMetadata(alias="personValue"),
        pydantic.Field(alias="personValue"),
    ] = None
    signature_value: typing_extensions.Annotated[
        typing.Optional[FormsSignatureValueObjectResponseBody],
        FieldMetadata(alias="signatureValue"),
        pydantic.Field(alias="signatureValue"),
    ] = None
    table_value: typing_extensions.Annotated[
        typing.Optional[FormsTableValueObjectResponseBody],
        FieldMetadata(alias="tableValue"),
        pydantic.Field(alias="tableValue"),
    ] = None
    text_value: typing_extensions.Annotated[
        typing.Optional[FormsTextValueObjectResponseBody],
        FieldMetadata(alias="textValue"),
        pydantic.Field(alias="textValue"),
    ] = None
    type: FormsFieldInputObjectResponseBodyType = pydantic.Field()
    """
    Type of the field.  Valid values: `number`, `text`, `multiple_choice`, `check_boxes`, `datetime`, `signature`, `media`, `asset`, `table`, `person`, `geofence`
    """

    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
