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

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class FigureDetailsFigureType(enum.StrEnum):
    """
    The refined type of figure - only set when figure classification and summarization is enabled. Possible values:

    * `image`: A photographic image
    * `chart`: A data chart or graph
    * `diagram`: A schematic or diagram
    * `logo`: A company or brand logo
    * `other`: Any other type of figure
    """

    OTHER = "other"
    CHART = "chart"
    IMAGE = "image"
    DIAGRAM = "diagram"
    LOGO = "logo"
    _UNKNOWN = "__FIGUREDETAILSFIGURETYPE_UNKNOWN__"
    """
    This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
    """

    @classmethod
    def _missing_(cls, value: typing.Any) -> "FigureDetailsFigureType":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        other: typing.Callable[[], T_Result],
        chart: typing.Callable[[], T_Result],
        image: typing.Callable[[], T_Result],
        diagram: typing.Callable[[], T_Result],
        logo: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is FigureDetailsFigureType.OTHER:
            return other()
        if self is FigureDetailsFigureType.CHART:
            return chart()
        if self is FigureDetailsFigureType.IMAGE:
            return image()
        if self is FigureDetailsFigureType.DIAGRAM:
            return diagram()
        if self is FigureDetailsFigureType.LOGO:
            return logo()
        return _unknown_member(self._value_)
