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

import typing

from ......core import enum

T_Result = typing.TypeVar("T_Result")


class InvoiceSortField(enum.StrEnum):
    CREATED_AT = "CREATED_AT"
    UPDATED_AT = "UPDATED_AT"
    PATIENT_EXTERNAL_ID = "PATIENT_EXTERNAL_ID"
    NOTE = "NOTE"
    DUE_DATE = "DUE_DATE"
    STATUS = "STATUS"
    _UNKNOWN = "__INVOICESORTFIELD_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) -> "InvoiceSortField":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        created_at: typing.Callable[[], T_Result],
        updated_at: typing.Callable[[], T_Result],
        patient_external_id: typing.Callable[[], T_Result],
        note: typing.Callable[[], T_Result],
        due_date: typing.Callable[[], T_Result],
        status: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is InvoiceSortField.CREATED_AT:
            return created_at()
        if self is InvoiceSortField.UPDATED_AT:
            return updated_at()
        if self is InvoiceSortField.PATIENT_EXTERNAL_ID:
            return patient_external_id()
        if self is InvoiceSortField.NOTE:
            return note()
        if self is InvoiceSortField.DUE_DATE:
            return due_date()
        if self is InvoiceSortField.STATUS:
            return status()
        return _unknown_member(self._value_)
