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

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

SnssaiRouteSelectionDescriptor::SnssaiRouteSelectionDescriptor() {
  m_DnnRouteSelDescsIsSet = false;
}

SnssaiRouteSelectionDescriptor::~SnssaiRouteSelectionDescriptor() {}

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

void to_json(nlohmann::json &j, const SnssaiRouteSelectionDescriptor &o) {
  j = nlohmann::json();
  j["snssai"] = o.m_Snssai;
  if (o.dnnRouteSelDescsIsSet() || !o.m_DnnRouteSelDescs.empty())
    j["dnnRouteSelDescs"] = o.m_DnnRouteSelDescs;
}

void from_json(const nlohmann::json &j, SnssaiRouteSelectionDescriptor &o) {
  j.at("snssai").get_to(o.m_Snssai);
  if (j.find("dnnRouteSelDescs") != j.end()) {
    j.at("dnnRouteSelDescs").get_to(o.m_DnnRouteSelDescs);
    o.m_DnnRouteSelDescsIsSet = true;
  }
}

Snssai SnssaiRouteSelectionDescriptor::getSnssai() const { return m_Snssai; }
void SnssaiRouteSelectionDescriptor::setSnssai(Snssai const &value) {
  m_Snssai = value;
}
std::vector<DnnRouteSelectionDescriptor> &
SnssaiRouteSelectionDescriptor::getDnnRouteSelDescs() {
  return m_DnnRouteSelDescs;
}
void SnssaiRouteSelectionDescriptor::setDnnRouteSelDescs(
    std::vector<DnnRouteSelectionDescriptor> const &value) {
  m_DnnRouteSelDescs = value;
  m_DnnRouteSelDescsIsSet = true;
}
bool SnssaiRouteSelectionDescriptor::dnnRouteSelDescsIsSet() const {
  return m_DnnRouteSelDescsIsSet;
}
void SnssaiRouteSelectionDescriptor::unsetDnnRouteSelDescs() {
  m_DnnRouteSelDescsIsSet = false;
}

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