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

from .entity_group_user_entity_request import EntityGroupUserEntityRequest
from ...entity_types.types.entity_user_id import EntityUserId
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import typing
import pydantic


class EntityGroupUserEntityResponse(EntityGroupUserEntityRequest):
    """
    Examples
    --------
    from mercoa.entity_group_types import EntityGroupUserEntityResponse

    EntityGroupUserEntityResponse(
        id="user_ec3aafc8-ea86-408a-a6c1-545497badbbb",
        roles=["admin", "approver"],
        entity_id="ent_21661ac1-a2a8-4465-a6c0-64474ba8181d",
    )
    """

    id: EntityUserId

    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
