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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class LogicalOperator(str, enum.Enum):
    """
    - `=` - EQUALS
    - `!=` - DOES_NOT_EQUAL
    - `<` - LESS_THAN
    - `>` - GREATER_THAN
    - `<=` - LESS_THAN_OR_EQUAL_TO
    - `>=` - GREATER_THAN_OR_EQUAL_TO
    - `contains` - CONTAINS
    - `beginsWith` - BEGINS_WITH
    - `endsWith` - ENDS_WITH
    - `doesNotContain` - DOES_NOT_CONTAIN
    - `doesNotBeginWith` - DOES_NOT_BEGIN_WITH
    - `doesNotEndWith` - DOES_NOT_END_WITH
    - `null` - NULL
    - `notNull` - NOT_NULL
    - `in` - IN
    - `notIn` - NOT_IN
    - `between` - BETWEEN
    - `notBetween` - NOT_BETWEEN
    """

    EQUALS = "="
    """
    Equals
    """

    DOES_NOT_EQUAL = "!="
    """
    Does not equal
    """

    LESS_THAN = "<"
    """
    Less than
    """

    GREATER_THAN = ">"
    """
    Greater than
    """

    LESS_THAN_OR_EQUAL_TO = "<="
    """
    Less than or equal to
    """

    GREATER_THAN_OR_EQUAL_TO = ">="
    """
    Greater than or equal to
    """

    CONTAINS = "contains"
    """
    Contains
    """

    BEGINS_WITH = "beginsWith"
    """
    Begins with
    """

    ENDS_WITH = "endsWith"
    """
    Ends with
    """

    DOES_NOT_CONTAIN = "doesNotContain"
    """
    Does not contain
    """

    DOES_NOT_BEGIN_WITH = "doesNotBeginWith"
    """
    Does not begin with
    """

    DOES_NOT_END_WITH = "doesNotEndWith"
    """
    Does not end with
    """

    NULL = "null"
    """
    Null
    """

    NOT_NULL = "notNull"
    """
    Not null
    """

    IN = "in"
    """
    In
    """

    NOT_IN = "notIn"
    """
    Not in
    """

    BETWEEN = "between"
    """
    Between
    """

    NOT_BETWEEN = "notBetween"
    """
    Not between
    """

    def visit(
        self,
        equals: typing.Callable[[], T_Result],
        does_not_equal: typing.Callable[[], T_Result],
        less_than: typing.Callable[[], T_Result],
        greater_than: typing.Callable[[], T_Result],
        less_than_or_equal_to: typing.Callable[[], T_Result],
        greater_than_or_equal_to: typing.Callable[[], T_Result],
        contains: typing.Callable[[], T_Result],
        begins_with: typing.Callable[[], T_Result],
        ends_with: typing.Callable[[], T_Result],
        does_not_contain: typing.Callable[[], T_Result],
        does_not_begin_with: typing.Callable[[], T_Result],
        does_not_end_with: typing.Callable[[], T_Result],
        null: typing.Callable[[], T_Result],
        not_null: typing.Callable[[], T_Result],
        in_: typing.Callable[[], T_Result],
        not_in: typing.Callable[[], T_Result],
        between: typing.Callable[[], T_Result],
        not_between: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is LogicalOperator.EQUALS:
            return equals()
        if self is LogicalOperator.DOES_NOT_EQUAL:
            return does_not_equal()
        if self is LogicalOperator.LESS_THAN:
            return less_than()
        if self is LogicalOperator.GREATER_THAN:
            return greater_than()
        if self is LogicalOperator.LESS_THAN_OR_EQUAL_TO:
            return less_than_or_equal_to()
        if self is LogicalOperator.GREATER_THAN_OR_EQUAL_TO:
            return greater_than_or_equal_to()
        if self is LogicalOperator.CONTAINS:
            return contains()
        if self is LogicalOperator.BEGINS_WITH:
            return begins_with()
        if self is LogicalOperator.ENDS_WITH:
            return ends_with()
        if self is LogicalOperator.DOES_NOT_CONTAIN:
            return does_not_contain()
        if self is LogicalOperator.DOES_NOT_BEGIN_WITH:
            return does_not_begin_with()
        if self is LogicalOperator.DOES_NOT_END_WITH:
            return does_not_end_with()
        if self is LogicalOperator.NULL:
            return null()
        if self is LogicalOperator.NOT_NULL:
            return not_null()
        if self is LogicalOperator.IN:
            return in_()
        if self is LogicalOperator.NOT_IN:
            return not_in()
        if self is LogicalOperator.BETWEEN:
            return between()
        if self is LogicalOperator.NOT_BETWEEN:
            return not_between()
