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

import typing

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


class EventBodyIdentify(UniversalBaseModel):
    company: typing.Optional[EventBodyIdentifyCompany] = pydantic.Field(default=None)
    """
    Information about the company associated with the user; required only if it is a new user
    """

    keys: typing.Dict[str, str] = pydantic.Field()
    """
    Key-value pairs to identify the user
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The display name of the user being identified; required only if it is a new user
    """

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

    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
