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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .additional_data import AdditionalData
from .email import Email
from .language import Language
from .mfa_data import MfaData
from .name_user import NameUser
from .org_scope import OrgScope
from .phone_number import PhoneNumber
from .timezone import Timezone
from .usr_access import UsrAccess
from .usr_status import UsrStatus


class UserData(UniversalBaseModel):
    access: typing.Optional[typing.List[UsrAccess]] = None
    additional_data: typing_extensions.Annotated[
        typing.Optional[AdditionalData], FieldMetadata(alias="additionalData")
    ] = None
    email: typing.Optional[Email] = pydantic.Field(default=None)
    """
    The user's email address.
    """

    language: typing.Optional[Language] = None
    mfa_data: typing_extensions.Annotated[typing.Optional[MfaData], FieldMetadata(alias="mfaData")] = None
    name: typing.Optional[NameUser] = None
    phone: typing.Optional[PhoneNumber] = pydantic.Field(default=None)
    """
    The user's phone number.
    """

    pwd: typing.Optional[str] = None
    scope: typing.Optional[typing.List[OrgScope]] = None
    time_zone: typing_extensions.Annotated[typing.Optional[Timezone], FieldMetadata(alias="timeZone")] = None
    usr_status: typing_extensions.Annotated[typing.Optional[UsrStatus], FieldMetadata(alias="usrStatus")] = None

    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
