"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import builtins
import flyteidl.core.literals_pb2
import google.protobuf.descriptor
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import typing
import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...

class ComparisonExpression(google.protobuf.message.Message):
    """Defines a 2-level tree where the root is a comparison operator and Operands are primitives or known variables.
    Each expression results in a boolean result.
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    class Operator(_Operator, metaclass=_OperatorEnumTypeWrapper):
        """Binary Operator for each expression"""
        pass
    class _Operator:
        V = typing.NewType('V', builtins.int)
    class _OperatorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Operator.V], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
        EQ = ComparisonExpression.Operator.V(0)
        NEQ = ComparisonExpression.Operator.V(1)
        GT = ComparisonExpression.Operator.V(2)
        """Greater Than"""

        GTE = ComparisonExpression.Operator.V(3)
        LT = ComparisonExpression.Operator.V(4)
        """Less Than"""

        LTE = ComparisonExpression.Operator.V(5)

    EQ = ComparisonExpression.Operator.V(0)
    NEQ = ComparisonExpression.Operator.V(1)
    GT = ComparisonExpression.Operator.V(2)
    """Greater Than"""

    GTE = ComparisonExpression.Operator.V(3)
    LT = ComparisonExpression.Operator.V(4)
    """Less Than"""

    LTE = ComparisonExpression.Operator.V(5)

    OPERATOR_FIELD_NUMBER: builtins.int
    LEFT_VALUE_FIELD_NUMBER: builtins.int
    RIGHT_VALUE_FIELD_NUMBER: builtins.int
    operator: global___ComparisonExpression.Operator.V = ...
    @property
    def left_value(self) -> global___Operand: ...
    @property
    def right_value(self) -> global___Operand: ...
    def __init__(self,
        *,
        operator : global___ComparisonExpression.Operator.V = ...,
        left_value : typing.Optional[global___Operand] = ...,
        right_value : typing.Optional[global___Operand] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"left_value",b"left_value",u"right_value",b"right_value"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"left_value",b"left_value",u"operator",b"operator",u"right_value",b"right_value"]) -> None: ...
global___ComparisonExpression = ComparisonExpression

class Operand(google.protobuf.message.Message):
    """Defines an operand to a comparison expression."""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    PRIMITIVE_FIELD_NUMBER: builtins.int
    VAR_FIELD_NUMBER: builtins.int
    @property
    def primitive(self) -> flyteidl.core.literals_pb2.Primitive:
        """Can be a constant"""
        pass
    var: typing.Text = ...
    """Or one of this node's input variables"""

    def __init__(self,
        *,
        primitive : typing.Optional[flyteidl.core.literals_pb2.Primitive] = ...,
        var : typing.Text = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"primitive",b"primitive",u"val",b"val",u"var",b"var"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"primitive",b"primitive",u"val",b"val",u"var",b"var"]) -> None: ...
    def WhichOneof(self, oneof_group: typing_extensions.Literal[u"val",b"val"]) -> typing.Optional[typing_extensions.Literal["primitive","var"]]: ...
global___Operand = Operand

class BooleanExpression(google.protobuf.message.Message):
    """Defines a boolean expression tree. It can be a simple or a conjunction expression.
    Multiple expressions can be combined using a conjunction or a disjunction to result in a final boolean result.
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    CONJUNCTION_FIELD_NUMBER: builtins.int
    COMPARISON_FIELD_NUMBER: builtins.int
    @property
    def conjunction(self) -> global___ConjunctionExpression: ...
    @property
    def comparison(self) -> global___ComparisonExpression: ...
    def __init__(self,
        *,
        conjunction : typing.Optional[global___ConjunctionExpression] = ...,
        comparison : typing.Optional[global___ComparisonExpression] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"comparison",b"comparison",u"conjunction",b"conjunction",u"expr",b"expr"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"comparison",b"comparison",u"conjunction",b"conjunction",u"expr",b"expr"]) -> None: ...
    def WhichOneof(self, oneof_group: typing_extensions.Literal[u"expr",b"expr"]) -> typing.Optional[typing_extensions.Literal["conjunction","comparison"]]: ...
global___BooleanExpression = BooleanExpression

class ConjunctionExpression(google.protobuf.message.Message):
    """Defines a conjunction expression of two boolean expressions."""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    class LogicalOperator(_LogicalOperator, metaclass=_LogicalOperatorEnumTypeWrapper):
        """Nested conditions. They can be conjoined using AND / OR
        Order of evaluation is not important as the operators are Commutative
        """
        pass
    class _LogicalOperator:
        V = typing.NewType('V', builtins.int)
    class _LogicalOperatorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_LogicalOperator.V], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
        AND = ConjunctionExpression.LogicalOperator.V(0)
        """Conjunction"""

        OR = ConjunctionExpression.LogicalOperator.V(1)

    AND = ConjunctionExpression.LogicalOperator.V(0)
    """Conjunction"""

    OR = ConjunctionExpression.LogicalOperator.V(1)

    OPERATOR_FIELD_NUMBER: builtins.int
    LEFT_EXPRESSION_FIELD_NUMBER: builtins.int
    RIGHT_EXPRESSION_FIELD_NUMBER: builtins.int
    operator: global___ConjunctionExpression.LogicalOperator.V = ...
    @property
    def left_expression(self) -> global___BooleanExpression: ...
    @property
    def right_expression(self) -> global___BooleanExpression: ...
    def __init__(self,
        *,
        operator : global___ConjunctionExpression.LogicalOperator.V = ...,
        left_expression : typing.Optional[global___BooleanExpression] = ...,
        right_expression : typing.Optional[global___BooleanExpression] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"left_expression",b"left_expression",u"right_expression",b"right_expression"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"left_expression",b"left_expression",u"operator",b"operator",u"right_expression",b"right_expression"]) -> None: ...
global___ConjunctionExpression = ConjunctionExpression
