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

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

SmPolicyDataPatch::SmPolicyDataPatch() {
  m_UmDataIsSet = false;
  m_SmPolicySnssaiDataIsSet = false;
}

SmPolicyDataPatch::~SmPolicyDataPatch() {}

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

void to_json(nlohmann::json &j, const SmPolicyDataPatch &o) {
  j = nlohmann::json();
  if (o.umDataIsSet() || !o.m_UmData.empty())
    j["umData"] = o.m_UmData;
  if (o.smPolicySnssaiDataIsSet() || !o.m_SmPolicySnssaiData.empty())
    j["smPolicySnssaiData"] = o.m_SmPolicySnssaiData;
}

void from_json(const nlohmann::json &j, SmPolicyDataPatch &o) {
  if (j.find("umData") != j.end()) {
    j.at("umData").get_to(o.m_UmData);
    o.m_UmDataIsSet = true;
  }
  if (j.find("smPolicySnssaiData") != j.end()) {
    j.at("smPolicySnssaiData").get_to(o.m_SmPolicySnssaiData);
    o.m_SmPolicySnssaiDataIsSet = true;
  }
}

std::map<std::string, UsageMonData> &SmPolicyDataPatch::getUmData() {
  return m_UmData;
}
void SmPolicyDataPatch::setUmData(
    std::map<std::string, UsageMonData> const &value) {
  m_UmData = value;
  m_UmDataIsSet = true;
}
bool SmPolicyDataPatch::umDataIsSet() const { return m_UmDataIsSet; }
void SmPolicyDataPatch::unsetUmData() { m_UmDataIsSet = false; }
std::map<std::string, SmPolicySnssaiDataPatch> &
SmPolicyDataPatch::getSmPolicySnssaiData() {
  return m_SmPolicySnssaiData;
}
void SmPolicyDataPatch::setSmPolicySnssaiData(
    std::map<std::string, SmPolicySnssaiDataPatch> const &value) {
  m_SmPolicySnssaiData = value;
  m_SmPolicySnssaiDataIsSet = true;
}
bool SmPolicyDataPatch::smPolicySnssaiDataIsSet() const {
  return m_SmPolicySnssaiDataIsSet;
}
void SmPolicyDataPatch::unsetSmPolicySnssaiData() {
  m_SmPolicySnssaiDataIsSet = false;
}

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