mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 22:30:09 +00:00
Upgrade SBI(Service-based Interface)
* OpenAPI Generator version: 4.3.1 ==> 5.5.1 * Specification : r16.8.0 (20210629)
This commit is contained in:
parent
2aaa8200c2
commit
f278d58a69
1914 changed files with 91329 additions and 57361 deletions
|
|
@ -5,10 +5,10 @@
|
|||
#include "qos_notification_control_info.h"
|
||||
|
||||
OpenAPI_qos_notification_control_info_t *OpenAPI_qos_notification_control_info_create(
|
||||
OpenAPI_qos_notif_type_t *notif_type,
|
||||
OpenAPI_qos_notif_type_e notif_type,
|
||||
OpenAPI_list_t *flows,
|
||||
char *alt_ser_req
|
||||
)
|
||||
)
|
||||
{
|
||||
OpenAPI_qos_notification_control_info_t *qos_notification_control_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_qos_notification_control_info_t));
|
||||
if (!qos_notification_control_info_local_var) {
|
||||
|
|
@ -27,7 +27,6 @@ void OpenAPI_qos_notification_control_info_free(OpenAPI_qos_notification_control
|
|||
return;
|
||||
}
|
||||
OpenAPI_lnode_t *node;
|
||||
OpenAPI_qos_notif_type_free(qos_notification_control_info->notif_type);
|
||||
OpenAPI_list_for_each(qos_notification_control_info->flows, node) {
|
||||
OpenAPI_flows_free(node->data);
|
||||
}
|
||||
|
|
@ -46,42 +45,36 @@ cJSON *OpenAPI_qos_notification_control_info_convertToJSON(OpenAPI_qos_notificat
|
|||
}
|
||||
|
||||
item = cJSON_CreateObject();
|
||||
cJSON *notif_type_local_JSON = OpenAPI_qos_notif_type_convertToJSON(qos_notification_control_info->notif_type);
|
||||
if (notif_type_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_qos_notification_control_info_convertToJSON() failed [notif_type]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "notifType", notif_type_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
if (cJSON_AddStringToObject(item, "notifType", OpenAPI_qos_notif_type_ToString(qos_notification_control_info->notif_type)) == NULL) {
|
||||
ogs_error("OpenAPI_qos_notification_control_info_convertToJSON() failed [notif_type]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (qos_notification_control_info->flows) {
|
||||
cJSON *flowsList = cJSON_AddArrayToObject(item, "flows");
|
||||
if (flowsList == NULL) {
|
||||
ogs_error("OpenAPI_qos_notification_control_info_convertToJSON() failed [flows]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *flowsList = cJSON_AddArrayToObject(item, "flows");
|
||||
if (flowsList == NULL) {
|
||||
ogs_error("OpenAPI_qos_notification_control_info_convertToJSON() failed [flows]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *flows_node;
|
||||
if (qos_notification_control_info->flows) {
|
||||
OpenAPI_list_for_each(qos_notification_control_info->flows, flows_node) {
|
||||
cJSON *itemLocal = OpenAPI_flows_convertToJSON(flows_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_qos_notification_control_info_convertToJSON() failed [flows]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(flowsList, itemLocal);
|
||||
OpenAPI_lnode_t *flows_node;
|
||||
if (qos_notification_control_info->flows) {
|
||||
OpenAPI_list_for_each(qos_notification_control_info->flows, flows_node) {
|
||||
cJSON *itemLocal = OpenAPI_flows_convertToJSON(flows_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_qos_notification_control_info_convertToJSON() failed [flows]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(flowsList, itemLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (qos_notification_control_info->alt_ser_req) {
|
||||
if (cJSON_AddStringToObject(item, "altSerReq", qos_notification_control_info->alt_ser_req) == NULL) {
|
||||
ogs_error("OpenAPI_qos_notification_control_info_convertToJSON() failed [alt_ser_req]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "altSerReq", qos_notification_control_info->alt_ser_req) == NULL) {
|
||||
ogs_error("OpenAPI_qos_notification_control_info_convertToJSON() failed [alt_ser_req]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -97,47 +90,51 @@ OpenAPI_qos_notification_control_info_t *OpenAPI_qos_notification_control_info_p
|
|||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_qos_notif_type_t *notif_type_local_nonprim = NULL;
|
||||
|
||||
notif_type_local_nonprim = OpenAPI_qos_notif_type_parseFromJSON(notif_type);
|
||||
OpenAPI_qos_notif_type_e notif_typeVariable;
|
||||
|
||||
if (!cJSON_IsString(notif_type)) {
|
||||
ogs_error("OpenAPI_qos_notification_control_info_parseFromJSON() failed [notif_type]");
|
||||
goto end;
|
||||
}
|
||||
notif_typeVariable = OpenAPI_qos_notif_type_FromString(notif_type->valuestring);
|
||||
|
||||
cJSON *flows = cJSON_GetObjectItemCaseSensitive(qos_notification_control_infoJSON, "flows");
|
||||
|
||||
OpenAPI_list_t *flowsList;
|
||||
if (flows) {
|
||||
cJSON *flows_local_nonprimitive;
|
||||
if (!cJSON_IsArray(flows)) {
|
||||
if (flows) {
|
||||
cJSON *flows_local_nonprimitive;
|
||||
if (!cJSON_IsArray(flows)){
|
||||
ogs_error("OpenAPI_qos_notification_control_info_parseFromJSON() failed [flows]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
flowsList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(flows_local_nonprimitive, flows ) {
|
||||
if (!cJSON_IsObject(flows_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_qos_notification_control_info_parseFromJSON() failed [flows]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_flows_t *flowsItem = OpenAPI_flows_parseFromJSON(flows_local_nonprimitive);
|
||||
|
||||
flowsList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(flows_local_nonprimitive, flows ) {
|
||||
if (!cJSON_IsObject(flows_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_qos_notification_control_info_parseFromJSON() failed [flows]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_flows_t *flowsItem = OpenAPI_flows_parseFromJSON(flows_local_nonprimitive);
|
||||
|
||||
OpenAPI_list_add(flowsList, flowsItem);
|
||||
}
|
||||
OpenAPI_list_add(flowsList, flowsItem);
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *alt_ser_req = cJSON_GetObjectItemCaseSensitive(qos_notification_control_infoJSON, "altSerReq");
|
||||
|
||||
if (alt_ser_req) {
|
||||
if (!cJSON_IsString(alt_ser_req)) {
|
||||
ogs_error("OpenAPI_qos_notification_control_info_parseFromJSON() failed [alt_ser_req]");
|
||||
goto end;
|
||||
}
|
||||
if (alt_ser_req) {
|
||||
if (!cJSON_IsString(alt_ser_req)) {
|
||||
ogs_error("OpenAPI_qos_notification_control_info_parseFromJSON() failed [alt_ser_req]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
qos_notification_control_info_local_var = OpenAPI_qos_notification_control_info_create (
|
||||
notif_type_local_nonprim,
|
||||
notif_typeVariable,
|
||||
flows ? flowsList : NULL,
|
||||
alt_ser_req ? ogs_strdup_or_assert(alt_ser_req->valuestring) : NULL
|
||||
);
|
||||
);
|
||||
|
||||
return qos_notification_control_info_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue