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

from __future__ import annotations

import typing

import pydantic
from ......core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .....commons.types.npi import Npi
from .....commons.types.tax_id import TaxId


class PayeeIdentifier_Npi(UniversalBaseModel):
    value: Npi
    type: typing.Literal["npi"] = "npi"

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

        class Config:
            frozen = True
            smart_union = True


class PayeeIdentifier_Tin(UniversalBaseModel):
    value: TaxId
    type: typing.Literal["tin"] = "tin"

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

        class Config:
            frozen = True
            smart_union = True


class PayeeIdentifier_CmsPlanId(UniversalBaseModel):
    value: str
    type: typing.Literal["cms_plan_id"] = "cms_plan_id"

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

        class Config:
            frozen = True
            smart_union = True


PayeeIdentifier = typing.Union[PayeeIdentifier_Npi, PayeeIdentifier_Tin, PayeeIdentifier_CmsPlanId]
