# 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 .insurance_type_codes import InsuranceTypeCodes
from .line_of_business import LineOfBusiness


class InsuranceType(UniversalBaseModel):
    line_of_business: LineOfBusiness = pydantic.Field()
    """
    The line of business associated with the patient’s insurance
    """

    insurance_type_codes: InsuranceTypeCodes

    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
