/**
 * 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 "UpuData_2.h"

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

UpuData_2::UpuData_2() {
  m_SecPacket = "";
  m_SecPacketIsSet = false;
  m_DefaultConfNssaiIsSet = false;
  m_RoutingId = "";
  m_RoutingIdIsSet = false;
}

UpuData_2::~UpuData_2() {}

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

void to_json(nlohmann::json &j, const UpuData_2 &o) {
  j = nlohmann::json();
  if (o.secPacketIsSet())
    j["secPacket"] = o.m_SecPacket;
  if (o.defaultConfNssaiIsSet() || !o.m_DefaultConfNssai.empty())
    j["defaultConfNssai"] = o.m_DefaultConfNssai;
  if (o.routingIdIsSet())
    j["routingId"] = o.m_RoutingId;
}

void from_json(const nlohmann::json &j, UpuData_2 &o) {
  if (j.find("secPacket") != j.end()) {
    j.at("secPacket").get_to(o.m_SecPacket);
    o.m_SecPacketIsSet = true;
  }
  if (j.find("defaultConfNssai") != j.end()) {
    j.at("defaultConfNssai").get_to(o.m_DefaultConfNssai);
    o.m_DefaultConfNssaiIsSet = true;
  }
  if (j.find("routingId") != j.end()) {
    j.at("routingId").get_to(o.m_RoutingId);
    o.m_RoutingIdIsSet = true;
  }
}

std::string UpuData_2::getSecPacket() const { return m_SecPacket; }
void UpuData_2::setSecPacket(std::string const &value) {
  m_SecPacket = value;
  m_SecPacketIsSet = true;
}
bool UpuData_2::secPacketIsSet() const { return m_SecPacketIsSet; }
void UpuData_2::unsetSecPacket() { m_SecPacketIsSet = false; }
std::vector<Snssai> &UpuData_2::getDefaultConfNssai() {
  return m_DefaultConfNssai;
}
void UpuData_2::setDefaultConfNssai(std::vector<Snssai> const &value) {
  m_DefaultConfNssai = value;
  m_DefaultConfNssaiIsSet = true;
}
bool UpuData_2::defaultConfNssaiIsSet() const {
  return m_DefaultConfNssaiIsSet;
}
void UpuData_2::unsetDefaultConfNssai() { m_DefaultConfNssaiIsSet = false; }
std::string UpuData_2::getRoutingId() const { return m_RoutingId; }
void UpuData_2::setRoutingId(std::string const &value) {
  m_RoutingId = value;
  m_RoutingIdIsSet = true;
}
bool UpuData_2::routingIdIsSet() const { return m_RoutingIdIsSet; }
void UpuData_2::unsetRoutingId() { m_RoutingIdIsSet = false; }

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