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

from ...core.pydantic_utilities import UniversalBaseModel
import pydantic
import typing
from .notification import Notification
from .project_notification_risk_data import ProjectNotificationRiskData
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class ProjectNotificationData(UniversalBaseModel):
    id: str = pydantic.Field()
    """
    The ID of the entity
    """

    resource_id: str = pydantic.Field()
    """
    The ID of the saved resource
    """

    entity_id: str = pydantic.Field()
    """
    The ID of the entity
    """

    notifications: typing.List[Notification]
    custom_fields: typing.Optional[typing.Optional[typing.Any]] = pydantic.Field(default=None)
    """
    <Warning>This property is in beta and is subject to change. It is provided for early access and testing purposes only.</Warning> custom user key/value pairs (key must be prefixed with "custom\_" and value must be "string" type)
    """

    risk_notifications: ProjectNotificationRiskData = pydantic.Field()
    """
    Aggregated risk notifications
    """

    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
