# This file was auto-generated by Fern from our API Definition.

from ...core.pydantic_utilities import UniversalBaseModel
import pydantic
import typing
from ...generated_types.types.risk import Risk
from .business_purpose import BusinessPurpose
from ...generated_types.types.country import Country
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class SourceOrDestinationEntity(UniversalBaseModel):
    id: str = pydantic.Field()
    """
    Unique identifier of the entity
    """

    names: typing.List[str]
    risks: typing.Dict[Risk, typing.Optional[typing.Any]] = pydantic.Field()
    """
    [Risks](/sayari-library/ontology/risk-factors)
    """

    business_purpose: typing.List[BusinessPurpose] = pydantic.Field()
    """
    [Business Purpose](/sayari-library/ontology/enumerated-types#business-purpose-standard)
    """

    countries: typing.List[Country] = pydantic.Field()
    """
    [Countries](/sayari-library/ontology/enumerated-types#country)
    """

    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
