[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

@ -5,13 +5,15 @@
#include "nf_service_set_cond.h"
OpenAPI_nf_service_set_cond_t *OpenAPI_nf_service_set_cond_create(
char *nf_service_set_id
char *nf_service_set_id,
char *nf_set_id
)
{
OpenAPI_nf_service_set_cond_t *nf_service_set_cond_local_var = ogs_malloc(sizeof(OpenAPI_nf_service_set_cond_t));
ogs_assert(nf_service_set_cond_local_var);
nf_service_set_cond_local_var->nf_service_set_id = nf_service_set_id;
nf_service_set_cond_local_var->nf_set_id = nf_set_id;
return nf_service_set_cond_local_var;
}
@ -27,6 +29,10 @@ void OpenAPI_nf_service_set_cond_free(OpenAPI_nf_service_set_cond_t *nf_service_
ogs_free(nf_service_set_cond->nf_service_set_id);
nf_service_set_cond->nf_service_set_id = NULL;
}
if (nf_service_set_cond->nf_set_id) {
ogs_free(nf_service_set_cond->nf_set_id);
nf_service_set_cond->nf_set_id = NULL;
}
ogs_free(nf_service_set_cond);
}
@ -50,6 +56,13 @@ cJSON *OpenAPI_nf_service_set_cond_convertToJSON(OpenAPI_nf_service_set_cond_t *
goto end;
}
if (nf_service_set_cond->nf_set_id) {
if (cJSON_AddStringToObject(item, "nfSetId", nf_service_set_cond->nf_set_id) == NULL) {
ogs_error("OpenAPI_nf_service_set_cond_convertToJSON() failed [nf_set_id]");
goto end;
}
}
end:
return item;
}
@ -59,6 +72,7 @@ OpenAPI_nf_service_set_cond_t *OpenAPI_nf_service_set_cond_parseFromJSON(cJSON *
OpenAPI_nf_service_set_cond_t *nf_service_set_cond_local_var = NULL;
OpenAPI_lnode_t *node = NULL;
cJSON *nf_service_set_id = NULL;
cJSON *nf_set_id = NULL;
nf_service_set_id = cJSON_GetObjectItemCaseSensitive(nf_service_set_condJSON, "nfServiceSetId");
if (!nf_service_set_id) {
ogs_error("OpenAPI_nf_service_set_cond_parseFromJSON() failed [nf_service_set_id]");
@ -69,8 +83,17 @@ OpenAPI_nf_service_set_cond_t *OpenAPI_nf_service_set_cond_parseFromJSON(cJSON *
goto end;
}
nf_set_id = cJSON_GetObjectItemCaseSensitive(nf_service_set_condJSON, "nfSetId");
if (nf_set_id) {
if (!cJSON_IsString(nf_set_id) && !cJSON_IsNull(nf_set_id)) {
ogs_error("OpenAPI_nf_service_set_cond_parseFromJSON() failed [nf_set_id]");
goto end;
}
}
nf_service_set_cond_local_var = OpenAPI_nf_service_set_cond_create (
ogs_strdup(nf_service_set_id->valuestring)
ogs_strdup(nf_service_set_id->valuestring),
nf_set_id && !cJSON_IsNull(nf_set_id) ? ogs_strdup(nf_set_id->valuestring) : NULL
);
return nf_service_set_cond_local_var;