/**
* Nsmf_PDUSession
* SMF PDU Session 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 "SmContextReleaseData.h"

namespace oai {
namespace smf_server {
namespace model {

SmContextReleaseData::SmContextReleaseData()
{
    m_CauseIsSet = false;
    m_NgApCauseIsSet = false;
    m__5gMmCauseValue = 0;
    m__5gMmCauseValueIsSet = false;
    m_UeLocationIsSet = false;
    m_UeTimeZone = "";
    m_UeTimeZoneIsSet = false;
    m_AddUeLocationIsSet = false;
    m_VsmfReleaseOnly = false;
    m_VsmfReleaseOnlyIsSet = false;
    m_N2SmInfoIsSet = false;
    m_N2SmInfoTypeIsSet = false;
    m_IsmfReleaseOnly = false;
    m_IsmfReleaseOnlyIsSet = false;
    
}

SmContextReleaseData::~SmContextReleaseData()
{
}

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

void to_json(nlohmann::json& j, const SmContextReleaseData& o)
{
    j = nlohmann::json();
    if(o.causeIsSet())
        j["cause"] = o.m_Cause;
    if(o.ngApCauseIsSet())
        j["ngApCause"] = o.m_NgApCause;
    if(o._5gMmCauseValueIsSet())
        j["5gMmCauseValue"] = o.m__5gMmCauseValue;
    if(o.ueLocationIsSet())
        j["ueLocation"] = o.m_UeLocation;
    if(o.ueTimeZoneIsSet())
        j["ueTimeZone"] = o.m_UeTimeZone;
    if(o.addUeLocationIsSet())
        j["addUeLocation"] = o.m_AddUeLocation;
    if(o.vsmfReleaseOnlyIsSet())
        j["vsmfReleaseOnly"] = o.m_VsmfReleaseOnly;
    if(o.n2SmInfoIsSet())
        j["n2SmInfo"] = o.m_N2SmInfo;
    if(o.n2SmInfoTypeIsSet())
        j["n2SmInfoType"] = o.m_N2SmInfoType;
    if(o.ismfReleaseOnlyIsSet())
        j["ismfReleaseOnly"] = o.m_IsmfReleaseOnly;
}

void from_json(const nlohmann::json& j, SmContextReleaseData& o)
{
    if(j.find("cause") != j.end())
    {
        j.at("cause").get_to(o.m_Cause);
        o.m_CauseIsSet = true;
    } 
    if(j.find("ngApCause") != j.end())
    {
        j.at("ngApCause").get_to(o.m_NgApCause);
        o.m_NgApCauseIsSet = true;
    } 
    if(j.find("5gMmCauseValue") != j.end())
    {
        j.at("5gMmCauseValue").get_to(o.m__5gMmCauseValue);
        o.m__5gMmCauseValueIsSet = true;
    } 
    if(j.find("ueLocation") != j.end())
    {
        j.at("ueLocation").get_to(o.m_UeLocation);
        o.m_UeLocationIsSet = true;
    } 
    if(j.find("ueTimeZone") != j.end())
    {
        j.at("ueTimeZone").get_to(o.m_UeTimeZone);
        o.m_UeTimeZoneIsSet = true;
    } 
    if(j.find("addUeLocation") != j.end())
    {
        j.at("addUeLocation").get_to(o.m_AddUeLocation);
        o.m_AddUeLocationIsSet = true;
    } 
    if(j.find("vsmfReleaseOnly") != j.end())
    {
        j.at("vsmfReleaseOnly").get_to(o.m_VsmfReleaseOnly);
        o.m_VsmfReleaseOnlyIsSet = true;
    } 
    if(j.find("n2SmInfo") != j.end())
    {
        j.at("n2SmInfo").get_to(o.m_N2SmInfo);
        o.m_N2SmInfoIsSet = true;
    } 
    if(j.find("n2SmInfoType") != j.end())
    {
        j.at("n2SmInfoType").get_to(o.m_N2SmInfoType);
        o.m_N2SmInfoTypeIsSet = true;
    } 
    if(j.find("ismfReleaseOnly") != j.end())
    {
        j.at("ismfReleaseOnly").get_to(o.m_IsmfReleaseOnly);
        o.m_IsmfReleaseOnlyIsSet = true;
    } 
}

Cause SmContextReleaseData::getCause() const
{
    return m_Cause;
}
void SmContextReleaseData::setCause(Cause const& value)
{
    m_Cause = value;
    m_CauseIsSet = true;
}
bool SmContextReleaseData::causeIsSet() const
{
    return m_CauseIsSet;
}
void SmContextReleaseData::unsetCause()
{
    m_CauseIsSet = false;
}
NgApCause SmContextReleaseData::getNgApCause() const
{
    return m_NgApCause;
}
void SmContextReleaseData::setNgApCause(NgApCause const& value)
{
    m_NgApCause = value;
    m_NgApCauseIsSet = true;
}
bool SmContextReleaseData::ngApCauseIsSet() const
{
    return m_NgApCauseIsSet;
}
void SmContextReleaseData::unsetNgApCause()
{
    m_NgApCauseIsSet = false;
}
int32_t SmContextReleaseData::get5gMmCauseValue() const
{
    return m__5gMmCauseValue;
}
void SmContextReleaseData::set5gMmCauseValue(int32_t const value)
{
    m__5gMmCauseValue = value;
    m__5gMmCauseValueIsSet = true;
}
bool SmContextReleaseData::_5gMmCauseValueIsSet() const
{
    return m__5gMmCauseValueIsSet;
}
void SmContextReleaseData::unset_5gMmCauseValue()
{
    m__5gMmCauseValueIsSet = false;
}
UserLocation SmContextReleaseData::getUeLocation() const
{
    return m_UeLocation;
}
void SmContextReleaseData::setUeLocation(UserLocation const& value)
{
    m_UeLocation = value;
    m_UeLocationIsSet = true;
}
bool SmContextReleaseData::ueLocationIsSet() const
{
    return m_UeLocationIsSet;
}
void SmContextReleaseData::unsetUeLocation()
{
    m_UeLocationIsSet = false;
}
std::string SmContextReleaseData::getUeTimeZone() const
{
    return m_UeTimeZone;
}
void SmContextReleaseData::setUeTimeZone(std::string const& value)
{
    m_UeTimeZone = value;
    m_UeTimeZoneIsSet = true;
}
bool SmContextReleaseData::ueTimeZoneIsSet() const
{
    return m_UeTimeZoneIsSet;
}
void SmContextReleaseData::unsetUeTimeZone()
{
    m_UeTimeZoneIsSet = false;
}
UserLocation SmContextReleaseData::getAddUeLocation() const
{
    return m_AddUeLocation;
}
void SmContextReleaseData::setAddUeLocation(UserLocation const& value)
{
    m_AddUeLocation = value;
    m_AddUeLocationIsSet = true;
}
bool SmContextReleaseData::addUeLocationIsSet() const
{
    return m_AddUeLocationIsSet;
}
void SmContextReleaseData::unsetAddUeLocation()
{
    m_AddUeLocationIsSet = false;
}
bool SmContextReleaseData::isVsmfReleaseOnly() const
{
    return m_VsmfReleaseOnly;
}
void SmContextReleaseData::setVsmfReleaseOnly(bool const value)
{
    m_VsmfReleaseOnly = value;
    m_VsmfReleaseOnlyIsSet = true;
}
bool SmContextReleaseData::vsmfReleaseOnlyIsSet() const
{
    return m_VsmfReleaseOnlyIsSet;
}
void SmContextReleaseData::unsetVsmfReleaseOnly()
{
    m_VsmfReleaseOnlyIsSet = false;
}
RefToBinaryData SmContextReleaseData::getN2SmInfo() const
{
    return m_N2SmInfo;
}
void SmContextReleaseData::setN2SmInfo(RefToBinaryData const& value)
{
    m_N2SmInfo = value;
    m_N2SmInfoIsSet = true;
}
bool SmContextReleaseData::n2SmInfoIsSet() const
{
    return m_N2SmInfoIsSet;
}
void SmContextReleaseData::unsetN2SmInfo()
{
    m_N2SmInfoIsSet = false;
}
std::string SmContextReleaseData::getN2SmInfoType() const
{
    return m_N2SmInfoType;
}
void SmContextReleaseData::setN2SmInfoType(std::string const& value)
{
    m_N2SmInfoType = value;
    m_N2SmInfoTypeIsSet = true;
}
bool SmContextReleaseData::n2SmInfoTypeIsSet() const
{
    return m_N2SmInfoTypeIsSet;
}
void SmContextReleaseData::unsetN2SmInfoType()
{
    m_N2SmInfoTypeIsSet = false;
}
bool SmContextReleaseData::isIsmfReleaseOnly() const
{
    return m_IsmfReleaseOnly;
}
void SmContextReleaseData::setIsmfReleaseOnly(bool const value)
{
    m_IsmfReleaseOnly = value;
    m_IsmfReleaseOnlyIsSet = true;
}
bool SmContextReleaseData::ismfReleaseOnlyIsSet() const
{
    return m_IsmfReleaseOnlyIsSet;
}
void SmContextReleaseData::unsetIsmfReleaseOnly()
{
    m_IsmfReleaseOnlyIsSet = false;
}

}
}
}

