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

import datetime as dt
import typing

import pydantic
import typing_extensions
from ....core.pydantic_utilities import IS_PYDANTIC_V2
from ....core.serialization import FieldMetadata
from ....core.unchecked_base_model import UncheckedBaseModel


class GetCampaignIdResponseDataEventsItem(UncheckedBaseModel):
    id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="_id"), pydantic.Field(alias="_id")] = (
        None
    )
    campaign_id: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="campaignId"), pydantic.Field(alias="campaignId")
    ] = None
    trigger_source: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="triggerSource"), pydantic.Field(alias="triggerSource")
    ] = None
    event_action: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="eventAction"), pydantic.Field(alias="eventAction")
    ] = None
    created_at: typing_extensions.Annotated[
        typing.Optional[dt.datetime], FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt")
    ] = 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
