/*
 * subscription_data.h
 *
 * Information of a subscription to notifications to NRF events, included in subscription requests and responses 
 */

#ifndef _OpenAPI_subscription_data_H_
#define _OpenAPI_subscription_data_H_

#include <string.h>
#include "../external/cJSON.h"
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
typedef struct OpenAPI_subscription_data_s OpenAPI_subscription_data_t;
#include "ext_snssai.h"
#include "locality_description.h"
#include "nf_type.h"
#include "notif_condition.h"
#include "notification_event_type.h"
#include "plmn_id.h"
#include "plmn_id_nid.h"
#include "plmn_snssai.h"
#include "subscr_cond.h"

#ifdef __cplusplus
extern "C" {
#endif

struct OpenAPI_subscription_data_s {
    char *nf_status_notification_uri;
    char *req_nf_instance_id;
    OpenAPI_list_t *shared_data_ids;
    struct OpenAPI_subscr_cond_s *subscr_cond;
    char *subscription_id;
    char *validity_time;
    OpenAPI_list_t *req_notif_events;
    struct OpenAPI_plmn_id_s *plmn_id;
    char *nid;
    struct OpenAPI_notif_condition_s *notif_condition;
    OpenAPI_nf_type_e req_nf_type;
    char *req_nf_fqdn;
    OpenAPI_list_t *req_snssais;
    OpenAPI_list_t *req_per_plmn_snssais;
    OpenAPI_list_t *req_plmn_list;
    OpenAPI_list_t *req_snpn_list;
    OpenAPI_list_t *serving_scope;
    char *requester_features;
    char *nrf_supported_features;
    char *hnrf_uri;
    bool is_onboarding_capability;
    int onboarding_capability;
    char *target_hni;
    char *preferred_locality;
    OpenAPI_list_t* ext_preferred_locality;
    bool is_complete_profile_subscription;
    int complete_profile_subscription;
};

OpenAPI_subscription_data_t *OpenAPI_subscription_data_create(
    char *nf_status_notification_uri,
    char *req_nf_instance_id,
    OpenAPI_list_t *shared_data_ids,
    OpenAPI_subscr_cond_t *subscr_cond,
    char *subscription_id,
    char *validity_time,
    OpenAPI_list_t *req_notif_events,
    OpenAPI_plmn_id_t *plmn_id,
    char *nid,
    OpenAPI_notif_condition_t *notif_condition,
    OpenAPI_nf_type_e req_nf_type,
    char *req_nf_fqdn,
    OpenAPI_list_t *req_snssais,
    OpenAPI_list_t *req_per_plmn_snssais,
    OpenAPI_list_t *req_plmn_list,
    OpenAPI_list_t *req_snpn_list,
    OpenAPI_list_t *serving_scope,
    char *requester_features,
    char *nrf_supported_features,
    char *hnrf_uri,
    bool is_onboarding_capability,
    int onboarding_capability,
    char *target_hni,
    char *preferred_locality,
    OpenAPI_list_t* ext_preferred_locality,
    bool is_complete_profile_subscription,
    int complete_profile_subscription
);
void OpenAPI_subscription_data_free(OpenAPI_subscription_data_t *subscription_data);
OpenAPI_subscription_data_t *OpenAPI_subscription_data_parseFromJSON(cJSON *subscription_dataJSON);
cJSON *OpenAPI_subscription_data_convertToJSON(OpenAPI_subscription_data_t *subscription_data);
OpenAPI_subscription_data_t *OpenAPI_subscription_data_copy(OpenAPI_subscription_data_t *dst, OpenAPI_subscription_data_t *src);

#ifdef __cplusplus
}
#endif

#endif /* _OpenAPI_subscription_data_H_ */

