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

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

PfdChangeNotification::PfdChangeNotification() {
  m_ApplicationId = "";
  m_RemovalFlag = false;
  m_RemovalFlagIsSet = false;
  m_PartialFlag = false;
  m_PartialFlagIsSet = false;
  m_PfdsIsSet = false;
}

PfdChangeNotification::~PfdChangeNotification() {}

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

void to_json(nlohmann::json &j, const PfdChangeNotification &o) {
  j = nlohmann::json();
  j["applicationId"] = o.m_ApplicationId;
  if (o.removalFlagIsSet())
    j["removalFlag"] = o.m_RemovalFlag;
  if (o.partialFlagIsSet())
    j["partialFlag"] = o.m_PartialFlag;
  if (o.pfdsIsSet() || !o.m_Pfds.empty())
    j["pfds"] = o.m_Pfds;
}

void from_json(const nlohmann::json &j, PfdChangeNotification &o) {
  j.at("applicationId").get_to(o.m_ApplicationId);
  if (j.find("removalFlag") != j.end()) {
    j.at("removalFlag").get_to(o.m_RemovalFlag);
    o.m_RemovalFlagIsSet = true;
  }
  if (j.find("partialFlag") != j.end()) {
    j.at("partialFlag").get_to(o.m_PartialFlag);
    o.m_PartialFlagIsSet = true;
  }
  if (j.find("pfds") != j.end()) {
    j.at("pfds").get_to(o.m_Pfds);
    o.m_PfdsIsSet = true;
  }
}

std::string PfdChangeNotification::getApplicationId() const {
  return m_ApplicationId;
}
void PfdChangeNotification::setApplicationId(std::string const &value) {
  m_ApplicationId = value;
}
bool PfdChangeNotification::isRemovalFlag() const { return m_RemovalFlag; }
void PfdChangeNotification::setRemovalFlag(bool const value) {
  m_RemovalFlag = value;
  m_RemovalFlagIsSet = true;
}
bool PfdChangeNotification::removalFlagIsSet() const {
  return m_RemovalFlagIsSet;
}
void PfdChangeNotification::unsetRemovalFlag() { m_RemovalFlagIsSet = false; }
bool PfdChangeNotification::isPartialFlag() const { return m_PartialFlag; }
void PfdChangeNotification::setPartialFlag(bool const value) {
  m_PartialFlag = value;
  m_PartialFlagIsSet = true;
}
bool PfdChangeNotification::partialFlagIsSet() const {
  return m_PartialFlagIsSet;
}
void PfdChangeNotification::unsetPartialFlag() { m_PartialFlagIsSet = false; }
std::vector<PfdContent> &PfdChangeNotification::getPfds() { return m_Pfds; }
void PfdChangeNotification::setPfds(std::vector<PfdContent> const &value) {
  m_Pfds = value;
  m_PfdsIsSet = true;
}
bool PfdChangeNotification::pfdsIsSet() const { return m_PfdsIsSet; }
void PfdChangeNotification::unsetPfds() { m_PfdsIsSet = false; }

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