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

namespace oai {
namespace amf {
namespace model {

UeContextCreateError::UeContextCreateError() {
  m_NgapCauseIsSet = false;
}

UeContextCreateError::~UeContextCreateError() {}

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

void to_json(nlohmann::json& j, const UeContextCreateError& o) {
  j          = nlohmann::json();
  j["error"] = o.m_Error;
  if (o.ngapCauseIsSet()) j["ngapCause"] = o.m_NgapCause;
}

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

ProblemDetails_2 UeContextCreateError::getError() const {
  return m_Error;
}
void UeContextCreateError::setError(ProblemDetails_2 const& value) {
  m_Error = value;
}
NgApCause UeContextCreateError::getNgapCause() const {
  return m_NgapCause;
}
void UeContextCreateError::setNgapCause(NgApCause const& value) {
  m_NgapCause      = value;
  m_NgapCauseIsSet = true;
}
bool UeContextCreateError::ngapCauseIsSet() const {
  return m_NgapCauseIsSet;
}
void UeContextCreateError::unsetNgapCause() {
  m_NgapCauseIsSet = false;
}

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