from ..enums import LDEnum


class QueryViewType(LDEnum):
    """
    This describes the viewing mode of the Advanced Search Query expression.

        -"SIMPLE" For expressions with conditions that are all ANed or ORed together.
        -"COMPLEX" For expressions that combine conditions into logical clauses and mix AND and OR operators.
    """
    SIMPLE = "simple"
    COMPLEX = "complex"


class QueryFrequency(LDEnum):
    """
    This describes the frequency of execution of an Advanced Search Query.

        -"ONE_TIME" For executing queries only once.
        -"PERIODIC" For executing queries periodically.
    """
    ONE_TIME = "one_time"
    PERIODIC = "periodic"


class QueryCompoundReturnType(LDEnum):
    """
    This describes the type of compounds returned by an Advanced Search Query.

        -"BOTH" For returning results with both reals and virtuals.
        -"VIRTUAL_ONLY" For returning results with only virtuals.
        -"REAL_ONLY" For returning results with only reals.
    """
    BOTH = "both"
    VIRTUAL_ONLY = "virtual_only"
    REAL_ONLY = "real_only"


class QueryEntityReturnType(LDEnum):
    """
    This describes the type of entities returned by an Advanced Search Query.

        -"FORMULATION" For returning results with formulation entities.
        -"COMPOUND" For returning results with compound entities.
        -"FRAGMENT" For returning results with fragment entities.
    """
    FORMULATION = "formulation"
    COMPOUND = "compound"
    FRAGMENT = "fragment"


class QueryConditionType(LDEnum):
    """
    This describes the type of a query condition in an Advanced Search Query.

        -"OBSERVATION" For query conditions on observation columns.
        -"STRUCTURE" For query conditions on structures.
        -"PROJECT" For query conditions on projects.
        -"LIVE_REPORT" For query conditions on livereports.
    """
    OBSERVATION = "observation"
    STRUCTURE = "structure"
    PROJECT = "project"
    LIVE_REPORT = "live_report"


class QueryObservationConditionOperator(LDEnum):
    """
    This describes valid operators of an observation-type query condition in an Advanced Search Query
    """
    EQUALS = "="
    LESS_THAN = "<"
    LESS_THAN_OR_EQUALS = "<="
    GREATER_THAN = ">"
    GREATER_THAN_OR_EQUALS = ">="
