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

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

AccessAndMobilityData::AccessAndMobilityData() {
  m_LocationIsSet = false;
  m_LocationTs = "";
  m_LocationTsIsSet = false;
  m_TimeZone = "";
  m_TimeZoneIsSet = false;
  m_TimeZoneTs = "";
  m_TimeZoneTsIsSet = false;
  m_AccessTypeIsSet = false;
  m_RegStatesIsSet = false;
  m_RegStatesTs = "";
  m_RegStatesTsIsSet = false;
  m_ConnStatesIsSet = false;
  m_ConnStatesTs = "";
  m_ConnStatesTsIsSet = false;
  m_ReachabilityStatusIsSet = false;
  m_ReachabilityStatusTs = "";
  m_ReachabilityStatusTsIsSet = false;
  m_SmsOverNasStatusIsSet = false;
  m_SmsOverNasStatusTs = "";
  m_SmsOverNasStatusTsIsSet = false;
  m_RoamingStatus = false;
  m_RoamingStatusIsSet = false;
  m_RoamingStatusTs = "";
  m_RoamingStatusTsIsSet = false;
  m_CurrentPlmnIsSet = false;
  m_CurrentPlmnTs = "";
  m_CurrentPlmnTsIsSet = false;
  m_RatTypeIsSet = false;
  m_RatTypesTs = "";
  m_RatTypesTsIsSet = false;
  m_SuppFeat = "";
  m_SuppFeatIsSet = false;
}

AccessAndMobilityData::~AccessAndMobilityData() {}

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

void to_json(nlohmann::json &j, const AccessAndMobilityData &o) {
  j = nlohmann::json();
  if (o.locationIsSet())
    j["location"] = o.m_Location;
  if (o.locationTsIsSet())
    j["locationTs"] = o.m_LocationTs;
  if (o.timeZoneIsSet())
    j["timeZone"] = o.m_TimeZone;
  if (o.timeZoneTsIsSet())
    j["timeZoneTs"] = o.m_TimeZoneTs;
  if (o.accessTypeIsSet())
    j["accessType"] = o.m_AccessType;
  if (o.regStatesIsSet() || !o.m_RegStates.empty())
    j["regStates"] = o.m_RegStates;
  if (o.regStatesTsIsSet())
    j["regStatesTs"] = o.m_RegStatesTs;
  if (o.connStatesIsSet() || !o.m_ConnStates.empty())
    j["connStates"] = o.m_ConnStates;
  if (o.connStatesTsIsSet())
    j["connStatesTs"] = o.m_ConnStatesTs;
  if (o.reachabilityStatusIsSet())
    j["reachabilityStatus"] = o.m_ReachabilityStatus;
  if (o.reachabilityStatusTsIsSet())
    j["reachabilityStatusTs"] = o.m_ReachabilityStatusTs;
  if (o.smsOverNasStatusIsSet())
    j["smsOverNasStatus"] = o.m_SmsOverNasStatus;
  if (o.smsOverNasStatusTsIsSet())
    j["smsOverNasStatusTs"] = o.m_SmsOverNasStatusTs;
  if (o.roamingStatusIsSet())
    j["roamingStatus"] = o.m_RoamingStatus;
  if (o.roamingStatusTsIsSet())
    j["roamingStatusTs"] = o.m_RoamingStatusTs;
  if (o.currentPlmnIsSet())
    j["currentPlmn"] = o.m_CurrentPlmn;
  if (o.currentPlmnTsIsSet())
    j["currentPlmnTs"] = o.m_CurrentPlmnTs;
  if (o.ratTypeIsSet() || !o.m_RatType.empty())
    j["ratType"] = o.m_RatType;
  if (o.ratTypesTsIsSet())
    j["ratTypesTs"] = o.m_RatTypesTs;
  if (o.suppFeatIsSet())
    j["suppFeat"] = o.m_SuppFeat;
}

void from_json(const nlohmann::json &j, AccessAndMobilityData &o) {
  if (j.find("location") != j.end()) {
    j.at("location").get_to(o.m_Location);
    o.m_LocationIsSet = true;
  }
  if (j.find("locationTs") != j.end()) {
    j.at("locationTs").get_to(o.m_LocationTs);
    o.m_LocationTsIsSet = true;
  }
  if (j.find("timeZone") != j.end()) {
    j.at("timeZone").get_to(o.m_TimeZone);
    o.m_TimeZoneIsSet = true;
  }
  if (j.find("timeZoneTs") != j.end()) {
    j.at("timeZoneTs").get_to(o.m_TimeZoneTs);
    o.m_TimeZoneTsIsSet = true;
  }
  if (j.find("accessType") != j.end()) {
    j.at("accessType").get_to(o.m_AccessType);
    o.m_AccessTypeIsSet = true;
  }
  if (j.find("regStates") != j.end()) {
    j.at("regStates").get_to(o.m_RegStates);
    o.m_RegStatesIsSet = true;
  }
  if (j.find("regStatesTs") != j.end()) {
    j.at("regStatesTs").get_to(o.m_RegStatesTs);
    o.m_RegStatesTsIsSet = true;
  }
  if (j.find("connStates") != j.end()) {
    j.at("connStates").get_to(o.m_ConnStates);
    o.m_ConnStatesIsSet = true;
  }
  if (j.find("connStatesTs") != j.end()) {
    j.at("connStatesTs").get_to(o.m_ConnStatesTs);
    o.m_ConnStatesTsIsSet = true;
  }
  if (j.find("reachabilityStatus") != j.end()) {
    j.at("reachabilityStatus").get_to(o.m_ReachabilityStatus);
    o.m_ReachabilityStatusIsSet = true;
  }
  if (j.find("reachabilityStatusTs") != j.end()) {
    j.at("reachabilityStatusTs").get_to(o.m_ReachabilityStatusTs);
    o.m_ReachabilityStatusTsIsSet = true;
  }
  if (j.find("smsOverNasStatus") != j.end()) {
    j.at("smsOverNasStatus").get_to(o.m_SmsOverNasStatus);
    o.m_SmsOverNasStatusIsSet = true;
  }
  if (j.find("smsOverNasStatusTs") != j.end()) {
    j.at("smsOverNasStatusTs").get_to(o.m_SmsOverNasStatusTs);
    o.m_SmsOverNasStatusTsIsSet = true;
  }
  if (j.find("roamingStatus") != j.end()) {
    j.at("roamingStatus").get_to(o.m_RoamingStatus);
    o.m_RoamingStatusIsSet = true;
  }
  if (j.find("roamingStatusTs") != j.end()) {
    j.at("roamingStatusTs").get_to(o.m_RoamingStatusTs);
    o.m_RoamingStatusTsIsSet = true;
  }
  if (j.find("currentPlmn") != j.end()) {
    j.at("currentPlmn").get_to(o.m_CurrentPlmn);
    o.m_CurrentPlmnIsSet = true;
  }
  if (j.find("currentPlmnTs") != j.end()) {
    j.at("currentPlmnTs").get_to(o.m_CurrentPlmnTs);
    o.m_CurrentPlmnTsIsSet = true;
  }
  if (j.find("ratType") != j.end()) {
    j.at("ratType").get_to(o.m_RatType);
    o.m_RatTypeIsSet = true;
  }
  if (j.find("ratTypesTs") != j.end()) {
    j.at("ratTypesTs").get_to(o.m_RatTypesTs);
    o.m_RatTypesTsIsSet = true;
  }
  if (j.find("suppFeat") != j.end()) {
    j.at("suppFeat").get_to(o.m_SuppFeat);
    o.m_SuppFeatIsSet = true;
  }
}

UserLocation AccessAndMobilityData::getLocation() const { return m_Location; }
void AccessAndMobilityData::setLocation(UserLocation const &value) {
  m_Location = value;
  m_LocationIsSet = true;
}
bool AccessAndMobilityData::locationIsSet() const { return m_LocationIsSet; }
void AccessAndMobilityData::unsetLocation() { m_LocationIsSet = false; }
std::string AccessAndMobilityData::getLocationTs() const {
  return m_LocationTs;
}
void AccessAndMobilityData::setLocationTs(std::string const &value) {
  m_LocationTs = value;
  m_LocationTsIsSet = true;
}
bool AccessAndMobilityData::locationTsIsSet() const {
  return m_LocationTsIsSet;
}
void AccessAndMobilityData::unsetLocationTs() { m_LocationTsIsSet = false; }
std::string AccessAndMobilityData::getTimeZone() const { return m_TimeZone; }
void AccessAndMobilityData::setTimeZone(std::string const &value) {
  m_TimeZone = value;
  m_TimeZoneIsSet = true;
}
bool AccessAndMobilityData::timeZoneIsSet() const { return m_TimeZoneIsSet; }
void AccessAndMobilityData::unsetTimeZone() { m_TimeZoneIsSet = false; }
std::string AccessAndMobilityData::getTimeZoneTs() const {
  return m_TimeZoneTs;
}
void AccessAndMobilityData::setTimeZoneTs(std::string const &value) {
  m_TimeZoneTs = value;
  m_TimeZoneTsIsSet = true;
}
bool AccessAndMobilityData::timeZoneTsIsSet() const {
  return m_TimeZoneTsIsSet;
}
void AccessAndMobilityData::unsetTimeZoneTs() { m_TimeZoneTsIsSet = false; }
AccessType AccessAndMobilityData::getAccessType() const { return m_AccessType; }
void AccessAndMobilityData::setAccessType(AccessType const &value) {
  m_AccessType = value;
  m_AccessTypeIsSet = true;
}
bool AccessAndMobilityData::accessTypeIsSet() const {
  return m_AccessTypeIsSet;
}
void AccessAndMobilityData::unsetAccessType() { m_AccessTypeIsSet = false; }
std::vector<RmInfo> &AccessAndMobilityData::getRegStates() {
  return m_RegStates;
}
void AccessAndMobilityData::setRegStates(std::vector<RmInfo> const &value) {
  m_RegStates = value;
  m_RegStatesIsSet = true;
}
bool AccessAndMobilityData::regStatesIsSet() const { return m_RegStatesIsSet; }
void AccessAndMobilityData::unsetRegStates() { m_RegStatesIsSet = false; }
std::string AccessAndMobilityData::getRegStatesTs() const {
  return m_RegStatesTs;
}
void AccessAndMobilityData::setRegStatesTs(std::string const &value) {
  m_RegStatesTs = value;
  m_RegStatesTsIsSet = true;
}
bool AccessAndMobilityData::regStatesTsIsSet() const {
  return m_RegStatesTsIsSet;
}
void AccessAndMobilityData::unsetRegStatesTs() { m_RegStatesTsIsSet = false; }
std::vector<CmInfo> &AccessAndMobilityData::getConnStates() {
  return m_ConnStates;
}
void AccessAndMobilityData::setConnStates(std::vector<CmInfo> const &value) {
  m_ConnStates = value;
  m_ConnStatesIsSet = true;
}
bool AccessAndMobilityData::connStatesIsSet() const {
  return m_ConnStatesIsSet;
}
void AccessAndMobilityData::unsetConnStates() { m_ConnStatesIsSet = false; }
std::string AccessAndMobilityData::getConnStatesTs() const {
  return m_ConnStatesTs;
}
void AccessAndMobilityData::setConnStatesTs(std::string const &value) {
  m_ConnStatesTs = value;
  m_ConnStatesTsIsSet = true;
}
bool AccessAndMobilityData::connStatesTsIsSet() const {
  return m_ConnStatesTsIsSet;
}
void AccessAndMobilityData::unsetConnStatesTs() { m_ConnStatesTsIsSet = false; }
UeReachability AccessAndMobilityData::getReachabilityStatus() const {
  return m_ReachabilityStatus;
}
void AccessAndMobilityData::setReachabilityStatus(UeReachability const &value) {
  m_ReachabilityStatus = value;
  m_ReachabilityStatusIsSet = true;
}
bool AccessAndMobilityData::reachabilityStatusIsSet() const {
  return m_ReachabilityStatusIsSet;
}
void AccessAndMobilityData::unsetReachabilityStatus() {
  m_ReachabilityStatusIsSet = false;
}
std::string AccessAndMobilityData::getReachabilityStatusTs() const {
  return m_ReachabilityStatusTs;
}
void AccessAndMobilityData::setReachabilityStatusTs(std::string const &value) {
  m_ReachabilityStatusTs = value;
  m_ReachabilityStatusTsIsSet = true;
}
bool AccessAndMobilityData::reachabilityStatusTsIsSet() const {
  return m_ReachabilityStatusTsIsSet;
}
void AccessAndMobilityData::unsetReachabilityStatusTs() {
  m_ReachabilityStatusTsIsSet = false;
}
SmsSupport AccessAndMobilityData::getSmsOverNasStatus() const {
  return m_SmsOverNasStatus;
}
void AccessAndMobilityData::setSmsOverNasStatus(SmsSupport const &value) {
  m_SmsOverNasStatus = value;
  m_SmsOverNasStatusIsSet = true;
}
bool AccessAndMobilityData::smsOverNasStatusIsSet() const {
  return m_SmsOverNasStatusIsSet;
}
void AccessAndMobilityData::unsetSmsOverNasStatus() {
  m_SmsOverNasStatusIsSet = false;
}
std::string AccessAndMobilityData::getSmsOverNasStatusTs() const {
  return m_SmsOverNasStatusTs;
}
void AccessAndMobilityData::setSmsOverNasStatusTs(std::string const &value) {
  m_SmsOverNasStatusTs = value;
  m_SmsOverNasStatusTsIsSet = true;
}
bool AccessAndMobilityData::smsOverNasStatusTsIsSet() const {
  return m_SmsOverNasStatusTsIsSet;
}
void AccessAndMobilityData::unsetSmsOverNasStatusTs() {
  m_SmsOverNasStatusTsIsSet = false;
}
bool AccessAndMobilityData::isRoamingStatus() const { return m_RoamingStatus; }
void AccessAndMobilityData::setRoamingStatus(bool const value) {
  m_RoamingStatus = value;
  m_RoamingStatusIsSet = true;
}
bool AccessAndMobilityData::roamingStatusIsSet() const {
  return m_RoamingStatusIsSet;
}
void AccessAndMobilityData::unsetRoamingStatus() {
  m_RoamingStatusIsSet = false;
}
std::string AccessAndMobilityData::getRoamingStatusTs() const {
  return m_RoamingStatusTs;
}
void AccessAndMobilityData::setRoamingStatusTs(std::string const &value) {
  m_RoamingStatusTs = value;
  m_RoamingStatusTsIsSet = true;
}
bool AccessAndMobilityData::roamingStatusTsIsSet() const {
  return m_RoamingStatusTsIsSet;
}
void AccessAndMobilityData::unsetRoamingStatusTs() {
  m_RoamingStatusTsIsSet = false;
}
PlmnId AccessAndMobilityData::getCurrentPlmn() const { return m_CurrentPlmn; }
void AccessAndMobilityData::setCurrentPlmn(PlmnId const &value) {
  m_CurrentPlmn = value;
  m_CurrentPlmnIsSet = true;
}
bool AccessAndMobilityData::currentPlmnIsSet() const {
  return m_CurrentPlmnIsSet;
}
void AccessAndMobilityData::unsetCurrentPlmn() { m_CurrentPlmnIsSet = false; }
std::string AccessAndMobilityData::getCurrentPlmnTs() const {
  return m_CurrentPlmnTs;
}
void AccessAndMobilityData::setCurrentPlmnTs(std::string const &value) {
  m_CurrentPlmnTs = value;
  m_CurrentPlmnTsIsSet = true;
}
bool AccessAndMobilityData::currentPlmnTsIsSet() const {
  return m_CurrentPlmnTsIsSet;
}
void AccessAndMobilityData::unsetCurrentPlmnTs() {
  m_CurrentPlmnTsIsSet = false;
}
std::vector<RatType> &AccessAndMobilityData::getRatType() { return m_RatType; }
void AccessAndMobilityData::setRatType(std::vector<RatType> const &value) {
  m_RatType = value;
  m_RatTypeIsSet = true;
}
bool AccessAndMobilityData::ratTypeIsSet() const { return m_RatTypeIsSet; }
void AccessAndMobilityData::unsetRatType() { m_RatTypeIsSet = false; }
std::string AccessAndMobilityData::getRatTypesTs() const {
  return m_RatTypesTs;
}
void AccessAndMobilityData::setRatTypesTs(std::string const &value) {
  m_RatTypesTs = value;
  m_RatTypesTsIsSet = true;
}
bool AccessAndMobilityData::ratTypesTsIsSet() const {
  return m_RatTypesTsIsSet;
}
void AccessAndMobilityData::unsetRatTypesTs() { m_RatTypesTsIsSet = false; }
std::string AccessAndMobilityData::getSuppFeat() const { return m_SuppFeat; }
void AccessAndMobilityData::setSuppFeat(std::string const &value) {
  m_SuppFeat = value;
  m_SuppFeatIsSet = true;
}
bool AccessAndMobilityData::suppFeatIsSet() const { return m_SuppFeatIsSet; }
void AccessAndMobilityData::unsetSuppFeat() { m_SuppFeatIsSet = false; }

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