open5gs/lib/sbi/openapi/model/usage_threshold_rm.h
Bostjan Meglic 50464d174e [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.
2023-10-11 21:10:20 +09:00

60 lines
1.7 KiB
C

/*
* usage_threshold_rm.h
*
* Represents the same as the UsageThreshold data type but with the nullable:true property.
*/
#ifndef _OpenAPI_usage_threshold_rm_H_
#define _OpenAPI_usage_threshold_rm_H_
#include <string.h>
#include "../external/cJSON.h"
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OpenAPI_usage_threshold_rm_s OpenAPI_usage_threshold_rm_t;
typedef struct OpenAPI_usage_threshold_rm_s {
bool is_duration_null;
bool is_duration;
int duration;
bool is_total_volume_null;
bool is_total_volume;
long total_volume;
bool is_downlink_volume_null;
bool is_downlink_volume;
long downlink_volume;
bool is_uplink_volume_null;
bool is_uplink_volume;
long uplink_volume;
} OpenAPI_usage_threshold_rm_t;
OpenAPI_usage_threshold_rm_t *OpenAPI_usage_threshold_rm_create(
bool is_duration_null,
bool is_duration,
int duration,
bool is_total_volume_null,
bool is_total_volume,
long total_volume,
bool is_downlink_volume_null,
bool is_downlink_volume,
long downlink_volume,
bool is_uplink_volume_null,
bool is_uplink_volume,
long uplink_volume
);
void OpenAPI_usage_threshold_rm_free(OpenAPI_usage_threshold_rm_t *usage_threshold_rm);
OpenAPI_usage_threshold_rm_t *OpenAPI_usage_threshold_rm_parseFromJSON(cJSON *usage_threshold_rmJSON);
cJSON *OpenAPI_usage_threshold_rm_convertToJSON(OpenAPI_usage_threshold_rm_t *usage_threshold_rm);
OpenAPI_usage_threshold_rm_t *OpenAPI_usage_threshold_rm_copy(OpenAPI_usage_threshold_rm_t *dst, OpenAPI_usage_threshold_rm_t *src);
#ifdef __cplusplus
}
#endif
#endif /* _OpenAPI_usage_threshold_rm_H_ */