mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-02 13:20: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
|
|
@ -11,8 +11,9 @@ OpenAPI_iptv_config_data_t *OpenAPI_iptv_config_data_create(
|
|||
OpenAPI_snssai_t *snssai,
|
||||
char *af_app_id,
|
||||
OpenAPI_list_t* multi_acc_ctrls,
|
||||
char *supp_feat
|
||||
)
|
||||
char *supp_feat,
|
||||
char *res_uri
|
||||
)
|
||||
{
|
||||
OpenAPI_iptv_config_data_t *iptv_config_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_iptv_config_data_t));
|
||||
if (!iptv_config_data_local_var) {
|
||||
|
|
@ -25,6 +26,7 @@ OpenAPI_iptv_config_data_t *OpenAPI_iptv_config_data_create(
|
|||
iptv_config_data_local_var->af_app_id = af_app_id;
|
||||
iptv_config_data_local_var->multi_acc_ctrls = multi_acc_ctrls;
|
||||
iptv_config_data_local_var->supp_feat = supp_feat;
|
||||
iptv_config_data_local_var->res_uri = res_uri;
|
||||
|
||||
return iptv_config_data_local_var;
|
||||
}
|
||||
|
|
@ -47,6 +49,7 @@ void OpenAPI_iptv_config_data_free(OpenAPI_iptv_config_data_t *iptv_config_data)
|
|||
}
|
||||
OpenAPI_list_free(iptv_config_data->multi_acc_ctrls);
|
||||
ogs_free(iptv_config_data->supp_feat);
|
||||
ogs_free(iptv_config_data->res_uri);
|
||||
ogs_free(iptv_config_data);
|
||||
}
|
||||
|
||||
|
|
@ -61,37 +64,37 @@ cJSON *OpenAPI_iptv_config_data_convertToJSON(OpenAPI_iptv_config_data_t *iptv_c
|
|||
|
||||
item = cJSON_CreateObject();
|
||||
if (iptv_config_data->supi) {
|
||||
if (cJSON_AddStringToObject(item, "supi", iptv_config_data->supi) == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [supi]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "supi", iptv_config_data->supi) == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [supi]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (iptv_config_data->inter_group_id) {
|
||||
if (cJSON_AddStringToObject(item, "interGroupId", iptv_config_data->inter_group_id) == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [inter_group_id]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "interGroupId", iptv_config_data->inter_group_id) == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [inter_group_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (iptv_config_data->dnn) {
|
||||
if (cJSON_AddStringToObject(item, "dnn", iptv_config_data->dnn) == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [dnn]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "dnn", iptv_config_data->dnn) == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [dnn]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (iptv_config_data->snssai) {
|
||||
cJSON *snssai_local_JSON = OpenAPI_snssai_convertToJSON(iptv_config_data->snssai);
|
||||
if (snssai_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [snssai]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "snssai", snssai_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [snssai]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *snssai_local_JSON = OpenAPI_snssai_convertToJSON(iptv_config_data->snssai);
|
||||
if (snssai_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [snssai]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "snssai", snssai_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [snssai]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (cJSON_AddStringToObject(item, "afAppId", iptv_config_data->af_app_id) == NULL) {
|
||||
|
|
@ -109,19 +112,28 @@ cJSON *OpenAPI_iptv_config_data_convertToJSON(OpenAPI_iptv_config_data_t *iptv_c
|
|||
if (iptv_config_data->multi_acc_ctrls) {
|
||||
OpenAPI_list_for_each(iptv_config_data->multi_acc_ctrls, multi_acc_ctrls_node) {
|
||||
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)multi_acc_ctrls_node->data;
|
||||
cJSON *itemLocal = OpenAPI_multicast_access_control_convertToJSON(localKeyValue->value);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [multi_acc_ctrls]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(multi_acc_ctrls, localKeyValue->key, itemLocal);
|
||||
cJSON *itemLocal = OpenAPI_multicast_access_control_convertToJSON(localKeyValue->value);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [multi_acc_ctrls]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(multi_acc_ctrls, localKeyValue->key, itemLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (iptv_config_data->supp_feat) {
|
||||
if (cJSON_AddStringToObject(item, "suppFeat", iptv_config_data->supp_feat) == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [supp_feat]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (iptv_config_data->res_uri) {
|
||||
if (cJSON_AddStringToObject(item, "resUri", iptv_config_data->res_uri) == NULL) {
|
||||
ogs_error("OpenAPI_iptv_config_data_convertToJSON() failed [res_uri]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
return item;
|
||||
|
|
@ -132,37 +144,37 @@ OpenAPI_iptv_config_data_t *OpenAPI_iptv_config_data_parseFromJSON(cJSON *iptv_c
|
|||
OpenAPI_iptv_config_data_t *iptv_config_data_local_var = NULL;
|
||||
cJSON *supi = cJSON_GetObjectItemCaseSensitive(iptv_config_dataJSON, "supi");
|
||||
|
||||
if (supi) {
|
||||
if (!cJSON_IsString(supi)) {
|
||||
ogs_error("OpenAPI_iptv_config_data_parseFromJSON() failed [supi]");
|
||||
goto end;
|
||||
}
|
||||
if (supi) {
|
||||
if (!cJSON_IsString(supi)) {
|
||||
ogs_error("OpenAPI_iptv_config_data_parseFromJSON() failed [supi]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *inter_group_id = cJSON_GetObjectItemCaseSensitive(iptv_config_dataJSON, "interGroupId");
|
||||
|
||||
if (inter_group_id) {
|
||||
if (!cJSON_IsString(inter_group_id)) {
|
||||
ogs_error("OpenAPI_iptv_config_data_parseFromJSON() failed [inter_group_id]");
|
||||
goto end;
|
||||
}
|
||||
if (inter_group_id) {
|
||||
if (!cJSON_IsString(inter_group_id)) {
|
||||
ogs_error("OpenAPI_iptv_config_data_parseFromJSON() failed [inter_group_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *dnn = cJSON_GetObjectItemCaseSensitive(iptv_config_dataJSON, "dnn");
|
||||
|
||||
if (dnn) {
|
||||
if (!cJSON_IsString(dnn)) {
|
||||
ogs_error("OpenAPI_iptv_config_data_parseFromJSON() failed [dnn]");
|
||||
goto end;
|
||||
}
|
||||
if (dnn) {
|
||||
if (!cJSON_IsString(dnn)) {
|
||||
ogs_error("OpenAPI_iptv_config_data_parseFromJSON() failed [dnn]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *snssai = cJSON_GetObjectItemCaseSensitive(iptv_config_dataJSON, "snssai");
|
||||
|
||||
OpenAPI_snssai_t *snssai_local_nonprim = NULL;
|
||||
if (snssai) {
|
||||
snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai);
|
||||
}
|
||||
if (snssai) {
|
||||
snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai);
|
||||
}
|
||||
|
||||
cJSON *af_app_id = cJSON_GetObjectItemCaseSensitive(iptv_config_dataJSON, "afAppId");
|
||||
if (!af_app_id) {
|
||||
|
|
@ -170,7 +182,7 @@ OpenAPI_iptv_config_data_t *OpenAPI_iptv_config_data_parseFromJSON(cJSON *iptv_c
|
|||
goto end;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!cJSON_IsString(af_app_id)) {
|
||||
ogs_error("OpenAPI_iptv_config_data_parseFromJSON() failed [af_app_id]");
|
||||
goto end;
|
||||
|
|
@ -183,7 +195,7 @@ OpenAPI_iptv_config_data_t *OpenAPI_iptv_config_data_parseFromJSON(cJSON *iptv_c
|
|||
}
|
||||
|
||||
OpenAPI_list_t *multi_acc_ctrlsList;
|
||||
|
||||
|
||||
cJSON *multi_acc_ctrls_local_map;
|
||||
if (!cJSON_IsObject(multi_acc_ctrls)) {
|
||||
ogs_error("OpenAPI_iptv_config_data_parseFromJSON() failed [multi_acc_ctrls]");
|
||||
|
|
@ -199,20 +211,26 @@ OpenAPI_iptv_config_data_t *OpenAPI_iptv_config_data_parseFromJSON(cJSON *iptv_c
|
|||
}
|
||||
localMapKeyPair = OpenAPI_map_create(
|
||||
localMapObject->string, OpenAPI_multicast_access_control_parseFromJSON(localMapObject));
|
||||
OpenAPI_list_add(multi_acc_ctrlsList, localMapKeyPair);
|
||||
OpenAPI_list_add(multi_acc_ctrlsList , localMapKeyPair);
|
||||
}
|
||||
|
||||
cJSON *supp_feat = cJSON_GetObjectItemCaseSensitive(iptv_config_dataJSON, "suppFeat");
|
||||
if (!supp_feat) {
|
||||
ogs_error("OpenAPI_iptv_config_data_parseFromJSON() failed [supp_feat]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
||||
if (supp_feat) {
|
||||
if (!cJSON_IsString(supp_feat)) {
|
||||
ogs_error("OpenAPI_iptv_config_data_parseFromJSON() failed [supp_feat]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *res_uri = cJSON_GetObjectItemCaseSensitive(iptv_config_dataJSON, "resUri");
|
||||
|
||||
if (res_uri) {
|
||||
if (!cJSON_IsString(res_uri)) {
|
||||
ogs_error("OpenAPI_iptv_config_data_parseFromJSON() failed [res_uri]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
iptv_config_data_local_var = OpenAPI_iptv_config_data_create (
|
||||
supi ? ogs_strdup_or_assert(supi->valuestring) : NULL,
|
||||
|
|
@ -221,8 +239,9 @@ OpenAPI_iptv_config_data_t *OpenAPI_iptv_config_data_parseFromJSON(cJSON *iptv_c
|
|||
snssai ? snssai_local_nonprim : NULL,
|
||||
ogs_strdup_or_assert(af_app_id->valuestring),
|
||||
multi_acc_ctrlsList,
|
||||
ogs_strdup_or_assert(supp_feat->valuestring)
|
||||
);
|
||||
supp_feat ? ogs_strdup_or_assert(supp_feat->valuestring) : NULL,
|
||||
res_uri ? ogs_strdup_or_assert(res_uri->valuestring) : NULL
|
||||
);
|
||||
|
||||
return iptv_config_data_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue