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

namespace oai {
namespace smf_server {
namespace model {

HsmfUpdateError::HsmfUpdateError()
{
    m_Pti = 0;
    m_PtiIsSet = false;
    m_N1smCause = "";
    m_N1smCauseIsSet = false;
    m_N1SmInfoToUeIsSet = false;
    m_BackOffTimer = 0;
    m_BackOffTimerIsSet = false;
    m_RecoveryTime = "";
    m_RecoveryTimeIsSet = false;
    
}

HsmfUpdateError::~HsmfUpdateError()
{
}

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

void to_json(nlohmann::json& j, const HsmfUpdateError& o)
{
    j = nlohmann::json();
    j["error"] = o.m_Error;
    if(o.ptiIsSet())
        j["pti"] = o.m_Pti;
    if(o.n1smCauseIsSet())
        j["n1smCause"] = o.m_N1smCause;
    if(o.n1SmInfoToUeIsSet())
        j["n1SmInfoToUe"] = o.m_N1SmInfoToUe;
    if(o.backOffTimerIsSet())
        j["backOffTimer"] = o.m_BackOffTimer;
    if(o.recoveryTimeIsSet())
        j["recoveryTime"] = o.m_RecoveryTime;
}

void from_json(const nlohmann::json& j, HsmfUpdateError& o)
{
    j.at("error").get_to(o.m_Error);
    if(j.find("pti") != j.end())
    {
        j.at("pti").get_to(o.m_Pti);
        o.m_PtiIsSet = true;
    } 
    if(j.find("n1smCause") != j.end())
    {
        j.at("n1smCause").get_to(o.m_N1smCause);
        o.m_N1smCauseIsSet = true;
    } 
    if(j.find("n1SmInfoToUe") != j.end())
    {
        j.at("n1SmInfoToUe").get_to(o.m_N1SmInfoToUe);
        o.m_N1SmInfoToUeIsSet = true;
    } 
    if(j.find("backOffTimer") != j.end())
    {
        j.at("backOffTimer").get_to(o.m_BackOffTimer);
        o.m_BackOffTimerIsSet = true;
    } 
    if(j.find("recoveryTime") != j.end())
    {
        j.at("recoveryTime").get_to(o.m_RecoveryTime);
        o.m_RecoveryTimeIsSet = true;
    } 
}

ProblemDetails HsmfUpdateError::getError() const
{
    return m_Error;
}
void HsmfUpdateError::setError(ProblemDetails const& value)
{
    m_Error = value;
    
}
int32_t HsmfUpdateError::getPti() const
{
    return m_Pti;
}
void HsmfUpdateError::setPti(int32_t const value)
{
    m_Pti = value;
    m_PtiIsSet = true;
}
bool HsmfUpdateError::ptiIsSet() const
{
    return m_PtiIsSet;
}
void HsmfUpdateError::unsetPti()
{
    m_PtiIsSet = false;
}
std::string HsmfUpdateError::getN1smCause() const
{
    return m_N1smCause;
}
void HsmfUpdateError::setN1smCause(std::string const& value)
{
    m_N1smCause = value;
    m_N1smCauseIsSet = true;
}
bool HsmfUpdateError::n1smCauseIsSet() const
{
    return m_N1smCauseIsSet;
}
void HsmfUpdateError::unsetN1smCause()
{
    m_N1smCauseIsSet = false;
}
RefToBinaryData HsmfUpdateError::getN1SmInfoToUe() const
{
    return m_N1SmInfoToUe;
}
void HsmfUpdateError::setN1SmInfoToUe(RefToBinaryData const& value)
{
    m_N1SmInfoToUe = value;
    m_N1SmInfoToUeIsSet = true;
}
bool HsmfUpdateError::n1SmInfoToUeIsSet() const
{
    return m_N1SmInfoToUeIsSet;
}
void HsmfUpdateError::unsetN1SmInfoToUe()
{
    m_N1SmInfoToUeIsSet = false;
}
int32_t HsmfUpdateError::getBackOffTimer() const
{
    return m_BackOffTimer;
}
void HsmfUpdateError::setBackOffTimer(int32_t const value)
{
    m_BackOffTimer = value;
    m_BackOffTimerIsSet = true;
}
bool HsmfUpdateError::backOffTimerIsSet() const
{
    return m_BackOffTimerIsSet;
}
void HsmfUpdateError::unsetBackOffTimer()
{
    m_BackOffTimerIsSet = false;
}
std::string HsmfUpdateError::getRecoveryTime() const
{
    return m_RecoveryTime;
}
void HsmfUpdateError::setRecoveryTime(std::string const& value)
{
    m_RecoveryTime = value;
    m_RecoveryTimeIsSet = true;
}
bool HsmfUpdateError::recoveryTimeIsSet() const
{
    return m_RecoveryTimeIsSet;
}
void HsmfUpdateError::unsetRecoveryTime()
{
    m_RecoveryTimeIsSet = false;
}

}
}
}

