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

from ...core.pydantic_utilities import UniversalBaseModel
import typing
from .project_notification_data import ProjectNotificationData
from ...base_types.types.qualified_count import QualifiedCount
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class ProjectNotificationsResponse(UniversalBaseModel):
    """
    OK

    Examples
    --------
    from sayari.base_types import QualifiedCount
    from sayari.notifications import (
        Notification,
        ProjectNotificationData,
        ProjectNotificationRiskData,
        ProjectNotificationsResponse,
    )

    ProjectNotificationsResponse(
        next=False,
        size=QualifiedCount(
            count=73,
            qualifier="eq",
        ),
        data=[
            ProjectNotificationData(
                resource_id="olxQPZ",
                entity_id="IoKwj2-82wwzZRlFA1htGQ",
                notifications=[
                    Notification(
                        type="risk",
                        field="exports_ilab_child_labor",
                        values=["false"],
                        date="2025-06-04T00:00:00.000Z",
                    ),
                    Notification(
                        type="risk",
                        field="exports_ilab_forced_labor",
                        values=["false"],
                        date="2025-06-04T00:00:00.000Z",
                    ),
                    Notification(
                        type="risk",
                        field="forced_labor_xinjiang_origin_subtier",
                        values=["3"],
                        date="2025-06-04T00:00:00.000Z",
                    ),
                    Notification(
                        type="risk",
                        field="psa_exports_ilab_child_labor",
                        values=["false"],
                        date="2025-06-04T00:00:00.000Z",
                    ),
                    Notification(
                        type="risk",
                        field="psa_exports_ilab_forced_labor",
                        values=["false"],
                        date="2025-06-04T00:00:00.000Z",
                    ),
                ],
                custom_fields={},
                risk_notifications=ProjectNotificationRiskData(
                    added=[
                        "exports_ilab_child_labor",
                        "exports_ilab_forced_labor",
                        "psa_exports_ilab_child_labor",
                        "psa_exports_ilab_forced_labor",
                    ],
                    removed=["forced_labor_xinjiang_origin_subtier"],
                    date="2025-06-04T00:00:00.000Z",
                ),
            ),
            ProjectNotificationData(
                resource_id="Kx1w34",
                entity_id="3oKp0fp1UE-W8BG5crAFIw",
                notifications=[
                    Notification(
                        type="risk",
                        field="exports_ilab_child_labor",
                        values=["true"],
                        date="2025-06-04T00:00:00.000Z",
                    ),
                    Notification(
                        type="risk",
                        field="exports_ilab_forced_labor",
                        values=["true"],
                        date="2025-06-04T00:00:00.000Z",
                    ),
                    Notification(
                        type="risk",
                        field="psa_exports_ilab_child_labor",
                        values=["true"],
                        date="2025-06-04T00:00:00.000Z",
                    ),
                    Notification(
                        type="risk",
                        field="psa_exports_ilab_forced_labor",
                        values=["true"],
                        date="2025-06-04T00:00:00.000Z",
                    ),
                ],
                custom_fields={},
                risk_notifications=ProjectNotificationRiskData(
                    added=[],
                    removed=[
                        "exports_ilab_child_labor",
                        "exports_ilab_forced_labor",
                        "psa_exports_ilab_child_labor",
                        "psa_exports_ilab_forced_labor",
                    ],
                    date="2025-06-04T00:00:00.000Z",
                ),
            ),
            ProjectNotificationData(
                resource_id="BOMrB9",
                entity_id="PF0ehzmptuJ2VJr2J5u0nw",
                notifications=[
                    Notification(
                        type="risk",
                        field="export_controls_adjacent",
                        values=["true"],
                        date="2025-06-14T00:00:00.000Z",
                    ),
                    Notification(
                        type="risk",
                        field="exports_bis_high_priority_items_critical_components_indirect",
                        values=["3"],
                        date="2025-06-14T00:00:00.000Z",
                    ),
                ],
                custom_fields={},
                risk_notifications=ProjectNotificationRiskData(
                    added=[
                        "exports_ilab_child_labor",
                        "exports_ilab_forced_labor",
                        "psa_exports_ilab_child_labor",
                        "psa_exports_ilab_forced_labor",
                    ],
                    removed=[
                        "export_controls_adjacent",
                        "exports_bis_high_priority_items_critical_components_indirect",
                        "psa_exports_bis_high_priority_items_critical_components_indirect",
                        "psa_forced_labor_uflpa_origin_subtier",
                        "psa_regulatory_action",
                    ],
                    date="2025-06-04T00:00:00.000Z",
                ),
            ),
        ],
    )
    """

    next: bool
    data: typing.List[ProjectNotificationData]
    size: QualifiedCount

    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
