# 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 .type_of_bill_frequency_code import TypeOfBillFrequencyCode
from .type_of_care_code import TypeOfCareCode
from .type_of_facility_code import TypeOfFacilityCode


class TypeOfBillCompositeBase(UniversalBaseModel):
    type_of_facility: TypeOfFacilityCode = pydantic.Field()
    """
    The FL04 Institutional type of facility code for the bill.  The second digit of the composite code.
    """

    type_of_care: TypeOfCareCode = pydantic.Field()
    """
    The FL04 Institutional type of care code for the bill.  The third digit of the composite code.
    """

    frequency_code: TypeOfBillFrequencyCode = pydantic.Field()
    """
    The FL04 Institutional frequency code for the bill.  The fourth digit of the composite code.
    """

    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
