/**
* Nudm_SDM
* Nudm Subscriber Data Management Service. � 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. 
*
* The version of the OpenAPI document: 2.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 "SessionManagementSubscriptionData.h"

namespace oai {
namespace udm {
namespace model {

SessionManagementSubscriptionData::SessionManagementSubscriptionData()
{
    m_DnnConfigurationsIsSet = false;
    m_InternalGroupIdsIsSet = false;
    m_SharedDnnConfigurationsId = "";
    m_SharedDnnConfigurationsIdIsSet = false;
    m_OdbPacketServicesIsSet = false;
    m_TraceDataIsSet = false;
    m_SharedTraceDataId = "";
    m_SharedTraceDataIdIsSet = false;
    
}

SessionManagementSubscriptionData::~SessionManagementSubscriptionData()
{
}

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

void to_json(nlohmann::json& j, const SessionManagementSubscriptionData& o)
{
    j = nlohmann::json();
    j["singleNssai"] = o.m_SingleNssai;
    if(o.dnnConfigurationsIsSet())
        j["dnnConfigurations"] = o.m_DnnConfigurations;
    if(o.internalGroupIdsIsSet())
        j["internalGroupIds"] = o.m_InternalGroupIds;
    if(o.sharedDnnConfigurationsIdIsSet())
        j["sharedDnnConfigurationsId"] = o.m_SharedDnnConfigurationsId;
    if(o.odbPacketServicesIsSet())
        j["odbPacketServices"] = o.m_OdbPacketServices;
    if(o.traceDataIsSet())
        j["traceData"] = o.m_TraceData;
    if(o.sharedTraceDataIdIsSet())
        j["sharedTraceDataId"] = o.m_SharedTraceDataId;
}

void from_json(const nlohmann::json& j, SessionManagementSubscriptionData& o)
{
    j.at("singleNssai").get_to(o.m_SingleNssai);
    if(j.find("dnnConfigurations") != j.end())
    {
        j.at("dnnConfigurations").get_to(o.m_DnnConfigurations);
        o.m_DnnConfigurationsIsSet = true;
    } 
    if(j.find("internalGroupIds") != j.end())
    {
        j.at("internalGroupIds").get_to(o.m_InternalGroupIds);
        o.m_InternalGroupIdsIsSet = true;
    } 
    if(j.find("sharedDnnConfigurationsId") != j.end())
    {
        j.at("sharedDnnConfigurationsId").get_to(o.m_SharedDnnConfigurationsId);
        o.m_SharedDnnConfigurationsIdIsSet = true;
    } 
    if(j.find("odbPacketServices") != j.end())
    {
        j.at("odbPacketServices").get_to(o.m_OdbPacketServices);
        o.m_OdbPacketServicesIsSet = true;
    } 
    if(j.find("traceData") != j.end())
    {
        j.at("traceData").get_to(o.m_TraceData);
        o.m_TraceDataIsSet = true;
    } 
    if(j.find("sharedTraceDataId") != j.end())
    {
        j.at("sharedTraceDataId").get_to(o.m_SharedTraceDataId);
        o.m_SharedTraceDataIdIsSet = true;
    } 
}

Snssai SessionManagementSubscriptionData::getSingleNssai() const
{
    return m_SingleNssai;
}
void SessionManagementSubscriptionData::setSingleNssai(Snssai const& value)
{
    m_SingleNssai = value;
    
}
std::map<std::string, DnnConfiguration>& SessionManagementSubscriptionData::getDnnConfigurations()
{
    return m_DnnConfigurations;
}
bool SessionManagementSubscriptionData::dnnConfigurationsIsSet() const
{
    return m_DnnConfigurationsIsSet;
}
void SessionManagementSubscriptionData::unsetDnnConfigurations()
{
    m_DnnConfigurationsIsSet = false;
}

void SessionManagementSubscriptionData::insertDnnConfiguration(std::string str, DnnConfiguration dnnConfiguration)
{
	m_DnnConfigurations.insert(std::pair<std::string, DnnConfiguration> (str,dnnConfiguration));
}

DnnConfiguration SessionManagementSubscriptionData::getDnnConfiguration(std::string str)
{
   if (m_DnnConfigurations.count(str) > 0)
	return m_DnnConfigurations.at(str);
   return DnnConfiguration();
}





std::vector<std::string>& SessionManagementSubscriptionData::getInternalGroupIds()
{
    return m_InternalGroupIds;
}
bool SessionManagementSubscriptionData::internalGroupIdsIsSet() const
{
    return m_InternalGroupIdsIsSet;
}
void SessionManagementSubscriptionData::unsetInternalGroupIds()
{
    m_InternalGroupIdsIsSet = false;
}
std::string SessionManagementSubscriptionData::getSharedDnnConfigurationsId() const
{
    return m_SharedDnnConfigurationsId;
}
void SessionManagementSubscriptionData::setSharedDnnConfigurationsId(std::string const& value)
{
    m_SharedDnnConfigurationsId = value;
    m_SharedDnnConfigurationsIdIsSet = true;
}
bool SessionManagementSubscriptionData::sharedDnnConfigurationsIdIsSet() const
{
    return m_SharedDnnConfigurationsIdIsSet;
}
void SessionManagementSubscriptionData::unsetSharedDnnConfigurationsId()
{
    m_SharedDnnConfigurationsIdIsSet = false;
}
OdbPacketServices SessionManagementSubscriptionData::getOdbPacketServices() const
{
    return m_OdbPacketServices;
}
void SessionManagementSubscriptionData::setOdbPacketServices(OdbPacketServices const& value)
{
    m_OdbPacketServices = value;
    m_OdbPacketServicesIsSet = true;
}
bool SessionManagementSubscriptionData::odbPacketServicesIsSet() const
{
    return m_OdbPacketServicesIsSet;
}
void SessionManagementSubscriptionData::unsetOdbPacketServices()
{
    m_OdbPacketServicesIsSet = false;
}
TraceData SessionManagementSubscriptionData::getTraceData() const
{
    return m_TraceData;
}
void SessionManagementSubscriptionData::setTraceData(TraceData const& value)
{
    m_TraceData = value;
    m_TraceDataIsSet = true;
}
bool SessionManagementSubscriptionData::traceDataIsSet() const
{
    return m_TraceDataIsSet;
}
void SessionManagementSubscriptionData::unsetTraceData()
{
    m_TraceDataIsSet = false;
}
std::string SessionManagementSubscriptionData::getSharedTraceDataId() const
{
    return m_SharedTraceDataId;
}
void SessionManagementSubscriptionData::setSharedTraceDataId(std::string const& value)
{
    m_SharedTraceDataId = value;
    m_SharedTraceDataIdIsSet = true;
}
bool SessionManagementSubscriptionData::sharedTraceDataIdIsSet() const
{
    return m_SharedTraceDataIdIsSet;
}
void SessionManagementSubscriptionData::unsetSharedTraceDataId()
{
    m_SharedTraceDataIdIsSet = false;
}

}
}
}

