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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .company_membership_detail_response_data import CompanyMembershipDetailResponseData
from .entity_key_detail_response_data import EntityKeyDetailResponseData
from .entity_trait_detail_response_data import EntityTraitDetailResponseData


class UserDetailResponseData(UniversalBaseModel):
    company_memberships: typing.List[CompanyMembershipDetailResponseData]
    created_at: dt.datetime
    entity_traits: typing.List[EntityTraitDetailResponseData]
    environment_id: str
    id: str
    keys: typing.List[EntityKeyDetailResponseData]
    last_seen_at: typing.Optional[dt.datetime] = None
    name: str
    traits: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    A map of trait names to trait values
    """

    updated_at: dt.datetime

    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
