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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .created_at import CreatedAt
from .frequencynotification import Frequencynotification
from .last_modified import LastModified
from .methodnotification import Methodnotification
from .notification_content import NotificationContent
from .notification_id import NotificationId
from .ownerid import Ownerid
from .ownertype import Ownertype
from .source import Source
from .statusnotification import Statusnotification
from .target import Target


class QueryResponseNotificationsRecordsItem(UniversalBaseModel):
    content: typing.Optional[NotificationContent] = pydantic.Field(default=None)
    """
    Notification content.
    """

    created_at: typing_extensions.Annotated[typing.Optional[CreatedAt], FieldMetadata(alias="createdAt")] = (
        pydantic.Field(default=None)
    )
    """
    Timestamp of when notification was created, in UTC.
    """

    frequency: typing.Optional[Frequencynotification] = None
    last_updated: typing_extensions.Annotated[typing.Optional[LastModified], FieldMetadata(alias="lastUpdated")] = (
        pydantic.Field(default=None)
    )
    """
    Timestamp of when notification was last updated, in UTC.
    """

    method: typing.Optional[Methodnotification] = None
    notification_id: typing_extensions.Annotated[
        typing.Optional[NotificationId], FieldMetadata(alias="notificationId")
    ] = None
    owner_id: typing_extensions.Annotated[typing.Optional[Ownerid], FieldMetadata(alias="ownerId")] = None
    owner_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ownerName")] = pydantic.Field(
        default=None
    )
    """
    Name of entity owner of notification.
    """

    owner_type: typing_extensions.Annotated[typing.Optional[Ownertype], FieldMetadata(alias="ownerType")] = None
    source: typing.Optional[Source] = pydantic.Field(default=None)
    """
    Custom descriptor of source of notification.
    """

    status: typing.Optional[Statusnotification] = None
    target: typing.Optional[Target] = None

    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
