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

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

PduSessionManagementData::PduSessionManagementData() {
  m_PduSessionStatusIsSet = false;
  m_PduSessionStatusTs = "";
  m_PduSessionStatusTsIsSet = false;
  m_Dnai = "";
  m_DnaiIsSet = false;
  m_DnaiTs = "";
  m_DnaiTsIsSet = false;
  m_N6TrafficRoutingInfoIsSet = false;
  m_N6TrafficRoutingInfoTs = "";
  m_N6TrafficRoutingInfoTsIsSet = false;
  m_Ipv4Addr = "";
  m_Ipv4AddrIsSet = false;
  m_Ipv6PrefixIsSet = false;
  m_Ipv6AddrsIsSet = false;
  m_PduSessTypeIsSet = false;
  m_IpAddrTs = "";
  m_IpAddrTsIsSet = false;
  m_Dnn = "";
  m_DnnIsSet = false;
  m_PduSessionId = 0;
  m_PduSessionIdIsSet = false;
  m_SuppFeat = "";
  m_SuppFeatIsSet = false;
}

PduSessionManagementData::~PduSessionManagementData() {}

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

void to_json(nlohmann::json &j, const PduSessionManagementData &o) {
  j = nlohmann::json();
  if (o.pduSessionStatusIsSet())
    j["pduSessionStatus"] = o.m_PduSessionStatus;
  if (o.pduSessionStatusTsIsSet())
    j["pduSessionStatusTs"] = o.m_PduSessionStatusTs;
  if (o.dnaiIsSet())
    j["dnai"] = o.m_Dnai;
  if (o.dnaiTsIsSet())
    j["dnaiTs"] = o.m_DnaiTs;
  if (o.n6TrafficRoutingInfoIsSet() || !o.m_N6TrafficRoutingInfo.empty())
    j["n6TrafficRoutingInfo"] = o.m_N6TrafficRoutingInfo;
  if (o.n6TrafficRoutingInfoTsIsSet())
    j["n6TrafficRoutingInfoTs"] = o.m_N6TrafficRoutingInfoTs;
  if (o.ipv4AddrIsSet())
    j["ipv4Addr"] = o.m_Ipv4Addr;
  if (o.ipv6PrefixIsSet() || !o.m_Ipv6Prefix.empty())
    j["ipv6Prefix"] = o.m_Ipv6Prefix;
  if (o.ipv6AddrsIsSet() || !o.m_Ipv6Addrs.empty())
    j["ipv6Addrs"] = o.m_Ipv6Addrs;
  if (o.pduSessTypeIsSet())
    j["pduSessType"] = o.m_PduSessType;
  if (o.ipAddrTsIsSet())
    j["ipAddrTs"] = o.m_IpAddrTs;
  if (o.dnnIsSet())
    j["dnn"] = o.m_Dnn;
  if (o.pduSessionIdIsSet())
    j["pduSessionId"] = o.m_PduSessionId;
  if (o.suppFeatIsSet())
    j["suppFeat"] = o.m_SuppFeat;
}

void from_json(const nlohmann::json &j, PduSessionManagementData &o) {
  if (j.find("pduSessionStatus") != j.end()) {
    j.at("pduSessionStatus").get_to(o.m_PduSessionStatus);
    o.m_PduSessionStatusIsSet = true;
  }
  if (j.find("pduSessionStatusTs") != j.end()) {
    j.at("pduSessionStatusTs").get_to(o.m_PduSessionStatusTs);
    o.m_PduSessionStatusTsIsSet = true;
  }
  if (j.find("dnai") != j.end()) {
    j.at("dnai").get_to(o.m_Dnai);
    o.m_DnaiIsSet = true;
  }
  if (j.find("dnaiTs") != j.end()) {
    j.at("dnaiTs").get_to(o.m_DnaiTs);
    o.m_DnaiTsIsSet = true;
  }
  if (j.find("n6TrafficRoutingInfo") != j.end()) {
    j.at("n6TrafficRoutingInfo").get_to(o.m_N6TrafficRoutingInfo);
    o.m_N6TrafficRoutingInfoIsSet = true;
  }
  if (j.find("n6TrafficRoutingInfoTs") != j.end()) {
    j.at("n6TrafficRoutingInfoTs").get_to(o.m_N6TrafficRoutingInfoTs);
    o.m_N6TrafficRoutingInfoTsIsSet = true;
  }
  if (j.find("ipv4Addr") != j.end()) {
    j.at("ipv4Addr").get_to(o.m_Ipv4Addr);
    o.m_Ipv4AddrIsSet = true;
  }
  if (j.find("ipv6Prefix") != j.end()) {
    j.at("ipv6Prefix").get_to(o.m_Ipv6Prefix);
    o.m_Ipv6PrefixIsSet = true;
  }
  if (j.find("ipv6Addrs") != j.end()) {
    j.at("ipv6Addrs").get_to(o.m_Ipv6Addrs);
    o.m_Ipv6AddrsIsSet = true;
  }
  if (j.find("pduSessType") != j.end()) {
    j.at("pduSessType").get_to(o.m_PduSessType);
    o.m_PduSessTypeIsSet = true;
  }
  if (j.find("ipAddrTs") != j.end()) {
    j.at("ipAddrTs").get_to(o.m_IpAddrTs);
    o.m_IpAddrTsIsSet = true;
  }
  if (j.find("dnn") != j.end()) {
    j.at("dnn").get_to(o.m_Dnn);
    o.m_DnnIsSet = true;
  }
  if (j.find("pduSessionId") != j.end()) {
    j.at("pduSessionId").get_to(o.m_PduSessionId);
    o.m_PduSessionIdIsSet = true;
  }
  if (j.find("suppFeat") != j.end()) {
    j.at("suppFeat").get_to(o.m_SuppFeat);
    o.m_SuppFeatIsSet = true;
  }
}

PduSessionStatus PduSessionManagementData::getPduSessionStatus() const {
  return m_PduSessionStatus;
}
void PduSessionManagementData::setPduSessionStatus(
    PduSessionStatus const &value) {
  m_PduSessionStatus = value;
  m_PduSessionStatusIsSet = true;
}
bool PduSessionManagementData::pduSessionStatusIsSet() const {
  return m_PduSessionStatusIsSet;
}
void PduSessionManagementData::unsetPduSessionStatus() {
  m_PduSessionStatusIsSet = false;
}
std::string PduSessionManagementData::getPduSessionStatusTs() const {
  return m_PduSessionStatusTs;
}
void PduSessionManagementData::setPduSessionStatusTs(std::string const &value) {
  m_PduSessionStatusTs = value;
  m_PduSessionStatusTsIsSet = true;
}
bool PduSessionManagementData::pduSessionStatusTsIsSet() const {
  return m_PduSessionStatusTsIsSet;
}
void PduSessionManagementData::unsetPduSessionStatusTs() {
  m_PduSessionStatusTsIsSet = false;
}
std::string PduSessionManagementData::getDnai() const { return m_Dnai; }
void PduSessionManagementData::setDnai(std::string const &value) {
  m_Dnai = value;
  m_DnaiIsSet = true;
}
bool PduSessionManagementData::dnaiIsSet() const { return m_DnaiIsSet; }
void PduSessionManagementData::unsetDnai() { m_DnaiIsSet = false; }
std::string PduSessionManagementData::getDnaiTs() const { return m_DnaiTs; }
void PduSessionManagementData::setDnaiTs(std::string const &value) {
  m_DnaiTs = value;
  m_DnaiTsIsSet = true;
}
bool PduSessionManagementData::dnaiTsIsSet() const { return m_DnaiTsIsSet; }
void PduSessionManagementData::unsetDnaiTs() { m_DnaiTsIsSet = false; }
std::vector<RouteToLocation> &
PduSessionManagementData::getN6TrafficRoutingInfo() {
  return m_N6TrafficRoutingInfo;
}
void PduSessionManagementData::setN6TrafficRoutingInfo(
    std::vector<RouteToLocation> const &value) {
  m_N6TrafficRoutingInfo = value;
  m_N6TrafficRoutingInfoIsSet = true;
}
bool PduSessionManagementData::n6TrafficRoutingInfoIsSet() const {
  return m_N6TrafficRoutingInfoIsSet;
}
void PduSessionManagementData::unsetN6TrafficRoutingInfo() {
  m_N6TrafficRoutingInfoIsSet = false;
}
std::string PduSessionManagementData::getN6TrafficRoutingInfoTs() const {
  return m_N6TrafficRoutingInfoTs;
}
void PduSessionManagementData::setN6TrafficRoutingInfoTs(
    std::string const &value) {
  m_N6TrafficRoutingInfoTs = value;
  m_N6TrafficRoutingInfoTsIsSet = true;
}
bool PduSessionManagementData::n6TrafficRoutingInfoTsIsSet() const {
  return m_N6TrafficRoutingInfoTsIsSet;
}
void PduSessionManagementData::unsetN6TrafficRoutingInfoTs() {
  m_N6TrafficRoutingInfoTsIsSet = false;
}
std::string PduSessionManagementData::getIpv4Addr() const { return m_Ipv4Addr; }
void PduSessionManagementData::setIpv4Addr(std::string const &value) {
  m_Ipv4Addr = value;
  m_Ipv4AddrIsSet = true;
}
bool PduSessionManagementData::ipv4AddrIsSet() const { return m_Ipv4AddrIsSet; }
void PduSessionManagementData::unsetIpv4Addr() { m_Ipv4AddrIsSet = false; }
std::vector<Ipv6Prefix> &PduSessionManagementData::getIpv6Prefix() {
  return m_Ipv6Prefix;
}
void PduSessionManagementData::setIpv6Prefix(
    std::vector<Ipv6Prefix> const &value) {
  m_Ipv6Prefix = value;
  m_Ipv6PrefixIsSet = true;
}
bool PduSessionManagementData::ipv6PrefixIsSet() const {
  return m_Ipv6PrefixIsSet;
}
void PduSessionManagementData::unsetIpv6Prefix() { m_Ipv6PrefixIsSet = false; }
std::vector<Ipv6Addr> &PduSessionManagementData::getIpv6Addrs() {
  return m_Ipv6Addrs;
}
void PduSessionManagementData::setIpv6Addrs(
    std::vector<Ipv6Addr> const &value) {
  m_Ipv6Addrs = value;
  m_Ipv6AddrsIsSet = true;
}
bool PduSessionManagementData::ipv6AddrsIsSet() const {
  return m_Ipv6AddrsIsSet;
}
void PduSessionManagementData::unsetIpv6Addrs() { m_Ipv6AddrsIsSet = false; }
PduSessionType PduSessionManagementData::getPduSessType() const {
  return m_PduSessType;
}
void PduSessionManagementData::setPduSessType(PduSessionType const &value) {
  m_PduSessType = value;
  m_PduSessTypeIsSet = true;
}
bool PduSessionManagementData::pduSessTypeIsSet() const {
  return m_PduSessTypeIsSet;
}
void PduSessionManagementData::unsetPduSessType() {
  m_PduSessTypeIsSet = false;
}
std::string PduSessionManagementData::getIpAddrTs() const { return m_IpAddrTs; }
void PduSessionManagementData::setIpAddrTs(std::string const &value) {
  m_IpAddrTs = value;
  m_IpAddrTsIsSet = true;
}
bool PduSessionManagementData::ipAddrTsIsSet() const { return m_IpAddrTsIsSet; }
void PduSessionManagementData::unsetIpAddrTs() { m_IpAddrTsIsSet = false; }
std::string PduSessionManagementData::getDnn() const { return m_Dnn; }
void PduSessionManagementData::setDnn(std::string const &value) {
  m_Dnn = value;
  m_DnnIsSet = true;
}
bool PduSessionManagementData::dnnIsSet() const { return m_DnnIsSet; }
void PduSessionManagementData::unsetDnn() { m_DnnIsSet = false; }
int32_t PduSessionManagementData::getPduSessionId() const {
  return m_PduSessionId;
}
void PduSessionManagementData::setPduSessionId(int32_t const value) {
  m_PduSessionId = value;
  m_PduSessionIdIsSet = true;
}
bool PduSessionManagementData::pduSessionIdIsSet() const {
  return m_PduSessionIdIsSet;
}
void PduSessionManagementData::unsetPduSessionId() {
  m_PduSessionIdIsSet = false;
}
std::string PduSessionManagementData::getSuppFeat() const { return m_SuppFeat; }
void PduSessionManagementData::setSuppFeat(std::string const &value) {
  m_SuppFeat = value;
  m_SuppFeatIsSet = true;
}
bool PduSessionManagementData::suppFeatIsSet() const { return m_SuppFeatIsSet; }
void PduSessionManagementData::unsetSuppFeat() { m_SuppFeatIsSet = false; }

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