# 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, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .source import Source


class GeneralEvents(UniversalBaseModel):
    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Event description.
    """

    event_time: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="eventTime")] = (
        pydantic.Field(default=None)
    )
    """
    Event timestamp, in UTC.
    """

    extra_data: typing_extensions.Annotated[
        typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="extraData")
    ] = pydantic.Field(default=None)
    """
    Extra data.
    """

    ref_data: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="refData")] = pydantic.Field(
        default=None
    )
    """
    Reference data.
    """

    source: typing.Optional[Source] = pydantic.Field(default=None)
    """
    The event source.
    """

    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
