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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class EventBodyTrack(UniversalBaseModel):
    company: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
    """
    Key-value pairs to identify company associated with track event
    """

    event: str = pydantic.Field()
    """
    The name of the type of track event
    """

    quantity: typing.Optional[int] = pydantic.Field(default=None)
    """
    Optionally specify the quantity of the event
    """

    traits: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    A map of trait names to trait values
    """

    user: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
    """
    Key-value pairs to identify user associated with track event
    """

    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
