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

import typing

from ......core import enum

T_Result = typing.TypeVar("T_Result")


class NonInsurancePayerSortField(enum.StrEnum):
    NAME = "NAME"
    CATEGORY = "CATEGORY"
    ENABLED = "ENABLED"
    UPDATED_AT = "UPDATED_AT"
    _UNKNOWN = "__NONINSURANCEPAYERSORTFIELD_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) -> "NonInsurancePayerSortField":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        name: typing.Callable[[], T_Result],
        category: typing.Callable[[], T_Result],
        enabled: typing.Callable[[], T_Result],
        updated_at: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is NonInsurancePayerSortField.NAME:
            return name()
        if self is NonInsurancePayerSortField.CATEGORY:
            return category()
        if self is NonInsurancePayerSortField.ENABLED:
            return enabled()
        if self is NonInsurancePayerSortField.UPDATED_AT:
            return updated_at()
        return _unknown_member(self._value_)
