mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-02 05:10:10 +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
|
|
@ -17,7 +17,7 @@ OpenAPI_charging_data_t *OpenAPI_charging_data_create(
|
|||
char *app_svc_prov_id,
|
||||
int af_charging_identifier,
|
||||
char *af_charg_id
|
||||
)
|
||||
)
|
||||
{
|
||||
OpenAPI_charging_data_t *charging_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_charging_data_t));
|
||||
if (!charging_data_local_var) {
|
||||
|
|
@ -68,80 +68,80 @@ cJSON *OpenAPI_charging_data_convertToJSON(OpenAPI_charging_data_t *charging_dat
|
|||
}
|
||||
|
||||
if (charging_data->metering_method) {
|
||||
if (cJSON_AddStringToObject(item, "meteringMethod", OpenAPI_metering_method_ToString(charging_data->metering_method)) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [metering_method]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "meteringMethod", OpenAPI_metering_method_ToString(charging_data->metering_method)) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [metering_method]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (charging_data->offline) {
|
||||
if (cJSON_AddBoolToObject(item, "offline", charging_data->offline) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [offline]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddBoolToObject(item, "offline", charging_data->offline) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [offline]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (charging_data->online) {
|
||||
if (cJSON_AddBoolToObject(item, "online", charging_data->online) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [online]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddBoolToObject(item, "online", charging_data->online) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [online]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (charging_data->sdf_handl) {
|
||||
if (cJSON_AddBoolToObject(item, "sdfHandl", charging_data->sdf_handl) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [sdf_handl]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddBoolToObject(item, "sdfHandl", charging_data->sdf_handl) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [sdf_handl]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (charging_data->rating_group) {
|
||||
if (cJSON_AddNumberToObject(item, "ratingGroup", charging_data->rating_group) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [rating_group]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddNumberToObject(item, "ratingGroup", charging_data->rating_group) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [rating_group]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (charging_data->reporting_level) {
|
||||
if (cJSON_AddStringToObject(item, "reportingLevel", OpenAPI_reporting_level_ToString(charging_data->reporting_level)) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [reporting_level]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "reportingLevel", OpenAPI_reporting_level_ToString(charging_data->reporting_level)) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [reporting_level]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (charging_data->service_id) {
|
||||
if (cJSON_AddNumberToObject(item, "serviceId", charging_data->service_id) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [service_id]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddNumberToObject(item, "serviceId", charging_data->service_id) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [service_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (charging_data->sponsor_id) {
|
||||
if (cJSON_AddStringToObject(item, "sponsorId", charging_data->sponsor_id) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [sponsor_id]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "sponsorId", charging_data->sponsor_id) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [sponsor_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (charging_data->app_svc_prov_id) {
|
||||
if (cJSON_AddStringToObject(item, "appSvcProvId", charging_data->app_svc_prov_id) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [app_svc_prov_id]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "appSvcProvId", charging_data->app_svc_prov_id) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [app_svc_prov_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (charging_data->af_charging_identifier) {
|
||||
if (cJSON_AddNumberToObject(item, "afChargingIdentifier", charging_data->af_charging_identifier) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [af_charging_identifier]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddNumberToObject(item, "afChargingIdentifier", charging_data->af_charging_identifier) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [af_charging_identifier]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (charging_data->af_charg_id) {
|
||||
if (cJSON_AddStringToObject(item, "afChargId", charging_data->af_charg_id) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [af_charg_id]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "afChargId", charging_data->af_charg_id) == NULL) {
|
||||
ogs_error("OpenAPI_charging_data_convertToJSON() failed [af_charg_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -157,7 +157,7 @@ OpenAPI_charging_data_t *OpenAPI_charging_data_parseFromJSON(cJSON *charging_dat
|
|||
goto end;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!cJSON_IsString(chg_id)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [chg_id]");
|
||||
goto end;
|
||||
|
|
@ -166,105 +166,105 @@ OpenAPI_charging_data_t *OpenAPI_charging_data_parseFromJSON(cJSON *charging_dat
|
|||
cJSON *metering_method = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "meteringMethod");
|
||||
|
||||
OpenAPI_metering_method_e metering_methodVariable;
|
||||
if (metering_method) {
|
||||
if (!cJSON_IsString(metering_method)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [metering_method]");
|
||||
goto end;
|
||||
}
|
||||
metering_methodVariable = OpenAPI_metering_method_FromString(metering_method->valuestring);
|
||||
if (metering_method) {
|
||||
if (!cJSON_IsString(metering_method)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [metering_method]");
|
||||
goto end;
|
||||
}
|
||||
metering_methodVariable = OpenAPI_metering_method_FromString(metering_method->valuestring);
|
||||
}
|
||||
|
||||
cJSON *offline = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "offline");
|
||||
|
||||
if (offline) {
|
||||
if (!cJSON_IsBool(offline)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [offline]");
|
||||
goto end;
|
||||
}
|
||||
if (offline) {
|
||||
if (!cJSON_IsBool(offline)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [offline]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *online = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "online");
|
||||
|
||||
if (online) {
|
||||
if (!cJSON_IsBool(online)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [online]");
|
||||
goto end;
|
||||
}
|
||||
if (online) {
|
||||
if (!cJSON_IsBool(online)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [online]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *sdf_handl = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "sdfHandl");
|
||||
|
||||
if (sdf_handl) {
|
||||
if (!cJSON_IsBool(sdf_handl)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [sdf_handl]");
|
||||
goto end;
|
||||
}
|
||||
if (sdf_handl) {
|
||||
if (!cJSON_IsBool(sdf_handl)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [sdf_handl]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *rating_group = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "ratingGroup");
|
||||
|
||||
if (rating_group) {
|
||||
if (!cJSON_IsNumber(rating_group)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [rating_group]");
|
||||
goto end;
|
||||
}
|
||||
if (rating_group) {
|
||||
if (!cJSON_IsNumber(rating_group)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [rating_group]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *reporting_level = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "reportingLevel");
|
||||
|
||||
OpenAPI_reporting_level_e reporting_levelVariable;
|
||||
if (reporting_level) {
|
||||
if (!cJSON_IsString(reporting_level)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [reporting_level]");
|
||||
goto end;
|
||||
}
|
||||
reporting_levelVariable = OpenAPI_reporting_level_FromString(reporting_level->valuestring);
|
||||
if (reporting_level) {
|
||||
if (!cJSON_IsString(reporting_level)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [reporting_level]");
|
||||
goto end;
|
||||
}
|
||||
reporting_levelVariable = OpenAPI_reporting_level_FromString(reporting_level->valuestring);
|
||||
}
|
||||
|
||||
cJSON *service_id = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "serviceId");
|
||||
|
||||
if (service_id) {
|
||||
if (!cJSON_IsNumber(service_id)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [service_id]");
|
||||
goto end;
|
||||
}
|
||||
if (service_id) {
|
||||
if (!cJSON_IsNumber(service_id)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [service_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *sponsor_id = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "sponsorId");
|
||||
|
||||
if (sponsor_id) {
|
||||
if (!cJSON_IsString(sponsor_id)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [sponsor_id]");
|
||||
goto end;
|
||||
}
|
||||
if (sponsor_id) {
|
||||
if (!cJSON_IsString(sponsor_id)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [sponsor_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *app_svc_prov_id = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "appSvcProvId");
|
||||
|
||||
if (app_svc_prov_id) {
|
||||
if (!cJSON_IsString(app_svc_prov_id)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [app_svc_prov_id]");
|
||||
goto end;
|
||||
}
|
||||
if (app_svc_prov_id) {
|
||||
if (!cJSON_IsString(app_svc_prov_id)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [app_svc_prov_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *af_charging_identifier = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "afChargingIdentifier");
|
||||
|
||||
if (af_charging_identifier) {
|
||||
if (!cJSON_IsNumber(af_charging_identifier)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [af_charging_identifier]");
|
||||
goto end;
|
||||
}
|
||||
if (af_charging_identifier) {
|
||||
if (!cJSON_IsNumber(af_charging_identifier)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [af_charging_identifier]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *af_charg_id = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "afChargId");
|
||||
|
||||
if (af_charg_id) {
|
||||
if (!cJSON_IsString(af_charg_id)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [af_charg_id]");
|
||||
goto end;
|
||||
}
|
||||
if (af_charg_id) {
|
||||
if (!cJSON_IsString(af_charg_id)) {
|
||||
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [af_charg_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
charging_data_local_var = OpenAPI_charging_data_create (
|
||||
ogs_strdup_or_assert(chg_id->valuestring),
|
||||
|
|
@ -279,7 +279,7 @@ OpenAPI_charging_data_t *OpenAPI_charging_data_parseFromJSON(cJSON *charging_dat
|
|||
app_svc_prov_id ? ogs_strdup_or_assert(app_svc_prov_id->valuestring) : NULL,
|
||||
af_charging_identifier ? af_charging_identifier->valuedouble : 0,
|
||||
af_charg_id ? ogs_strdup_or_assert(af_charg_id->valuestring) : NULL
|
||||
);
|
||||
);
|
||||
|
||||
return charging_data_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue