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

namespace oai {
namespace amf {
namespace model {

PduSessionContext::PduSessionContext()
{
    m_PduSessionId = 0;
    m_SmContextRef = "";
    m_Dnn = "";
    m_AllocatedEbiListIsSet = false;
    m_HsmfId = "";
    m_HsmfIdIsSet = false;
    m_VsmfId = "";
    m_VsmfIdIsSet = false;
    m_NsInstance = "";
    m_NsInstanceIsSet = false;
    m_SmfServiceInstanceId = "";
    m_SmfServiceInstanceIdIsSet = false;
    
}

PduSessionContext::~PduSessionContext()
{
}

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

void to_json(nlohmann::json& j, const PduSessionContext& o)
{
    j = nlohmann::json();
    j["pduSessionId"] = o.m_PduSessionId;
    j["smContextRef"] = o.m_SmContextRef;
    j["sNssai"] = o.m_SNssai;
    j["dnn"] = o.m_Dnn;
    j["accessType"] = o.m_AccessType;
    if(o.allocatedEbiListIsSet())
        j["allocatedEbiList"] = o.m_AllocatedEbiList;
    if(o.hsmfIdIsSet())
        j["hsmfId"] = o.m_HsmfId;
    if(o.vsmfIdIsSet())
        j["vsmfId"] = o.m_VsmfId;
    if(o.nsInstanceIsSet())
        j["nsInstance"] = o.m_NsInstance;
    if(o.smfServiceInstanceIdIsSet())
        j["smfServiceInstanceId"] = o.m_SmfServiceInstanceId;
}

void from_json(const nlohmann::json& j, PduSessionContext& o)
{
    j.at("pduSessionId").get_to(o.m_PduSessionId);
    j.at("smContextRef").get_to(o.m_SmContextRef);
    j.at("sNssai").get_to(o.m_SNssai);
    j.at("dnn").get_to(o.m_Dnn);
    j.at("accessType").get_to(o.m_AccessType);
    if(j.find("allocatedEbiList") != j.end())
    {
        j.at("allocatedEbiList").get_to(o.m_AllocatedEbiList);
        o.m_AllocatedEbiListIsSet = true;
    } 
    if(j.find("hsmfId") != j.end())
    {
        j.at("hsmfId").get_to(o.m_HsmfId);
        o.m_HsmfIdIsSet = true;
    } 
    if(j.find("vsmfId") != j.end())
    {
        j.at("vsmfId").get_to(o.m_VsmfId);
        o.m_VsmfIdIsSet = true;
    } 
    if(j.find("nsInstance") != j.end())
    {
        j.at("nsInstance").get_to(o.m_NsInstance);
        o.m_NsInstanceIsSet = true;
    } 
    if(j.find("smfServiceInstanceId") != j.end())
    {
        j.at("smfServiceInstanceId").get_to(o.m_SmfServiceInstanceId);
        o.m_SmfServiceInstanceIdIsSet = true;
    } 
}

int32_t PduSessionContext::getPduSessionId() const
{
    return m_PduSessionId;
}
void PduSessionContext::setPduSessionId(int32_t const value)
{
    m_PduSessionId = value;
    
}
std::string PduSessionContext::getSmContextRef() const
{
    return m_SmContextRef;
}
void PduSessionContext::setSmContextRef(std::string const& value)
{
    m_SmContextRef = value;
    
}
Snssai PduSessionContext::getSNssai() const
{
    return m_SNssai;
}
void PduSessionContext::setSNssai(Snssai const& value)
{
    m_SNssai = value;
    
}
std::string PduSessionContext::getDnn() const
{
    return m_Dnn;
}
void PduSessionContext::setDnn(std::string const& value)
{
    m_Dnn = value;
    
}
AccessType PduSessionContext::getAccessType() const
{
    return m_AccessType;
}
void PduSessionContext::setAccessType(AccessType const& value)
{
    m_AccessType = value;
    
}
std::vector<EbiArpMapping_2>& PduSessionContext::getAllocatedEbiList()
{
    return m_AllocatedEbiList;
}
bool PduSessionContext::allocatedEbiListIsSet() const
{
    return m_AllocatedEbiListIsSet;
}
void PduSessionContext::unsetAllocatedEbiList()
{
    m_AllocatedEbiListIsSet = false;
}
std::string PduSessionContext::getHsmfId() const
{
    return m_HsmfId;
}
void PduSessionContext::setHsmfId(std::string const& value)
{
    m_HsmfId = value;
    m_HsmfIdIsSet = true;
}
bool PduSessionContext::hsmfIdIsSet() const
{
    return m_HsmfIdIsSet;
}
void PduSessionContext::unsetHsmfId()
{
    m_HsmfIdIsSet = false;
}
std::string PduSessionContext::getVsmfId() const
{
    return m_VsmfId;
}
void PduSessionContext::setVsmfId(std::string const& value)
{
    m_VsmfId = value;
    m_VsmfIdIsSet = true;
}
bool PduSessionContext::vsmfIdIsSet() const
{
    return m_VsmfIdIsSet;
}
void PduSessionContext::unsetVsmfId()
{
    m_VsmfIdIsSet = false;
}
std::string PduSessionContext::getNsInstance() const
{
    return m_NsInstance;
}
void PduSessionContext::setNsInstance(std::string const& value)
{
    m_NsInstance = value;
    m_NsInstanceIsSet = true;
}
bool PduSessionContext::nsInstanceIsSet() const
{
    return m_NsInstanceIsSet;
}
void PduSessionContext::unsetNsInstance()
{
    m_NsInstanceIsSet = false;
}
std::string PduSessionContext::getSmfServiceInstanceId() const
{
    return m_SmfServiceInstanceId;
}
void PduSessionContext::setSmfServiceInstanceId(std::string const& value)
{
    m_SmfServiceInstanceId = value;
    m_SmfServiceInstanceIdIsSet = true;
}
bool PduSessionContext::smfServiceInstanceIdIsSet() const
{
    return m_SmfServiceInstanceIdIsSet;
}
void PduSessionContext::unsetSmfServiceInstanceId()
{
    m_SmfServiceInstanceIdIsSet = false;
}

}
}
}

