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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class TokensActions(str, enum.Enum):
    LIST = "list"
    CREATE = "create"
    CREATE_INTEGRATION = "create_integration"
    CREATE_SYNQLY_INTEGRATIONS = "create_synqly_integrations"
    DELETE = "delete"
    GET = "get"
    RESET = "reset"
    REFRESH = "refresh"
    REMOVE_SECONDARY = "remove_secondary"
    ALL = "*"
    _UNKNOWN = "__TOKENSACTIONS_UNKNOWN__"
    """
    This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
    """

    @classmethod
    def _missing_(cls, value: typing.Any) -> "TokensActions":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        list_: typing.Callable[[], T_Result],
        create: typing.Callable[[], T_Result],
        create_integration: typing.Callable[[], T_Result],
        create_synqly_integrations: typing.Callable[[], T_Result],
        delete: typing.Callable[[], T_Result],
        get: typing.Callable[[], T_Result],
        reset: typing.Callable[[], T_Result],
        refresh: typing.Callable[[], T_Result],
        remove_secondary: typing.Callable[[], T_Result],
        all_: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is TokensActions.LIST:
            return list_()
        if self is TokensActions.CREATE:
            return create()
        if self is TokensActions.CREATE_INTEGRATION:
            return create_integration()
        if self is TokensActions.CREATE_SYNQLY_INTEGRATIONS:
            return create_synqly_integrations()
        if self is TokensActions.DELETE:
            return delete()
        if self is TokensActions.GET:
            return get()
        if self is TokensActions.RESET:
            return reset()
        if self is TokensActions.REFRESH:
            return refresh()
        if self is TokensActions.REMOVE_SECONDARY:
            return remove_secondary()
        if self is TokensActions.ALL:
            return all_()
        return _unknown_member(self._value_)
