# 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 .property_casualty_patient_identifier_qualifier import PropertyCasualtyPatientIdentifierQualifier


class PropertyCasualtyPatientIdentifier(UniversalBaseModel):
    property_casualty_patient_identifier_qualifier: PropertyCasualtyPatientIdentifierQualifier = pydantic.Field()
    """
    Represents REF01 on the EDI 837 Loop 2010CA Property and Casualty Patient Identifier segment.
    Valid values include 1W (Member Identification Number) and SY (Social Security Number).
    """

    property_casualty_patient_identifier: str = pydantic.Field()
    """
    Represents REF02 on the EDI 837 Loop 2010CA Property and Casualty Patient Identifier segment. Value cannot exceed 50 characters
    """

    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
