/**
 * Namf_EventExposure
 * AMF Event Exposure 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 "AmfUpdateEventOptionItem.h"
#include "Helpers.h"

#include <sstream>

namespace oai::amf::model {

AmfUpdateEventOptionItem::AmfUpdateEventOptionItem() {
  m_Op    = "";
  m_Path  = "";
  m_Value = "";
}

void AmfUpdateEventOptionItem::validate() const {
  std::stringstream msg;
  if (!validate(msg)) {
    throw oai::amf::helpers::ValidationException(msg.str());
  }
}

bool AmfUpdateEventOptionItem::validate(std::stringstream& msg) const {
  return validate(msg, "");
}

bool AmfUpdateEventOptionItem::validate(
    std::stringstream& msg, const std::string& pathPrefix) const {
  bool success = true;
  const std::string _pathPrefix =
      pathPrefix.empty() ? "AmfUpdateEventOptionItem" : pathPrefix;

  /* Path */ {
    const std::string& value           = m_Path;
    const std::string currentValuePath = _pathPrefix + ".path";
  }

  return success;
}

bool AmfUpdateEventOptionItem::operator==(
    const AmfUpdateEventOptionItem& rhs) const {
  return

      (getOp() == rhs.getOp()) &&

      (getPath() == rhs.getPath()) &&

      (getValue() == rhs.getValue())

          ;
}

bool AmfUpdateEventOptionItem::operator!=(
    const AmfUpdateEventOptionItem& rhs) const {
  return !(*this == rhs);
}

void to_json(nlohmann::json& j, const AmfUpdateEventOptionItem& o) {
  j          = nlohmann::json();
  j["op"]    = o.m_Op;
  j["path"]  = o.m_Path;
  j["value"] = o.m_Value;
}

void from_json(const nlohmann::json& j, AmfUpdateEventOptionItem& o) {
  j.at("op").get_to(o.m_Op);
  j.at("path").get_to(o.m_Path);
  j.at("value").get_to(o.m_Value);
}

std::string AmfUpdateEventOptionItem::getOp() const {
  return m_Op;
}
void AmfUpdateEventOptionItem::setOp(std::string const& value) {
  m_Op = value;
}
std::string AmfUpdateEventOptionItem::getPath() const {
  return m_Path;
}
void AmfUpdateEventOptionItem::setPath(std::string const& value) {
  m_Path = value;
}
std::string AmfUpdateEventOptionItem::getValue() const {
  return m_Value;
}
void AmfUpdateEventOptionItem::setValue(std::string const& value) {
  m_Value = value;
}

}  // namespace oai::amf::model
