open5gs/lib/sbi/openapi/model/confirmation_data.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

42 lines
1.2 KiB
C

/*
* confirmation_data.h
*
* Contains the result of the authentication.
*/
#ifndef _OpenAPI_confirmation_data_H_
#define _OpenAPI_confirmation_data_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_confirmation_data_s OpenAPI_confirmation_data_t;
typedef struct OpenAPI_confirmation_data_s {
bool is_res_star_null;
char *res_star;
char *supported_features;
} OpenAPI_confirmation_data_t;
OpenAPI_confirmation_data_t *OpenAPI_confirmation_data_create(
bool is_res_star_null,
char *res_star,
char *supported_features
);
void OpenAPI_confirmation_data_free(OpenAPI_confirmation_data_t *confirmation_data);
OpenAPI_confirmation_data_t *OpenAPI_confirmation_data_parseFromJSON(cJSON *confirmation_dataJSON);
cJSON *OpenAPI_confirmation_data_convertToJSON(OpenAPI_confirmation_data_t *confirmation_data);
OpenAPI_confirmation_data_t *OpenAPI_confirmation_data_copy(OpenAPI_confirmation_data_t *dst, OpenAPI_confirmation_data_t *src);
#ifdef __cplusplus
}
#endif
#endif /* _OpenAPI_confirmation_data_H_ */