Upgrade SBI(Service-based Interface)

* OpenAPI Generator version: 4.3.1 ==> 5.5.1
* Specification : r16.8.0 (20210629)
This commit is contained in:
Sukchan Lee 2021-07-07 17:32:55 +09:00
parent 2aaa8200c2
commit f278d58a69
1914 changed files with 91329 additions and 57361 deletions

View file

@ -12,8 +12,10 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_create(
OpenAPI_trace_data_t *trace_data,
char *udm_group_id,
char *routing_indicator,
char *cag_id
)
OpenAPI_list_t *cell_cag_info,
int n5gc_ind,
char *supported_features
)
{
OpenAPI_authentication_info_t *authentication_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_authentication_info_t));
if (!authentication_info_local_var) {
@ -26,7 +28,9 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_create(
authentication_info_local_var->trace_data = trace_data;
authentication_info_local_var->udm_group_id = udm_group_id;
authentication_info_local_var->routing_indicator = routing_indicator;
authentication_info_local_var->cag_id = cag_id;
authentication_info_local_var->cell_cag_info = cell_cag_info;
authentication_info_local_var->n5gc_ind = n5gc_ind;
authentication_info_local_var->supported_features = supported_features;
return authentication_info_local_var;
}
@ -44,7 +48,11 @@ void OpenAPI_authentication_info_free(OpenAPI_authentication_info_t *authenticat
OpenAPI_trace_data_free(authentication_info->trace_data);
ogs_free(authentication_info->udm_group_id);
ogs_free(authentication_info->routing_indicator);
ogs_free(authentication_info->cag_id);
OpenAPI_list_for_each(authentication_info->cell_cag_info, node) {
ogs_free(node->data);
}
OpenAPI_list_free(authentication_info->cell_cag_info);
ogs_free(authentication_info->supported_features);
ogs_free(authentication_info);
}
@ -69,57 +77,80 @@ cJSON *OpenAPI_authentication_info_convertToJSON(OpenAPI_authentication_info_t *
}
if (authentication_info->resynchronization_info) {
cJSON *resynchronization_info_local_JSON = OpenAPI_resynchronization_info_convertToJSON(authentication_info->resynchronization_info);
if (resynchronization_info_local_JSON == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [resynchronization_info]");
goto end;
}
cJSON_AddItemToObject(item, "resynchronizationInfo", resynchronization_info_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [resynchronization_info]");
goto end;
}
cJSON *resynchronization_info_local_JSON = OpenAPI_resynchronization_info_convertToJSON(authentication_info->resynchronization_info);
if (resynchronization_info_local_JSON == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [resynchronization_info]");
goto end;
}
cJSON_AddItemToObject(item, "resynchronizationInfo", resynchronization_info_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [resynchronization_info]");
goto end;
}
}
if (authentication_info->pei) {
if (cJSON_AddStringToObject(item, "pei", authentication_info->pei) == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [pei]");
goto end;
}
if (cJSON_AddStringToObject(item, "pei", authentication_info->pei) == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [pei]");
goto end;
}
}
if (authentication_info->trace_data) {
cJSON *trace_data_local_JSON = OpenAPI_trace_data_convertToJSON(authentication_info->trace_data);
if (trace_data_local_JSON == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [trace_data]");
goto end;
}
cJSON_AddItemToObject(item, "traceData", trace_data_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [trace_data]");
goto end;
}
cJSON *trace_data_local_JSON = OpenAPI_trace_data_convertToJSON(authentication_info->trace_data);
if (trace_data_local_JSON == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [trace_data]");
goto end;
}
cJSON_AddItemToObject(item, "traceData", trace_data_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [trace_data]");
goto end;
}
}
if (authentication_info->udm_group_id) {
if (cJSON_AddStringToObject(item, "udmGroupId", authentication_info->udm_group_id) == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [udm_group_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "udmGroupId", authentication_info->udm_group_id) == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [udm_group_id]");
goto end;
}
}
if (authentication_info->routing_indicator) {
if (cJSON_AddStringToObject(item, "routingIndicator", authentication_info->routing_indicator) == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [routing_indicator]");
goto end;
}
if (cJSON_AddStringToObject(item, "routingIndicator", authentication_info->routing_indicator) == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [routing_indicator]");
goto end;
}
}
if (authentication_info->cag_id) {
if (cJSON_AddStringToObject(item, "cagId", authentication_info->cag_id) == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [cag_id]");
goto end;
}
if (authentication_info->cell_cag_info) {
cJSON *cell_cag_info = cJSON_AddArrayToObject(item, "cellCagInfo");
if (cell_cag_info == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [cell_cag_info]");
goto end;
}
OpenAPI_lnode_t *cell_cag_info_node;
OpenAPI_list_for_each(authentication_info->cell_cag_info, cell_cag_info_node) {
if (cJSON_AddStringToObject(cell_cag_info, "", (char*)cell_cag_info_node->data) == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [cell_cag_info]");
goto end;
}
}
}
if (authentication_info->n5gc_ind) {
if (cJSON_AddBoolToObject(item, "n5gcInd", authentication_info->n5gc_ind) == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [n5gc_ind]");
goto end;
}
}
if (authentication_info->supported_features) {
if (cJSON_AddStringToObject(item, "supportedFeatures", authentication_info->supported_features) == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [supported_features]");
goto end;
}
}
end:
@ -135,7 +166,7 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_parseFromJSON(cJSON *
goto end;
}
if (!cJSON_IsString(supi_or_suci)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [supi_or_suci]");
goto end;
@ -147,7 +178,7 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_parseFromJSON(cJSON *
goto end;
}
if (!cJSON_IsString(serving_network_name)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [serving_network_name]");
goto end;
@ -156,52 +187,81 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_parseFromJSON(cJSON *
cJSON *resynchronization_info = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "resynchronizationInfo");
OpenAPI_resynchronization_info_t *resynchronization_info_local_nonprim = NULL;
if (resynchronization_info) {
resynchronization_info_local_nonprim = OpenAPI_resynchronization_info_parseFromJSON(resynchronization_info);
}
if (resynchronization_info) {
resynchronization_info_local_nonprim = OpenAPI_resynchronization_info_parseFromJSON(resynchronization_info);
}
cJSON *pei = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "pei");
if (pei) {
if (!cJSON_IsString(pei)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [pei]");
goto end;
}
if (pei) {
if (!cJSON_IsString(pei)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [pei]");
goto end;
}
}
cJSON *trace_data = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "traceData");
OpenAPI_trace_data_t *trace_data_local_nonprim = NULL;
if (trace_data) {
trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data);
}
if (trace_data) {
trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data);
}
cJSON *udm_group_id = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "udmGroupId");
if (udm_group_id) {
if (!cJSON_IsString(udm_group_id)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [udm_group_id]");
goto end;
}
if (udm_group_id) {
if (!cJSON_IsString(udm_group_id)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [udm_group_id]");
goto end;
}
}
cJSON *routing_indicator = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "routingIndicator");
if (routing_indicator) {
if (!cJSON_IsString(routing_indicator)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [routing_indicator]");
goto end;
}
if (routing_indicator) {
if (!cJSON_IsString(routing_indicator)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [routing_indicator]");
goto end;
}
}
cJSON *cag_id = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "cagId");
cJSON *cell_cag_info = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "cellCagInfo");
if (cag_id) {
if (!cJSON_IsString(cag_id)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [cag_id]");
goto end;
}
OpenAPI_list_t *cell_cag_infoList;
if (cell_cag_info) {
cJSON *cell_cag_info_local;
if (!cJSON_IsArray(cell_cag_info)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [cell_cag_info]");
goto end;
}
cell_cag_infoList = OpenAPI_list_create();
cJSON_ArrayForEach(cell_cag_info_local, cell_cag_info) {
if (!cJSON_IsString(cell_cag_info_local)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [cell_cag_info]");
goto end;
}
OpenAPI_list_add(cell_cag_infoList , ogs_strdup_or_assert(cell_cag_info_local->valuestring));
}
}
cJSON *n5gc_ind = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "n5gcInd");
if (n5gc_ind) {
if (!cJSON_IsBool(n5gc_ind)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [n5gc_ind]");
goto end;
}
}
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "supportedFeatures");
if (supported_features) {
if (!cJSON_IsString(supported_features)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [supported_features]");
goto end;
}
}
authentication_info_local_var = OpenAPI_authentication_info_create (
ogs_strdup_or_assert(supi_or_suci->valuestring),
@ -211,8 +271,10 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_parseFromJSON(cJSON *
trace_data ? trace_data_local_nonprim : NULL,
udm_group_id ? ogs_strdup_or_assert(udm_group_id->valuestring) : NULL,
routing_indicator ? ogs_strdup_or_assert(routing_indicator->valuestring) : NULL,
cag_id ? ogs_strdup_or_assert(cag_id->valuestring) : NULL
);
cell_cag_info ? cell_cag_infoList : NULL,
n5gc_ind ? n5gc_ind->valueint : 0,
supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL
);
return authentication_info_local_var;
end: