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

from __future__ import annotations

import typing

import typing_extensions

from .identifier_create import IdentifierCreate
from .identifier_id import IdentifierId
from .identifier_update import IdentifierUpdate

try:
    import pydantic.v1 as pydantic  # type: ignore
except ImportError:
    import pydantic  # type: ignore


class UpdatableIdentifier_Add(IdentifierCreate):
    type: typing_extensions.Literal["add"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class UpdatableIdentifier_Update(IdentifierUpdate):
    type: typing_extensions.Literal["update"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class UpdatableIdentifier_Remove(pydantic.BaseModel):
    type: typing_extensions.Literal["remove"]
    value: IdentifierId

    class Config:
        frozen = True
        smart_union = True


UpdatableIdentifier = typing.Union[UpdatableIdentifier_Add, UpdatableIdentifier_Update, UpdatableIdentifier_Remove]
