# 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(alias="eventType", description="The notification's event name."),
    ] = None
    file_format: typing_extensions.Annotated[
        typing.Optional[NotificationContentFileFormat],
        FieldMetadata(alias="fileFormat"),
        pydantic.Field(
            alias="fileFormat",
            description="Indicate the format of report file to be generated by the engine.\nUsed for `method` = *report-email* and *report-web*.",
        ),
    ] = None
    internal_data: typing_extensions.Annotated[
        typing.Optional[typing.List[KeyValueDuo]],
        FieldMetadata(alias="internalData"),
        pydantic.Field(
            alias="internalData",
            description="Array of pairs key:value to insert in request body to target in **method** = *web* or *report-web*.",
        ),
    ] = None
    report_name: typing_extensions.Annotated[
        typing.Optional[NotificationContentReportName],
        FieldMetadata(alias="reportName"),
        pydantic.Field(
            alias="reportName",
            description="The kind report to generate. For [automated reports](/developers/developer-guides/notifications-and-webhooks-overview#automated-reports) only.",
        ),
    ] = None
    time_zone: typing_extensions.Annotated[
        typing.Optional[Timezone], FieldMetadata(alias="timeZone"), pydantic.Field(alias="timeZone")
    ] = None
    transaction_id: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="transactionId"),
        pydantic.Field(
            alias="transactionId", description="Used internally to reference the entity or object generating the event."
        ),
    ] = None
    web_header_parameters: typing_extensions.Annotated[
        typing.Optional[typing.List[KeyValueDuo]],
        FieldMetadata(alias="webHeaderParameters"),
        pydantic.Field(
            alias="webHeaderParameters",
            description="Array of pairs key:value to insert in header of request to target in **method** = *web* or *report-web*.",
        ),
    ] = 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
