Commit 81c19388 authored by Stefan Spettel's avatar Stefan Spettel

feat(pcf): Added n7 class template and added restricted model for PCF SMPolicyAPI

Signed-off-by: default avatarStefan Spettel <stefan.spettel@eurecom.fr>
parent 973a4557
/** /**
* Nsmf_PDUSession * Npcf_SMPolicyControl API
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, * Session Management Policy Control Service © 2020, 3GPP Organizational
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Partners (ARIB, ATIS, 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.1.alpha-5
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator * NOTE: This class is auto generated by OpenAPI Generator
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
*/ */
#include "AccessType.h" #include "AccessType.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace oai { namespace oai {
namespace smf_server { namespace smf_server {
...@@ -19,17 +22,79 @@ namespace model { ...@@ -19,17 +22,79 @@ 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::API_3GPP_ACCESS:
j = "3GPP_ACCESS";
break;
case AccessType::eAccessType::API_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::API_3GPP_ACCESS);
} else if (s == "NON_3GPP_ACCESS") {
o.setValue(AccessType::eAccessType::API_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 model
} // namespace smf_server } // namespace smf_server
......
/** /**
* Nsmf_PDUSession * Npcf_SMPolicyControl API
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, * Session Management Policy Control Service © 2020, 3GPP Organizational
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Partners (ARIB, ATIS, 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.1.alpha-5
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator * NOTE: This class is auto generated by OpenAPI Generator
...@@ -31,21 +31,54 @@ namespace model { ...@@ -31,21 +31,54 @@ 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 name clashes with user defined
// enum values
// use API prefix to not have naming conflicts with NAS messages
INVALID_VALUE_OPENAPI_GENERATED = 0,
API_3GPP_ACCESS,
API_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;
/// <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 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);
protected: protected:
AccessType::eAccessType m_value =
AccessType::eAccessType::INVALID_VALUE_OPENAPI_GENERATED;
}; };
} // namespace model } // namespace model
} // namespace smf_server } // namespace smf_server
} // namespace oai } // namespace oai
#endif /* AccessType_H_ */ #endif /* AccessType_H_ */
/** /**
* Nsmf_PDUSession * Npcf_SMPolicyControl API
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, * Session Management Policy Control Service © 2020, 3GPP Organizational
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Partners (ARIB, ATIS, 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.1.alpha-5
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator * NOTE: This class is auto generated by OpenAPI Generator
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
*/ */
#include "DnnSelectionMode.h" #include "DnnSelectionMode.h"
#include "Helpers.h"
#include <sstream>
namespace oai { namespace oai {
namespace smf_server { namespace smf_server {
...@@ -19,17 +22,66 @@ namespace model { ...@@ -19,17 +22,66 @@ namespace model {
DnnSelectionMode::DnnSelectionMode() {} DnnSelectionMode::DnnSelectionMode() {}
DnnSelectionMode::~DnnSelectionMode() {} void DnnSelectionMode::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool DnnSelectionMode::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool DnnSelectionMode::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "DnnSelectionMode" : pathPrefix;
if (!m_value.validate(msg)) {
success = false;
}
return success;
}
bool DnnSelectionMode::operator==(const DnnSelectionMode& rhs) const {
return
getValue() == rhs.getValue();
}
void DnnSelectionMode::validate() { bool DnnSelectionMode::operator!=(const DnnSelectionMode& rhs) const {
// TODO: implement validation return !(*this == rhs);
} }
void to_json(nlohmann::json& j, const DnnSelectionMode& o) { void to_json(nlohmann::json& j, const DnnSelectionMode& o) {
j = nlohmann::json(); j = nlohmann::json();
to_json(j, o.m_value);
} }
void from_json(const nlohmann::json& j, DnnSelectionMode& o) {} void from_json(const nlohmann::json& j, DnnSelectionMode& o) {
from_json(j, o.m_value);
}
DnnSelectionMode_anyOf DnnSelectionMode::getValue() const {
return m_value;
}
void DnnSelectionMode::setValue(DnnSelectionMode_anyOf value) {
m_value = value;
}
DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf DnnSelectionMode::getEnumValue()
const {
return m_value.getValue();
}
void DnnSelectionMode::setEnumValue(
DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf value) {
m_value.setValue(value);
}
} // namespace model } // namespace model
} // namespace smf_server } // namespace smf_server
......
/** /**
* Nsmf_PDUSession * Npcf_SMPolicyControl API
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, * Session Management Policy Control Service © 2020, 3GPP Organizational
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Partners (ARIB, ATIS, 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.1.alpha-5
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator * NOTE: This class is auto generated by OpenAPI Generator
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#ifndef DnnSelectionMode_H_ #ifndef DnnSelectionMode_H_
#define DnnSelectionMode_H_ #define DnnSelectionMode_H_
#include "DnnSelectionMode_anyOf.h"
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai {
...@@ -31,21 +32,46 @@ namespace model { ...@@ -31,21 +32,46 @@ namespace model {
class DnnSelectionMode { class DnnSelectionMode {
public: public:
DnnSelectionMode(); DnnSelectionMode();
virtual ~DnnSelectionMode(); virtual ~DnnSelectionMode() = 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;
/// <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 DnnSelectionMode& rhs) const;
bool operator!=(const DnnSelectionMode& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// DnnSelectionMode members /// DnnSelectionMode members
DnnSelectionMode_anyOf getValue() const;
void setValue(DnnSelectionMode_anyOf value);
DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf getEnumValue() const;
void setEnumValue(DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf value);
friend void to_json(nlohmann::json& j, const DnnSelectionMode& o); friend void to_json(nlohmann::json& j, const DnnSelectionMode& o);
friend void from_json(const nlohmann::json& j, DnnSelectionMode& o); friend void from_json(const nlohmann::json& j, DnnSelectionMode& o);
friend void to_json(nlohmann::json& j, const DnnSelectionMode_anyOf& o);
friend void from_json(const nlohmann::json& j, DnnSelectionMode_anyOf& o);
protected: protected:
DnnSelectionMode_anyOf m_value;
}; };
} // namespace model } // namespace model
} // namespace smf_server } // namespace smf_server
} // namespace oai } // namespace oai
#endif /* DnnSelectionMode_H_ */ #endif /* DnnSelectionMode_H_ */
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "DnnSelectionMode_anyOf.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
DnnSelectionMode_anyOf::DnnSelectionMode_anyOf() {}
void DnnSelectionMode_anyOf::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool DnnSelectionMode_anyOf::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool DnnSelectionMode_anyOf::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "DnnSelectionMode_anyOf" : pathPrefix;
if (m_value == DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf::
INVALID_VALUE_OPENAPI_GENERATED) {
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool DnnSelectionMode_anyOf::operator==(
const DnnSelectionMode_anyOf& rhs) const {
return getValue() == rhs.getValue()
;
}
bool DnnSelectionMode_anyOf::operator!=(
const DnnSelectionMode_anyOf& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const DnnSelectionMode_anyOf& o) {
j = nlohmann::json();
switch (o.getValue()) {
case DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf::
INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf::VERIFIED:
j = "VERIFIED";
break;
case DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf::UE_DNN_NOT_VERIFIED:
j = "UE_DNN_NOT_VERIFIED";
break;
case DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf::NW_DNN_NOT_VERIFIED:
j = "NW_DNN_NOT_VERIFIED";
break;
}
}
void from_json(const nlohmann::json& j, DnnSelectionMode_anyOf& o) {
auto s = j.get<std::string>();
if (s == "VERIFIED") {
o.setValue(DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf::VERIFIED);
} else if (s == "UE_DNN_NOT_VERIFIED") {
o.setValue(
DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf::UE_DNN_NOT_VERIFIED);
} else if (s == "NW_DNN_NOT_VERIFIED") {
o.setValue(
DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf::NW_DNN_NOT_VERIFIED);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf";
throw std::invalid_argument(ss.str());
}
}
DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf
DnnSelectionMode_anyOf::getValue() const {
return m_value;
}
void DnnSelectionMode_anyOf::setValue(
DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf value) {
m_value = value;
}
} // namespace model
} // namespace smf_server
} // namespace oai
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* DnnSelectionMode_anyOf.h
*
*
*/
#ifndef DnnSelectionMode_anyOf_H_
#define DnnSelectionMode_anyOf_H_
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class DnnSelectionMode_anyOf {
public:
DnnSelectionMode_anyOf();
virtual ~DnnSelectionMode_anyOf() = default;
enum class eDnnSelectionMode_anyOf {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
VERIFIED,
UE_DNN_NOT_VERIFIED,
NW_DNN_NOT_VERIFIED
};
/// <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 DnnSelectionMode_anyOf& rhs) const;
bool operator!=(const DnnSelectionMode_anyOf& rhs) const;
/////////////////////////////////////////////
/// DnnSelectionMode_anyOf members
DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf getValue() const;
void setValue(DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf value);
friend void to_json(nlohmann::json& j, const DnnSelectionMode_anyOf& o);
friend void from_json(const nlohmann::json& j, DnnSelectionMode_anyOf& o);
protected:
DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf m_value =
DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf::
INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* DnnSelectionMode_anyOf_H_ */
...@@ -27,6 +27,20 @@ void Ecgi::validate() { ...@@ -27,6 +27,20 @@ void Ecgi::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool Ecgi::operator==(const Ecgi& rhs) const {
return
(getPlmnId() == rhs.getPlmnId()) &&
(getEutraCellId() == rhs.getEutraCellId())
;
}
bool Ecgi::operator!=(const Ecgi& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Ecgi& o) { void to_json(nlohmann::json& j, const Ecgi& o) {
j = nlohmann::json(); j = nlohmann::json();
j["plmnId"] = o.m_PlmnId; j["plmnId"] = o.m_PlmnId;
......
...@@ -37,6 +37,9 @@ class Ecgi { ...@@ -37,6 +37,9 @@ class Ecgi {
void validate(); void validate();
bool operator==(const Ecgi& rhs) const;
bool operator!=(const Ecgi& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// Ecgi members /// Ecgi members
......
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "EthFlowDescription.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
EthFlowDescription::EthFlowDescription() {
m_DestMacAddr = "";
m_DestMacAddrIsSet = false;
m_EthType = "";
m_FDesc = "";
m_FDescIsSet = false;
m_FDirIsSet = false;
m_SourceMacAddr = "";
m_SourceMacAddrIsSet = false;
m_VlanTagsIsSet = false;
m_SrcMacAddrEnd = "";
m_SrcMacAddrEndIsSet = false;
m_DestMacAddrEnd = "";
m_DestMacAddrEndIsSet = false;
}
void EthFlowDescription::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool EthFlowDescription::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool EthFlowDescription::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "EthFlowDescription" : pathPrefix;
if (destMacAddrIsSet()) {
const std::string& value = m_DestMacAddr;
const std::string currentValuePath = _pathPrefix + ".destMacAddr";
}
if (sourceMacAddrIsSet()) {
const std::string& value = m_SourceMacAddr;
const std::string currentValuePath = _pathPrefix + ".sourceMacAddr";
}
if (vlanTagsIsSet()) {
const std::vector<std::string>& value = m_VlanTags;
const std::string currentValuePath = _pathPrefix + ".vlanTags";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
if (value.size() > 2) {
success = false;
msg << currentValuePath << ": must have at most 2 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const std::string& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
i++;
}
}
}
if (srcMacAddrEndIsSet()) {
const std::string& value = m_SrcMacAddrEnd;
const std::string currentValuePath = _pathPrefix + ".srcMacAddrEnd";
}
if (destMacAddrEndIsSet()) {
const std::string& value = m_DestMacAddrEnd;
const std::string currentValuePath = _pathPrefix + ".destMacAddrEnd";
}
return success;
}
bool EthFlowDescription::operator==(const EthFlowDescription& rhs) const {
return
((!destMacAddrIsSet() && !rhs.destMacAddrIsSet()) ||
(destMacAddrIsSet() && rhs.destMacAddrIsSet() &&
getDestMacAddr() == rhs.getDestMacAddr())) &&
(getEthType() == rhs.getEthType()) &&
((!fDescIsSet() && !rhs.fDescIsSet()) ||
(fDescIsSet() && rhs.fDescIsSet() && getFDesc() == rhs.getFDesc())) &&
((!fDirIsSet() && !rhs.fDirIsSet()) ||
(fDirIsSet() && rhs.fDirIsSet() && getFDir() == rhs.getFDir())) &&
((!sourceMacAddrIsSet() && !rhs.sourceMacAddrIsSet()) ||
(sourceMacAddrIsSet() && rhs.sourceMacAddrIsSet() &&
getSourceMacAddr() == rhs.getSourceMacAddr())) &&
((!vlanTagsIsSet() && !rhs.vlanTagsIsSet()) ||
(vlanTagsIsSet() && rhs.vlanTagsIsSet() &&
getVlanTags() == rhs.getVlanTags())) &&
((!srcMacAddrEndIsSet() && !rhs.srcMacAddrEndIsSet()) ||
(srcMacAddrEndIsSet() && rhs.srcMacAddrEndIsSet() &&
getSrcMacAddrEnd() == rhs.getSrcMacAddrEnd())) &&
((!destMacAddrEndIsSet() && !rhs.destMacAddrEndIsSet()) ||
(destMacAddrEndIsSet() && rhs.destMacAddrEndIsSet() &&
getDestMacAddrEnd() == rhs.getDestMacAddrEnd()))
;
}
bool EthFlowDescription::operator!=(const EthFlowDescription& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const EthFlowDescription& o) {
j = nlohmann::json();
if (o.destMacAddrIsSet()) j["destMacAddr"] = o.m_DestMacAddr;
j["ethType"] = o.m_EthType;
if (o.fDescIsSet()) j["fDesc"] = o.m_FDesc;
if (o.fDirIsSet()) j["fDir"] = o.m_FDir;
if (o.sourceMacAddrIsSet()) j["sourceMacAddr"] = o.m_SourceMacAddr;
if (o.vlanTagsIsSet() || !o.m_VlanTags.empty()) j["vlanTags"] = o.m_VlanTags;
if (o.srcMacAddrEndIsSet()) j["srcMacAddrEnd"] = o.m_SrcMacAddrEnd;
if (o.destMacAddrEndIsSet()) j["destMacAddrEnd"] = o.m_DestMacAddrEnd;
}
void from_json(const nlohmann::json& j, EthFlowDescription& o) {
if (j.find("destMacAddr") != j.end()) {
j.at("destMacAddr").get_to(o.m_DestMacAddr);
o.m_DestMacAddrIsSet = true;
}
j.at("ethType").get_to(o.m_EthType);
if (j.find("fDesc") != j.end()) {
j.at("fDesc").get_to(o.m_FDesc);
o.m_FDescIsSet = true;
}
if (j.find("fDir") != j.end()) {
j.at("fDir").get_to(o.m_FDir);
o.m_FDirIsSet = true;
}
if (j.find("sourceMacAddr") != j.end()) {
j.at("sourceMacAddr").get_to(o.m_SourceMacAddr);
o.m_SourceMacAddrIsSet = true;
}
if (j.find("vlanTags") != j.end()) {
j.at("vlanTags").get_to(o.m_VlanTags);
o.m_VlanTagsIsSet = true;
}
if (j.find("srcMacAddrEnd") != j.end()) {
j.at("srcMacAddrEnd").get_to(o.m_SrcMacAddrEnd);
o.m_SrcMacAddrEndIsSet = true;
}
if (j.find("destMacAddrEnd") != j.end()) {
j.at("destMacAddrEnd").get_to(o.m_DestMacAddrEnd);
o.m_DestMacAddrEndIsSet = true;
}
}
std::string EthFlowDescription::getDestMacAddr() const {
return m_DestMacAddr;
}
void EthFlowDescription::setDestMacAddr(std::string const& value) {
m_DestMacAddr = value;
m_DestMacAddrIsSet = true;
}
bool EthFlowDescription::destMacAddrIsSet() const {
return m_DestMacAddrIsSet;
}
void EthFlowDescription::unsetDestMacAddr() {
m_DestMacAddrIsSet = false;
}
std::string EthFlowDescription::getEthType() const {
return m_EthType;
}
void EthFlowDescription::setEthType(std::string const& value) {
m_EthType = value;
}
std::string EthFlowDescription::getFDesc() const {
return m_FDesc;
}
void EthFlowDescription::setFDesc(std::string const& value) {
m_FDesc = value;
m_FDescIsSet = true;
}
bool EthFlowDescription::fDescIsSet() const {
return m_FDescIsSet;
}
void EthFlowDescription::unsetFDesc() {
m_FDescIsSet = false;
}
FlowDirection EthFlowDescription::getFDir() const {
return m_FDir;
}
void EthFlowDescription::setFDir(FlowDirection const& value) {
m_FDir = value;
m_FDirIsSet = true;
}
bool EthFlowDescription::fDirIsSet() const {
return m_FDirIsSet;
}
void EthFlowDescription::unsetFDir() {
m_FDirIsSet = false;
}
std::string EthFlowDescription::getSourceMacAddr() const {
return m_SourceMacAddr;
}
void EthFlowDescription::setSourceMacAddr(std::string const& value) {
m_SourceMacAddr = value;
m_SourceMacAddrIsSet = true;
}
bool EthFlowDescription::sourceMacAddrIsSet() const {
return m_SourceMacAddrIsSet;
}
void EthFlowDescription::unsetSourceMacAddr() {
m_SourceMacAddrIsSet = false;
}
std::vector<std::string> EthFlowDescription::getVlanTags() const {
return m_VlanTags;
}
void EthFlowDescription::setVlanTags(std::vector<std::string> const& value) {
m_VlanTags = value;
m_VlanTagsIsSet = true;
}
bool EthFlowDescription::vlanTagsIsSet() const {
return m_VlanTagsIsSet;
}
void EthFlowDescription::unsetVlanTags() {
m_VlanTagsIsSet = false;
}
std::string EthFlowDescription::getSrcMacAddrEnd() const {
return m_SrcMacAddrEnd;
}
void EthFlowDescription::setSrcMacAddrEnd(std::string const& value) {
m_SrcMacAddrEnd = value;
m_SrcMacAddrEndIsSet = true;
}
bool EthFlowDescription::srcMacAddrEndIsSet() const {
return m_SrcMacAddrEndIsSet;
}
void EthFlowDescription::unsetSrcMacAddrEnd() {
m_SrcMacAddrEndIsSet = false;
}
std::string EthFlowDescription::getDestMacAddrEnd() const {
return m_DestMacAddrEnd;
}
void EthFlowDescription::setDestMacAddrEnd(std::string const& value) {
m_DestMacAddrEnd = value;
m_DestMacAddrEndIsSet = true;
}
bool EthFlowDescription::destMacAddrEndIsSet() const {
return m_DestMacAddrEndIsSet;
}
void EthFlowDescription::unsetDestMacAddrEnd() {
m_DestMacAddrEndIsSet = false;
}
} // namespace model
} // namespace smf_server
} // namespace oai
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* EthFlowDescription.h
*
* Identifies an Ethernet flow
*/
#ifndef EthFlowDescription_H_
#define EthFlowDescription_H_
#include "FlowDirection.h"
#include <string>
#include <vector>
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
/// Identifies an Ethernet flow
/// </summary>
class EthFlowDescription {
public:
EthFlowDescription();
virtual ~EthFlowDescription() = 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 EthFlowDescription& rhs) const;
bool operator!=(const EthFlowDescription& rhs) const;
/////////////////////////////////////////////
/// EthFlowDescription members
/// <summary>
///
/// </summary>
std::string getDestMacAddr() const;
void setDestMacAddr(std::string const& value);
bool destMacAddrIsSet() const;
void unsetDestMacAddr();
/// <summary>
///
/// </summary>
std::string getEthType() const;
void setEthType(std::string const& value);
/// <summary>
/// Defines a packet filter of an IP flow.
/// </summary>
std::string getFDesc() const;
void setFDesc(std::string const& value);
bool fDescIsSet() const;
void unsetFDesc();
/// <summary>
///
/// </summary>
FlowDirection getFDir() const;
void setFDir(FlowDirection const& value);
bool fDirIsSet() const;
void unsetFDir();
/// <summary>
///
/// </summary>
std::string getSourceMacAddr() const;
void setSourceMacAddr(std::string const& value);
bool sourceMacAddrIsSet() const;
void unsetSourceMacAddr();
/// <summary>
///
/// </summary>
std::vector<std::string> getVlanTags() const;
void setVlanTags(std::vector<std::string> const& value);
bool vlanTagsIsSet() const;
void unsetVlanTags();
/// <summary>
///
/// </summary>
std::string getSrcMacAddrEnd() const;
void setSrcMacAddrEnd(std::string const& value);
bool srcMacAddrEndIsSet() const;
void unsetSrcMacAddrEnd();
/// <summary>
///
/// </summary>
std::string getDestMacAddrEnd() const;
void setDestMacAddrEnd(std::string const& value);
bool destMacAddrEndIsSet() const;
void unsetDestMacAddrEnd();
friend void to_json(nlohmann::json& j, const EthFlowDescription& o);
friend void from_json(const nlohmann::json& j, EthFlowDescription& o);
protected:
std::string m_DestMacAddr;
bool m_DestMacAddrIsSet;
std::string m_EthType;
std::string m_FDesc;
bool m_FDescIsSet;
FlowDirection m_FDir;
bool m_FDirIsSet;
std::string m_SourceMacAddr;
bool m_SourceMacAddrIsSet;
std::vector<std::string> m_VlanTags;
bool m_VlanTagsIsSet;
std::string m_SrcMacAddrEnd;
bool m_SrcMacAddrEndIsSet;
std::string m_DestMacAddrEnd;
bool m_DestMacAddrEndIsSet;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* EthFlowDescription_H_ */
...@@ -35,6 +35,43 @@ void EutraLocation::validate() { ...@@ -35,6 +35,43 @@ void EutraLocation::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool EutraLocation::operator==(const EutraLocation& rhs) const {
return
(getTai() == rhs.getTai()) &&
(getEcgi() == rhs.getEcgi()) &&
((!ageOfLocationInformationIsSet() &&
!rhs.ageOfLocationInformationIsSet()) ||
(ageOfLocationInformationIsSet() &&
rhs.ageOfLocationInformationIsSet() &&
getAgeOfLocationInformation() == rhs.getAgeOfLocationInformation())) &&
((!ueLocationTimestampIsSet() && !rhs.ueLocationTimestampIsSet()) ||
(ueLocationTimestampIsSet() && rhs.ueLocationTimestampIsSet() &&
getUeLocationTimestamp() == rhs.getUeLocationTimestamp())) &&
((!geographicalInformationIsSet() &&
!rhs.geographicalInformationIsSet()) ||
(geographicalInformationIsSet() && rhs.geographicalInformationIsSet() &&
getGeographicalInformation() == rhs.getGeographicalInformation())) &&
((!geodeticInformationIsSet() && !rhs.geodeticInformationIsSet()) ||
(geodeticInformationIsSet() && rhs.geodeticInformationIsSet() &&
getGeodeticInformation() == rhs.getGeodeticInformation())) &&
((!globalNgenbIdIsSet() && !rhs.globalNgenbIdIsSet()) ||
(globalNgenbIdIsSet() && rhs.globalNgenbIdIsSet() &&
getGlobalNgenbId() == rhs.getGlobalNgenbId()))
;
}
bool EutraLocation::operator!=(const EutraLocation& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const EutraLocation& o) { void to_json(nlohmann::json& j, const EutraLocation& o) {
j = nlohmann::json(); j = nlohmann::json();
j["tai"] = o.m_Tai; j["tai"] = o.m_Tai;
......
...@@ -39,6 +39,9 @@ class EutraLocation { ...@@ -39,6 +39,9 @@ class EutraLocation {
void validate(); void validate();
bool operator==(const EutraLocation& rhs) const;
bool operator!=(const EutraLocation& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// EutraLocation members /// EutraLocation members
......
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "FlowDirection.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
FlowDirection::FlowDirection() {}
void FlowDirection::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool FlowDirection::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool FlowDirection::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "FlowDirection" : pathPrefix;
if (!m_value.validate(msg)) {
success = false;
}
return success;
}
bool FlowDirection::operator==(const FlowDirection& rhs) const {
return
getValue() == rhs.getValue();
}
bool FlowDirection::operator!=(const FlowDirection& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const FlowDirection& o) {
j = nlohmann::json();
to_json(j, o.m_value);
if (o.m_value.getValue() ==
FlowDirection_anyOf::eFlowDirection_anyOf::NULL_VALUE) {
throw std::invalid_argument(
"Could not convert to json: FlowDirection does not allow null values");
}
}
void from_json(const nlohmann::json& j, FlowDirection& o) {
from_json(j, o.m_value);
if (j.is_null()) {
throw std::invalid_argument(
"Could not convert from json: FlowDirection does not allow null "
"values");
}
}
FlowDirection_anyOf FlowDirection::getValue() const {
return m_value;
}
void FlowDirection::setValue(FlowDirection_anyOf value) {
m_value = value;
}
FlowDirection_anyOf::eFlowDirection_anyOf FlowDirection::getEnumValue() const {
return m_value.getValue();
}
void FlowDirection::setEnumValue(
FlowDirection_anyOf::eFlowDirection_anyOf value) {
m_value.setValue(value);
}
} // namespace model
} // namespace smf_server
} // namespace oai
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* FlowDirection.h
*
* Possible values are - DOWNLINK: The corresponding filter applies for traffic
* to the UE. - UPLINK: The corresponding filter applies for traffic from the
* UE. - BIDIRECTIONAL: The corresponding filter applies for traffic both to and
* from the UE. - UNSPECIFIED: The corresponding filter applies for traffic to
* the UE (downlink), but has no specific direction declared. The service data
* flow detection shall apply the filter for uplink traffic as if the filter was
* bidirectional. The PCF shall not use the value UNSPECIFIED in filters created
* by the network in NW-initiated procedures. The PCF shall only include the
* value UNSPECIFIED in filters in UE-initiated procedures if the same value is
* received from the SMF.
*/
#ifndef FlowDirection_H_
#define FlowDirection_H_
#include "FlowDirection_anyOf.h"
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
/// Possible values are - DOWNLINK: The corresponding filter applies for traffic
/// to the UE. - UPLINK: The corresponding filter applies for traffic from the
/// UE. - BIDIRECTIONAL: The corresponding filter applies for traffic both to
/// and from the UE. - UNSPECIFIED: The corresponding filter applies for traffic
/// to the UE (downlink), but has no specific direction declared. The service
/// data flow detection shall apply the filter for uplink traffic as if the
/// filter was bidirectional. The PCF shall not use the value UNSPECIFIED in
/// filters created by the network in NW-initiated procedures. The PCF shall
/// only include the value UNSPECIFIED in filters in UE-initiated procedures if
/// the same value is received from the SMF.
/// </summary>
class FlowDirection {
public:
FlowDirection();
virtual ~FlowDirection() = 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 FlowDirection& rhs) const;
bool operator!=(const FlowDirection& rhs) const;
/////////////////////////////////////////////
/// FlowDirection members
FlowDirection_anyOf getValue() const;
void setValue(FlowDirection_anyOf value);
FlowDirection_anyOf::eFlowDirection_anyOf getEnumValue() const;
void setEnumValue(FlowDirection_anyOf::eFlowDirection_anyOf value);
friend void to_json(nlohmann::json& j, const FlowDirection& o);
friend void from_json(const nlohmann::json& j, FlowDirection& o);
friend void to_json(nlohmann::json& j, const FlowDirection_anyOf& o);
friend void from_json(const nlohmann::json& j, FlowDirection_anyOf& o);
protected:
FlowDirection_anyOf m_value;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* FlowDirection_H_ */
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "FlowDirectionRm.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
FlowDirectionRm::FlowDirectionRm() {}
void FlowDirectionRm::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool FlowDirectionRm::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool FlowDirectionRm::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "FlowDirectionRm" : pathPrefix;
return success;
}
bool FlowDirectionRm::operator==(const FlowDirectionRm& rhs) const {
return getValue() == rhs.getValue();
}
bool FlowDirectionRm::operator!=(const FlowDirectionRm& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const FlowDirectionRm& o) {
j = nlohmann::json();
}
void from_json(const nlohmann::json& j, FlowDirectionRm& o) {}
FlowDirection_anyOf FlowDirectionRm::getValue() const {
return m_value;
}
void FlowDirectionRm::setValue(FlowDirection_anyOf value) {
m_value = value;
}
FlowDirection_anyOf::eFlowDirection_anyOf FlowDirectionRm::getEnumValue()
const {
return m_value.getValue();
}
void FlowDirectionRm::setEnumValue(
FlowDirection_anyOf::eFlowDirection_anyOf value) {
m_value.setValue(value);
}
} // namespace model
} // namespace smf_server
} // namespace oai
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* FlowDirectionRm.h
*
*
*/
#ifndef FlowDirectionRm_H_
#define FlowDirectionRm_H_
#include "FlowDirection.h"
#include "NullValue.h"
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class FlowDirectionRm {
public:
FlowDirectionRm();
virtual ~FlowDirectionRm() = 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 FlowDirectionRm& rhs) const;
bool operator!=(const FlowDirectionRm& rhs) const;
/////////////////////////////////////////////
/// FlowDirectionRm members
FlowDirection_anyOf getValue() const;
void setValue(FlowDirection_anyOf value);
FlowDirection_anyOf::eFlowDirection_anyOf getEnumValue() const;
void setEnumValue(FlowDirection_anyOf::eFlowDirection_anyOf value);
friend void to_json(nlohmann::json& j, const FlowDirectionRm& o);
friend void from_json(const nlohmann::json& j, FlowDirectionRm& o);
protected:
FlowDirection_anyOf m_value;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* FlowDirectionRm_H_ */
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "FlowDirection_anyOf.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
FlowDirection_anyOf::FlowDirection_anyOf() {}
void FlowDirection_anyOf::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool FlowDirection_anyOf::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool FlowDirection_anyOf::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "FlowDirection_anyOf" : pathPrefix;
if (m_value == FlowDirection_anyOf::eFlowDirection_anyOf::
INVALID_VALUE_OPENAPI_GENERATED) {
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool FlowDirection_anyOf::operator==(const FlowDirection_anyOf& rhs) const {
return getValue() == rhs.getValue()
;
}
bool FlowDirection_anyOf::operator!=(const FlowDirection_anyOf& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const FlowDirection_anyOf& o) {
j = nlohmann::json();
switch (o.getValue()) {
case FlowDirection_anyOf::eFlowDirection_anyOf::
INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case FlowDirection_anyOf::eFlowDirection_anyOf::DOWNLINK:
j = "DOWNLINK";
break;
case FlowDirection_anyOf::eFlowDirection_anyOf::UPLINK:
j = "UPLINK";
break;
case FlowDirection_anyOf::eFlowDirection_anyOf::BIDIRECTIONAL:
j = "BIDIRECTIONAL";
break;
case FlowDirection_anyOf::eFlowDirection_anyOf::UNSPECIFIED:
j = "UNSPECIFIED";
break;
case FlowDirection_anyOf::eFlowDirection_anyOf::NULL_VALUE:
j = nullptr;
break;
}
}
void from_json(const nlohmann::json& j, FlowDirection_anyOf& o) {
if (j.is_null()) {
o.setValue(FlowDirection_anyOf::eFlowDirection_anyOf::NULL_VALUE);
return;
}
auto s = j.get<std::string>();
if (s == "DOWNLINK") {
o.setValue(FlowDirection_anyOf::eFlowDirection_anyOf::DOWNLINK);
} else if (s == "UPLINK") {
o.setValue(FlowDirection_anyOf::eFlowDirection_anyOf::UPLINK);
} else if (s == "BIDIRECTIONAL") {
o.setValue(FlowDirection_anyOf::eFlowDirection_anyOf::BIDIRECTIONAL);
} else if (s == "UNSPECIFIED") {
o.setValue(FlowDirection_anyOf::eFlowDirection_anyOf::UNSPECIFIED);
} else if (s == "null") {
o.setValue(FlowDirection_anyOf::eFlowDirection_anyOf::NULL_VALUE);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " FlowDirection_anyOf::eFlowDirection_anyOf";
throw std::invalid_argument(ss.str());
}
}
FlowDirection_anyOf::eFlowDirection_anyOf FlowDirection_anyOf::getValue()
const {
return m_value;
}
void FlowDirection_anyOf::setValue(
FlowDirection_anyOf::eFlowDirection_anyOf value) {
m_value = value;
}
} // namespace model
} // namespace smf_server
} // namespace oai
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* FlowDirection_anyOf.h
*
*
*/
#ifndef FlowDirection_anyOf_H_
#define FlowDirection_anyOf_H_
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class FlowDirection_anyOf {
public:
FlowDirection_anyOf();
virtual ~FlowDirection_anyOf() = default;
enum class eFlowDirection_anyOf {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
NULL_VALUE,
DOWNLINK,
UPLINK,
BIDIRECTIONAL,
UNSPECIFIED
};
/// <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 FlowDirection_anyOf& rhs) const;
bool operator!=(const FlowDirection_anyOf& rhs) const;
/////////////////////////////////////////////
/// FlowDirection_anyOf members
FlowDirection_anyOf::eFlowDirection_anyOf getValue() const;
void setValue(FlowDirection_anyOf::eFlowDirection_anyOf value);
friend void to_json(nlohmann::json& j, const FlowDirection_anyOf& o);
friend void from_json(const nlohmann::json& j, FlowDirection_anyOf& o);
protected:
FlowDirection_anyOf::eFlowDirection_anyOf m_value = FlowDirection_anyOf::
eFlowDirection_anyOf::INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* FlowDirection_anyOf_H_ */
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "FlowInformation.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
FlowInformation::FlowInformation() {
m_FlowDescription = "";
m_FlowDescriptionIsSet = false;
m_EthFlowDescriptionIsSet = false;
m_PackFiltId = "";
m_PackFiltIdIsSet = false;
m_PacketFilterUsage = false;
m_PacketFilterUsageIsSet = false;
m_TosTrafficClass = "";
m_TosTrafficClassIsSet = false;
m_Spi = "";
m_SpiIsSet = false;
m_FlowLabel = "";
m_FlowLabelIsSet = false;
m_FlowDirectionIsSet = false;
}
void FlowInformation::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool FlowInformation::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool FlowInformation::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "FlowInformation" : pathPrefix;
return success;
}
bool FlowInformation::operator==(const FlowInformation& rhs) const {
return
((!flowDescriptionIsSet() && !rhs.flowDescriptionIsSet()) ||
(flowDescriptionIsSet() && rhs.flowDescriptionIsSet() &&
getFlowDescription() == rhs.getFlowDescription())) &&
((!ethFlowDescriptionIsSet() && !rhs.ethFlowDescriptionIsSet()) ||
(ethFlowDescriptionIsSet() && rhs.ethFlowDescriptionIsSet() &&
getEthFlowDescription() == rhs.getEthFlowDescription())) &&
((!packFiltIdIsSet() && !rhs.packFiltIdIsSet()) ||
(packFiltIdIsSet() && rhs.packFiltIdIsSet() &&
getPackFiltId() == rhs.getPackFiltId())) &&
((!packetFilterUsageIsSet() && !rhs.packetFilterUsageIsSet()) ||
(packetFilterUsageIsSet() && rhs.packetFilterUsageIsSet() &&
isPacketFilterUsage() == rhs.isPacketFilterUsage())) &&
((!tosTrafficClassIsSet() && !rhs.tosTrafficClassIsSet()) ||
(tosTrafficClassIsSet() && rhs.tosTrafficClassIsSet() &&
getTosTrafficClass() == rhs.getTosTrafficClass())) &&
((!spiIsSet() && !rhs.spiIsSet()) ||
(spiIsSet() && rhs.spiIsSet() && getSpi() == rhs.getSpi())) &&
((!flowLabelIsSet() && !rhs.flowLabelIsSet()) ||
(flowLabelIsSet() && rhs.flowLabelIsSet() &&
getFlowLabel() == rhs.getFlowLabel())) &&
((!flowDirectionIsSet() && !rhs.flowDirectionIsSet()) ||
(flowDirectionIsSet() && rhs.flowDirectionIsSet() &&
getFlowDirection() == rhs.getFlowDirection()))
;
}
bool FlowInformation::operator!=(const FlowInformation& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const FlowInformation& o) {
j = nlohmann::json();
if (o.flowDescriptionIsSet()) j["flowDescription"] = o.m_FlowDescription;
if (o.ethFlowDescriptionIsSet())
j["ethFlowDescription"] = o.m_EthFlowDescription;
if (o.packFiltIdIsSet()) j["packFiltId"] = o.m_PackFiltId;
if (o.packetFilterUsageIsSet())
j["packetFilterUsage"] = o.m_PacketFilterUsage;
if (o.tosTrafficClassIsSet()) j["tosTrafficClass"] = o.m_TosTrafficClass;
if (o.spiIsSet()) j["spi"] = o.m_Spi;
if (o.flowLabelIsSet()) j["flowLabel"] = o.m_FlowLabel;
if (o.flowDirectionIsSet()) j["flowDirection"] = o.m_FlowDirection;
}
void from_json(const nlohmann::json& j, FlowInformation& o) {
if (j.find("flowDescription") != j.end()) {
j.at("flowDescription").get_to(o.m_FlowDescription);
o.m_FlowDescriptionIsSet = true;
}
if (j.find("ethFlowDescription") != j.end()) {
j.at("ethFlowDescription").get_to(o.m_EthFlowDescription);
o.m_EthFlowDescriptionIsSet = true;
}
if (j.find("packFiltId") != j.end()) {
j.at("packFiltId").get_to(o.m_PackFiltId);
o.m_PackFiltIdIsSet = true;
}
if (j.find("packetFilterUsage") != j.end()) {
j.at("packetFilterUsage").get_to(o.m_PacketFilterUsage);
o.m_PacketFilterUsageIsSet = true;
}
if (j.find("tosTrafficClass") != j.end()) {
j.at("tosTrafficClass").get_to(o.m_TosTrafficClass);
o.m_TosTrafficClassIsSet = true;
}
if (j.find("spi") != j.end()) {
j.at("spi").get_to(o.m_Spi);
o.m_SpiIsSet = true;
}
if (j.find("flowLabel") != j.end()) {
j.at("flowLabel").get_to(o.m_FlowLabel);
o.m_FlowLabelIsSet = true;
}
if (j.find("flowDirection") != j.end()) {
j.at("flowDirection").get_to(o.m_FlowDirection);
o.m_FlowDirectionIsSet = true;
}
}
std::string FlowInformation::getFlowDescription() const {
return m_FlowDescription;
}
void FlowInformation::setFlowDescription(std::string const& value) {
m_FlowDescription = value;
m_FlowDescriptionIsSet = true;
}
bool FlowInformation::flowDescriptionIsSet() const {
return m_FlowDescriptionIsSet;
}
void FlowInformation::unsetFlowDescription() {
m_FlowDescriptionIsSet = false;
}
EthFlowDescription FlowInformation::getEthFlowDescription() const {
return m_EthFlowDescription;
}
void FlowInformation::setEthFlowDescription(EthFlowDescription const& value) {
m_EthFlowDescription = value;
m_EthFlowDescriptionIsSet = true;
}
bool FlowInformation::ethFlowDescriptionIsSet() const {
return m_EthFlowDescriptionIsSet;
}
void FlowInformation::unsetEthFlowDescription() {
m_EthFlowDescriptionIsSet = false;
}
std::string FlowInformation::getPackFiltId() const {
return m_PackFiltId;
}
void FlowInformation::setPackFiltId(std::string const& value) {
m_PackFiltId = value;
m_PackFiltIdIsSet = true;
}
bool FlowInformation::packFiltIdIsSet() const {
return m_PackFiltIdIsSet;
}
void FlowInformation::unsetPackFiltId() {
m_PackFiltIdIsSet = false;
}
bool FlowInformation::isPacketFilterUsage() const {
return m_PacketFilterUsage;
}
void FlowInformation::setPacketFilterUsage(bool const value) {
m_PacketFilterUsage = value;
m_PacketFilterUsageIsSet = true;
}
bool FlowInformation::packetFilterUsageIsSet() const {
return m_PacketFilterUsageIsSet;
}
void FlowInformation::unsetPacketFilterUsage() {
m_PacketFilterUsageIsSet = false;
}
std::string FlowInformation::getTosTrafficClass() const {
return m_TosTrafficClass;
}
void FlowInformation::setTosTrafficClass(std::string const& value) {
m_TosTrafficClass = value;
m_TosTrafficClassIsSet = true;
}
bool FlowInformation::tosTrafficClassIsSet() const {
return m_TosTrafficClassIsSet;
}
void FlowInformation::unsetTosTrafficClass() {
m_TosTrafficClassIsSet = false;
}
std::string FlowInformation::getSpi() const {
return m_Spi;
}
void FlowInformation::setSpi(std::string const& value) {
m_Spi = value;
m_SpiIsSet = true;
}
bool FlowInformation::spiIsSet() const {
return m_SpiIsSet;
}
void FlowInformation::unsetSpi() {
m_SpiIsSet = false;
}
std::string FlowInformation::getFlowLabel() const {
return m_FlowLabel;
}
void FlowInformation::setFlowLabel(std::string const& value) {
m_FlowLabel = value;
m_FlowLabelIsSet = true;
}
bool FlowInformation::flowLabelIsSet() const {
return m_FlowLabelIsSet;
}
void FlowInformation::unsetFlowLabel() {
m_FlowLabelIsSet = false;
}
FlowDirectionRm FlowInformation::getFlowDirection() const {
return m_FlowDirection;
}
void FlowInformation::setFlowDirection(FlowDirectionRm const& value) {
m_FlowDirection = value;
m_FlowDirectionIsSet = true;
}
bool FlowInformation::flowDirectionIsSet() const {
return m_FlowDirectionIsSet;
}
void FlowInformation::unsetFlowDirection() {
m_FlowDirectionIsSet = false;
}
} // namespace model
} // namespace smf_server
} // namespace oai
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* FlowInformation.h
*
*
*/
#ifndef FlowInformation_H_
#define FlowInformation_H_
#include "FlowDirectionRm.h"
#include "EthFlowDescription.h"
#include <string>
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class FlowInformation {
public:
FlowInformation();
virtual ~FlowInformation() = 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 FlowInformation& rhs) const;
bool operator!=(const FlowInformation& rhs) const;
/////////////////////////////////////////////
/// FlowInformation members
/// <summary>
/// Defines a packet filter for an IP flow. Refer to subclause 5.4.2 of 3GPP
/// TS 29.212 for encoding.
/// </summary>
std::string getFlowDescription() const;
void setFlowDescription(std::string const& value);
bool flowDescriptionIsSet() const;
void unsetFlowDescription();
/// <summary>
///
/// </summary>
EthFlowDescription getEthFlowDescription() const;
void setEthFlowDescription(EthFlowDescription const& value);
bool ethFlowDescriptionIsSet() const;
void unsetEthFlowDescription();
/// <summary>
/// An identifier of packet filter.
/// </summary>
std::string getPackFiltId() const;
void setPackFiltId(std::string const& value);
bool packFiltIdIsSet() const;
void unsetPackFiltId();
/// <summary>
/// The packet shall be sent to the UE.
/// </summary>
bool isPacketFilterUsage() const;
void setPacketFilterUsage(bool const value);
bool packetFilterUsageIsSet() const;
void unsetPacketFilterUsage();
/// <summary>
/// Contains the Ipv4 Type-of-Service and mask field or the Ipv6 Traffic-Class
/// field and mask field.
/// </summary>
std::string getTosTrafficClass() const;
void setTosTrafficClass(std::string const& value);
bool tosTrafficClassIsSet() const;
void unsetTosTrafficClass();
/// <summary>
/// the security parameter index of the IPSec packet.
/// </summary>
std::string getSpi() const;
void setSpi(std::string const& value);
bool spiIsSet() const;
void unsetSpi();
/// <summary>
/// the Ipv6 flow label header field.
/// </summary>
std::string getFlowLabel() const;
void setFlowLabel(std::string const& value);
bool flowLabelIsSet() const;
void unsetFlowLabel();
/// <summary>
///
/// </summary>
FlowDirectionRm getFlowDirection() const;
void setFlowDirection(FlowDirectionRm const& value);
bool flowDirectionIsSet() const;
void unsetFlowDirection();
friend void to_json(nlohmann::json& j, const FlowInformation& o);
friend void from_json(const nlohmann::json& j, FlowInformation& o);
protected:
std::string m_FlowDescription;
bool m_FlowDescriptionIsSet;
EthFlowDescription m_EthFlowDescription;
bool m_EthFlowDescriptionIsSet;
std::string m_PackFiltId;
bool m_PackFiltIdIsSet;
bool m_PacketFilterUsage;
bool m_PacketFilterUsageIsSet;
std::string m_TosTrafficClass;
bool m_TosTrafficClassIsSet;
std::string m_Spi;
bool m_SpiIsSet;
std::string m_FlowLabel;
bool m_FlowLabelIsSet;
FlowDirectionRm m_FlowDirection;
bool m_FlowDirectionIsSet;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* FlowInformation_H_ */
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "FlowStatus.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
FlowStatus::FlowStatus() {}
void FlowStatus::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool FlowStatus::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool FlowStatus::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "FlowStatus" : pathPrefix;
if (!m_value.validate(msg)) {
success = false;
}
return success;
}
bool FlowStatus::operator==(const FlowStatus& rhs) const {
return
getValue() == rhs.getValue();
}
bool FlowStatus::operator!=(const FlowStatus& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const FlowStatus& o) {
j = nlohmann::json();
to_json(j, o.m_value);
}
void from_json(const nlohmann::json& j, FlowStatus& o) {
from_json(j, o.m_value);
}
FlowStatus_anyOf FlowStatus::getValue() const {
return m_value;
}
void FlowStatus::setValue(FlowStatus_anyOf value) {
m_value = value;
}
FlowStatus_anyOf::eFlowStatus_anyOf FlowStatus::getEnumValue() const {
return m_value.getValue();
}
void FlowStatus::setEnumValue(FlowStatus_anyOf::eFlowStatus_anyOf value) {
m_value.setValue(value);
}
} // namespace model
} // namespace smf_server
} // namespace oai
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* FlowStatus.h
*
*
*/
#ifndef FlowStatus_H_
#define FlowStatus_H_
#include "FlowStatus_anyOf.h"
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class FlowStatus {
public:
FlowStatus();
virtual ~FlowStatus() = 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 FlowStatus& rhs) const;
bool operator!=(const FlowStatus& rhs) const;
/////////////////////////////////////////////
/// FlowStatus members
FlowStatus_anyOf getValue() const;
void setValue(FlowStatus_anyOf value);
FlowStatus_anyOf::eFlowStatus_anyOf getEnumValue() const;
void setEnumValue(FlowStatus_anyOf::eFlowStatus_anyOf value);
friend void to_json(nlohmann::json& j, const FlowStatus& o);
friend void from_json(const nlohmann::json& j, FlowStatus& o);
friend void to_json(nlohmann::json& j, const FlowStatus_anyOf& o);
friend void from_json(const nlohmann::json& j, FlowStatus_anyOf& o);
protected:
FlowStatus_anyOf m_value;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* FlowStatus_H_ */
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "FlowStatus_anyOf.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
FlowStatus_anyOf::FlowStatus_anyOf() {}
void FlowStatus_anyOf::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool FlowStatus_anyOf::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool FlowStatus_anyOf::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "FlowStatus_anyOf" : pathPrefix;
if (m_value ==
FlowStatus_anyOf::eFlowStatus_anyOf::INVALID_VALUE_OPENAPI_GENERATED) {
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool FlowStatus_anyOf::operator==(const FlowStatus_anyOf& rhs) const {
return getValue() == rhs.getValue()
;
}
bool FlowStatus_anyOf::operator!=(const FlowStatus_anyOf& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const FlowStatus_anyOf& o) {
j = nlohmann::json();
switch (o.getValue()) {
case FlowStatus_anyOf::eFlowStatus_anyOf::INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case FlowStatus_anyOf::eFlowStatus_anyOf::ENABLED_UPLINK:
j = "ENABLED-UPLINK";
break;
case FlowStatus_anyOf::eFlowStatus_anyOf::ENABLED_DOWNLINK:
j = "ENABLED-DOWNLINK";
break;
case FlowStatus_anyOf::eFlowStatus_anyOf::ENABLED:
j = "ENABLED";
break;
case FlowStatus_anyOf::eFlowStatus_anyOf::DISABLED:
j = "DISABLED";
break;
case FlowStatus_anyOf::eFlowStatus_anyOf::REMOVED:
j = "REMOVED";
break;
}
}
void from_json(const nlohmann::json& j, FlowStatus_anyOf& o) {
auto s = j.get<std::string>();
if (s == "ENABLED-UPLINK") {
o.setValue(FlowStatus_anyOf::eFlowStatus_anyOf::ENABLED_UPLINK);
} else if (s == "ENABLED-DOWNLINK") {
o.setValue(FlowStatus_anyOf::eFlowStatus_anyOf::ENABLED_DOWNLINK);
} else if (s == "ENABLED") {
o.setValue(FlowStatus_anyOf::eFlowStatus_anyOf::ENABLED);
} else if (s == "DISABLED") {
o.setValue(FlowStatus_anyOf::eFlowStatus_anyOf::DISABLED);
} else if (s == "REMOVED") {
o.setValue(FlowStatus_anyOf::eFlowStatus_anyOf::REMOVED);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " FlowStatus_anyOf::eFlowStatus_anyOf";
throw std::invalid_argument(ss.str());
}
}
FlowStatus_anyOf::eFlowStatus_anyOf FlowStatus_anyOf::getValue() const {
return m_value;
}
void FlowStatus_anyOf::setValue(FlowStatus_anyOf::eFlowStatus_anyOf value) {
m_value = value;
}
} // namespace model
} // namespace smf_server
} // namespace oai
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* FlowStatus_anyOf.h
*
*
*/
#ifndef FlowStatus_anyOf_H_
#define FlowStatus_anyOf_H_
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class FlowStatus_anyOf {
public:
FlowStatus_anyOf();
virtual ~FlowStatus_anyOf() = default;
enum class eFlowStatus_anyOf {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
ENABLED_UPLINK,
ENABLED_DOWNLINK,
ENABLED,
DISABLED,
REMOVED
};
/// <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 FlowStatus_anyOf& rhs) const;
bool operator!=(const FlowStatus_anyOf& rhs) const;
/////////////////////////////////////////////
/// FlowStatus_anyOf members
FlowStatus_anyOf::eFlowStatus_anyOf getValue() const;
void setValue(FlowStatus_anyOf::eFlowStatus_anyOf value);
friend void to_json(nlohmann::json& j, const FlowStatus_anyOf& o);
friend void from_json(const nlohmann::json& j, FlowStatus_anyOf& o);
protected:
FlowStatus_anyOf::eFlowStatus_anyOf m_value =
FlowStatus_anyOf::eFlowStatus_anyOf::INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* FlowStatus_anyOf_H_ */
...@@ -28,6 +28,20 @@ void GNbId::validate() { ...@@ -28,6 +28,20 @@ void GNbId::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool GNbId::operator==(const GNbId& rhs) const {
return
(getBitLength() == rhs.getBitLength()) &&
(getGNBValue() == rhs.getGNBValue())
;
}
bool GNbId::operator!=(const GNbId& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const GNbId& o) { void to_json(nlohmann::json& j, const GNbId& o) {
j = nlohmann::json(); j = nlohmann::json();
j["bitLength"] = o.m_BitLength; j["bitLength"] = o.m_BitLength;
......
...@@ -36,6 +36,9 @@ class GNbId { ...@@ -36,6 +36,9 @@ class GNbId {
void validate(); void validate();
bool operator==(const GNbId& rhs) const;
bool operator!=(const GNbId& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// GNbId members /// GNbId members
......
...@@ -39,6 +39,43 @@ void GlobalRanNodeId::validate() { ...@@ -39,6 +39,43 @@ void GlobalRanNodeId::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool GlobalRanNodeId::operator==(const GlobalRanNodeId& rhs) const {
return
(getPlmnId() == rhs.getPlmnId()) &&
((!n3IwfIdIsSet() && !rhs.n3IwfIdIsSet()) ||
(n3IwfIdIsSet() && rhs.n3IwfIdIsSet() &&
getN3IwfId() == rhs.getN3IwfId())) &&
((!gNbIdIsSet() && !rhs.gNbIdIsSet()) ||
(gNbIdIsSet() && rhs.gNbIdIsSet() && getGNbId() == rhs.getGNbId())) &&
((!ngeNbIdIsSet() && !rhs.ngeNbIdIsSet()) ||
(ngeNbIdIsSet() && rhs.ngeNbIdIsSet() &&
getNgeNbId() == rhs.getNgeNbId())) &&
((!wagfIdIsSet() && !rhs.wagfIdIsSet()) ||
(wagfIdIsSet() && rhs.wagfIdIsSet() &&
getWagfId() == rhs.getWagfId())) &&
((!tngfIdIsSet() && !rhs.tngfIdIsSet()) ||
(tngfIdIsSet() && rhs.tngfIdIsSet() &&
getTngfId() == rhs.getTngfId())) &&
((!nidIsSet() && !rhs.nidIsSet()) ||
(nidIsSet() && rhs.nidIsSet() && getNid() == rhs.getNid())) &&
((!eNbIdIsSet() && !rhs.eNbIdIsSet()) ||
(eNbIdIsSet() && rhs.eNbIdIsSet() && getENbId() == rhs.getENbId()))
;
}
bool GlobalRanNodeId::operator!=(const GlobalRanNodeId& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const GlobalRanNodeId& o) { void to_json(nlohmann::json& j, const GlobalRanNodeId& o) {
j = nlohmann::json(); j = nlohmann::json();
j["plmnId"] = o.m_PlmnId; j["plmnId"] = o.m_PlmnId;
......
...@@ -38,6 +38,9 @@ class GlobalRanNodeId { ...@@ -38,6 +38,9 @@ class GlobalRanNodeId {
void validate(); void validate();
bool operator==(const GlobalRanNodeId& rhs) const;
bool operator!=(const GlobalRanNodeId& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// GlobalRanNodeId members /// GlobalRanNodeId members
......
...@@ -25,11 +25,29 @@ void Ipv6Addr::validate() { ...@@ -25,11 +25,29 @@ void Ipv6Addr::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool Ipv6Addr::operator==(const Ipv6Addr& rhs) const {
return getIpv6Addr() == rhs.getIpv6Addr();
}
bool Ipv6Addr::operator!=(const Ipv6Addr& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Ipv6Addr& o) { void to_json(nlohmann::json& j, const Ipv6Addr& o) {
j = nlohmann::json(); j = nlohmann::json();
j = o.getIpv6Addr();
} }
void from_json(const nlohmann::json& j, Ipv6Addr& o) {} void from_json(const nlohmann::json& j, Ipv6Addr& o) {
o.setIpv6Addr(j);
}
std::string Ipv6Addr::getIpv6Addr() const {
return m_Ipv6Addr;
}
void Ipv6Addr::setIpv6Addr(std::string const& value) {
m_Ipv6Addr = value;
}
} // namespace model } // namespace model
} // namespace smf_server } // namespace smf_server
......
...@@ -38,10 +38,20 @@ class Ipv6Addr { ...@@ -38,10 +38,20 @@ class Ipv6Addr {
///////////////////////////////////////////// /////////////////////////////////////////////
/// Ipv6Addr members /// Ipv6Addr members
bool operator==(const Ipv6Addr& rhs) const;
bool operator!=(const Ipv6Addr& rhs) const;
/////////////////////////////////////////////
/// Ipv6Addr members
friend void to_json(nlohmann::json& j, const Ipv6Addr& o); friend void to_json(nlohmann::json& j, const Ipv6Addr& o);
friend void from_json(const nlohmann::json& j, Ipv6Addr& o); friend void from_json(const nlohmann::json& j, Ipv6Addr& o);
std::string getIpv6Addr() const;
void setIpv6Addr(std::string const& value);
protected: protected:
std::string m_Ipv6Addr;
}; };
} // namespace model } // namespace model
......
...@@ -34,6 +34,34 @@ void N3gaLocation::validate() { ...@@ -34,6 +34,34 @@ void N3gaLocation::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool N3gaLocation::operator==(const N3gaLocation& rhs) const {
return
((!n3gppTaiIsSet() && !rhs.n3gppTaiIsSet()) ||
(n3gppTaiIsSet() && rhs.n3gppTaiIsSet() &&
getN3gppTai() == rhs.getN3gppTai())) &&
((!n3IwfIdIsSet() && !rhs.n3IwfIdIsSet()) ||
(n3IwfIdIsSet() && rhs.n3IwfIdIsSet() &&
getN3IwfId() == rhs.getN3IwfId())) &&
((!ueIpv4AddrIsSet() && !rhs.ueIpv4AddrIsSet()) ||
(ueIpv4AddrIsSet() && rhs.ueIpv4AddrIsSet() &&
getUeIpv4Addr() == rhs.getUeIpv4Addr())) &&
((!ueIpv6AddrIsSet() && !rhs.ueIpv6AddrIsSet()) ||
(ueIpv6AddrIsSet() && rhs.ueIpv6AddrIsSet() &&
getUeIpv6Addr() == rhs.getUeIpv6Addr())) &&
((!portNumberIsSet() && !rhs.portNumberIsSet()) ||
(portNumberIsSet() && rhs.portNumberIsSet() &&
getPortNumber() == rhs.getPortNumber()));
}
bool N3gaLocation::operator!=(const N3gaLocation& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const N3gaLocation& o) { void to_json(nlohmann::json& j, const N3gaLocation& o) {
j = nlohmann::json(); j = nlohmann::json();
if (o.n3gppTaiIsSet()) j["n3gppTai"] = o.m_N3gppTai; if (o.n3gppTaiIsSet()) j["n3gppTai"] = o.m_N3gppTai;
......
...@@ -37,6 +37,9 @@ class N3gaLocation { ...@@ -37,6 +37,9 @@ class N3gaLocation {
void validate(); void validate();
bool operator==(const N3gaLocation& rhs) const;
bool operator!=(const N3gaLocation& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// N3gaLocation members /// N3gaLocation members
......
...@@ -27,6 +27,16 @@ void Ncgi::validate() { ...@@ -27,6 +27,16 @@ void Ncgi::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool Ncgi::operator==(const Ncgi& rhs) const {
return
(getPlmnId() == rhs.getPlmnId()) &&
(getNrCellId() == rhs.getNrCellId())
;
}
void to_json(nlohmann::json& j, const Ncgi& o) { void to_json(nlohmann::json& j, const Ncgi& o) {
j = nlohmann::json(); j = nlohmann::json();
j["plmnId"] = o.m_PlmnId; j["plmnId"] = o.m_PlmnId;
......
...@@ -37,6 +37,9 @@ class Ncgi { ...@@ -37,6 +37,9 @@ class Ncgi {
void validate(); void validate();
bool operator==(const Ncgi& rhs) const;
bool operator!=(const Ncgi& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// Ncgi members /// Ncgi members
......
...@@ -35,6 +35,43 @@ void NrLocation::validate() { ...@@ -35,6 +35,43 @@ void NrLocation::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool NrLocation::operator==(const NrLocation& rhs) const {
return
(getTai() == rhs.getTai()) &&
(getNcgi() == rhs.getNcgi()) &&
((!ageOfLocationInformationIsSet() &&
!rhs.ageOfLocationInformationIsSet()) ||
(ageOfLocationInformationIsSet() &&
rhs.ageOfLocationInformationIsSet() &&
getAgeOfLocationInformation() == rhs.getAgeOfLocationInformation())) &&
((!ueLocationTimestampIsSet() && !rhs.ueLocationTimestampIsSet()) ||
(ueLocationTimestampIsSet() && rhs.ueLocationTimestampIsSet() &&
getUeLocationTimestamp() == rhs.getUeLocationTimestamp())) &&
((!geographicalInformationIsSet() &&
!rhs.geographicalInformationIsSet()) ||
(geographicalInformationIsSet() && rhs.geographicalInformationIsSet() &&
getGeographicalInformation() == rhs.getGeographicalInformation())) &&
((!geodeticInformationIsSet() && !rhs.geodeticInformationIsSet()) ||
(geodeticInformationIsSet() && rhs.geodeticInformationIsSet() &&
getGeodeticInformation() == rhs.getGeodeticInformation())) &&
((!globalGnbIdIsSet() && !rhs.globalGnbIdIsSet()) ||
(globalGnbIdIsSet() && rhs.globalGnbIdIsSet() &&
getGlobalGnbId() == rhs.getGlobalGnbId()))
;
}
bool NrLocation::operator!=(const NrLocation& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const NrLocation& o) { void to_json(nlohmann::json& j, const NrLocation& o) {
j = nlohmann::json(); j = nlohmann::json();
j["tai"] = o.m_Tai; j["tai"] = o.m_Tai;
......
...@@ -39,6 +39,9 @@ class NrLocation { ...@@ -39,6 +39,9 @@ class NrLocation {
void validate(); void validate();
bool operator==(const NrLocation& rhs) const;
bool operator!=(const NrLocation& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// NrLocation members /// NrLocation members
......
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "NullValue.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
NullValue::NullValue() {}
void NullValue::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool NullValue::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool NullValue::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "NullValue" : pathPrefix;
if (m_value == NullValue::eNullValue::INVALID_VALUE_OPENAPI_GENERATED) {
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool NullValue::operator==(const NullValue& rhs) const {
return getValue() == rhs.getValue()
;
}
bool NullValue::operator!=(const NullValue& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const NullValue& o) {
j = nlohmann::json();
switch (o.getValue()) {
case NullValue::eNullValue::INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case NullValue::eNullValue::NONE:
j = "null";
break;
}
}
void from_json(const nlohmann::json& j, NullValue& o) {
auto s = j.get<std::string>();
if (s == "null") {
o.setValue(NullValue::eNullValue::NONE);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " NullValue::eNullValue";
throw std::invalid_argument(ss.str());
}
}
NullValue::eNullValue NullValue::getValue() const {
return m_value;
}
void NullValue::setValue(NullValue::eNullValue value) {
m_value = value;
}
} // namespace model
} // namespace smf_server
} // namespace oai
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* NullValue.h
*
*
*/
#ifndef NullValue_H_
#define NullValue_H_
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class NullValue {
public:
NullValue();
virtual ~NullValue() = default;
enum class eNullValue {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
NONE
};
/// <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 NullValue& rhs) const;
bool operator!=(const NullValue& rhs) const;
/////////////////////////////////////////////
/// NullValue members
NullValue::eNullValue getValue() const;
void setValue(NullValue::eNullValue value);
friend void to_json(nlohmann::json& j, const NullValue& o);
friend void from_json(const nlohmann::json& j, NullValue& o);
protected:
NullValue::eNullValue m_value =
NullValue::eNullValue::INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* NullValue_H_ */
This diff is collapsed.
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* PccRule.h
*
*
*/
#ifndef PccRule_H_
#define PccRule_H_
//#include "TscaiInputContainer.h"
#include <string>
#include "FlowInformation.h"
//#include "AfSigProtocol.h"
#include <vector>
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class PccRule {
// TODO unsupported values are commented out
public:
PccRule();
virtual ~PccRule() = 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 PccRule& rhs) const;
bool operator!=(const PccRule& rhs) const;
/////////////////////////////////////////////
/// PccRule members
/// <summary>
/// An array of IP flow packet filter information.
/// </summary>
std::vector<FlowInformation> getFlowInfos() const;
void setFlowInfos(std::vector<FlowInformation> const& value);
bool flowInfosIsSet() const;
void unsetFlowInfos();
/// <summary>
/// A reference to the application detection filter configured at the UPF.
/// </summary>
std::string getAppId() const;
void setAppId(std::string const& value);
bool appIdIsSet() const;
void unsetAppId();
/// <summary>
/// Represents the content version of some content.
/// </summary>
int32_t getContVer() const;
void setContVer(int32_t const value);
bool contVerIsSet() const;
void unsetContVer();
/// <summary>
/// Univocally identifies the PCC rule within a PDU session.
/// </summary>
std::string getPccRuleId() const;
void setPccRuleId(std::string const& value);
/// <summary>
///
/// </summary>
int32_t getPrecedence() const;
void setPrecedence(int32_t const value);
bool precedenceIsSet() const;
void unsetPrecedence();
/// <summary>
///
/// </summary>
/*
AfSigProtocol getAfSigProtocol() const;
void setAfSigProtocol(AfSigProtocol const& value);
bool afSigProtocolIsSet() const;
void unsetAfSigProtocol();
*/
/// <summary>
/// Indication of application relocation possibility.
/// </summary>
bool isAppReloc() const;
void setAppReloc(bool const value);
bool appRelocIsSet() const;
void unsetAppReloc();
/// <summary>
/// A reference to the QoSData policy type decision type. It is the qosId
/// described in subclause 5.6.2.8.
/// </summary>
std::vector<std::string> getRefQosData() const;
void setRefQosData(std::vector<std::string> const& value);
bool refQosDataIsSet() const;
void unsetRefQosData();
/// <summary>
/// A Reference to the QoS Data policy decision type for the Alternative QoS
/// parameter sets of the service data flow.
/// </summary>
std::vector<std::string> getRefAltQosParams() const;
void setRefAltQosParams(std::vector<std::string> const& value);
bool refAltQosParamsIsSet() const;
void unsetRefAltQosParams();
/// <summary>
/// A reference to the TrafficControlData policy decision type. It is the tcId
/// described in subclause 5.6.2.10.
/// </summary>
std::vector<std::string> getRefTcData() const;
void setRefTcData(std::vector<std::string> const& value);
bool refTcDataIsSet() const;
void unsetRefTcData();
/// <summary>
/// A reference to the ChargingData policy decision type. It is the chgId
/// described in subclause 5.6.2.11.
/// </summary>
std::vector<std::string> getRefChgData() const;
void setRefChgData(std::vector<std::string> const& value);
bool refChgDataIsSet() const;
void unsetRefChgData();
/// <summary>
/// A reference to the ChargingData policy decision type only applicable to
/// Non-3GPP access if \&quot;ATSSS\&quot; feature is supported. It is the
/// chgId described in subclause 5.6.2.11.
/// </summary>
std::vector<std::string> getRefChgN3gData() const;
void setRefChgN3gData(std::vector<std::string> const& value);
bool refChgN3gDataIsSet() const;
void unsetRefChgN3gData();
/// <summary>
/// A reference to UsageMonitoringData policy decision type. It is the umId
/// described in subclause 5.6.2.12.
/// </summary>
std::vector<std::string> getRefUmData() const;
void setRefUmData(std::vector<std::string> const& value);
bool refUmDataIsSet() const;
void unsetRefUmData();
/// <summary>
/// A reference to UsageMonitoringData policy decision type only applicable to
/// Non-3GPP access if \&quot;ATSSS\&quot; feature is supported. It is the
/// umId described in subclause 5.6.2.12.
/// </summary>
std::vector<std::string> getRefUmN3gData() const;
void setRefUmN3gData(std::vector<std::string> const& value);
bool refUmN3gDataIsSet() const;
void unsetRefUmN3gData();
/// <summary>
/// A reference to the condition data. It is the condId described in
/// subclause 5.6.2.9.
/// </summary>
std::string getRefCondData() const;
void setRefCondData(std::string const& value);
bool refCondDataIsSet() const;
void unsetRefCondData();
/// <summary>
/// A reference to the QosMonitoringData policy type decision type. It is the
/// qmId described in subclause 5.6.2.40.
/// </summary>
std::vector<std::string> getRefQosMon() const;
void setRefQosMon(std::vector<std::string> const& value);
bool refQosMonIsSet() const;
void unsetRefQosMon();
/// <summary>
///
/// </summary>
bool isAddrPreserInd() const;
void setAddrPreserInd(bool const value);
bool addrPreserIndIsSet() const;
void unsetAddrPreserInd();
/// <summary>
///
/// </summary>
/*
TscaiInputContainer getTscaiInputDl() const;
void setTscaiInputDl(TscaiInputContainer const& value);
bool tscaiInputDlIsSet() const;
void unsetTscaiInputDl();
/// <summary>
///
/// </summary>
TscaiInputContainer getTscaiInputUl() const;
void setTscaiInputUl(TscaiInputContainer const& value);
bool tscaiInputUlIsSet() const;
void unsetTscaiInputUl();
*/
friend void to_json(nlohmann::json& j, const PccRule& o);
friend void from_json(const nlohmann::json& j, PccRule& o);
protected:
std::vector<FlowInformation> m_FlowInfos;
bool m_FlowInfosIsSet;
std::string m_AppId;
bool m_AppIdIsSet;
int32_t m_ContVer;
bool m_ContVerIsSet;
std::string m_PccRuleId;
int32_t m_Precedence;
bool m_PrecedenceIsSet;
// AfSigProtocol m_AfSigProtocol;
bool m_AfSigProtocolIsSet;
bool m_AppReloc;
bool m_AppRelocIsSet;
std::vector<std::string> m_RefQosData;
bool m_RefQosDataIsSet;
std::vector<std::string> m_RefAltQosParams;
bool m_RefAltQosParamsIsSet;
std::vector<std::string> m_RefTcData;
bool m_RefTcDataIsSet;
std::vector<std::string> m_RefChgData;
bool m_RefChgDataIsSet;
std::vector<std::string> m_RefChgN3gData;
bool m_RefChgN3gDataIsSet;
std::vector<std::string> m_RefUmData;
bool m_RefUmDataIsSet;
std::vector<std::string> m_RefUmN3gData;
bool m_RefUmN3gDataIsSet;
std::string m_RefCondData;
bool m_RefCondDataIsSet;
std::vector<std::string> m_RefQosMon;
bool m_RefQosMonIsSet;
bool m_AddrPreserInd;
bool m_AddrPreserIndIsSet;
// TscaiInputContainer m_TscaiInputDl;
// bool m_TscaiInputDlIsSet;
// TscaiInputContainer m_TscaiInputUl;
// bool m_TscaiInputUlIsSet;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* PccRule_H_ */
/** /**
* Nsmf_PDUSession * Npcf_SMPolicyControl API
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, * Session Management Policy Control Service © 2020, 3GPP Organizational
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Partners (ARIB, ATIS, 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.1.alpha-5
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator * NOTE: This class is auto generated by OpenAPI Generator
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
*/ */
#include "PduSessionType.h" #include "PduSessionType.h"
#include "Helpers.h"
#include <sstream>
namespace oai { namespace oai {
namespace smf_server { namespace smf_server {
...@@ -19,17 +22,66 @@ namespace model { ...@@ -19,17 +22,66 @@ namespace model {
PduSessionType::PduSessionType() {} PduSessionType::PduSessionType() {}
PduSessionType::~PduSessionType() {} void PduSessionType::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool PduSessionType::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool PduSessionType::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "PduSessionType" : pathPrefix;
if (!m_value.validate(msg)) {
success = false;
}
return success;
}
bool PduSessionType::operator==(const PduSessionType& rhs) const {
return
getValue() == rhs.getValue();
}
void PduSessionType::validate() { bool PduSessionType::operator!=(const PduSessionType& rhs) const {
// TODO: implement validation return !(*this == rhs);
} }
void to_json(nlohmann::json& j, const PduSessionType& o) { void to_json(nlohmann::json& j, const PduSessionType& o) {
j = nlohmann::json(); j = nlohmann::json();
to_json(j, o.m_value);
} }
void from_json(const nlohmann::json& j, PduSessionType& o) {} void from_json(const nlohmann::json& j, PduSessionType& o) {
from_json(j, o.m_value);
}
PduSessionType_anyOf PduSessionType::getValue() const {
return m_value;
}
void PduSessionType::setValue(PduSessionType_anyOf value) {
m_value = value;
}
PduSessionType_anyOf::ePduSessionType_anyOf PduSessionType::getEnumValue()
const {
return m_value.getValue();
}
void PduSessionType::setEnumValue(
PduSessionType_anyOf::ePduSessionType_anyOf value) {
m_value.setValue(value);
}
} // namespace model } // namespace model
} // namespace smf_server } // namespace smf_server
......
/** /**
* Nsmf_PDUSession * Npcf_SMPolicyControl API
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, * Session Management Policy Control Service © 2020, 3GPP Organizational
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Partners (ARIB, ATIS, 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.1.alpha-5
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator * NOTE: This class is auto generated by OpenAPI Generator
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#ifndef PduSessionType_H_ #ifndef PduSessionType_H_
#define PduSessionType_H_ #define PduSessionType_H_
#include "PduSessionType_anyOf.h"
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai {
...@@ -31,17 +32,43 @@ namespace model { ...@@ -31,17 +32,43 @@ namespace model {
class PduSessionType { class PduSessionType {
public: public:
PduSessionType(); PduSessionType();
virtual ~PduSessionType(); virtual ~PduSessionType() = 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;
/// <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 PduSessionType& rhs) const;
bool operator!=(const PduSessionType& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// PduSessionType members /// PduSessionType members
PduSessionType_anyOf getValue() const;
void setValue(PduSessionType_anyOf value);
PduSessionType_anyOf::ePduSessionType_anyOf getEnumValue() const;
void setEnumValue(PduSessionType_anyOf::ePduSessionType_anyOf value);
friend void to_json(nlohmann::json& j, const PduSessionType& o); friend void to_json(nlohmann::json& j, const PduSessionType& o);
friend void from_json(const nlohmann::json& j, PduSessionType& o); friend void from_json(const nlohmann::json& j, PduSessionType& o);
friend void to_json(nlohmann::json& j, const PduSessionType_anyOf& o);
friend void from_json(const nlohmann::json& j, PduSessionType_anyOf& o);
protected: protected:
PduSessionType_anyOf m_value;
}; };
} // namespace model } // namespace model
......
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "PduSessionType_anyOf.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
PduSessionType_anyOf::PduSessionType_anyOf() {}
void PduSessionType_anyOf::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool PduSessionType_anyOf::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool PduSessionType_anyOf::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "PduSessionType_anyOf" : pathPrefix;
if (m_value == PduSessionType_anyOf::ePduSessionType_anyOf::
INVALID_VALUE_OPENAPI_GENERATED) {
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool PduSessionType_anyOf::operator==(const PduSessionType_anyOf& rhs) const {
return getValue() == rhs.getValue()
;
}
bool PduSessionType_anyOf::operator!=(const PduSessionType_anyOf& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const PduSessionType_anyOf& o) {
j = nlohmann::json();
switch (o.getValue()) {
case PduSessionType_anyOf::ePduSessionType_anyOf::
INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case PduSessionType_anyOf::ePduSessionType_anyOf::IPV4:
j = "IPV4";
break;
case PduSessionType_anyOf::ePduSessionType_anyOf::IPV6:
j = "IPV6";
break;
case PduSessionType_anyOf::ePduSessionType_anyOf::IPV4V6:
j = "IPV4V6";
break;
case PduSessionType_anyOf::ePduSessionType_anyOf::UNSTRUCTURED:
j = "UNSTRUCTURED";
break;
case PduSessionType_anyOf::ePduSessionType_anyOf::ETHERNET:
j = "ETHERNET";
break;
}
}
void from_json(const nlohmann::json& j, PduSessionType_anyOf& o) {
auto s = j.get<std::string>();
if (s == "IPV4") {
o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::IPV4);
} else if (s == "IPV6") {
o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::IPV6);
} else if (s == "IPV4V6") {
o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::IPV4V6);
} else if (s == "UNSTRUCTURED") {
o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::UNSTRUCTURED);
} else if (s == "ETHERNET") {
o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::ETHERNET);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " PduSessionType_anyOf::ePduSessionType_anyOf";
throw std::invalid_argument(ss.str());
}
}
PduSessionType_anyOf::ePduSessionType_anyOf PduSessionType_anyOf::getValue()
const {
return m_value;
}
void PduSessionType_anyOf::setValue(
PduSessionType_anyOf::ePduSessionType_anyOf value) {
m_value = value;
}
} // namespace model
} // namespace smf_server
} // namespace oai
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* PduSessionType_anyOf.h
*
*
*/
#ifndef PduSessionType_anyOf_H_
#define PduSessionType_anyOf_H_
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class PduSessionType_anyOf {
public:
PduSessionType_anyOf();
virtual ~PduSessionType_anyOf() = default;
enum class ePduSessionType_anyOf {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
IPV4,
IPV6,
IPV4V6,
UNSTRUCTURED,
ETHERNET
};
/// <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 PduSessionType_anyOf& rhs) const;
bool operator!=(const PduSessionType_anyOf& rhs) const;
/////////////////////////////////////////////
/// PduSessionType_anyOf members
PduSessionType_anyOf::ePduSessionType_anyOf getValue() const;
void setValue(PduSessionType_anyOf::ePduSessionType_anyOf value);
friend void to_json(nlohmann::json& j, const PduSessionType_anyOf& o);
friend void from_json(const nlohmann::json& j, PduSessionType_anyOf& o);
protected:
PduSessionType_anyOf::ePduSessionType_anyOf m_value = PduSessionType_anyOf::
ePduSessionType_anyOf::INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* PduSessionType_anyOf_H_ */
...@@ -28,6 +28,20 @@ void PlmnId::validate() { ...@@ -28,6 +28,20 @@ void PlmnId::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool PlmnId::operator==(const PlmnId& rhs) const {
return
(getMcc() == rhs.getMcc()) &&
(getMnc() == rhs.getMnc())
;
}
bool PlmnId::operator!=(const PlmnId& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const PlmnId& o) { void to_json(nlohmann::json& j, const PlmnId& o) {
j = nlohmann::json(); j = nlohmann::json();
j["mcc"] = o.m_Mcc; j["mcc"] = o.m_Mcc;
......
...@@ -36,6 +36,9 @@ class PlmnId { ...@@ -36,6 +36,9 @@ class PlmnId {
void validate(); void validate();
bool operator==(const PlmnId& rhs) const;
bool operator!=(const PlmnId& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// PlmnId members /// PlmnId members
......
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "PlmnIdNid.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
PlmnIdNid::PlmnIdNid() {
m_Mcc = "";
m_Mnc = "";
m_Nid = "";
m_NidIsSet = false;
}
void PlmnIdNid::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool PlmnIdNid::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool PlmnIdNid::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "PlmnIdNid" : pathPrefix;
/* Mcc */ {
const std::string& value = m_Mcc;
const std::string currentValuePath = _pathPrefix + ".mcc";
}
/* Mnc */ {
const std::string& value = m_Mnc;
const std::string currentValuePath = _pathPrefix + ".mnc";
}
if (nidIsSet()) {
const std::string& value = m_Nid;
const std::string currentValuePath = _pathPrefix + ".nid";
}
return success;
}
bool PlmnIdNid::operator==(const PlmnIdNid& rhs) const {
return
(getMcc() == rhs.getMcc()) &&
(getMnc() == rhs.getMnc()) &&
((!nidIsSet() && !rhs.nidIsSet()) ||
(nidIsSet() && rhs.nidIsSet() && getNid() == rhs.getNid()))
;
}
bool PlmnIdNid::operator!=(const PlmnIdNid& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const PlmnIdNid& o) {
j = nlohmann::json();
j["mcc"] = o.m_Mcc;
j["mnc"] = o.m_Mnc;
if (o.nidIsSet()) j["nid"] = o.m_Nid;
}
void from_json(const nlohmann::json& j, PlmnIdNid& o) {
j.at("mcc").get_to(o.m_Mcc);
j.at("mnc").get_to(o.m_Mnc);
if (j.find("nid") != j.end()) {
j.at("nid").get_to(o.m_Nid);
o.m_NidIsSet = true;
}
}
std::string PlmnIdNid::getMcc() const {
return m_Mcc;
}
void PlmnIdNid::setMcc(std::string const& value) {
m_Mcc = value;
}
std::string PlmnIdNid::getMnc() const {
return m_Mnc;
}
void PlmnIdNid::setMnc(std::string const& value) {
m_Mnc = value;
}
std::string PlmnIdNid::getNid() const {
return m_Nid;
}
void PlmnIdNid::setNid(std::string const& value) {
m_Nid = value;
m_NidIsSet = true;
}
bool PlmnIdNid::nidIsSet() const {
return m_NidIsSet;
}
void PlmnIdNid::unsetNid() {
m_NidIsSet = false;
}
} // namespace model
} // namespace smf_server
} // namespace oai
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* PlmnIdNid.h
*
*
*/
#ifndef PlmnIdNid_H_
#define PlmnIdNid_H_
#include <string>
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class PlmnIdNid {
public:
PlmnIdNid();
virtual ~PlmnIdNid() = 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 PlmnIdNid& rhs) const;
bool operator!=(const PlmnIdNid& rhs) const;
/////////////////////////////////////////////
/// PlmnIdNid members
/// <summary>
///
/// </summary>
std::string getMcc() const;
void setMcc(std::string const& value);
/// <summary>
///
/// </summary>
std::string getMnc() const;
void setMnc(std::string const& value);
/// <summary>
///
/// </summary>
std::string getNid() const;
void setNid(std::string const& value);
bool nidIsSet() const;
void unsetNid();
friend void to_json(nlohmann::json& j, const PlmnIdNid& o);
friend void from_json(const nlohmann::json& j, PlmnIdNid& o);
protected:
std::string m_Mcc;
std::string m_Mnc;
std::string m_Nid;
bool m_NidIsSet;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* PlmnIdNid_H_ */
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "PolicyControlRequestTrigger.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
PolicyControlRequestTrigger::PolicyControlRequestTrigger() {}
void PolicyControlRequestTrigger::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool PolicyControlRequestTrigger::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool PolicyControlRequestTrigger::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "PolicyControlRequestTrigger" : pathPrefix;
if (!m_value.validate(msg)) {
success = false;
}
return success;
}
bool PolicyControlRequestTrigger::operator==(
const PolicyControlRequestTrigger& rhs) const {
return
getValue() == rhs.getValue();
}
bool PolicyControlRequestTrigger::operator!=(
const PolicyControlRequestTrigger& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const PolicyControlRequestTrigger& o) {
j = nlohmann::json();
to_json(j, o.m_value);
}
void from_json(const nlohmann::json& j, PolicyControlRequestTrigger& o) {
from_json(j, o.m_value);
}
PolicyControlRequestTrigger_anyOf PolicyControlRequestTrigger::getValue()
const {
return m_value;
}
void PolicyControlRequestTrigger::setValue(
PolicyControlRequestTrigger_anyOf value) {
m_value = value;
}
PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf
PolicyControlRequestTrigger::getEnumValue() const {
return m_value.getValue();
}
void PolicyControlRequestTrigger::setEnumValue(
PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf
value) {
m_value.setValue(value);
}
} // namespace model
} // namespace smf_server
} // namespace oai
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* PolicyControlRequestTrigger.h
*
* Possible values are - PLMN_CH: PLMN Change - RES_MO_RE: A request for
* resource modification has been received by the SMF. The SMF always reports to
* the PCF. - AC_TY_CH: Access Type Change - UE_IP_CH: UE IP address change. The
* SMF always reports to the PCF. - UE_MAC_CH: A new UE MAC address is detected
* or a used UE MAC address is inactive for a specific period - AN_CH_COR:
* Access Network Charging Correlation Information - US_RE: The PDU Session or
* the Monitoring key specific resources consumed by a UE either reached the
* threshold or needs to be reported for other reasons. - APP_STA: The start of
* application traffic has been detected. - APP_STO: The stop of application
* traffic has been detected. - AN_INFO: Access Network Information report -
* CM_SES_FAIL: Credit management session failure - PS_DA_OFF: The SMF reports
* when the 3GPP PS Data Off status changes. The SMF always reports to the PCF.
* - DEF_QOS_CH: Default QoS Change. The SMF always reports to the PCF. -
* SE_AMBR_CH: Session AMBR Change. The SMF always reports to the PCF. -
* QOS_NOTIF: The SMF notify the PCF when receiving notification from RAN that
* QoS targets of the QoS Flow cannot be guranteed or gurateed again. -
* NO_CREDIT: Out of credit - REALLO_OF_CREDIT: Reallocation of credit - PRA_CH:
* Change of UE presence in Presence Reporting Area - SAREA_CH: Location Change
* with respect to the Serving Area - SCNN_CH: Location Change with respect to
* the Serving CN node - RE_TIMEOUT: Indicates the SMF generated the request
* because there has been a PCC revalidation timeout - RES_RELEASE: Indicate
* that the SMF can inform the PCF of the outcome of the release of resources
* for those rules that require so. - SUCC_RES_ALLO: Indicates that the
* requested rule data is the successful resource allocation. - RAT_TY_CH: RAT
* Type Change. - REF_QOS_IND_CH: Reflective QoS indication Change -
* NUM_OF_PACKET_FILTER: Indicates that the SMF shall report the number of
* supported packet filter for signalled QoS rules - UE_STATUS_RESUME: Indicates
* that the UE’s status is resumed. - UE_TZ_CH: UE Time Zone Change -
* AUTH_PROF_CH: The DN-AAA authorization profile index has changed -
* QOS_MONITORING: Indicate that the SMF notifies the PCF of the QoS Monitoring
* information. - SCELL_CH: Location Change with respect to the Serving Cell.
* Only applicable to the interworking scenario as defined in Annex B. -
* EPS_FALLBACK: EPS Fallback report is enabled in the SMF. - MA_PDU: UE
* Indicates that the SMF notifies the PCF of the MA PDU session request -
* TSN_ETHER_PORT: Manageable Ethernet port detected - TSN_CONTAINER: Port
* management container detected. - 5G_RG_JOIN: The 5G-RG has joined to an IP
* Multicast Group. - 5G_RG_LEAVE: The 5G-RG has left an IP Multicast Group.
*/
#ifndef PolicyControlRequestTrigger_H_
#define PolicyControlRequestTrigger_H_
#include "PolicyControlRequestTrigger_anyOf.h"
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
/// Possible values are - PLMN_CH: PLMN Change - RES_MO_RE: A request for
/// resource modification has been received by the SMF. The SMF always reports
/// to the PCF. - AC_TY_CH: Access Type Change - UE_IP_CH: UE IP address change.
/// The SMF always reports to the PCF. - UE_MAC_CH: A new UE MAC address is
/// detected or a used UE MAC address is inactive for a specific period -
/// AN_CH_COR: Access Network Charging Correlation Information - US_RE: The PDU
/// Session or the Monitoring key specific resources consumed by a UE either
/// reached the threshold or needs to be reported for other reasons. - APP_STA:
/// The start of application traffic has been detected. - APP_STO: The stop of
/// application traffic has been detected. - AN_INFO: Access Network Information
/// report - CM_SES_FAIL: Credit management session failure - PS_DA_OFF: The SMF
/// reports when the 3GPP PS Data Off status changes. The SMF always reports to
/// the PCF. - DEF_QOS_CH: Default QoS Change. The SMF always reports to the
/// PCF. - SE_AMBR_CH: Session AMBR Change. The SMF always reports to the PCF. -
/// QOS_NOTIF: The SMF notify the PCF when receiving notification from RAN that
/// QoS targets of the QoS Flow cannot be guranteed or gurateed again. -
/// NO_CREDIT: Out of credit - REALLO_OF_CREDIT: Reallocation of credit -
/// PRA_CH: Change of UE presence in Presence Reporting Area - SAREA_CH:
/// Location Change with respect to the Serving Area - SCNN_CH: Location Change
/// with respect to the Serving CN node - RE_TIMEOUT: Indicates the SMF
/// generated the request because there has been a PCC revalidation timeout -
/// RES_RELEASE: Indicate that the SMF can inform the PCF of the outcome of the
/// release of resources for those rules that require so. - SUCC_RES_ALLO:
/// Indicates that the requested rule data is the successful resource
/// allocation. - RAT_TY_CH: RAT Type Change. - REF_QOS_IND_CH: Reflective QoS
/// indication Change - NUM_OF_PACKET_FILTER: Indicates that the SMF shall
/// report the number of supported packet filter for signalled QoS rules -
/// UE_STATUS_RESUME: Indicates that the UE’s status is resumed. - UE_TZ_CH: UE
/// Time Zone Change - AUTH_PROF_CH: The DN-AAA authorization profile index has
/// changed - QOS_MONITORING: Indicate that the SMF notifies the PCF of the QoS
/// Monitoring information. - SCELL_CH: Location Change with respect to the
/// Serving Cell. Only applicable to the interworking scenario as defined in
/// Annex B. - EPS_FALLBACK: EPS Fallback report is enabled in the SMF. -
/// MA_PDU: UE Indicates that the SMF notifies the PCF of the MA PDU session
/// request - TSN_ETHER_PORT: Manageable Ethernet port detected - TSN_CONTAINER:
/// Port management container detected. - 5G_RG_JOIN: The 5G-RG has joined to an
/// IP Multicast Group. - 5G_RG_LEAVE: The 5G-RG has left an IP Multicast Group.
/// </summary>
class PolicyControlRequestTrigger {
public:
PolicyControlRequestTrigger();
virtual ~PolicyControlRequestTrigger() = 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 PolicyControlRequestTrigger& rhs) const;
bool operator!=(const PolicyControlRequestTrigger& rhs) const;
/////////////////////////////////////////////
/// PolicyControlRequestTrigger members
PolicyControlRequestTrigger_anyOf getValue() const;
void setValue(PolicyControlRequestTrigger_anyOf value);
PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf
getEnumValue() const;
void setEnumValue(
PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf
value);
friend void to_json(nlohmann::json& j, const PolicyControlRequestTrigger& o);
friend void from_json(
const nlohmann::json& j, PolicyControlRequestTrigger& o);
friend void to_json(
nlohmann::json& j, const PolicyControlRequestTrigger_anyOf& o);
friend void from_json(
const nlohmann::json& j, PolicyControlRequestTrigger_anyOf& o);
protected:
PolicyControlRequestTrigger_anyOf m_value;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* PolicyControlRequestTrigger_H_ */
This diff is collapsed.
/**
* Npcf_SMPolicyControl API
* Session Management Policy Control Service © 2020, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1.alpha-5
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* PolicyControlRequestTrigger_anyOf.h
*
*
*/
#ifndef PolicyControlRequestTrigger_anyOf_H_
#define PolicyControlRequestTrigger_anyOf_H_
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class PolicyControlRequestTrigger_anyOf {
public:
PolicyControlRequestTrigger_anyOf();
virtual ~PolicyControlRequestTrigger_anyOf() = default;
enum class ePolicyControlRequestTrigger_anyOf {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
PLMN_CH,
RES_MO_RE,
AC_TY_CH,
UE_IP_CH,
UE_MAC_CH,
AN_CH_COR,
US_RE,
APP_STA,
APP_STO,
AN_INFO,
CM_SES_FAIL,
PS_DA_OFF,
DEF_QOS_CH,
SE_AMBR_CH,
QOS_NOTIF,
NO_CREDIT,
REALLO_OF_CREDIT,
PRA_CH,
SAREA_CH,
SCNN_CH,
RE_TIMEOUT,
RES_RELEASE,
SUCC_RES_ALLO,
RAT_TY_CH,
REF_QOS_IND_CH,
NUM_OF_PACKET_FILTER,
UE_STATUS_RESUME,
UE_TZ_CH,
AUTH_PROF_CH,
QOS_MONITORING,
SCELL_CH,
EPS_FALLBACK,
MA_PDU,
TSN_ETHER_PORT,
TSN_CONTAINER,
_5G_RG_JOIN,
_5G_RG_LEAVE
};
/// <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 PolicyControlRequestTrigger_anyOf& rhs) const;
bool operator!=(const PolicyControlRequestTrigger_anyOf& rhs) const;
/////////////////////////////////////////////
/// PolicyControlRequestTrigger_anyOf members
PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf
getValue() const;
void setValue(
PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf
value);
friend void to_json(
nlohmann::json& j, const PolicyControlRequestTrigger_anyOf& o);
friend void from_json(
const nlohmann::json& j, PolicyControlRequestTrigger_anyOf& o);
protected:
PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf
m_value = PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* PolicyControlRequestTrigger_anyOf_H_ */
/** /**
* Nsmf_PDUSession * Npcf_SMPolicyControl API
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, * Session Management Policy Control Service © 2020, 3GPP Organizational
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Partners (ARIB, ATIS, 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.1.alpha-5
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator * NOTE: This class is auto generated by OpenAPI Generator
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
*/ */
#include "RatType.h" #include "RatType.h"
#include "Helpers.h"
#include <sstream>
namespace oai { namespace oai {
namespace smf_server { namespace smf_server {
...@@ -19,17 +22,63 @@ namespace model { ...@@ -19,17 +22,63 @@ namespace model {
RatType::RatType() {} RatType::RatType() {}
RatType::~RatType() {} void RatType::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool RatType::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool RatType::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "RatType" : pathPrefix;
if (!m_value.validate(msg)) {
success = false;
}
return success;
}
bool RatType::operator==(const RatType& rhs) const {
return
getValue() == rhs.getValue();
}
void RatType::validate() { bool RatType::operator!=(const RatType& rhs) const {
// TODO: implement validation return !(*this == rhs);
} }
void to_json(nlohmann::json& j, const RatType& o) { void to_json(nlohmann::json& j, const RatType& o) {
j = nlohmann::json(); j = nlohmann::json();
to_json(j, o.m_value);
} }
void from_json(const nlohmann::json& j, RatType& o) {} void from_json(const nlohmann::json& j, RatType& o) {
from_json(j, o.m_value);
}
RatType_anyOf RatType::getValue() const {
return m_value;
}
void RatType::setValue(RatType_anyOf value) {
m_value = value;
}
RatType_anyOf::eRatType_anyOf RatType::getEnumValue() const {
return m_value.getValue();
}
void RatType::setEnumValue(RatType_anyOf::eRatType_anyOf value) {
m_value.setValue(value);
}
} // namespace model } // namespace model
} // namespace smf_server } // namespace smf_server
......
/** /**
* Nsmf_PDUSession * Npcf_SMPolicyControl API
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, * Session Management Policy Control Service © 2020, 3GPP Organizational
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Partners (ARIB, ATIS, 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.1.alpha-5
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator * NOTE: This class is auto generated by OpenAPI Generator
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#ifndef RatType_H_ #ifndef RatType_H_
#define RatType_H_ #define RatType_H_
#include "RatType_anyOf.h"
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
namespace oai { namespace oai {
...@@ -31,21 +32,46 @@ namespace model { ...@@ -31,21 +32,46 @@ namespace model {
class RatType { class RatType {
public: public:
RatType(); RatType();
virtual ~RatType(); virtual ~RatType() = 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;
/// <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 RatType& rhs) const;
bool operator!=(const RatType& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// RatType members /// RatType members
RatType_anyOf getValue() const;
void setValue(RatType_anyOf value);
RatType_anyOf::eRatType_anyOf getEnumValue() const;
void setEnumValue(RatType_anyOf::eRatType_anyOf value);
friend void to_json(nlohmann::json& j, const RatType& o); friend void to_json(nlohmann::json& j, const RatType& o);
friend void from_json(const nlohmann::json& j, RatType& o); friend void from_json(const nlohmann::json& j, RatType& o);
friend void to_json(nlohmann::json& j, const RatType_anyOf& o);
friend void from_json(const nlohmann::json& j, RatType_anyOf& o);
protected: protected:
RatType_anyOf m_value;
}; };
} // namespace model } // namespace model
} // namespace smf_server } // namespace smf_server
} // namespace oai } // namespace oai
#endif /* RatType_H_ */ #endif /* RatType_H_ */
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.
...@@ -30,6 +30,26 @@ void RouteInformation::validate() { ...@@ -30,6 +30,26 @@ void RouteInformation::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool RouteInformation::operator==(const RouteInformation& rhs) const {
return
((!ipv4AddrIsSet() && !rhs.ipv4AddrIsSet()) ||
(ipv4AddrIsSet() && rhs.ipv4AddrIsSet() &&
getIpv4Addr() == rhs.getIpv4Addr())) &&
((!ipv6AddrIsSet() && !rhs.ipv6AddrIsSet()) ||
(ipv6AddrIsSet() && rhs.ipv6AddrIsSet() &&
getIpv6Addr() == rhs.getIpv6Addr())) &&
(getPortNumber() == rhs.getPortNumber())
;
}
bool RouteInformation::operator!=(const RouteInformation& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const RouteInformation& o) { void to_json(nlohmann::json& j, const RouteInformation& o) {
j = nlohmann::json(); j = nlohmann::json();
if (o.ipv4AddrIsSet()) j["ipv4Addr"] = o.m_Ipv4Addr; if (o.ipv4AddrIsSet()) j["ipv4Addr"] = o.m_Ipv4Addr;
......
...@@ -37,6 +37,9 @@ class RouteInformation { ...@@ -37,6 +37,9 @@ class RouteInformation {
void validate(); void validate();
bool operator==(const RouteInformation& rhs) const;
bool operator!=(const RouteInformation& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// RouteInformation members /// RouteInformation members
......
This diff is collapsed.
...@@ -37,6 +37,21 @@ class RouteToLocation { ...@@ -37,6 +37,21 @@ class RouteToLocation {
void validate(); 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;
/// <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 RouteToLocation& rhs) const;
bool operator!=(const RouteToLocation& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// RouteToLocation members /// RouteToLocation members
......
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