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

from __future__ import annotations
from ...core.unchecked_base_model import UncheckedBaseModel
import typing
from ...common.types.id import Id
from ...engine.types.object import Object
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
import typing_extensions
from ...core.unchecked_base_model import UnionMetadata


class IncidentResponseTeamUnion_IncidentResponseTeam(UncheckedBaseModel):
    type: typing.Literal["incident_response_team"] = "incident_response_team"
    desc: typing.Optional[str] = None
    name: typing.Optional[str] = None
    src_url: typing.Optional[str] = None
    uid: Id
    unmapped: typing.Optional[Object] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
            extra="allow"
        )  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow


class IncidentResponseTeamUnion_IncidentResponseTeamReference(UncheckedBaseModel):
    type: typing.Literal["incident_response_team_reference"] = (
        "incident_response_team_reference"
    )
    name: typing.Optional[str] = None
    desc: typing.Optional[str] = None
    uid: Id
    src_url: typing.Optional[str] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
            extra="allow"
        )  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow


IncidentResponseTeamUnion = typing_extensions.Annotated[
    typing.Union[
        IncidentResponseTeamUnion_IncidentResponseTeam,
        IncidentResponseTeamUnion_IncidentResponseTeamReference,
    ],
    UnionMetadata(discriminant="type"),
]
