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

namespace oai {
namespace smf_server {
namespace model {

SecondaryRatUsageInfo::SecondaryRatUsageInfo()
{
    m_QosFlowsUsageDataIsSet = false;
    m_PduSessionUsageDataIsSet = false;
    
}

SecondaryRatUsageInfo::~SecondaryRatUsageInfo()
{
}

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

void to_json(nlohmann::json& j, const SecondaryRatUsageInfo& o)
{
    j = nlohmann::json();
    j["secondaryRatType"] = o.m_SecondaryRatType;
    if(o.qosFlowsUsageDataIsSet())
        j["qosFlowsUsageData"] = o.m_QosFlowsUsageData;
    if(o.pduSessionUsageDataIsSet())
        j["pduSessionUsageData"] = o.m_PduSessionUsageData;
}

void from_json(const nlohmann::json& j, SecondaryRatUsageInfo& o)
{
    j.at("secondaryRatType").get_to(o.m_SecondaryRatType);
    if(j.find("qosFlowsUsageData") != j.end())
    {
        j.at("qosFlowsUsageData").get_to(o.m_QosFlowsUsageData);
        o.m_QosFlowsUsageDataIsSet = true;
    } 
    if(j.find("pduSessionUsageData") != j.end())
    {
        j.at("pduSessionUsageData").get_to(o.m_PduSessionUsageData);
        o.m_PduSessionUsageDataIsSet = true;
    } 
}

RatType SecondaryRatUsageInfo::getSecondaryRatType() const
{
    return m_SecondaryRatType;
}
void SecondaryRatUsageInfo::setSecondaryRatType(RatType const& value)
{
    m_SecondaryRatType = value;
    
}
std::vector<QosFlowUsageReport>& SecondaryRatUsageInfo::getQosFlowsUsageData()
{
    return m_QosFlowsUsageData;
}
bool SecondaryRatUsageInfo::qosFlowsUsageDataIsSet() const
{
    return m_QosFlowsUsageDataIsSet;
}
void SecondaryRatUsageInfo::unsetQosFlowsUsageData()
{
    m_QosFlowsUsageDataIsSet = false;
}
std::vector<VolumeTimedReport>& SecondaryRatUsageInfo::getPduSessionUsageData()
{
    return m_PduSessionUsageData;
}
bool SecondaryRatUsageInfo::pduSessionUsageDataIsSet() const
{
    return m_PduSessionUsageDataIsSet;
}
void SecondaryRatUsageInfo::unsetPduSessionUsageData()
{
    m_PduSessionUsageDataIsSet = false;
}

}
}
}

