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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class IndexingStateEnum(str, enum.Enum):
    AWAITING_PROCESSING = "AWAITING_PROCESSING"
    QUEUED = "QUEUED"
    INDEXING = "INDEXING"
    INDEXED = "INDEXED"
    FAILED = "FAILED"

    def visit(
        self,
        awaiting_processing: typing.Callable[[], T_Result],
        queued: typing.Callable[[], T_Result],
        indexing: typing.Callable[[], T_Result],
        indexed: typing.Callable[[], T_Result],
        failed: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is IndexingStateEnum.AWAITING_PROCESSING:
            return awaiting_processing()
        if self is IndexingStateEnum.QUEUED:
            return queued()
        if self is IndexingStateEnum.INDEXING:
            return indexing()
        if self is IndexingStateEnum.INDEXED:
            return indexed()
        if self is IndexingStateEnum.FAILED:
            return failed()
