[Release-17] Upgrade SBI to v17.x.0

This commit is contained in:
Sukchan Lee 2023-03-01 19:56:49 +09:00
parent 969c116e77
commit 4d44b1843e
1687 changed files with 121604 additions and 9310 deletions

View file

@ -7,7 +7,11 @@
OpenAPI_ee_profile_data_t *OpenAPI_ee_profile_data_create(
OpenAPI_list_t *restricted_event_types,
char *supported_features,
OpenAPI_list_t* allowed_mtc_provider
OpenAPI_list_t* allowed_mtc_provider,
bool is_iwk_epc_restricted,
int iwk_epc_restricted,
char *imsi,
char *hss_group_id
)
{
OpenAPI_ee_profile_data_t *ee_profile_data_local_var = ogs_malloc(sizeof(OpenAPI_ee_profile_data_t));
@ -16,6 +20,10 @@ OpenAPI_ee_profile_data_t *OpenAPI_ee_profile_data_create(
ee_profile_data_local_var->restricted_event_types = restricted_event_types;
ee_profile_data_local_var->supported_features = supported_features;
ee_profile_data_local_var->allowed_mtc_provider = allowed_mtc_provider;
ee_profile_data_local_var->is_iwk_epc_restricted = is_iwk_epc_restricted;
ee_profile_data_local_var->iwk_epc_restricted = iwk_epc_restricted;
ee_profile_data_local_var->imsi = imsi;
ee_profile_data_local_var->hss_group_id = hss_group_id;
return ee_profile_data_local_var;
}
@ -48,6 +56,14 @@ void OpenAPI_ee_profile_data_free(OpenAPI_ee_profile_data_t *ee_profile_data)
OpenAPI_list_free(ee_profile_data->allowed_mtc_provider);
ee_profile_data->allowed_mtc_provider = NULL;
}
if (ee_profile_data->imsi) {
ogs_free(ee_profile_data->imsi);
ee_profile_data->imsi = NULL;
}
if (ee_profile_data->hss_group_id) {
ogs_free(ee_profile_data->hss_group_id);
ee_profile_data->hss_group_id = NULL;
}
ogs_free(ee_profile_data);
}
@ -107,6 +123,27 @@ cJSON *OpenAPI_ee_profile_data_convertToJSON(OpenAPI_ee_profile_data_t *ee_profi
}
}
if (ee_profile_data->is_iwk_epc_restricted) {
if (cJSON_AddBoolToObject(item, "iwkEpcRestricted", ee_profile_data->iwk_epc_restricted) == NULL) {
ogs_error("OpenAPI_ee_profile_data_convertToJSON() failed [iwk_epc_restricted]");
goto end;
}
}
if (ee_profile_data->imsi) {
if (cJSON_AddStringToObject(item, "imsi", ee_profile_data->imsi) == NULL) {
ogs_error("OpenAPI_ee_profile_data_convertToJSON() failed [imsi]");
goto end;
}
}
if (ee_profile_data->hss_group_id) {
if (cJSON_AddStringToObject(item, "hssGroupId", ee_profile_data->hss_group_id) == NULL) {
ogs_error("OpenAPI_ee_profile_data_convertToJSON() failed [hss_group_id]");
goto end;
}
}
end:
return item;
}
@ -120,6 +157,9 @@ OpenAPI_ee_profile_data_t *OpenAPI_ee_profile_data_parseFromJSON(cJSON *ee_profi
cJSON *supported_features = NULL;
cJSON *allowed_mtc_provider = NULL;
OpenAPI_list_t *allowed_mtc_providerList = NULL;
cJSON *iwk_epc_restricted = NULL;
cJSON *imsi = NULL;
cJSON *hss_group_id = NULL;
restricted_event_types = cJSON_GetObjectItemCaseSensitive(ee_profile_dataJSON, "restrictedEventTypes");
if (restricted_event_types) {
cJSON *restricted_event_types_local = NULL;
@ -181,10 +221,38 @@ OpenAPI_ee_profile_data_t *OpenAPI_ee_profile_data_parseFromJSON(cJSON *ee_profi
}
}
iwk_epc_restricted = cJSON_GetObjectItemCaseSensitive(ee_profile_dataJSON, "iwkEpcRestricted");
if (iwk_epc_restricted) {
if (!cJSON_IsBool(iwk_epc_restricted)) {
ogs_error("OpenAPI_ee_profile_data_parseFromJSON() failed [iwk_epc_restricted]");
goto end;
}
}
imsi = cJSON_GetObjectItemCaseSensitive(ee_profile_dataJSON, "imsi");
if (imsi) {
if (!cJSON_IsString(imsi) && !cJSON_IsNull(imsi)) {
ogs_error("OpenAPI_ee_profile_data_parseFromJSON() failed [imsi]");
goto end;
}
}
hss_group_id = cJSON_GetObjectItemCaseSensitive(ee_profile_dataJSON, "hssGroupId");
if (hss_group_id) {
if (!cJSON_IsString(hss_group_id) && !cJSON_IsNull(hss_group_id)) {
ogs_error("OpenAPI_ee_profile_data_parseFromJSON() failed [hss_group_id]");
goto end;
}
}
ee_profile_data_local_var = OpenAPI_ee_profile_data_create (
restricted_event_types ? restricted_event_typesList : NULL,
supported_features && !cJSON_IsNull(supported_features) ? ogs_strdup(supported_features->valuestring) : NULL,
allowed_mtc_provider ? allowed_mtc_providerList : NULL
allowed_mtc_provider ? allowed_mtc_providerList : NULL,
iwk_epc_restricted ? true : false,
iwk_epc_restricted ? iwk_epc_restricted->valueint : 0,
imsi && !cJSON_IsNull(imsi) ? ogs_strdup(imsi->valuestring) : NULL,
hss_group_id && !cJSON_IsNull(hss_group_id) ? ogs_strdup(hss_group_id->valuestring) : NULL
);
return ee_profile_data_local_var;