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

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

UePolicySetPatch::UePolicySetPatch() {
  m_UePolicySectionsIsSet = false;
  m_UpsisIsSet = false;
  m_AndspInd = false;
  m_AndspIndIsSet = false;
  m_Pei = "";
  m_PeiIsSet = false;
  m_OsIdsIsSet = false;
}

UePolicySetPatch::~UePolicySetPatch() {}

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

void to_json(nlohmann::json &j, const UePolicySetPatch &o) {
  j = nlohmann::json();
  if (o.uePolicySectionsIsSet() || !o.m_UePolicySections.empty())
    j["uePolicySections"] = o.m_UePolicySections;
  if (o.upsisIsSet() || !o.m_Upsis.empty())
    j["upsis"] = o.m_Upsis;
  if (o.andspIndIsSet())
    j["andspInd"] = o.m_AndspInd;
  if (o.peiIsSet())
    j["pei"] = o.m_Pei;
  if (o.osIdsIsSet() || !o.m_OsIds.empty())
    j["osIds"] = o.m_OsIds;
}

void from_json(const nlohmann::json &j, UePolicySetPatch &o) {
  if (j.find("uePolicySections") != j.end()) {
    j.at("uePolicySections").get_to(o.m_UePolicySections);
    o.m_UePolicySectionsIsSet = true;
  }
  if (j.find("upsis") != j.end()) {
    j.at("upsis").get_to(o.m_Upsis);
    o.m_UpsisIsSet = true;
  }
  if (j.find("andspInd") != j.end()) {
    j.at("andspInd").get_to(o.m_AndspInd);
    o.m_AndspIndIsSet = true;
  }
  if (j.find("pei") != j.end()) {
    j.at("pei").get_to(o.m_Pei);
    o.m_PeiIsSet = true;
  }
  if (j.find("osIds") != j.end()) {
    j.at("osIds").get_to(o.m_OsIds);
    o.m_OsIdsIsSet = true;
  }
}

std::map<std::string, UePolicySection> &
UePolicySetPatch::getUePolicySections() {
  return m_UePolicySections;
}
void UePolicySetPatch::setUePolicySections(
    std::map<std::string, UePolicySection> const &value) {
  m_UePolicySections = value;
  m_UePolicySectionsIsSet = true;
}
bool UePolicySetPatch::uePolicySectionsIsSet() const {
  return m_UePolicySectionsIsSet;
}
void UePolicySetPatch::unsetUePolicySections() {
  m_UePolicySectionsIsSet = false;
}
std::vector<std::string> &UePolicySetPatch::getUpsis() { return m_Upsis; }
void UePolicySetPatch::setUpsis(std::vector<std::string> const &value) {
  m_Upsis = value;
  m_UpsisIsSet = true;
}
bool UePolicySetPatch::upsisIsSet() const { return m_UpsisIsSet; }
void UePolicySetPatch::unsetUpsis() { m_UpsisIsSet = false; }
bool UePolicySetPatch::isAndspInd() const { return m_AndspInd; }
void UePolicySetPatch::setAndspInd(bool const value) {
  m_AndspInd = value;
  m_AndspIndIsSet = true;
}
bool UePolicySetPatch::andspIndIsSet() const { return m_AndspIndIsSet; }
void UePolicySetPatch::unsetAndspInd() { m_AndspIndIsSet = false; }
std::string UePolicySetPatch::getPei() const { return m_Pei; }
void UePolicySetPatch::setPei(std::string const &value) {
  m_Pei = value;
  m_PeiIsSet = true;
}
bool UePolicySetPatch::peiIsSet() const { return m_PeiIsSet; }
void UePolicySetPatch::unsetPei() { m_PeiIsSet = false; }
std::vector<std::string> &UePolicySetPatch::getOsIds() { return m_OsIds; }
void UePolicySetPatch::setOsIds(std::vector<std::string> const &value) {
  m_OsIds = value;
  m_OsIdsIsSet = true;
}
bool UePolicySetPatch::osIdsIsSet() const { return m_OsIdsIsSet; }
void UePolicySetPatch::unsetOsIds() { m_OsIdsIsSet = false; }

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