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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class Tools(str, enum.Enum):
    """
    An enumeration.
    """

    SEARCH = "search"
    BROWSE = "browse"
    WIKIPEDIA = "wikipedia"
    DATABASE_METADATA = "database_metadata"
    QUERY = "query"
    CHART = "chart"
    ENRICH_PERSON = "enrich_person"
    ENRICH_COMPANY = "enrich_company"
    BROWSERBASE = "browserbase"

    def visit(
        self,
        search: typing.Callable[[], T_Result],
        browse: typing.Callable[[], T_Result],
        wikipedia: typing.Callable[[], T_Result],
        database_metadata: typing.Callable[[], T_Result],
        query: typing.Callable[[], T_Result],
        chart: typing.Callable[[], T_Result],
        enrich_person: typing.Callable[[], T_Result],
        enrich_company: typing.Callable[[], T_Result],
        browserbase: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is Tools.SEARCH:
            return search()
        if self is Tools.BROWSE:
            return browse()
        if self is Tools.WIKIPEDIA:
            return wikipedia()
        if self is Tools.DATABASE_METADATA:
            return database_metadata()
        if self is Tools.QUERY:
            return query()
        if self is Tools.CHART:
            return chart()
        if self is Tools.ENRICH_PERSON:
            return enrich_person()
        if self is Tools.ENRICH_COMPANY:
            return enrich_company()
        if self is Tools.BROWSERBASE:
            return browserbase()
