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

@ -19,7 +19,7 @@ OpenAPI_sdm_subscription_t *OpenAPI_sdm_subscription_create(
OpenAPI_subscription_data_sets_t *report,
char *supported_features,
OpenAPI_context_info_t *context_info
)
)
{
OpenAPI_sdm_subscription_t *sdm_subscription_local_var = OpenAPI_malloc(sizeof(OpenAPI_sdm_subscription_t));
if (!sdm_subscription_local_var) {
@ -83,17 +83,17 @@ cJSON *OpenAPI_sdm_subscription_convertToJSON(OpenAPI_sdm_subscription_t *sdm_su
}
if (sdm_subscription->implicit_unsubscribe) {
if (cJSON_AddBoolToObject(item, "implicitUnsubscribe", sdm_subscription->implicit_unsubscribe) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [implicit_unsubscribe]");
goto end;
}
if (cJSON_AddBoolToObject(item, "implicitUnsubscribe", sdm_subscription->implicit_unsubscribe) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [implicit_unsubscribe]");
goto end;
}
}
if (sdm_subscription->expires) {
if (cJSON_AddStringToObject(item, "expires", sdm_subscription->expires) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [expires]");
goto end;
}
if (cJSON_AddStringToObject(item, "expires", sdm_subscription->expires) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [expires]");
goto end;
}
}
if (cJSON_AddStringToObject(item, "callbackReference", sdm_subscription->callback_reference) == NULL) {
@ -102,10 +102,10 @@ cJSON *OpenAPI_sdm_subscription_convertToJSON(OpenAPI_sdm_subscription_t *sdm_su
}
if (sdm_subscription->amf_service_name) {
if (cJSON_AddStringToObject(item, "amfServiceName", sdm_subscription->amf_service_name) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [amf_service_name]");
goto end;
}
if (cJSON_AddStringToObject(item, "amfServiceName", sdm_subscription->amf_service_name) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [amf_service_name]");
goto end;
}
}
cJSON *monitored_resource_uris = cJSON_AddArrayToObject(item, "monitoredResourceUris");
@ -116,90 +116,90 @@ cJSON *OpenAPI_sdm_subscription_convertToJSON(OpenAPI_sdm_subscription_t *sdm_su
OpenAPI_lnode_t *monitored_resource_uris_node;
OpenAPI_list_for_each(sdm_subscription->monitored_resource_uris, monitored_resource_uris_node) {
if (cJSON_AddStringToObject(monitored_resource_uris, "", (char*)monitored_resource_uris_node->data) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [monitored_resource_uris]");
goto end;
}
if (cJSON_AddStringToObject(monitored_resource_uris, "", (char*)monitored_resource_uris_node->data) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [monitored_resource_uris]");
goto end;
}
}
if (sdm_subscription->single_nssai) {
cJSON *single_nssai_local_JSON = OpenAPI_snssai_convertToJSON(sdm_subscription->single_nssai);
if (single_nssai_local_JSON == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [single_nssai]");
goto end;
}
cJSON_AddItemToObject(item, "singleNssai", single_nssai_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [single_nssai]");
goto end;
}
cJSON *single_nssai_local_JSON = OpenAPI_snssai_convertToJSON(sdm_subscription->single_nssai);
if (single_nssai_local_JSON == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [single_nssai]");
goto end;
}
cJSON_AddItemToObject(item, "singleNssai", single_nssai_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [single_nssai]");
goto end;
}
}
if (sdm_subscription->dnn) {
if (cJSON_AddStringToObject(item, "dnn", sdm_subscription->dnn) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [dnn]");
goto end;
}
if (cJSON_AddStringToObject(item, "dnn", sdm_subscription->dnn) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [dnn]");
goto end;
}
}
if (sdm_subscription->subscription_id) {
if (cJSON_AddStringToObject(item, "subscriptionId", sdm_subscription->subscription_id) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [subscription_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "subscriptionId", sdm_subscription->subscription_id) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [subscription_id]");
goto end;
}
}
if (sdm_subscription->plmn_id) {
cJSON *plmn_id_local_JSON = OpenAPI_plmn_id_convertToJSON(sdm_subscription->plmn_id);
if (plmn_id_local_JSON == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [plmn_id]");
goto end;
}
cJSON_AddItemToObject(item, "plmnId", plmn_id_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [plmn_id]");
goto end;
}
cJSON *plmn_id_local_JSON = OpenAPI_plmn_id_convertToJSON(sdm_subscription->plmn_id);
if (plmn_id_local_JSON == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [plmn_id]");
goto end;
}
cJSON_AddItemToObject(item, "plmnId", plmn_id_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [plmn_id]");
goto end;
}
}
if (sdm_subscription->immediate_report) {
if (cJSON_AddBoolToObject(item, "immediateReport", sdm_subscription->immediate_report) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [immediate_report]");
goto end;
}
if (cJSON_AddBoolToObject(item, "immediateReport", sdm_subscription->immediate_report) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [immediate_report]");
goto end;
}
}
if (sdm_subscription->report) {
cJSON *report_local_JSON = OpenAPI_subscription_data_sets_convertToJSON(sdm_subscription->report);
if (report_local_JSON == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [report]");
goto end;
}
cJSON_AddItemToObject(item, "report", report_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [report]");
goto end;
}
cJSON *report_local_JSON = OpenAPI_subscription_data_sets_convertToJSON(sdm_subscription->report);
if (report_local_JSON == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [report]");
goto end;
}
cJSON_AddItemToObject(item, "report", report_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [report]");
goto end;
}
}
if (sdm_subscription->supported_features) {
if (cJSON_AddStringToObject(item, "supportedFeatures", sdm_subscription->supported_features) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [supported_features]");
goto end;
}
if (cJSON_AddStringToObject(item, "supportedFeatures", sdm_subscription->supported_features) == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [supported_features]");
goto end;
}
}
if (sdm_subscription->context_info) {
cJSON *context_info_local_JSON = OpenAPI_context_info_convertToJSON(sdm_subscription->context_info);
if (context_info_local_JSON == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [context_info]");
goto end;
}
cJSON_AddItemToObject(item, "contextInfo", context_info_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [context_info]");
goto end;
}
cJSON *context_info_local_JSON = OpenAPI_context_info_convertToJSON(sdm_subscription->context_info);
if (context_info_local_JSON == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [context_info]");
goto end;
}
cJSON_AddItemToObject(item, "contextInfo", context_info_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_sdm_subscription_convertToJSON() failed [context_info]");
goto end;
}
}
end:
@ -215,7 +215,7 @@ OpenAPI_sdm_subscription_t *OpenAPI_sdm_subscription_parseFromJSON(cJSON *sdm_su
goto end;
}
if (!cJSON_IsString(nf_instance_id)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [nf_instance_id]");
goto end;
@ -223,21 +223,21 @@ OpenAPI_sdm_subscription_t *OpenAPI_sdm_subscription_parseFromJSON(cJSON *sdm_su
cJSON *implicit_unsubscribe = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "implicitUnsubscribe");
if (implicit_unsubscribe) {
if (!cJSON_IsBool(implicit_unsubscribe)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [implicit_unsubscribe]");
goto end;
}
if (implicit_unsubscribe) {
if (!cJSON_IsBool(implicit_unsubscribe)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [implicit_unsubscribe]");
goto end;
}
}
cJSON *expires = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "expires");
if (expires) {
if (!cJSON_IsString(expires)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [expires]");
goto end;
}
if (expires) {
if (!cJSON_IsString(expires)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [expires]");
goto end;
}
}
cJSON *callback_reference = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "callbackReference");
if (!callback_reference) {
@ -245,7 +245,7 @@ OpenAPI_sdm_subscription_t *OpenAPI_sdm_subscription_parseFromJSON(cJSON *sdm_su
goto end;
}
if (!cJSON_IsString(callback_reference)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [callback_reference]");
goto end;
@ -253,12 +253,12 @@ OpenAPI_sdm_subscription_t *OpenAPI_sdm_subscription_parseFromJSON(cJSON *sdm_su
cJSON *amf_service_name = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "amfServiceName");
if (amf_service_name) {
if (!cJSON_IsString(amf_service_name)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [amf_service_name]");
goto end;
}
if (amf_service_name) {
if (!cJSON_IsString(amf_service_name)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [amf_service_name]");
goto end;
}
}
cJSON *monitored_resource_uris = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "monitoredResourceUris");
if (!monitored_resource_uris) {
@ -267,7 +267,7 @@ OpenAPI_sdm_subscription_t *OpenAPI_sdm_subscription_parseFromJSON(cJSON *sdm_su
}
OpenAPI_list_t *monitored_resource_urisList;
cJSON *monitored_resource_uris_local;
if (!cJSON_IsArray(monitored_resource_uris)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [monitored_resource_uris]");
@ -276,76 +276,76 @@ OpenAPI_sdm_subscription_t *OpenAPI_sdm_subscription_parseFromJSON(cJSON *sdm_su
monitored_resource_urisList = OpenAPI_list_create();
cJSON_ArrayForEach(monitored_resource_uris_local, monitored_resource_uris) {
if (!cJSON_IsString(monitored_resource_uris_local)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [monitored_resource_uris]");
goto end;
}
OpenAPI_list_add(monitored_resource_urisList, ogs_strdup_or_assert(monitored_resource_uris_local->valuestring));
if (!cJSON_IsString(monitored_resource_uris_local)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [monitored_resource_uris]");
goto end;
}
OpenAPI_list_add(monitored_resource_urisList , ogs_strdup_or_assert(monitored_resource_uris_local->valuestring));
}
cJSON *single_nssai = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "singleNssai");
OpenAPI_snssai_t *single_nssai_local_nonprim = NULL;
if (single_nssai) {
single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai);
}
if (single_nssai) {
single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai);
}
cJSON *dnn = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "dnn");
if (dnn) {
if (!cJSON_IsString(dnn)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [dnn]");
goto end;
}
if (dnn) {
if (!cJSON_IsString(dnn)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [dnn]");
goto end;
}
}
cJSON *subscription_id = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "subscriptionId");
if (subscription_id) {
if (!cJSON_IsString(subscription_id)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [subscription_id]");
goto end;
}
if (subscription_id) {
if (!cJSON_IsString(subscription_id)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [subscription_id]");
goto end;
}
}
cJSON *plmn_id = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "plmnId");
OpenAPI_plmn_id_t *plmn_id_local_nonprim = NULL;
if (plmn_id) {
plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id);
}
if (plmn_id) {
plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id);
}
cJSON *immediate_report = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "immediateReport");
if (immediate_report) {
if (!cJSON_IsBool(immediate_report)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [immediate_report]");
goto end;
}
if (immediate_report) {
if (!cJSON_IsBool(immediate_report)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [immediate_report]");
goto end;
}
}
cJSON *report = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "report");
OpenAPI_subscription_data_sets_t *report_local_nonprim = NULL;
if (report) {
report_local_nonprim = OpenAPI_subscription_data_sets_parseFromJSON(report);
}
if (report) {
report_local_nonprim = OpenAPI_subscription_data_sets_parseFromJSON(report);
}
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "supportedFeatures");
if (supported_features) {
if (!cJSON_IsString(supported_features)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [supported_features]");
goto end;
}
if (supported_features) {
if (!cJSON_IsString(supported_features)) {
ogs_error("OpenAPI_sdm_subscription_parseFromJSON() failed [supported_features]");
goto end;
}
}
cJSON *context_info = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "contextInfo");
OpenAPI_context_info_t *context_info_local_nonprim = NULL;
if (context_info) {
context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info);
}
if (context_info) {
context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info);
}
sdm_subscription_local_var = OpenAPI_sdm_subscription_create (
ogs_strdup_or_assert(nf_instance_id->valuestring),
@ -362,7 +362,7 @@ OpenAPI_sdm_subscription_t *OpenAPI_sdm_subscription_parseFromJSON(cJSON *sdm_su
report ? report_local_nonprim : NULL,
supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL,
context_info ? context_info_local_nonprim : NULL
);
);
return sdm_subscription_local_var;
end: