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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class ServiceFacilityMode(str, enum.Enum):
    """
    Examples
    --------
    from candid.resources.organization_service_facilities.v_2 import (
        ServiceFacilityMode,
    )

    ServiceFacilityMode.INSTANCE
    """

    INSTANCE = "instance"
    """
    The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A).
    """

    KIND = "kind"
    """
    The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.).
    """

    def visit(self, instance: typing.Callable[[], T_Result], kind: typing.Callable[[], T_Result]) -> T_Result:
        if self is ServiceFacilityMode.INSTANCE:
            return instance()
        if self is ServiceFacilityMode.KIND:
            return kind()
