# 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 .payer_id import PayerId
from .payer_name import PayerName
from .payer_uuid import PayerUuid


class PayerIdentifier_PayerInfo(UniversalBaseModel):
    type: typing.Literal["payer_info"] = "payer_info"
    payer_id: PayerId
    payer_name: PayerName

    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


class PayerIdentifier_PayerUuid(UniversalBaseModel):
    value: PayerUuid
    type: typing.Literal["payer_uuid"] = "payer_uuid"

    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


PayerIdentifier = typing.Union[PayerIdentifier_PayerInfo, PayerIdentifier_PayerUuid]
