/*
 * cag_data.h
 *
 * Contains Closed Access Group Data
 */

#ifndef _OpenAPI_cag_data_H_
#define _OpenAPI_cag_data_H_

#include <string.h>
#include "third-party/cjson/cJSON.h"
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
typedef struct OpenAPI_cag_data_s OpenAPI_cag_data_t;
#include "cag_info.h"
#include "conditional_cag_info.h"

#ifdef __cplusplus
extern "C" {
#endif

struct OpenAPI_cag_data_s {
    OpenAPI_list_t* cag_infos;
    OpenAPI_list_t* conditional_cag_infos;
    char *provisioning_time;
};

OpenAPI_cag_data_t *OpenAPI_cag_data_create(
    OpenAPI_list_t* cag_infos,
    OpenAPI_list_t* conditional_cag_infos,
    char *provisioning_time
);
void OpenAPI_cag_data_free(OpenAPI_cag_data_t *cag_data);
OpenAPI_cag_data_t *OpenAPI_cag_data_parseFromJSON(cJSON *cag_dataJSON);
cJSON *OpenAPI_cag_data_convertToJSON(OpenAPI_cag_data_t *cag_data);
OpenAPI_cag_data_t *OpenAPI_cag_data_copy(OpenAPI_cag_data_t *dst, OpenAPI_cag_data_t *src);

#ifdef __cplusplus
}
#endif

#endif /* _OpenAPI_cag_data_H_ */

