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

from ...core.pydantic_utilities import UniversalBaseModel
from .project_entity_response import ProjectEntityResponse
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import typing
import pydantic


class SingleProjectEntityResponse(UniversalBaseModel):
    """
    Examples
    --------
    from sayari.project_entity import (
        Address,
        AttributeValues,
        BusinessPurpose,
        ProjectEntityMatchExplanation,
        ProjectEntityMatchResponse,
        ProjectEntityResponse,
        ProjectRiskCategory,
        ProjectRiskFactor,
        SingleProjectEntityResponse,
        SourceField,
        TradeCounts,
        UpstreamInfo,
    )

    SingleProjectEntityResponse(
        data=ProjectEntityResponse(
            project_entity_id="52z4Wa",
            project_id="YVB88Y",
            label="VTB Bank",
            upload_ids=[],
            strength="strong",
            created_at="2025-04-22 22:54:00.913586+00",
            attributes={
                "name": AttributeValues(
                    match_resolution=True,
                    values=["VTB Bank"],
                ),
                "country": AttributeValues(
                    match_resolution=True,
                    values=["RUS"],
                ),
                "address": AttributeValues(
                    match_resolution=True,
                    values=["Moscow"],
                ),
                "identifier": AttributeValues(
                    match_resolution=True,
                    values=["253400V1H6ART1UQ0N98"],
                ),
            },
            countries=[
                "USA",
                "CYP",
                "ITA",
                "CHN",
                "RUS",
                "UKR",
                "IND",
                "IRL",
                "KAZ",
                "DEU",
            ],
            risk_categories=[
                ProjectRiskCategory(
                    id="regulatory_action",
                    label="Regulatory action",
                    risk_factors=["regulatory_action"],
                ),
                ProjectRiskCategory(
                    id="export_controls",
                    label="Export controls",
                    risk_factors=["meu_list_contractors", "export_controls"],
                ),
                ProjectRiskCategory(
                    id="political_exposure",
                    label="Political exposure",
                    risk_factors=["soe_adjacent", "pep_adjacent"],
                ),
                ProjectRiskCategory(
                    id="sanctions",
                    label="Sanctions",
                    risk_factors=["sanctioned", "formerly_sanctioned"],
                ),
                ProjectRiskCategory(
                    id="adverse_media",
                    label="Adverse media",
                    risk_factors=["reputational_risk_other"],
                ),
            ],
            risk_factors=[
                ProjectRiskFactor(
                    id="regulatory_action",
                ),
                ProjectRiskFactor(
                    id="sanctioned",
                ),
                ProjectRiskFactor(
                    id="meu_list_contractors",
                ),
                ProjectRiskFactor(
                    id="reputational_risk_other",
                ),
                ProjectRiskFactor(
                    id="pep_adjacent",
                ),
                ProjectRiskFactor(
                    id="state_owned",
                ),
                ProjectRiskFactor(
                    id="export_controls",
                ),
                ProjectRiskFactor(
                    id="formerly_sanctioned",
                ),
                ProjectRiskFactor(
                    id="basel_aml",
                ),
                ProjectRiskFactor(
                    id="cpi_score",
                ),
            ],
            upstream=UpstreamInfo(
                risk_factors=[],
                countries=[],
                trade_counts=TradeCounts(
                    shipper_of=56,
                    receiver_of=2,
                ),
                has_upstream=False,
                products=[],
            ),
            tags=[],
            case="not_assigned",
            matches=[
                ProjectEntityMatchResponse(
                    match_id="52z4Wa:dy-rh2g0QtzUN_jC_e9S_A",
                    sayari_entity_id="dy-rh2g0QtzUN_jC_e9S_A",
                    type="company",
                    label='ОТКРЫТОЕ АКЦИОНЕРНОЕ ОБЩЕСТВО "РОССИЙСКИЕ ЖЕЛЕЗНЫЕ ДОРОГИ"',
                    match_explanation=[
                        ProjectEntityMatchExplanation(
                            field="name",
                            quality="high",
                            matches=[
                                "<em>БАНК</em> <em>ВТБ</em> (ПАО)",
                                "<em>VTB</em> <em>BANK</em> (PJSC)",
                                "<em>БАНК</em> <em>ВТБ</em> (ПУБЛИЧНОЕ АКЦИОНЕРНОЕ ОБЩЕСТВО)",
                                "<em>VTB</em> <em>BANK</em> (PUBLIC JOINT STOCK COMPANY)",
                                "<em>VTB</em> <em>Bank</em>",
                            ],
                        ),
                        ProjectEntityMatchExplanation(
                            field="address",
                            quality="medium",
                            matches=[
                                "109147 <em>Moscow</em>, st. Vorontsovskaya, 43 building 1",
                                "119121 <em>Moscow</em>, st. Plyushchikha, 37.",
                                "Vorontsovskaya Str., 43 <em>Moscow</em> 109044 RUSSIAN FEDERATION",
                                "37 Plyushchikha ul., <em>Moscow</em>, 119121, Russia",
                                "Bashnya Zapad, Kompleks Federatsiya, 12, nab. Presnenskaya, <em>Moscow</em>, 123317, Russia",
                            ],
                        ),
                        ProjectEntityMatchExplanation(
                            field="country",
                            quality="high",
                            matches=["<em>RUS</em>"],
                        ),
                        ProjectEntityMatchExplanation(
                            field="identifier",
                            quality="high",
                            matches=["<em>253400V1H6ART1UQ0N98</em>"],
                        ),
                    ],
                    countries=[
                        "USA",
                        "CYP",
                        "ITA",
                        "CHN",
                        "RUS",
                        "UKR",
                        "IND",
                        "IRL",
                        "KAZ",
                        "DEU",
                    ],
                    risk_categories=[
                        ProjectRiskCategory(
                            id="regulatory_action",
                            label="Regulatory action",
                            risk_factors=["regulatory_action"],
                        ),
                        ProjectRiskCategory(
                            id="export_controls",
                            label="Export controls",
                            risk_factors=[
                                "meu_list_contractors",
                                "export_controls",
                            ],
                        ),
                        ProjectRiskCategory(
                            id="political_exposure",
                            label="Political exposure",
                            risk_factors=["soe_adjacent", "pep_adjacent"],
                        ),
                        ProjectRiskCategory(
                            id="sanctions",
                            label="Sanctions",
                            risk_factors=["sanctioned", "formerly_sanctioned"],
                        ),
                        ProjectRiskCategory(
                            id="adverse_media",
                            label="Adverse media",
                            risk_factors=["reputational_risk_other"],
                        ),
                    ],
                    risk_factors=[
                        ProjectRiskFactor(
                            id="regulatory_action",
                        ),
                        ProjectRiskFactor(
                            id="sanctioned",
                        ),
                        ProjectRiskFactor(
                            id="meu_list_contractors",
                        ),
                        ProjectRiskFactor(
                            id="reputational_risk_other",
                        ),
                        ProjectRiskFactor(
                            id="pep_adjacent",
                        ),
                        ProjectRiskFactor(
                            id="state_owned",
                        ),
                        ProjectRiskFactor(
                            id="export_controls",
                        ),
                        ProjectRiskFactor(
                            id="formerly_sanctioned",
                        ),
                        ProjectRiskFactor(
                            id="basel_aml",
                        ),
                        ProjectRiskFactor(
                            id="cpi_score",
                        ),
                    ],
                    business_purpose=[
                        BusinessPurpose(
                            standard="ISIC4",
                            code="6419",
                        ),
                        BusinessPurpose(
                            code="64.19",
                            standard="unknown",
                        ),
                        BusinessPurpose(
                            code="64.9",
                            standard="unknown",
                        ),
                        BusinessPurpose(
                            code="62.09",
                            standard="unknown",
                        ),
                        BusinessPurpose(
                            standard="NACE2",
                            code="64.19",
                        ),
                        BusinessPurpose(
                            code="64.19",
                            standard="unknown",
                        ),
                        BusinessPurpose(
                            standard="ISIC4",
                            code="649",
                        ),
                        BusinessPurpose(
                            code="66.12",
                            standard="unknown",
                        ),
                        BusinessPurpose(
                            standard="ISIC4",
                            code="6419",
                        ),
                        BusinessPurpose(
                            standard="ISIC4",
                            code="6209",
                        ),
                        BusinessPurpose(
                            standard="ISIC4",
                            code="6612",
                        ),
                    ],
                    upstream=UpstreamInfo(
                        risk_factors=[],
                        countries=[],
                        trade_counts=TradeCounts(
                            shipper_of=56,
                            receiver_of=2,
                        ),
                        has_upstream=False,
                        products=[],
                        risk_counts={},
                        country_counts={},
                    ),
                    sources=[
                        SourceField(
                            id="eb361ba33d05a9d15b2d28aea739362a",
                            label="USA SEC Central Index Key Database",
                        ),
                        SourceField(
                            id="a8c6ee1cd4dfc952105ee8c0e4836f08",
                            label="Acuris Risk Intelligence KYC6 (3rd Party Data)",
                        ),
                        SourceField(
                            id="3322a755c28851ec06eda3280cc2a2b2",
                            label="Russia ClearSpending (3rd Party Data)",
                        ),
                        SourceField(
                            id="93de05b55a68cc964f34bbfc7ec7bc86",
                            label="Consolidated Canadian Autonomous Sanctions List",
                        ),
                        SourceField(
                            id="fdfedf11a5122e2aef9dc3f176c7427d",
                            label="Sayari Intel (Sayari Curated Risk Data) - Archived",
                        ),
                        SourceField(
                            id="e517c714b560f159a89a9501ed7dd84e",
                            label="Infocredit Cyprus Company Shareholders Database (3rd Party Data)",
                        ),
                        SourceField(
                            id="bef2f30139ea37c723ecb0f953b5f024",
                            label="Australia Consolidated Sanctions List",
                        ),
                        SourceField(
                            id="9048153c770d941afe9500c6ad810a80",
                            label="Kazakhstan DFO Registry",
                        ),
                        SourceField(
                            id="635021e4e01979cdf95fa7ee76501696",
                            label="Russia E-Disclosures",
                        ),
                        SourceField(
                            id="e85d865943ee6d8369307569d2ad9de0",
                            label="Acuris Risk Intelligence Adverse Media Data",
                        ),
                        SourceField(
                            id="4ff85397f508e4ff8e71c5ca5ea895dd",
                            label="Japan Ministry of Finance Economic Sanctions List",
                        ),
                        SourceField(
                            id="ce873f184abee5b13c9e89791bd78229",
                            label="Ukraine Significant Shareholders of Securities Issuers",
                        ),
                        SourceField(
                            id="8511f57f6098dcc36e3a814c3ea5bdd7",
                            label="Uzbekistan Imports & Exports (January 2022 - Present)",
                        ),
                        SourceField(
                            id="e6e4acebdea4e9e71af8d3586d34fcdd",
                            label="Ukraine Sanctions List",
                        ),
                        SourceField(
                            id="db3416894cd5f0c4d2d6ecc79bdaf366",
                            label="EDI Publicly-Listed Global Security Issuers (3rd Party Data)",
                        ),
                        SourceField(
                            id="b812677c0a32a1746b3ac741c7b97ae0",
                            label="Legal Entity Identifier (LEI) Registry (3rd Party Data)",
                        ),
                        SourceField(
                            id="a9a18eeb901e4376c912e95dc05ceb78",
                            label="Russia Federal Tax Registry",
                        ),
                        SourceField(
                            id="d357238101a2bb02d97d5d77a56d9455",
                            label="New Zealand Russia Sanctions",
                        ),
                        SourceField(
                            id="f4ce10ac8bdc0bd9bcb31cb868b4b539",
                            label="EU Financial Sanctions List",
                        ),
                        SourceField(
                            id="c10d482320f207d92aa814519c3bd686",
                            label="UK Consolidated Sanctions List",
                        ),
                        SourceField(
                            id="d1bce737c158efddbef5048d63aaf124",
                            label="Ukraine Ministry of Justice Registry of Companies",
                        ),
                        SourceField(
                            id="92edb8fe6615498f6e3e7b0e220f74e6",
                            label="USA Treasury OFAC Specially Designated Nationals (SDN) List",
                        ),
                        SourceField(
                            id="66dfefb726ae00fde8f09f34c5578d35",
                            label="Russia Imports & Exports (January 2023 - Present)",
                        ),
                        SourceField(
                            id="ad6dc774c74b92159422deabc5aee661",
                            label="France National Asset Freeze Register",
                        ),
                        SourceField(
                            id="b97ad5c858093e5227b2359a0078696f",
                            label="USA SAM.gov Entity Exclusions Database",
                        ),
                        SourceField(
                            id="ddbf93a5c5d568ccdb0c2455f7ecbfc8",
                            label="USA CorpWatch SEC 10-K Exhibit 21 Database (3rd Party Data)",
                        ),
                        SourceField(
                            id="52a7bc4a30e787544ad2d95e7f54adca",
                            label="USA OFAC Non-SDN Consolidated Sanctions List",
                        ),
                        SourceField(
                            id="f43658cf2a19452fb45b830edeeeea44",
                            label="Russia Central Bank Financial Institution UBO Disclosures",
                        ),
                        SourceField(
                            id="828f81c7c31410de845d9e6ed1a0f3e6",
                            label="Russia Central Bank Financial Institutions",
                        ),
                        SourceField(
                            id="56bce0e008204712e302271ddd7b4fb1",
                            label="Russia Federal Tax Registry (2018)",
                        ),
                        SourceField(
                            id="e0b32f41da3b4e6c75f1f7bf6fe1c9c5",
                            label="S&P Global Market Intelligence Database (3rd Party Data)",
                        ),
                        SourceField(
                            id="10a889609ddae6cc31773feebe48166b",
                            label="Switzerland SECO Sanctions List",
                        ),
                        SourceField(
                            id="ded706ef28cdc649b6fc5142bc542890",
                            label="EU Sanctions Map",
                        ),
                        SourceField(
                            id="417400a1ac439843fda5bb2f05fb4161",
                            label="USA Consolidated Screening List",
                        ),
                        SourceField(
                            id="765d0dc816bb7db35031c43a37290350",
                            label="Ireland Companies Registration Office Database",
                        ),
                    ],
                    addresses=[
                        Address(
                            value="190000, г Санкт-Петербург, ул Большая Морская, дом 29",
                        ),
                        Address(
                            value="109147 г. Москва, ул. Воронцовская, д.43 стр.1",
                        ),
                        Address(
                            value="119121 г. Москва, ул. Плющиха, д. 37.",
                        ),
                        Address(
                            value="43, Vorontsovskaya str., Moscow, 109044, Russia",
                        ),
                        Address(
                            value="11, lit A, Degtyarnyy pereulok, St. Petersburg, 191144, Russia",
                        ),
                        Address(
                            value="29, Bolshaya Morskaya str., St. Petersburg, 190000, Russia",
                        ),
                    ],
                    hs_codes=[
                        "847150",
                        "8471500000",
                        "852351",
                        "8523519101",
                        "860610",
                        "8606100000",
                        "271019",
                        "2710196601",
                        "490700",
                        "4907003000",
                        "711890",
                        "7118900000",
                        "490700",
                        "4907003000",
                        "711890",
                        "7118900000",
                    ],
                    created_at="2025-04-22 22:54:00.913586+00",
                    updated_at="2025-04-22 22:54:00.913586+00",
                )
            ],
        ),
    )
    """

    data: ProjectEntityResponse

    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
