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

from ...core.pydantic_utilities import UniversalBaseModel
from .project_entity_supply_chain_snapshot_detail_data import ProjectEntitySupplyChainSnapshotDetailData
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import typing
import pydantic


class ProjectEntitySupplyChainSnapshotByIdResponse(UniversalBaseModel):
    """
    Examples
    --------
    from sayari.project_entity_supply_chain_snapshots import (
        ProjectEntitySupplyChainSnapshotByIdResponse,
        ProjectEntitySupplyChainSnapshotDetailData,
        SupplyChainEdge,
        SupplyChainNode,
    )

    ProjectEntitySupplyChainSnapshotByIdResponse(
        data=ProjectEntitySupplyChainSnapshotDetailData(
            snapshot_id="nK9mP2",
            label="Production Supply Chain Analysis",
            release_tag="20250115143000_prod",
            partial_results=True,
            explored_count=15,
            created_at="2025-01-15 14:30:00.12345+00",
            updated_at="2025-01-15 14:30:00.12345+00",
            nodes=[
                SupplyChainNode(
                    id="xG8wYP",
                    entity_id="oSlRbVMw4JdQ_R0nTd7yaQ",
                    label="TechCorp Inc",
                    type="company",
                    risk_factors=[
                        "export_controls",
                        "former_wro_entity",
                        "export_to_soe",
                    ],
                    countries=["USA", "CHN"],
                ),
                SupplyChainNode(
                    id="6GaxYn",
                    entity_id="rSoUePz7MgU_U3qWg0bdT",
                    label="Trade Partners Ltd",
                    type="company",
                    risk_factors=[
                        "export_controls",
                        "former_wro_entity",
                        "export_to_soe",
                    ],
                    countries=["RUS", "IRN"],
                ),
                SupplyChainNode(
                    id="JGlwYl",
                    entity_id="sTpVfQa8NhV_V4rXh1ceU",
                    label="International Logistics",
                    type="company",
                    risk_factors=["export_to_soe"],
                    countries=["GBR", "NLD"],
                ),
            ],
            edges=[
                SupplyChainEdge(
                    id="xG8wYP",
                    src_id="6GaxYn",
                    dst_id="xG8wYP",
                    departure_countries=["AFG"],
                    arrival_countries=["AFG", "AGO"],
                    hs_code="0303",
                    min_date="51969-08-29T00:00:00+00:00",
                    max_date="52971-09-25T00:00:00+00:00",
                ),
                SupplyChainEdge(
                    id="6GaxYn",
                    src_id="6GaxYn",
                    dst_id="JGlwYl",
                    departure_countries=["AFG"],
                    arrival_countries=["AFG", "AGO"],
                    hs_code="0304",
                    min_date="51969-08-29T00:00:00+00:00",
                    max_date="52971-09-25T00:00:00+00:00",
                ),
                SupplyChainEdge(
                    id="V03eYM",
                    src_id="xG8wYP",
                    dst_id="JGlwYl",
                    departure_countries=["USA", "CHN"],
                    arrival_countries=["GBR", "NLD"],
                    hs_code="0303",
                    min_date="51969-08-29T00:00:00+00:00",
                    max_date="52971-09-25T00:00:00+00:00",
                ),
            ],
        ),
    )
    """

    data: ProjectEntitySupplyChainSnapshotDetailData

    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
