LocationArea.cpp 2.64 KB
Newer Older
yangjian's avatar
yangjian committed
1
/**
yangjian's avatar
yangjian committed
2 3 4 5 6 7 8 9 10 11 12
 * 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.
 */
yangjian's avatar
yangjian committed
13 14 15

#include "LocationArea.h"

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
16
namespace oai::udr::model {
yangjian's avatar
yangjian committed
17

yangjian's avatar
yangjian committed
18 19 20 21
LocationArea::LocationArea() {
  m_GeographicAreasIsSet = false;
  m_CivicAddressesIsSet = false;
  m_NwAreaInfoIsSet = false;
yangjian's avatar
yangjian committed
22 23
}

yangjian's avatar
yangjian committed
24
LocationArea::~LocationArea() {}
yangjian's avatar
yangjian committed
25

yangjian's avatar
yangjian committed
26 27
void LocationArea::validate() {
  // TODO: implement validation
yangjian's avatar
yangjian committed
28 29
}

yangjian's avatar
yangjian committed
30 31 32 33 34 35 36 37
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;
yangjian's avatar
yangjian committed
38 39
}

yangjian's avatar
yangjian committed
40 41 42 43 44 45 46 47 48 49 50 51 52
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;
  }
yangjian's avatar
yangjian committed
53 54
}

yangjian's avatar
yangjian committed
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
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; }
yangjian's avatar
yangjian committed
83

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
84
} // namespace oai::udr::model