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

import typing

from ......core import enum

T_Result = typing.TypeVar("T_Result")


class ServiceFacilityMode(enum.StrEnum):
    """
    Examples
    --------
    from candid.resources.organization_service_facilities.resources.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.).
    """

    _UNKNOWN = "__SERVICEFACILITYMODE_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) -> "ServiceFacilityMode":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

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