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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .document_type_enum import DocumentTypeEnum
from .file_response import FileResponse
from .template_type_enum import TemplateTypeEnum


class TemplateReceivableResponse(UniversalBaseModel):
    id: str
    created_at: typing.Optional[dt.datetime] = None
    updated_at: typing.Optional[dt.datetime] = None
    blocks: typing.Optional[typing.List[str]] = None
    document_type: DocumentTypeEnum
    is_default: bool
    language: str
    name: str
    preview: typing.Optional[FileResponse] = None
    template: str
    template_type: typing.Optional[TemplateTypeEnum] = 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
