/**
 * Nudr_DataRepository API OpenAPI file
 * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "PduSession.h"

namespace org {
namespace openapitools {
namespace server {
namespace model {

PduSession::PduSession() {
  m_Dnn = "";
  m_SmfInstanceId = "";
  m_SingleNssaiIsSet = false;
}

PduSession::~PduSession() {}

void PduSession::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json &j, const PduSession &o) {
  j = nlohmann::json();
  j["dnn"] = o.m_Dnn;
  j["smfInstanceId"] = o.m_SmfInstanceId;
  j["plmnId"] = o.m_PlmnId;
  if (o.singleNssaiIsSet())
    j["singleNssai"] = o.m_SingleNssai;
}

void from_json(const nlohmann::json &j, PduSession &o) {
  j.at("dnn").get_to(o.m_Dnn);
  j.at("smfInstanceId").get_to(o.m_SmfInstanceId);
  j.at("plmnId").get_to(o.m_PlmnId);
  if (j.find("singleNssai") != j.end()) {
    j.at("singleNssai").get_to(o.m_SingleNssai);
    o.m_SingleNssaiIsSet = true;
  }
}

std::string PduSession::getDnn() const { return m_Dnn; }
void PduSession::setDnn(std::string const &value) { m_Dnn = value; }
std::string PduSession::getSmfInstanceId() const { return m_SmfInstanceId; }
void PduSession::setSmfInstanceId(std::string const &value) {
  m_SmfInstanceId = value;
}
PlmnId PduSession::getPlmnId() const { return m_PlmnId; }
void PduSession::setPlmnId(PlmnId const &value) { m_PlmnId = value; }
Snssai PduSession::getSingleNssai() const { return m_SingleNssai; }
void PduSession::setSingleNssai(Snssai const &value) {
  m_SingleNssai = value;
  m_SingleNssaiIsSet = true;
}
bool PduSession::singleNssaiIsSet() const { return m_SingleNssaiIsSet; }
void PduSession::unsetSingleNssai() { m_SingleNssaiIsSet = false; }

} // namespace model
} // namespace server
} // namespace openapitools
} // namespace org
