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

import typing

from ......core import enum

T_Result = typing.TypeVar("T_Result")


class ContractSortField(enum.StrEnum):
    CREATED_AT = "created_at"
    PAYER_NAME = "payer_name"
    PAYER_ID = "payer_id"
    BILLING_PROVIDER_NAME = "billing_provider_name"
    EFFECTIVE_DATE = "effective_date"
    CONTRACT_STATUS = "contract_status"
    _UNKNOWN = "__CONTRACTSORTFIELD_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) -> "ContractSortField":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        created_at: typing.Callable[[], T_Result],
        payer_name: typing.Callable[[], T_Result],
        payer_id: typing.Callable[[], T_Result],
        billing_provider_name: typing.Callable[[], T_Result],
        effective_date: typing.Callable[[], T_Result],
        contract_status: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is ContractSortField.CREATED_AT:
            return created_at()
        if self is ContractSortField.PAYER_NAME:
            return payer_name()
        if self is ContractSortField.PAYER_ID:
            return payer_id()
        if self is ContractSortField.BILLING_PROVIDER_NAME:
            return billing_provider_name()
        if self is ContractSortField.EFFECTIVE_DATE:
            return effective_date()
        if self is ContractSortField.CONTRACT_STATUS:
            return contract_status()
        return _unknown_member(self._value_)
