"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .atomiccondition import AtomicCondition, AtomicConditionTypedDict
from .logicop import LogicOp
from dg_mol_track_client.types import BaseModel
from typing import List, Union
from typing_extensions import TypeAliasType, TypedDict


class LogicalNodeTypedDict(TypedDict):
    r"""Logical node combining multiple filters with AND/OR operator"""

    operator: LogicOp
    r"""Logical operators for combining conditions"""
    conditions: List[ConditionTypedDict]


class LogicalNode(BaseModel):
    r"""Logical node combining multiple filters with AND/OR operator"""

    operator: LogicOp
    r"""Logical operators for combining conditions"""

    conditions: List[Condition]


ConditionTypedDict = TypeAliasType(
    "ConditionTypedDict", Union["LogicalNodeTypedDict", AtomicConditionTypedDict]
)


Condition = TypeAliasType("Condition", Union["LogicalNode", AtomicCondition])
