# 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 .related_entity_contact import RelatedEntityContact
from .service_type_code import ServiceTypeCode


class BenefitsRelatedEntity(UniversalBaseModel):
    entity_identifier: typing.Optional[str] = pydantic.Field(alias="entityIdentifier", default=None)
    entity_type: typing.Optional[str] = pydantic.Field(alias="entityType", default=None)
    entity_name: typing.Optional[str] = pydantic.Field(alias="entityName", default=None)
    contact_information: typing.Optional[typing.List[RelatedEntityContact]] = pydantic.Field(
        alias="contactInformation", default=None
    )
    service_type_codes: typing.Optional[typing.List[ServiceTypeCode]] = pydantic.Field(
        alias="serviceTypeCodes", default=None
    )

    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
