# 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 .mode_5_mode_5_interrogation_response import Mode5Mode5InterrogationResponse


class Mode5(UniversalBaseModel):
    """
    Describes the Mode 5 transponder interrogation status and codes.
    """

    mode_5_interrogation_response: typing_extensions.Annotated[
        typing.Optional[Mode5Mode5InterrogationResponse], FieldMetadata(alias="mode5InterrogationResponse")
    ] = pydantic.Field(default=None)
    """
    The validity of the response from the Mode 5 interrogation.
    """

    mode_5: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="mode5")] = pydantic.Field(
        default=None
    )
    """
    The Mode 5 code assigned to military assets.
    """

    mode_5_platform_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="mode5PlatformId")] = (
        pydantic.Field(default=None)
    )
    """
    The Mode 5 platform identification code.
    """

    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
