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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class OperationStatus(str, enum.Enum):
    SCHEDULED = "SCHEDULED"
    PROCESSING = "PROCESSING"
    CANCELLED = "CANCELLED"
    COMPLETE = "COMPLETE"

    def visit(
        self,
        scheduled: typing.Callable[[], T_Result],
        processing: typing.Callable[[], T_Result],
        cancelled: typing.Callable[[], T_Result],
        complete: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is OperationStatus.SCHEDULED:
            return scheduled()
        if self is OperationStatus.PROCESSING:
            return processing()
        if self is OperationStatus.CANCELLED:
            return cancelled()
        if self is OperationStatus.COMPLETE:
            return complete()
