# 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 .accept_oauth import AcceptOauth
from .accept_register import AcceptRegister
from .entry_attributes import EntryAttributes
from .last_modified import LastModified
from .org_parent_name import OrgParentName
from .reference_name import ReferenceName
from .reference_template_id import ReferenceTemplateId
from .template_code import TemplateCode
from .template_name import TemplateName


class QueryBoardingLinksResponseRecordsItem(UniversalBaseModel):
    accept_oauth: typing_extensions.Annotated[typing.Optional[AcceptOauth], FieldMetadata(alias="AcceptOauth")] = None
    accept_register: typing_extensions.Annotated[
        typing.Optional[AcceptRegister], FieldMetadata(alias="AcceptRegister")
    ] = None
    entry_attributes: typing_extensions.Annotated[
        typing.Optional[EntryAttributes], FieldMetadata(alias="EntryAttributes")
    ] = None
    id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="Id")] = pydantic.Field(default=None)
    """
    The record ID.
    """

    last_updated: typing_extensions.Annotated[typing.Optional[LastModified], FieldMetadata(alias="LastUpdated")] = None
    org_parent_name: typing_extensions.Annotated[
        typing.Optional[OrgParentName], FieldMetadata(alias="OrgParentName")
    ] = None
    reference_name: typing_extensions.Annotated[
        typing.Optional[ReferenceName], FieldMetadata(alias="ReferenceName")
    ] = None
    reference_template_id: typing_extensions.Annotated[
        typing.Optional[ReferenceTemplateId], FieldMetadata(alias="ReferenceTemplateId")
    ] = None
    template_code: typing_extensions.Annotated[typing.Optional[TemplateCode], FieldMetadata(alias="TemplateCode")] = (
        None
    )
    template_name: typing_extensions.Annotated[typing.Optional[TemplateName], FieldMetadata(alias="TemplateName")] = (
        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
