# 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 .event_stream_cloud_event_user_deleted_object_identities_item_passwordless_is_social_enum import (
    EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessIsSocialEnum,
)
from .event_stream_cloud_event_user_deleted_object_identities_item_passwordless_profile_data import (
    EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData,
)
from .event_stream_cloud_event_user_deleted_object_identities_item_passwordless_provider_enum import (
    EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum,
)
from .event_stream_cloud_event_user_deleted_object_identities_item_passwordless_user_id import (
    EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId,
)


class EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless(UniversalBaseModel):
    """
    The identity object for passwordless identity providers.
    """

    connection: str = pydantic.Field()
    """
    Name of the connection containing this identity.
    """

    user_id: EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessUserId
    profile_data: typing_extensions.Annotated[
        typing.Optional[EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProfileData],
        FieldMetadata(alias="profileData"),
        pydantic.Field(alias="profileData"),
    ] = None
    provider: EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessProviderEnum
    is_social: typing_extensions.Annotated[
        EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordlessIsSocialEnum,
        FieldMetadata(alias="isSocial"),
        pydantic.Field(alias="isSocial"),
    ]

    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
