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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class JobStatus(str, enum.Enum):
    """
    Status of a job
    """

    SUCCEEDED = "SUCCEEDED"
    FAILED = "FAILED"
    QUEUED = "QUEUED"
    IN_PROGRESS = "IN_PROGRESS"

    def visit(
        self,
        succeeded: typing.Callable[[], T_Result],
        failed: typing.Callable[[], T_Result],
        queued: typing.Callable[[], T_Result],
        in_progress: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is JobStatus.SUCCEEDED:
            return succeeded()
        if self is JobStatus.FAILED:
            return failed()
        if self is JobStatus.QUEUED:
            return queued()
        if self is JobStatus.IN_PROGRESS:
            return in_progress()
