# 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 .business_section import BusinessSection
from .document_section import DocumentSection
from .owners_section import OwnersSection
from .processing_section import ProcessingSection
from .sales_section import SalesSection
from .services_section import ServicesSection
from .underwriting_data_response import UnderwritingDataResponse


class TemplateContentResponse(UniversalBaseModel):
    business_data: typing_extensions.Annotated[
        typing.Optional[BusinessSection], FieldMetadata(alias="businessData")
    ] = None
    documents_data: typing_extensions.Annotated[
        typing.Optional[DocumentSection], FieldMetadata(alias="documentsData")
    ] = None
    ownership_data: typing_extensions.Annotated[
        typing.Optional[OwnersSection], FieldMetadata(alias="ownershipData")
    ] = None
    processing_data: typing_extensions.Annotated[
        typing.Optional[ProcessingSection], FieldMetadata(alias="processingData")
    ] = None
    sales_data: typing_extensions.Annotated[typing.Optional[SalesSection], FieldMetadata(alias="salesData")] = None
    services_data: typing_extensions.Annotated[
        typing.Optional[ServicesSection], FieldMetadata(alias="servicesData")
    ] = None
    underwriting_data: typing_extensions.Annotated[
        typing.Optional[UnderwritingDataResponse], FieldMetadata(alias="underwritingData")
    ] = 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
