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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class LabTestCollectionMethod(str, enum.Enum):
    """
    The method used to perform a lab test.
    """

    TESTKIT = "testkit"
    WALK_IN_TEST = "walk_in_test"
    AT_HOME_PHLEBOTOMY = "at_home_phlebotomy"

    def visit(
        self,
        testkit: typing.Callable[[], T_Result],
        walk_in_test: typing.Callable[[], T_Result],
        at_home_phlebotomy: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is LabTestCollectionMethod.TESTKIT:
            return testkit()
        if self is LabTestCollectionMethod.WALK_IN_TEST:
            return walk_in_test()
        if self is LabTestCollectionMethod.AT_HOME_PHLEBOTOMY:
            return at_home_phlebotomy()
