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
|
|
@ -9,7 +9,7 @@ OpenAPI_usage_threshold_t *OpenAPI_usage_threshold_create(
|
|||
long total_volume,
|
||||
long downlink_volume,
|
||||
long uplink_volume
|
||||
)
|
||||
)
|
||||
{
|
||||
OpenAPI_usage_threshold_t *usage_threshold_local_var = OpenAPI_malloc(sizeof(OpenAPI_usage_threshold_t));
|
||||
if (!usage_threshold_local_var) {
|
||||
|
|
@ -43,31 +43,31 @@ cJSON *OpenAPI_usage_threshold_convertToJSON(OpenAPI_usage_threshold_t *usage_th
|
|||
|
||||
item = cJSON_CreateObject();
|
||||
if (usage_threshold->duration) {
|
||||
if (cJSON_AddNumberToObject(item, "duration", usage_threshold->duration) == NULL) {
|
||||
ogs_error("OpenAPI_usage_threshold_convertToJSON() failed [duration]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddNumberToObject(item, "duration", usage_threshold->duration) == NULL) {
|
||||
ogs_error("OpenAPI_usage_threshold_convertToJSON() failed [duration]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (usage_threshold->total_volume) {
|
||||
if (cJSON_AddNumberToObject(item, "totalVolume", usage_threshold->total_volume) == NULL) {
|
||||
ogs_error("OpenAPI_usage_threshold_convertToJSON() failed [total_volume]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddNumberToObject(item, "totalVolume", usage_threshold->total_volume) == NULL) {
|
||||
ogs_error("OpenAPI_usage_threshold_convertToJSON() failed [total_volume]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (usage_threshold->downlink_volume) {
|
||||
if (cJSON_AddNumberToObject(item, "downlinkVolume", usage_threshold->downlink_volume) == NULL) {
|
||||
ogs_error("OpenAPI_usage_threshold_convertToJSON() failed [downlink_volume]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddNumberToObject(item, "downlinkVolume", usage_threshold->downlink_volume) == NULL) {
|
||||
ogs_error("OpenAPI_usage_threshold_convertToJSON() failed [downlink_volume]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (usage_threshold->uplink_volume) {
|
||||
if (cJSON_AddNumberToObject(item, "uplinkVolume", usage_threshold->uplink_volume) == NULL) {
|
||||
ogs_error("OpenAPI_usage_threshold_convertToJSON() failed [uplink_volume]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddNumberToObject(item, "uplinkVolume", usage_threshold->uplink_volume) == NULL) {
|
||||
ogs_error("OpenAPI_usage_threshold_convertToJSON() failed [uplink_volume]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -79,46 +79,46 @@ OpenAPI_usage_threshold_t *OpenAPI_usage_threshold_parseFromJSON(cJSON *usage_th
|
|||
OpenAPI_usage_threshold_t *usage_threshold_local_var = NULL;
|
||||
cJSON *duration = cJSON_GetObjectItemCaseSensitive(usage_thresholdJSON, "duration");
|
||||
|
||||
if (duration) {
|
||||
if (!cJSON_IsNumber(duration)) {
|
||||
ogs_error("OpenAPI_usage_threshold_parseFromJSON() failed [duration]");
|
||||
goto end;
|
||||
}
|
||||
if (duration) {
|
||||
if (!cJSON_IsNumber(duration)) {
|
||||
ogs_error("OpenAPI_usage_threshold_parseFromJSON() failed [duration]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *total_volume = cJSON_GetObjectItemCaseSensitive(usage_thresholdJSON, "totalVolume");
|
||||
|
||||
if (total_volume) {
|
||||
if (!cJSON_IsNumber(total_volume)) {
|
||||
ogs_error("OpenAPI_usage_threshold_parseFromJSON() failed [total_volume]");
|
||||
goto end;
|
||||
}
|
||||
if (total_volume) {
|
||||
if (!cJSON_IsNumber(total_volume)) {
|
||||
ogs_error("OpenAPI_usage_threshold_parseFromJSON() failed [total_volume]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *downlink_volume = cJSON_GetObjectItemCaseSensitive(usage_thresholdJSON, "downlinkVolume");
|
||||
|
||||
if (downlink_volume) {
|
||||
if (!cJSON_IsNumber(downlink_volume)) {
|
||||
ogs_error("OpenAPI_usage_threshold_parseFromJSON() failed [downlink_volume]");
|
||||
goto end;
|
||||
}
|
||||
if (downlink_volume) {
|
||||
if (!cJSON_IsNumber(downlink_volume)) {
|
||||
ogs_error("OpenAPI_usage_threshold_parseFromJSON() failed [downlink_volume]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *uplink_volume = cJSON_GetObjectItemCaseSensitive(usage_thresholdJSON, "uplinkVolume");
|
||||
|
||||
if (uplink_volume) {
|
||||
if (!cJSON_IsNumber(uplink_volume)) {
|
||||
ogs_error("OpenAPI_usage_threshold_parseFromJSON() failed [uplink_volume]");
|
||||
goto end;
|
||||
}
|
||||
if (uplink_volume) {
|
||||
if (!cJSON_IsNumber(uplink_volume)) {
|
||||
ogs_error("OpenAPI_usage_threshold_parseFromJSON() failed [uplink_volume]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
usage_threshold_local_var = OpenAPI_usage_threshold_create (
|
||||
duration ? duration->valuedouble : 0,
|
||||
total_volume ? total_volume->valuedouble : 0,
|
||||
downlink_volume ? downlink_volume->valuedouble : 0,
|
||||
uplink_volume ? uplink_volume->valuedouble : 0
|
||||
);
|
||||
);
|
||||
|
||||
return usage_threshold_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue