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

namespace oai {
namespace amf {
namespace model {

AmfEventSubscription::AmfEventSubscription()
{
    m_EventNotifyUri = "";
    m_NotifyCorrelationId = "";
    m_NfId = "";
    m_SubsChangeNotifyUri = "";
    m_SubsChangeNotifyUriIsSet = false;
    m_SubsChangeNotifyCorrelationId = "";
    m_SubsChangeNotifyCorrelationIdIsSet = false;
    m_Supi = "";
    m_SupiIsSet = false;
    m_GroupId = "";
    m_GroupIdIsSet = false;
    m_Gpsi = "";
    m_GpsiIsSet = false;
    m_Pei = "";
    m_PeiIsSet = false;
    m_AnyUE = false;
    m_AnyUEIsSet = false;
    m_OptionsIsSet = false;
    
}

AmfEventSubscription::~AmfEventSubscription()
{
}

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

void to_json(nlohmann::json& j, const AmfEventSubscription& o)
{
    j = nlohmann::json();
    j["eventList"] = o.m_EventList;
    j["eventNotifyUri"] = o.m_EventNotifyUri;
    j["notifyCorrelationId"] = o.m_NotifyCorrelationId;
    j["nfId"] = o.m_NfId;
    if(o.subsChangeNotifyUriIsSet())
        j["subsChangeNotifyUri"] = o.m_SubsChangeNotifyUri;
    if(o.subsChangeNotifyCorrelationIdIsSet())
        j["subsChangeNotifyCorrelationId"] = o.m_SubsChangeNotifyCorrelationId;
    if(o.supiIsSet())
        j["supi"] = o.m_Supi;
    if(o.groupIdIsSet())
        j["groupId"] = o.m_GroupId;
    if(o.gpsiIsSet())
        j["gpsi"] = o.m_Gpsi;
    if(o.peiIsSet())
        j["pei"] = o.m_Pei;
    if(o.anyUEIsSet())
        j["anyUE"] = o.m_AnyUE;
    if(o.optionsIsSet())
        j["options"] = o.m_Options;
}

void from_json(const nlohmann::json& j, AmfEventSubscription& o)
{
    j.at("eventList").get_to(o.m_EventList);
    j.at("eventNotifyUri").get_to(o.m_EventNotifyUri);
    j.at("notifyCorrelationId").get_to(o.m_NotifyCorrelationId);
    j.at("nfId").get_to(o.m_NfId);
    if(j.find("subsChangeNotifyUri") != j.end())
    {
        j.at("subsChangeNotifyUri").get_to(o.m_SubsChangeNotifyUri);
        o.m_SubsChangeNotifyUriIsSet = true;
    } 
    if(j.find("subsChangeNotifyCorrelationId") != j.end())
    {
        j.at("subsChangeNotifyCorrelationId").get_to(o.m_SubsChangeNotifyCorrelationId);
        o.m_SubsChangeNotifyCorrelationIdIsSet = true;
    } 
    if(j.find("supi") != j.end())
    {
        j.at("supi").get_to(o.m_Supi);
        o.m_SupiIsSet = true;
    } 
    if(j.find("groupId") != j.end())
    {
        j.at("groupId").get_to(o.m_GroupId);
        o.m_GroupIdIsSet = true;
    } 
    if(j.find("gpsi") != j.end())
    {
        j.at("gpsi").get_to(o.m_Gpsi);
        o.m_GpsiIsSet = true;
    } 
    if(j.find("pei") != j.end())
    {
        j.at("pei").get_to(o.m_Pei);
        o.m_PeiIsSet = true;
    } 
    if(j.find("anyUE") != j.end())
    {
        j.at("anyUE").get_to(o.m_AnyUE);
        o.m_AnyUEIsSet = true;
    } 
    if(j.find("options") != j.end())
    {
        j.at("options").get_to(o.m_Options);
        o.m_OptionsIsSet = true;
    } 
}

std::vector<AmfEvent>& AmfEventSubscription::getEventList()
{
    return m_EventList;
}
std::string AmfEventSubscription::getEventNotifyUri() const
{
    return m_EventNotifyUri;
}
void AmfEventSubscription::setEventNotifyUri(std::string const& value)
{
    m_EventNotifyUri = value;
    
}
std::string AmfEventSubscription::getNotifyCorrelationId() const
{
    return m_NotifyCorrelationId;
}
void AmfEventSubscription::setNotifyCorrelationId(std::string const& value)
{
    m_NotifyCorrelationId = value;
    
}
std::string AmfEventSubscription::getNfId() const
{
    return m_NfId;
}
void AmfEventSubscription::setNfId(std::string const& value)
{
    m_NfId = value;
    
}
std::string AmfEventSubscription::getSubsChangeNotifyUri() const
{
    return m_SubsChangeNotifyUri;
}
void AmfEventSubscription::setSubsChangeNotifyUri(std::string const& value)
{
    m_SubsChangeNotifyUri = value;
    m_SubsChangeNotifyUriIsSet = true;
}
bool AmfEventSubscription::subsChangeNotifyUriIsSet() const
{
    return m_SubsChangeNotifyUriIsSet;
}
void AmfEventSubscription::unsetSubsChangeNotifyUri()
{
    m_SubsChangeNotifyUriIsSet = false;
}
std::string AmfEventSubscription::getSubsChangeNotifyCorrelationId() const
{
    return m_SubsChangeNotifyCorrelationId;
}
void AmfEventSubscription::setSubsChangeNotifyCorrelationId(std::string const& value)
{
    m_SubsChangeNotifyCorrelationId = value;
    m_SubsChangeNotifyCorrelationIdIsSet = true;
}
bool AmfEventSubscription::subsChangeNotifyCorrelationIdIsSet() const
{
    return m_SubsChangeNotifyCorrelationIdIsSet;
}
void AmfEventSubscription::unsetSubsChangeNotifyCorrelationId()
{
    m_SubsChangeNotifyCorrelationIdIsSet = false;
}
std::string AmfEventSubscription::getSupi() const
{
    return m_Supi;
}
void AmfEventSubscription::setSupi(std::string const& value)
{
    m_Supi = value;
    m_SupiIsSet = true;
}
bool AmfEventSubscription::supiIsSet() const
{
    return m_SupiIsSet;
}
void AmfEventSubscription::unsetSupi()
{
    m_SupiIsSet = false;
}
std::string AmfEventSubscription::getGroupId() const
{
    return m_GroupId;
}
void AmfEventSubscription::setGroupId(std::string const& value)
{
    m_GroupId = value;
    m_GroupIdIsSet = true;
}
bool AmfEventSubscription::groupIdIsSet() const
{
    return m_GroupIdIsSet;
}
void AmfEventSubscription::unsetGroupId()
{
    m_GroupIdIsSet = false;
}
std::string AmfEventSubscription::getGpsi() const
{
    return m_Gpsi;
}
void AmfEventSubscription::setGpsi(std::string const& value)
{
    m_Gpsi = value;
    m_GpsiIsSet = true;
}
bool AmfEventSubscription::gpsiIsSet() const
{
    return m_GpsiIsSet;
}
void AmfEventSubscription::unsetGpsi()
{
    m_GpsiIsSet = false;
}
std::string AmfEventSubscription::getPei() const
{
    return m_Pei;
}
void AmfEventSubscription::setPei(std::string const& value)
{
    m_Pei = value;
    m_PeiIsSet = true;
}
bool AmfEventSubscription::peiIsSet() const
{
    return m_PeiIsSet;
}
void AmfEventSubscription::unsetPei()
{
    m_PeiIsSet = false;
}
bool AmfEventSubscription::isAnyUE() const
{
    return m_AnyUE;
}
void AmfEventSubscription::setAnyUE(bool const value)
{
    m_AnyUE = value;
    m_AnyUEIsSet = true;
}
bool AmfEventSubscription::anyUEIsSet() const
{
    return m_AnyUEIsSet;
}
void AmfEventSubscription::unsetAnyUE()
{
    m_AnyUEIsSet = false;
}
AmfEventMode AmfEventSubscription::getOptions() const
{
    return m_Options;
}
void AmfEventSubscription::setOptions(AmfEventMode const& value)
{
    m_Options = value;
    m_OptionsIsSet = true;
}
bool AmfEventSubscription::optionsIsSet() const
{
    return m_OptionsIsSet;
}
void AmfEventSubscription::unsetOptions()
{
    m_OptionsIsSet = false;
}

}
}
}

