mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-05 07:08:11 +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
|
|
@ -8,9 +8,10 @@ OpenAPI_pws_information_t *OpenAPI_pws_information_create(
|
|||
int message_identifier,
|
||||
int serial_number,
|
||||
OpenAPI_n2_info_content_t *pws_container,
|
||||
OpenAPI_list_t *bc_empty_area_list,
|
||||
int send_ran_response,
|
||||
char *omc_id
|
||||
)
|
||||
)
|
||||
{
|
||||
OpenAPI_pws_information_t *pws_information_local_var = OpenAPI_malloc(sizeof(OpenAPI_pws_information_t));
|
||||
if (!pws_information_local_var) {
|
||||
|
|
@ -19,6 +20,7 @@ OpenAPI_pws_information_t *OpenAPI_pws_information_create(
|
|||
pws_information_local_var->message_identifier = message_identifier;
|
||||
pws_information_local_var->serial_number = serial_number;
|
||||
pws_information_local_var->pws_container = pws_container;
|
||||
pws_information_local_var->bc_empty_area_list = bc_empty_area_list;
|
||||
pws_information_local_var->send_ran_response = send_ran_response;
|
||||
pws_information_local_var->omc_id = omc_id;
|
||||
|
||||
|
|
@ -32,6 +34,10 @@ void OpenAPI_pws_information_free(OpenAPI_pws_information_t *pws_information)
|
|||
}
|
||||
OpenAPI_lnode_t *node;
|
||||
OpenAPI_n2_info_content_free(pws_information->pws_container);
|
||||
OpenAPI_list_for_each(pws_information->bc_empty_area_list, node) {
|
||||
OpenAPI_global_ran_node_id_free(node->data);
|
||||
}
|
||||
OpenAPI_list_free(pws_information->bc_empty_area_list);
|
||||
ogs_free(pws_information->omc_id);
|
||||
ogs_free(pws_information);
|
||||
}
|
||||
|
|
@ -67,18 +73,38 @@ cJSON *OpenAPI_pws_information_convertToJSON(OpenAPI_pws_information_t *pws_info
|
|||
goto end;
|
||||
}
|
||||
|
||||
if (pws_information->send_ran_response) {
|
||||
if (cJSON_AddBoolToObject(item, "sendRanResponse", pws_information->send_ran_response) == NULL) {
|
||||
ogs_error("OpenAPI_pws_information_convertToJSON() failed [send_ran_response]");
|
||||
goto end;
|
||||
if (pws_information->bc_empty_area_list) {
|
||||
cJSON *bc_empty_area_listList = cJSON_AddArrayToObject(item, "bcEmptyAreaList");
|
||||
if (bc_empty_area_listList == NULL) {
|
||||
ogs_error("OpenAPI_pws_information_convertToJSON() failed [bc_empty_area_list]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *bc_empty_area_list_node;
|
||||
if (pws_information->bc_empty_area_list) {
|
||||
OpenAPI_list_for_each(pws_information->bc_empty_area_list, bc_empty_area_list_node) {
|
||||
cJSON *itemLocal = OpenAPI_global_ran_node_id_convertToJSON(bc_empty_area_list_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_pws_information_convertToJSON() failed [bc_empty_area_list]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(bc_empty_area_listList, itemLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pws_information->send_ran_response) {
|
||||
if (cJSON_AddBoolToObject(item, "sendRanResponse", pws_information->send_ran_response) == NULL) {
|
||||
ogs_error("OpenAPI_pws_information_convertToJSON() failed [send_ran_response]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (pws_information->omc_id) {
|
||||
if (cJSON_AddStringToObject(item, "omcId", pws_information->omc_id) == NULL) {
|
||||
ogs_error("OpenAPI_pws_information_convertToJSON() failed [omc_id]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "omcId", pws_information->omc_id) == NULL) {
|
||||
ogs_error("OpenAPI_pws_information_convertToJSON() failed [omc_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -94,7 +120,7 @@ OpenAPI_pws_information_t *OpenAPI_pws_information_parseFromJSON(cJSON *pws_info
|
|||
goto end;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!cJSON_IsNumber(message_identifier)) {
|
||||
ogs_error("OpenAPI_pws_information_parseFromJSON() failed [message_identifier]");
|
||||
goto end;
|
||||
|
|
@ -106,7 +132,7 @@ OpenAPI_pws_information_t *OpenAPI_pws_information_parseFromJSON(cJSON *pws_info
|
|||
goto end;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!cJSON_IsNumber(serial_number)) {
|
||||
ogs_error("OpenAPI_pws_information_parseFromJSON() failed [serial_number]");
|
||||
goto end;
|
||||
|
|
@ -119,34 +145,58 @@ OpenAPI_pws_information_t *OpenAPI_pws_information_parseFromJSON(cJSON *pws_info
|
|||
}
|
||||
|
||||
OpenAPI_n2_info_content_t *pws_container_local_nonprim = NULL;
|
||||
|
||||
|
||||
pws_container_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(pws_container);
|
||||
|
||||
cJSON *bc_empty_area_list = cJSON_GetObjectItemCaseSensitive(pws_informationJSON, "bcEmptyAreaList");
|
||||
|
||||
OpenAPI_list_t *bc_empty_area_listList;
|
||||
if (bc_empty_area_list) {
|
||||
cJSON *bc_empty_area_list_local_nonprimitive;
|
||||
if (!cJSON_IsArray(bc_empty_area_list)){
|
||||
ogs_error("OpenAPI_pws_information_parseFromJSON() failed [bc_empty_area_list]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
bc_empty_area_listList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(bc_empty_area_list_local_nonprimitive, bc_empty_area_list ) {
|
||||
if (!cJSON_IsObject(bc_empty_area_list_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_pws_information_parseFromJSON() failed [bc_empty_area_list]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_global_ran_node_id_t *bc_empty_area_listItem = OpenAPI_global_ran_node_id_parseFromJSON(bc_empty_area_list_local_nonprimitive);
|
||||
|
||||
OpenAPI_list_add(bc_empty_area_listList, bc_empty_area_listItem);
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *send_ran_response = cJSON_GetObjectItemCaseSensitive(pws_informationJSON, "sendRanResponse");
|
||||
|
||||
if (send_ran_response) {
|
||||
if (!cJSON_IsBool(send_ran_response)) {
|
||||
ogs_error("OpenAPI_pws_information_parseFromJSON() failed [send_ran_response]");
|
||||
goto end;
|
||||
}
|
||||
if (send_ran_response) {
|
||||
if (!cJSON_IsBool(send_ran_response)) {
|
||||
ogs_error("OpenAPI_pws_information_parseFromJSON() failed [send_ran_response]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *omc_id = cJSON_GetObjectItemCaseSensitive(pws_informationJSON, "omcId");
|
||||
|
||||
if (omc_id) {
|
||||
if (!cJSON_IsString(omc_id)) {
|
||||
ogs_error("OpenAPI_pws_information_parseFromJSON() failed [omc_id]");
|
||||
goto end;
|
||||
}
|
||||
if (omc_id) {
|
||||
if (!cJSON_IsString(omc_id)) {
|
||||
ogs_error("OpenAPI_pws_information_parseFromJSON() failed [omc_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
pws_information_local_var = OpenAPI_pws_information_create (
|
||||
message_identifier->valuedouble,
|
||||
serial_number->valuedouble,
|
||||
pws_container_local_nonprim,
|
||||
bc_empty_area_list ? bc_empty_area_listList : NULL,
|
||||
send_ran_response ? send_ran_response->valueint : 0,
|
||||
omc_id ? ogs_strdup_or_assert(omc_id->valuestring) : NULL
|
||||
);
|
||||
);
|
||||
|
||||
return pws_information_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue