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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class SourceAuthType(str, enum.Enum):
    """
    An enumeration.
    """

    OAUTH = "oauth"
    TEAM_OAUTH = "team_oauth"
    SDK = "sdk"
    PASSWORD = "password"
    EMAIL = "email"
    APP = "app"
    EMPTY = ""

    def visit(
        self,
        oauth: typing.Callable[[], T_Result],
        team_oauth: typing.Callable[[], T_Result],
        sdk: typing.Callable[[], T_Result],
        password: typing.Callable[[], T_Result],
        email: typing.Callable[[], T_Result],
        app: typing.Callable[[], T_Result],
        empty: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is SourceAuthType.OAUTH:
            return oauth()
        if self is SourceAuthType.TEAM_OAUTH:
            return team_oauth()
        if self is SourceAuthType.SDK:
            return sdk()
        if self is SourceAuthType.PASSWORD:
            return password()
        if self is SourceAuthType.EMAIL:
            return email()
        if self is SourceAuthType.APP:
            return app()
        if self is SourceAuthType.EMPTY:
            return empty()
