Commit dc968a36 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Add new model data for EventExposure

parent 03470f22
/**
* 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 "5GsUserState.h"
#include "Helpers.h"
#include <sstream>
namespace oai::amf::model {
_5GsUserState::_5GsUserState() {}
void _5GsUserState::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool _5GsUserState::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool _5GsUserState::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "5GsUserState" : pathPrefix;
if (!m_value.validate(msg)) {
success = false;
}
return success;
}
bool _5GsUserState::operator==(const _5GsUserState& rhs) const {
return
getValue() == rhs.getValue();
}
bool _5GsUserState::operator!=(const _5GsUserState& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const _5GsUserState& o) {
j = nlohmann::json();
to_json(j, o.m_value);
}
void from_json(const nlohmann::json& j, _5GsUserState& o) {
from_json(j, o.m_value);
}
_5GsUserState_anyOf _5GsUserState::getValue() const {
return m_value;
}
void _5GsUserState::setValue(_5GsUserState_anyOf value) {
m_value = value;
}
_5GsUserState_anyOf::e_5GsUserState_anyOf _5GsUserState::getEnumValue() const {
return m_value.getValue();
}
void _5GsUserState::setEnumValue(
_5GsUserState_anyOf::e_5GsUserState_anyOf value) {
m_value.setValue(value);
}
} // namespace oai::amf::model
/**
* 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.
*/
/*
* 5GsUserState.h
*
*
*/
#ifndef _5GsUserState_H_
#define _5GsUserState_H_
#include "_5GsUserState_anyOf.h"
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class _5GsUserState {
public:
_5GsUserState();
virtual ~_5GsUserState() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and
/// calls it's validate. Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const _5GsUserState& rhs) const;
bool operator!=(const _5GsUserState& rhs) const;
/////////////////////////////////////////////
/// 5GsUserState members
_5GsUserState_anyOf getValue() const;
void setValue(_5GsUserState_anyOf value);
_5GsUserState_anyOf::e_5GsUserState_anyOf getEnumValue() const;
void setEnumValue(_5GsUserState_anyOf::e_5GsUserState_anyOf value);
friend void to_json(nlohmann::json& j, const _5GsUserState& o);
friend void from_json(const nlohmann::json& j, _5GsUserState& o);
friend void to_json(nlohmann::json& j, const _5GsUserState_anyOf& o);
friend void from_json(const nlohmann::json& j, _5GsUserState_anyOf& o);
protected:
_5GsUserState_anyOf m_value;
};
} // namespace oai::amf::model
#endif /* 5GsUserState_H_ */
/**
* 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 "5GsUserStateInfo.h"
#include "Helpers.h"
#include <sstream>
namespace oai::amf::model {
_5GsUserStateInfo::_5GsUserStateInfo() {}
void _5GsUserStateInfo::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool _5GsUserStateInfo::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool _5GsUserStateInfo::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "5GsUserStateInfo" : pathPrefix;
return success;
}
bool _5GsUserStateInfo::operator==(const _5GsUserStateInfo& rhs) const {
return
(getR5gsUserState() == rhs.getR5gsUserState()) &&
(getAccessType() == rhs.getAccessType())
;
}
bool _5GsUserStateInfo::operator!=(const _5GsUserStateInfo& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const _5GsUserStateInfo& o) {
j = nlohmann::json();
j["5gsUserState"] = o.m_r_5gsUserState;
j["accessType"] = o.m_AccessType;
}
void from_json(const nlohmann::json& j, _5GsUserStateInfo& o) {
j.at("5gsUserState").get_to(o.m_r_5gsUserState);
j.at("accessType").get_to(o.m_AccessType);
}
_5GsUserState _5GsUserStateInfo::getR5gsUserState() const {
return m_r_5gsUserState;
}
void _5GsUserStateInfo::setR5gsUserState(_5GsUserState const& value) {
m_r_5gsUserState = value;
}
AccessType _5GsUserStateInfo::getAccessType() const {
return m_AccessType;
}
void _5GsUserStateInfo::setAccessType(AccessType const& value) {
m_AccessType = value;
}
} // namespace oai::amf::model
/**
* 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.
*/
/*
* 5GsUserStateInfo.h
*
*
*/
#ifndef _5GsUserStateInfo_H_
#define _5GsUserStateInfo_H_
#include "5GsUserState.h"
#include "AccessType.h"
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class _5GsUserStateInfo {
public:
_5GsUserStateInfo();
virtual ~_5GsUserStateInfo() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const _5GsUserStateInfo& rhs) const;
bool operator!=(const _5GsUserStateInfo& rhs) const;
/////////////////////////////////////////////
/// _5GsUserStateInfo members
/// <summary>
///
/// </summary>
_5GsUserState getR5gsUserState() const;
void setR5gsUserState(_5GsUserState const& value);
/// <summary>
///
/// </summary>
AccessType getAccessType() const;
void setAccessType(AccessType const& value);
friend void to_json(nlohmann::json& j, const _5GsUserStateInfo& o);
friend void from_json(const nlohmann::json& j, _5GsUserStateInfo& o);
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
protected:
_5GsUserState m_r_5gsUserState;
AccessType m_AccessType;
};
} // namespace oai::amf::model
#endif /* _5GsUserStateInfo_H_ */
/**
* 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 "AccessTokenErr.h"
#include "Helpers.h"
#include <sstream>
namespace oai::amf::model {
AccessTokenErr::AccessTokenErr() {
m_Error = "";
m_Error_description = "";
m_Error_descriptionIsSet = false;
m_Error_uri = "";
m_Error_uriIsSet = false;
}
void AccessTokenErr::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AccessTokenErr::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AccessTokenErr::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AccessTokenErr" : pathPrefix;
return success;
}
bool AccessTokenErr::operator==(const AccessTokenErr& rhs) const {
return
(getError() == rhs.getError()) &&
((!errorDescriptionIsSet() && !rhs.errorDescriptionIsSet()) ||
(errorDescriptionIsSet() && rhs.errorDescriptionIsSet() &&
getErrorDescription() == rhs.getErrorDescription())) &&
((!errorUriIsSet() && !rhs.errorUriIsSet()) ||
(errorUriIsSet() && rhs.errorUriIsSet() &&
getErrorUri() == rhs.getErrorUri()))
;
}
bool AccessTokenErr::operator!=(const AccessTokenErr& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const AccessTokenErr& o) {
j = nlohmann::json();
j["error"] = o.m_Error;
if (o.errorDescriptionIsSet()) j["error_description"] = o.m_Error_description;
if (o.errorUriIsSet()) j["error_uri"] = o.m_Error_uri;
}
void from_json(const nlohmann::json& j, AccessTokenErr& o) {
j.at("error").get_to(o.m_Error);
if (j.find("error_description") != j.end()) {
j.at("error_description").get_to(o.m_Error_description);
o.m_Error_descriptionIsSet = true;
}
if (j.find("error_uri") != j.end()) {
j.at("error_uri").get_to(o.m_Error_uri);
o.m_Error_uriIsSet = true;
}
}
std::string AccessTokenErr::getError() const {
return m_Error;
}
void AccessTokenErr::setError(std::string const& value) {
m_Error = value;
}
std::string AccessTokenErr::getErrorDescription() const {
return m_Error_description;
}
void AccessTokenErr::setErrorDescription(std::string const& value) {
m_Error_description = value;
m_Error_descriptionIsSet = true;
}
bool AccessTokenErr::errorDescriptionIsSet() const {
return m_Error_descriptionIsSet;
}
void AccessTokenErr::unsetError_description() {
m_Error_descriptionIsSet = false;
}
std::string AccessTokenErr::getErrorUri() const {
return m_Error_uri;
}
void AccessTokenErr::setErrorUri(std::string const& value) {
m_Error_uri = value;
m_Error_uriIsSet = true;
}
bool AccessTokenErr::errorUriIsSet() const {
return m_Error_uriIsSet;
}
void AccessTokenErr::unsetError_uri() {
m_Error_uriIsSet = false;
}
} // namespace oai::amf::model
/**
* 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.
*/
/*
* AccessTokenErr.h
*
*
*/
#ifndef AccessTokenErr_H_
#define AccessTokenErr_H_
#include <string>
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class AccessTokenErr {
public:
AccessTokenErr();
virtual ~AccessTokenErr() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AccessTokenErr& rhs) const;
bool operator!=(const AccessTokenErr& rhs) const;
/////////////////////////////////////////////
/// AccessTokenErr members
/// <summary>
///
/// </summary>
std::string getError() const;
void setError(std::string const& value);
/// <summary>
///
/// </summary>
std::string getErrorDescription() const;
void setErrorDescription(std::string const& value);
bool errorDescriptionIsSet() const;
void unsetError_description();
/// <summary>
///
/// </summary>
std::string getErrorUri() const;
void setErrorUri(std::string const& value);
bool errorUriIsSet() const;
void unsetError_uri();
friend void to_json(nlohmann::json& j, const AccessTokenErr& o);
friend void from_json(const nlohmann::json& j, AccessTokenErr& o);
protected:
std::string m_Error;
std::string m_Error_description;
bool m_Error_descriptionIsSet;
std::string m_Error_uri;
bool m_Error_uriIsSet;
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
};
} // namespace oai::amf::model
#endif /* AccessTokenErr_H_ */
/**
* 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 "AccessTokenReq.h"
#include "Helpers.h"
#include <sstream>
namespace oai::amf::model {
using namespace oai::amf::model;
AccessTokenReq::AccessTokenReq() {
m_Grant_type = "";
m_NfInstanceId = "";
m_NfTypeIsSet = false;
m_TargetNfTypeIsSet = false;
m_Scope = "";
m_TargetNfInstanceId = "";
m_TargetNfInstanceIdIsSet = false;
m_RequesterPlmnIsSet = false;
m_TargetPlmnIsSet = false;
}
void AccessTokenReq::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AccessTokenReq::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AccessTokenReq::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AccessTokenReq" : pathPrefix;
/* Scope */ {
const std::string& value = m_Scope;
const std::string currentValuePath = _pathPrefix + ".scope";
}
return success;
}
bool AccessTokenReq::operator==(const AccessTokenReq& rhs) const {
return
(getGrantType() == rhs.getGrantType()) &&
(getNfInstanceId() == rhs.getNfInstanceId()) &&
((!nfTypeIsSet() && !rhs.nfTypeIsSet()) ||
(nfTypeIsSet() && rhs.nfTypeIsSet() &&
getNfType() == rhs.getNfType())) &&
((!targetNfTypeIsSet() && !rhs.targetNfTypeIsSet()) ||
(targetNfTypeIsSet() && rhs.targetNfTypeIsSet() &&
getTargetNfType() == rhs.getTargetNfType())) &&
(getScope() == rhs.getScope()) &&
((!targetNfInstanceIdIsSet() && !rhs.targetNfInstanceIdIsSet()) ||
(targetNfInstanceIdIsSet() && rhs.targetNfInstanceIdIsSet() &&
getTargetNfInstanceId() == rhs.getTargetNfInstanceId())) &&
((!requesterPlmnIsSet() && !rhs.requesterPlmnIsSet()) ||
(requesterPlmnIsSet() && rhs.requesterPlmnIsSet() &&
getRequesterPlmn() == rhs.getRequesterPlmn())) &&
((!targetPlmnIsSet() && !rhs.targetPlmnIsSet()) ||
(targetPlmnIsSet() && rhs.targetPlmnIsSet() &&
getTargetPlmn() == rhs.getTargetPlmn()))
;
}
bool AccessTokenReq::operator!=(const AccessTokenReq& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const AccessTokenReq& o) {
j = nlohmann::json();
j["grant_type"] = o.m_Grant_type;
j["nfInstanceId"] = o.m_NfInstanceId;
if (o.nfTypeIsSet()) j["nfType"] = o.m_NfType;
if (o.targetNfTypeIsSet()) j["targetNfType"] = o.m_TargetNfType;
j["scope"] = o.m_Scope;
if (o.targetNfInstanceIdIsSet())
j["targetNfInstanceId"] = o.m_TargetNfInstanceId;
if (o.requesterPlmnIsSet()) j["requesterPlmn"] = o.m_RequesterPlmn;
if (o.targetPlmnIsSet()) j["targetPlmn"] = o.m_TargetPlmn;
}
void from_json(const nlohmann::json& j, AccessTokenReq& o) {
j.at("grant_type").get_to(o.m_Grant_type);
j.at("nfInstanceId").get_to(o.m_NfInstanceId);
if (j.find("nfType") != j.end()) {
j.at("nfType").get_to(o.m_NfType);
o.m_NfTypeIsSet = true;
}
if (j.find("targetNfType") != j.end()) {
j.at("targetNfType").get_to(o.m_TargetNfType);
o.m_TargetNfTypeIsSet = true;
}
j.at("scope").get_to(o.m_Scope);
if (j.find("targetNfInstanceId") != j.end()) {
j.at("targetNfInstanceId").get_to(o.m_TargetNfInstanceId);
o.m_TargetNfInstanceIdIsSet = true;
}
if (j.find("requesterPlmn") != j.end()) {
j.at("requesterPlmn").get_to(o.m_RequesterPlmn);
o.m_RequesterPlmnIsSet = true;
}
if (j.find("targetPlmn") != j.end()) {
j.at("targetPlmn").get_to(o.m_TargetPlmn);
o.m_TargetPlmnIsSet = true;
}
}
std::string AccessTokenReq::getGrantType() const {
return m_Grant_type;
}
void AccessTokenReq::setGrantType(std::string const& value) {
m_Grant_type = value;
}
std::string AccessTokenReq::getNfInstanceId() const {
return m_NfInstanceId;
}
void AccessTokenReq::setNfInstanceId(std::string const& value) {
m_NfInstanceId = value;
}
NFType AccessTokenReq::getNfType() const {
return m_NfType;
}
void AccessTokenReq::setNfType(NFType const& value) {
m_NfType = value;
m_NfTypeIsSet = true;
}
bool AccessTokenReq::nfTypeIsSet() const {
return m_NfTypeIsSet;
}
void AccessTokenReq::unsetNfType() {
m_NfTypeIsSet = false;
}
NFType AccessTokenReq::getTargetNfType() const {
return m_TargetNfType;
}
void AccessTokenReq::setTargetNfType(NFType const& value) {
m_TargetNfType = value;
m_TargetNfTypeIsSet = true;
}
bool AccessTokenReq::targetNfTypeIsSet() const {
return m_TargetNfTypeIsSet;
}
void AccessTokenReq::unsetTargetNfType() {
m_TargetNfTypeIsSet = false;
}
std::string AccessTokenReq::getScope() const {
return m_Scope;
}
void AccessTokenReq::setScope(std::string const& value) {
m_Scope = value;
}
std::string AccessTokenReq::getTargetNfInstanceId() const {
return m_TargetNfInstanceId;
}
void AccessTokenReq::setTargetNfInstanceId(std::string const& value) {
m_TargetNfInstanceId = value;
m_TargetNfInstanceIdIsSet = true;
}
bool AccessTokenReq::targetNfInstanceIdIsSet() const {
return m_TargetNfInstanceIdIsSet;
}
void AccessTokenReq::unsetTargetNfInstanceId() {
m_TargetNfInstanceIdIsSet = false;
}
PlmnId AccessTokenReq::getRequesterPlmn() const {
return m_RequesterPlmn;
}
void AccessTokenReq::setRequesterPlmn(PlmnId const& value) {
m_RequesterPlmn = value;
m_RequesterPlmnIsSet = true;
}
bool AccessTokenReq::requesterPlmnIsSet() const {
return m_RequesterPlmnIsSet;
}
void AccessTokenReq::unsetRequesterPlmn() {
m_RequesterPlmnIsSet = false;
}
PlmnId AccessTokenReq::getTargetPlmn() const {
return m_TargetPlmn;
}
void AccessTokenReq::setTargetPlmn(PlmnId const& value) {
m_TargetPlmn = value;
m_TargetPlmnIsSet = true;
}
bool AccessTokenReq::targetPlmnIsSet() const {
return m_TargetPlmnIsSet;
}
void AccessTokenReq::unsetTargetPlmn() {
m_TargetPlmnIsSet = false;
}
} // namespace oai::amf::model
/**
* 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.
*/
/*
* AccessTokenReq.h
*
*
*/
#ifndef AccessTokenReq_H_
#define AccessTokenReq_H_
#include "NFType.h"
#include <string>
#include "PlmnId.h"
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class AccessTokenReq {
public:
AccessTokenReq();
virtual ~AccessTokenReq() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AccessTokenReq& rhs) const;
bool operator!=(const AccessTokenReq& rhs) const;
/////////////////////////////////////////////
/// AccessTokenReq members
/// <summary>
///
/// </summary>
std::string getGrantType() const;
void setGrantType(std::string const& value);
/// <summary>
///
/// </summary>
std::string getNfInstanceId() const;
void setNfInstanceId(std::string const& value);
/// <summary>
///
/// </summary>
NFType getNfType() const;
void setNfType(NFType const& value);
bool nfTypeIsSet() const;
void unsetNfType();
/// <summary>
///
/// </summary>
NFType getTargetNfType() const;
void setTargetNfType(NFType const& value);
bool targetNfTypeIsSet() const;
void unsetTargetNfType();
/// <summary>
///
/// </summary>
std::string getScope() const;
void setScope(std::string const& value);
/// <summary>
///
/// </summary>
std::string getTargetNfInstanceId() const;
void setTargetNfInstanceId(std::string const& value);
bool targetNfInstanceIdIsSet() const;
void unsetTargetNfInstanceId();
/// <summary>
///
/// </summary>
PlmnId getRequesterPlmn() const;
void setRequesterPlmn(PlmnId const& value);
bool requesterPlmnIsSet() const;
void unsetRequesterPlmn();
/// <summary>
///
/// </summary>
PlmnId getTargetPlmn() const;
void setTargetPlmn(PlmnId const& value);
bool targetPlmnIsSet() const;
void unsetTargetPlmn();
friend void to_json(nlohmann::json& j, const AccessTokenReq& o);
friend void from_json(const nlohmann::json& j, AccessTokenReq& o);
protected:
std::string m_Grant_type;
std::string m_NfInstanceId;
NFType m_NfType;
bool m_NfTypeIsSet;
NFType m_TargetNfType;
bool m_TargetNfTypeIsSet;
std::string m_Scope;
std::string m_TargetNfInstanceId;
bool m_TargetNfInstanceIdIsSet;
PlmnId m_RequesterPlmn;
bool m_RequesterPlmnIsSet;
PlmnId m_TargetPlmn;
bool m_TargetPlmnIsSet;
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
};
} // namespace oai::amf::model
#endif /* AccessTokenReq_H_ */
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -12,25 +12,85 @@ ...@@ -12,25 +12,85 @@
*/ */
#include "AccessType.h" #include "AccessType.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace oai { namespace oai::amf::model {
namespace amf {
namespace model {
AccessType::AccessType() {} AccessType::AccessType() {}
AccessType::~AccessType() {} void AccessType::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AccessType::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AccessType::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AccessType" : pathPrefix;
if (m_value == AccessType::eAccessType::INVALID_VALUE_OPENAPI_GENERATED) {
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool AccessType::operator==(const AccessType& rhs) const {
return getValue() == rhs.getValue()
void AccessType::validate() { ;
// TODO: implement validation }
bool AccessType::operator!=(const AccessType& rhs) const {
return !(*this == rhs);
} }
void to_json(nlohmann::json& j, const AccessType& o) { void to_json(nlohmann::json& j, const AccessType& o) {
j = nlohmann::json(); j = nlohmann::json();
switch (o.getValue()) {
case AccessType::eAccessType::INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case AccessType::eAccessType::_3GPP_ACCESS:
j = "3GPP_ACCESS";
break;
case AccessType::eAccessType::NON_3GPP_ACCESS:
j = "NON_3GPP_ACCESS";
break;
}
} }
void from_json(const nlohmann::json& j, AccessType& o) {} void from_json(const nlohmann::json& j, AccessType& o) {
auto s = j.get<std::string>();
if (s == "3GPP_ACCESS") {
o.setValue(AccessType::eAccessType::_3GPP_ACCESS);
} else if (s == "NON_3GPP_ACCESS") {
o.setValue(AccessType::eAccessType::NON_3GPP_ACCESS);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " AccessType::eAccessType";
throw std::invalid_argument(ss.str());
}
}
AccessType::eAccessType AccessType::getValue() const {
return m_value;
}
void AccessType::setValue(AccessType::eAccessType value) {
m_value = value;
}
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai::amf::model {
namespace amf {
namespace model {
/// <summary> /// <summary>
/// ///
...@@ -31,21 +29,50 @@ namespace model { ...@@ -31,21 +29,50 @@ namespace model {
class AccessType { class AccessType {
public: public:
AccessType(); AccessType();
virtual ~AccessType(); virtual ~AccessType() = default;
void validate(); enum class eAccessType {
// To have a valid default value.
// Avoiding nameclashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
_3GPP_ACCESS,
NON_3GPP_ACCESS
};
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AccessType& rhs) const;
bool operator!=(const AccessType& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// AccessType members /// AccessType members
AccessType::eAccessType getValue() const;
void setValue(AccessType::eAccessType value);
friend void to_json(nlohmann::json& j, const AccessType& o); friend void to_json(nlohmann::json& j, const AccessType& o);
friend void from_json(const nlohmann::json& j, AccessType& o); friend void from_json(const nlohmann::json& j, AccessType& o);
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
protected: protected:
AccessType::eAccessType m_value =
AccessType::eAccessType::INVALID_VALUE_OPENAPI_GENERATED;
}; };
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
#endif /* AccessType_H_ */ #endif /* AccessType_H_ */
/**
* 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 "AmfCreateEventSubscription.h"
#include "Helpers.h"
#include <sstream>
namespace oai::amf::model {
AmfCreateEventSubscription::AmfCreateEventSubscription() {
m_SupportedFeatures = "";
m_SupportedFeaturesIsSet = false;
m_OldGuamiIsSet = false;
}
void AmfCreateEventSubscription::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AmfCreateEventSubscription::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AmfCreateEventSubscription::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AmfCreateEventSubscription" : pathPrefix;
if (supportedFeaturesIsSet()) {
const std::string& value = m_SupportedFeatures;
const std::string currentValuePath = _pathPrefix + ".supportedFeatures";
}
return success;
}
bool AmfCreateEventSubscription::operator==(
const AmfCreateEventSubscription& rhs) const {
return
(getSubscription() == rhs.getSubscription()) &&
((!supportedFeaturesIsSet() && !rhs.supportedFeaturesIsSet()) ||
(supportedFeaturesIsSet() && rhs.supportedFeaturesIsSet() &&
getSupportedFeatures() == rhs.getSupportedFeatures())) &&
((!oldGuamiIsSet() && !rhs.oldGuamiIsSet()) ||
(oldGuamiIsSet() && rhs.oldGuamiIsSet() &&
getOldGuami() == rhs.getOldGuami()))
;
}
bool AmfCreateEventSubscription::operator!=(
const AmfCreateEventSubscription& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const AmfCreateEventSubscription& o) {
j = nlohmann::json();
j["subscription"] = o.m_Subscription;
if (o.supportedFeaturesIsSet())
j["supportedFeatures"] = o.m_SupportedFeatures;
if (o.oldGuamiIsSet()) j["oldGuami"] = o.m_OldGuami;
}
void from_json(const nlohmann::json& j, AmfCreateEventSubscription& o) {
j.at("subscription").get_to(o.m_Subscription);
if (j.find("supportedFeatures") != j.end()) {
j.at("supportedFeatures").get_to(o.m_SupportedFeatures);
o.m_SupportedFeaturesIsSet = true;
}
if (j.find("oldGuami") != j.end()) {
j.at("oldGuami").get_to(o.m_OldGuami);
o.m_OldGuamiIsSet = true;
}
}
AmfEventSubscription AmfCreateEventSubscription::getSubscription() const {
return m_Subscription;
}
void AmfCreateEventSubscription::setSubscription(
AmfEventSubscription const& value) {
m_Subscription = value;
}
std::string AmfCreateEventSubscription::getSupportedFeatures() const {
return m_SupportedFeatures;
}
void AmfCreateEventSubscription::setSupportedFeatures(
std::string const& value) {
m_SupportedFeatures = value;
m_SupportedFeaturesIsSet = true;
}
bool AmfCreateEventSubscription::supportedFeaturesIsSet() const {
return m_SupportedFeaturesIsSet;
}
void AmfCreateEventSubscription::unsetSupportedFeatures() {
m_SupportedFeaturesIsSet = false;
}
Guami AmfCreateEventSubscription::getOldGuami() const {
return m_OldGuami;
}
void AmfCreateEventSubscription::setOldGuami(Guami const& value) {
m_OldGuami = value;
m_OldGuamiIsSet = true;
}
bool AmfCreateEventSubscription::oldGuamiIsSet() const {
return m_OldGuamiIsSet;
}
void AmfCreateEventSubscription::unsetOldGuami() {
m_OldGuamiIsSet = false;
}
} // namespace oai::amf::model
/**
* 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.
*/
/*
* AmfCreateEventSubscription.h
*
*
*/
#ifndef AmfCreateEventSubscription_H_
#define AmfCreateEventSubscription_H_
#include <string>
#include "AmfEventSubscription.h"
#include "Guami.h"
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class AmfCreateEventSubscription {
public:
AmfCreateEventSubscription();
virtual ~AmfCreateEventSubscription() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfCreateEventSubscription& rhs) const;
bool operator!=(const AmfCreateEventSubscription& rhs) const;
/////////////////////////////////////////////
/// AmfCreateEventSubscription members
/// <summary>
///
/// </summary>
AmfEventSubscription getSubscription() const;
void setSubscription(AmfEventSubscription const& value);
/// <summary>
///
/// </summary>
std::string getSupportedFeatures() const;
void setSupportedFeatures(std::string const& value);
bool supportedFeaturesIsSet() const;
void unsetSupportedFeatures();
/// <summary>
///
/// </summary>
Guami getOldGuami() const;
void setOldGuami(Guami const& value);
bool oldGuamiIsSet() const;
void unsetOldGuami();
friend void to_json(nlohmann::json& j, const AmfCreateEventSubscription& o);
friend void from_json(const nlohmann::json& j, AmfCreateEventSubscription& o);
protected:
AmfEventSubscription m_Subscription;
std::string m_SupportedFeatures;
bool m_SupportedFeaturesIsSet;
Guami m_OldGuami;
bool m_OldGuamiIsSet;
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
};
} // namespace oai::amf::model
#endif /* AmfCreateEventSubscription_H_ */
/**
* 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 "AmfCreatedEventSubscription.h"
#include "Helpers.h"
#include <sstream>
namespace oai::amf::model {
AmfCreatedEventSubscription::AmfCreatedEventSubscription() {
m_SubscriptionId = "";
m_ReportListIsSet = false;
m_SupportedFeatures = "";
m_SupportedFeaturesIsSet = false;
}
void AmfCreatedEventSubscription::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AmfCreatedEventSubscription::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AmfCreatedEventSubscription::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AmfCreatedEventSubscription" : pathPrefix;
if (reportListIsSet()) {
const std::vector<AmfEventReport>& value = m_ReportList;
const std::string currentValuePath = _pathPrefix + ".reportList";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const AmfEventReport& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
success =
value.validate(msg, currentValuePath + ".reportList") && success;
i++;
}
}
}
if (supportedFeaturesIsSet()) {
const std::string& value = m_SupportedFeatures;
const std::string currentValuePath = _pathPrefix + ".supportedFeatures";
}
return success;
}
bool AmfCreatedEventSubscription::operator==(
const AmfCreatedEventSubscription& rhs) const {
return
(getSubscription() == rhs.getSubscription()) &&
(getSubscriptionId() == rhs.getSubscriptionId()) &&
((!reportListIsSet() && !rhs.reportListIsSet()) ||
(reportListIsSet() && rhs.reportListIsSet() &&
getReportList() == rhs.getReportList())) &&
((!supportedFeaturesIsSet() && !rhs.supportedFeaturesIsSet()) ||
(supportedFeaturesIsSet() && rhs.supportedFeaturesIsSet() &&
getSupportedFeatures() == rhs.getSupportedFeatures()))
;
}
bool AmfCreatedEventSubscription::operator!=(
const AmfCreatedEventSubscription& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const AmfCreatedEventSubscription& o) {
j = nlohmann::json();
j["subscription"] = o.m_Subscription;
j["subscriptionId"] = o.m_SubscriptionId;
if (o.reportListIsSet() || !o.m_ReportList.empty())
j["reportList"] = o.m_ReportList;
if (o.supportedFeaturesIsSet())
j["supportedFeatures"] = o.m_SupportedFeatures;
}
void from_json(const nlohmann::json& j, AmfCreatedEventSubscription& o) {
j.at("subscription").get_to(o.m_Subscription);
j.at("subscriptionId").get_to(o.m_SubscriptionId);
if (j.find("reportList") != j.end()) {
j.at("reportList").get_to(o.m_ReportList);
o.m_ReportListIsSet = true;
}
if (j.find("supportedFeatures") != j.end()) {
j.at("supportedFeatures").get_to(o.m_SupportedFeatures);
o.m_SupportedFeaturesIsSet = true;
}
}
AmfEventSubscription AmfCreatedEventSubscription::getSubscription() const {
return m_Subscription;
}
void AmfCreatedEventSubscription::setSubscription(
AmfEventSubscription const& value) {
m_Subscription = value;
}
std::string AmfCreatedEventSubscription::getSubscriptionId() const {
return m_SubscriptionId;
}
void AmfCreatedEventSubscription::setSubscriptionId(std::string const& value) {
m_SubscriptionId = value;
}
std::vector<AmfEventReport> AmfCreatedEventSubscription::getReportList() const {
return m_ReportList;
}
void AmfCreatedEventSubscription::setReportList(
std::vector<AmfEventReport> const& value) {
m_ReportList = value;
m_ReportListIsSet = true;
}
bool AmfCreatedEventSubscription::reportListIsSet() const {
return m_ReportListIsSet;
}
void AmfCreatedEventSubscription::unsetReportList() {
m_ReportListIsSet = false;
}
std::string AmfCreatedEventSubscription::getSupportedFeatures() const {
return m_SupportedFeatures;
}
void AmfCreatedEventSubscription::setSupportedFeatures(
std::string const& value) {
m_SupportedFeatures = value;
m_SupportedFeaturesIsSet = true;
}
bool AmfCreatedEventSubscription::supportedFeaturesIsSet() const {
return m_SupportedFeaturesIsSet;
}
void AmfCreatedEventSubscription::unsetSupportedFeatures() {
m_SupportedFeaturesIsSet = false;
}
} // namespace oai::amf::model
/**
* 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.
*/
/*
* AmfCreatedEventSubscription.h
*
*
*/
#ifndef AmfCreatedEventSubscription_H_
#define AmfCreatedEventSubscription_H_
#include "AmfEventReport.h"
#include <string>
#include "AmfEventSubscription.h"
#include <vector>
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class AmfCreatedEventSubscription {
public:
AmfCreatedEventSubscription();
virtual ~AmfCreatedEventSubscription() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfCreatedEventSubscription& rhs) const;
bool operator!=(const AmfCreatedEventSubscription& rhs) const;
/////////////////////////////////////////////
/// AmfCreatedEventSubscription members
/// <summary>
///
/// </summary>
AmfEventSubscription getSubscription() const;
void setSubscription(AmfEventSubscription const& value);
/// <summary>
///
/// </summary>
std::string getSubscriptionId() const;
void setSubscriptionId(std::string const& value);
/// <summary>
///
/// </summary>
std::vector<AmfEventReport> getReportList() const;
void setReportList(std::vector<AmfEventReport> const& value);
bool reportListIsSet() const;
void unsetReportList();
/// <summary>
///
/// </summary>
std::string getSupportedFeatures() const;
void setSupportedFeatures(std::string const& value);
bool supportedFeaturesIsSet() const;
void unsetSupportedFeatures();
friend void to_json(nlohmann::json& j, const AmfCreatedEventSubscription& o);
friend void from_json(
const nlohmann::json& j, AmfCreatedEventSubscription& o);
protected:
AmfEventSubscription m_Subscription;
std::string m_SubscriptionId;
std::vector<AmfEventReport> m_ReportList;
bool m_ReportListIsSet;
std::string m_SupportedFeatures;
bool m_SupportedFeaturesIsSet;
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
};
} // namespace oai::amf::model
#endif /* AmfCreatedEventSubscription_H_ */
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -12,10 +12,11 @@ ...@@ -12,10 +12,11 @@
*/ */
#include "AmfEvent.h" #include "AmfEvent.h"
#include "Helpers.h"
namespace oai { #include <sstream>
namespace amf {
namespace model { namespace oai::amf::model {
AmfEvent::AmfEvent() { AmfEvent::AmfEvent() {
m_ImmediateFlag = false; m_ImmediateFlag = false;
...@@ -26,18 +27,105 @@ AmfEvent::AmfEvent() { ...@@ -26,18 +27,105 @@ AmfEvent::AmfEvent() {
m_RefIdIsSet = false; m_RefIdIsSet = false;
} }
AmfEvent::~AmfEvent() {} void AmfEvent::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AmfEvent::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AmfEvent::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "AmfEvent" : pathPrefix;
if (areaListIsSet()) {
const std::vector<AmfEventArea>& value = m_AreaList;
const std::string currentValuePath = _pathPrefix + ".areaList";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const AmfEventArea& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
success =
value.validate(msg, currentValuePath + ".areaList") && success;
i++;
}
}
}
if (locationFilterListIsSet()) {
const std::vector<LocationFilter>& value = m_LocationFilterList;
const std::string currentValuePath = _pathPrefix + ".locationFilterList";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const LocationFilter& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
success =
value.validate(msg, currentValuePath + ".locationFilterList") &&
success;
i++;
}
}
}
return success;
}
bool AmfEvent::operator==(const AmfEvent& rhs) const {
return
((getType() == rhs.getType()) &&
((!immediateFlagIsSet() && !rhs.immediateFlagIsSet()) ||
(immediateFlagIsSet() && rhs.immediateFlagIsSet() &&
isImmediateFlag() == rhs.isImmediateFlag())) &&
void AmfEvent::validate() { ((!areaListIsSet() && !rhs.areaListIsSet()) ||
// TODO: implement validation (areaListIsSet() && rhs.areaListIsSet() &&
getAreaList() == rhs.getAreaList())) &&
((!locationFilterListIsSet() && !rhs.locationFilterListIsSet()) ||
(locationFilterListIsSet() && rhs.locationFilterListIsSet() &&
getLocationFilterList() == rhs.getLocationFilterList())) &&
((!refIdIsSet() && !rhs.refIdIsSet()) ||
(refIdIsSet() && rhs.refIdIsSet() && getRefId() == rhs.getRefId())))
;
}
bool AmfEvent::operator!=(const AmfEvent& rhs) const {
return !(*this == rhs);
} }
void to_json(nlohmann::json& j, const AmfEvent& o) { void to_json(nlohmann::json& j, const AmfEvent& o) {
j = nlohmann::json(); j = nlohmann::json();
j["type"] = o.m_Type; j["type"] = o.m_Type;
if (o.immediateFlagIsSet()) j["immediateFlag"] = o.m_ImmediateFlag; if (o.immediateFlagIsSet()) j["immediateFlag"] = o.m_ImmediateFlag;
if (o.areaListIsSet()) j["areaList"] = o.m_AreaList; if (o.areaListIsSet() || !o.m_AreaList.empty()) j["areaList"] = o.m_AreaList;
if (o.locationFilterListIsSet()) if (o.locationFilterListIsSet() || !o.m_LocationFilterList.empty())
j["locationFilterList"] = o.m_LocationFilterList; j["locationFilterList"] = o.m_LocationFilterList;
if (o.refIdIsSet()) j["refId"] = o.m_RefId; if (o.refIdIsSet()) j["refId"] = o.m_RefId;
} }
...@@ -81,18 +169,26 @@ bool AmfEvent::immediateFlagIsSet() const { ...@@ -81,18 +169,26 @@ bool AmfEvent::immediateFlagIsSet() const {
void AmfEvent::unsetImmediateFlag() { void AmfEvent::unsetImmediateFlag() {
m_ImmediateFlagIsSet = false; m_ImmediateFlagIsSet = false;
} }
std::vector<AmfEventArea>& AmfEvent::getAreaList() { std::vector<AmfEventArea> AmfEvent::getAreaList() const {
return m_AreaList; return m_AreaList;
} }
void AmfEvent::setAreaList(std::vector<AmfEventArea> const& value) {
m_AreaList = value;
m_AreaListIsSet = true;
}
bool AmfEvent::areaListIsSet() const { bool AmfEvent::areaListIsSet() const {
return m_AreaListIsSet; return m_AreaListIsSet;
} }
void AmfEvent::unsetAreaList() { void AmfEvent::unsetAreaList() {
m_AreaListIsSet = false; m_AreaListIsSet = false;
} }
std::vector<LocationFilter>& AmfEvent::getLocationFilterList() { std::vector<LocationFilter> AmfEvent::getLocationFilterList() const {
return m_LocationFilterList; return m_LocationFilterList;
} }
void AmfEvent::setLocationFilterList(std::vector<LocationFilter> const& value) {
m_LocationFilterList = value;
m_LocationFilterListIsSet = true;
}
bool AmfEvent::locationFilterListIsSet() const { bool AmfEvent::locationFilterListIsSet() const {
return m_LocationFilterListIsSet; return m_LocationFilterListIsSet;
} }
...@@ -113,6 +209,4 @@ void AmfEvent::unsetRefId() { ...@@ -113,6 +209,4 @@ void AmfEvent::unsetRefId() {
m_RefIdIsSet = false; m_RefIdIsSet = false;
} }
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -25,19 +25,30 @@ ...@@ -25,19 +25,30 @@
#include "AmfEventType.h" #include "AmfEventType.h"
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai::amf::model {
namespace amf { using namespace oai::amf::model;
namespace model {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
class AmfEvent { class AmfEvent {
public: public:
AmfEvent(); AmfEvent();
virtual ~AmfEvent(); virtual ~AmfEvent() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
void validate(); /// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfEvent& rhs) const;
bool operator!=(const AmfEvent& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// AmfEvent members /// AmfEvent members
...@@ -57,13 +68,15 @@ class AmfEvent { ...@@ -57,13 +68,15 @@ class AmfEvent {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
std::vector<AmfEventArea>& getAreaList(); std::vector<AmfEventArea> getAreaList() const;
void setAreaList(std::vector<AmfEventArea> const& value);
bool areaListIsSet() const; bool areaListIsSet() const;
void unsetAreaList(); void unsetAreaList();
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
std::vector<LocationFilter>& getLocationFilterList(); std::vector<LocationFilter> getLocationFilterList() const;
void setLocationFilterList(std::vector<LocationFilter> const& value);
bool locationFilterListIsSet() const; bool locationFilterListIsSet() const;
void unsetLocationFilterList(); void unsetLocationFilterList();
/// <summary> /// <summary>
...@@ -77,6 +90,10 @@ class AmfEvent { ...@@ -77,6 +90,10 @@ class AmfEvent {
friend void to_json(nlohmann::json& j, const AmfEvent& o); friend void to_json(nlohmann::json& j, const AmfEvent& o);
friend void from_json(const nlohmann::json& j, AmfEvent& o); friend void from_json(const nlohmann::json& j, AmfEvent& o);
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
protected: protected:
AmfEventType m_Type; AmfEventType m_Type;
...@@ -90,8 +107,6 @@ class AmfEvent { ...@@ -90,8 +107,6 @@ class AmfEvent {
bool m_RefIdIsSet; bool m_RefIdIsSet;
}; };
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
#endif /* AmfEvent_H_ */ #endif /* AmfEvent_H_ */
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -12,20 +12,53 @@ ...@@ -12,20 +12,53 @@
*/ */
#include "AmfEventArea.h" #include "AmfEventArea.h"
#include "Helpers.h"
namespace oai { #include <sstream>
namespace amf {
namespace model { namespace oai::amf::model {
AmfEventArea::AmfEventArea() { AmfEventArea::AmfEventArea() {
m_PresenceInfoIsSet = false; m_PresenceInfoIsSet = false;
m_LadnInfoIsSet = false; m_LadnInfoIsSet = false;
} }
AmfEventArea::~AmfEventArea() {} void AmfEventArea::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AmfEventArea::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AmfEventArea::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AmfEventArea" : pathPrefix;
return success;
}
bool AmfEventArea::operator==(const AmfEventArea& rhs) const {
return
((!presenceInfoIsSet() && !rhs.presenceInfoIsSet()) ||
(presenceInfoIsSet() && rhs.presenceInfoIsSet() &&
getPresenceInfo() == rhs.getPresenceInfo())) &&
((!ladnInfoIsSet() && !rhs.ladnInfoIsSet()) ||
(ladnInfoIsSet() && rhs.ladnInfoIsSet() &&
getLadnInfo() == rhs.getLadnInfo()))
;
}
void AmfEventArea::validate() { bool AmfEventArea::operator!=(const AmfEventArea& rhs) const {
// TODO: implement validation return !(*this == rhs);
} }
void to_json(nlohmann::json& j, const AmfEventArea& o) { void to_json(nlohmann::json& j, const AmfEventArea& o) {
...@@ -72,6 +105,4 @@ void AmfEventArea::unsetLadnInfo() { ...@@ -72,6 +105,4 @@ void AmfEventArea::unsetLadnInfo() {
m_LadnInfoIsSet = false; m_LadnInfoIsSet = false;
} }
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -23,9 +23,7 @@ ...@@ -23,9 +23,7 @@
#include "LadnInfo.h" #include "LadnInfo.h"
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai::amf::model {
namespace amf {
namespace model {
/// <summary> /// <summary>
/// ///
...@@ -33,9 +31,22 @@ namespace model { ...@@ -33,9 +31,22 @@ namespace model {
class AmfEventArea { class AmfEventArea {
public: public:
AmfEventArea(); AmfEventArea();
virtual ~AmfEventArea(); virtual ~AmfEventArea() = default;
void validate(); /// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfEventArea& rhs) const;
bool operator!=(const AmfEventArea& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// AmfEventArea members /// AmfEventArea members
...@@ -57,6 +68,9 @@ class AmfEventArea { ...@@ -57,6 +68,9 @@ class AmfEventArea {
friend void to_json(nlohmann::json& j, const AmfEventArea& o); friend void to_json(nlohmann::json& j, const AmfEventArea& o);
friend void from_json(const nlohmann::json& j, AmfEventArea& o); friend void from_json(const nlohmann::json& j, AmfEventArea& o);
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
protected: protected:
PresenceInfo m_PresenceInfo; PresenceInfo m_PresenceInfo;
...@@ -65,8 +79,6 @@ class AmfEventArea { ...@@ -65,8 +79,6 @@ class AmfEventArea {
bool m_LadnInfoIsSet; bool m_LadnInfoIsSet;
}; };
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
#endif /* AmfEventArea_H_ */ #endif /* AmfEventArea_H_ */
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -12,10 +12,11 @@ ...@@ -12,10 +12,11 @@
*/ */
#include "AmfEventMode.h" #include "AmfEventMode.h"
#include "Helpers.h"
namespace oai { #include <sstream>
namespace amf {
namespace model { namespace oai::amf::model {
AmfEventMode::AmfEventMode() { AmfEventMode::AmfEventMode() {
m_MaxReports = 0; m_MaxReports = 0;
...@@ -24,10 +25,43 @@ AmfEventMode::AmfEventMode() { ...@@ -24,10 +25,43 @@ AmfEventMode::AmfEventMode() {
m_ExpiryIsSet = false; m_ExpiryIsSet = false;
} }
AmfEventMode::~AmfEventMode() {} void AmfEventMode::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AmfEventMode::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AmfEventMode::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AmfEventMode" : pathPrefix;
return success;
}
bool AmfEventMode::operator==(const AmfEventMode& rhs) const {
return
(getTrigger() == rhs.getTrigger()) &&
((!maxReportsIsSet() && !rhs.maxReportsIsSet()) ||
(maxReportsIsSet() && rhs.maxReportsIsSet() &&
getMaxReports() == rhs.getMaxReports())) &&
((!expiryIsSet() && !rhs.expiryIsSet()) ||
(expiryIsSet() && rhs.expiryIsSet() && getExpiry() == rhs.getExpiry()))
;
}
void AmfEventMode::validate() { bool AmfEventMode::operator!=(const AmfEventMode& rhs) const {
// TODO: implement validation return !(*this == rhs);
} }
void to_json(nlohmann::json& j, const AmfEventMode& o) { void to_json(nlohmann::json& j, const AmfEventMode& o) {
...@@ -82,6 +116,4 @@ void AmfEventMode::unsetExpiry() { ...@@ -82,6 +116,4 @@ void AmfEventMode::unsetExpiry() {
m_ExpiryIsSet = false; m_ExpiryIsSet = false;
} }
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -23,9 +23,7 @@ ...@@ -23,9 +23,7 @@
#include <string> #include <string>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai::amf::model {
namespace amf {
namespace model {
/// <summary> /// <summary>
/// ///
...@@ -33,9 +31,22 @@ namespace model { ...@@ -33,9 +31,22 @@ namespace model {
class AmfEventMode { class AmfEventMode {
public: public:
AmfEventMode(); AmfEventMode();
virtual ~AmfEventMode(); virtual ~AmfEventMode() = default;
void validate(); /// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfEventMode& rhs) const;
bool operator!=(const AmfEventMode& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// AmfEventMode members /// AmfEventMode members
...@@ -70,10 +81,12 @@ class AmfEventMode { ...@@ -70,10 +81,12 @@ class AmfEventMode {
bool m_MaxReportsIsSet; bool m_MaxReportsIsSet;
std::string m_Expiry; std::string m_Expiry;
bool m_ExpiryIsSet; bool m_ExpiryIsSet;
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
}; };
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
#endif /* AmfEventMode_H_ */ #endif /* AmfEventMode_H_ */
/**
* 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 "AmfEventNotification.h"
#include "Helpers.h"
#include <sstream>
namespace oai::amf::model {
AmfEventNotification::AmfEventNotification() {
m_NotifyCorrelationId = "";
m_NotifyCorrelationIdIsSet = false;
m_SubsChangeNotifyCorrelationId = "";
m_SubsChangeNotifyCorrelationIdIsSet = false;
m_ReportListIsSet = false;
}
void AmfEventNotification::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AmfEventNotification::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AmfEventNotification::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AmfEventNotification" : pathPrefix;
if (reportListIsSet()) {
const std::vector<AmfEventReport>& value = m_ReportList;
const std::string currentValuePath = _pathPrefix + ".reportList";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const AmfEventReport& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
success =
value.validate(msg, currentValuePath + ".reportList") && success;
i++;
}
}
}
return success;
}
bool AmfEventNotification::operator==(const AmfEventNotification& rhs) const {
return
((!notifyCorrelationIdIsSet() && !rhs.notifyCorrelationIdIsSet()) ||
(notifyCorrelationIdIsSet() && rhs.notifyCorrelationIdIsSet() &&
getNotifyCorrelationId() == rhs.getNotifyCorrelationId())) &&
((!subsChangeNotifyCorrelationIdIsSet() &&
!rhs.subsChangeNotifyCorrelationIdIsSet()) ||
(subsChangeNotifyCorrelationIdIsSet() &&
rhs.subsChangeNotifyCorrelationIdIsSet() &&
getSubsChangeNotifyCorrelationId() ==
rhs.getSubsChangeNotifyCorrelationId())) &&
((!reportListIsSet() && !rhs.reportListIsSet()) ||
(reportListIsSet() && rhs.reportListIsSet() &&
getReportList() == rhs.getReportList()))
;
}
bool AmfEventNotification::operator!=(const AmfEventNotification& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const AmfEventNotification& o) {
j = nlohmann::json();
if (o.notifyCorrelationIdIsSet())
j["notifyCorrelationId"] = o.m_NotifyCorrelationId;
if (o.subsChangeNotifyCorrelationIdIsSet())
j["subsChangeNotifyCorrelationId"] = o.m_SubsChangeNotifyCorrelationId;
if (o.reportListIsSet() || !o.m_ReportList.empty())
j["reportList"] = o.m_ReportList;
}
void from_json(const nlohmann::json& j, AmfEventNotification& o) {
if (j.find("notifyCorrelationId") != j.end()) {
j.at("notifyCorrelationId").get_to(o.m_NotifyCorrelationId);
o.m_NotifyCorrelationIdIsSet = true;
}
if (j.find("subsChangeNotifyCorrelationId") != j.end()) {
j.at("subsChangeNotifyCorrelationId")
.get_to(o.m_SubsChangeNotifyCorrelationId);
o.m_SubsChangeNotifyCorrelationIdIsSet = true;
}
if (j.find("reportList") != j.end()) {
j.at("reportList").get_to(o.m_ReportList);
o.m_ReportListIsSet = true;
}
}
std::string AmfEventNotification::getNotifyCorrelationId() const {
return m_NotifyCorrelationId;
}
void AmfEventNotification::setNotifyCorrelationId(std::string const& value) {
m_NotifyCorrelationId = value;
m_NotifyCorrelationIdIsSet = true;
}
bool AmfEventNotification::notifyCorrelationIdIsSet() const {
return m_NotifyCorrelationIdIsSet;
}
void AmfEventNotification::unsetNotifyCorrelationId() {
m_NotifyCorrelationIdIsSet = false;
}
std::string AmfEventNotification::getSubsChangeNotifyCorrelationId() const {
return m_SubsChangeNotifyCorrelationId;
}
void AmfEventNotification::setSubsChangeNotifyCorrelationId(
std::string const& value) {
m_SubsChangeNotifyCorrelationId = value;
m_SubsChangeNotifyCorrelationIdIsSet = true;
}
bool AmfEventNotification::subsChangeNotifyCorrelationIdIsSet() const {
return m_SubsChangeNotifyCorrelationIdIsSet;
}
void AmfEventNotification::unsetSubsChangeNotifyCorrelationId() {
m_SubsChangeNotifyCorrelationIdIsSet = false;
}
std::vector<AmfEventReport> AmfEventNotification::getReportList() const {
return m_ReportList;
}
void AmfEventNotification::setReportList(
std::vector<AmfEventReport> const& value) {
m_ReportList = value;
m_ReportListIsSet = true;
}
bool AmfEventNotification::reportListIsSet() const {
return m_ReportListIsSet;
}
void AmfEventNotification::unsetReportList() {
m_ReportListIsSet = false;
}
} // namespace oai::amf::model
/**
* 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.
*/
/*
* AmfEventNotification.h
*
*
*/
#ifndef AmfEventNotification_H_
#define AmfEventNotification_H_
#include "AmfEventReport.h"
#include <string>
#include <vector>
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class AmfEventNotification {
public:
AmfEventNotification();
virtual ~AmfEventNotification() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfEventNotification& rhs) const;
bool operator!=(const AmfEventNotification& rhs) const;
/////////////////////////////////////////////
/// AmfEventNotification members
/// <summary>
///
/// </summary>
std::string getNotifyCorrelationId() const;
void setNotifyCorrelationId(std::string const& value);
bool notifyCorrelationIdIsSet() const;
void unsetNotifyCorrelationId();
/// <summary>
///
/// </summary>
std::string getSubsChangeNotifyCorrelationId() const;
void setSubsChangeNotifyCorrelationId(std::string const& value);
bool subsChangeNotifyCorrelationIdIsSet() const;
void unsetSubsChangeNotifyCorrelationId();
/// <summary>
///
/// </summary>
std::vector<AmfEventReport> getReportList() const;
void setReportList(std::vector<AmfEventReport> const& value);
bool reportListIsSet() const;
void unsetReportList();
friend void to_json(nlohmann::json& j, const AmfEventNotification& o);
friend void from_json(const nlohmann::json& j, AmfEventNotification& o);
protected:
std::string m_NotifyCorrelationId;
bool m_NotifyCorrelationIdIsSet;
std::string m_SubsChangeNotifyCorrelationId;
bool m_SubsChangeNotifyCorrelationIdIsSet;
std::vector<AmfEventReport> m_ReportList;
bool m_ReportListIsSet;
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
};
} // namespace oai::amf::model
#endif /* AmfEventNotification_H_ */
This diff is collapsed.
/**
* 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.
*/
/*
* AmfEventReport.h
*
*
*/
#ifndef AmfEventReport_H_
#define AmfEventReport_H_
#include "RmInfo.h"
#include "UeReachability.h"
#include "AmfEventState.h"
#include "AmfEventArea.h"
#include <string>
#include "UserLocation.h"
#include "5GsUserStateInfo.h"
#include <vector>
#include "AccessType.h"
#include "AmfEventType.h"
#include "CmInfo.h"
#include "CommunicationFailure.h"
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class AmfEventReport {
public:
AmfEventReport();
virtual ~AmfEventReport() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfEventReport& rhs) const;
bool operator!=(const AmfEventReport& rhs) const;
/////////////////////////////////////////////
/// AmfEventReport members
/// <summary>
///
/// </summary>
AmfEventType getType() const;
void setType(AmfEventType const& value);
/// <summary>
///
/// </summary>
AmfEventState getState() const;
void setState(AmfEventState const& value);
/// <summary>
///
/// </summary>
std::string getTimeStamp() const;
void setTimeStamp(std::string const& value);
/// <summary>
///
/// </summary>
std::string getSubscriptionId() const;
void setSubscriptionId(std::string const& value);
bool subscriptionIdIsSet() const;
void unsetSubscriptionId();
/// <summary>
///
/// </summary>
bool isAnyUe() const;
void setAnyUe(bool const value);
bool anyUeIsSet() const;
void unsetAnyUe();
/// <summary>
///
/// </summary>
std::string getSupi() const;
void setSupi(std::string const& value);
bool supiIsSet() const;
void unsetSupi();
/// <summary>
///
/// </summary>
std::vector<AmfEventArea> getAreaList() const;
void setAreaList(std::vector<AmfEventArea> const& value);
bool areaListIsSet() const;
void unsetAreaList();
/// <summary>
///
/// </summary>
int32_t getRefId() const;
void setRefId(int32_t const value);
bool refIdIsSet() const;
void unsetRefId();
/// <summary>
///
/// </summary>
std::string getGpsi() const;
void setGpsi(std::string const& value);
bool gpsiIsSet() const;
void unsetGpsi();
/// <summary>
///
/// </summary>
std::string getPei() const;
void setPei(std::string const& value);
bool peiIsSet() const;
void unsetPei();
/// <summary>
///
/// </summary>
UserLocation getLocation() const;
void setLocation(UserLocation const& value);
bool locationIsSet() const;
void unsetLocation();
/// <summary>
///
/// </summary>
std::string getTimezone() const;
void setTimezone(std::string const& value);
bool timezoneIsSet() const;
void unsetTimezone();
/// <summary>
///
/// </summary>
std::vector<AccessType> getAccessTypeList() const;
void setAccessTypeList(std::vector<AccessType> const& value);
bool accessTypeListIsSet() const;
void unsetAccessTypeList();
/// <summary>
///
/// </summary>
std::vector<RmInfo> getRmInfoList() const;
void setRmInfoList(std::vector<RmInfo> const& value);
bool rmInfoListIsSet() const;
void unsetRmInfoList();
/// <summary>
///
/// </summary>
std::vector<CmInfo> getCmInfoList() const;
void setCmInfoList(std::vector<CmInfo> const& value);
bool cmInfoListIsSet() const;
void unsetCmInfoList();
/// <summary>
///
/// </summary>
UeReachability getReachability() const;
void setReachability(UeReachability const& value);
bool reachabilityIsSet() const;
void unsetReachability();
/// <summary>
///
/// </summary>
CommunicationFailure getCommFailure() const;
void setCommFailure(CommunicationFailure const& value);
bool commFailureIsSet() const;
void unsetCommFailure();
/// <summary>
///
/// </summary>
int32_t getNumberOfUes() const;
void setNumberOfUes(int32_t const value);
bool numberOfUesIsSet() const;
void unsetNumberOfUes();
/// <summary>
///
/// </summary>
std::vector<_5GsUserStateInfo> getR5gsUserStateList() const;
void setR5gsUserStateList(std::vector<_5GsUserStateInfo> const& value);
bool r5gsUserStateListIsSet() const;
void unsetr_5gsUserStateList();
friend void to_json(nlohmann::json& j, const AmfEventReport& o);
friend void from_json(const nlohmann::json& j, AmfEventReport& o);
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
protected:
AmfEventType m_Type;
AmfEventState m_State;
std::string m_TimeStamp;
std::string m_SubscriptionId;
bool m_SubscriptionIdIsSet;
bool m_AnyUe;
bool m_AnyUeIsSet;
std::string m_Supi;
bool m_SupiIsSet;
std::vector<AmfEventArea> m_AreaList;
bool m_AreaListIsSet;
int32_t m_RefId;
bool m_RefIdIsSet;
std::string m_Gpsi;
bool m_GpsiIsSet;
std::string m_Pei;
bool m_PeiIsSet;
UserLocation m_Location;
bool m_LocationIsSet;
std::string m_Timezone;
bool m_TimezoneIsSet;
std::vector<AccessType> m_AccessTypeList;
bool m_AccessTypeListIsSet;
std::vector<RmInfo> m_RmInfoList;
bool m_RmInfoListIsSet;
std::vector<CmInfo> m_CmInfoList;
bool m_CmInfoListIsSet;
UeReachability m_Reachability;
bool m_ReachabilityIsSet;
CommunicationFailure m_CommFailure;
bool m_CommFailureIsSet;
int32_t m_NumberOfUes;
bool m_NumberOfUesIsSet;
std::vector<_5GsUserStateInfo> m_r_5gsUserStateList;
bool m_r_5gsUserStateListIsSet;
};
} // namespace oai::amf::model
#endif /* AmfEventReport_H_ */
/**
* 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 "AmfEventState.h"
#include "Helpers.h"
#include <sstream>
namespace oai::amf::model {
AmfEventState::AmfEventState() {
m_Active = false;
m_RemainReports = 0;
m_RemainReportsIsSet = false;
m_RemainDuration = 0;
m_RemainDurationIsSet = false;
}
void AmfEventState::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AmfEventState::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AmfEventState::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AmfEventState" : pathPrefix;
return success;
}
bool AmfEventState::operator==(const AmfEventState& rhs) const {
return
(isActive() == rhs.isActive()) &&
((!remainReportsIsSet() && !rhs.remainReportsIsSet()) ||
(remainReportsIsSet() && rhs.remainReportsIsSet() &&
getRemainReports() == rhs.getRemainReports())) &&
((!remainDurationIsSet() && !rhs.remainDurationIsSet()) ||
(remainDurationIsSet() && rhs.remainDurationIsSet() &&
getRemainDuration() == rhs.getRemainDuration()))
;
}
bool AmfEventState::operator!=(const AmfEventState& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const AmfEventState& o) {
j = nlohmann::json();
j["active"] = o.m_Active;
if (o.remainReportsIsSet()) j["remainReports"] = o.m_RemainReports;
if (o.remainDurationIsSet()) j["remainDuration"] = o.m_RemainDuration;
}
void from_json(const nlohmann::json& j, AmfEventState& o) {
j.at("active").get_to(o.m_Active);
if (j.find("remainReports") != j.end()) {
j.at("remainReports").get_to(o.m_RemainReports);
o.m_RemainReportsIsSet = true;
}
if (j.find("remainDuration") != j.end()) {
j.at("remainDuration").get_to(o.m_RemainDuration);
o.m_RemainDurationIsSet = true;
}
}
bool AmfEventState::isActive() const {
return m_Active;
}
void AmfEventState::setActive(bool const value) {
m_Active = value;
}
int32_t AmfEventState::getRemainReports() const {
return m_RemainReports;
}
void AmfEventState::setRemainReports(int32_t const value) {
m_RemainReports = value;
m_RemainReportsIsSet = true;
}
bool AmfEventState::remainReportsIsSet() const {
return m_RemainReportsIsSet;
}
void AmfEventState::unsetRemainReports() {
m_RemainReportsIsSet = false;
}
int32_t AmfEventState::getRemainDuration() const {
return m_RemainDuration;
}
void AmfEventState::setRemainDuration(int32_t const value) {
m_RemainDuration = value;
m_RemainDurationIsSet = true;
}
bool AmfEventState::remainDurationIsSet() const {
return m_RemainDurationIsSet;
}
void AmfEventState::unsetRemainDuration() {
m_RemainDurationIsSet = false;
}
} // namespace oai::amf::model
/**
* 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.
*/
/*
* AmfEventState.h
*
*
*/
#ifndef AmfEventState_H_
#define AmfEventState_H_
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class AmfEventState {
public:
AmfEventState();
virtual ~AmfEventState() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfEventState& rhs) const;
bool operator!=(const AmfEventState& rhs) const;
/////////////////////////////////////////////
/// AmfEventState members
/// <summary>
///
/// </summary>
bool isActive() const;
void setActive(bool const value);
/// <summary>
///
/// </summary>
int32_t getRemainReports() const;
void setRemainReports(int32_t const value);
bool remainReportsIsSet() const;
void unsetRemainReports();
/// <summary>
///
/// </summary>
int32_t getRemainDuration() const;
void setRemainDuration(int32_t const value);
bool remainDurationIsSet() const;
void unsetRemainDuration();
friend void to_json(nlohmann::json& j, const AmfEventState& o);
friend void from_json(const nlohmann::json& j, AmfEventState& o);
protected:
bool m_Active;
int32_t m_RemainReports;
bool m_RemainReportsIsSet;
int32_t m_RemainDuration;
bool m_RemainDurationIsSet;
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
};
} // namespace oai::amf::model
#endif /* AmfEventState_H_ */
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -12,10 +12,11 @@ ...@@ -12,10 +12,11 @@
*/ */
#include "AmfEventSubscription.h" #include "AmfEventSubscription.h"
#include "Helpers.h"
namespace oai { #include <sstream>
namespace amf {
namespace model { namespace oai::amf::model {
AmfEventSubscription::AmfEventSubscription() { AmfEventSubscription::AmfEventSubscription() {
m_EventNotifyUri = ""; m_EventNotifyUri = "";
...@@ -38,10 +39,116 @@ AmfEventSubscription::AmfEventSubscription() { ...@@ -38,10 +39,116 @@ AmfEventSubscription::AmfEventSubscription() {
m_OptionsIsSet = false; m_OptionsIsSet = false;
} }
AmfEventSubscription::~AmfEventSubscription() {} void AmfEventSubscription::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AmfEventSubscription::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AmfEventSubscription::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AmfEventSubscription" : pathPrefix;
/* EventList */ {
const std::vector<AmfEvent>& value = m_EventList;
const std::string currentValuePath = _pathPrefix + ".eventList";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const AmfEvent& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
success =
value.validate(msg, currentValuePath + ".eventList") && success;
i++;
}
}
}
if (supiIsSet()) {
const std::string& value = m_Supi;
const std::string currentValuePath = _pathPrefix + ".supi";
}
if (groupIdIsSet()) {
const std::string& value = m_GroupId;
const std::string currentValuePath = _pathPrefix + ".groupId";
}
if (gpsiIsSet()) {
const std::string& value = m_Gpsi;
const std::string currentValuePath = _pathPrefix + ".gpsi";
}
if (peiIsSet()) {
const std::string& value = m_Pei;
const std::string currentValuePath = _pathPrefix + ".pei";
}
void AmfEventSubscription::validate() { return success;
// TODO: implement validation }
bool AmfEventSubscription::operator==(const AmfEventSubscription& rhs) const {
return
(getEventList() == rhs.getEventList()) &&
(getEventNotifyUri() == rhs.getEventNotifyUri()) &&
(getNotifyCorrelationId() == rhs.getNotifyCorrelationId()) &&
(getNfId() == rhs.getNfId()) &&
((!subsChangeNotifyUriIsSet() && !rhs.subsChangeNotifyUriIsSet()) ||
(subsChangeNotifyUriIsSet() && rhs.subsChangeNotifyUriIsSet() &&
getSubsChangeNotifyUri() == rhs.getSubsChangeNotifyUri())) &&
((!subsChangeNotifyCorrelationIdIsSet() &&
!rhs.subsChangeNotifyCorrelationIdIsSet()) ||
(subsChangeNotifyCorrelationIdIsSet() &&
rhs.subsChangeNotifyCorrelationIdIsSet() &&
getSubsChangeNotifyCorrelationId() ==
rhs.getSubsChangeNotifyCorrelationId())) &&
((!supiIsSet() && !rhs.supiIsSet()) ||
(supiIsSet() && rhs.supiIsSet() && getSupi() == rhs.getSupi())) &&
((!groupIdIsSet() && !rhs.groupIdIsSet()) ||
(groupIdIsSet() && rhs.groupIdIsSet() &&
getGroupId() == rhs.getGroupId())) &&
((!gpsiIsSet() && !rhs.gpsiIsSet()) ||
(gpsiIsSet() && rhs.gpsiIsSet() && getGpsi() == rhs.getGpsi())) &&
((!peiIsSet() && !rhs.peiIsSet()) ||
(peiIsSet() && rhs.peiIsSet() && getPei() == rhs.getPei())) &&
((!anyUEIsSet() && !rhs.anyUEIsSet()) ||
(anyUEIsSet() && rhs.anyUEIsSet() && isAnyUE() == rhs.isAnyUE())) &&
((!optionsIsSet() && !rhs.optionsIsSet()) ||
(optionsIsSet() && rhs.optionsIsSet() &&
getOptions() == rhs.getOptions()))
;
}
bool AmfEventSubscription::operator!=(const AmfEventSubscription& rhs) const {
return !(*this == rhs);
} }
void to_json(nlohmann::json& j, const AmfEventSubscription& o) { void to_json(nlohmann::json& j, const AmfEventSubscription& o) {
...@@ -102,9 +209,12 @@ void from_json(const nlohmann::json& j, AmfEventSubscription& o) { ...@@ -102,9 +209,12 @@ void from_json(const nlohmann::json& j, AmfEventSubscription& o) {
} }
} }
std::vector<AmfEvent>& AmfEventSubscription::getEventList() { std::vector<AmfEvent> AmfEventSubscription::getEventList() const {
return m_EventList; return m_EventList;
} }
void AmfEventSubscription::setEventList(std::vector<AmfEvent> const& value) {
m_EventList = value;
}
std::string AmfEventSubscription::getEventNotifyUri() const { std::string AmfEventSubscription::getEventNotifyUri() const {
return m_EventNotifyUri; return m_EventNotifyUri;
} }
...@@ -229,6 +339,4 @@ void AmfEventSubscription::unsetOptions() { ...@@ -229,6 +339,4 @@ void AmfEventSubscription::unsetOptions() {
m_OptionsIsSet = false; m_OptionsIsSet = false;
} }
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -25,9 +25,7 @@ ...@@ -25,9 +25,7 @@
#include <vector> #include <vector>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai::amf::model {
namespace amf {
namespace model {
/// <summary> /// <summary>
/// ///
...@@ -35,9 +33,22 @@ namespace model { ...@@ -35,9 +33,22 @@ namespace model {
class AmfEventSubscription { class AmfEventSubscription {
public: public:
AmfEventSubscription(); AmfEventSubscription();
virtual ~AmfEventSubscription(); virtual ~AmfEventSubscription() = default;
void validate(); /// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfEventSubscription& rhs) const;
bool operator!=(const AmfEventSubscription& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// AmfEventSubscription members /// AmfEventSubscription members
...@@ -45,7 +56,8 @@ class AmfEventSubscription { ...@@ -45,7 +56,8 @@ class AmfEventSubscription {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
std::vector<AmfEvent>& getEventList(); std::vector<AmfEvent> getEventList() const;
void setEventList(std::vector<AmfEvent> const& value);
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
...@@ -146,10 +158,12 @@ class AmfEventSubscription { ...@@ -146,10 +158,12 @@ class AmfEventSubscription {
bool m_AnyUEIsSet; bool m_AnyUEIsSet;
AmfEventMode m_Options; AmfEventMode m_Options;
bool m_OptionsIsSet; bool m_OptionsIsSet;
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
}; };
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
#endif /* AmfEventSubscription_H_ */ #endif /* AmfEventSubscription_H_ */
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -12,17 +12,42 @@ ...@@ -12,17 +12,42 @@
*/ */
#include "AmfEventTrigger.h" #include "AmfEventTrigger.h"
#include "Helpers.h"
namespace oai { #include <sstream>
namespace amf {
namespace model { namespace oai::amf::model {
AmfEventTrigger::AmfEventTrigger() {} AmfEventTrigger::AmfEventTrigger() {}
AmfEventTrigger::~AmfEventTrigger() {} void AmfEventTrigger::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AmfEventTrigger::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AmfEventTrigger::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AmfEventTrigger" : pathPrefix;
return success;
}
bool AmfEventTrigger::operator==(const AmfEventTrigger& rhs) const {
return true; // TODO
;
}
void AmfEventTrigger::validate() { bool AmfEventTrigger::operator!=(const AmfEventTrigger& rhs) const {
// TODO: implement validation return !(*this == rhs);
} }
void to_json(nlohmann::json& j, const AmfEventTrigger& o) { void to_json(nlohmann::json& j, const AmfEventTrigger& o) {
...@@ -31,6 +56,4 @@ void to_json(nlohmann::json& j, const AmfEventTrigger& o) { ...@@ -31,6 +56,4 @@ void to_json(nlohmann::json& j, const AmfEventTrigger& o) {
void from_json(const nlohmann::json& j, AmfEventTrigger& o) {} void from_json(const nlohmann::json& j, AmfEventTrigger& o) {}
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -19,11 +19,10 @@ ...@@ -19,11 +19,10 @@
#ifndef AmfEventTrigger_H_ #ifndef AmfEventTrigger_H_
#define AmfEventTrigger_H_ #define AmfEventTrigger_H_
#include "AmfEventTrigger_anyOf.h"
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai::amf::model {
namespace amf {
namespace model {
/// <summary> /// <summary>
/// ///
...@@ -31,9 +30,22 @@ namespace model { ...@@ -31,9 +30,22 @@ namespace model {
class AmfEventTrigger { class AmfEventTrigger {
public: public:
AmfEventTrigger(); AmfEventTrigger();
virtual ~AmfEventTrigger(); virtual ~AmfEventTrigger() = default;
void validate(); /// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfEventTrigger& rhs) const;
bool operator!=(const AmfEventTrigger& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// AmfEventTrigger members /// AmfEventTrigger members
...@@ -42,10 +54,11 @@ class AmfEventTrigger { ...@@ -42,10 +54,11 @@ class AmfEventTrigger {
friend void from_json(const nlohmann::json& j, AmfEventTrigger& o); friend void from_json(const nlohmann::json& j, AmfEventTrigger& o);
protected: protected:
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
}; };
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
#endif /* AmfEventTrigger_H_ */ #endif /* AmfEventTrigger_H_ */
/**
* 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 "AmfEventTrigger_anyOf.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace oai::amf::model {
AmfEventTrigger_anyOf::AmfEventTrigger_anyOf() {}
void AmfEventTrigger_anyOf::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AmfEventTrigger_anyOf::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AmfEventTrigger_anyOf::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AmfEventTrigger_anyOf" : pathPrefix;
if (m_value == AmfEventTrigger_anyOf::eAmfEventTrigger_anyOf::
INVALID_VALUE_OPENAPI_GENERATED) {
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool AmfEventTrigger_anyOf::operator==(const AmfEventTrigger_anyOf& rhs) const {
return getValue() == rhs.getValue()
;
}
bool AmfEventTrigger_anyOf::operator!=(const AmfEventTrigger_anyOf& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const AmfEventTrigger_anyOf& o) {
j = nlohmann::json();
switch (o.getValue()) {
case AmfEventTrigger_anyOf::eAmfEventTrigger_anyOf::
INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case AmfEventTrigger_anyOf::eAmfEventTrigger_anyOf::ONE_TIME:
j = "ONE_TIME";
break;
case AmfEventTrigger_anyOf::eAmfEventTrigger_anyOf::CONTINUOUS:
j = "CONTINUOUS";
break;
}
}
void from_json(const nlohmann::json& j, AmfEventTrigger_anyOf& o) {
auto s = j.get<std::string>();
if (s == "ONE_TIME") {
o.setValue(AmfEventTrigger_anyOf::eAmfEventTrigger_anyOf::ONE_TIME);
} else if (s == "CONTINUOUS") {
o.setValue(AmfEventTrigger_anyOf::eAmfEventTrigger_anyOf::CONTINUOUS);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " AmfEventTrigger_anyOf::eAmfEventTrigger_anyOf";
throw std::invalid_argument(ss.str());
}
}
AmfEventTrigger_anyOf::eAmfEventTrigger_anyOf AmfEventTrigger_anyOf::getValue()
const {
return m_value;
}
void AmfEventTrigger_anyOf::setValue(
AmfEventTrigger_anyOf::eAmfEventTrigger_anyOf value) {
m_value = value;
}
} // namespace oai::amf::model
/**
* 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.
*/
/*
* AmfEventTrigger_anyOf.h
*
*
*/
#ifndef AmfEventTrigger_anyOf_H_
#define AmfEventTrigger_anyOf_H_
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class AmfEventTrigger_anyOf {
public:
AmfEventTrigger_anyOf();
virtual ~AmfEventTrigger_anyOf() = default;
enum class eAmfEventTrigger_anyOf {
// To have a valid default value.
// Avoiding nameclashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
ONE_TIME,
CONTINUOUS
};
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfEventTrigger_anyOf& rhs) const;
bool operator!=(const AmfEventTrigger_anyOf& rhs) const;
/////////////////////////////////////////////
/// AmfEventTrigger_anyOf members
AmfEventTrigger_anyOf::eAmfEventTrigger_anyOf getValue() const;
void setValue(AmfEventTrigger_anyOf::eAmfEventTrigger_anyOf value);
friend void to_json(nlohmann::json& j, const AmfEventTrigger_anyOf& o);
friend void from_json(const nlohmann::json& j, AmfEventTrigger_anyOf& o);
protected:
AmfEventTrigger_anyOf::eAmfEventTrigger_anyOf m_value =
AmfEventTrigger_anyOf::eAmfEventTrigger_anyOf::
INVALID_VALUE_OPENAPI_GENERATED;
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
};
} // namespace oai::amf::model
#endif /* AmfEventTrigger_anyOf_H_ */
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -12,17 +12,40 @@ ...@@ -12,17 +12,40 @@
*/ */
#include "AmfEventType.h" #include "AmfEventType.h"
#include "Helpers.h"
namespace oai { #include <sstream>
namespace amf {
namespace model { namespace oai::amf::model {
AmfEventType::AmfEventType() {} AmfEventType::AmfEventType() {}
AmfEventType::~AmfEventType() {} void AmfEventType::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AmfEventType::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AmfEventType::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AmfEventType" : pathPrefix;
return success;
}
bool AmfEventType::operator==(const AmfEventType& rhs) const {
return true; // TODO
}
void AmfEventType::validate() { bool AmfEventType::operator!=(const AmfEventType& rhs) const {
// TODO: implement validation return !(*this == rhs);
} }
void to_json(nlohmann::json& j, const AmfEventType& o) { void to_json(nlohmann::json& j, const AmfEventType& o) {
...@@ -31,6 +54,4 @@ void to_json(nlohmann::json& j, const AmfEventType& o) { ...@@ -31,6 +54,4 @@ void to_json(nlohmann::json& j, const AmfEventType& o) {
void from_json(const nlohmann::json& j, AmfEventType& o) {} void from_json(const nlohmann::json& j, AmfEventType& o) {}
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
/** /**
* Namf_Communication * Namf_EventExposure
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS, * AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* *
* The version of the OpenAPI document: 1.1.0.alpha-1 * The version of the OpenAPI document: 1.1.0.alpha-1
...@@ -19,11 +19,10 @@ ...@@ -19,11 +19,10 @@
#ifndef AmfEventType_H_ #ifndef AmfEventType_H_
#define AmfEventType_H_ #define AmfEventType_H_
#include "AmfEventType_anyOf.h"
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai::amf::model {
namespace amf {
namespace model {
/// <summary> /// <summary>
/// ///
...@@ -31,9 +30,22 @@ namespace model { ...@@ -31,9 +30,22 @@ namespace model {
class AmfEventType { class AmfEventType {
public: public:
AmfEventType(); AmfEventType();
virtual ~AmfEventType(); virtual ~AmfEventType() = default;
void validate(); /// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfEventType& rhs) const;
bool operator!=(const AmfEventType& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// AmfEventType members /// AmfEventType members
...@@ -42,10 +54,11 @@ class AmfEventType { ...@@ -42,10 +54,11 @@ class AmfEventType {
friend void from_json(const nlohmann::json& j, AmfEventType& o); friend void from_json(const nlohmann::json& j, AmfEventType& o);
protected: protected:
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
}; };
} // namespace model } // namespace oai::amf::model
} // namespace amf
} // namespace oai
#endif /* AmfEventType_H_ */ #endif /* AmfEventType_H_ */
/**
* 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 "AmfEventType_anyOf.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace oai::amf::model {
AmfEventType_anyOf::AmfEventType_anyOf() {}
void AmfEventType_anyOf::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AmfEventType_anyOf::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AmfEventType_anyOf::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AmfEventType_anyOf" : pathPrefix;
if (m_value == AmfEventType_anyOf::eAmfEventType_anyOf::
INVALID_VALUE_OPENAPI_GENERATED) {
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool AmfEventType_anyOf::operator==(const AmfEventType_anyOf& rhs) const {
return getValue() == rhs.getValue()
;
}
bool AmfEventType_anyOf::operator!=(const AmfEventType_anyOf& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const AmfEventType_anyOf& o) {
j = nlohmann::json();
switch (o.getValue()) {
case AmfEventType_anyOf::eAmfEventType_anyOf::
INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case AmfEventType_anyOf::eAmfEventType_anyOf::LOCATION_REPORT:
j = "LOCATION_REPORT";
break;
case AmfEventType_anyOf::eAmfEventType_anyOf::PRESENCE_IN_AOI_REPORT:
j = "PRESENCE_IN_AOI_REPORT";
break;
case AmfEventType_anyOf::eAmfEventType_anyOf::TIMEZONE_REPORT:
j = "TIMEZONE_REPORT";
break;
case AmfEventType_anyOf::eAmfEventType_anyOf::ACCESS_TYPE_REPORT:
j = "ACCESS_TYPE_REPORT";
break;
case AmfEventType_anyOf::eAmfEventType_anyOf::REGISTRATION_STATE_REPORT:
j = "REGISTRATION_STATE_REPORT";
break;
case AmfEventType_anyOf::eAmfEventType_anyOf::CONNECTIVITY_STATE_REPORT:
j = "CONNECTIVITY_STATE_REPORT";
break;
case AmfEventType_anyOf::eAmfEventType_anyOf::REACHABILITY_REPORT:
j = "REACHABILITY_REPORT";
break;
case AmfEventType_anyOf::eAmfEventType_anyOf::COMMUNICATION_FAILURE_REPORT:
j = "COMMUNICATION_FAILURE_REPORT";
break;
case AmfEventType_anyOf::eAmfEventType_anyOf::UES_IN_AREA_REPORT:
j = "UES_IN_AREA_REPORT";
break;
case AmfEventType_anyOf::eAmfEventType_anyOf::SUBSCRIPTION_ID_CHANGE:
j = "SUBSCRIPTION_ID_CHANGE";
break;
case AmfEventType_anyOf::eAmfEventType_anyOf::SUBSCRIPTION_ID_ADDITION:
j = "SUBSCRIPTION_ID_ADDITION";
break;
case AmfEventType_anyOf::eAmfEventType_anyOf::LOSS_OF_CONNECTIVITY:
j = "LOSS_OF_CONNECTIVITY";
break;
case AmfEventType_anyOf::eAmfEventType_anyOf::_5GS_USER_STATE_REPORT:
j = "5GS_USER_STATE_REPORT";
break;
}
}
void from_json(const nlohmann::json& j, AmfEventType_anyOf& o) {
auto s = j.get<std::string>();
if (s == "LOCATION_REPORT") {
o.setValue(AmfEventType_anyOf::eAmfEventType_anyOf::LOCATION_REPORT);
} else if (s == "PRESENCE_IN_AOI_REPORT") {
o.setValue(AmfEventType_anyOf::eAmfEventType_anyOf::PRESENCE_IN_AOI_REPORT);
} else if (s == "TIMEZONE_REPORT") {
o.setValue(AmfEventType_anyOf::eAmfEventType_anyOf::TIMEZONE_REPORT);
} else if (s == "ACCESS_TYPE_REPORT") {
o.setValue(AmfEventType_anyOf::eAmfEventType_anyOf::ACCESS_TYPE_REPORT);
} else if (s == "REGISTRATION_STATE_REPORT") {
o.setValue(
AmfEventType_anyOf::eAmfEventType_anyOf::REGISTRATION_STATE_REPORT);
} else if (s == "CONNECTIVITY_STATE_REPORT") {
o.setValue(
AmfEventType_anyOf::eAmfEventType_anyOf::CONNECTIVITY_STATE_REPORT);
} else if (s == "REACHABILITY_REPORT") {
o.setValue(AmfEventType_anyOf::eAmfEventType_anyOf::REACHABILITY_REPORT);
} else if (s == "COMMUNICATION_FAILURE_REPORT") {
o.setValue(
AmfEventType_anyOf::eAmfEventType_anyOf::COMMUNICATION_FAILURE_REPORT);
} else if (s == "UES_IN_AREA_REPORT") {
o.setValue(AmfEventType_anyOf::eAmfEventType_anyOf::UES_IN_AREA_REPORT);
} else if (s == "SUBSCRIPTION_ID_CHANGE") {
o.setValue(AmfEventType_anyOf::eAmfEventType_anyOf::SUBSCRIPTION_ID_CHANGE);
} else if (s == "SUBSCRIPTION_ID_ADDITION") {
o.setValue(
AmfEventType_anyOf::eAmfEventType_anyOf::SUBSCRIPTION_ID_ADDITION);
} else if (s == "LOSS_OF_CONNECTIVITY") {
o.setValue(AmfEventType_anyOf::eAmfEventType_anyOf::LOSS_OF_CONNECTIVITY);
} else if (s == "5GS_USER_STATE_REPORT") {
o.setValue(AmfEventType_anyOf::eAmfEventType_anyOf::_5GS_USER_STATE_REPORT);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " AmfEventType_anyOf::eAmfEventType_anyOf";
throw std::invalid_argument(ss.str());
}
}
AmfEventType_anyOf::eAmfEventType_anyOf AmfEventType_anyOf::getValue() const {
return m_value;
}
void AmfEventType_anyOf::setValue(
AmfEventType_anyOf::eAmfEventType_anyOf value) {
m_value = value;
}
} // namespace oai::amf::model
/**
* 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.
*/
/*
* AmfEventType_anyOf.h
*
*
*/
#ifndef AmfEventType_anyOf_H_
#define AmfEventType_anyOf_H_
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class AmfEventType_anyOf {
public:
AmfEventType_anyOf();
virtual ~AmfEventType_anyOf() = default;
enum class eAmfEventType_anyOf {
// To have a valid default value.
// Avoiding nameclashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
LOCATION_REPORT,
PRESENCE_IN_AOI_REPORT,
TIMEZONE_REPORT,
ACCESS_TYPE_REPORT,
REGISTRATION_STATE_REPORT,
CONNECTIVITY_STATE_REPORT,
REACHABILITY_REPORT,
COMMUNICATION_FAILURE_REPORT,
UES_IN_AREA_REPORT,
SUBSCRIPTION_ID_CHANGE,
SUBSCRIPTION_ID_ADDITION,
LOSS_OF_CONNECTIVITY,
_5GS_USER_STATE_REPORT
};
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfEventType_anyOf& rhs) const;
bool operator!=(const AmfEventType_anyOf& rhs) const;
/////////////////////////////////////////////
/// AmfEventType_anyOf members
AmfEventType_anyOf::eAmfEventType_anyOf getValue() const;
void setValue(AmfEventType_anyOf::eAmfEventType_anyOf value);
friend void to_json(nlohmann::json& j, const AmfEventType_anyOf& o);
friend void from_json(const nlohmann::json& j, AmfEventType_anyOf& o);
protected:
AmfEventType_anyOf::eAmfEventType_anyOf m_value =
AmfEventType_anyOf::eAmfEventType_anyOf::INVALID_VALUE_OPENAPI_GENERATED;
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
};
} // namespace oai::amf::model
#endif /* AmfEventType_anyOf_H_ */
/**
* 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 org::openapitools::server::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
/**
* 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.
*/
/*
* AmfUpdateEventOptionItem.h
*
*
*/
#ifndef AmfUpdateEventOptionItem_H_
#define AmfUpdateEventOptionItem_H_
#include <string>
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class AmfUpdateEventOptionItem {
public:
AmfUpdateEventOptionItem();
virtual ~AmfUpdateEventOptionItem() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfUpdateEventOptionItem& rhs) const;
bool operator!=(const AmfUpdateEventOptionItem& rhs) const;
/////////////////////////////////////////////
/// AmfUpdateEventOptionItem members
/// <summary>
///
/// </summary>
std::string getOp() const;
void setOp(std::string const& value);
/// <summary>
///
/// </summary>
std::string getPath() const;
void setPath(std::string const& value);
/// <summary>
///
/// </summary>
std::string getValue() const;
void setValue(std::string const& value);
friend void to_json(nlohmann::json& j, const AmfUpdateEventOptionItem& o);
friend void from_json(const nlohmann::json& j, AmfUpdateEventOptionItem& o);
protected:
std::string m_Op;
std::string m_Path;
std::string m_Value;
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
};
} // namespace oai::amf::model
#endif /* AmfUpdateEventOptionItem_H_ */
/**
* 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 "AmfUpdatedEventSubscription.h"
#include "Helpers.h"
#include <sstream>
namespace oai::amf::model {
AmfUpdatedEventSubscription::AmfUpdatedEventSubscription() {}
void AmfUpdatedEventSubscription::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AmfUpdatedEventSubscription::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AmfUpdatedEventSubscription::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AmfUpdatedEventSubscription" : pathPrefix;
return success;
}
bool AmfUpdatedEventSubscription::operator==(
const AmfUpdatedEventSubscription& rhs) const {
return
(getSubscription() == rhs.getSubscription())
;
}
bool AmfUpdatedEventSubscription::operator!=(
const AmfUpdatedEventSubscription& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const AmfUpdatedEventSubscription& o) {
j = nlohmann::json();
j["subscription"] = o.m_Subscription;
}
void from_json(const nlohmann::json& j, AmfUpdatedEventSubscription& o) {
j.at("subscription").get_to(o.m_Subscription);
}
AmfEventSubscription AmfUpdatedEventSubscription::getSubscription() const {
return m_Subscription;
}
void AmfUpdatedEventSubscription::setSubscription(
AmfEventSubscription const& value) {
m_Subscription = value;
}
} // namespace oai::amf::model
/**
* 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.
*/
/*
* AmfUpdatedEventSubscription.h
*
*
*/
#ifndef AmfUpdatedEventSubscription_H_
#define AmfUpdatedEventSubscription_H_
#include "AmfEventSubscription.h"
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class AmfUpdatedEventSubscription {
public:
AmfUpdatedEventSubscription();
virtual ~AmfUpdatedEventSubscription() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const AmfUpdatedEventSubscription& rhs) const;
bool operator!=(const AmfUpdatedEventSubscription& rhs) const;
/////////////////////////////////////////////
/// AmfUpdatedEventSubscription members
/// <summary>
///
/// </summary>
AmfEventSubscription getSubscription() const;
void setSubscription(AmfEventSubscription const& value);
friend void to_json(nlohmann::json& j, const AmfUpdatedEventSubscription& o);
friend void from_json(
const nlohmann::json& j, AmfUpdatedEventSubscription& o);
protected:
AmfEventSubscription m_Subscription;
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
};
} // namespace oai::amf::model
#endif /* AmfUpdatedEventSubscription_H_ */
/**
* 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 "CmInfo.h"
#include "Helpers.h"
#include <sstream>
namespace oai::amf::model {
CmInfo::CmInfo() {}
void CmInfo::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool CmInfo::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool CmInfo::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "CmInfo" : pathPrefix;
return success;
}
bool CmInfo::operator==(const CmInfo& rhs) const {
return
(getCmState() == rhs.getCmState()) &&
(getAccessType() == rhs.getAccessType())
;
}
bool CmInfo::operator!=(const CmInfo& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const CmInfo& o) {
j = nlohmann::json();
j["cmState"] = o.m_CmState;
j["accessType"] = o.m_AccessType;
}
void from_json(const nlohmann::json& j, CmInfo& o) {
j.at("cmState").get_to(o.m_CmState);
j.at("accessType").get_to(o.m_AccessType);
}
CmState CmInfo::getCmState() const {
return m_CmState;
}
void CmInfo::setCmState(CmState const& value) {
m_CmState = value;
}
AccessType CmInfo::getAccessType() const {
return m_AccessType;
}
void CmInfo::setAccessType(AccessType const& value) {
m_AccessType = value;
}
} // namespace oai::amf::model
/**
* 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.
*/
/*
* CmInfo.h
*
*
*/
#ifndef CmInfo_H_
#define CmInfo_H_
#include "CmState.h"
#include "AccessType.h"
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class CmInfo {
public:
CmInfo();
virtual ~CmInfo() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const CmInfo& rhs) const;
bool operator!=(const CmInfo& rhs) const;
/////////////////////////////////////////////
/// CmInfo members
/// <summary>
///
/// </summary>
CmState getCmState() const;
void setCmState(CmState const& value);
/// <summary>
///
/// </summary>
AccessType getAccessType() const;
void setAccessType(AccessType const& value);
friend void to_json(nlohmann::json& j, const CmInfo& o);
friend void from_json(const nlohmann::json& j, CmInfo& o);
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
protected:
CmState m_CmState;
AccessType m_AccessType;
};
} // namespace oai::amf::model
#endif /* CmInfo_H_ */
/**
* 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 "CmState.h"
#include "Helpers.h"
#include <sstream>
namespace oai::amf::model {
CmState::CmState() {}
void CmState::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool CmState::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool CmState::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "CmState" : pathPrefix;
return success;
}
bool CmState::operator==(const CmState& rhs) const {
return true; // TODO
;
}
bool CmState::operator!=(const CmState& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const CmState& o) {
j = nlohmann::json();
}
void from_json(const nlohmann::json& j, CmState& o) {}
} // namespace oai::amf::model
/**
* 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.
*/
/*
* CmState.h
*
*
*/
#ifndef CmState_H_
#define CmState_H_
#include "CmState_anyOf.h"
#include <nlohmann/json.hpp>
namespace oai::amf::model {
/// <summary>
///
/// </summary>
class CmState {
public:
CmState();
virtual ~CmState() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on
/// failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes
/// an error message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
bool operator==(const CmState& rhs) const;
bool operator!=(const CmState& rhs) const;
/////////////////////////////////////////////
/// CmState members
friend void to_json(nlohmann::json& j, const CmState& o);
friend void from_json(const nlohmann::json& j, CmState& o);
protected:
// Helper overload for validate. Used when one model stores another model and
// calls it's validate.
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
};
} // namespace oai::amf::model
#endif /* CmState_H_ */
/**
* 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 "CmState_anyOf.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace oai::amf::model {
CmState_anyOf::CmState_anyOf() {}
void CmState_anyOf::validate() const {
std::stringstream msg;
if (!validate(msg)) {
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool CmState_anyOf::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool CmState_anyOf::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "CmState_anyOf" : pathPrefix;
if (m_value ==
CmState_anyOf::eCmState_anyOf::INVALID_VALUE_OPENAPI_GENERATED) {
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool CmState_anyOf::operator==(const CmState_anyOf& rhs) const {
return getValue() == rhs.getValue()
;
}
bool CmState_anyOf::operator!=(const CmState_anyOf& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const CmState_anyOf& o) {
j = nlohmann::json();
switch (o.getValue()) {
case CmState_anyOf::eCmState_anyOf::INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case CmState_anyOf::eCmState_anyOf::IDLE:
j = "IDLE";
break;
case CmState_anyOf::eCmState_anyOf::CONNECTED:
j = "CONNECTED";
break;
}
}
void from_json(const nlohmann::json& j, CmState_anyOf& o) {
auto s = j.get<std::string>();
if (s == "IDLE") {
o.setValue(CmState_anyOf::eCmState_anyOf::IDLE);
} else if (s == "CONNECTED") {
o.setValue(CmState_anyOf::eCmState_anyOf::CONNECTED);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " CmState_anyOf::eCmState_anyOf";
throw std::invalid_argument(ss.str());
}
}
CmState_anyOf::eCmState_anyOf CmState_anyOf::getValue() const {
return m_value;
}
void CmState_anyOf::setValue(CmState_anyOf::eCmState_anyOf value) {
m_value = value;
}
} // namespace oai::amf::model
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment