# 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 .boarding_query_links import BoardingQueryLinks
from .created_at import CreatedAt
from .is_root import IsRoot
from .org_parent_name import OrgParentName
from .recipient_email_notification import RecipientEmailNotification
from .resumable import Resumable
from .template_code import TemplateCode
from .template_content_response import TemplateContentResponse


class TemplateQueryRecord(UniversalBaseModel):
    add_price: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="addPrice")] = None
    boarding_links: typing_extensions.Annotated[
        typing.Optional[typing.List[BoardingQueryLinks]], FieldMetadata(alias="boardingLinks")
    ] = None
    created_at: typing_extensions.Annotated[typing.Optional[CreatedAt], FieldMetadata(alias="createdAt")] = None
    id_template: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="idTemplate")] = None
    is_root: typing_extensions.Annotated[typing.Optional[IsRoot], FieldMetadata(alias="isRoot")] = None
    org_parent_name: typing_extensions.Annotated[
        typing.Optional[OrgParentName], FieldMetadata(alias="orgParentName")
    ] = None
    recipient_email_notification: typing_extensions.Annotated[
        typing.Optional[RecipientEmailNotification], FieldMetadata(alias="recipientEmailNotification")
    ] = None
    resumable: typing.Optional[Resumable] = None
    template_code: typing_extensions.Annotated[typing.Optional[TemplateCode], FieldMetadata(alias="templateCode")] = (
        None
    )
    template_content: typing_extensions.Annotated[
        typing.Optional[TemplateContentResponse], FieldMetadata(alias="templateContent")
    ] = None
    template_description: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="templateDescription")
    ] = None
    template_title: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="templateTitle")] = None
    used_by: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="usedBy")] = 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
