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

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

LocationArea::LocationArea() {
  m_GeographicAreasIsSet = false;
  m_CivicAddressesIsSet = false;
  m_NwAreaInfoIsSet = false;
}

LocationArea::~LocationArea() {}

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

void to_json(nlohmann::json &j, const LocationArea &o) {
  j = nlohmann::json();
  if (o.geographicAreasIsSet() || !o.m_GeographicAreas.empty())
    j["geographicAreas"] = o.m_GeographicAreas;
  if (o.civicAddressesIsSet() || !o.m_CivicAddresses.empty())
    j["civicAddresses"] = o.m_CivicAddresses;
  if (o.nwAreaInfoIsSet())
    j["nwAreaInfo"] = o.m_NwAreaInfo;
}

void from_json(const nlohmann::json &j, LocationArea &o) {
  if (j.find("geographicAreas") != j.end()) {
    j.at("geographicAreas").get_to(o.m_GeographicAreas);
    o.m_GeographicAreasIsSet = true;
  }
  if (j.find("civicAddresses") != j.end()) {
    j.at("civicAddresses").get_to(o.m_CivicAddresses);
    o.m_CivicAddressesIsSet = true;
  }
  if (j.find("nwAreaInfo") != j.end()) {
    j.at("nwAreaInfo").get_to(o.m_NwAreaInfo);
    o.m_NwAreaInfoIsSet = true;
  }
}

std::vector<GeographicArea> &LocationArea::getGeographicAreas() {
  return m_GeographicAreas;
}
void LocationArea::setGeographicAreas(
    std::vector<GeographicArea> const &value) {
  m_GeographicAreas = value;
  m_GeographicAreasIsSet = true;
}
bool LocationArea::geographicAreasIsSet() const {
  return m_GeographicAreasIsSet;
}
void LocationArea::unsetGeographicAreas() { m_GeographicAreasIsSet = false; }
std::vector<CivicAddress> &LocationArea::getCivicAddresses() {
  return m_CivicAddresses;
}
void LocationArea::setCivicAddresses(std::vector<CivicAddress> const &value) {
  m_CivicAddresses = value;
  m_CivicAddressesIsSet = true;
}
bool LocationArea::civicAddressesIsSet() const { return m_CivicAddressesIsSet; }
void LocationArea::unsetCivicAddresses() { m_CivicAddressesIsSet = false; }
NetworkAreaInfo LocationArea::getNwAreaInfo() const { return m_NwAreaInfo; }
void LocationArea::setNwAreaInfo(NetworkAreaInfo const &value) {
  m_NwAreaInfo = value;
  m_NwAreaInfoIsSet = true;
}
bool LocationArea::nwAreaInfoIsSet() const { return m_NwAreaInfoIsSet; }
void LocationArea::unsetNwAreaInfo() { m_NwAreaInfoIsSet = false; }

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