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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class QualifierCode(str, enum.Enum):
    """
    Examples
    --------
    from candid import QualifierCode

    QualifierCode.DQ
    """

    DQ = "DQ"
    DN = "DN"
    DK = "DK"
    P_3 = "P3"

    def visit(
        self,
        dq: typing.Callable[[], T_Result],
        dn: typing.Callable[[], T_Result],
        dk: typing.Callable[[], T_Result],
        p_3: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is QualifierCode.DQ:
            return dq()
        if self is QualifierCode.DN:
            return dn()
        if self is QualifierCode.DK:
            return dk()
        if self is QualifierCode.P_3:
            return p_3()
