/*
 * complex_query.h
 *
 * 
 */

#ifndef _OpenAPI_complex_query_H_
#define _OpenAPI_complex_query_H_

#include <string.h>
#include "../external/cJSON.h"
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
#include "cnf.h"
#include "cnf_unit.h"
#include "dnf.h"
#include "dnf_unit.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct OpenAPI_complex_query_s OpenAPI_complex_query_t;
typedef struct OpenAPI_complex_query_s {
    OpenAPI_list_t *cnf_units;
    OpenAPI_list_t *dnf_units;
} OpenAPI_complex_query_t;

OpenAPI_complex_query_t *OpenAPI_complex_query_create(
    OpenAPI_list_t *cnf_units,
    OpenAPI_list_t *dnf_units
);
void OpenAPI_complex_query_free(OpenAPI_complex_query_t *complex_query);
OpenAPI_complex_query_t *OpenAPI_complex_query_parseFromJSON(cJSON *complex_queryJSON);
cJSON *OpenAPI_complex_query_convertToJSON(OpenAPI_complex_query_t *complex_query);
OpenAPI_complex_query_t *OpenAPI_complex_query_copy(OpenAPI_complex_query_t *dst, OpenAPI_complex_query_t *src);

#ifdef __cplusplus
}
#endif

#endif /* _OpenAPI_complex_query_H_ */

