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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class MappingsActions(str, enum.Enum):
    LIST = "list"
    CREATE = "create"
    GET = "get"
    UPDATE = "update"
    PATCH = "patch"
    DELETE = "delete"
    APPLY = "apply"
    ALL = "*"

    def visit(
        self,
        list_: typing.Callable[[], T_Result],
        create: typing.Callable[[], T_Result],
        get: typing.Callable[[], T_Result],
        update: typing.Callable[[], T_Result],
        patch: typing.Callable[[], T_Result],
        delete: typing.Callable[[], T_Result],
        apply: typing.Callable[[], T_Result],
        all_: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is MappingsActions.LIST:
            return list_()
        if self is MappingsActions.CREATE:
            return create()
        if self is MappingsActions.GET:
            return get()
        if self is MappingsActions.UPDATE:
            return update()
        if self is MappingsActions.PATCH:
            return patch()
        if self is MappingsActions.DELETE:
            return delete()
        if self is MappingsActions.APPLY:
            return apply()
        if self is MappingsActions.ALL:
            return all_()
