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

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

UnrelatedClass::UnrelatedClass() {
  m_ExternalUnrelatedClassIsSet = false;
  m_ServiceTypeUnrelatedClassesIsSet = false;
}

UnrelatedClass::~UnrelatedClass() {}

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

void to_json(nlohmann::json &j, const UnrelatedClass &o) {
  j = nlohmann::json();
  j["defaultUnrelatedClass"] = o.m_DefaultUnrelatedClass;
  if (o.externalUnrelatedClassIsSet())
    j["externalUnrelatedClass"] = o.m_ExternalUnrelatedClass;
  if (o.serviceTypeUnrelatedClassesIsSet() ||
      !o.m_ServiceTypeUnrelatedClasses.empty())
    j["serviceTypeUnrelatedClasses"] = o.m_ServiceTypeUnrelatedClasses;
}

void from_json(const nlohmann::json &j, UnrelatedClass &o) {
  j.at("defaultUnrelatedClass").get_to(o.m_DefaultUnrelatedClass);
  if (j.find("externalUnrelatedClass") != j.end()) {
    j.at("externalUnrelatedClass").get_to(o.m_ExternalUnrelatedClass);
    o.m_ExternalUnrelatedClassIsSet = true;
  }
  if (j.find("serviceTypeUnrelatedClasses") != j.end()) {
    j.at("serviceTypeUnrelatedClasses").get_to(o.m_ServiceTypeUnrelatedClasses);
    o.m_ServiceTypeUnrelatedClassesIsSet = true;
  }
}

DefaultUnrelatedClass UnrelatedClass::getDefaultUnrelatedClass() const {
  return m_DefaultUnrelatedClass;
}
void UnrelatedClass::setDefaultUnrelatedClass(
    DefaultUnrelatedClass const &value) {
  m_DefaultUnrelatedClass = value;
}
ExternalUnrelatedClass UnrelatedClass::getExternalUnrelatedClass() const {
  return m_ExternalUnrelatedClass;
}
void UnrelatedClass::setExternalUnrelatedClass(
    ExternalUnrelatedClass const &value) {
  m_ExternalUnrelatedClass = value;
  m_ExternalUnrelatedClassIsSet = true;
}
bool UnrelatedClass::externalUnrelatedClassIsSet() const {
  return m_ExternalUnrelatedClassIsSet;
}
void UnrelatedClass::unsetExternalUnrelatedClass() {
  m_ExternalUnrelatedClassIsSet = false;
}
std::vector<ServiceTypeUnrelatedClass> &
UnrelatedClass::getServiceTypeUnrelatedClasses() {
  return m_ServiceTypeUnrelatedClasses;
}
void UnrelatedClass::setServiceTypeUnrelatedClasses(
    std::vector<ServiceTypeUnrelatedClass> const &value) {
  m_ServiceTypeUnrelatedClasses = value;
  m_ServiceTypeUnrelatedClassesIsSet = true;
}
bool UnrelatedClass::serviceTypeUnrelatedClassesIsSet() const {
  return m_ServiceTypeUnrelatedClassesIsSet;
}
void UnrelatedClass::unsetServiceTypeUnrelatedClasses() {
  m_ServiceTypeUnrelatedClassesIsSet = false;
}

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