/**
 * AMF Communicaiton Service
 * AMF Communication Service
 *
 * OpenAPI spec version: 1.R15.0.0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "N1N2MessageTransferError.h"

namespace oai {
namespace amf {
namespace model {

N1N2MessageTransferError::N1N2MessageTransferError() {
  m_ErrInfoIsSet = false;
}

N1N2MessageTransferError::~N1N2MessageTransferError() {}

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

void to_json(nlohmann::json& j, const N1N2MessageTransferError& o) {
  j          = nlohmann::json();
  j["error"] = o.m_Error;
  if (o.errInfoIsSet()) j["errInfo"] = o.m_ErrInfo;
}

void from_json(const nlohmann::json& j, N1N2MessageTransferError& o) {
  if (j.find("error") != j.end()) {
    j.at("error").get_to(o.m_Error);
  }

  if (j.find("errInfo") != j.end()) {
    j.at("errInfo").get_to(o.m_ErrInfo);
    o.m_ErrInfoIsSet = true;
  }
}

ProblemDetails N1N2MessageTransferError::getError() const {
  return m_Error;
}
void N1N2MessageTransferError::setError(ProblemDetails const& value) {
  m_Error = value;
}
N1N2MsgTxfrErrDetail N1N2MessageTransferError::getErrInfo() const {
  return m_ErrInfo;
}
void N1N2MessageTransferError::setErrInfo(N1N2MsgTxfrErrDetail const& value) {
  m_ErrInfo      = value;
  m_ErrInfoIsSet = true;
}
bool N1N2MessageTransferError::errInfoIsSet() const {
  return m_ErrInfoIsSet;
}
void N1N2MessageTransferError::unsetErrInfo() {
  m_ErrInfoIsSet = false;
}

}  // namespace model
}  // namespace amf
}  // namespace oai
