# 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 .key_value_duo import KeyValueDuo
from .notification_content_event_type import NotificationContentEventType
from .notification_content_file_format import NotificationContentFileFormat
from .notification_content_report_name import NotificationContentReportName
from .timezone import Timezone


class NotificationContent(UniversalBaseModel):
    event_type: typing_extensions.Annotated[
        typing.Optional[NotificationContentEventType], FieldMetadata(alias="eventType")
    ] = pydantic.Field(default=None)
    """
    The notification's event name.
    """

    file_format: typing_extensions.Annotated[
        typing.Optional[NotificationContentFileFormat], FieldMetadata(alias="fileFormat")
    ] = pydantic.Field(default=None)
    """
    Indicate the format of report file to be generated by the engine.
    Used for `method` = *report-email* and *report-web*.
    """

    internal_data: typing_extensions.Annotated[
        typing.Optional[typing.List[KeyValueDuo]], FieldMetadata(alias="internalData")
    ] = pydantic.Field(default=None)
    """
    Array of pairs key:value to insert in request body to target in **method** = *web* or *report-web*.
    """

    report_name: typing_extensions.Annotated[
        typing.Optional[NotificationContentReportName], FieldMetadata(alias="reportName")
    ] = pydantic.Field(default=None)
    """
    The kind report to generate. For [automated reports](/developers/developer-guides/notifications-and-webhooks-overview#automated-reports) only.
    """

    time_zone: typing_extensions.Annotated[typing.Optional[Timezone], FieldMetadata(alias="timeZone")] = None
    transaction_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionId")] = (
        pydantic.Field(default=None)
    )
    """
    Used internally to reference the entity or object generating the event.
    """

    web_header_parameters: typing_extensions.Annotated[
        typing.Optional[typing.List[KeyValueDuo]], FieldMetadata(alias="webHeaderParameters")
    ] = pydantic.Field(default=None)
    """
    Array of pairs key:value to insert in header of request to target in **method** = *web* or *report-web*.
    """

    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
