/**
 * Nsmf_EventExposure
 * Session Management Event Exposure 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 "NsmfEventExposure.h"

namespace oai {
namespace smf_server {
namespace model {

NsmfEventExposure::NsmfEventExposure() {
  m_Supi                   = "";
  m_SupiIsSet              = false;
  m_Gpsi                   = "";
  m_GpsiIsSet              = false;
  m_AnyUeInd               = false;
  m_AnyUeIndIsSet          = false;
  m_GroupId                = "";
  m_GroupIdIsSet           = false;
  m_PduSeId                = 0;
  m_PduSeIdIsSet           = false;
  m_SubId                  = "";
  m_SubIdIsSet             = false;
  m_NotifId                = "";
  m_NotifUri               = "";
  m_AltNotifIpv4AddrsIsSet = false;
  m_AltNotifIpv6AddrsIsSet = false;
  m_ImmeRep                = false;
  m_ImmeRepIsSet           = false;
  m_NotifMethodIsSet       = false;
  m_MaxReportNbr           = 0;
  m_MaxReportNbrIsSet      = false;
  m_Expiry                 = "";
  m_ExpiryIsSet            = false;
  m_RepPeriod              = 0;
  m_RepPeriodIsSet         = false;
  m_GuamiIsSet             = false;
  m_ServiveName            = "";
  m_ServiveNameIsSet       = false;
  m_SupportedFeatures      = "";
  m_SupportedFeaturesIsSet = false;
}

NsmfEventExposure::~NsmfEventExposure() {}

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

void to_json(nlohmann::json& j, const NsmfEventExposure& o) {
  j = nlohmann::json();
  if (o.supiIsSet()) j["supi"] = o.m_Supi;
  if (o.gpsiIsSet()) j["gpsi"] = o.m_Gpsi;
  if (o.anyUeIndIsSet()) j["anyUeInd"] = o.m_AnyUeInd;
  if (o.groupIdIsSet()) j["groupId"] = o.m_GroupId;
  if (o.pduSeIdIsSet()) j["pduSeId"] = o.m_PduSeId;
  if (o.subIdIsSet()) j["subId"] = o.m_SubId;
  j["notifId"]  = o.m_NotifId;
  j["notifUri"] = o.m_NotifUri;
  if (o.altNotifIpv4AddrsIsSet() || !o.m_AltNotifIpv4Addrs.empty())
    j["altNotifIpv4Addrs"] = o.m_AltNotifIpv4Addrs;
  if (o.altNotifIpv6AddrsIsSet() || !o.m_AltNotifIpv6Addrs.empty())
    j["altNotifIpv6Addrs"] = o.m_AltNotifIpv6Addrs;
  j["eventSubs"] = o.m_EventSubs;
  if (o.immeRepIsSet()) j["ImmeRep"] = o.m_ImmeRep;
  if (o.notifMethodIsSet()) j["notifMethod"] = o.m_NotifMethod;
  if (o.maxReportNbrIsSet()) j["maxReportNbr"] = o.m_MaxReportNbr;
  if (o.expiryIsSet()) j["expiry"] = o.m_Expiry;
  if (o.repPeriodIsSet()) j["repPeriod"] = o.m_RepPeriod;
  if (o.guamiIsSet()) j["guami"] = o.m_Guami;
  if (o.serviveNameIsSet()) j["serviveName"] = o.m_ServiveName;
  if (o.supportedFeaturesIsSet())
    j["supportedFeatures"] = o.m_SupportedFeatures;
}

void from_json(const nlohmann::json& j, NsmfEventExposure& o) {
  if (j.find("supi") != j.end()) {
    j.at("supi").get_to(o.m_Supi);
    o.m_SupiIsSet = true;
  }
  if (j.find("gpsi") != j.end()) {
    j.at("gpsi").get_to(o.m_Gpsi);
    o.m_GpsiIsSet = true;
  }
  if (j.find("anyUeInd") != j.end()) {
    j.at("anyUeInd").get_to(o.m_AnyUeInd);
    o.m_AnyUeIndIsSet = true;
  }
  if (j.find("groupId") != j.end()) {
    j.at("groupId").get_to(o.m_GroupId);
    o.m_GroupIdIsSet = true;
  }
  if (j.find("pduSeId") != j.end()) {
    j.at("pduSeId").get_to(o.m_PduSeId);
    o.m_PduSeIdIsSet = true;
  }
  if (j.find("subId") != j.end()) {
    j.at("subId").get_to(o.m_SubId);
    o.m_SubIdIsSet = true;
  }
  j.at("notifId").get_to(o.m_NotifId);
  j.at("notifUri").get_to(o.m_NotifUri);
  if (j.find("altNotifIpv4Addrs") != j.end()) {
    j.at("altNotifIpv4Addrs").get_to(o.m_AltNotifIpv4Addrs);
    o.m_AltNotifIpv4AddrsIsSet = true;
  }
  if (j.find("altNotifIpv6Addrs") != j.end()) {
    j.at("altNotifIpv6Addrs").get_to(o.m_AltNotifIpv6Addrs);
    o.m_AltNotifIpv6AddrsIsSet = true;
  }
  j.at("eventSubs").get_to(o.m_EventSubs);
  if (j.find("ImmeRep") != j.end()) {
    j.at("ImmeRep").get_to(o.m_ImmeRep);
    o.m_ImmeRepIsSet = true;
  }
  if (j.find("notifMethod") != j.end()) {
    j.at("notifMethod").get_to(o.m_NotifMethod);
    o.m_NotifMethodIsSet = true;
  }
  if (j.find("maxReportNbr") != j.end()) {
    j.at("maxReportNbr").get_to(o.m_MaxReportNbr);
    o.m_MaxReportNbrIsSet = true;
  }
  if (j.find("expiry") != j.end()) {
    j.at("expiry").get_to(o.m_Expiry);
    o.m_ExpiryIsSet = true;
  }
  if (j.find("repPeriod") != j.end()) {
    j.at("repPeriod").get_to(o.m_RepPeriod);
    o.m_RepPeriodIsSet = true;
  }
  if (j.find("guami") != j.end()) {
    j.at("guami").get_to(o.m_Guami);
    o.m_GuamiIsSet = true;
  }
  if (j.find("serviveName") != j.end()) {
    j.at("serviveName").get_to(o.m_ServiveName);
    o.m_ServiveNameIsSet = true;
  }
  if (j.find("supportedFeatures") != j.end()) {
    j.at("supportedFeatures").get_to(o.m_SupportedFeatures);
    o.m_SupportedFeaturesIsSet = true;
  }
}

std::string NsmfEventExposure::getSupi() const {
  return m_Supi;
}
void NsmfEventExposure::setSupi(std::string const& value) {
  m_Supi      = value;
  m_SupiIsSet = true;
}
bool NsmfEventExposure::supiIsSet() const {
  return m_SupiIsSet;
}
void NsmfEventExposure::unsetSupi() {
  m_SupiIsSet = false;
}
std::string NsmfEventExposure::getGpsi() const {
  return m_Gpsi;
}
void NsmfEventExposure::setGpsi(std::string const& value) {
  m_Gpsi      = value;
  m_GpsiIsSet = true;
}
bool NsmfEventExposure::gpsiIsSet() const {
  return m_GpsiIsSet;
}
void NsmfEventExposure::unsetGpsi() {
  m_GpsiIsSet = false;
}
bool NsmfEventExposure::isAnyUeInd() const {
  return m_AnyUeInd;
}
void NsmfEventExposure::setAnyUeInd(bool const value) {
  m_AnyUeInd      = value;
  m_AnyUeIndIsSet = true;
}
bool NsmfEventExposure::anyUeIndIsSet() const {
  return m_AnyUeIndIsSet;
}
void NsmfEventExposure::unsetAnyUeInd() {
  m_AnyUeIndIsSet = false;
}
std::string NsmfEventExposure::getGroupId() const {
  return m_GroupId;
}
void NsmfEventExposure::setGroupId(std::string const& value) {
  m_GroupId      = value;
  m_GroupIdIsSet = true;
}
bool NsmfEventExposure::groupIdIsSet() const {
  return m_GroupIdIsSet;
}
void NsmfEventExposure::unsetGroupId() {
  m_GroupIdIsSet = false;
}
int32_t NsmfEventExposure::getPduSeId() const {
  return m_PduSeId;
}
void NsmfEventExposure::setPduSeId(int32_t const value) {
  m_PduSeId      = value;
  m_PduSeIdIsSet = true;
}
bool NsmfEventExposure::pduSeIdIsSet() const {
  return m_PduSeIdIsSet;
}
void NsmfEventExposure::unsetPduSeId() {
  m_PduSeIdIsSet = false;
}
std::string NsmfEventExposure::getSubId() const {
  return m_SubId;
}
void NsmfEventExposure::setSubId(std::string const& value) {
  m_SubId      = value;
  m_SubIdIsSet = true;
}
bool NsmfEventExposure::subIdIsSet() const {
  return m_SubIdIsSet;
}
void NsmfEventExposure::unsetSubId() {
  m_SubIdIsSet = false;
}
std::string NsmfEventExposure::getNotifId() const {
  return m_NotifId;
}
void NsmfEventExposure::setNotifId(std::string const& value) {
  m_NotifId = value;
}
std::string NsmfEventExposure::getNotifUri() const {
  return m_NotifUri;
}
void NsmfEventExposure::setNotifUri(std::string const& value) {
  m_NotifUri = value;
}
std::vector<std::string>& NsmfEventExposure::getAltNotifIpv4Addrs() {
  return m_AltNotifIpv4Addrs;
}
void NsmfEventExposure::setAltNotifIpv4Addrs(
    std::vector<std::string> const& value) {
  m_AltNotifIpv4Addrs      = value;
  m_AltNotifIpv4AddrsIsSet = true;
}
bool NsmfEventExposure::altNotifIpv4AddrsIsSet() const {
  return m_AltNotifIpv4AddrsIsSet;
}
void NsmfEventExposure::unsetAltNotifIpv4Addrs() {
  m_AltNotifIpv4AddrsIsSet = false;
}
std::vector<Ipv6Addr>& NsmfEventExposure::getAltNotifIpv6Addrs() {
  return m_AltNotifIpv6Addrs;
}
void NsmfEventExposure::setAltNotifIpv6Addrs(
    std::vector<Ipv6Addr> const& value) {
  m_AltNotifIpv6Addrs      = value;
  m_AltNotifIpv6AddrsIsSet = true;
}
bool NsmfEventExposure::altNotifIpv6AddrsIsSet() const {
  return m_AltNotifIpv6AddrsIsSet;
}
void NsmfEventExposure::unsetAltNotifIpv6Addrs() {
  m_AltNotifIpv6AddrsIsSet = false;
}
std::vector<EventSubscription>& NsmfEventExposure::getEventSubs() {
  return m_EventSubs;
}
void NsmfEventExposure::setEventSubs(
    std::vector<EventSubscription> const& value) {
  m_EventSubs = value;
}
bool NsmfEventExposure::isImmeRep() const {
  return m_ImmeRep;
}
void NsmfEventExposure::setImmeRep(bool const value) {
  m_ImmeRep      = value;
  m_ImmeRepIsSet = true;
}
bool NsmfEventExposure::immeRepIsSet() const {
  return m_ImmeRepIsSet;
}
void NsmfEventExposure::unsetImmeRep() {
  m_ImmeRepIsSet = false;
}
NotificationMethod NsmfEventExposure::getNotifMethod() const {
  return m_NotifMethod;
}
void NsmfEventExposure::setNotifMethod(NotificationMethod const& value) {
  m_NotifMethod      = value;
  m_NotifMethodIsSet = true;
}
bool NsmfEventExposure::notifMethodIsSet() const {
  return m_NotifMethodIsSet;
}
void NsmfEventExposure::unsetNotifMethod() {
  m_NotifMethodIsSet = false;
}
int32_t NsmfEventExposure::getMaxReportNbr() const {
  return m_MaxReportNbr;
}
void NsmfEventExposure::setMaxReportNbr(int32_t const value) {
  m_MaxReportNbr      = value;
  m_MaxReportNbrIsSet = true;
}
bool NsmfEventExposure::maxReportNbrIsSet() const {
  return m_MaxReportNbrIsSet;
}
void NsmfEventExposure::unsetMaxReportNbr() {
  m_MaxReportNbrIsSet = false;
}
std::string NsmfEventExposure::getExpiry() const {
  return m_Expiry;
}
void NsmfEventExposure::setExpiry(std::string const& value) {
  m_Expiry      = value;
  m_ExpiryIsSet = true;
}
bool NsmfEventExposure::expiryIsSet() const {
  return m_ExpiryIsSet;
}
void NsmfEventExposure::unsetExpiry() {
  m_ExpiryIsSet = false;
}
int32_t NsmfEventExposure::getRepPeriod() const {
  return m_RepPeriod;
}
void NsmfEventExposure::setRepPeriod(int32_t const value) {
  m_RepPeriod      = value;
  m_RepPeriodIsSet = true;
}
bool NsmfEventExposure::repPeriodIsSet() const {
  return m_RepPeriodIsSet;
}
void NsmfEventExposure::unsetRepPeriod() {
  m_RepPeriodIsSet = false;
}
Guami NsmfEventExposure::getGuami() const {
  return m_Guami;
}
void NsmfEventExposure::setGuami(Guami const& value) {
  m_Guami      = value;
  m_GuamiIsSet = true;
}
bool NsmfEventExposure::guamiIsSet() const {
  return m_GuamiIsSet;
}
void NsmfEventExposure::unsetGuami() {
  m_GuamiIsSet = false;
}
std::string NsmfEventExposure::getServiveName() const {
  return m_ServiveName;
}
void NsmfEventExposure::setServiveName(std::string const& value) {
  m_ServiveName      = value;
  m_ServiveNameIsSet = true;
}
bool NsmfEventExposure::serviveNameIsSet() const {
  return m_ServiveNameIsSet;
}
void NsmfEventExposure::unsetServiveName() {
  m_ServiveNameIsSet = false;
}
std::string NsmfEventExposure::getSupportedFeatures() const {
  return m_SupportedFeatures;
}
void NsmfEventExposure::setSupportedFeatures(std::string const& value) {
  m_SupportedFeatures      = value;
  m_SupportedFeaturesIsSet = true;
}
bool NsmfEventExposure::supportedFeaturesIsSet() const {
  return m_SupportedFeaturesIsSet;
}
void NsmfEventExposure::unsetSupportedFeatures() {
  m_SupportedFeaturesIsSet = false;
}

}  // namespace model
}  // namespace smf_server
}  // namespace oai
