Commit 5ff8b7f4 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Code cleanup API server

parent 40faab75
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
#include "IndividualPDUSessionHSMFApi.h" #include "IndividualPDUSessionHSMFApi.h"
...@@ -38,77 +39,76 @@ void IndividualPDUSessionHSMFApi::setupRoutes() { ...@@ -38,77 +39,76 @@ void IndividualPDUSessionHSMFApi::setupRoutes() {
Routes::Post( Routes::Post(
*router, *router,
base + smf_cfg.sbi_api_version + "/pdu-sessions/:pduSessionRef/release", base + smf_cfg.sbi_api_version + "/pdu-sessions/:pduSessionRef/release",
Routes::bind(&IndividualPDUSessionHSMFApi::release_pdu_session_handler, Routes::bind(
this)); &IndividualPDUSessionHSMFApi::release_pdu_session_handler, this));
Routes::Post( Routes::Post(
*router, *router,
base + smf_cfg.sbi_api_version + "/pdu-sessions/:pduSessionRef/modify", base + smf_cfg.sbi_api_version + "/pdu-sessions/:pduSessionRef/modify",
Routes::bind(&IndividualPDUSessionHSMFApi::update_pdu_session_handler, Routes::bind(
this)); &IndividualPDUSessionHSMFApi::update_pdu_session_handler, this));
// Default handler, called when a route is not found // Default handler, called when a route is not found
router->addCustomHandler( router->addCustomHandler(Routes::bind(
Routes::bind( &IndividualPDUSessionHSMFApi::
&IndividualPDUSessionHSMFApi::individual_pdu_session_hsmf_api_default_handler, individual_pdu_session_hsmf_api_default_handler,
this)); this));
} }
void IndividualPDUSessionHSMFApi::release_pdu_session_handler( void IndividualPDUSessionHSMFApi::release_pdu_session_handler(
const Pistache::Rest::Request &request, const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response) { Pistache::Http::ResponseWriter response) {
// Getting the path params // Getting the path params
auto pduSessionRef = request.param(":pduSessionRef").as<std::string>(); auto pduSessionRef = request.param(":pduSessionRef").as<std::string>();
// Getting the body param // Getting the body param
ReleaseData releaseData = { }; ReleaseData releaseData = {};
try { try {
nlohmann::json::parse(request.body()).get_to(releaseData); nlohmann::json::parse(request.body()).get_to(releaseData);
this->release_pdu_session(pduSessionRef, releaseData, response); this->release_pdu_session(pduSessionRef, releaseData, response);
} catch (nlohmann::detail::exception &e) { } catch (nlohmann::detail::exception& e) {
//send a 400 error // send a 400 error
response.send(Pistache::Http::Code::Bad_Request, e.what()); response.send(Pistache::Http::Code::Bad_Request, e.what());
return; return;
} catch (std::exception &e) { } catch (std::exception& e) {
//send a 500 error // send a 500 error
response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
return; return;
} }
} }
void IndividualPDUSessionHSMFApi::update_pdu_session_handler( void IndividualPDUSessionHSMFApi::update_pdu_session_handler(
const Pistache::Rest::Request &request, const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response) { Pistache::Http::ResponseWriter response) {
// Getting the path params // Getting the path params
auto pduSessionRef = request.param(":pduSessionRef").as<std::string>(); auto pduSessionRef = request.param(":pduSessionRef").as<std::string>();
// Getting the body param // Getting the body param
HsmfUpdateData hsmfUpdateData = { }; HsmfUpdateData hsmfUpdateData = {};
try { try {
nlohmann::json::parse(request.body()).get_to(hsmfUpdateData); nlohmann::json::parse(request.body()).get_to(hsmfUpdateData);
this->update_pdu_session(pduSessionRef, hsmfUpdateData, response); this->update_pdu_session(pduSessionRef, hsmfUpdateData, response);
} catch (nlohmann::detail::exception &e) { } catch (nlohmann::detail::exception& e) {
//send a 400 error // send a 400 error
response.send(Pistache::Http::Code::Bad_Request, e.what()); response.send(Pistache::Http::Code::Bad_Request, e.what());
return; return;
} catch (std::exception &e) { } catch (std::exception& e) {
//send a 500 error // send a 500 error
response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
return; return;
} }
}
void IndividualPDUSessionHSMFApi::individual_pdu_session_hsmf_api_default_handler(
const Pistache::Rest::Request&, Pistache::Http::ResponseWriter response) {
response.send(Pistache::Http::Code::Not_Found,
"The requested method does not exist");
} }
} void IndividualPDUSessionHSMFApi::
} individual_pdu_session_hsmf_api_default_handler(
const Pistache::Rest::Request&,
Pistache::Http::ResponseWriter response) {
response.send(
Pistache::Http::Code::Not_Found, "The requested method does not exist");
} }
} // namespace api
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
/* /*
* IndividualPDUSessionHSMFApi.h * IndividualPDUSessionHSMFApi.h
* *
...@@ -39,8 +41,7 @@ using namespace oai::smf_server::model; ...@@ -39,8 +41,7 @@ using namespace oai::smf_server::model;
class IndividualPDUSessionHSMFApi { class IndividualPDUSessionHSMFApi {
public: public:
IndividualPDUSessionHSMFApi(std::shared_ptr<Pistache::Rest::Router>); IndividualPDUSessionHSMFApi(std::shared_ptr<Pistache::Rest::Router>);
virtual ~IndividualPDUSessionHSMFApi() { virtual ~IndividualPDUSessionHSMFApi() {}
}
void init(); void init();
const std::string base = "/nsmf-pdusession/"; const std::string base = "/nsmf-pdusession/";
...@@ -48,12 +49,14 @@ class IndividualPDUSessionHSMFApi { ...@@ -48,12 +49,14 @@ class IndividualPDUSessionHSMFApi {
private: private:
void setupRoutes(); void setupRoutes();
void release_pdu_session_handler(const Pistache::Rest::Request &request, void release_pdu_session_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response); Pistache::Http::ResponseWriter response);
void update_pdu_session_handler(const Pistache::Rest::Request &request, void update_pdu_session_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response); Pistache::Http::ResponseWriter response);
void individual_pdu_session_hsmf_api_default_handler( void individual_pdu_session_hsmf_api_default_handler(
const Pistache::Rest::Request &request, const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response); Pistache::Http::ResponseWriter response);
std::shared_ptr<Pistache::Rest::Router> router; std::shared_ptr<Pistache::Rest::Router> router;
...@@ -65,10 +68,11 @@ class IndividualPDUSessionHSMFApi { ...@@ -65,10 +68,11 @@ class IndividualPDUSessionHSMFApi {
/// ///
/// </remarks> /// </remarks>
/// <param name="pduSessionRef">PDU session reference</param> /// <param name="pduSessionRef">PDU session reference</param>
/// <param name="releaseData">representation of the data to be sent to H-SMF when releasing the PDU session (optional)</param> /// <param name="releaseData">representation of the data to be sent to H-SMF
/// when releasing the PDU session (optional)</param>
virtual void release_pdu_session( virtual void release_pdu_session(
const std::string &pduSessionRef, const ReleaseData &releaseData, const std::string& pduSessionRef, const ReleaseData& releaseData,
Pistache::Http::ResponseWriter &response) = 0; Pistache::Http::ResponseWriter& response) = 0;
/// <summary> /// <summary>
/// Update (initiated by V-SMF) /// Update (initiated by V-SMF)
...@@ -77,16 +81,15 @@ class IndividualPDUSessionHSMFApi { ...@@ -77,16 +81,15 @@ class IndividualPDUSessionHSMFApi {
/// ///
/// </remarks> /// </remarks>
/// <param name="pduSessionRef">PDU session reference</param> /// <param name="pduSessionRef">PDU session reference</param>
/// <param name="hsmfUpdateData">representation of the updates to apply to the PDU session</param> /// <param name="hsmfUpdateData">representation of the updates to apply to the
virtual void update_pdu_session(const std::string &pduSessionRef, /// PDU session</param>
const HsmfUpdateData &hsmfUpdateData, virtual void update_pdu_session(
Pistache::Http::ResponseWriter &response) = 0; const std::string& pduSessionRef, const HsmfUpdateData& hsmfUpdateData,
Pistache::Http::ResponseWriter& response) = 0;
}; };
} } // namespace api
} } // namespace smf_server
} } // namespace oai
#endif /* IndividualPDUSessionHSMFApi_H_ */ #endif /* IndividualPDUSessionHSMFApi_H_ */
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
/* /*
...@@ -15,9 +16,9 @@ ...@@ -15,9 +16,9 @@
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this
* except in compliance with the License. *file except in compliance with the License. You may obtain a copy of the
* You may obtain a copy of the License at *License at
* *
* http://www.openairinterface.org/?page_id=698 * http://www.openairinterface.org/?page_id=698
* *
...@@ -68,50 +69,51 @@ void IndividualSMContextApi::setupRoutes() { ...@@ -68,50 +69,51 @@ void IndividualSMContextApi::setupRoutes() {
using namespace Pistache::Rest; using namespace Pistache::Rest;
Routes::Post( Routes::Post(
*router, base + smf_cfg.sbi_api_version + "/sm-contexts/:smContextRef/release", *router,
base + smf_cfg.sbi_api_version + "/sm-contexts/:smContextRef/release",
Routes::bind(&IndividualSMContextApi::release_sm_context_handler, this)); Routes::bind(&IndividualSMContextApi::release_sm_context_handler, this));
Routes::Post( Routes::Post(
*router, base + smf_cfg.sbi_api_version + "/sm-contexts/:smContextRef/retrieve", *router,
base + smf_cfg.sbi_api_version + "/sm-contexts/:smContextRef/retrieve",
Routes::bind(&IndividualSMContextApi::retrieve_sm_context_handler, this)); Routes::bind(&IndividualSMContextApi::retrieve_sm_context_handler, this));
Routes::Post( Routes::Post(
*router, base + smf_cfg.sbi_api_version + "/sm-contexts/:smContextRef/modify", *router,
base + smf_cfg.sbi_api_version + "/sm-contexts/:smContextRef/modify",
Routes::bind(&IndividualSMContextApi::update_sm_context_handler, this)); Routes::bind(&IndividualSMContextApi::update_sm_context_handler, this));
// Default handler, called when a route is not found // Default handler, called when a route is not found
router->addCustomHandler( router->addCustomHandler(Routes::bind(
Routes::bind(
&IndividualSMContextApi::individual_sm_context_api_default_handler, &IndividualSMContextApi::individual_sm_context_api_default_handler,
this)); this));
} }
void IndividualSMContextApi::release_sm_context_handler( void IndividualSMContextApi::release_sm_context_handler(
const Pistache::Rest::Request &request, const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response) { Pistache::Http::ResponseWriter response) {
Logger::smf_api_server().debug(""); Logger::smf_api_server().debug("");
Logger::smf_api_server().info( Logger::smf_api_server().info(
"Received a SM context Release request from AMF."); "Received a SM context Release request from AMF.");
Logger::smf_api_server().debug("Request body: %s\n", request.body().c_str()); Logger::smf_api_server().debug("Request body: %s\n", request.body().c_str());
SmContextReleaseMessage smContextReleaseMessage = { }; SmContextReleaseMessage smContextReleaseMessage = {};
//simple parser // simple parser
mime_parser sp = { }; mime_parser sp = {};
sp.parse(request.body()); sp.parse(request.body());
std::vector<mime_part> parts = { }; std::vector<mime_part> parts = {};
sp.get_mime_parts(parts); sp.get_mime_parts(parts);
uint8_t size = parts.size(); uint8_t size = parts.size();
Logger::smf_api_server().debug("Number of MIME parts %d", size); Logger::smf_api_server().debug("Number of MIME parts %d", size);
// Getting the body param // Getting the body param
SmContextReleaseData smContextReleaseData = { }; SmContextReleaseData smContextReleaseData = {};
try { try {
if (size > 0) { if (size > 0) {
nlohmann::json::parse(parts[0].body.c_str()).get_to(smContextReleaseData); nlohmann::json::parse(parts[0].body.c_str()).get_to(smContextReleaseData);
} else { } else {
nlohmann::json::parse(request.body().c_str()).get_to( nlohmann::json::parse(request.body().c_str())
smContextReleaseData); .get_to(smContextReleaseData);
} }
smContextReleaseMessage.setJsonData(smContextReleaseData); smContextReleaseMessage.setJsonData(smContextReleaseData);
...@@ -127,68 +129,66 @@ void IndividualSMContextApi::release_sm_context_handler( ...@@ -127,68 +129,66 @@ void IndividualSMContextApi::release_sm_context_handler(
auto smContextRef = request.param(":smContextRef").as<std::string>(); auto smContextRef = request.param(":smContextRef").as<std::string>();
this->release_sm_context(smContextRef, smContextReleaseMessage, response); this->release_sm_context(smContextRef, smContextReleaseMessage, response);
} catch (nlohmann::detail::exception &e) { } catch (nlohmann::detail::exception& e) {
//send a 400 error // send a 400 error
Logger::smf_api_server().warn( Logger::smf_api_server().warn(
"Error in parsing json (error: %s), send a msg with a 400 error code to AMF", "Error in parsing json (error: %s), send a msg with a 400 error code "
"to AMF",
e.what()); e.what());
response.send(Pistache::Http::Code::Bad_Request, e.what()); response.send(Pistache::Http::Code::Bad_Request, e.what());
return; return;
} catch (std::exception &e) { } catch (std::exception& e) {
//send a 500 error // send a 500 error
Logger::smf_api_server().warn( Logger::smf_api_server().warn(
"Error (%s ), send a msg with a 500 error code to AMF", e.what()); "Error (%s ), send a msg with a 500 error code to AMF", e.what());
response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
return; return;
} }
} }
void IndividualSMContextApi::retrieve_sm_context_handler( void IndividualSMContextApi::retrieve_sm_context_handler(
const Pistache::Rest::Request &request, const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response) { Pistache::Http::ResponseWriter response) {
// Getting the path params // Getting the path params
auto smContextRef = request.param(":smContextRef").as<std::string>(); auto smContextRef = request.param(":smContextRef").as<std::string>();
// Getting the body param // Getting the body param
SmContextRetrieveData smContextRetrieveData = { }; SmContextRetrieveData smContextRetrieveData = {};
try { try {
nlohmann::json::parse(request.body()).get_to(smContextRetrieveData); nlohmann::json::parse(request.body()).get_to(smContextRetrieveData);
this->retrieve_sm_context(smContextRef, smContextRetrieveData, response); this->retrieve_sm_context(smContextRef, smContextRetrieveData, response);
} catch (nlohmann::detail::exception &e) { } catch (nlohmann::detail::exception& e) {
//send a 400 error // send a 400 error
response.send(Pistache::Http::Code::Bad_Request, e.what()); response.send(Pistache::Http::Code::Bad_Request, e.what());
return; return;
} catch (std::exception &e) { } catch (std::exception& e) {
//send a 500 error // send a 500 error
response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
return; return;
} }
} }
void IndividualSMContextApi::update_sm_context_handler( void IndividualSMContextApi::update_sm_context_handler(
const Pistache::Rest::Request &request, const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response) { Pistache::Http::ResponseWriter response) {
Logger::smf_api_server().debug(""); Logger::smf_api_server().debug("");
Logger::smf_api_server().info( Logger::smf_api_server().info(
"Received a SM context update request from AMF."); "Received a SM context update request from AMF.");
Logger::smf_api_server().debug("Request body: %s\n", request.body().c_str()); Logger::smf_api_server().debug("Request body: %s\n", request.body().c_str());
SmContextUpdateMessage smContextUpdateMessage = { }; SmContextUpdateMessage smContextUpdateMessage = {};
//simple parser // simple parser
mime_parser sp = { }; mime_parser sp = {};
sp.parse(request.body()); sp.parse(request.body());
std::vector<mime_part> parts = { }; std::vector<mime_part> parts = {};
sp.get_mime_parts(parts); sp.get_mime_parts(parts);
uint8_t size = parts.size(); uint8_t size = parts.size();
Logger::smf_api_server().debug("Number of MIME parts %d", size); Logger::smf_api_server().debug("Number of MIME parts %d", size);
// Getting the body param // Getting the body param
SmContextUpdateData smContextUpdateData = { }; SmContextUpdateData smContextUpdateData = {};
try { try {
if (size > 0) { if (size > 0) {
nlohmann::json::parse(parts[0].body.c_str()).get_to(smContextUpdateData); nlohmann::json::parse(parts[0].body.c_str()).get_to(smContextUpdateData);
...@@ -202,8 +202,8 @@ void IndividualSMContextApi::update_sm_context_handler( ...@@ -202,8 +202,8 @@ void IndividualSMContextApi::update_sm_context_handler(
if (parts[i].content_type.compare("application/vnd.3gpp.5gnas") == 0) { if (parts[i].content_type.compare("application/vnd.3gpp.5gnas") == 0) {
smContextUpdateMessage.setBinaryDataN1SmMessage(parts[i].body); smContextUpdateMessage.setBinaryDataN1SmMessage(parts[i].body);
Logger::smf_api_server().debug("N1 SM message is set"); Logger::smf_api_server().debug("N1 SM message is set");
} else if (parts[i].content_type.compare("application/vnd.3gpp.ngap") } else if (
== 0) { parts[i].content_type.compare("application/vnd.3gpp.ngap") == 0) {
smContextUpdateMessage.setBinaryDataN2SmInformation(parts[i].body); smContextUpdateMessage.setBinaryDataN2SmInformation(parts[i].body);
Logger::smf_api_server().debug("N2 SM information is set"); Logger::smf_api_server().debug("N2 SM information is set");
} }
...@@ -213,15 +213,16 @@ void IndividualSMContextApi::update_sm_context_handler( ...@@ -213,15 +213,16 @@ void IndividualSMContextApi::update_sm_context_handler(
auto smContextRef = request.param(":smContextRef").as<std::string>(); auto smContextRef = request.param(":smContextRef").as<std::string>();
this->update_sm_context(smContextRef, smContextUpdateMessage, response); this->update_sm_context(smContextRef, smContextUpdateMessage, response);
} catch (nlohmann::detail::exception &e) { } catch (nlohmann::detail::exception& e) {
//send a 400 error // send a 400 error
Logger::smf_api_server().warn( Logger::smf_api_server().warn(
"Error in parsing json (error: %s), send a msg with a 400 error code to AMF", "Error in parsing json (error: %s), send a msg with a 400 error code "
"to AMF",
e.what()); e.what());
response.send(Pistache::Http::Code::Bad_Request, e.what()); response.send(Pistache::Http::Code::Bad_Request, e.what());
return; return;
} catch (std::exception &e) { } catch (std::exception& e) {
//send a 500 error // send a 500 error
Logger::smf_api_server().warn( Logger::smf_api_server().warn(
"Error (%s ), send a msg with a 500 error code to AMF", e.what()); "Error (%s ), send a msg with a 500 error code to AMF", e.what());
response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
...@@ -231,11 +232,10 @@ void IndividualSMContextApi::update_sm_context_handler( ...@@ -231,11 +232,10 @@ void IndividualSMContextApi::update_sm_context_handler(
void IndividualSMContextApi::individual_sm_context_api_default_handler( void IndividualSMContextApi::individual_sm_context_api_default_handler(
const Pistache::Rest::Request&, Pistache::Http::ResponseWriter response) { const Pistache::Rest::Request&, Pistache::Http::ResponseWriter response) {
response.send(Pistache::Http::Code::Not_Found, response.send(
"The requested method does not exist"); Pistache::Http::Code::Not_Found, "The requested method does not exist");
}
}
}
} }
} // namespace api
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/
/*
* IndividualSMContextApi.h
*
*
*/ */
/* /*
...@@ -20,9 +16,9 @@ ...@@ -20,9 +16,9 @@
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this
* except in compliance with the License. *file except in compliance with the License. You may obtain a copy of the
* You may obtain a copy of the License at *License at
* *
* http://www.openairinterface.org/?page_id=698 * http://www.openairinterface.org/?page_id=698
* *
...@@ -36,6 +32,12 @@ ...@@ -36,6 +32,12 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*
* IndividualSMContextApi.h
*
*
*/
#ifndef IndividualSMContextApi_H_ #ifndef IndividualSMContextApi_H_
#define IndividualSMContextApi_H_ #define IndividualSMContextApi_H_
...@@ -67,8 +69,7 @@ using namespace oai::smf_server::model; ...@@ -67,8 +69,7 @@ using namespace oai::smf_server::model;
class IndividualSMContextApi { class IndividualSMContextApi {
public: public:
IndividualSMContextApi(std::shared_ptr<Pistache::Rest::Router>); IndividualSMContextApi(std::shared_ptr<Pistache::Rest::Router>);
virtual ~IndividualSMContextApi() { virtual ~IndividualSMContextApi() {}
}
void init(); void init();
const std::string base = "/nsmf-pdusession/"; const std::string base = "/nsmf-pdusession/";
...@@ -76,14 +77,17 @@ class IndividualSMContextApi { ...@@ -76,14 +77,17 @@ class IndividualSMContextApi {
private: private:
void setupRoutes(); void setupRoutes();
void release_sm_context_handler(const Pistache::Rest::Request &request, void release_sm_context_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response); Pistache::Http::ResponseWriter response);
void retrieve_sm_context_handler(const Pistache::Rest::Request &request, void retrieve_sm_context_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response); Pistache::Http::ResponseWriter response);
void update_sm_context_handler(const Pistache::Rest::Request &request, void update_sm_context_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response); Pistache::Http::ResponseWriter response);
void individual_sm_context_api_default_handler( void individual_sm_context_api_default_handler(
const Pistache::Rest::Request &request, const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response); Pistache::Http::ResponseWriter response);
std::shared_ptr<Pistache::Rest::Router> router; std::shared_ptr<Pistache::Rest::Router> router;
...@@ -95,11 +99,12 @@ class IndividualSMContextApi { ...@@ -95,11 +99,12 @@ class IndividualSMContextApi {
/// ///
/// </remarks> /// </remarks>
/// <param name="smContextRef">SM context reference</param> /// <param name="smContextRef">SM context reference</param>
/// <param name="smContextReleaseData">representation of the data to be sent to the SMF when releasing the SM context (optional)</param> /// <param name="smContextReleaseData">representation of the data to be sent
/// to the SMF when releasing the SM context (optional)</param>
virtual void release_sm_context( virtual void release_sm_context(
const std::string &smContextRef, const std::string& smContextRef,
const SmContextReleaseMessage &smContextReleaseMessage, const SmContextReleaseMessage& smContextReleaseMessage,
Pistache::Http::ResponseWriter &response) = 0; Pistache::Http::ResponseWriter& response) = 0;
/// <summary> /// <summary>
/// Retrieve SM Context /// Retrieve SM Context
...@@ -108,11 +113,12 @@ class IndividualSMContextApi { ...@@ -108,11 +113,12 @@ class IndividualSMContextApi {
/// ///
/// </remarks> /// </remarks>
/// <param name="smContextRef">SM context reference</param> /// <param name="smContextRef">SM context reference</param>
/// <param name="smContextRetrieveData">parameters used to retrieve the SM context (optional)</param> /// <param name="smContextRetrieveData">parameters used to retrieve the SM
/// context (optional)</param>
virtual void retrieve_sm_context( virtual void retrieve_sm_context(
const std::string &smContextRef, const std::string& smContextRef,
const SmContextRetrieveData &smContextRetrieveData, const SmContextRetrieveData& smContextRetrieveData,
Pistache::Http::ResponseWriter &response) = 0; Pistache::Http::ResponseWriter& response) = 0;
/// <summary> /// <summary>
/// Update SM Context /// Update SM Context
...@@ -121,17 +127,16 @@ class IndividualSMContextApi { ...@@ -121,17 +127,16 @@ class IndividualSMContextApi {
/// ///
/// </remarks> /// </remarks>
/// <param name="smContextRef">SM context reference</param> /// <param name="smContextRef">SM context reference</param>
/// <param name="smContextUpdateData">representation of the updates to apply to the SM context</param> /// <param name="smContextUpdateData">representation of the updates to apply
/// to the SM context</param>
virtual void update_sm_context( virtual void update_sm_context(
const std::string &smContextRef, const std::string& smContextRef,
const SmContextUpdateMessage &smContextUpdateMessage, const SmContextUpdateMessage& smContextUpdateMessage,
Pistache::Http::ResponseWriter &response) = 0; Pistache::Http::ResponseWriter& response) = 0;
}; };
} } // namespace api
} } // namespace smf_server
} } // namespace oai
#endif /* IndividualSMContextApi_H_ */ #endif /* IndividualSMContextApi_H_ */
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
#include "IndividualSubscriptionDocumentApi.h" #include "IndividualSubscriptionDocumentApi.h"
#include "Helpers.h" #include "Helpers.h"
...@@ -23,7 +24,8 @@ namespace api { ...@@ -23,7 +24,8 @@ namespace api {
using namespace oai::smf_server::helpers; using namespace oai::smf_server::helpers;
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
IndividualSubscriptionDocumentApi::IndividualSubscriptionDocumentApi(std::shared_ptr<Pistache::Rest::Router> rtr) { IndividualSubscriptionDocumentApi::IndividualSubscriptionDocumentApi(
std::shared_ptr<Pistache::Rest::Router> rtr) {
router = rtr; router = rtr;
} }
...@@ -34,55 +36,77 @@ void IndividualSubscriptionDocumentApi::init() { ...@@ -34,55 +36,77 @@ void IndividualSubscriptionDocumentApi::init() {
void IndividualSubscriptionDocumentApi::setupRoutes() { void IndividualSubscriptionDocumentApi::setupRoutes() {
using namespace Pistache::Rest; using namespace Pistache::Rest;
Routes::Delete(*router, base + smf_cfg.sbi_api_version + "/subscriptions/:subId", Routes::bind(&IndividualSubscriptionDocumentApi::delete_individual_subcription_handler, this)); Routes::Delete(
Routes::Get(*router, base + smf_cfg.sbi_api_version + "/subscriptions/:subId", Routes::bind(&IndividualSubscriptionDocumentApi::get_individual_subcription_handler, this)); *router, base + smf_cfg.sbi_api_version + "/subscriptions/:subId",
Routes::Put(*router, base + smf_cfg.sbi_api_version + "/subscriptions/:subId", Routes::bind(&IndividualSubscriptionDocumentApi::replace_individual_subcription_handler, this)); Routes::bind(
&IndividualSubscriptionDocumentApi::
delete_individual_subcription_handler,
this));
Routes::Get(
*router, base + smf_cfg.sbi_api_version + "/subscriptions/:subId",
Routes::bind(
&IndividualSubscriptionDocumentApi::
get_individual_subcription_handler,
this));
Routes::Put(
*router, base + smf_cfg.sbi_api_version + "/subscriptions/:subId",
Routes::bind(
&IndividualSubscriptionDocumentApi::
replace_individual_subcription_handler,
this));
// Default handler, called when a route is not found // Default handler, called when a route is not found
router->addCustomHandler(Routes::bind(&IndividualSubscriptionDocumentApi::individual_subscription_document_api_default_handler, this)); router->addCustomHandler(Routes::bind(
&IndividualSubscriptionDocumentApi::
individual_subscription_document_api_default_handler,
this));
} }
void IndividualSubscriptionDocumentApi::delete_individual_subcription_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { void IndividualSubscriptionDocumentApi::delete_individual_subcription_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response) {
// Getting the path params // Getting the path params
auto subId = request.param(":subId").as<std::string>(); auto subId = request.param(":subId").as<std::string>();
try { try {
this->delete_individual_subcription(subId, response); this->delete_individual_subcription(subId, response);
} catch (nlohmann::detail::exception &e) { } catch (nlohmann::detail::exception& e) {
//send a 400 error // send a 400 error
response.send(Pistache::Http::Code::Bad_Request, e.what()); response.send(Pistache::Http::Code::Bad_Request, e.what());
return; return;
} catch (Pistache::Http::HttpError &e) { } catch (Pistache::Http::HttpError& e) {
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what()); response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
return; return;
} catch (std::exception &e) { } catch (std::exception& e) {
//send a 500 error // send a 500 error
response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
return; return;
} }
} }
void IndividualSubscriptionDocumentApi::get_individual_subcription_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { void IndividualSubscriptionDocumentApi::get_individual_subcription_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response) {
// Getting the path params // Getting the path params
auto subId = request.param(":subId").as<std::string>(); auto subId = request.param(":subId").as<std::string>();
try { try {
this->get_individual_subcription(subId, response); this->get_individual_subcription(subId, response);
} catch (nlohmann::detail::exception &e) { } catch (nlohmann::detail::exception& e) {
//send a 400 error // send a 400 error
response.send(Pistache::Http::Code::Bad_Request, e.what()); response.send(Pistache::Http::Code::Bad_Request, e.what());
return; return;
} catch (Pistache::Http::HttpError &e) { } catch (Pistache::Http::HttpError& e) {
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what()); response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
return; return;
} catch (std::exception &e) { } catch (std::exception& e) {
//send a 500 error // send a 500 error
response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
return; return;
} }
} }
void IndividualSubscriptionDocumentApi::replace_individual_subcription_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { void IndividualSubscriptionDocumentApi::replace_individual_subcription_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response) {
// Getting the path params // Getting the path params
auto subId = request.param(":subId").as<std::string>(); auto subId = request.param(":subId").as<std::string>();
...@@ -93,26 +117,28 @@ void IndividualSubscriptionDocumentApi::replace_individual_subcription_handler(c ...@@ -93,26 +117,28 @@ void IndividualSubscriptionDocumentApi::replace_individual_subcription_handler(c
try { try {
nlohmann::json::parse(request.body()).get_to(nsmfEventExposure); nlohmann::json::parse(request.body()).get_to(nsmfEventExposure);
this->replace_individual_subcription(subId, nsmfEventExposure, response); this->replace_individual_subcription(subId, nsmfEventExposure, response);
} catch (nlohmann::detail::exception &e) { } catch (nlohmann::detail::exception& e) {
//send a 400 error // send a 400 error
response.send(Pistache::Http::Code::Bad_Request, e.what()); response.send(Pistache::Http::Code::Bad_Request, e.what());
return; return;
} catch (Pistache::Http::HttpError &e) { } catch (Pistache::Http::HttpError& e) {
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what()); response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
return; return;
} catch (std::exception &e) { } catch (std::exception& e) {
//send a 500 error // send a 500 error
response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
return; return;
} }
} }
void IndividualSubscriptionDocumentApi::individual_subscription_document_api_default_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { void IndividualSubscriptionDocumentApi::
response.send(Pistache::Http::Code::Not_Found, "The requested method does not exist"); individual_subscription_document_api_default_handler(
} const Pistache::Rest::Request&,
Pistache::Http::ResponseWriter response) {
} response.send(
} Pistache::Http::Code::Not_Found, "The requested method does not exist");
} }
} // namespace api
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* IndividualSubscriptionDocumentApi.h * IndividualSubscriptionDocumentApi.h
* *
...@@ -18,13 +20,11 @@ ...@@ -18,13 +20,11 @@
#ifndef IndividualSubscriptionDocumentApi_H_ #ifndef IndividualSubscriptionDocumentApi_H_
#define IndividualSubscriptionDocumentApi_H_ #define IndividualSubscriptionDocumentApi_H_
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
#include <pistache/http_headers.h> #include <pistache/http_headers.h>
#include <pistache/optional.h> #include <pistache/optional.h>
#include "NsmfEventExposure.h" #include "NsmfEventExposure.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include <string> #include <string>
...@@ -36,20 +36,28 @@ namespace api { ...@@ -36,20 +36,28 @@ namespace api {
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
class IndividualSubscriptionDocumentApi { class IndividualSubscriptionDocumentApi {
public: public:
IndividualSubscriptionDocumentApi(std::shared_ptr<Pistache::Rest::Router>); IndividualSubscriptionDocumentApi(std::shared_ptr<Pistache::Rest::Router>);
virtual ~IndividualSubscriptionDocumentApi() {} virtual ~IndividualSubscriptionDocumentApi() {}
void init(); void init();
const std::string base = "/nsmf_event-exposure/"; const std::string base = "/nsmf_event-exposure/";
private: private:
void setupRoutes(); void setupRoutes();
void delete_individual_subcription_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void delete_individual_subcription_handler(
void get_individual_subcription_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); const Pistache::Rest::Request& request,
void replace_individual_subcription_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); Pistache::Http::ResponseWriter response);
void individual_subscription_document_api_default_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void get_individual_subcription_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response);
void replace_individual_subcription_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response);
void individual_subscription_document_api_default_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response);
std::shared_ptr<Pistache::Rest::Router> router; std::shared_ptr<Pistache::Rest::Router> router;
...@@ -60,7 +68,8 @@ private: ...@@ -60,7 +68,8 @@ private:
/// ///
/// </remarks> /// </remarks>
/// <param name="subId">Event Subscription ID</param> /// <param name="subId">Event Subscription ID</param>
virtual void delete_individual_subcription(const std::string &subId, Pistache::Http::ResponseWriter &response) = 0; virtual void delete_individual_subcription(
const std::string& subId, Pistache::Http::ResponseWriter& response) = 0;
/// <summary> /// <summary>
/// Read an individual subscription for event notifications from the SMF /// Read an individual subscription for event notifications from the SMF
...@@ -69,7 +78,8 @@ private: ...@@ -69,7 +78,8 @@ private:
/// ///
/// </remarks> /// </remarks>
/// <param name="subId">Event Subscription ID</param> /// <param name="subId">Event Subscription ID</param>
virtual void get_individual_subcription(const std::string &subId, Pistache::Http::ResponseWriter &response) = 0; virtual void get_individual_subcription(
const std::string& subId, Pistache::Http::ResponseWriter& response) = 0;
/// <summary> /// <summary>
/// Replace an individual subscription for event notifications from the SMF /// Replace an individual subscription for event notifications from the SMF
...@@ -79,13 +89,13 @@ private: ...@@ -79,13 +89,13 @@ private:
/// </remarks> /// </remarks>
/// <param name="subId">Event Subscription ID</param> /// <param name="subId">Event Subscription ID</param>
/// <param name="nsmfEventExposure"></param> /// <param name="nsmfEventExposure"></param>
virtual void replace_individual_subcription(const std::string &subId, const NsmfEventExposure &nsmfEventExposure, Pistache::Http::ResponseWriter &response) = 0; virtual void replace_individual_subcription(
const std::string& subId, const NsmfEventExposure& nsmfEventExposure,
Pistache::Http::ResponseWriter& response) = 0;
}; };
} } // namespace api
} } // namespace smf_server
} } // namespace oai
#endif /* IndividualSubscriptionDocumentApi_H_ */ #endif /* IndividualSubscriptionDocumentApi_H_ */
/** /*
* Nsmf_EventExposure * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* Session Management Event Exposure Service. © 2019, 3GPP Organizational * contributor license agreements. See the NOTICE file distributed with
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * http://www.openairinterface.org/?page_id=698
* *
* * Unless required by applicable law or agreed to in writing, software
* NOTE: This class is auto generated by OpenAPI Generator * distributed under the License is distributed on an "AS IS" BASIS,
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* the class manually. * See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/ */
#include "NFStatusNotifyApi.h" #include "NFStatusNotifyApi.h"
......
/** /*
* Nsmf_EventExposure * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* Session Management Event Exposure Service. © 2019, 3GPP Organizational * contributor license agreements. See the NOTICE file distributed with
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * this work for additional information regarding copyright ownership.
* * The OpenAirInterface Software Alliance licenses this file to You under
* The version of the OpenAPI document: 1.1.0.alpha-1 * the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
* *
* http://www.openairinterface.org/?page_id=698
* *
* NOTE: This class is auto generated by OpenAPI Generator * Unless required by applicable law or agreed to in writing, software
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit * distributed under the License is distributed on an "AS IS" BASIS,
* the class manually. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/ */
/* /*
* NFStatusNotifyApi.h * NFStatusNotifyApi.h
* *
......
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
#include "PDUSessionsCollectionApi.h" #include "PDUSessionsCollectionApi.h"
...@@ -40,16 +41,14 @@ void PDUSessionsCollectionApi::setupRoutes() { ...@@ -40,16 +41,14 @@ void PDUSessionsCollectionApi::setupRoutes() {
Routes::bind(&PDUSessionsCollectionApi::post_pdu_sessions_handler, this)); Routes::bind(&PDUSessionsCollectionApi::post_pdu_sessions_handler, this));
// Default handler, called when a route is not found // Default handler, called when a route is not found
router->addCustomHandler( router->addCustomHandler(Routes::bind(
Routes::bind(
&PDUSessionsCollectionApi::pdu_sessions_collection_api_default_handler, &PDUSessionsCollectionApi::pdu_sessions_collection_api_default_handler,
this)); this));
} }
void PDUSessionsCollectionApi::post_pdu_sessions_handler( void PDUSessionsCollectionApi::post_pdu_sessions_handler(
const Pistache::Rest::Request &request, const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response) { Pistache::Http::ResponseWriter response) {
// Getting the body param // Getting the body param
PduSessionCreateData pduSessionCreateData; PduSessionCreateData pduSessionCreateData;
...@@ -57,25 +56,23 @@ void PDUSessionsCollectionApi::post_pdu_sessions_handler( ...@@ -57,25 +56,23 @@ void PDUSessionsCollectionApi::post_pdu_sessions_handler(
try { try {
nlohmann::json::parse(request.body()).get_to(pduSessionCreateData); nlohmann::json::parse(request.body()).get_to(pduSessionCreateData);
this->post_pdu_sessions(pduSessionCreateData, response); this->post_pdu_sessions(pduSessionCreateData, response);
} catch (nlohmann::detail::exception &e) { } catch (nlohmann::detail::exception& e) {
//send a 400 error // send a 400 error
response.send(Pistache::Http::Code::Bad_Request, e.what()); response.send(Pistache::Http::Code::Bad_Request, e.what());
return; return;
} catch (std::exception &e) { } catch (std::exception& e) {
//send a 500 error // send a 500 error
response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
return; return;
} }
} }
void PDUSessionsCollectionApi::pdu_sessions_collection_api_default_handler( void PDUSessionsCollectionApi::pdu_sessions_collection_api_default_handler(
const Pistache::Rest::Request&, Pistache::Http::ResponseWriter response) { const Pistache::Rest::Request&, Pistache::Http::ResponseWriter response) {
response.send(Pistache::Http::Code::Not_Found, response.send(
"The requested method does not exist"); Pistache::Http::Code::Not_Found, "The requested method does not exist");
}
}
}
} }
} // namespace api
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
/* /*
* PDUSessionsCollectionApi.h * PDUSessionsCollectionApi.h
* *
...@@ -37,8 +39,7 @@ using namespace oai::smf_server::model; ...@@ -37,8 +39,7 @@ using namespace oai::smf_server::model;
class PDUSessionsCollectionApi { class PDUSessionsCollectionApi {
public: public:
PDUSessionsCollectionApi(std::shared_ptr<Pistache::Rest::Router>); PDUSessionsCollectionApi(std::shared_ptr<Pistache::Rest::Router>);
virtual ~PDUSessionsCollectionApi() { virtual ~PDUSessionsCollectionApi() {}
}
void init(); void init();
const std::string base = "/nsmf-pdusession/"; const std::string base = "/nsmf-pdusession/";
...@@ -46,10 +47,11 @@ class PDUSessionsCollectionApi { ...@@ -46,10 +47,11 @@ class PDUSessionsCollectionApi {
private: private:
void setupRoutes(); void setupRoutes();
void post_pdu_sessions_handler(const Pistache::Rest::Request &request, void post_pdu_sessions_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response); Pistache::Http::ResponseWriter response);
void pdu_sessions_collection_api_default_handler( void pdu_sessions_collection_api_default_handler(
const Pistache::Rest::Request &request, const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response); Pistache::Http::ResponseWriter response);
std::shared_ptr<Pistache::Rest::Router> router; std::shared_ptr<Pistache::Rest::Router> router;
...@@ -60,16 +62,15 @@ class PDUSessionsCollectionApi { ...@@ -60,16 +62,15 @@ class PDUSessionsCollectionApi {
/// <remarks> /// <remarks>
/// ///
/// </remarks> /// </remarks>
/// <param name="pduSessionCreateData">representation of the PDU session to be created in the H-SMF</param> /// <param name="pduSessionCreateData">representation of the PDU session to be
/// created in the H-SMF</param>
virtual void post_pdu_sessions( virtual void post_pdu_sessions(
const PduSessionCreateData &pduSessionCreateData, const PduSessionCreateData& pduSessionCreateData,
Pistache::Http::ResponseWriter &response) = 0; Pistache::Http::ResponseWriter& response) = 0;
}; };
} } // namespace api
} } // namespace smf_server
} } // namespace oai
#endif /* PDUSessionsCollectionApi_H_ */ #endif /* PDUSessionsCollectionApi_H_ */
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
/* /*
...@@ -15,9 +16,9 @@ ...@@ -15,9 +16,9 @@
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this
* except in compliance with the License. * file except in compliance with the License. You may obtain a copy of the
* You may obtain a copy of the License at * License at
* *
* http://www.openairinterface.org/?page_id=698 * http://www.openairinterface.org/?page_id=698
* *
...@@ -72,41 +73,39 @@ void SMContextsCollectionApi::setupRoutes() { ...@@ -72,41 +73,39 @@ void SMContextsCollectionApi::setupRoutes() {
Routes::bind(&SMContextsCollectionApi::post_sm_contexts_handler, this)); Routes::bind(&SMContextsCollectionApi::post_sm_contexts_handler, this));
// Default handler, called when a route is not found // Default handler, called when a route is not found
router->addCustomHandler( router->addCustomHandler(Routes::bind(
Routes::bind(
&SMContextsCollectionApi::sm_contexts_collection_api_default_handler, &SMContextsCollectionApi::sm_contexts_collection_api_default_handler,
this)); this));
} }
void SMContextsCollectionApi::post_sm_contexts_handler( void SMContextsCollectionApi::post_sm_contexts_handler(
const Pistache::Rest::Request &request, const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response) { Pistache::Http::ResponseWriter response) {
Logger::smf_api_server().debug(""); Logger::smf_api_server().debug("");
Logger::smf_api_server().info( Logger::smf_api_server().info(
"Received a SM context create request from AMF."); "Received a SM context create request from AMF.");
SmContextMessage smContextMessage = { }; SmContextMessage smContextMessage = {};
SmContextCreateData smContextCreateData = { }; SmContextCreateData smContextCreateData = {};
//simple parser // simple parser
mime_parser sp = { }; mime_parser sp = {};
sp.parse(request.body()); sp.parse(request.body());
std::vector<mime_part> parts = { }; std::vector<mime_part> parts = {};
sp.get_mime_parts(parts); sp.get_mime_parts(parts);
uint8_t size = parts.size(); uint8_t size = parts.size();
Logger::smf_api_server().debug("Number of MIME parts %d", size); Logger::smf_api_server().debug("Number of MIME parts %d", size);
//at least 2 parts for Json data and N1 (+ N2) // at least 2 parts for Json data and N1 (+ N2)
if (size < 2) { if (size < 2) {
response.send(Pistache::Http::Code::Bad_Request); response.send(Pistache::Http::Code::Bad_Request);
return; return;
} }
//step 2. process the request // step 2. process the request
try { try {
nlohmann::json::parse(parts[0].body.c_str()).get_to(smContextCreateData); nlohmann::json::parse(parts[0].body.c_str()).get_to(smContextCreateData);
smContextMessage.setJsonData(smContextCreateData); smContextMessage.setJsonData(smContextCreateData);
//must include N1 NAS msg // must include N1 NAS msg
if (parts[1].content_type.compare("application/vnd.3gpp.5gnas") == 0) { if (parts[1].content_type.compare("application/vnd.3gpp.5gnas") == 0) {
smContextMessage.setBinaryDataN1SmMessage(parts[1].body); smContextMessage.setBinaryDataN1SmMessage(parts[1].body);
} else { } else {
...@@ -116,14 +115,14 @@ void SMContextsCollectionApi::post_sm_contexts_handler( ...@@ -116,14 +115,14 @@ void SMContextsCollectionApi::post_sm_contexts_handler(
this->post_sm_contexts(smContextMessage, response); this->post_sm_contexts(smContextMessage, response);
} catch (nlohmann::detail::exception &e) { } catch (nlohmann::detail::exception& e) {
//send a 400 error // send a 400 error
Logger::smf_api_server().warn("Can not parse the json data (error: %s)!", Logger::smf_api_server().warn(
e.what()); "Can not parse the json data (error: %s)!", e.what());
response.send(Pistache::Http::Code::Bad_Request, e.what()); response.send(Pistache::Http::Code::Bad_Request, e.what());
return; return;
} catch (std::exception &e) { } catch (std::exception& e) {
//send a 500 error // send a 500 error
Logger::smf_api_server().warn("Error: %s!", e.what()); Logger::smf_api_server().warn("Error: %s!", e.what());
response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
return; return;
...@@ -132,11 +131,10 @@ void SMContextsCollectionApi::post_sm_contexts_handler( ...@@ -132,11 +131,10 @@ void SMContextsCollectionApi::post_sm_contexts_handler(
void SMContextsCollectionApi::sm_contexts_collection_api_default_handler( void SMContextsCollectionApi::sm_contexts_collection_api_default_handler(
const Pistache::Rest::Request&, Pistache::Http::ResponseWriter response) { const Pistache::Rest::Request&, Pistache::Http::ResponseWriter response) {
response.send(Pistache::Http::Code::Not_Found, response.send(
"The requested method does not exist"); Pistache::Http::Code::Not_Found, "The requested method does not exist");
}
}
}
} }
} // namespace api
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/
/*
* SMContextsCollectionApi.h
*
*
*/ */
/* /*
...@@ -20,9 +16,9 @@ ...@@ -20,9 +16,9 @@
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this
* except in compliance with the License. * file except in compliance with the License. You may obtain a copy of the
* You may obtain a copy of the License at * License at
* *
* http://www.openairinterface.org/?page_id=698 * http://www.openairinterface.org/?page_id=698
* *
...@@ -36,6 +32,12 @@ ...@@ -36,6 +32,12 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*
* SMContextsCollectionApi.h
*
*
*/
#ifndef SMContextsCollectionApi_H_ #ifndef SMContextsCollectionApi_H_
#define SMContextsCollectionApi_H_ #define SMContextsCollectionApi_H_
...@@ -58,8 +60,7 @@ using namespace oai::smf_server::model; ...@@ -58,8 +60,7 @@ using namespace oai::smf_server::model;
class SMContextsCollectionApi { class SMContextsCollectionApi {
public: public:
SMContextsCollectionApi(std::shared_ptr<Pistache::Rest::Router>); SMContextsCollectionApi(std::shared_ptr<Pistache::Rest::Router>);
virtual ~SMContextsCollectionApi() { virtual ~SMContextsCollectionApi() {}
}
void init(); void init();
const std::string base = "/nsmf-pdusession/"; const std::string base = "/nsmf-pdusession/";
...@@ -67,10 +68,11 @@ class SMContextsCollectionApi { ...@@ -67,10 +68,11 @@ class SMContextsCollectionApi {
private: private:
void setupRoutes(); void setupRoutes();
void post_sm_contexts_handler(const Pistache::Rest::Request &request, void post_sm_contexts_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response); Pistache::Http::ResponseWriter response);
void sm_contexts_collection_api_default_handler( void sm_contexts_collection_api_default_handler(
const Pistache::Rest::Request &request, const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response); Pistache::Http::ResponseWriter response);
std::shared_ptr<Pistache::Rest::Router> router; std::shared_ptr<Pistache::Rest::Router> router;
...@@ -82,14 +84,13 @@ class SMContextsCollectionApi { ...@@ -82,14 +84,13 @@ class SMContextsCollectionApi {
/// ///
/// </remarks> /// </remarks>
/// <param name="smContextMessage"></param> /// <param name="smContextMessage"></param>
virtual void post_sm_contexts(const SmContextMessage &smContextMessage, virtual void post_sm_contexts(
Pistache::Http::ResponseWriter &response) = 0; const SmContextMessage& smContextMessage,
Pistache::Http::ResponseWriter& response) = 0;
}; };
} } // namespace api
} } // namespace smf_server
} } // namespace oai
#endif /* SMContextsCollectionApi_H_ */ #endif /* SMContextsCollectionApi_H_ */
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
#include "SubscriptionsCollectionApi.h" #include "SubscriptionsCollectionApi.h"
#include "Helpers.h" #include "Helpers.h"
...@@ -23,7 +24,8 @@ namespace api { ...@@ -23,7 +24,8 @@ namespace api {
using namespace oai::smf_server::helpers; using namespace oai::smf_server::helpers;
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
SubscriptionsCollectionApi::SubscriptionsCollectionApi(std::shared_ptr<Pistache::Rest::Router> rtr) { SubscriptionsCollectionApi::SubscriptionsCollectionApi(
std::shared_ptr<Pistache::Rest::Router> rtr) {
router = rtr; router = rtr;
} }
...@@ -34,14 +36,21 @@ void SubscriptionsCollectionApi::init() { ...@@ -34,14 +36,21 @@ void SubscriptionsCollectionApi::init() {
void SubscriptionsCollectionApi::setupRoutes() { void SubscriptionsCollectionApi::setupRoutes() {
using namespace Pistache::Rest; using namespace Pistache::Rest;
Routes::Post(*router, base + smf_cfg.sbi_api_version + "/subscriptions", Routes::bind(&SubscriptionsCollectionApi::create_individual_subcription_handler, this)); Routes::Post(
*router, base + smf_cfg.sbi_api_version + "/subscriptions",
Routes::bind(
&SubscriptionsCollectionApi::create_individual_subcription_handler,
this));
// Default handler, called when a route is not found // Default handler, called when a route is not found
router->addCustomHandler(Routes::bind(&SubscriptionsCollectionApi::subscriptions_collection_api_default_handler, this)); router->addCustomHandler(Routes::bind(
&SubscriptionsCollectionApi::subscriptions_collection_api_default_handler,
this));
} }
void SubscriptionsCollectionApi::create_individual_subcription_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { void SubscriptionsCollectionApi::create_individual_subcription_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response) {
// Getting the body param // Getting the body param
NsmfEventExposure nsmfEventExposure; NsmfEventExposure nsmfEventExposure;
...@@ -49,26 +58,26 @@ void SubscriptionsCollectionApi::create_individual_subcription_handler(const Pis ...@@ -49,26 +58,26 @@ void SubscriptionsCollectionApi::create_individual_subcription_handler(const Pis
try { try {
nlohmann::json::parse(request.body()).get_to(nsmfEventExposure); nlohmann::json::parse(request.body()).get_to(nsmfEventExposure);
this->create_individual_subcription(nsmfEventExposure, response); this->create_individual_subcription(nsmfEventExposure, response);
} catch (nlohmann::detail::exception &e) { } catch (nlohmann::detail::exception& e) {
//send a 400 error // send a 400 error
response.send(Pistache::Http::Code::Bad_Request, e.what()); response.send(Pistache::Http::Code::Bad_Request, e.what());
return; return;
} catch (Pistache::Http::HttpError &e) { } catch (Pistache::Http::HttpError& e) {
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what()); response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
return; return;
} catch (std::exception &e) { } catch (std::exception& e) {
//send a 500 error // send a 500 error
response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
return; return;
} }
}
void SubscriptionsCollectionApi::subscriptions_collection_api_default_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
response.send(Pistache::Http::Code::Not_Found, "The requested method does not exist");
} }
} void SubscriptionsCollectionApi::subscriptions_collection_api_default_handler(
} const Pistache::Rest::Request&, Pistache::Http::ResponseWriter response) {
response.send(
Pistache::Http::Code::Not_Found, "The requested method does not exist");
} }
} // namespace api
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* SubscriptionsCollectionApi.h * SubscriptionsCollectionApi.h
* *
...@@ -18,13 +20,11 @@ ...@@ -18,13 +20,11 @@
#ifndef SubscriptionsCollectionApi_H_ #ifndef SubscriptionsCollectionApi_H_
#define SubscriptionsCollectionApi_H_ #define SubscriptionsCollectionApi_H_
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
#include <pistache/http_headers.h> #include <pistache/http_headers.h>
#include <pistache/optional.h> #include <pistache/optional.h>
#include "NsmfEventExposure.h" #include "NsmfEventExposure.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
...@@ -35,18 +35,22 @@ namespace api { ...@@ -35,18 +35,22 @@ namespace api {
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
class SubscriptionsCollectionApi { class SubscriptionsCollectionApi {
public: public:
SubscriptionsCollectionApi(std::shared_ptr<Pistache::Rest::Router>); SubscriptionsCollectionApi(std::shared_ptr<Pistache::Rest::Router>);
virtual ~SubscriptionsCollectionApi() {} virtual ~SubscriptionsCollectionApi() {}
void init(); void init();
const std::string base = "/nsmf_event-exposure/"; const std::string base = "/nsmf_event-exposure/";
private: private:
void setupRoutes(); void setupRoutes();
void create_individual_subcription_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void create_individual_subcription_handler(
void subscriptions_collection_api_default_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response);
void subscriptions_collection_api_default_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response);
std::shared_ptr<Pistache::Rest::Router> router; std::shared_ptr<Pistache::Rest::Router> router;
...@@ -57,13 +61,13 @@ private: ...@@ -57,13 +61,13 @@ private:
/// ///
/// </remarks> /// </remarks>
/// <param name="nsmfEventExposure"></param> /// <param name="nsmfEventExposure"></param>
virtual void create_individual_subcription(const NsmfEventExposure &nsmfEventExposure, Pistache::Http::ResponseWriter &response) = 0; virtual void create_individual_subcription(
const NsmfEventExposure& nsmfEventExposure,
Pistache::Http::ResponseWriter& response) = 0;
}; };
} } // namespace api
} } // namespace smf_server
} } // namespace oai
#endif /* SubscriptionsCollectionApi_H_ */ #endif /* SubscriptionsCollectionApi_H_ */
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*file except in compliance with the License. You may obtain a copy of the
*License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/ */
#include "IndividualPDUSessionHSMFApiImpl.h" #include "IndividualPDUSessionHSMFApiImpl.h"
...@@ -19,30 +41,29 @@ namespace api { ...@@ -19,30 +41,29 @@ namespace api {
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
IndividualPDUSessionHSMFApiImpl::IndividualPDUSessionHSMFApiImpl( IndividualPDUSessionHSMFApiImpl::IndividualPDUSessionHSMFApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, smf::smf_app *smf_app_inst, std::shared_ptr<Pistache::Rest::Router> rtr, smf::smf_app* smf_app_inst,
std::string address) std::string address)
: : IndividualPDUSessionHSMFApi(rtr),
IndividualPDUSessionHSMFApi(rtr),
m_smf_app(smf_app_inst), m_smf_app(smf_app_inst),
m_address(address) { m_address(address) {}
}
void IndividualPDUSessionHSMFApiImpl::release_pdu_session( void IndividualPDUSessionHSMFApiImpl::release_pdu_session(
const std::string &pduSessionRef, const ReleaseData &releaseData, const std::string& pduSessionRef, const ReleaseData& releaseData,
Pistache::Http::ResponseWriter &response) { Pistache::Http::ResponseWriter& response) {
Logger::smf_api_server().info("release_pdu_session..."); Logger::smf_api_server().info("release_pdu_session...");
response.send(Pistache::Http::Code::Not_Implemented, response.send(
Pistache::Http::Code::Not_Implemented,
"Release_pdu_session API has not been implemented yet!\n"); "Release_pdu_session API has not been implemented yet!\n");
} }
void IndividualPDUSessionHSMFApiImpl::update_pdu_session( void IndividualPDUSessionHSMFApiImpl::update_pdu_session(
const std::string &pduSessionRef, const HsmfUpdateData &hsmfUpdateData, const std::string& pduSessionRef, const HsmfUpdateData& hsmfUpdateData,
Pistache::Http::ResponseWriter &response) { Pistache::Http::ResponseWriter& response) {
Logger::smf_api_server().info("update_pdu_session..."); Logger::smf_api_server().info("update_pdu_session...");
response.send(Pistache::Http::Code::Not_Implemented, response.send(
Pistache::Http::Code::Not_Implemented,
"Update_pdu_session API has not been implemented yet!\n"); "Update_pdu_session API has not been implemented yet!\n");
} }
} } // namespace api
} } // namespace smf_server
} } // namespace oai
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*file except in compliance with the License. You may obtain a copy of the
*License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/ */
/* /*
...@@ -42,28 +64,28 @@ namespace api { ...@@ -42,28 +64,28 @@ namespace api {
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
class IndividualPDUSessionHSMFApiImpl : class IndividualPDUSessionHSMFApiImpl
public oai::smf_server::api::IndividualPDUSessionHSMFApi { : public oai::smf_server::api::IndividualPDUSessionHSMFApi {
public: public:
IndividualPDUSessionHSMFApiImpl(std::shared_ptr<Pistache::Rest::Router>, IndividualPDUSessionHSMFApiImpl(
smf::smf_app *smf_app_inst, std::shared_ptr<Pistache::Rest::Router>, smf::smf_app* smf_app_inst,
std::string address); std::string address);
~IndividualPDUSessionHSMFApiImpl() { ~IndividualPDUSessionHSMFApiImpl() {}
}
void release_pdu_session(
const std::string& pduSessionRef, const ReleaseData& releaseData,
Pistache::Http::ResponseWriter& response);
void update_pdu_session(
const std::string& pduSessionRef, const HsmfUpdateData& hsmfUpdateData,
Pistache::Http::ResponseWriter& response);
void release_pdu_session(const std::string &pduSessionRef,
const ReleaseData &releaseData,
Pistache::Http::ResponseWriter &response);
void update_pdu_session(const std::string &pduSessionRef,
const HsmfUpdateData &hsmfUpdateData,
Pistache::Http::ResponseWriter &response);
private: private:
smf::smf_app *m_smf_app; smf::smf_app* m_smf_app;
std::string m_address; std::string m_address;
}; };
} } // namespace api
} } // namespace smf_server
} } // namespace oai
#endif #endif
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
/*
* IndividualSMContextApiImpl.h
*
*
*/
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this
* except in compliance with the License. * file except in compliance with the License. You may obtain a copy of the
* You may obtain a copy of the License at * License at
* *
* http://www.openairinterface.org/?page_id=698 * http://www.openairinterface.org/?page_id=698
* *
...@@ -36,6 +32,12 @@ ...@@ -36,6 +32,12 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*
* IndividualSMContextApiImpl.h
*
*
*/
#ifndef INDIVIDUAL_SM_CONTEXT_API_IMPL_H_ #ifndef INDIVIDUAL_SM_CONTEXT_API_IMPL_H_
#define INDIVIDUAL_SM_CONTEXT_API_IMPL_H_ #define INDIVIDUAL_SM_CONTEXT_API_IMPL_H_
...@@ -66,36 +68,39 @@ namespace api { ...@@ -66,36 +68,39 @@ namespace api {
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
class IndividualSMContextApiImpl : class IndividualSMContextApiImpl
public oai::smf_server::api::IndividualSMContextApi { : public oai::smf_server::api::IndividualSMContextApi {
public: public:
IndividualSMContextApiImpl(std::shared_ptr<Pistache::Rest::Router>, IndividualSMContextApiImpl(
smf::smf_app *smf_app_inst, std::string address); std::shared_ptr<Pistache::Rest::Router>, smf::smf_app* smf_app_inst,
~IndividualSMContextApiImpl() { std::string address);
} ~IndividualSMContextApiImpl() {}
void release_sm_context( void release_sm_context(
const std::string &smContextRef, const std::string& smContextRef,
const SmContextReleaseMessage &smContextReleaseMessage, const SmContextReleaseMessage& smContextReleaseMessage,
Pistache::Http::ResponseWriter &response); Pistache::Http::ResponseWriter& response);
void retrieve_sm_context(const std::string &smContextRef, void retrieve_sm_context(
const SmContextRetrieveData &smContextRetrieveData, const std::string& smContextRef,
Pistache::Http::ResponseWriter &response); const SmContextRetrieveData& smContextRetrieveData,
void update_sm_context(const std::string &smContextRef, Pistache::Http::ResponseWriter& response);
const SmContextUpdateMessage &smContextUpdateMessage, void update_sm_context(
Pistache::Http::ResponseWriter &response); const std::string& smContextRef,
const SmContextUpdateMessage& smContextUpdateMessage,
Pistache::Http::ResponseWriter& response);
private: private:
smf::smf_app *m_smf_app; smf::smf_app* m_smf_app;
std::string m_address; std::string m_address;
protected: protected:
static uint64_t generate_promise_id() { static uint64_t generate_promise_id() {
return util::uint_uid_generator<uint64_t>::get_instance().get_uid(); return util::uint_uid_generator<uint64_t>::get_instance().get_uid();
} }
}; };
} } // namespace api
} } // namespace smf_server
} } // namespace oai
#endif #endif
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "IndividualSubscriptionDocumentApiImpl.h" #include "IndividualSubscriptionDocumentApiImpl.h"
...@@ -19,31 +42,40 @@ namespace api { ...@@ -19,31 +42,40 @@ namespace api {
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
IndividualSubscriptionDocumentApiImpl::IndividualSubscriptionDocumentApiImpl( IndividualSubscriptionDocumentApiImpl::IndividualSubscriptionDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, smf::smf_app *smf_app_inst, std::shared_ptr<Pistache::Rest::Router> rtr, smf::smf_app* smf_app_inst,
std::string address) std::string address)
: : IndividualSubscriptionDocumentApi(rtr),
IndividualSubscriptionDocumentApi(rtr),
m_smf_app(smf_app_inst), m_smf_app(smf_app_inst),
m_address(address) { m_address(address) {}
}
void IndividualSubscriptionDocumentApiImpl::delete_individual_subcription(const std::string &subId, Pistache::Http::ResponseWriter &response) { void IndividualSubscriptionDocumentApiImpl::delete_individual_subcription(
Logger::smf_api_server().info("IndividualSubscriptionDocumentApiImpl::delete_individual_subcription..."); const std::string& subId, Pistache::Http::ResponseWriter& response) {
response.send(Pistache::Http::Code::Not_Implemented, Logger::smf_api_server().info(
"IndividualSubscriptionDocumentApiImpl::delete_individual_subcription.."
".");
response.send(
Pistache::Http::Code::Not_Implemented,
"delete_individual_subcription API has not been implemented yet!\n"); "delete_individual_subcription API has not been implemented yet!\n");
} }
void IndividualSubscriptionDocumentApiImpl::get_individual_subcription(const std::string &subId, Pistache::Http::ResponseWriter &response) { void IndividualSubscriptionDocumentApiImpl::get_individual_subcription(
Logger::smf_api_server().info("IndividualSubscriptionDocumentApiImpl::get_individual_subcription..."); const std::string& subId, Pistache::Http::ResponseWriter& response) {
response.send(Pistache::Http::Code::Not_Implemented, Logger::smf_api_server().info(
"IndividualSubscriptionDocumentApiImpl::get_individual_subcription...");
response.send(
Pistache::Http::Code::Not_Implemented,
"get_individual_subcription API has not been implemented yet!\n"); "get_individual_subcription API has not been implemented yet!\n");
} }
void IndividualSubscriptionDocumentApiImpl::replace_individual_subcription(const std::string &subId, const NsmfEventExposure &nsmfEventExposure, Pistache::Http::ResponseWriter &response) { void IndividualSubscriptionDocumentApiImpl::replace_individual_subcription(
Logger::smf_api_server().info("IndividualSubscriptionDocumentApiImpl::replace_individual_subcription..."); const std::string& subId, const NsmfEventExposure& nsmfEventExposure,
response.send(Pistache::Http::Code::Not_Implemented, Pistache::Http::ResponseWriter& response) {
Logger::smf_api_server().info(
"IndividualSubscriptionDocumentApiImpl::replace_individual_subcription.."
".");
response.send(
Pistache::Http::Code::Not_Implemented,
"replace_individual_subcription API has not been implemented yet!\n"); "replace_individual_subcription API has not been implemented yet!\n");
} }
} } // namespace api
} } // namespace smf_server
} } // namespace oai
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* IndividualSubscriptionDocumentApiImpl.h * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* * contributor license agreements. See the NOTICE file distributed with
* * this work for additional information regarding copyright ownership.
*/ * The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*
* IndividualSubscriptionDocumentApiImpl.h
*
*
*/
#ifndef INDIVIDUAL_SUBSCRIPTION_DOCUMENT_API_IMPL_H_ #ifndef INDIVIDUAL_SUBSCRIPTION_DOCUMENT_API_IMPL_H_
#define INDIVIDUAL_SUBSCRIPTION_DOCUMENT_API_IMPL_H_ #define INDIVIDUAL_SUBSCRIPTION_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -40,25 +82,29 @@ namespace api { ...@@ -40,25 +82,29 @@ namespace api {
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
class IndividualSubscriptionDocumentApiImpl : public oai::smf_server::api::IndividualSubscriptionDocumentApi { class IndividualSubscriptionDocumentApiImpl
public: : public oai::smf_server::api::IndividualSubscriptionDocumentApi {
IndividualSubscriptionDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>, public:
smf::smf_app *smf_app_inst, std::string address); IndividualSubscriptionDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router>, smf::smf_app* smf_app_inst,
std::string address);
~IndividualSubscriptionDocumentApiImpl() {} ~IndividualSubscriptionDocumentApiImpl() {}
void delete_individual_subcription(const std::string &subId, Pistache::Http::ResponseWriter &response); void delete_individual_subcription(
void get_individual_subcription(const std::string &subId, Pistache::Http::ResponseWriter &response); const std::string& subId, Pistache::Http::ResponseWriter& response);
void replace_individual_subcription(const std::string &subId, const NsmfEventExposure &nsmfEventExposure, Pistache::Http::ResponseWriter &response); void get_individual_subcription(
const std::string& subId, Pistache::Http::ResponseWriter& response);
void replace_individual_subcription(
const std::string& subId, const NsmfEventExposure& nsmfEventExposure,
Pistache::Http::ResponseWriter& response);
private: private:
smf::smf_app *m_smf_app; smf::smf_app* m_smf_app;
std::string m_address; std::string m_address;
}; };
} } // namespace api
} } // namespace smf_server
} } // namespace oai
#endif #endif
...@@ -11,6 +11,27 @@ ...@@ -11,6 +11,27 @@
* the class manually. * the class manually.
*/ */
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "NFStatusNotifyApiImpl.h" #include "NFStatusNotifyApiImpl.h"
#include "logger.hpp" #include "logger.hpp"
......
...@@ -17,6 +17,28 @@ ...@@ -17,6 +17,28 @@
* *
*/ */
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef NF_STATUS_NOTIFY_API_IMPL_H_ #ifndef NF_STATUS_NOTIFY_API_IMPL_H_
#define NF_STATUS_NOTIFY_API_IMPL_H_ #define NF_STATUS_NOTIFY_API_IMPL_H_
......
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "PDUSessionsCollectionApiImpl.h" #include "PDUSessionsCollectionApiImpl.h"
namespace oai { namespace oai {
...@@ -19,24 +42,21 @@ namespace api { ...@@ -19,24 +42,21 @@ namespace api {
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
PDUSessionsCollectionApiImpl::PDUSessionsCollectionApiImpl( PDUSessionsCollectionApiImpl::PDUSessionsCollectionApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, smf::smf_app *smf_app_inst, std::shared_ptr<Pistache::Rest::Router> rtr, smf::smf_app* smf_app_inst,
std::string address) std::string address)
: : PDUSessionsCollectionApi(rtr),
PDUSessionsCollectionApi(rtr),
m_smf_app(smf_app_inst), m_smf_app(smf_app_inst),
m_address(address) { m_address(address) {}
}
void PDUSessionsCollectionApiImpl::post_pdu_sessions( void PDUSessionsCollectionApiImpl::post_pdu_sessions(
const PduSessionCreateData &pduSessionCreateData, const PduSessionCreateData& pduSessionCreateData,
Pistache::Http::ResponseWriter &response) { Pistache::Http::ResponseWriter& response) {
Logger::smf_api_server().info("post_pdu_sessions..."); Logger::smf_api_server().info("post_pdu_sessions...");
response.send(Pistache::Http::Code::Not_Implemented, response.send(
Pistache::Http::Code::Not_Implemented,
"Post_pdu_sessions API has not been implemented yet!\n"); "Post_pdu_sessions API has not been implemented yet!\n");
}
}
}
} }
} // namespace api
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/ */
/* /*
...@@ -40,23 +62,25 @@ namespace api { ...@@ -40,23 +62,25 @@ namespace api {
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
class PDUSessionsCollectionApiImpl : class PDUSessionsCollectionApiImpl
public oai::smf_server::api::PDUSessionsCollectionApi { : public oai::smf_server::api::PDUSessionsCollectionApi {
public: public:
PDUSessionsCollectionApiImpl(std::shared_ptr<Pistache::Rest::Router>, PDUSessionsCollectionApiImpl(
smf::smf_app *smf_app_inst, std::string address); std::shared_ptr<Pistache::Rest::Router>, smf::smf_app* smf_app_inst,
~PDUSessionsCollectionApiImpl() { std::string address);
} ~PDUSessionsCollectionApiImpl() {}
void post_pdu_sessions(
const PduSessionCreateData& pduSessionCreateData,
Pistache::Http::ResponseWriter& response);
void post_pdu_sessions(const PduSessionCreateData &pduSessionCreateData,
Pistache::Http::ResponseWriter &response);
private: private:
smf::smf_app *m_smf_app; smf::smf_app* m_smf_app;
std::string m_address; std::string m_address;
}; };
} } // namespace api
} } // namespace smf_server
} } // namespace oai
#endif #endif
This diff is collapsed.
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
/*
* SMContextsCollectionApiImpl.h
*
*
*/
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this
* except in compliance with the License. * file except in compliance with the License. You may obtain a copy of the
* You may obtain a copy of the License at * License at
* *
* http://www.openairinterface.org/?page_id=698 * http://www.openairinterface.org/?page_id=698
* *
...@@ -36,6 +32,12 @@ ...@@ -36,6 +32,12 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*
* SMContextsCollectionApiImpl.h
*
*
*/
#ifndef SM_CONTEXTS_COLLECTION_API_IMPL_H_ #ifndef SM_CONTEXTS_COLLECTION_API_IMPL_H_
#define SM_CONTEXTS_COLLECTION_API_IMPL_H_ #define SM_CONTEXTS_COLLECTION_API_IMPL_H_
...@@ -60,28 +62,30 @@ namespace api { ...@@ -60,28 +62,30 @@ namespace api {
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
class SMContextsCollectionApiImpl : class SMContextsCollectionApiImpl
public oai::smf_server::api::SMContextsCollectionApi { : public oai::smf_server::api::SMContextsCollectionApi {
public: public:
SMContextsCollectionApiImpl(std::shared_ptr<Pistache::Rest::Router>, SMContextsCollectionApiImpl(
smf::smf_app *smf_app_inst, std::string address); std::shared_ptr<Pistache::Rest::Router>, smf::smf_app* smf_app_inst,
~SMContextsCollectionApiImpl() { std::string address);
} ~SMContextsCollectionApiImpl() {}
void post_sm_contexts(
const SmContextMessage& smContextMessage,
Pistache::Http::ResponseWriter& response);
void post_sm_contexts(const SmContextMessage &smContextMessage,
Pistache::Http::ResponseWriter &response);
private: private:
smf::smf_app *m_smf_app; smf::smf_app* m_smf_app;
std::string m_address; std::string m_address;
protected: protected:
static uint64_t generate_promise_id() { static uint64_t generate_promise_id() {
return util::uint_uid_generator<uint64_t>::get_instance().get_uid(); return util::uint_uid_generator<uint64_t>::get_instance().get_uid();
} }
}; };
} } // namespace api
} } // namespace smf_server
} } // namespace oai
#endif #endif
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "SubscriptionsCollectionApiImpl.h" #include "SubscriptionsCollectionApiImpl.h"
...@@ -27,28 +49,26 @@ namespace api { ...@@ -27,28 +49,26 @@ namespace api {
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
SubscriptionsCollectionApiImpl::SubscriptionsCollectionApiImpl( SubscriptionsCollectionApiImpl::SubscriptionsCollectionApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, smf::smf_app *smf_app_inst, std::shared_ptr<Pistache::Rest::Router> rtr, smf::smf_app* smf_app_inst,
std::string address) std::string address)
: : SubscriptionsCollectionApi(rtr),
SubscriptionsCollectionApi(rtr),
m_smf_app(smf_app_inst), m_smf_app(smf_app_inst),
m_address(address) { m_address(address) {}
}
void SubscriptionsCollectionApiImpl::create_individual_subcription( void SubscriptionsCollectionApiImpl::create_individual_subcription(
const NsmfEventExposure &nsmfEventExposure, const NsmfEventExposure& nsmfEventExposure,
Pistache::Http::ResponseWriter &response) { Pistache::Http::ResponseWriter& response) {
Logger::smf_api_server().info( Logger::smf_api_server().info(
"SubscriptionsCollectionApiImpl::create_individual_subcription..."); "SubscriptionsCollectionApiImpl::create_individual_subcription...");
//Step1. Create a message and store the necessary information // Step1. Create a message and store the necessary information
Logger::smf_api_server().debug( Logger::smf_api_server().debug(
"Create a Event Exposure message and store the necessary information"); "Create a Event Exposure message and store the necessary information");
smf::event_exposure_msg event_exposure = { }; smf::event_exposure_msg event_exposure = {};
//Supi // Supi
if (nsmfEventExposure.supiIsSet()) { if (nsmfEventExposure.supiIsSet()) {
supi_t supi = { .length = 0 }; supi_t supi = {.length = 0};
std::size_t pos = nsmfEventExposure.getSupi().find("-"); std::size_t pos = nsmfEventExposure.getSupi().find("-");
std::string supi_str = nsmfEventExposure.getSupi().substr(pos + 1); std::string supi_str = nsmfEventExposure.getSupi().substr(pos + 1);
std::string supi_prefix = nsmfEventExposure.getSupi().substr(0, pos); std::string supi_prefix = nsmfEventExposure.getSupi().substr(0, pos);
...@@ -56,60 +76,60 @@ void SubscriptionsCollectionApiImpl::create_individual_subcription( ...@@ -56,60 +76,60 @@ void SubscriptionsCollectionApiImpl::create_individual_subcription(
event_exposure.set_supi(supi); event_exposure.set_supi(supi);
event_exposure.set_supi_prefix(supi_prefix); event_exposure.set_supi_prefix(supi_prefix);
Logger::smf_api_server().debug("SUPI %s, SUPI Prefix %s, IMSI %s", Logger::smf_api_server().debug(
nsmfEventExposure.getSupi().c_str(), "SUPI %s, SUPI Prefix %s, IMSI %s", nsmfEventExposure.getSupi().c_str(),
supi_prefix.c_str(), supi_str.c_str()); supi_prefix.c_str(), supi_str.c_str());
} }
//PDU session ID // PDU session ID
if (nsmfEventExposure.pduSeIdIsSet()) { if (nsmfEventExposure.pduSeIdIsSet()) {
Logger::smf_api_server().debug("PDU Session ID %d", Logger::smf_api_server().debug(
nsmfEventExposure.getPduSeId()); "PDU Session ID %d", nsmfEventExposure.getPduSeId());
event_exposure.set_pdu_session_id(nsmfEventExposure.getPduSeId()); event_exposure.set_pdu_session_id(nsmfEventExposure.getPduSeId());
} }
event_exposure.set_notif_id(nsmfEventExposure.getNotifId()); //NotifId event_exposure.set_notif_id(nsmfEventExposure.getNotifId()); // NotifId
event_exposure.set_notif_uri(nsmfEventExposure.getNotifUri()); //NotifUri event_exposure.set_notif_uri(nsmfEventExposure.getNotifUri()); // NotifUri
//EventSubscription: TODO // EventSubscription: TODO
event_subscription_t event_subscription = { }; event_subscription_t event_subscription = {};
event_subscription.smf_event = smf_event_t::SMF_EVENT_PDU_SES_REL; event_subscription.smf_event = smf_event_t::SMF_EVENT_PDU_SES_REL;
std::vector<event_subscription_t> event_subscriptions = { }; std::vector<event_subscription_t> event_subscriptions = {};
event_subscriptions.push_back(event_subscription); event_subscriptions.push_back(event_subscription);
event_exposure.set_event_subs(event_subscriptions); event_exposure.set_event_subs(event_subscriptions);
//std::vector<EventSubscription> eventSubscriptions; // std::vector<EventSubscription> eventSubscriptions;
//for (auto it: nsmfEventExposure.getEventSubs()){ // for (auto it: nsmfEventExposure.getEventSubs()){
//event_subscription.smf_event = it.getEvent(); // event_subscription.smf_event = it.getEvent();
//getDnaiChgType // getDnaiChgType
//event_subscriptions.push_back(event_subscription); // event_subscriptions.push_back(event_subscription);
//} //}
//Step 2. Handle the message in smf_app // Step 2. Handle the message in smf_app
std::shared_ptr<itti_sbi_event_exposure_request> itti_msg = std::make_shared std::shared_ptr<itti_sbi_event_exposure_request> itti_msg =
< itti_sbi_event_exposure_request > (TASK_SMF_N11, TASK_SMF_APP); std::make_shared<itti_sbi_event_exposure_request>(
TASK_SMF_N11, TASK_SMF_APP);
itti_msg->event_exposure = event_exposure; itti_msg->event_exposure = event_exposure;
itti_msg->http_version = 1; itti_msg->http_version = 1;
evsub_id_t sub_id = m_smf_app->handle_event_exposure_subscription(itti_msg); evsub_id_t sub_id = m_smf_app->handle_event_exposure_subscription(itti_msg);
//send response // send response
nlohmann::json json_data = { }; nlohmann::json json_data = {};
to_json(json_data, nsmfEventExposure); to_json(json_data, nsmfEventExposure);
if (sub_id != -1) { if (sub_id != -1) {
json_data["subId"] = std::to_string(sub_id); json_data["subId"] = std::to_string(sub_id);
response.headers().add < Pistache::Http::Header::Location response.headers().add<Pistache::Http::Header::Location>(
> (m_address + base + smf_cfg.sbi_api_version + "/nsmf_event-exposure/" m_address + base + smf_cfg.sbi_api_version + "/nsmf_event-exposure/" +
+ std::to_string(sub_id)); //Location header std::to_string(sub_id)); // Location header
} }
response.headers().add < Pistache::Http::Header::ContentType response.headers().add<Pistache::Http::Header::ContentType>(
> (Pistache::Http::Mime::MediaType("application/json")); Pistache::Http::Mime::MediaType("application/json"));
response.send(Pistache::Http::Code(201), json_data.dump().c_str()); response.send(Pistache::Http::Code(201), json_data.dump().c_str());
} }
} } // namespace api
} } // namespace smf_server
} } // namespace oai
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* SubscriptionsCollectionApiImpl.h * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* * contributor license agreements. See the NOTICE file distributed with
* * this work for additional information regarding copyright ownership.
*/ * The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*
* SubscriptionsCollectionApiImpl.h
*
*
*/
#ifndef SUBSCRIPTIONS_COLLECTION_API_IMPL_H_ #ifndef SUBSCRIPTIONS_COLLECTION_API_IMPL_H_
#define SUBSCRIPTIONS_COLLECTION_API_IMPL_H_ #define SUBSCRIPTIONS_COLLECTION_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -39,27 +60,30 @@ namespace api { ...@@ -39,27 +60,30 @@ namespace api {
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
class SubscriptionsCollectionApiImpl : public oai::smf_server::api::SubscriptionsCollectionApi { class SubscriptionsCollectionApiImpl
public: : public oai::smf_server::api::SubscriptionsCollectionApi {
SubscriptionsCollectionApiImpl(std::shared_ptr<Pistache::Rest::Router>, public:
smf::smf_app *smf_app_inst, std::string address); SubscriptionsCollectionApiImpl(
std::shared_ptr<Pistache::Rest::Router>, smf::smf_app* smf_app_inst,
std::string address);
~SubscriptionsCollectionApiImpl() {} ~SubscriptionsCollectionApiImpl() {}
void create_individual_subcription(const NsmfEventExposure &nsmfEventExposure, Pistache::Http::ResponseWriter &response); void create_individual_subcription(
const NsmfEventExposure& nsmfEventExposure,
Pistache::Http::ResponseWriter& response);
private: private:
smf::smf_app *m_smf_app; smf::smf_app* m_smf_app;
std::string m_address; std::string m_address;
protected:
protected:
static uint64_t generate_promise_id() { static uint64_t generate_promise_id() {
return util::uint_uid_generator<uint64_t>::get_instance().get_uid(); return util::uint_uid_generator<uint64_t>::get_instance().get_uid();
} }
}; };
} } // namespace api
} } // namespace smf_server
} } // namespace oai
#endif #endif
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
#include "AccessType.h" #include "AccessType.h"
...@@ -17,31 +17,20 @@ namespace oai { ...@@ -17,31 +17,20 @@ namespace oai {
namespace smf_server { namespace smf_server {
namespace model { namespace model {
AccessType::AccessType() AccessType::AccessType() {}
{
} AccessType::~AccessType() {}
AccessType::~AccessType() void AccessType::validate() {
{
}
void AccessType::validate()
{
// TODO: implement validation // TODO: implement validation
} }
void to_json(nlohmann::json& j, const AccessType& o) void to_json(nlohmann::json& j, const AccessType& o) {
{
j = nlohmann::json(); j = nlohmann::json();
} }
void from_json(const nlohmann::json& j, AccessType& o) void from_json(const nlohmann::json& j, AccessType& o) {}
{
}
}
}
}
} // namespace model
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* AccessType.h * AccessType.h
* *
...@@ -18,7 +19,6 @@ ...@@ -18,7 +19,6 @@
#ifndef AccessType_H_ #ifndef AccessType_H_
#define AccessType_H_ #define AccessType_H_
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai {
...@@ -28,9 +28,8 @@ namespace model { ...@@ -28,9 +28,8 @@ namespace model {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
class AccessType class AccessType {
{ public:
public:
AccessType(); AccessType();
virtual ~AccessType(); virtual ~AccessType();
...@@ -39,14 +38,14 @@ public: ...@@ -39,14 +38,14 @@ public:
///////////////////////////////////////////// /////////////////////////////////////////////
/// AccessType members /// AccessType members
friend void to_json(nlohmann::json& j, const AccessType& o); friend void to_json(nlohmann::json& j, const AccessType& o);
friend void from_json(const nlohmann::json& j, AccessType& o); friend void from_json(const nlohmann::json& j, AccessType& o);
protected:
protected:
}; };
} } // namespace model
} } // namespace smf_server
} } // namespace oai
#endif /* AccessType_H_ */ #endif /* AccessType_H_ */
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
#include "AdditionalQosFlowInfo.h" #include "AdditionalQosFlowInfo.h"
...@@ -17,31 +17,20 @@ namespace oai { ...@@ -17,31 +17,20 @@ namespace oai {
namespace smf_server { namespace smf_server {
namespace model { namespace model {
AdditionalQosFlowInfo::AdditionalQosFlowInfo() AdditionalQosFlowInfo::AdditionalQosFlowInfo() {}
{
} AdditionalQosFlowInfo::~AdditionalQosFlowInfo() {}
AdditionalQosFlowInfo::~AdditionalQosFlowInfo() void AdditionalQosFlowInfo::validate() {
{
}
void AdditionalQosFlowInfo::validate()
{
// TODO: implement validation // TODO: implement validation
} }
void to_json(nlohmann::json& j, const AdditionalQosFlowInfo& o) void to_json(nlohmann::json& j, const AdditionalQosFlowInfo& o) {
{
j = nlohmann::json(); j = nlohmann::json();
} }
void from_json(const nlohmann::json& j, AdditionalQosFlowInfo& o) void from_json(const nlohmann::json& j, AdditionalQosFlowInfo& o) {}
{
}
}
}
}
} // namespace model
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* AdditionalQosFlowInfo.h * AdditionalQosFlowInfo.h
* *
...@@ -18,7 +19,6 @@ ...@@ -18,7 +19,6 @@
#ifndef AdditionalQosFlowInfo_H_ #ifndef AdditionalQosFlowInfo_H_
#define AdditionalQosFlowInfo_H_ #define AdditionalQosFlowInfo_H_
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai {
...@@ -28,9 +28,8 @@ namespace model { ...@@ -28,9 +28,8 @@ namespace model {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
class AdditionalQosFlowInfo class AdditionalQosFlowInfo {
{ public:
public:
AdditionalQosFlowInfo(); AdditionalQosFlowInfo();
virtual ~AdditionalQosFlowInfo(); virtual ~AdditionalQosFlowInfo();
...@@ -39,14 +38,14 @@ public: ...@@ -39,14 +38,14 @@ public:
///////////////////////////////////////////// /////////////////////////////////////////////
/// AdditionalQosFlowInfo members /// AdditionalQosFlowInfo members
friend void to_json(nlohmann::json& j, const AdditionalQosFlowInfo& o); friend void to_json(nlohmann::json& j, const AdditionalQosFlowInfo& o);
friend void from_json(const nlohmann::json& j, AdditionalQosFlowInfo& o); friend void from_json(const nlohmann::json& j, AdditionalQosFlowInfo& o);
protected:
protected:
}; };
} } // namespace model
} } // namespace smf_server
} } // namespace oai
#endif /* AdditionalQosFlowInfo_H_ */ #endif /* AdditionalQosFlowInfo_H_ */
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
#include "Ambr.h" #include "Ambr.h"
...@@ -17,55 +17,41 @@ namespace oai { ...@@ -17,55 +17,41 @@ namespace oai {
namespace smf_server { namespace smf_server {
namespace model { namespace model {
Ambr::Ambr() Ambr::Ambr() {
{
m_Uplink = ""; m_Uplink = "";
m_Downlink = ""; m_Downlink = "";
} }
Ambr::~Ambr() Ambr::~Ambr() {}
{
}
void Ambr::validate() void Ambr::validate() {
{
// TODO: implement validation // TODO: implement validation
} }
void to_json(nlohmann::json& j, const Ambr& o) void to_json(nlohmann::json& j, const Ambr& o) {
{
j = nlohmann::json(); j = nlohmann::json();
j["uplink"] = o.m_Uplink; j["uplink"] = o.m_Uplink;
j["downlink"] = o.m_Downlink; j["downlink"] = o.m_Downlink;
} }
void from_json(const nlohmann::json& j, Ambr& o) void from_json(const nlohmann::json& j, Ambr& o) {
{
j.at("uplink").get_to(o.m_Uplink); j.at("uplink").get_to(o.m_Uplink);
j.at("downlink").get_to(o.m_Downlink); j.at("downlink").get_to(o.m_Downlink);
} }
std::string Ambr::getUplink() const std::string Ambr::getUplink() const {
{
return m_Uplink; return m_Uplink;
} }
void Ambr::setUplink(std::string const& value) void Ambr::setUplink(std::string const& value) {
{
m_Uplink = value; m_Uplink = value;
} }
std::string Ambr::getDownlink() const std::string Ambr::getDownlink() const {
{
return m_Downlink; return m_Downlink;
} }
void Ambr::setDownlink(std::string const& value) void Ambr::setDownlink(std::string const& value) {
{
m_Downlink = value; m_Downlink = value;
}
}
}
} }
} // namespace model
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* Ambr.h * Ambr.h
* *
...@@ -18,7 +19,6 @@ ...@@ -18,7 +19,6 @@
#ifndef Ambr_H_ #ifndef Ambr_H_
#define Ambr_H_ #define Ambr_H_
#include <string> #include <string>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
...@@ -29,9 +29,8 @@ namespace model { ...@@ -29,9 +29,8 @@ namespace model {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
class Ambr class Ambr {
{ public:
public:
Ambr(); Ambr();
virtual ~Ambr(); virtual ~Ambr();
...@@ -53,15 +52,15 @@ public: ...@@ -53,15 +52,15 @@ public:
friend void to_json(nlohmann::json& j, const Ambr& o); friend void to_json(nlohmann::json& j, const Ambr& o);
friend void from_json(const nlohmann::json& j, Ambr& o); friend void from_json(const nlohmann::json& j, Ambr& o);
protected:
protected:
std::string m_Uplink; std::string m_Uplink;
std::string m_Downlink; std::string m_Downlink;
}; };
} } // namespace model
} } // namespace smf_server
} } // namespace oai
#endif /* Ambr_H_ */ #endif /* Ambr_H_ */
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
#include "Arp.h" #include "Arp.h"
...@@ -17,65 +17,48 @@ namespace oai { ...@@ -17,65 +17,48 @@ namespace oai {
namespace smf_server { namespace smf_server {
namespace model { namespace model {
Arp::Arp() Arp::Arp() {
{
m_PriorityLevel = 0; m_PriorityLevel = 0;
} }
Arp::~Arp() Arp::~Arp() {}
{
}
void Arp::validate() void Arp::validate() {
{
// TODO: implement validation // TODO: implement validation
} }
void to_json(nlohmann::json& j, const Arp& o) void to_json(nlohmann::json& j, const Arp& o) {
{
j = nlohmann::json(); j = nlohmann::json();
j["priorityLevel"] = o.m_PriorityLevel; j["priorityLevel"] = o.m_PriorityLevel;
j["preemptCap"] = o.m_PreemptCap; j["preemptCap"] = o.m_PreemptCap;
j["preemptVuln"] = o.m_PreemptVuln; j["preemptVuln"] = o.m_PreemptVuln;
} }
void from_json(const nlohmann::json& j, Arp& o) void from_json(const nlohmann::json& j, Arp& o) {
{
j.at("priorityLevel").get_to(o.m_PriorityLevel); j.at("priorityLevel").get_to(o.m_PriorityLevel);
j.at("preemptCap").get_to(o.m_PreemptCap); j.at("preemptCap").get_to(o.m_PreemptCap);
j.at("preemptVuln").get_to(o.m_PreemptVuln); j.at("preemptVuln").get_to(o.m_PreemptVuln);
} }
int32_t Arp::getPriorityLevel() const int32_t Arp::getPriorityLevel() const {
{
return m_PriorityLevel; return m_PriorityLevel;
} }
void Arp::setPriorityLevel(int32_t const value) void Arp::setPriorityLevel(int32_t const value) {
{
m_PriorityLevel = value; m_PriorityLevel = value;
} }
PreemptionCapability Arp::getPreemptCap() const PreemptionCapability Arp::getPreemptCap() const {
{
return m_PreemptCap; return m_PreemptCap;
} }
void Arp::setPreemptCap(PreemptionCapability const& value) void Arp::setPreemptCap(PreemptionCapability const& value) {
{
m_PreemptCap = value; m_PreemptCap = value;
} }
PreemptionVulnerability Arp::getPreemptVuln() const PreemptionVulnerability Arp::getPreemptVuln() const {
{
return m_PreemptVuln; return m_PreemptVuln;
} }
void Arp::setPreemptVuln(PreemptionVulnerability const& value) void Arp::setPreemptVuln(PreemptionVulnerability const& value) {
{
m_PreemptVuln = value; m_PreemptVuln = value;
}
}
}
} }
} // namespace model
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* Arp.h * Arp.h
* *
...@@ -18,7 +19,6 @@ ...@@ -18,7 +19,6 @@
#ifndef Arp_H_ #ifndef Arp_H_
#define Arp_H_ #define Arp_H_
#include "PreemptionCapability.h" #include "PreemptionCapability.h"
#include "PreemptionVulnerability.h" #include "PreemptionVulnerability.h"
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
...@@ -30,9 +30,8 @@ namespace model { ...@@ -30,9 +30,8 @@ namespace model {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
class Arp class Arp {
{ public:
public:
Arp(); Arp();
virtual ~Arp(); virtual ~Arp();
...@@ -59,17 +58,17 @@ public: ...@@ -59,17 +58,17 @@ public:
friend void to_json(nlohmann::json& j, const Arp& o); friend void to_json(nlohmann::json& j, const Arp& o);
friend void from_json(const nlohmann::json& j, Arp& o); friend void from_json(const nlohmann::json& j, Arp& o);
protected:
protected:
int32_t m_PriorityLevel; int32_t m_PriorityLevel;
PreemptionCapability m_PreemptCap; PreemptionCapability m_PreemptCap;
PreemptionVulnerability m_PreemptVuln; PreemptionVulnerability m_PreemptVuln;
}; };
} } // namespace model
} } // namespace smf_server
} } // namespace oai
#endif /* Arp_H_ */ #endif /* Arp_H_ */
/** /**
* NRF NFManagement Service * NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
#include "AtsssCapability.h" #include "AtsssCapability.h"
...@@ -21,25 +22,21 @@ AtsssCapability::AtsssCapability() { ...@@ -21,25 +22,21 @@ AtsssCapability::AtsssCapability() {
m_AtsssLLIsSet = false; m_AtsssLLIsSet = false;
m_Mptcp = false; m_Mptcp = false;
m_MptcpIsSet = false; m_MptcpIsSet = false;
} }
AtsssCapability::~AtsssCapability() { AtsssCapability::~AtsssCapability() {}
}
void AtsssCapability::validate() { void AtsssCapability::validate() {
// TODO: implement validation // TODO: implement validation
} }
void to_json(nlohmann::json &j, const AtsssCapability &o) { void to_json(nlohmann::json& j, const AtsssCapability& o) {
j = nlohmann::json(); j = nlohmann::json();
if (o.atsssLLIsSet()) if (o.atsssLLIsSet()) j["atsssLL"] = o.m_AtsssLL;
j["atsssLL"] = o.m_AtsssLL; if (o.mptcpIsSet()) j["mptcp"] = o.m_Mptcp;
if (o.mptcpIsSet())
j["mptcp"] = o.m_Mptcp;
} }
void from_json(const nlohmann::json &j, AtsssCapability &o) { void from_json(const nlohmann::json& j, AtsssCapability& o) {
if (j.find("atsssLL") != j.end()) { if (j.find("atsssLL") != j.end()) {
j.at("atsssLL").get_to(o.m_AtsssLL); j.at("atsssLL").get_to(o.m_AtsssLL);
o.m_AtsssLLIsSet = true; o.m_AtsssLLIsSet = true;
...@@ -77,7 +74,6 @@ void AtsssCapability::unsetMptcp() { ...@@ -77,7 +74,6 @@ void AtsssCapability::unsetMptcp() {
m_MptcpIsSet = false; m_MptcpIsSet = false;
} }
} } // namespace model
} } // namespace smf_server
} } // namespace oai
/** /**
* NRF NFManagement Service * NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
/* /*
* AtsssCapability.h * AtsssCapability.h
...@@ -52,8 +53,9 @@ class AtsssCapability { ...@@ -52,8 +53,9 @@ class AtsssCapability {
bool mptcpIsSet() const; bool mptcpIsSet() const;
void unsetMptcp(); void unsetMptcp();
friend void to_json(nlohmann::json &j, const AtsssCapability &o); friend void to_json(nlohmann::json& j, const AtsssCapability& o);
friend void from_json(const nlohmann::json &j, AtsssCapability &o); friend void from_json(const nlohmann::json& j, AtsssCapability& o);
protected: protected:
bool m_AtsssLL; bool m_AtsssLL;
bool m_AtsssLLIsSet; bool m_AtsssLLIsSet;
...@@ -61,8 +63,8 @@ class AtsssCapability { ...@@ -61,8 +63,8 @@ class AtsssCapability {
bool m_MptcpIsSet; bool m_MptcpIsSet;
}; };
} } // namespace model
} } // namespace smf_server
} } // namespace oai
#endif /* AtsssCapability_H_ */ #endif /* AtsssCapability_H_ */
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
#include "BackupAmfInfo.h" #include "BackupAmfInfo.h"
...@@ -17,63 +17,47 @@ namespace oai { ...@@ -17,63 +17,47 @@ namespace oai {
namespace smf_server { namespace smf_server {
namespace model { namespace model {
BackupAmfInfo::BackupAmfInfo() BackupAmfInfo::BackupAmfInfo() {
{
m_BackupAmf = ""; m_BackupAmf = "";
m_GuamiListIsSet = false; m_GuamiListIsSet = false;
} }
BackupAmfInfo::~BackupAmfInfo() BackupAmfInfo::~BackupAmfInfo() {}
{
}
void BackupAmfInfo::validate() void BackupAmfInfo::validate() {
{
// TODO: implement validation // TODO: implement validation
} }
void to_json(nlohmann::json& j, const BackupAmfInfo& o) void to_json(nlohmann::json& j, const BackupAmfInfo& o) {
{
j = nlohmann::json(); j = nlohmann::json();
j["backupAmf"] = o.m_BackupAmf; j["backupAmf"] = o.m_BackupAmf;
if(o.guamiListIsSet()) if (o.guamiListIsSet()) j["guamiList"] = o.m_GuamiList;
j["guamiList"] = o.m_GuamiList;
} }
void from_json(const nlohmann::json& j, BackupAmfInfo& o) void from_json(const nlohmann::json& j, BackupAmfInfo& o) {
{
j.at("backupAmf").get_to(o.m_BackupAmf); j.at("backupAmf").get_to(o.m_BackupAmf);
if(j.find("guamiList") != j.end()) if (j.find("guamiList") != j.end()) {
{
j.at("guamiList").get_to(o.m_GuamiList); j.at("guamiList").get_to(o.m_GuamiList);
o.m_GuamiListIsSet = true; o.m_GuamiListIsSet = true;
} }
} }
std::string BackupAmfInfo::getBackupAmf() const std::string BackupAmfInfo::getBackupAmf() const {
{
return m_BackupAmf; return m_BackupAmf;
} }
void BackupAmfInfo::setBackupAmf(std::string const& value) void BackupAmfInfo::setBackupAmf(std::string const& value) {
{
m_BackupAmf = value; m_BackupAmf = value;
} }
std::vector<Guami>& BackupAmfInfo::getGuamiList() std::vector<Guami>& BackupAmfInfo::getGuamiList() {
{
return m_GuamiList; return m_GuamiList;
} }
bool BackupAmfInfo::guamiListIsSet() const bool BackupAmfInfo::guamiListIsSet() const {
{
return m_GuamiListIsSet; return m_GuamiListIsSet;
} }
void BackupAmfInfo::unsetGuamiList() void BackupAmfInfo::unsetGuamiList() {
{
m_GuamiListIsSet = false; m_GuamiListIsSet = false;
} }
} } // namespace model
} } // namespace smf_server
} } // namespace oai
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* BackupAmfInfo.h * BackupAmfInfo.h
* *
...@@ -18,7 +19,6 @@ ...@@ -18,7 +19,6 @@
#ifndef BackupAmfInfo_H_ #ifndef BackupAmfInfo_H_
#define BackupAmfInfo_H_ #define BackupAmfInfo_H_
#include <string> #include <string>
#include <vector> #include <vector>
#include "Guami.h" #include "Guami.h"
...@@ -31,9 +31,8 @@ namespace model { ...@@ -31,9 +31,8 @@ namespace model {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
class BackupAmfInfo class BackupAmfInfo {
{ public:
public:
BackupAmfInfo(); BackupAmfInfo();
virtual ~BackupAmfInfo(); virtual ~BackupAmfInfo();
...@@ -56,15 +55,16 @@ public: ...@@ -56,15 +55,16 @@ public:
friend void to_json(nlohmann::json& j, const BackupAmfInfo& o); friend void to_json(nlohmann::json& j, const BackupAmfInfo& o);
friend void from_json(const nlohmann::json& j, BackupAmfInfo& o); friend void from_json(const nlohmann::json& j, BackupAmfInfo& o);
protected:
protected:
std::string m_BackupAmf; std::string m_BackupAmf;
std::vector<Guami> m_GuamiList; std::vector<Guami> m_GuamiList;
bool m_GuamiListIsSet; bool m_GuamiListIsSet;
}; };
} } // namespace model
} } // namespace smf_server
} } // namespace oai
#endif /* BackupAmfInfo_H_ */ #endif /* BackupAmfInfo_H_ */
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
#include "Cause.h" #include "Cause.h"
...@@ -17,31 +17,20 @@ namespace oai { ...@@ -17,31 +17,20 @@ namespace oai {
namespace smf_server { namespace smf_server {
namespace model { namespace model {
Cause::Cause() Cause::Cause() {}
{
} Cause::~Cause() {}
Cause::~Cause() void Cause::validate() {
{
}
void Cause::validate()
{
// TODO: implement validation // TODO: implement validation
} }
void to_json(nlohmann::json& j, const Cause& o) void to_json(nlohmann::json& j, const Cause& o) {
{
j = nlohmann::json(); j = nlohmann::json();
} }
void from_json(const nlohmann::json& j, Cause& o) void from_json(const nlohmann::json& j, Cause& o) {}
{
}
}
}
}
} // namespace model
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* Cause.h * Cause.h
* *
* Possible values are - REL_DUE_TO_HO - EPS_FALLBACK - REL_DUE_TO_UP_SEC - DNN_CONGESTION - S_NSSAI_CONGESTION - REL_DUE_TO_REACTIVATION - 5G_AN_NOT_RESPONDING - REL_DUE_TO_SLICE_NOT_AVAILABLE - REL_DUE_TO_DUPLICATE_SESSION_ID - PDU_SESSION_STATUS_MISMATCH - HO_FAILURE - INSUFFICIENT_UP_RESOURCES - PDU_SESSION_HANDED_OVER * Possible values are - REL_DUE_TO_HO - EPS_FALLBACK - REL_DUE_TO_UP_SEC -
* DNN_CONGESTION - S_NSSAI_CONGESTION - REL_DUE_TO_REACTIVATION -
* 5G_AN_NOT_RESPONDING - REL_DUE_TO_SLICE_NOT_AVAILABLE -
* REL_DUE_TO_DUPLICATE_SESSION_ID - PDU_SESSION_STATUS_MISMATCH - HO_FAILURE -
* INSUFFICIENT_UP_RESOURCES - PDU_SESSION_HANDED_OVER
*/ */
#ifndef Cause_H_ #ifndef Cause_H_
#define Cause_H_ #define Cause_H_
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai {
...@@ -26,11 +30,14 @@ namespace smf_server { ...@@ -26,11 +30,14 @@ namespace smf_server {
namespace model { namespace model {
/// <summary> /// <summary>
/// Possible values are - REL_DUE_TO_HO - EPS_FALLBACK - REL_DUE_TO_UP_SEC - DNN_CONGESTION - S_NSSAI_CONGESTION - REL_DUE_TO_REACTIVATION - 5G_AN_NOT_RESPONDING - REL_DUE_TO_SLICE_NOT_AVAILABLE - REL_DUE_TO_DUPLICATE_SESSION_ID - PDU_SESSION_STATUS_MISMATCH - HO_FAILURE - INSUFFICIENT_UP_RESOURCES - PDU_SESSION_HANDED_OVER /// Possible values are - REL_DUE_TO_HO - EPS_FALLBACK - REL_DUE_TO_UP_SEC -
/// DNN_CONGESTION - S_NSSAI_CONGESTION - REL_DUE_TO_REACTIVATION -
/// 5G_AN_NOT_RESPONDING - REL_DUE_TO_SLICE_NOT_AVAILABLE -
/// REL_DUE_TO_DUPLICATE_SESSION_ID - PDU_SESSION_STATUS_MISMATCH - HO_FAILURE -
/// INSUFFICIENT_UP_RESOURCES - PDU_SESSION_HANDED_OVER
/// </summary> /// </summary>
class Cause class Cause {
{ public:
public:
Cause(); Cause();
virtual ~Cause(); virtual ~Cause();
...@@ -39,14 +46,14 @@ public: ...@@ -39,14 +46,14 @@ public:
///////////////////////////////////////////// /////////////////////////////////////////////
/// Cause members /// Cause members
friend void to_json(nlohmann::json& j, const Cause& o); friend void to_json(nlohmann::json& j, const Cause& o);
friend void from_json(const nlohmann::json& j, Cause& o); friend void from_json(const nlohmann::json& j, Cause& o);
protected:
protected:
}; };
} } // namespace model
} } // namespace smf_server
} } // namespace oai
#endif /* Cause_H_ */ #endif /* Cause_H_ */
/** /**
* NRF NFManagement Service * NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
#include "ChangeItem.h" #include "ChangeItem.h"
...@@ -22,29 +23,24 @@ ChangeItem::ChangeItem() { ...@@ -22,29 +23,24 @@ ChangeItem::ChangeItem() {
m_FromIsSet = false; m_FromIsSet = false;
m_OrigValueIsSet = false; m_OrigValueIsSet = false;
m_NewValueIsSet = false; m_NewValueIsSet = false;
} }
ChangeItem::~ChangeItem() { ChangeItem::~ChangeItem() {}
}
void ChangeItem::validate() { void ChangeItem::validate() {
// TODO: implement validation // TODO: implement validation
} }
void to_json(nlohmann::json &j, const ChangeItem &o) { void to_json(nlohmann::json& j, const ChangeItem& o) {
j = nlohmann::json(); j = nlohmann::json();
j["op"] = o.m_Op; j["op"] = o.m_Op;
j["path"] = o.m_Path; j["path"] = o.m_Path;
if (o.fromIsSet()) if (o.fromIsSet()) j["from"] = o.m_From;
j["from"] = o.m_From; if (o.origValueIsSet()) j["origValue"] = o.m_OrigValue;
if (o.origValueIsSet()) if (o.newValueIsSet()) j["newValue"] = o.m_NewValue;
j["origValue"] = o.m_OrigValue;
if (o.newValueIsSet())
j["newValue"] = o.m_NewValue;
} }
void from_json(const nlohmann::json &j, ChangeItem &o) { void from_json(const nlohmann::json& j, ChangeItem& o) {
j.at("op").get_to(o.m_Op); j.at("op").get_to(o.m_Op);
j.at("path").get_to(o.m_Path); j.at("path").get_to(o.m_Path);
if (j.find("from") != j.end()) { if (j.find("from") != j.end()) {
...@@ -64,19 +60,19 @@ void from_json(const nlohmann::json &j, ChangeItem &o) { ...@@ -64,19 +60,19 @@ void from_json(const nlohmann::json &j, ChangeItem &o) {
ChangeType ChangeItem::getOp() const { ChangeType ChangeItem::getOp() const {
return m_Op; return m_Op;
} }
void ChangeItem::setOp(ChangeType const &value) { void ChangeItem::setOp(ChangeType const& value) {
m_Op = value; m_Op = value;
} }
std::string ChangeItem::getPath() const { std::string ChangeItem::getPath() const {
return m_Path; return m_Path;
} }
void ChangeItem::setPath(std::string const &value) { void ChangeItem::setPath(std::string const& value) {
m_Path = value; m_Path = value;
} }
std::string ChangeItem::getFrom() const { std::string ChangeItem::getFrom() const {
return m_From; return m_From;
} }
void ChangeItem::setFrom(std::string const &value) { void ChangeItem::setFrom(std::string const& value) {
m_From = value; m_From = value;
m_FromIsSet = true; m_FromIsSet = true;
} }
...@@ -89,7 +85,7 @@ void ChangeItem::unsetFrom() { ...@@ -89,7 +85,7 @@ void ChangeItem::unsetFrom() {
std::string ChangeItem::getOrigValue() const { std::string ChangeItem::getOrigValue() const {
return m_OrigValue; return m_OrigValue;
} }
void ChangeItem::setOrigValue(std::string const &value) { void ChangeItem::setOrigValue(std::string const& value) {
m_OrigValue = value; m_OrigValue = value;
m_OrigValueIsSet = true; m_OrigValueIsSet = true;
} }
...@@ -102,7 +98,7 @@ void ChangeItem::unsetOrigValue() { ...@@ -102,7 +98,7 @@ void ChangeItem::unsetOrigValue() {
std::string ChangeItem::getNewValue() const { std::string ChangeItem::getNewValue() const {
return m_NewValue; return m_NewValue;
} }
void ChangeItem::setNewValue(std::string const &value) { void ChangeItem::setNewValue(std::string const& value) {
m_NewValue = value; m_NewValue = value;
m_NewValueIsSet = true; m_NewValueIsSet = true;
} }
...@@ -113,7 +109,6 @@ void ChangeItem::unsetNewValue() { ...@@ -113,7 +109,6 @@ void ChangeItem::unsetNewValue() {
m_NewValueIsSet = false; m_NewValueIsSet = false;
} }
} } // namespace model
} } // namespace smf_server
} } // namespace oai
/** /**
* NRF NFManagement Service * NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
/* /*
* ChangeItem.h * ChangeItem.h
...@@ -44,36 +45,37 @@ class ChangeItem { ...@@ -44,36 +45,37 @@ class ChangeItem {
/// ///
/// </summary> /// </summary>
ChangeType getOp() const; ChangeType getOp() const;
void setOp(ChangeType const &value); void setOp(ChangeType const& value);
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
std::string getPath() const; std::string getPath() const;
void setPath(std::string const &value); void setPath(std::string const& value);
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
std::string getFrom() const; std::string getFrom() const;
void setFrom(std::string const &value); void setFrom(std::string const& value);
bool fromIsSet() const; bool fromIsSet() const;
void unsetFrom(); void unsetFrom();
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
std::string getOrigValue() const; std::string getOrigValue() const;
void setOrigValue(std::string const &value); void setOrigValue(std::string const& value);
bool origValueIsSet() const; bool origValueIsSet() const;
void unsetOrigValue(); void unsetOrigValue();
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
std::string getNewValue() const; std::string getNewValue() const;
void setNewValue(std::string const &value); void setNewValue(std::string const& value);
bool newValueIsSet() const; bool newValueIsSet() const;
void unsetNewValue(); void unsetNewValue();
friend void to_json(nlohmann::json &j, const ChangeItem &o); friend void to_json(nlohmann::json& j, const ChangeItem& o);
friend void from_json(const nlohmann::json &j, ChangeItem &o); friend void from_json(const nlohmann::json& j, ChangeItem& o);
protected: protected:
ChangeType m_Op; ChangeType m_Op;
...@@ -87,8 +89,8 @@ class ChangeItem { ...@@ -87,8 +89,8 @@ class ChangeItem {
bool m_NewValueIsSet; bool m_NewValueIsSet;
}; };
} } // namespace model
} } // namespace smf_server
} } // namespace oai
#endif /* ChangeItem_H_ */ #endif /* ChangeItem_H_ */
/** /**
* NRF NFManagement Service * NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
#include "ChangeType.h" #include "ChangeType.h"
...@@ -16,25 +17,20 @@ namespace oai { ...@@ -16,25 +17,20 @@ namespace oai {
namespace smf_server { namespace smf_server {
namespace model { namespace model {
ChangeType::ChangeType() { ChangeType::ChangeType() {}
} ChangeType::~ChangeType() {}
ChangeType::~ChangeType() {
}
void ChangeType::validate() { void ChangeType::validate() {
// TODO: implement validation // TODO: implement validation
} }
void to_json(nlohmann::json &j, const ChangeType &o) { void to_json(nlohmann::json& j, const ChangeType& o) {
j = nlohmann::json(); j = nlohmann::json();
} }
void from_json(const nlohmann::json &j, ChangeType &o) { void from_json(const nlohmann::json& j, ChangeType& o) {}
}
}
}
}
} // namespace model
} // namespace smf_server
} // namespace oai
/** /**
* NRF NFManagement Service * NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator
* https://openapi-generator.tech * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* Do not edit the class manually. * the class manually.
*/ */
/* /*
* ChangeType.h * ChangeType.h
...@@ -37,13 +38,14 @@ class ChangeType { ...@@ -37,13 +38,14 @@ class ChangeType {
///////////////////////////////////////////// /////////////////////////////////////////////
/// ChangeType members /// ChangeType members
friend void to_json(nlohmann::json &j, const ChangeType &o); friend void to_json(nlohmann::json& j, const ChangeType& o);
friend void from_json(const nlohmann::json &j, ChangeType &o); friend void from_json(const nlohmann::json& j, ChangeType& o);
protected: protected:
}; };
} } // namespace model
} } // namespace smf_server
} } // namespace oai
#endif /* ChangeType_H_ */ #endif /* ChangeType_H_ */
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
#include "DddStatus.h" #include "DddStatus.h"
...@@ -17,31 +17,20 @@ namespace oai { ...@@ -17,31 +17,20 @@ namespace oai {
namespace smf_server { namespace smf_server {
namespace model { namespace model {
DddStatus::DddStatus() DddStatus::DddStatus() {}
{
} DddStatus::~DddStatus() {}
DddStatus::~DddStatus() void DddStatus::validate() {
{
}
void DddStatus::validate()
{
// TODO: implement validation // TODO: implement validation
} }
void to_json(nlohmann::json& j, const DddStatus& o) void to_json(nlohmann::json& j, const DddStatus& o) {
{
j = nlohmann::json(); j = nlohmann::json();
} }
void from_json(const nlohmann::json& j, DddStatus& o) void from_json(const nlohmann::json& j, DddStatus& o) {}
{
}
}
}
}
} // namespace model
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* DddStatus.h * DddStatus.h
* *
* Possible values are - BUFFERED: The downlink data are buffered. - TRANSMITTED: The downlink data are transmitted - DISCARDED: The downlink data are discarded. * Possible values are - BUFFERED: The downlink data are buffered. -
* TRANSMITTED: The downlink data are transmitted - DISCARDED: The downlink data
* are discarded.
*/ */
#ifndef DddStatus_H_ #ifndef DddStatus_H_
#define DddStatus_H_ #define DddStatus_H_
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai {
...@@ -26,11 +28,12 @@ namespace smf_server { ...@@ -26,11 +28,12 @@ namespace smf_server {
namespace model { namespace model {
/// <summary> /// <summary>
/// Possible values are - BUFFERED: The downlink data are buffered. - TRANSMITTED: The downlink data are transmitted - DISCARDED: The downlink data are discarded. /// Possible values are - BUFFERED: The downlink data are buffered. -
/// TRANSMITTED: The downlink data are transmitted - DISCARDED: The downlink
/// data are discarded.
/// </summary> /// </summary>
class DddStatus class DddStatus {
{ public:
public:
DddStatus(); DddStatus();
virtual ~DddStatus(); virtual ~DddStatus();
...@@ -39,14 +42,14 @@ public: ...@@ -39,14 +42,14 @@ public:
///////////////////////////////////////////// /////////////////////////////////////////////
/// DddStatus members /// DddStatus members
friend void to_json(nlohmann::json& j, const DddStatus& o); friend void to_json(nlohmann::json& j, const DddStatus& o);
friend void from_json(const nlohmann::json& j, DddStatus& o); friend void from_json(const nlohmann::json& j, DddStatus& o);
protected:
protected:
}; };
} } // namespace model
} } // namespace smf_server
} } // namespace oai
#endif /* DddStatus_H_ */ #endif /* DddStatus_H_ */
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
#include "DddTrafficDescriptor.h" #include "DddTrafficDescriptor.h"
...@@ -17,108 +17,82 @@ namespace oai { ...@@ -17,108 +17,82 @@ namespace oai {
namespace smf_server { namespace smf_server {
namespace model { namespace model {
DddTrafficDescriptor::DddTrafficDescriptor() DddTrafficDescriptor::DddTrafficDescriptor() {
{
m_Ipv4Addr = ""; m_Ipv4Addr = "";
m_Ipv4AddrIsSet = false; m_Ipv4AddrIsSet = false;
m_Ipv6AddrIsSet = false; m_Ipv6AddrIsSet = false;
m_Port = 0; m_Port = 0;
m_PortIsSet = false; m_PortIsSet = false;
} }
DddTrafficDescriptor::~DddTrafficDescriptor() DddTrafficDescriptor::~DddTrafficDescriptor() {}
{
}
void DddTrafficDescriptor::validate() void DddTrafficDescriptor::validate() {
{
// TODO: implement validation // TODO: implement validation
} }
void to_json(nlohmann::json& j, const DddTrafficDescriptor& o) void to_json(nlohmann::json& j, const DddTrafficDescriptor& o) {
{
j = nlohmann::json(); j = nlohmann::json();
if(o.ipv4AddrIsSet()) if (o.ipv4AddrIsSet()) j["ipv4Addr"] = o.m_Ipv4Addr;
j["ipv4Addr"] = o.m_Ipv4Addr; if (o.ipv6AddrIsSet()) j["ipv6Addr"] = o.m_Ipv6Addr;
if(o.ipv6AddrIsSet()) if (o.portIsSet()) j["port"] = o.m_Port;
j["ipv6Addr"] = o.m_Ipv6Addr;
if(o.portIsSet())
j["port"] = o.m_Port;
} }
void from_json(const nlohmann::json& j, DddTrafficDescriptor& o) void from_json(const nlohmann::json& j, DddTrafficDescriptor& o) {
{ if (j.find("ipv4Addr") != j.end()) {
if(j.find("ipv4Addr") != j.end())
{
j.at("ipv4Addr").get_to(o.m_Ipv4Addr); j.at("ipv4Addr").get_to(o.m_Ipv4Addr);
o.m_Ipv4AddrIsSet = true; o.m_Ipv4AddrIsSet = true;
} }
if(j.find("ipv6Addr") != j.end()) if (j.find("ipv6Addr") != j.end()) {
{
j.at("ipv6Addr").get_to(o.m_Ipv6Addr); j.at("ipv6Addr").get_to(o.m_Ipv6Addr);
o.m_Ipv6AddrIsSet = true; o.m_Ipv6AddrIsSet = true;
} }
if(j.find("port") != j.end()) if (j.find("port") != j.end()) {
{
j.at("port").get_to(o.m_Port); j.at("port").get_to(o.m_Port);
o.m_PortIsSet = true; o.m_PortIsSet = true;
} }
} }
std::string DddTrafficDescriptor::getIpv4Addr() const std::string DddTrafficDescriptor::getIpv4Addr() const {
{
return m_Ipv4Addr; return m_Ipv4Addr;
} }
void DddTrafficDescriptor::setIpv4Addr(std::string const& value) void DddTrafficDescriptor::setIpv4Addr(std::string const& value) {
{
m_Ipv4Addr = value; m_Ipv4Addr = value;
m_Ipv4AddrIsSet = true; m_Ipv4AddrIsSet = true;
} }
bool DddTrafficDescriptor::ipv4AddrIsSet() const bool DddTrafficDescriptor::ipv4AddrIsSet() const {
{
return m_Ipv4AddrIsSet; return m_Ipv4AddrIsSet;
} }
void DddTrafficDescriptor::unsetIpv4Addr() void DddTrafficDescriptor::unsetIpv4Addr() {
{
m_Ipv4AddrIsSet = false; m_Ipv4AddrIsSet = false;
} }
Ipv6Addr DddTrafficDescriptor::getIpv6Addr() const Ipv6Addr DddTrafficDescriptor::getIpv6Addr() const {
{
return m_Ipv6Addr; return m_Ipv6Addr;
} }
void DddTrafficDescriptor::setIpv6Addr(Ipv6Addr const& value) void DddTrafficDescriptor::setIpv6Addr(Ipv6Addr const& value) {
{
m_Ipv6Addr = value; m_Ipv6Addr = value;
m_Ipv6AddrIsSet = true; m_Ipv6AddrIsSet = true;
} }
bool DddTrafficDescriptor::ipv6AddrIsSet() const bool DddTrafficDescriptor::ipv6AddrIsSet() const {
{
return m_Ipv6AddrIsSet; return m_Ipv6AddrIsSet;
} }
void DddTrafficDescriptor::unsetIpv6Addr() void DddTrafficDescriptor::unsetIpv6Addr() {
{
m_Ipv6AddrIsSet = false; m_Ipv6AddrIsSet = false;
} }
int32_t DddTrafficDescriptor::getPort() const int32_t DddTrafficDescriptor::getPort() const {
{
return m_Port; return m_Port;
} }
void DddTrafficDescriptor::setPort(int32_t const value) void DddTrafficDescriptor::setPort(int32_t const value) {
{
m_Port = value; m_Port = value;
m_PortIsSet = true; m_PortIsSet = true;
} }
bool DddTrafficDescriptor::portIsSet() const bool DddTrafficDescriptor::portIsSet() const {
{
return m_PortIsSet; return m_PortIsSet;
} }
void DddTrafficDescriptor::unsetPort() void DddTrafficDescriptor::unsetPort() {
{
m_PortIsSet = false; m_PortIsSet = false;
} }
} } // namespace model
} } // namespace smf_server
} } // namespace oai
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* DddTrafficDescriptor.h * DddTrafficDescriptor.h
* *
...@@ -18,7 +19,6 @@ ...@@ -18,7 +19,6 @@
#ifndef DddTrafficDescriptor_H_ #ifndef DddTrafficDescriptor_H_
#define DddTrafficDescriptor_H_ #define DddTrafficDescriptor_H_
#include <string> #include <string>
#include "Ipv6Addr.h" #include "Ipv6Addr.h"
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
...@@ -30,9 +30,8 @@ namespace model { ...@@ -30,9 +30,8 @@ namespace model {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
class DddTrafficDescriptor class DddTrafficDescriptor {
{ public:
public:
DddTrafficDescriptor(); DddTrafficDescriptor();
virtual ~DddTrafficDescriptor(); virtual ~DddTrafficDescriptor();
...@@ -65,7 +64,8 @@ public: ...@@ -65,7 +64,8 @@ public:
friend void to_json(nlohmann::json& j, const DddTrafficDescriptor& o); friend void to_json(nlohmann::json& j, const DddTrafficDescriptor& o);
friend void from_json(const nlohmann::json& j, DddTrafficDescriptor& o); friend void from_json(const nlohmann::json& j, DddTrafficDescriptor& o);
protected:
protected:
std::string m_Ipv4Addr; std::string m_Ipv4Addr;
bool m_Ipv4AddrIsSet; bool m_Ipv4AddrIsSet;
Ipv6Addr m_Ipv6Addr; Ipv6Addr m_Ipv6Addr;
...@@ -74,8 +74,8 @@ protected: ...@@ -74,8 +74,8 @@ protected:
bool m_PortIsSet; bool m_PortIsSet;
}; };
} } // namespace model
} } // namespace smf_server
} } // namespace oai
#endif /* DddTrafficDescriptor_H_ */ #endif /* DddTrafficDescriptor_H_ */
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
#include "DnaiChangeType.h" #include "DnaiChangeType.h"
...@@ -17,31 +17,20 @@ namespace oai { ...@@ -17,31 +17,20 @@ namespace oai {
namespace smf_server { namespace smf_server {
namespace model { namespace model {
DnaiChangeType::DnaiChangeType() DnaiChangeType::DnaiChangeType() {}
{
} DnaiChangeType::~DnaiChangeType() {}
DnaiChangeType::~DnaiChangeType() void DnaiChangeType::validate() {
{
}
void DnaiChangeType::validate()
{
// TODO: implement validation // TODO: implement validation
} }
void to_json(nlohmann::json& j, const DnaiChangeType& o) void to_json(nlohmann::json& j, const DnaiChangeType& o) {
{
j = nlohmann::json(); j = nlohmann::json();
} }
void from_json(const nlohmann::json& j, DnaiChangeType& o) void from_json(const nlohmann::json& j, DnaiChangeType& o) {}
{
}
}
}
}
} // namespace model
} // namespace smf_server
} // namespace oai
/** /**
* Nsmf_EventExposure * Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Session Management Event Exposure Service. © 2019, 3GPP Organizational
* * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* DnaiChangeType.h * DnaiChangeType.h
* *
* Possible values are - EARLY: Early notification of UP path reconfiguration. - EARLY_LATE: Early and late notification of UP path reconfiguration. This value shall only be present in the subscription to the DNAI change event. - LATE: Late notification of UP path reconfiguration. * Possible values are - EARLY: Early notification of UP path reconfiguration. -
* EARLY_LATE: Early and late notification of UP path reconfiguration. This
* value shall only be present in the subscription to the DNAI change event. -
* LATE: Late notification of UP path reconfiguration.
*/ */
#ifndef DnaiChangeType_H_ #ifndef DnaiChangeType_H_
#define DnaiChangeType_H_ #define DnaiChangeType_H_
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai {
...@@ -26,11 +29,13 @@ namespace smf_server { ...@@ -26,11 +29,13 @@ namespace smf_server {
namespace model { namespace model {
/// <summary> /// <summary>
/// Possible values are - EARLY: Early notification of UP path reconfiguration. - EARLY_LATE: Early and late notification of UP path reconfiguration. This value shall only be present in the subscription to the DNAI change event. - LATE: Late notification of UP path reconfiguration. /// Possible values are - EARLY: Early notification of UP path reconfiguration.
/// - EARLY_LATE: Early and late notification of UP path reconfiguration. This
/// value shall only be present in the subscription to the DNAI change event. -
/// LATE: Late notification of UP path reconfiguration.
/// </summary> /// </summary>
class DnaiChangeType class DnaiChangeType {
{ public:
public:
DnaiChangeType(); DnaiChangeType();
virtual ~DnaiChangeType(); virtual ~DnaiChangeType();
...@@ -39,14 +44,14 @@ public: ...@@ -39,14 +44,14 @@ public:
///////////////////////////////////////////// /////////////////////////////////////////////
/// DnaiChangeType members /// DnaiChangeType members
friend void to_json(nlohmann::json& j, const DnaiChangeType& o); friend void to_json(nlohmann::json& j, const DnaiChangeType& o);
friend void from_json(const nlohmann::json& j, DnaiChangeType& o); friend void from_json(const nlohmann::json& j, DnaiChangeType& o);
protected:
protected:
}; };
} } // namespace model
} } // namespace smf_server
} } // namespace oai
#endif /* DnaiChangeType_H_ */ #endif /* DnaiChangeType_H_ */
/** /**
* Nsmf_PDUSession * Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 1.1.0.alpha-1 *
* * The version of the OpenAPI document: 1.1.0.alpha-1
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
#include "DnnSelectionMode.h" #include "DnnSelectionMode.h"
...@@ -17,31 +17,20 @@ namespace oai { ...@@ -17,31 +17,20 @@ namespace oai {
namespace smf_server { namespace smf_server {
namespace model { namespace model {
DnnSelectionMode::DnnSelectionMode() DnnSelectionMode::DnnSelectionMode() {}
{
} DnnSelectionMode::~DnnSelectionMode() {}
DnnSelectionMode::~DnnSelectionMode() void DnnSelectionMode::validate() {
{
}
void DnnSelectionMode::validate()
{
// TODO: implement validation // TODO: implement validation
} }
void to_json(nlohmann::json& j, const DnnSelectionMode& o) void to_json(nlohmann::json& j, const DnnSelectionMode& o) {
{
j = nlohmann::json(); j = nlohmann::json();
} }
void from_json(const nlohmann::json& j, DnnSelectionMode& o) void from_json(const nlohmann::json& j, DnnSelectionMode& o) {}
{
}
}
}
}
} // namespace model
} // namespace smf_server
} // namespace oai
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment