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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class SourceType(str, enum.Enum):
    APP = "app"
    BLE = "ble"
    DEVICE = "device"
    LAB = "lab"
    PROVIDER = "provider"

    def visit(
        self,
        app: typing.Callable[[], T_Result],
        ble: typing.Callable[[], T_Result],
        device: typing.Callable[[], T_Result],
        lab: typing.Callable[[], T_Result],
        provider: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is SourceType.APP:
            return app()
        if self is SourceType.BLE:
            return ble()
        if self is SourceType.DEVICE:
            return device()
        if self is SourceType.LAB:
            return lab()
        if self is SourceType.PROVIDER:
            return provider()
