Skip to content
Snippets Groups Projects
IndividualSMPolicyDocumentApiImpl.cpp 2.08 KiB
Newer Older
Rohan's avatar
Rohan committed
/**
 * Npcf_SMPolicyControl API
 * Session Management Policy Control Service © 2020, 3GPP Organizational
 * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 1.1.1.alpha-5
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */
Rohan's avatar
Rohan committed

#include "IndividualSMPolicyDocumentApiImpl.h"
Rohan's avatar
Rohan committed

namespace oai::pcf::api {
Rohan's avatar
Rohan committed

using namespace oai::model::pcf;
using namespace oai::pcf::app;
using namespace oai::pcf::app::sm_policy;
Rohan's avatar
Rohan committed

IndividualSMPolicyDocumentApiImpl::IndividualSMPolicyDocumentApiImpl(
    const std::shared_ptr<Pistache::Rest::Router>& rtr,
    const std::shared_ptr<pcf_smpc>& smpc_service, const std::string&)
    : IndividualSMPolicyDocumentApi(rtr) {
  m_api_handler =
      std::make_shared<individual_sm_policy_document_api_handler>(smpc_service);
Rohan's avatar
Rohan committed

void IndividualSMPolicyDocumentApiImpl::delete_sm_policy(
    const std::string& smPolicyId, const SmPolicyDeleteData& smPolicyDeleteData,
    Pistache::Http::ResponseWriter& response) {
  api_response resp =
      m_api_handler->delete_sm_policy(smPolicyId, smPolicyDeleteData);
  response.headers() = resp.headers;
  response.send(Pistache::Http::Code(resp.status_code), resp.body);
Rohan's avatar
Rohan committed
}
void IndividualSMPolicyDocumentApiImpl::get_sm_policy(
    const std::string& smPolicyId, Pistache::Http::ResponseWriter& response) {
  api_response resp  = m_api_handler->get_sm_policy(smPolicyId);
  response.headers() = resp.headers;
  response.send(Pistache::Http::Code(resp.status_code), resp.body);
Rohan's avatar
Rohan committed
}
void IndividualSMPolicyDocumentApiImpl::update_sm_policy(
    const std::string& smPolicyId,
    const SmPolicyUpdateContextData& smPolicyUpdateContextData,
    Pistache::Http::ResponseWriter& response) {
  api_response resp =
      m_api_handler->update_sm_policy(smPolicyId, smPolicyUpdateContextData);
  response.headers() = resp.headers;
  response.send(Pistache::Http::Code(resp.status_code), resp.body);
Rohan's avatar
Rohan committed
}

}  // namespace oai::pcf::api