/**
 * Namf_Communication
 * AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
 * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 1.1.0.alpha-1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "AmfEvent.h"

namespace oai {
namespace amf {
namespace model {

AmfEvent::AmfEvent() {
  m_ImmediateFlag           = false;
  m_ImmediateFlagIsSet      = false;
  m_AreaListIsSet           = false;
  m_LocationFilterListIsSet = false;
  m_RefId                   = 0;
  m_RefIdIsSet              = false;
}

AmfEvent::~AmfEvent() {}

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

void to_json(nlohmann::json& j, const AmfEvent& o) {
  j         = nlohmann::json();
  j["type"] = o.m_Type;
  if (o.immediateFlagIsSet()) j["immediateFlag"] = o.m_ImmediateFlag;
  if (o.areaListIsSet()) j["areaList"] = o.m_AreaList;
  if (o.locationFilterListIsSet())
    j["locationFilterList"] = o.m_LocationFilterList;
  if (o.refIdIsSet()) j["refId"] = o.m_RefId;
}

void from_json(const nlohmann::json& j, AmfEvent& o) {
  j.at("type").get_to(o.m_Type);
  if (j.find("immediateFlag") != j.end()) {
    j.at("immediateFlag").get_to(o.m_ImmediateFlag);
    o.m_ImmediateFlagIsSet = true;
  }
  if (j.find("areaList") != j.end()) {
    j.at("areaList").get_to(o.m_AreaList);
    o.m_AreaListIsSet = true;
  }
  if (j.find("locationFilterList") != j.end()) {
    j.at("locationFilterList").get_to(o.m_LocationFilterList);
    o.m_LocationFilterListIsSet = true;
  }
  if (j.find("refId") != j.end()) {
    j.at("refId").get_to(o.m_RefId);
    o.m_RefIdIsSet = true;
  }
}

AmfEventType AmfEvent::getType() const {
  return m_Type;
}
void AmfEvent::setType(AmfEventType const& value) {
  m_Type = value;
}
bool AmfEvent::isImmediateFlag() const {
  return m_ImmediateFlag;
}
void AmfEvent::setImmediateFlag(bool const value) {
  m_ImmediateFlag      = value;
  m_ImmediateFlagIsSet = true;
}
bool AmfEvent::immediateFlagIsSet() const {
  return m_ImmediateFlagIsSet;
}
void AmfEvent::unsetImmediateFlag() {
  m_ImmediateFlagIsSet = false;
}
std::vector<AmfEventArea>& AmfEvent::getAreaList() {
  return m_AreaList;
}
bool AmfEvent::areaListIsSet() const {
  return m_AreaListIsSet;
}
void AmfEvent::unsetAreaList() {
  m_AreaListIsSet = false;
}
std::vector<LocationFilter>& AmfEvent::getLocationFilterList() {
  return m_LocationFilterList;
}
bool AmfEvent::locationFilterListIsSet() const {
  return m_LocationFilterListIsSet;
}
void AmfEvent::unsetLocationFilterList() {
  m_LocationFilterListIsSet = false;
}
int32_t AmfEvent::getRefId() const {
  return m_RefId;
}
void AmfEvent::setRefId(int32_t const value) {
  m_RefId      = value;
  m_RefIdIsSet = true;
}
bool AmfEvent::refIdIsSet() const {
  return m_RefIdIsSet;
}
void AmfEvent::unsetRefId() {
  m_RefIdIsSet = false;
}

}  // namespace model
}  // namespace amf
}  // namespace oai
