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

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

DataChangeNotify::DataChangeNotify() {
  m_OriginalCallbackReferenceIsSet = false;
  m_UeId = "";
  m_UeIdIsSet = false;
  m_NotifyItemsIsSet = false;
  m_SdmSubscriptionIsSet = false;
  m_AdditionalSdmSubscriptionsIsSet = false;
  m_SubscriptionDataSubscriptionsIsSet = false;
}

DataChangeNotify::~DataChangeNotify() {}

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

void to_json(nlohmann::json &j, const DataChangeNotify &o) {
  j = nlohmann::json();
  if (o.originalCallbackReferenceIsSet() ||
      !o.m_OriginalCallbackReference.empty())
    j["originalCallbackReference"] = o.m_OriginalCallbackReference;
  if (o.ueIdIsSet())
    j["ueId"] = o.m_UeId;
  if (o.notifyItemsIsSet() || !o.m_NotifyItems.empty())
    j["notifyItems"] = o.m_NotifyItems;
  if (o.sdmSubscriptionIsSet())
    j["sdmSubscription"] = o.m_SdmSubscription;
  if (o.additionalSdmSubscriptionsIsSet() ||
      !o.m_AdditionalSdmSubscriptions.empty())
    j["additionalSdmSubscriptions"] = o.m_AdditionalSdmSubscriptions;
  if (o.subscriptionDataSubscriptionsIsSet() ||
      !o.m_SubscriptionDataSubscriptions.empty())
    j["subscriptionDataSubscriptions"] = o.m_SubscriptionDataSubscriptions;
}

void from_json(const nlohmann::json &j, DataChangeNotify &o) {
  if (j.find("originalCallbackReference") != j.end()) {
    j.at("originalCallbackReference").get_to(o.m_OriginalCallbackReference);
    o.m_OriginalCallbackReferenceIsSet = true;
  }
  if (j.find("ueId") != j.end()) {
    j.at("ueId").get_to(o.m_UeId);
    o.m_UeIdIsSet = true;
  }
  if (j.find("notifyItems") != j.end()) {
    j.at("notifyItems").get_to(o.m_NotifyItems);
    o.m_NotifyItemsIsSet = true;
  }
  if (j.find("sdmSubscription") != j.end()) {
    j.at("sdmSubscription").get_to(o.m_SdmSubscription);
    o.m_SdmSubscriptionIsSet = true;
  }
  if (j.find("additionalSdmSubscriptions") != j.end()) {
    j.at("additionalSdmSubscriptions").get_to(o.m_AdditionalSdmSubscriptions);
    o.m_AdditionalSdmSubscriptionsIsSet = true;
  }
  if (j.find("subscriptionDataSubscriptions") != j.end()) {
    j.at("subscriptionDataSubscriptions")
        .get_to(o.m_SubscriptionDataSubscriptions);
    o.m_SubscriptionDataSubscriptionsIsSet = true;
  }
}

std::vector<std::string> &DataChangeNotify::getOriginalCallbackReference() {
  return m_OriginalCallbackReference;
}
void DataChangeNotify::setOriginalCallbackReference(
    std::vector<std::string> const &value) {
  m_OriginalCallbackReference = value;
  m_OriginalCallbackReferenceIsSet = true;
}
bool DataChangeNotify::originalCallbackReferenceIsSet() const {
  return m_OriginalCallbackReferenceIsSet;
}
void DataChangeNotify::unsetOriginalCallbackReference() {
  m_OriginalCallbackReferenceIsSet = false;
}
std::string DataChangeNotify::getUeId() const { return m_UeId; }
void DataChangeNotify::setUeId(std::string const &value) {
  m_UeId = value;
  m_UeIdIsSet = true;
}
bool DataChangeNotify::ueIdIsSet() const { return m_UeIdIsSet; }
void DataChangeNotify::unsetUeId() { m_UeIdIsSet = false; }
std::vector<NotifyItem> &DataChangeNotify::getNotifyItems() {
  return m_NotifyItems;
}
void DataChangeNotify::setNotifyItems(std::vector<NotifyItem> const &value) {
  m_NotifyItems = value;
  m_NotifyItemsIsSet = true;
}
bool DataChangeNotify::notifyItemsIsSet() const { return m_NotifyItemsIsSet; }
void DataChangeNotify::unsetNotifyItems() { m_NotifyItemsIsSet = false; }
SdmSubscription DataChangeNotify::getSdmSubscription() const {
  return m_SdmSubscription;
}
void DataChangeNotify::setSdmSubscription(SdmSubscription const &value) {
  m_SdmSubscription = value;
  m_SdmSubscriptionIsSet = true;
}
bool DataChangeNotify::sdmSubscriptionIsSet() const {
  return m_SdmSubscriptionIsSet;
}
void DataChangeNotify::unsetSdmSubscription() {
  m_SdmSubscriptionIsSet = false;
}
std::vector<SdmSubscription> &
DataChangeNotify::getAdditionalSdmSubscriptions() {
  return m_AdditionalSdmSubscriptions;
}
void DataChangeNotify::setAdditionalSdmSubscriptions(
    std::vector<SdmSubscription> const &value) {
  m_AdditionalSdmSubscriptions = value;
  m_AdditionalSdmSubscriptionsIsSet = true;
}
bool DataChangeNotify::additionalSdmSubscriptionsIsSet() const {
  return m_AdditionalSdmSubscriptionsIsSet;
}
void DataChangeNotify::unsetAdditionalSdmSubscriptions() {
  m_AdditionalSdmSubscriptionsIsSet = false;
}
std::vector<SubscriptionDataSubscriptions> &
DataChangeNotify::getSubscriptionDataSubscriptions() {
  return m_SubscriptionDataSubscriptions;
}
void DataChangeNotify::setSubscriptionDataSubscriptions(
    std::vector<SubscriptionDataSubscriptions> const &value) {
  m_SubscriptionDataSubscriptions = value;
  m_SubscriptionDataSubscriptionsIsSet = true;
}
bool DataChangeNotify::subscriptionDataSubscriptionsIsSet() const {
  return m_SubscriptionDataSubscriptionsIsSet;
}
void DataChangeNotify::unsetSubscriptionDataSubscriptions() {
  m_SubscriptionDataSubscriptionsIsSet = false;
}

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