[openapi] Add support for nullable fields

Depending on the OpenAPI yaml files, fields can be marked as "nullable".
Which means that the field can be either present, not present, or null.

This feature is important for example in SmContextUpdateData structure,
where many fields are described similar as the following:
This IE shall be included for the modification .... For deleting the
field, it shall contain the Null value.
This commit is contained in:
Bostjan Meglic 2023-10-05 13:39:14 +02:00 committed by Sukchan Lee
parent 7ea37ef618
commit 50464d174e
154 changed files with 2773 additions and 0 deletions

View file

@ -20,49 +20,71 @@ extern "C" {
typedef struct OpenAPI_usage_monitoring_data_s OpenAPI_usage_monitoring_data_t;
typedef struct OpenAPI_usage_monitoring_data_s {
char *um_id;
bool is_volume_threshold_null;
bool is_volume_threshold;
long volume_threshold;
bool is_volume_threshold_uplink_null;
bool is_volume_threshold_uplink;
long volume_threshold_uplink;
bool is_volume_threshold_downlink_null;
bool is_volume_threshold_downlink;
long volume_threshold_downlink;
bool is_time_threshold_null;
bool is_time_threshold;
int time_threshold;
bool is_monitoring_time_null;
char *monitoring_time;
bool is_next_vol_threshold_null;
bool is_next_vol_threshold;
long next_vol_threshold;
bool is_next_vol_threshold_uplink_null;
bool is_next_vol_threshold_uplink;
long next_vol_threshold_uplink;
bool is_next_vol_threshold_downlink_null;
bool is_next_vol_threshold_downlink;
long next_vol_threshold_downlink;
bool is_next_time_threshold_null;
bool is_next_time_threshold;
int next_time_threshold;
bool is_inactivity_time_null;
bool is_inactivity_time;
int inactivity_time;
bool is_ex_usage_pcc_rule_ids_null;
OpenAPI_list_t *ex_usage_pcc_rule_ids;
} OpenAPI_usage_monitoring_data_t;
OpenAPI_usage_monitoring_data_t *OpenAPI_usage_monitoring_data_create(
char *um_id,
bool is_volume_threshold_null,
bool is_volume_threshold,
long volume_threshold,
bool is_volume_threshold_uplink_null,
bool is_volume_threshold_uplink,
long volume_threshold_uplink,
bool is_volume_threshold_downlink_null,
bool is_volume_threshold_downlink,
long volume_threshold_downlink,
bool is_time_threshold_null,
bool is_time_threshold,
int time_threshold,
bool is_monitoring_time_null,
char *monitoring_time,
bool is_next_vol_threshold_null,
bool is_next_vol_threshold,
long next_vol_threshold,
bool is_next_vol_threshold_uplink_null,
bool is_next_vol_threshold_uplink,
long next_vol_threshold_uplink,
bool is_next_vol_threshold_downlink_null,
bool is_next_vol_threshold_downlink,
long next_vol_threshold_downlink,
bool is_next_time_threshold_null,
bool is_next_time_threshold,
int next_time_threshold,
bool is_inactivity_time_null,
bool is_inactivity_time,
int inactivity_time,
bool is_ex_usage_pcc_rule_ids_null,
OpenAPI_list_t *ex_usage_pcc_rule_ids
);
void OpenAPI_usage_monitoring_data_free(OpenAPI_usage_monitoring_data_t *usage_monitoring_data);