# 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 .connection_email_otp_authentication_method import ConnectionEmailOtpAuthenticationMethod
from .connection_passkey_authentication_method import ConnectionPasskeyAuthenticationMethod
from .connection_password_authentication_method import ConnectionPasswordAuthenticationMethod
from .connection_phone_otp_authentication_method import ConnectionPhoneOtpAuthenticationMethod


class ConnectionAuthenticationMethods(UniversalBaseModel):
    """
    Options for enabling authentication methods.
    """

    password: typing.Optional[ConnectionPasswordAuthenticationMethod] = None
    passkey: typing.Optional[ConnectionPasskeyAuthenticationMethod] = None
    email_otp: typing.Optional[ConnectionEmailOtpAuthenticationMethod] = None
    phone_otp: typing.Optional[ConnectionPhoneOtpAuthenticationMethod] = 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
