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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class FilterOperator(str, enum.Enum):
    """
    An enumeration.
    """

    EQUALS = "equals"
    NOT_EQUALS = "notEquals"
    CONTAINS = "contains"
    NOT_CONTAINS = "notContains"
    STARTS_WITH = "startsWith"
    ENDS_WITH = "endsWith"
    GT = "gt"
    GTE = "gte"
    LT = "lt"
    LTE = "lte"
    SET = "set"
    NOT_SET = "notSet"
    IN = "in"
    NOT_IN = "notIn"

    def visit(
        self,
        equals: typing.Callable[[], T_Result],
        not_equals: typing.Callable[[], T_Result],
        contains: typing.Callable[[], T_Result],
        not_contains: typing.Callable[[], T_Result],
        starts_with: typing.Callable[[], T_Result],
        ends_with: typing.Callable[[], T_Result],
        gt: typing.Callable[[], T_Result],
        gte: typing.Callable[[], T_Result],
        lt: typing.Callable[[], T_Result],
        lte: typing.Callable[[], T_Result],
        set_: typing.Callable[[], T_Result],
        not_set: typing.Callable[[], T_Result],
        in_: typing.Callable[[], T_Result],
        not_in: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is FilterOperator.EQUALS:
            return equals()
        if self is FilterOperator.NOT_EQUALS:
            return not_equals()
        if self is FilterOperator.CONTAINS:
            return contains()
        if self is FilterOperator.NOT_CONTAINS:
            return not_contains()
        if self is FilterOperator.STARTS_WITH:
            return starts_with()
        if self is FilterOperator.ENDS_WITH:
            return ends_with()
        if self is FilterOperator.GT:
            return gt()
        if self is FilterOperator.GTE:
            return gte()
        if self is FilterOperator.LT:
            return lt()
        if self is FilterOperator.LTE:
            return lte()
        if self is FilterOperator.SET:
            return set_()
        if self is FilterOperator.NOT_SET:
            return not_set()
        if self is FilterOperator.IN:
            return in_()
        if self is FilterOperator.NOT_IN:
            return not_in()
