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

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

DatalinkReportingConfiguration::DatalinkReportingConfiguration() {
  m_DddTrafficDesIsSet = false;
  m_Dnn = "";
  m_DnnIsSet = false;
  m_SliceIsSet = false;
  m_DddStatusListIsSet = false;
}

DatalinkReportingConfiguration::~DatalinkReportingConfiguration() {}

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

void to_json(nlohmann::json &j, const DatalinkReportingConfiguration &o) {
  j = nlohmann::json();
  if (o.dddTrafficDesIsSet() || !o.m_DddTrafficDes.empty())
    j["dddTrafficDes"] = o.m_DddTrafficDes;
  if (o.dnnIsSet())
    j["dnn"] = o.m_Dnn;
  if (o.sliceIsSet())
    j["slice"] = o.m_Slice;
  if (o.dddStatusListIsSet() || !o.m_DddStatusList.empty())
    j["dddStatusList"] = o.m_DddStatusList;
}

void from_json(const nlohmann::json &j, DatalinkReportingConfiguration &o) {
  if (j.find("dddTrafficDes") != j.end()) {
    j.at("dddTrafficDes").get_to(o.m_DddTrafficDes);
    o.m_DddTrafficDesIsSet = true;
  }
  if (j.find("dnn") != j.end()) {
    j.at("dnn").get_to(o.m_Dnn);
    o.m_DnnIsSet = true;
  }
  if (j.find("slice") != j.end()) {
    j.at("slice").get_to(o.m_Slice);
    o.m_SliceIsSet = true;
  }
  if (j.find("dddStatusList") != j.end()) {
    j.at("dddStatusList").get_to(o.m_DddStatusList);
    o.m_DddStatusListIsSet = true;
  }
}

std::vector<DddTrafficDescriptor> &
DatalinkReportingConfiguration::getDddTrafficDes() {
  return m_DddTrafficDes;
}
void DatalinkReportingConfiguration::setDddTrafficDes(
    std::vector<DddTrafficDescriptor> const &value) {
  m_DddTrafficDes = value;
  m_DddTrafficDesIsSet = true;
}
bool DatalinkReportingConfiguration::dddTrafficDesIsSet() const {
  return m_DddTrafficDesIsSet;
}
void DatalinkReportingConfiguration::unsetDddTrafficDes() {
  m_DddTrafficDesIsSet = false;
}
std::string DatalinkReportingConfiguration::getDnn() const { return m_Dnn; }
void DatalinkReportingConfiguration::setDnn(std::string const &value) {
  m_Dnn = value;
  m_DnnIsSet = true;
}
bool DatalinkReportingConfiguration::dnnIsSet() const { return m_DnnIsSet; }
void DatalinkReportingConfiguration::unsetDnn() { m_DnnIsSet = false; }
Snssai DatalinkReportingConfiguration::getSlice() const { return m_Slice; }
void DatalinkReportingConfiguration::setSlice(Snssai const &value) {
  m_Slice = value;
  m_SliceIsSet = true;
}
bool DatalinkReportingConfiguration::sliceIsSet() const { return m_SliceIsSet; }
void DatalinkReportingConfiguration::unsetSlice() { m_SliceIsSet = false; }
std::vector<DlDataDeliveryStatus> &
DatalinkReportingConfiguration::getDddStatusList() {
  return m_DddStatusList;
}
void DatalinkReportingConfiguration::setDddStatusList(
    std::vector<DlDataDeliveryStatus> const &value) {
  m_DddStatusList = value;
  m_DddStatusListIsSet = true;
}
bool DatalinkReportingConfiguration::dddStatusListIsSet() const {
  return m_DddStatusListIsSet;
}
void DatalinkReportingConfiguration::unsetDddStatusList() {
  m_DddStatusListIsSet = false;
}

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