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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class FileStatus(str, enum.Enum):
    UPLOADED = "uploaded"
    PROCESSING = "processing"
    PROCESSED = "processed"
    ERROR = "error"

    def visit(
        self,
        uploaded: typing.Callable[[], T_Result],
        processing: typing.Callable[[], T_Result],
        processed: typing.Callable[[], T_Result],
        error: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is FileStatus.UPLOADED:
            return uploaded()
        if self is FileStatus.PROCESSING:
            return processing()
        if self is FileStatus.PROCESSED:
            return processed()
        if self is FileStatus.ERROR:
            return error()
