Skip to content
Snippets Groups Projects
OdbPacketServices.cpp 1.95 KiB
Newer Older
/**
 * Common Data Types
 * Common Data Types for Service Based Interfaces. © 2022, 3GPP Organizational
 * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 1.2.7
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "OdbPacketServices.h"
#include "Helpers.h"

#include <sstream>

namespace oai::model::common {

OdbPacketServices::OdbPacketServices() {}

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

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

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

  if (!m_value.validate(msg)) {
    success = false;
    msg << _pathPrefix << ": has no value;";
  }

  return success;
}

bool OdbPacketServices::operator==(const OdbPacketServices& rhs) const {
  return getValue() == rhs.getValue();
}

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

void to_json(nlohmann::json& j, const OdbPacketServices& o) {
  j = nlohmann::json();
}

void from_json(const nlohmann::json& j, OdbPacketServices& o) {}

OdbPacketServices_anyOf OdbPacketServices::getValue() const {
  return m_value;
}

void OdbPacketServices::setValue(OdbPacketServices_anyOf value) {
  m_value = value;
}

OdbPacketServices_anyOf::eOdbPacketServices_anyOf
OdbPacketServices::getEnumValue() const {
  return m_value.getValue();
}

void OdbPacketServices::setEnumValue(
    OdbPacketServices_anyOf::eOdbPacketServices_anyOf value) {
  m_value.setValue(value);
}