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

import typing

import pydantic
from ......core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .....commons.types.clearinghouse import Clearinghouse
from .....commons.types.street_address_long_zip import StreetAddressLongZip
from .clearinghouse_payer_info import ClearinghousePayerInfo
from .payer_category import PayerCategory
from .payer_uuid import PayerUuid
from .primary_payer_ids import PrimaryPayerIds


class Payer(UniversalBaseModel):
    payer_uuid: PayerUuid = pydantic.Field()
    """
    Auto-generated ID set on creation.
    """

    payer_ids: PrimaryPayerIds = pydantic.Field()
    """
    The primary national payer IDs of the payer.
    """

    payer_name: str = pydantic.Field()
    """
    The primary display name of the payer.
    """

    payer_category: typing.Optional[PayerCategory] = pydantic.Field(default=None)
    """
    The category of the payer.
    """

    alternate_payer_names: typing.List[str] = pydantic.Field()
    """
    The alternate display names of the payer.
    """

    clearinghouse_payer_info: typing.Dict[Clearinghouse, ClearinghousePayerInfo]
    street_address: typing.Optional[StreetAddressLongZip] = None
    alternate_payer_addresses: typing.List[StreetAddressLongZip]

    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
