SBI updated

- openapi-generator version 5.2.0
- add priority/capacity/load in NFProfile/NFService
- add AllowedNfTypes in NFProfile/NFService
This commit is contained in:
Sukchan Lee 2021-07-16 17:02:33 +09:00
parent 1326fc85dc
commit 039b9d0aaa
930 changed files with 7387 additions and 5434 deletions

View file

@ -5,9 +5,13 @@
#include "accumulated_usage.h"
OpenAPI_accumulated_usage_t *OpenAPI_accumulated_usage_create(
bool is_duration,
int duration,
bool is_total_volume,
long total_volume,
bool is_downlink_volume,
long downlink_volume,
bool is_uplink_volume,
long uplink_volume
)
{
@ -15,9 +19,13 @@ OpenAPI_accumulated_usage_t *OpenAPI_accumulated_usage_create(
if (!accumulated_usage_local_var) {
return NULL;
}
accumulated_usage_local_var->is_duration = is_duration;
accumulated_usage_local_var->duration = duration;
accumulated_usage_local_var->is_total_volume = is_total_volume;
accumulated_usage_local_var->total_volume = total_volume;
accumulated_usage_local_var->is_downlink_volume = is_downlink_volume;
accumulated_usage_local_var->downlink_volume = downlink_volume;
accumulated_usage_local_var->is_uplink_volume = is_uplink_volume;
accumulated_usage_local_var->uplink_volume = uplink_volume;
return accumulated_usage_local_var;
@ -42,28 +50,28 @@ cJSON *OpenAPI_accumulated_usage_convertToJSON(OpenAPI_accumulated_usage_t *accu
}
item = cJSON_CreateObject();
if (accumulated_usage->duration) {
if (accumulated_usage->is_duration) {
if (cJSON_AddNumberToObject(item, "duration", accumulated_usage->duration) == NULL) {
ogs_error("OpenAPI_accumulated_usage_convertToJSON() failed [duration]");
goto end;
}
}
if (accumulated_usage->total_volume) {
if (accumulated_usage->is_total_volume) {
if (cJSON_AddNumberToObject(item, "totalVolume", accumulated_usage->total_volume) == NULL) {
ogs_error("OpenAPI_accumulated_usage_convertToJSON() failed [total_volume]");
goto end;
}
}
if (accumulated_usage->downlink_volume) {
if (accumulated_usage->is_downlink_volume) {
if (cJSON_AddNumberToObject(item, "downlinkVolume", accumulated_usage->downlink_volume) == NULL) {
ogs_error("OpenAPI_accumulated_usage_convertToJSON() failed [downlink_volume]");
goto end;
}
}
if (accumulated_usage->uplink_volume) {
if (accumulated_usage->is_uplink_volume) {
if (cJSON_AddNumberToObject(item, "uplinkVolume", accumulated_usage->uplink_volume) == NULL) {
ogs_error("OpenAPI_accumulated_usage_convertToJSON() failed [uplink_volume]");
goto end;
@ -79,7 +87,7 @@ OpenAPI_accumulated_usage_t *OpenAPI_accumulated_usage_parseFromJSON(cJSON *accu
OpenAPI_accumulated_usage_t *accumulated_usage_local_var = NULL;
cJSON *duration = cJSON_GetObjectItemCaseSensitive(accumulated_usageJSON, "duration");
if (duration) {
if (duration) {
if (!cJSON_IsNumber(duration)) {
ogs_error("OpenAPI_accumulated_usage_parseFromJSON() failed [duration]");
goto end;
@ -88,7 +96,7 @@ OpenAPI_accumulated_usage_t *OpenAPI_accumulated_usage_parseFromJSON(cJSON *accu
cJSON *total_volume = cJSON_GetObjectItemCaseSensitive(accumulated_usageJSON, "totalVolume");
if (total_volume) {
if (total_volume) {
if (!cJSON_IsNumber(total_volume)) {
ogs_error("OpenAPI_accumulated_usage_parseFromJSON() failed [total_volume]");
goto end;
@ -97,7 +105,7 @@ OpenAPI_accumulated_usage_t *OpenAPI_accumulated_usage_parseFromJSON(cJSON *accu
cJSON *downlink_volume = cJSON_GetObjectItemCaseSensitive(accumulated_usageJSON, "downlinkVolume");
if (downlink_volume) {
if (downlink_volume) {
if (!cJSON_IsNumber(downlink_volume)) {
ogs_error("OpenAPI_accumulated_usage_parseFromJSON() failed [downlink_volume]");
goto end;
@ -106,7 +114,7 @@ OpenAPI_accumulated_usage_t *OpenAPI_accumulated_usage_parseFromJSON(cJSON *accu
cJSON *uplink_volume = cJSON_GetObjectItemCaseSensitive(accumulated_usageJSON, "uplinkVolume");
if (uplink_volume) {
if (uplink_volume) {
if (!cJSON_IsNumber(uplink_volume)) {
ogs_error("OpenAPI_accumulated_usage_parseFromJSON() failed [uplink_volume]");
goto end;
@ -114,9 +122,13 @@ OpenAPI_accumulated_usage_t *OpenAPI_accumulated_usage_parseFromJSON(cJSON *accu
}
accumulated_usage_local_var = OpenAPI_accumulated_usage_create (
duration ? true : false,
duration ? duration->valuedouble : 0,
total_volume ? true : false,
total_volume ? total_volume->valuedouble : 0,
downlink_volume ? true : false,
downlink_volume ? downlink_volume->valuedouble : 0,
uplink_volume ? true : false,
uplink_volume ? uplink_volume->valuedouble : 0
);