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

from __future__ import annotations

import typing

import typing_extensions

from .....commons.types.npi import Npi
from .....commons.types.tax_id import TaxId

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


class PayeeIdentifier_Npi(pydantic.BaseModel):
    type: typing_extensions.Literal["npi"]
    value: Npi

    class Config:
        frozen = True
        smart_union = True


class PayeeIdentifier_Tin(pydantic.BaseModel):
    type: typing_extensions.Literal["tin"]
    value: TaxId

    class Config:
        frozen = True
        smart_union = True


class PayeeIdentifier_CmsPlanId(pydantic.BaseModel):
    type: typing_extensions.Literal["cms_plan_id"]
    value: str

    class Config:
        frozen = True
        smart_union = True


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