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

from ...core.pydantic_utilities import UniversalBaseModel
from .ontology_risk_factors_filters import OntologyRiskFactorsFilters
import typing
from .ontology_risk_factor import OntologyRiskFactor
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class GetOntologyRiskFactorsResponse(UniversalBaseModel):
    """
    Examples
    --------
    from sayari.ontology import (
        GetOntologyRiskFactorsResponse,
        OntologyRiskFactor,
        OntologyRiskFactorsFilters,
    )

    GetOntologyRiskFactorsResponse(
        filters=OntologyRiskFactorsFilters(
            id=["psa_owner_of_ofac_fto_sanctioned"],
            risk_category=["sanctions"],
            level=["high"],
            risk_type=["network"],
            enabled=True,
            visible=True,
        ),
        data=[
            OntologyRiskFactor(
                id="psa_owner_of_ofac_fto_sanctioned",
                categories=["sanctions"],
                label="Owner of Foreign Terrorist Organisation (May Include 'PSA' Path)",
                description="This entity possibly owns (minority, majority, or wholly) a Foreign Terrorist Organization up to 3 hops away via direct shareholding relationships with 10% or more controlling interest, including beneficial owner, owner, shareholder, partner, subsidiary, or branch. Applicable to entities globally. This network risk path may include ‘Possibly the Same As’ (PSA) relationships—links between companies or persons that have closely matching attributes across datasets, but do not have enough shared information to definitively establish they are the same entity.",
                doc="This entity possibly owns (minority, majority, or wholly) a Foreign Terrorist Organization up to 3 hops away via direct shareholding relationships with 10% or more controlling interest, including beneficial owner, owner, shareholder, partner, subsidiary, or branch. Applicable to entities globally. This network risk path may include ‘Possibly the Same As’ (PSA) relationships—links between companies or persons that have closely matching attributes across datasets, but do not have enough shared information to definitively establish they are the same entity.",
                code=1168016564,
                level="high",
                risk_type="network",
                risk_viz="network",
                visible=True,
                enabled=True,
                type="integer",
                tg=True,
                do_not_render_metadata=["traversal_path"],
            )
        ],
        total_count=1234,
    )
    """

    filters: OntologyRiskFactorsFilters
    data: typing.List[OntologyRiskFactor]
    total_count: int

    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
