# 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 .billing_provider_secondary_identification_qualifier import BillingProviderSecondaryIdentificationQualifier


class BillingProviderSecondaryIdentification(UniversalBaseModel):
    reference_identification: str = pydantic.Field()
    """
    Represents REF02 on the EDI 837 Loop 2010BB Billing Provider Secondary Identification segment. Value cannot exceed 50 characters
    """

    reference_identification_qualifier: typing.Optional[BillingProviderSecondaryIdentificationQualifier] = (
        pydantic.Field(default=None)
    )
    """
    Represents REF01 on the EDI 837 Loop 2010BB Billing Provider Secondary Identification segment.
    Valid values include G2 (Provider Commercial Number) and LU (Location Number). Defaults to G2 if not set.
    """

    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
