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

from ...core.pydantic_utilities import UniversalBaseModel
import typing
from .project_risk_category import ProjectRiskCategory
from .project_risk_factor import ProjectRiskFactor
from .business_purpose import BusinessPurpose
from .upstream_info import UpstreamInfo
from .source_field import SourceField
from .address import Address
from .match_profile_enum import MatchProfileEnum
from .project_entity_match_explanation import ProjectEntityMatchExplanation
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class ProjectEntityMatchResponse(UniversalBaseModel):
    match_id: str
    sayari_entity_id: str
    type: str
    label: str
    countries: typing.List[str]
    risk_categories: typing.List[ProjectRiskCategory]
    risk_factors: typing.List[ProjectRiskFactor]
    business_purpose: typing.List[BusinessPurpose]
    upstream: UpstreamInfo
    sources: typing.List[SourceField]
    addresses: typing.List[Address]
    hs_codes: typing.List[str]
    created_at: str
    updated_at: typing.Optional[str] = None
    match_profile: typing.Optional[MatchProfileEnum] = None
    deleted_at: typing.Optional[str] = None
    match_explanation: typing.Optional[typing.List[ProjectEntityMatchExplanation]] = 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
