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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class ActionId(str, enum.Enum):
    QUERY = "query"
    READ = "read"
    CREATE = "create"
    UPDATE = "update"
    DELETE = "delete"
    PATCH = "patch"

    def visit(
        self,
        query: typing.Callable[[], T_Result],
        read: typing.Callable[[], T_Result],
        create: typing.Callable[[], T_Result],
        update: typing.Callable[[], T_Result],
        delete: typing.Callable[[], T_Result],
        patch: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is ActionId.QUERY:
            return query()
        if self is ActionId.READ:
            return read()
        if self is ActionId.CREATE:
            return create()
        if self is ActionId.UPDATE:
            return update()
        if self is ActionId.DELETE:
            return delete()
        if self is ActionId.PATCH:
            return patch()
