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

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

PresenceInfo::PresenceInfo() {
  m_PraId = "";
  m_PraIdIsSet = false;
  m_AdditionalPraId = "";
  m_AdditionalPraIdIsSet = false;
  m_PresenceStateIsSet = false;
  m_TrackingAreaListIsSet = false;
  m_EcgiListIsSet = false;
  m_NcgiListIsSet = false;
  m_GlobalRanNodeIdListIsSet = false;
  m_GlobaleNbIdListIsSet = false;
}

PresenceInfo::~PresenceInfo() {}

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

void to_json(nlohmann::json &j, const PresenceInfo &o) {
  j = nlohmann::json();
  if (o.praIdIsSet())
    j["praId"] = o.m_PraId;
  if (o.additionalPraIdIsSet())
    j["additionalPraId"] = o.m_AdditionalPraId;
  if (o.presenceStateIsSet())
    j["presenceState"] = o.m_PresenceState;
  if (o.trackingAreaListIsSet() || !o.m_TrackingAreaList.empty())
    j["trackingAreaList"] = o.m_TrackingAreaList;
  if (o.ecgiListIsSet() || !o.m_EcgiList.empty())
    j["ecgiList"] = o.m_EcgiList;
  if (o.ncgiListIsSet() || !o.m_NcgiList.empty())
    j["ncgiList"] = o.m_NcgiList;
  if (o.globalRanNodeIdListIsSet() || !o.m_GlobalRanNodeIdList.empty())
    j["globalRanNodeIdList"] = o.m_GlobalRanNodeIdList;
  if (o.globaleNbIdListIsSet() || !o.m_GlobaleNbIdList.empty())
    j["globaleNbIdList"] = o.m_GlobaleNbIdList;
}

void from_json(const nlohmann::json &j, PresenceInfo &o) {
  if (j.find("praId") != j.end()) {
    j.at("praId").get_to(o.m_PraId);
    o.m_PraIdIsSet = true;
  }
  if (j.find("additionalPraId") != j.end()) {
    j.at("additionalPraId").get_to(o.m_AdditionalPraId);
    o.m_AdditionalPraIdIsSet = true;
  }
  if (j.find("presenceState") != j.end()) {
    j.at("presenceState").get_to(o.m_PresenceState);
    o.m_PresenceStateIsSet = true;
  }
  if (j.find("trackingAreaList") != j.end()) {
    j.at("trackingAreaList").get_to(o.m_TrackingAreaList);
    o.m_TrackingAreaListIsSet = true;
  }
  if (j.find("ecgiList") != j.end()) {
    j.at("ecgiList").get_to(o.m_EcgiList);
    o.m_EcgiListIsSet = true;
  }
  if (j.find("ncgiList") != j.end()) {
    j.at("ncgiList").get_to(o.m_NcgiList);
    o.m_NcgiListIsSet = true;
  }
  if (j.find("globalRanNodeIdList") != j.end()) {
    j.at("globalRanNodeIdList").get_to(o.m_GlobalRanNodeIdList);
    o.m_GlobalRanNodeIdListIsSet = true;
  }
  if (j.find("globaleNbIdList") != j.end()) {
    j.at("globaleNbIdList").get_to(o.m_GlobaleNbIdList);
    o.m_GlobaleNbIdListIsSet = true;
  }
}

std::string PresenceInfo::getPraId() const { return m_PraId; }
void PresenceInfo::setPraId(std::string const &value) {
  m_PraId = value;
  m_PraIdIsSet = true;
}
bool PresenceInfo::praIdIsSet() const { return m_PraIdIsSet; }
void PresenceInfo::unsetPraId() { m_PraIdIsSet = false; }
std::string PresenceInfo::getAdditionalPraId() const {
  return m_AdditionalPraId;
}
void PresenceInfo::setAdditionalPraId(std::string const &value) {
  m_AdditionalPraId = value;
  m_AdditionalPraIdIsSet = true;
}
bool PresenceInfo::additionalPraIdIsSet() const {
  return m_AdditionalPraIdIsSet;
}
void PresenceInfo::unsetAdditionalPraId() { m_AdditionalPraIdIsSet = false; }
PresenceState PresenceInfo::getPresenceState() const { return m_PresenceState; }
void PresenceInfo::setPresenceState(PresenceState const &value) {
  m_PresenceState = value;
  m_PresenceStateIsSet = true;
}
bool PresenceInfo::presenceStateIsSet() const { return m_PresenceStateIsSet; }
void PresenceInfo::unsetPresenceState() { m_PresenceStateIsSet = false; }
std::vector<Tai> &PresenceInfo::getTrackingAreaList() {
  return m_TrackingAreaList;
}
void PresenceInfo::setTrackingAreaList(std::vector<Tai> const &value) {
  m_TrackingAreaList = value;
  m_TrackingAreaListIsSet = true;
}
bool PresenceInfo::trackingAreaListIsSet() const {
  return m_TrackingAreaListIsSet;
}
void PresenceInfo::unsetTrackingAreaList() { m_TrackingAreaListIsSet = false; }
std::vector<Ecgi> &PresenceInfo::getEcgiList() { return m_EcgiList; }
void PresenceInfo::setEcgiList(std::vector<Ecgi> const &value) {
  m_EcgiList = value;
  m_EcgiListIsSet = true;
}
bool PresenceInfo::ecgiListIsSet() const { return m_EcgiListIsSet; }
void PresenceInfo::unsetEcgiList() { m_EcgiListIsSet = false; }
std::vector<Ncgi> &PresenceInfo::getNcgiList() { return m_NcgiList; }
void PresenceInfo::setNcgiList(std::vector<Ncgi> const &value) {
  m_NcgiList = value;
  m_NcgiListIsSet = true;
}
bool PresenceInfo::ncgiListIsSet() const { return m_NcgiListIsSet; }
void PresenceInfo::unsetNcgiList() { m_NcgiListIsSet = false; }
std::vector<GlobalRanNodeId> &PresenceInfo::getGlobalRanNodeIdList() {
  return m_GlobalRanNodeIdList;
}
void PresenceInfo::setGlobalRanNodeIdList(
    std::vector<GlobalRanNodeId> const &value) {
  m_GlobalRanNodeIdList = value;
  m_GlobalRanNodeIdListIsSet = true;
}
bool PresenceInfo::globalRanNodeIdListIsSet() const {
  return m_GlobalRanNodeIdListIsSet;
}
void PresenceInfo::unsetGlobalRanNodeIdList() {
  m_GlobalRanNodeIdListIsSet = false;
}
std::vector<GlobalRanNodeId> &PresenceInfo::getGlobaleNbIdList() {
  return m_GlobaleNbIdList;
}
void PresenceInfo::setGlobaleNbIdList(
    std::vector<GlobalRanNodeId> const &value) {
  m_GlobaleNbIdList = value;
  m_GlobaleNbIdListIsSet = true;
}
bool PresenceInfo::globaleNbIdListIsSet() const {
  return m_GlobaleNbIdListIsSet;
}
void PresenceInfo::unsetGlobaleNbIdList() { m_GlobaleNbIdListIsSet = false; }

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