# 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 .conditional_field_section_object_response_body import ConditionalFieldSectionObjectResponseBody
from .field_types_object_response_body import FieldTypesObjectResponseBody


class GetDocumentTypeResponseObjectResponseBody(UniversalBaseModel):
    conditional_field_sections: typing_extensions.Annotated[
        typing.Optional[typing.List[ConditionalFieldSectionObjectResponseBody]],
        FieldMetadata(alias="conditionalFieldSections"),
        pydantic.Field(
            alias="conditionalFieldSections", description="List of the document type conditional field sections."
        ),
    ] = None
    field_types: typing_extensions.Annotated[
        typing.Optional[typing.List[FieldTypesObjectResponseBody]],
        FieldMetadata(alias="fieldTypes"),
        pydantic.Field(alias="fieldTypes", description="The fields associated with this document type."),
    ] = None
    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Universally unique identifier for the document type. This value can be passed in as the documentTypeId when creating a document.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Name of the document type.
    """

    org_id: typing_extensions.Annotated[
        typing.Optional[int],
        FieldMetadata(alias="orgId"),
        pydantic.Field(alias="orgId", description="ID for the organization this document type belongs to."),
    ] = 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
