Skip to content
Snippets Groups Projects
SMPoliciesCollectionApiImpl.cpp 1.39 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 "SMPoliciesCollectionApiImpl.h"
#include "3gpp_29.500.h"
#include "logger.hpp"
Rohan's avatar
Rohan committed

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

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

SMPoliciesCollectionApiImpl::SMPoliciesCollectionApiImpl(
    const std::shared_ptr<Pistache::Rest::Router>& rtr,
    const std::shared_ptr<pcf_smpc>& smpc_service, const std::string& address)
  m_api_handler = std::make_shared<sm_policies_collection_api_handler>(
      sm_policies_collection_api_handler(smpc_service, address));
Rohan's avatar
Rohan committed

void SMPoliciesCollectionApiImpl::create_sm_policy(
    const SmPolicyContextData& smPolicyContextData,
    Pistache::Http::ResponseWriter& response) {
  api_response api_resp = m_api_handler->create_sm_policy(smPolicyContextData);
  response.headers()    = api_resp.headers;
  response.send(Pistache::Http::Code(api_resp.status_code), api_resp.body);
Rohan's avatar
Rohan committed
}

}  // namespace oai::pcf::api