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

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class InferMethodName(enum.StrEnum):
    """
    Name of the method used for inference
    """

    PREDICT = "predict"
    PREDICT_PROBA = "predict_proba"

    def visit(self, predict: typing.Callable[[], T_Result], predict_proba: typing.Callable[[], T_Result]) -> T_Result:
        if self is InferMethodName.PREDICT:
            return predict()
        if self is InferMethodName.PREDICT_PROBA:
            return predict_proba()
