mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-03 13:50:08 +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
|
|
@ -15,13 +15,19 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container
|
|||
char *rrc_est_cause,
|
||||
int ue_context_request,
|
||||
int initial_amf_n2_ap_id,
|
||||
char *an_n2_i_pv4_addr,
|
||||
char *an_n2_i_pv6_addr,
|
||||
char *an_n2_ipv4_addr,
|
||||
char *an_n2_ipv6_addr,
|
||||
OpenAPI_allowed_nssai_t *allowed_nssai,
|
||||
OpenAPI_list_t *configured_nssai,
|
||||
OpenAPI_list_t *rejected_nssai_in_plmn,
|
||||
OpenAPI_list_t *rejected_nssai_in_ta
|
||||
)
|
||||
OpenAPI_list_t *rejected_nssai_in_ta,
|
||||
OpenAPI_plmn_id_t *selected_plmn_id,
|
||||
int iab_node_ind,
|
||||
OpenAPI_ce_mode_b_ind_t *ce_mode_b_ind,
|
||||
OpenAPI_lte_m_ind_t *lte_m_ind,
|
||||
int authenticated_ind,
|
||||
OpenAPI_npn_access_info_t *npn_access_info
|
||||
)
|
||||
{
|
||||
OpenAPI_registration_context_container_t *registration_context_container_local_var = OpenAPI_malloc(sizeof(OpenAPI_registration_context_container_t));
|
||||
if (!registration_context_container_local_var) {
|
||||
|
|
@ -37,12 +43,18 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container
|
|||
registration_context_container_local_var->rrc_est_cause = rrc_est_cause;
|
||||
registration_context_container_local_var->ue_context_request = ue_context_request;
|
||||
registration_context_container_local_var->initial_amf_n2_ap_id = initial_amf_n2_ap_id;
|
||||
registration_context_container_local_var->an_n2_i_pv4_addr = an_n2_i_pv4_addr;
|
||||
registration_context_container_local_var->an_n2_i_pv6_addr = an_n2_i_pv6_addr;
|
||||
registration_context_container_local_var->an_n2_ipv4_addr = an_n2_ipv4_addr;
|
||||
registration_context_container_local_var->an_n2_ipv6_addr = an_n2_ipv6_addr;
|
||||
registration_context_container_local_var->allowed_nssai = allowed_nssai;
|
||||
registration_context_container_local_var->configured_nssai = configured_nssai;
|
||||
registration_context_container_local_var->rejected_nssai_in_plmn = rejected_nssai_in_plmn;
|
||||
registration_context_container_local_var->rejected_nssai_in_ta = rejected_nssai_in_ta;
|
||||
registration_context_container_local_var->selected_plmn_id = selected_plmn_id;
|
||||
registration_context_container_local_var->iab_node_ind = iab_node_ind;
|
||||
registration_context_container_local_var->ce_mode_b_ind = ce_mode_b_ind;
|
||||
registration_context_container_local_var->lte_m_ind = lte_m_ind;
|
||||
registration_context_container_local_var->authenticated_ind = authenticated_ind;
|
||||
registration_context_container_local_var->npn_access_info = npn_access_info;
|
||||
|
||||
return registration_context_container_local_var;
|
||||
}
|
||||
|
|
@ -59,8 +71,8 @@ void OpenAPI_registration_context_container_free(OpenAPI_registration_context_co
|
|||
ogs_free(registration_context_container->initial_amf_name);
|
||||
OpenAPI_user_location_free(registration_context_container->user_location);
|
||||
ogs_free(registration_context_container->rrc_est_cause);
|
||||
ogs_free(registration_context_container->an_n2_i_pv4_addr);
|
||||
ogs_free(registration_context_container->an_n2_i_pv6_addr);
|
||||
ogs_free(registration_context_container->an_n2_ipv4_addr);
|
||||
ogs_free(registration_context_container->an_n2_ipv6_addr);
|
||||
OpenAPI_allowed_nssai_free(registration_context_container->allowed_nssai);
|
||||
OpenAPI_list_for_each(registration_context_container->configured_nssai, node) {
|
||||
OpenAPI_configured_snssai_free(node->data);
|
||||
|
|
@ -74,6 +86,10 @@ void OpenAPI_registration_context_container_free(OpenAPI_registration_context_co
|
|||
OpenAPI_snssai_free(node->data);
|
||||
}
|
||||
OpenAPI_list_free(registration_context_container->rejected_nssai_in_ta);
|
||||
OpenAPI_plmn_id_free(registration_context_container->selected_plmn_id);
|
||||
OpenAPI_ce_mode_b_ind_free(registration_context_container->ce_mode_b_ind);
|
||||
OpenAPI_lte_m_ind_free(registration_context_container->lte_m_ind);
|
||||
OpenAPI_npn_access_info_free(registration_context_container->npn_access_info);
|
||||
ogs_free(registration_context_container);
|
||||
}
|
||||
|
||||
|
|
@ -99,10 +115,10 @@ cJSON *OpenAPI_registration_context_container_convertToJSON(OpenAPI_registration
|
|||
}
|
||||
|
||||
if (registration_context_container->local_time_zone) {
|
||||
if (cJSON_AddStringToObject(item, "localTimeZone", registration_context_container->local_time_zone) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [local_time_zone]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "localTimeZone", registration_context_container->local_time_zone) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [local_time_zone]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (cJSON_AddStringToObject(item, "anType", OpenAPI_access_type_ToString(registration_context_container->an_type)) == NULL) {
|
||||
|
|
@ -143,112 +159,178 @@ cJSON *OpenAPI_registration_context_container_convertToJSON(OpenAPI_registration
|
|||
}
|
||||
|
||||
if (registration_context_container->rrc_est_cause) {
|
||||
if (cJSON_AddStringToObject(item, "rrcEstCause", registration_context_container->rrc_est_cause) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [rrc_est_cause]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "rrcEstCause", registration_context_container->rrc_est_cause) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [rrc_est_cause]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->ue_context_request) {
|
||||
if (cJSON_AddBoolToObject(item, "ueContextRequest", registration_context_container->ue_context_request) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [ue_context_request]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddBoolToObject(item, "ueContextRequest", registration_context_container->ue_context_request) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [ue_context_request]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->initial_amf_n2_ap_id) {
|
||||
if (cJSON_AddNumberToObject(item, "initialAmfN2ApId", registration_context_container->initial_amf_n2_ap_id) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [initial_amf_n2_ap_id]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddNumberToObject(item, "initialAmfN2ApId", registration_context_container->initial_amf_n2_ap_id) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [initial_amf_n2_ap_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->an_n2_i_pv4_addr) {
|
||||
if (cJSON_AddStringToObject(item, "anN2IPv4Addr", registration_context_container->an_n2_i_pv4_addr) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [an_n2_i_pv4_addr]");
|
||||
goto end;
|
||||
}
|
||||
if (registration_context_container->an_n2_ipv4_addr) {
|
||||
if (cJSON_AddStringToObject(item, "anN2IPv4Addr", registration_context_container->an_n2_ipv4_addr) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [an_n2_ipv4_addr]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->an_n2_i_pv6_addr) {
|
||||
if (cJSON_AddStringToObject(item, "anN2IPv6Addr", registration_context_container->an_n2_i_pv6_addr) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [an_n2_i_pv6_addr]");
|
||||
goto end;
|
||||
}
|
||||
if (registration_context_container->an_n2_ipv6_addr) {
|
||||
if (cJSON_AddStringToObject(item, "anN2IPv6Addr", registration_context_container->an_n2_ipv6_addr) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [an_n2_ipv6_addr]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->allowed_nssai) {
|
||||
cJSON *allowed_nssai_local_JSON = OpenAPI_allowed_nssai_convertToJSON(registration_context_container->allowed_nssai);
|
||||
if (allowed_nssai_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [allowed_nssai]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "allowedNssai", allowed_nssai_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [allowed_nssai]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *allowed_nssai_local_JSON = OpenAPI_allowed_nssai_convertToJSON(registration_context_container->allowed_nssai);
|
||||
if (allowed_nssai_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [allowed_nssai]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "allowedNssai", allowed_nssai_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [allowed_nssai]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->configured_nssai) {
|
||||
cJSON *configured_nssaiList = cJSON_AddArrayToObject(item, "configuredNssai");
|
||||
if (configured_nssaiList == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [configured_nssai]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *configured_nssaiList = cJSON_AddArrayToObject(item, "configuredNssai");
|
||||
if (configured_nssaiList == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [configured_nssai]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *configured_nssai_node;
|
||||
if (registration_context_container->configured_nssai) {
|
||||
OpenAPI_list_for_each(registration_context_container->configured_nssai, configured_nssai_node) {
|
||||
cJSON *itemLocal = OpenAPI_configured_snssai_convertToJSON(configured_nssai_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [configured_nssai]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(configured_nssaiList, itemLocal);
|
||||
OpenAPI_lnode_t *configured_nssai_node;
|
||||
if (registration_context_container->configured_nssai) {
|
||||
OpenAPI_list_for_each(registration_context_container->configured_nssai, configured_nssai_node) {
|
||||
cJSON *itemLocal = OpenAPI_configured_snssai_convertToJSON(configured_nssai_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [configured_nssai]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(configured_nssaiList, itemLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->rejected_nssai_in_plmn) {
|
||||
cJSON *rejected_nssai_in_plmnList = cJSON_AddArrayToObject(item, "rejectedNssaiInPlmn");
|
||||
if (rejected_nssai_in_plmnList == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [rejected_nssai_in_plmn]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *rejected_nssai_in_plmnList = cJSON_AddArrayToObject(item, "rejectedNssaiInPlmn");
|
||||
if (rejected_nssai_in_plmnList == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [rejected_nssai_in_plmn]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *rejected_nssai_in_plmn_node;
|
||||
if (registration_context_container->rejected_nssai_in_plmn) {
|
||||
OpenAPI_list_for_each(registration_context_container->rejected_nssai_in_plmn, rejected_nssai_in_plmn_node) {
|
||||
cJSON *itemLocal = OpenAPI_snssai_convertToJSON(rejected_nssai_in_plmn_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [rejected_nssai_in_plmn]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(rejected_nssai_in_plmnList, itemLocal);
|
||||
OpenAPI_lnode_t *rejected_nssai_in_plmn_node;
|
||||
if (registration_context_container->rejected_nssai_in_plmn) {
|
||||
OpenAPI_list_for_each(registration_context_container->rejected_nssai_in_plmn, rejected_nssai_in_plmn_node) {
|
||||
cJSON *itemLocal = OpenAPI_snssai_convertToJSON(rejected_nssai_in_plmn_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [rejected_nssai_in_plmn]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(rejected_nssai_in_plmnList, itemLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->rejected_nssai_in_ta) {
|
||||
cJSON *rejected_nssai_in_taList = cJSON_AddArrayToObject(item, "rejectedNssaiInTa");
|
||||
if (rejected_nssai_in_taList == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [rejected_nssai_in_ta]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *rejected_nssai_in_taList = cJSON_AddArrayToObject(item, "rejectedNssaiInTa");
|
||||
if (rejected_nssai_in_taList == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [rejected_nssai_in_ta]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *rejected_nssai_in_ta_node;
|
||||
if (registration_context_container->rejected_nssai_in_ta) {
|
||||
OpenAPI_list_for_each(registration_context_container->rejected_nssai_in_ta, rejected_nssai_in_ta_node) {
|
||||
cJSON *itemLocal = OpenAPI_snssai_convertToJSON(rejected_nssai_in_ta_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [rejected_nssai_in_ta]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(rejected_nssai_in_taList, itemLocal);
|
||||
OpenAPI_lnode_t *rejected_nssai_in_ta_node;
|
||||
if (registration_context_container->rejected_nssai_in_ta) {
|
||||
OpenAPI_list_for_each(registration_context_container->rejected_nssai_in_ta, rejected_nssai_in_ta_node) {
|
||||
cJSON *itemLocal = OpenAPI_snssai_convertToJSON(rejected_nssai_in_ta_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [rejected_nssai_in_ta]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(rejected_nssai_in_taList, itemLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->selected_plmn_id) {
|
||||
cJSON *selected_plmn_id_local_JSON = OpenAPI_plmn_id_convertToJSON(registration_context_container->selected_plmn_id);
|
||||
if (selected_plmn_id_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [selected_plmn_id]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "selectedPlmnId", selected_plmn_id_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [selected_plmn_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->iab_node_ind) {
|
||||
if (cJSON_AddBoolToObject(item, "iabNodeInd", registration_context_container->iab_node_ind) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [iab_node_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->ce_mode_b_ind) {
|
||||
cJSON *ce_mode_b_ind_local_JSON = OpenAPI_ce_mode_b_ind_convertToJSON(registration_context_container->ce_mode_b_ind);
|
||||
if (ce_mode_b_ind_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [ce_mode_b_ind]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "ceModeBInd", ce_mode_b_ind_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [ce_mode_b_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->lte_m_ind) {
|
||||
cJSON *lte_m_ind_local_JSON = OpenAPI_lte_m_ind_convertToJSON(registration_context_container->lte_m_ind);
|
||||
if (lte_m_ind_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [lte_m_ind]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "lteMInd", lte_m_ind_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [lte_m_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->authenticated_ind) {
|
||||
if (cJSON_AddBoolToObject(item, "authenticatedInd", registration_context_container->authenticated_ind) == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [authenticated_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (registration_context_container->npn_access_info) {
|
||||
cJSON *npn_access_info_local_JSON = OpenAPI_npn_access_info_convertToJSON(registration_context_container->npn_access_info);
|
||||
if (npn_access_info_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [npn_access_info]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "npnAccessInfo", npn_access_info_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
ogs_error("OpenAPI_registration_context_container_convertToJSON() failed [npn_access_info]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
return item;
|
||||
|
|
@ -264,17 +346,17 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container
|
|||
}
|
||||
|
||||
OpenAPI_ue_context_t *ue_context_local_nonprim = NULL;
|
||||
|
||||
|
||||
ue_context_local_nonprim = OpenAPI_ue_context_parseFromJSON(ue_context);
|
||||
|
||||
cJSON *local_time_zone = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "localTimeZone");
|
||||
|
||||
if (local_time_zone) {
|
||||
if (!cJSON_IsString(local_time_zone)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [local_time_zone]");
|
||||
goto end;
|
||||
}
|
||||
if (local_time_zone) {
|
||||
if (!cJSON_IsString(local_time_zone)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [local_time_zone]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *an_type = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "anType");
|
||||
if (!an_type) {
|
||||
|
|
@ -283,7 +365,7 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container
|
|||
}
|
||||
|
||||
OpenAPI_access_type_e an_typeVariable;
|
||||
|
||||
|
||||
if (!cJSON_IsString(an_type)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [an_type]");
|
||||
goto end;
|
||||
|
|
@ -296,7 +378,7 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container
|
|||
goto end;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!cJSON_IsNumber(an_n2_ap_id)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [an_n2_ap_id]");
|
||||
goto end;
|
||||
|
|
@ -309,7 +391,7 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container
|
|||
}
|
||||
|
||||
OpenAPI_global_ran_node_id_t *ran_node_id_local_nonprim = NULL;
|
||||
|
||||
|
||||
ran_node_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(ran_node_id);
|
||||
|
||||
cJSON *initial_amf_name = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "initialAmfName");
|
||||
|
|
@ -318,7 +400,7 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container
|
|||
goto end;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!cJSON_IsString(initial_amf_name)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [initial_amf_name]");
|
||||
goto end;
|
||||
|
|
@ -331,129 +413,175 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container
|
|||
}
|
||||
|
||||
OpenAPI_user_location_t *user_location_local_nonprim = NULL;
|
||||
|
||||
|
||||
user_location_local_nonprim = OpenAPI_user_location_parseFromJSON(user_location);
|
||||
|
||||
cJSON *rrc_est_cause = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "rrcEstCause");
|
||||
|
||||
if (rrc_est_cause) {
|
||||
if (!cJSON_IsString(rrc_est_cause)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [rrc_est_cause]");
|
||||
goto end;
|
||||
}
|
||||
if (rrc_est_cause) {
|
||||
if (!cJSON_IsString(rrc_est_cause)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [rrc_est_cause]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *ue_context_request = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "ueContextRequest");
|
||||
|
||||
if (ue_context_request) {
|
||||
if (!cJSON_IsBool(ue_context_request)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [ue_context_request]");
|
||||
goto end;
|
||||
}
|
||||
if (ue_context_request) {
|
||||
if (!cJSON_IsBool(ue_context_request)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [ue_context_request]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *initial_amf_n2_ap_id = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "initialAmfN2ApId");
|
||||
|
||||
if (initial_amf_n2_ap_id) {
|
||||
if (!cJSON_IsNumber(initial_amf_n2_ap_id)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [initial_amf_n2_ap_id]");
|
||||
goto end;
|
||||
}
|
||||
if (initial_amf_n2_ap_id) {
|
||||
if (!cJSON_IsNumber(initial_amf_n2_ap_id)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [initial_amf_n2_ap_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *an_n2_i_pv4_addr = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "anN2IPv4Addr");
|
||||
cJSON *an_n2_ipv4_addr = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "anN2IPv4Addr");
|
||||
|
||||
if (an_n2_i_pv4_addr) {
|
||||
if (!cJSON_IsString(an_n2_i_pv4_addr)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [an_n2_i_pv4_addr]");
|
||||
goto end;
|
||||
}
|
||||
if (an_n2_ipv4_addr) {
|
||||
if (!cJSON_IsString(an_n2_ipv4_addr)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [an_n2_ipv4_addr]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *an_n2_i_pv6_addr = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "anN2IPv6Addr");
|
||||
cJSON *an_n2_ipv6_addr = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "anN2IPv6Addr");
|
||||
|
||||
if (an_n2_i_pv6_addr) {
|
||||
if (!cJSON_IsString(an_n2_i_pv6_addr)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [an_n2_i_pv6_addr]");
|
||||
goto end;
|
||||
}
|
||||
if (an_n2_ipv6_addr) {
|
||||
if (!cJSON_IsString(an_n2_ipv6_addr)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [an_n2_ipv6_addr]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *allowed_nssai = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "allowedNssai");
|
||||
|
||||
OpenAPI_allowed_nssai_t *allowed_nssai_local_nonprim = NULL;
|
||||
if (allowed_nssai) {
|
||||
allowed_nssai_local_nonprim = OpenAPI_allowed_nssai_parseFromJSON(allowed_nssai);
|
||||
}
|
||||
if (allowed_nssai) {
|
||||
allowed_nssai_local_nonprim = OpenAPI_allowed_nssai_parseFromJSON(allowed_nssai);
|
||||
}
|
||||
|
||||
cJSON *configured_nssai = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "configuredNssai");
|
||||
|
||||
OpenAPI_list_t *configured_nssaiList;
|
||||
if (configured_nssai) {
|
||||
cJSON *configured_nssai_local_nonprimitive;
|
||||
if (!cJSON_IsArray(configured_nssai)) {
|
||||
if (configured_nssai) {
|
||||
cJSON *configured_nssai_local_nonprimitive;
|
||||
if (!cJSON_IsArray(configured_nssai)){
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [configured_nssai]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
configured_nssaiList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(configured_nssai_local_nonprimitive, configured_nssai ) {
|
||||
if (!cJSON_IsObject(configured_nssai_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [configured_nssai]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_configured_snssai_t *configured_nssaiItem = OpenAPI_configured_snssai_parseFromJSON(configured_nssai_local_nonprimitive);
|
||||
|
||||
configured_nssaiList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(configured_nssai_local_nonprimitive, configured_nssai ) {
|
||||
if (!cJSON_IsObject(configured_nssai_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [configured_nssai]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_configured_snssai_t *configured_nssaiItem = OpenAPI_configured_snssai_parseFromJSON(configured_nssai_local_nonprimitive);
|
||||
|
||||
OpenAPI_list_add(configured_nssaiList, configured_nssaiItem);
|
||||
}
|
||||
OpenAPI_list_add(configured_nssaiList, configured_nssaiItem);
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *rejected_nssai_in_plmn = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "rejectedNssaiInPlmn");
|
||||
|
||||
OpenAPI_list_t *rejected_nssai_in_plmnList;
|
||||
if (rejected_nssai_in_plmn) {
|
||||
cJSON *rejected_nssai_in_plmn_local_nonprimitive;
|
||||
if (!cJSON_IsArray(rejected_nssai_in_plmn)) {
|
||||
if (rejected_nssai_in_plmn) {
|
||||
cJSON *rejected_nssai_in_plmn_local_nonprimitive;
|
||||
if (!cJSON_IsArray(rejected_nssai_in_plmn)){
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [rejected_nssai_in_plmn]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
rejected_nssai_in_plmnList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(rejected_nssai_in_plmn_local_nonprimitive, rejected_nssai_in_plmn ) {
|
||||
if (!cJSON_IsObject(rejected_nssai_in_plmn_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [rejected_nssai_in_plmn]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_snssai_t *rejected_nssai_in_plmnItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_plmn_local_nonprimitive);
|
||||
|
||||
rejected_nssai_in_plmnList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(rejected_nssai_in_plmn_local_nonprimitive, rejected_nssai_in_plmn ) {
|
||||
if (!cJSON_IsObject(rejected_nssai_in_plmn_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [rejected_nssai_in_plmn]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_snssai_t *rejected_nssai_in_plmnItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_plmn_local_nonprimitive);
|
||||
|
||||
OpenAPI_list_add(rejected_nssai_in_plmnList, rejected_nssai_in_plmnItem);
|
||||
}
|
||||
OpenAPI_list_add(rejected_nssai_in_plmnList, rejected_nssai_in_plmnItem);
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *rejected_nssai_in_ta = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "rejectedNssaiInTa");
|
||||
|
||||
OpenAPI_list_t *rejected_nssai_in_taList;
|
||||
if (rejected_nssai_in_ta) {
|
||||
cJSON *rejected_nssai_in_ta_local_nonprimitive;
|
||||
if (!cJSON_IsArray(rejected_nssai_in_ta)) {
|
||||
if (rejected_nssai_in_ta) {
|
||||
cJSON *rejected_nssai_in_ta_local_nonprimitive;
|
||||
if (!cJSON_IsArray(rejected_nssai_in_ta)){
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [rejected_nssai_in_ta]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
rejected_nssai_in_taList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(rejected_nssai_in_ta_local_nonprimitive, rejected_nssai_in_ta ) {
|
||||
if (!cJSON_IsObject(rejected_nssai_in_ta_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [rejected_nssai_in_ta]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_snssai_t *rejected_nssai_in_taItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_ta_local_nonprimitive);
|
||||
|
||||
rejected_nssai_in_taList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(rejected_nssai_in_ta_local_nonprimitive, rejected_nssai_in_ta ) {
|
||||
if (!cJSON_IsObject(rejected_nssai_in_ta_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [rejected_nssai_in_ta]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_snssai_t *rejected_nssai_in_taItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_ta_local_nonprimitive);
|
||||
|
||||
OpenAPI_list_add(rejected_nssai_in_taList, rejected_nssai_in_taItem);
|
||||
}
|
||||
OpenAPI_list_add(rejected_nssai_in_taList, rejected_nssai_in_taItem);
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *selected_plmn_id = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "selectedPlmnId");
|
||||
|
||||
OpenAPI_plmn_id_t *selected_plmn_id_local_nonprim = NULL;
|
||||
if (selected_plmn_id) {
|
||||
selected_plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(selected_plmn_id);
|
||||
}
|
||||
|
||||
cJSON *iab_node_ind = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "iabNodeInd");
|
||||
|
||||
if (iab_node_ind) {
|
||||
if (!cJSON_IsBool(iab_node_ind)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [iab_node_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *ce_mode_b_ind = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "ceModeBInd");
|
||||
|
||||
OpenAPI_ce_mode_b_ind_t *ce_mode_b_ind_local_nonprim = NULL;
|
||||
if (ce_mode_b_ind) {
|
||||
ce_mode_b_ind_local_nonprim = OpenAPI_ce_mode_b_ind_parseFromJSON(ce_mode_b_ind);
|
||||
}
|
||||
|
||||
cJSON *lte_m_ind = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "lteMInd");
|
||||
|
||||
OpenAPI_lte_m_ind_t *lte_m_ind_local_nonprim = NULL;
|
||||
if (lte_m_ind) {
|
||||
lte_m_ind_local_nonprim = OpenAPI_lte_m_ind_parseFromJSON(lte_m_ind);
|
||||
}
|
||||
|
||||
cJSON *authenticated_ind = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "authenticatedInd");
|
||||
|
||||
if (authenticated_ind) {
|
||||
if (!cJSON_IsBool(authenticated_ind)) {
|
||||
ogs_error("OpenAPI_registration_context_container_parseFromJSON() failed [authenticated_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *npn_access_info = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "npnAccessInfo");
|
||||
|
||||
OpenAPI_npn_access_info_t *npn_access_info_local_nonprim = NULL;
|
||||
if (npn_access_info) {
|
||||
npn_access_info_local_nonprim = OpenAPI_npn_access_info_parseFromJSON(npn_access_info);
|
||||
}
|
||||
|
||||
registration_context_container_local_var = OpenAPI_registration_context_container_create (
|
||||
ue_context_local_nonprim,
|
||||
|
|
@ -466,13 +594,19 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container
|
|||
rrc_est_cause ? ogs_strdup_or_assert(rrc_est_cause->valuestring) : NULL,
|
||||
ue_context_request ? ue_context_request->valueint : 0,
|
||||
initial_amf_n2_ap_id ? initial_amf_n2_ap_id->valuedouble : 0,
|
||||
an_n2_i_pv4_addr ? ogs_strdup_or_assert(an_n2_i_pv4_addr->valuestring) : NULL,
|
||||
an_n2_i_pv6_addr ? ogs_strdup_or_assert(an_n2_i_pv6_addr->valuestring) : NULL,
|
||||
an_n2_ipv4_addr ? ogs_strdup_or_assert(an_n2_ipv4_addr->valuestring) : NULL,
|
||||
an_n2_ipv6_addr ? ogs_strdup_or_assert(an_n2_ipv6_addr->valuestring) : NULL,
|
||||
allowed_nssai ? allowed_nssai_local_nonprim : NULL,
|
||||
configured_nssai ? configured_nssaiList : NULL,
|
||||
rejected_nssai_in_plmn ? rejected_nssai_in_plmnList : NULL,
|
||||
rejected_nssai_in_ta ? rejected_nssai_in_taList : NULL
|
||||
);
|
||||
rejected_nssai_in_ta ? rejected_nssai_in_taList : NULL,
|
||||
selected_plmn_id ? selected_plmn_id_local_nonprim : NULL,
|
||||
iab_node_ind ? iab_node_ind->valueint : 0,
|
||||
ce_mode_b_ind ? ce_mode_b_ind_local_nonprim : NULL,
|
||||
lte_m_ind ? lte_m_ind_local_nonprim : NULL,
|
||||
authenticated_ind ? authenticated_ind->valueint : 0,
|
||||
npn_access_info ? npn_access_info_local_nonprim : NULL
|
||||
);
|
||||
|
||||
return registration_context_container_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue