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_ */
/**
* 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 "PccRule.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
PccRule::PccRule() {
m_FlowInfosIsSet = false;
m_AppId = "";
m_AppIdIsSet = false;
m_ContVer = 0;
m_ContVerIsSet = false;
m_PccRuleId = "";
m_Precedence = 0;
m_PrecedenceIsSet = false;
// m_AfSigProtocolIsSet = false;
m_AppReloc = false;
m_AppRelocIsSet = false;
m_RefQosDataIsSet = false;
m_RefAltQosParamsIsSet = false;
m_RefTcDataIsSet = false;
m_RefChgDataIsSet = false;
m_RefChgN3gDataIsSet = false;
m_RefUmDataIsSet = false;
m_RefUmN3gDataIsSet = false;
m_RefCondData = "";
m_RefCondDataIsSet = false;
m_RefQosMonIsSet = false;
m_AddrPreserInd = false;
m_AddrPreserIndIsSet = false;
// m_TscaiInputDlIsSet = false;
// m_TscaiInputUlIsSet = false;
}
void PccRule::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool PccRule::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool PccRule::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "PccRule" : pathPrefix;
if (flowInfosIsSet()) {
const std::vector<FlowInformation>& value = m_FlowInfos;
const std::string currentValuePath = _pathPrefix + ".flowInfos";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const FlowInformation& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
success =
value.validate(msg, currentValuePath + ".flowInfos") && success;
i++;
}
}
}
if (precedenceIsSet()) {
const int32_t& value = m_Precedence;
const std::string currentValuePath = _pathPrefix + ".precedence";
if (value < 0) {
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (refQosDataIsSet()) {
const std::vector<std::string>& value = m_RefQosData;
const std::string currentValuePath = _pathPrefix + ".refQosData";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
if (value.size() > 1) {
success = false;
msg << currentValuePath << ": must have at most 1 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 (refAltQosParamsIsSet()) {
const std::vector<std::string>& value = m_RefAltQosParams;
const std::string currentValuePath = _pathPrefix + ".refAltQosParams";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const std::string& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
i++;
}
}
}
if (refTcDataIsSet()) {
const std::vector<std::string>& value = m_RefTcData;
const std::string currentValuePath = _pathPrefix + ".refTcData";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
if (value.size() > 1) {
success = false;
msg << currentValuePath << ": must have at most 1 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 (refChgDataIsSet()) {
const std::vector<std::string>& value = m_RefChgData;
const std::string currentValuePath = _pathPrefix + ".refChgData";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
if (value.size() > 1) {
success = false;
msg << currentValuePath << ": must have at most 1 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 (refChgN3gDataIsSet()) {
const std::vector<std::string>& value = m_RefChgN3gData;
const std::string currentValuePath = _pathPrefix + ".refChgN3gData";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
if (value.size() > 1) {
success = false;
msg << currentValuePath << ": must have at most 1 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 (refUmDataIsSet()) {
const std::vector<std::string>& value = m_RefUmData;
const std::string currentValuePath = _pathPrefix + ".refUmData";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
if (value.size() > 1) {
success = false;
msg << currentValuePath << ": must have at most 1 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 (refUmN3gDataIsSet()) {
const std::vector<std::string>& value = m_RefUmN3gData;
const std::string currentValuePath = _pathPrefix + ".refUmN3gData";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
if (value.size() > 1) {
success = false;
msg << currentValuePath << ": must have at most 1 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 (refQosMonIsSet()) {
const std::vector<std::string>& value = m_RefQosMon;
const std::string currentValuePath = _pathPrefix + ".refQosMon";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
if (value.size() > 1) {
success = false;
msg << currentValuePath << ": must have at most 1 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++;
}
}
}
return success;
}
bool PccRule::operator==(const PccRule& rhs) const {
return
((!flowInfosIsSet() && !rhs.flowInfosIsSet()) ||
(flowInfosIsSet() && rhs.flowInfosIsSet() &&
getFlowInfos() == rhs.getFlowInfos())) &&
((!appIdIsSet() && !rhs.appIdIsSet()) ||
(appIdIsSet() && rhs.appIdIsSet() && getAppId() == rhs.getAppId())) &&
((!contVerIsSet() && !rhs.contVerIsSet()) ||
(contVerIsSet() && rhs.contVerIsSet() &&
getContVer() == rhs.getContVer())) &&
(getPccRuleId() == rhs.getPccRuleId()) &&
((!precedenceIsSet() && !rhs.precedenceIsSet()) ||
(precedenceIsSet() && rhs.precedenceIsSet() &&
getPrecedence() == rhs.getPrecedence())) &&
/*
((!afSigProtocolIsSet() && !rhs.afSigProtocolIsSet()) ||
(afSigProtocolIsSet() && rhs.afSigProtocolIsSet() &&
getAfSigProtocol() == rhs.getAfSigProtocol())) &&
*/
((!appRelocIsSet() && !rhs.appRelocIsSet()) ||
(appRelocIsSet() && rhs.appRelocIsSet() &&
isAppReloc() == rhs.isAppReloc())) &&
((!refQosDataIsSet() && !rhs.refQosDataIsSet()) ||
(refQosDataIsSet() && rhs.refQosDataIsSet() &&
getRefQosData() == rhs.getRefQosData())) &&
((!refAltQosParamsIsSet() && !rhs.refAltQosParamsIsSet()) ||
(refAltQosParamsIsSet() && rhs.refAltQosParamsIsSet() &&
getRefAltQosParams() == rhs.getRefAltQosParams())) &&
((!refTcDataIsSet() && !rhs.refTcDataIsSet()) ||
(refTcDataIsSet() && rhs.refTcDataIsSet() &&
getRefTcData() == rhs.getRefTcData())) &&
((!refChgDataIsSet() && !rhs.refChgDataIsSet()) ||
(refChgDataIsSet() && rhs.refChgDataIsSet() &&
getRefChgData() == rhs.getRefChgData())) &&
((!refChgN3gDataIsSet() && !rhs.refChgN3gDataIsSet()) ||
(refChgN3gDataIsSet() && rhs.refChgN3gDataIsSet() &&
getRefChgN3gData() == rhs.getRefChgN3gData())) &&
((!refUmDataIsSet() && !rhs.refUmDataIsSet()) ||
(refUmDataIsSet() && rhs.refUmDataIsSet() &&
getRefUmData() == rhs.getRefUmData())) &&
((!refUmN3gDataIsSet() && !rhs.refUmN3gDataIsSet()) ||
(refUmN3gDataIsSet() && rhs.refUmN3gDataIsSet() &&
getRefUmN3gData() == rhs.getRefUmN3gData())) &&
((!refCondDataIsSet() && !rhs.refCondDataIsSet()) ||
(refCondDataIsSet() && rhs.refCondDataIsSet() &&
getRefCondData() == rhs.getRefCondData())) &&
((!refQosMonIsSet() && !rhs.refQosMonIsSet()) ||
(refQosMonIsSet() && rhs.refQosMonIsSet() &&
getRefQosMon() == rhs.getRefQosMon())) &&
((!addrPreserIndIsSet() && !rhs.addrPreserIndIsSet()) ||
(addrPreserIndIsSet() && rhs.addrPreserIndIsSet() &&
isAddrPreserInd() == rhs.isAddrPreserInd()))
/*
&&
((!tscaiInputDlIsSet() && !rhs.tscaiInputDlIsSet()) ||
(tscaiInputDlIsSet() && rhs.tscaiInputDlIsSet() &&
getTscaiInputDl() == rhs.getTscaiInputDl())) &&
((!tscaiInputUlIsSet() && !rhs.tscaiInputUlIsSet()) ||
(tscaiInputUlIsSet() && rhs.tscaiInputUlIsSet() &&
getTscaiInputUl() == rhs.getTscaiInputUl()))
*/
;
}
bool PccRule::operator!=(const PccRule& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const PccRule& o) {
j = nlohmann::json();
if (o.flowInfosIsSet() || !o.m_FlowInfos.empty())
j["flowInfos"] = o.m_FlowInfos;
if (o.appIdIsSet()) j["appId"] = o.m_AppId;
if (o.contVerIsSet()) j["contVer"] = o.m_ContVer;
j["pccRuleId"] = o.m_PccRuleId;
if (o.precedenceIsSet()) j["precedence"] = o.m_Precedence;
// if (o.afSigProtocolIsSet()) j["afSigProtocol"] = o.m_AfSigProtocol;
if (o.appRelocIsSet()) j["appReloc"] = o.m_AppReloc;
if (o.refQosDataIsSet() || !o.m_RefQosData.empty())
j["refQosData"] = o.m_RefQosData;
if (o.refAltQosParamsIsSet() || !o.m_RefAltQosParams.empty())
j["refAltQosParams"] = o.m_RefAltQosParams;
if (o.refTcDataIsSet() || !o.m_RefTcData.empty())
j["refTcData"] = o.m_RefTcData;
if (o.refChgDataIsSet() || !o.m_RefChgData.empty())
j["refChgData"] = o.m_RefChgData;
if (o.refChgN3gDataIsSet() || !o.m_RefChgN3gData.empty())
j["refChgN3gData"] = o.m_RefChgN3gData;
if (o.refUmDataIsSet() || !o.m_RefUmData.empty())
j["refUmData"] = o.m_RefUmData;
if (o.refUmN3gDataIsSet() || !o.m_RefUmN3gData.empty())
j["refUmN3gData"] = o.m_RefUmN3gData;
if (o.refCondDataIsSet()) j["refCondData"] = o.m_RefCondData;
if (o.refQosMonIsSet() || !o.m_RefQosMon.empty())
j["refQosMon"] = o.m_RefQosMon;
if (o.addrPreserIndIsSet()) j["addrPreserInd"] = o.m_AddrPreserInd;
// if (o.tscaiInputDlIsSet()) j["tscaiInputDl"] = o.m_TscaiInputDl;
// if (o.tscaiInputUlIsSet()) j["tscaiInputUl"] = o.m_TscaiInputUl;
}
void from_json(const nlohmann::json& j, PccRule& o) {
if (j.find("flowInfos") != j.end()) {
j.at("flowInfos").get_to(o.m_FlowInfos);
o.m_FlowInfosIsSet = true;
}
if (j.find("appId") != j.end()) {
j.at("appId").get_to(o.m_AppId);
o.m_AppIdIsSet = true;
}
if (j.find("contVer") != j.end()) {
j.at("contVer").get_to(o.m_ContVer);
o.m_ContVerIsSet = true;
}
j.at("pccRuleId").get_to(o.m_PccRuleId);
if (j.find("precedence") != j.end()) {
j.at("precedence").get_to(o.m_Precedence);
o.m_PrecedenceIsSet = true;
}
/*
if (j.find("afSigProtocol") != j.end()) {
j.at("afSigProtocol").get_to(o.m_AfSigProtocol);
o.m_AfSigProtocolIsSet = true;
}
*/
if (j.find("appReloc") != j.end()) {
j.at("appReloc").get_to(o.m_AppReloc);
o.m_AppRelocIsSet = true;
}
if (j.find("refQosData") != j.end()) {
j.at("refQosData").get_to(o.m_RefQosData);
o.m_RefQosDataIsSet = true;
}
if (j.find("refAltQosParams") != j.end()) {
j.at("refAltQosParams").get_to(o.m_RefAltQosParams);
o.m_RefAltQosParamsIsSet = true;
}
if (j.find("refTcData") != j.end()) {
j.at("refTcData").get_to(o.m_RefTcData);
o.m_RefTcDataIsSet = true;
}
if (j.find("refChgData") != j.end()) {
j.at("refChgData").get_to(o.m_RefChgData);
o.m_RefChgDataIsSet = true;
}
if (j.find("refChgN3gData") != j.end()) {
j.at("refChgN3gData").get_to(o.m_RefChgN3gData);
o.m_RefChgN3gDataIsSet = true;
}
if (j.find("refUmData") != j.end()) {
j.at("refUmData").get_to(o.m_RefUmData);
o.m_RefUmDataIsSet = true;
}
if (j.find("refUmN3gData") != j.end()) {
j.at("refUmN3gData").get_to(o.m_RefUmN3gData);
o.m_RefUmN3gDataIsSet = true;
}
if (j.find("refCondData") != j.end()) {
j.at("refCondData").get_to(o.m_RefCondData);
o.m_RefCondDataIsSet = true;
}
if (j.find("refQosMon") != j.end()) {
j.at("refQosMon").get_to(o.m_RefQosMon);
o.m_RefQosMonIsSet = true;
}
if (j.find("addrPreserInd") != j.end()) {
j.at("addrPreserInd").get_to(o.m_AddrPreserInd);
o.m_AddrPreserIndIsSet = true;
}
/*
if (j.find("tscaiInputDl") != j.end()) {
j.at("tscaiInputDl").get_to(o.m_TscaiInputDl);
o.m_TscaiInputDlIsSet = true;
}
if (j.find("tscaiInputUl") != j.end()) {
j.at("tscaiInputUl").get_to(o.m_TscaiInputUl);
o.m_TscaiInputUlIsSet = true;
}
*/
}
std::vector<FlowInformation> PccRule::getFlowInfos() const {
return m_FlowInfos;
}
void PccRule::setFlowInfos(std::vector<FlowInformation> const& value) {
m_FlowInfos = value;
m_FlowInfosIsSet = true;
}
bool PccRule::flowInfosIsSet() const {
return m_FlowInfosIsSet;
}
void PccRule::unsetFlowInfos() {
m_FlowInfosIsSet = false;
}
std::string PccRule::getAppId() const {
return m_AppId;
}
void PccRule::setAppId(std::string const& value) {
m_AppId = value;
m_AppIdIsSet = true;
}
bool PccRule::appIdIsSet() const {
return m_AppIdIsSet;
}
void PccRule::unsetAppId() {
m_AppIdIsSet = false;
}
int32_t PccRule::getContVer() const {
return m_ContVer;
}
void PccRule::setContVer(int32_t const value) {
m_ContVer = value;
m_ContVerIsSet = true;
}
bool PccRule::contVerIsSet() const {
return m_ContVerIsSet;
}
void PccRule::unsetContVer() {
m_ContVerIsSet = false;
}
std::string PccRule::getPccRuleId() const {
return m_PccRuleId;
}
void PccRule::setPccRuleId(std::string const& value) {
m_PccRuleId = value;
}
int32_t PccRule::getPrecedence() const {
return m_Precedence;
}
void PccRule::setPrecedence(int32_t const value) {
m_Precedence = value;
m_PrecedenceIsSet = true;
}
bool PccRule::precedenceIsSet() const {
return m_PrecedenceIsSet;
}
void PccRule::unsetPrecedence() {
m_PrecedenceIsSet = false;
}
/*
AfSigProtocol PccRule::getAfSigProtocol() const {
return m_AfSigProtocol;
}
void PccRule::setAfSigProtocol(AfSigProtocol const& value) {
m_AfSigProtocol = value;
m_AfSigProtocolIsSet = true;
}
bool PccRule::afSigProtocolIsSet() const {
return m_AfSigProtocolIsSet;
}
void PccRule::unsetAfSigProtocol() {
m_AfSigProtocolIsSet = false;
}
*/
bool PccRule::isAppReloc() const {
return m_AppReloc;
}
void PccRule::setAppReloc(bool const value) {
m_AppReloc = value;
m_AppRelocIsSet = true;
}
bool PccRule::appRelocIsSet() const {
return m_AppRelocIsSet;
}
void PccRule::unsetAppReloc() {
m_AppRelocIsSet = false;
}
std::vector<std::string> PccRule::getRefQosData() const {
return m_RefQosData;
}
void PccRule::setRefQosData(std::vector<std::string> const& value) {
m_RefQosData = value;
m_RefQosDataIsSet = true;
}
bool PccRule::refQosDataIsSet() const {
return m_RefQosDataIsSet;
}
void PccRule::unsetRefQosData() {
m_RefQosDataIsSet = false;
}
std::vector<std::string> PccRule::getRefAltQosParams() const {
return m_RefAltQosParams;
}
void PccRule::setRefAltQosParams(std::vector<std::string> const& value) {
m_RefAltQosParams = value;
m_RefAltQosParamsIsSet = true;
}
bool PccRule::refAltQosParamsIsSet() const {
return m_RefAltQosParamsIsSet;
}
void PccRule::unsetRefAltQosParams() {
m_RefAltQosParamsIsSet = false;
}
std::vector<std::string> PccRule::getRefTcData() const {
return m_RefTcData;
}
void PccRule::setRefTcData(std::vector<std::string> const& value) {
m_RefTcData = value;
m_RefTcDataIsSet = true;
}
bool PccRule::refTcDataIsSet() const {
return m_RefTcDataIsSet;
}
void PccRule::unsetRefTcData() {
m_RefTcDataIsSet = false;
}
std::vector<std::string> PccRule::getRefChgData() const {
return m_RefChgData;
}
void PccRule::setRefChgData(std::vector<std::string> const& value) {
m_RefChgData = value;
m_RefChgDataIsSet = true;
}
bool PccRule::refChgDataIsSet() const {
return m_RefChgDataIsSet;
}
void PccRule::unsetRefChgData() {
m_RefChgDataIsSet = false;
}
std::vector<std::string> PccRule::getRefChgN3gData() const {
return m_RefChgN3gData;
}
void PccRule::setRefChgN3gData(std::vector<std::string> const& value) {
m_RefChgN3gData = value;
m_RefChgN3gDataIsSet = true;
}
bool PccRule::refChgN3gDataIsSet() const {
return m_RefChgN3gDataIsSet;
}
void PccRule::unsetRefChgN3gData() {
m_RefChgN3gDataIsSet = false;
}
std::vector<std::string> PccRule::getRefUmData() const {
return m_RefUmData;
}
void PccRule::setRefUmData(std::vector<std::string> const& value) {
m_RefUmData = value;
m_RefUmDataIsSet = true;
}
bool PccRule::refUmDataIsSet() const {
return m_RefUmDataIsSet;
}
void PccRule::unsetRefUmData() {
m_RefUmDataIsSet = false;
}
std::vector<std::string> PccRule::getRefUmN3gData() const {
return m_RefUmN3gData;
}
void PccRule::setRefUmN3gData(std::vector<std::string> const& value) {
m_RefUmN3gData = value;
m_RefUmN3gDataIsSet = true;
}
bool PccRule::refUmN3gDataIsSet() const {
return m_RefUmN3gDataIsSet;
}
void PccRule::unsetRefUmN3gData() {
m_RefUmN3gDataIsSet = false;
}
std::string PccRule::getRefCondData() const {
return m_RefCondData;
}
void PccRule::setRefCondData(std::string const& value) {
m_RefCondData = value;
m_RefCondDataIsSet = true;
}
bool PccRule::refCondDataIsSet() const {
return m_RefCondDataIsSet;
}
void PccRule::unsetRefCondData() {
m_RefCondDataIsSet = false;
}
std::vector<std::string> PccRule::getRefQosMon() const {
return m_RefQosMon;
}
void PccRule::setRefQosMon(std::vector<std::string> const& value) {
m_RefQosMon = value;
m_RefQosMonIsSet = true;
}
bool PccRule::refQosMonIsSet() const {
return m_RefQosMonIsSet;
}
void PccRule::unsetRefQosMon() {
m_RefQosMonIsSet = false;
}
bool PccRule::isAddrPreserInd() const {
return m_AddrPreserInd;
}
void PccRule::setAddrPreserInd(bool const value) {
m_AddrPreserInd = value;
m_AddrPreserIndIsSet = true;
}
bool PccRule::addrPreserIndIsSet() const {
return m_AddrPreserIndIsSet;
}
void PccRule::unsetAddrPreserInd() {
m_AddrPreserIndIsSet = false;
}
/*
TscaiInputContainer PccRule::getTscaiInputDl() const {
return m_TscaiInputDl;
}
void PccRule::setTscaiInputDl(TscaiInputContainer const& value) {
m_TscaiInputDl = value;
m_TscaiInputDlIsSet = true;
}
bool PccRule::tscaiInputDlIsSet() const {
return m_TscaiInputDlIsSet;
}
void PccRule::unsetTscaiInputDl() {
m_TscaiInputDlIsSet = false;
}
TscaiInputContainer PccRule::getTscaiInputUl() const {
return m_TscaiInputUl;
}
void PccRule::setTscaiInputUl(TscaiInputContainer const& value) {
m_TscaiInputUl = value;
m_TscaiInputUlIsSet = true;
}
bool PccRule::tscaiInputUlIsSet() const {
return m_TscaiInputUlIsSet;
}
void PccRule::unsetTscaiInputUl() {
m_TscaiInputUlIsSet = 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.
*/
/*
* 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_ */
/**
* 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_anyOf.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
PolicyControlRequestTrigger_anyOf::PolicyControlRequestTrigger_anyOf() {}
void PolicyControlRequestTrigger_anyOf::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool PolicyControlRequestTrigger_anyOf::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool PolicyControlRequestTrigger_anyOf::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "PolicyControlRequestTrigger_anyOf" : pathPrefix;
if (m_value ==
PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
INVALID_VALUE_OPENAPI_GENERATED) {
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool PolicyControlRequestTrigger_anyOf::operator==(
const PolicyControlRequestTrigger_anyOf& rhs) const {
return getValue() == rhs.getValue()
;
}
bool PolicyControlRequestTrigger_anyOf::operator!=(
const PolicyControlRequestTrigger_anyOf& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const PolicyControlRequestTrigger_anyOf& o) {
j = nlohmann::json();
switch (o.getValue()) {
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
PLMN_CH:
j = "PLMN_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
RES_MO_RE:
j = "RES_MO_RE";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
AC_TY_CH:
j = "AC_TY_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
UE_IP_CH:
j = "UE_IP_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
UE_MAC_CH:
j = "UE_MAC_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
AN_CH_COR:
j = "AN_CH_COR";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
US_RE:
j = "US_RE";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
APP_STA:
j = "APP_STA";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
APP_STO:
j = "APP_STO";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
AN_INFO:
j = "AN_INFO";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
CM_SES_FAIL:
j = "CM_SES_FAIL";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
PS_DA_OFF:
j = "PS_DA_OFF";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
DEF_QOS_CH:
j = "DEF_QOS_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
SE_AMBR_CH:
j = "SE_AMBR_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
QOS_NOTIF:
j = "QOS_NOTIF";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
NO_CREDIT:
j = "NO_CREDIT";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
REALLO_OF_CREDIT:
j = "REALLO_OF_CREDIT";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
PRA_CH:
j = "PRA_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
SAREA_CH:
j = "SAREA_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
SCNN_CH:
j = "SCNN_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
RE_TIMEOUT:
j = "RE_TIMEOUT";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
RES_RELEASE:
j = "RES_RELEASE";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
SUCC_RES_ALLO:
j = "SUCC_RES_ALLO";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
RAT_TY_CH:
j = "RAT_TY_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
REF_QOS_IND_CH:
j = "REF_QOS_IND_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
NUM_OF_PACKET_FILTER:
j = "NUM_OF_PACKET_FILTER";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
UE_STATUS_RESUME:
j = "UE_STATUS_RESUME";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
UE_TZ_CH:
j = "UE_TZ_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
AUTH_PROF_CH:
j = "AUTH_PROF_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
QOS_MONITORING:
j = "QOS_MONITORING";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
SCELL_CH:
j = "SCELL_CH";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
EPS_FALLBACK:
j = "EPS_FALLBACK";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
MA_PDU:
j = "MA_PDU";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
TSN_ETHER_PORT:
j = "TSN_ETHER_PORT";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
TSN_CONTAINER:
j = "TSN_CONTAINER";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
_5G_RG_JOIN:
j = "5G_RG_JOIN";
break;
case PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf::
_5G_RG_LEAVE:
j = "5G_RG_LEAVE";
break;
}
}
void from_json(const nlohmann::json& j, PolicyControlRequestTrigger_anyOf& o) {
auto s = j.get<std::string>();
if (s == "PLMN_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::PLMN_CH);
} else if (s == "RES_MO_RE") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::RES_MO_RE);
} else if (s == "AC_TY_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::AC_TY_CH);
} else if (s == "UE_IP_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::UE_IP_CH);
} else if (s == "UE_MAC_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::UE_MAC_CH);
} else if (s == "AN_CH_COR") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::AN_CH_COR);
} else if (s == "US_RE") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::US_RE);
} else if (s == "APP_STA") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::APP_STA);
} else if (s == "APP_STO") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::APP_STO);
} else if (s == "AN_INFO") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::AN_INFO);
} else if (s == "CM_SES_FAIL") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::CM_SES_FAIL);
} else if (s == "PS_DA_OFF") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::PS_DA_OFF);
} else if (s == "DEF_QOS_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::DEF_QOS_CH);
} else if (s == "SE_AMBR_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::SE_AMBR_CH);
} else if (s == "QOS_NOTIF") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::QOS_NOTIF);
} else if (s == "NO_CREDIT") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::NO_CREDIT);
} else if (s == "REALLO_OF_CREDIT") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::REALLO_OF_CREDIT);
} else if (s == "PRA_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::PRA_CH);
} else if (s == "SAREA_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::SAREA_CH);
} else if (s == "SCNN_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::SCNN_CH);
} else if (s == "RE_TIMEOUT") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::RE_TIMEOUT);
} else if (s == "RES_RELEASE") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::RES_RELEASE);
} else if (s == "SUCC_RES_ALLO") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::SUCC_RES_ALLO);
} else if (s == "RAT_TY_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::RAT_TY_CH);
} else if (s == "REF_QOS_IND_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::REF_QOS_IND_CH);
} else if (s == "NUM_OF_PACKET_FILTER") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::NUM_OF_PACKET_FILTER);
} else if (s == "UE_STATUS_RESUME") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::UE_STATUS_RESUME);
} else if (s == "UE_TZ_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::UE_TZ_CH);
} else if (s == "AUTH_PROF_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::AUTH_PROF_CH);
} else if (s == "QOS_MONITORING") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::QOS_MONITORING);
} else if (s == "SCELL_CH") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::SCELL_CH);
} else if (s == "EPS_FALLBACK") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::EPS_FALLBACK);
} else if (s == "MA_PDU") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::MA_PDU);
} else if (s == "TSN_ETHER_PORT") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::TSN_ETHER_PORT);
} else if (s == "TSN_CONTAINER") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::TSN_CONTAINER);
} else if (s == "5G_RG_JOIN") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::_5G_RG_JOIN);
} else if (s == "5G_RG_LEAVE") {
o.setValue(PolicyControlRequestTrigger_anyOf::
ePolicyControlRequestTrigger_anyOf::_5G_RG_LEAVE);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_"
"anyOf";
throw std::invalid_argument(ss.str());
}
}
PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf
PolicyControlRequestTrigger_anyOf::getValue() const {
return m_value;
}
void PolicyControlRequestTrigger_anyOf::setValue(
PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_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.
*/
/*
* 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_ */
/**
* 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 "RatType_anyOf.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
RatType_anyOf::RatType_anyOf() {}
void RatType_anyOf::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool RatType_anyOf::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool RatType_anyOf::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "RatType_anyOf" : pathPrefix;
if (m_value ==
RatType_anyOf::eRatType_anyOf::INVALID_VALUE_OPENAPI_GENERATED) {
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool RatType_anyOf::operator==(const RatType_anyOf& rhs) const {
return getValue() == rhs.getValue()
;
}
bool RatType_anyOf::operator!=(const RatType_anyOf& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const RatType_anyOf& o) {
j = nlohmann::json();
switch (o.getValue()) {
case RatType_anyOf::eRatType_anyOf::INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case RatType_anyOf::eRatType_anyOf::NR:
j = "NR";
break;
case RatType_anyOf::eRatType_anyOf::EUTRA:
j = "EUTRA";
break;
case RatType_anyOf::eRatType_anyOf::WLAN:
j = "WLAN";
break;
case RatType_anyOf::eRatType_anyOf::VIRTUAL:
j = "VIRTUAL";
break;
case RatType_anyOf::eRatType_anyOf::NBIOT:
j = "NBIOT";
break;
case RatType_anyOf::eRatType_anyOf::WIRELINE:
j = "WIRELINE";
break;
case RatType_anyOf::eRatType_anyOf::WIRELINE_CABLE:
j = "WIRELINE_CABLE";
break;
case RatType_anyOf::eRatType_anyOf::WIRELINE_BBF:
j = "WIRELINE_BBF";
break;
case RatType_anyOf::eRatType_anyOf::LTE_M:
j = "LTE-M";
break;
case RatType_anyOf::eRatType_anyOf::NR_U:
j = "NR_U";
break;
case RatType_anyOf::eRatType_anyOf::EUTRA_U:
j = "EUTRA_U";
break;
case RatType_anyOf::eRatType_anyOf::TRUSTED_N3GA:
j = "TRUSTED_N3GA";
break;
case RatType_anyOf::eRatType_anyOf::TRUSTED_WLAN:
j = "TRUSTED_WLAN";
break;
case RatType_anyOf::eRatType_anyOf::UTRA:
j = "UTRA";
break;
case RatType_anyOf::eRatType_anyOf::GERA:
j = "GERA";
break;
}
}
void from_json(const nlohmann::json& j, RatType_anyOf& o) {
auto s = j.get<std::string>();
if (s == "NR") {
o.setValue(RatType_anyOf::eRatType_anyOf::NR);
} else if (s == "EUTRA") {
o.setValue(RatType_anyOf::eRatType_anyOf::EUTRA);
} else if (s == "WLAN") {
o.setValue(RatType_anyOf::eRatType_anyOf::WLAN);
} else if (s == "VIRTUAL") {
o.setValue(RatType_anyOf::eRatType_anyOf::VIRTUAL);
} else if (s == "NBIOT") {
o.setValue(RatType_anyOf::eRatType_anyOf::NBIOT);
} else if (s == "WIRELINE") {
o.setValue(RatType_anyOf::eRatType_anyOf::WIRELINE);
} else if (s == "WIRELINE_CABLE") {
o.setValue(RatType_anyOf::eRatType_anyOf::WIRELINE_CABLE);
} else if (s == "WIRELINE_BBF") {
o.setValue(RatType_anyOf::eRatType_anyOf::WIRELINE_BBF);
} else if (s == "LTE-M") {
o.setValue(RatType_anyOf::eRatType_anyOf::LTE_M);
} else if (s == "NR_U") {
o.setValue(RatType_anyOf::eRatType_anyOf::NR_U);
} else if (s == "EUTRA_U") {
o.setValue(RatType_anyOf::eRatType_anyOf::EUTRA_U);
} else if (s == "TRUSTED_N3GA") {
o.setValue(RatType_anyOf::eRatType_anyOf::TRUSTED_N3GA);
} else if (s == "TRUSTED_WLAN") {
o.setValue(RatType_anyOf::eRatType_anyOf::TRUSTED_WLAN);
} else if (s == "UTRA") {
o.setValue(RatType_anyOf::eRatType_anyOf::UTRA);
} else if (s == "GERA") {
o.setValue(RatType_anyOf::eRatType_anyOf::GERA);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " RatType_anyOf::eRatType_anyOf";
throw std::invalid_argument(ss.str());
}
}
RatType_anyOf::eRatType_anyOf RatType_anyOf::getValue() const {
return m_value;
}
void RatType_anyOf::setValue(RatType_anyOf::eRatType_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.
*/
/*
* RatType_anyOf.h
*
*
*/
#ifndef RatType_anyOf_H_
#define RatType_anyOf_H_
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class RatType_anyOf {
public:
RatType_anyOf();
virtual ~RatType_anyOf() = default;
enum class eRatType_anyOf {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
NR,
EUTRA,
WLAN,
VIRTUAL,
NBIOT,
WIRELINE,
WIRELINE_CABLE,
WIRELINE_BBF,
LTE_M,
NR_U,
EUTRA_U,
TRUSTED_N3GA,
TRUSTED_WLAN,
UTRA,
GERA
};
/// <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_anyOf& rhs) const;
bool operator!=(const RatType_anyOf& rhs) const;
/////////////////////////////////////////////
/// RatType_anyOf members
RatType_anyOf::eRatType_anyOf getValue() const;
void setValue(RatType_anyOf::eRatType_anyOf value);
friend void to_json(nlohmann::json& j, const RatType_anyOf& o);
friend void from_json(const nlohmann::json& j, RatType_anyOf& o);
protected:
RatType_anyOf::eRatType_anyOf m_value =
RatType_anyOf::eRatType_anyOf::INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* RatType_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 "RedirectAddressType.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
RedirectAddressType::RedirectAddressType() {}
void RedirectAddressType::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool RedirectAddressType::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool RedirectAddressType::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "RedirectAddressType" : pathPrefix;
if (!m_value.validate(msg)) {
success = false;
}
return success;
}
bool RedirectAddressType::operator==(const RedirectAddressType& rhs) const {
return
getValue() == rhs.getValue();
}
bool RedirectAddressType::operator!=(const RedirectAddressType& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const RedirectAddressType& o) {
j = nlohmann::json();
to_json(j, o.m_value);
}
void from_json(const nlohmann::json& j, RedirectAddressType& o) {
from_json(j, o.m_value);
}
RedirectAddressType_anyOf RedirectAddressType::getValue() const {
return m_value;
}
void RedirectAddressType::setValue(RedirectAddressType_anyOf value) {
m_value = value;
}
RedirectAddressType_anyOf::eRedirectAddressType_anyOf
RedirectAddressType::getEnumValue() const {
return m_value.getValue();
}
void RedirectAddressType::setEnumValue(
RedirectAddressType_anyOf::eRedirectAddressType_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.
*/
/*
* RedirectAddressType.h
*
* Possible values are - IPV4_ADDR: Indicates that the address type is in the
* form of \&quot;dotted-decimal\&quot; IPv4 address. - IPV6_ADDR: Indicates
* that the address type is in the form of IPv6 address. - URL: Indicates that
* the address type is in the form of Uniform Resource Locator. - SIP_URI:
* Indicates that the address type is in the form of SIP Uniform Resource
* Identifier.
*/
#ifndef RedirectAddressType_H_
#define RedirectAddressType_H_
#include "RedirectAddressType_anyOf.h"
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
/// Possible values are - IPV4_ADDR: Indicates that the address type is in the
/// form of \&quot;dotted-decimal\&quot; IPv4 address. - IPV6_ADDR: Indicates
/// that the address type is in the form of IPv6 address. - URL: Indicates that
/// the address type is in the form of Uniform Resource Locator. - SIP_URI:
/// Indicates that the address type is in the form of SIP Uniform Resource
/// Identifier.
/// </summary>
class RedirectAddressType {
public:
RedirectAddressType();
virtual ~RedirectAddressType() = 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 RedirectAddressType& rhs) const;
bool operator!=(const RedirectAddressType& rhs) const;
/////////////////////////////////////////////
/// RedirectAddressType members
RedirectAddressType_anyOf getValue() const;
void setValue(RedirectAddressType_anyOf value);
RedirectAddressType_anyOf::eRedirectAddressType_anyOf getEnumValue() const;
void setEnumValue(
RedirectAddressType_anyOf::eRedirectAddressType_anyOf value);
friend void to_json(nlohmann::json& j, const RedirectAddressType& o);
friend void from_json(const nlohmann::json& j, RedirectAddressType& o);
friend void to_json(nlohmann::json& j, const RedirectAddressType_anyOf& o);
friend void from_json(const nlohmann::json& j, RedirectAddressType_anyOf& o);
protected:
RedirectAddressType_anyOf m_value;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* RedirectAddressType_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 "RedirectAddressType_anyOf.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
RedirectAddressType_anyOf::RedirectAddressType_anyOf() {}
void RedirectAddressType_anyOf::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool RedirectAddressType_anyOf::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool RedirectAddressType_anyOf::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "RedirectAddressType_anyOf" : pathPrefix;
if (m_value == RedirectAddressType_anyOf::eRedirectAddressType_anyOf::
INVALID_VALUE_OPENAPI_GENERATED) {
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool RedirectAddressType_anyOf::operator==(
const RedirectAddressType_anyOf& rhs) const {
return getValue() == rhs.getValue()
;
}
bool RedirectAddressType_anyOf::operator!=(
const RedirectAddressType_anyOf& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const RedirectAddressType_anyOf& o) {
j = nlohmann::json();
switch (o.getValue()) {
case RedirectAddressType_anyOf::eRedirectAddressType_anyOf::
INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case RedirectAddressType_anyOf::eRedirectAddressType_anyOf::IPV4_ADDR:
j = "IPV4_ADDR";
break;
case RedirectAddressType_anyOf::eRedirectAddressType_anyOf::IPV6_ADDR:
j = "IPV6_ADDR";
break;
case RedirectAddressType_anyOf::eRedirectAddressType_anyOf::URL:
j = "URL";
break;
case RedirectAddressType_anyOf::eRedirectAddressType_anyOf::SIP_URI:
j = "SIP_URI";
break;
}
}
void from_json(const nlohmann::json& j, RedirectAddressType_anyOf& o) {
auto s = j.get<std::string>();
if (s == "IPV4_ADDR") {
o.setValue(
RedirectAddressType_anyOf::eRedirectAddressType_anyOf::IPV4_ADDR);
} else if (s == "IPV6_ADDR") {
o.setValue(
RedirectAddressType_anyOf::eRedirectAddressType_anyOf::IPV6_ADDR);
} else if (s == "URL") {
o.setValue(RedirectAddressType_anyOf::eRedirectAddressType_anyOf::URL);
} else if (s == "SIP_URI") {
o.setValue(RedirectAddressType_anyOf::eRedirectAddressType_anyOf::SIP_URI);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " RedirectAddressType_anyOf::eRedirectAddressType_anyOf";
throw std::invalid_argument(ss.str());
}
}
RedirectAddressType_anyOf::eRedirectAddressType_anyOf
RedirectAddressType_anyOf::getValue() const {
return m_value;
}
void RedirectAddressType_anyOf::setValue(
RedirectAddressType_anyOf::eRedirectAddressType_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.
*/
/*
* RedirectAddressType_anyOf.h
*
*
*/
#ifndef RedirectAddressType_anyOf_H_
#define RedirectAddressType_anyOf_H_
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class RedirectAddressType_anyOf {
public:
RedirectAddressType_anyOf();
virtual ~RedirectAddressType_anyOf() = default;
enum class eRedirectAddressType_anyOf {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
IPV4_ADDR,
IPV6_ADDR,
URL,
SIP_URI
};
/// <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 RedirectAddressType_anyOf& rhs) const;
bool operator!=(const RedirectAddressType_anyOf& rhs) const;
/////////////////////////////////////////////
/// RedirectAddressType_anyOf members
RedirectAddressType_anyOf::eRedirectAddressType_anyOf getValue() const;
void setValue(RedirectAddressType_anyOf::eRedirectAddressType_anyOf value);
friend void to_json(nlohmann::json& j, const RedirectAddressType_anyOf& o);
friend void from_json(const nlohmann::json& j, RedirectAddressType_anyOf& o);
protected:
RedirectAddressType_anyOf::eRedirectAddressType_anyOf m_value =
RedirectAddressType_anyOf::eRedirectAddressType_anyOf::
INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* RedirectAddressType_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 "RedirectInformation.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
RedirectInformation::RedirectInformation() {
m_RedirectEnabled = false;
m_RedirectEnabledIsSet = false;
m_RedirectAddressTypeIsSet = false;
m_RedirectServerAddress = "";
m_RedirectServerAddressIsSet = false;
}
void RedirectInformation::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool RedirectInformation::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool RedirectInformation::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "RedirectInformation" : pathPrefix;
return success;
}
bool RedirectInformation::operator==(const RedirectInformation& rhs) const {
return
((!redirectEnabledIsSet() && !rhs.redirectEnabledIsSet()) ||
(redirectEnabledIsSet() && rhs.redirectEnabledIsSet() &&
isRedirectEnabled() == rhs.isRedirectEnabled())) &&
((!redirectAddressTypeIsSet() && !rhs.redirectAddressTypeIsSet()) ||
(redirectAddressTypeIsSet() && rhs.redirectAddressTypeIsSet() &&
getRedirectAddressType() == rhs.getRedirectAddressType())) &&
((!redirectServerAddressIsSet() && !rhs.redirectServerAddressIsSet()) ||
(redirectServerAddressIsSet() && rhs.redirectServerAddressIsSet() &&
getRedirectServerAddress() == rhs.getRedirectServerAddress()))
;
}
bool RedirectInformation::operator!=(const RedirectInformation& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const RedirectInformation& o) {
j = nlohmann::json();
if (o.redirectEnabledIsSet()) j["redirectEnabled"] = o.m_RedirectEnabled;
if (o.redirectAddressTypeIsSet())
j["redirectAddressType"] = o.m_RedirectAddressType;
if (o.redirectServerAddressIsSet())
j["redirectServerAddress"] = o.m_RedirectServerAddress;
}
void from_json(const nlohmann::json& j, RedirectInformation& o) {
if (j.find("redirectEnabled") != j.end()) {
j.at("redirectEnabled").get_to(o.m_RedirectEnabled);
o.m_RedirectEnabledIsSet = true;
}
if (j.find("redirectAddressType") != j.end()) {
j.at("redirectAddressType").get_to(o.m_RedirectAddressType);
o.m_RedirectAddressTypeIsSet = true;
}
if (j.find("redirectServerAddress") != j.end()) {
j.at("redirectServerAddress").get_to(o.m_RedirectServerAddress);
o.m_RedirectServerAddressIsSet = true;
}
}
bool RedirectInformation::isRedirectEnabled() const {
return m_RedirectEnabled;
}
void RedirectInformation::setRedirectEnabled(bool const value) {
m_RedirectEnabled = value;
m_RedirectEnabledIsSet = true;
}
bool RedirectInformation::redirectEnabledIsSet() const {
return m_RedirectEnabledIsSet;
}
void RedirectInformation::unsetRedirectEnabled() {
m_RedirectEnabledIsSet = false;
}
RedirectAddressType RedirectInformation::getRedirectAddressType() const {
return m_RedirectAddressType;
}
void RedirectInformation::setRedirectAddressType(
RedirectAddressType const& value) {
m_RedirectAddressType = value;
m_RedirectAddressTypeIsSet = true;
}
bool RedirectInformation::redirectAddressTypeIsSet() const {
return m_RedirectAddressTypeIsSet;
}
void RedirectInformation::unsetRedirectAddressType() {
m_RedirectAddressTypeIsSet = false;
}
std::string RedirectInformation::getRedirectServerAddress() const {
return m_RedirectServerAddress;
}
void RedirectInformation::setRedirectServerAddress(std::string const& value) {
m_RedirectServerAddress = value;
m_RedirectServerAddressIsSet = true;
}
bool RedirectInformation::redirectServerAddressIsSet() const {
return m_RedirectServerAddressIsSet;
}
void RedirectInformation::unsetRedirectServerAddress() {
m_RedirectServerAddressIsSet = 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.
*/
/*
* RedirectInformation.h
*
*
*/
#ifndef RedirectInformation_H_
#define RedirectInformation_H_
#include <string>
#include "RedirectAddressType.h"
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class RedirectInformation {
public:
RedirectInformation();
virtual ~RedirectInformation() = 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 RedirectInformation& rhs) const;
bool operator!=(const RedirectInformation& rhs) const;
/////////////////////////////////////////////
/// RedirectInformation members
/// <summary>
/// Indicates the redirect is enable.
/// </summary>
bool isRedirectEnabled() const;
void setRedirectEnabled(bool const value);
bool redirectEnabledIsSet() const;
void unsetRedirectEnabled();
/// <summary>
///
/// </summary>
RedirectAddressType getRedirectAddressType() const;
void setRedirectAddressType(RedirectAddressType const& value);
bool redirectAddressTypeIsSet() const;
void unsetRedirectAddressType();
/// <summary>
/// Indicates the address of the redirect server.
/// </summary>
std::string getRedirectServerAddress() const;
void setRedirectServerAddress(std::string const& value);
bool redirectServerAddressIsSet() const;
void unsetRedirectServerAddress();
friend void to_json(nlohmann::json& j, const RedirectInformation& o);
friend void from_json(const nlohmann::json& j, RedirectInformation& o);
protected:
bool m_RedirectEnabled;
bool m_RedirectEnabledIsSet;
RedirectAddressType m_RedirectAddressType;
bool m_RedirectAddressTypeIsSet;
std::string m_RedirectServerAddress;
bool m_RedirectServerAddressIsSet;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* RedirectInformation_H_ */
...@@ -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
......
...@@ -30,6 +30,39 @@ void RouteToLocation::validate() { ...@@ -30,6 +30,39 @@ void RouteToLocation::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool RouteToLocation::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool RouteToLocation::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "RouteToLocation" : pathPrefix;
return success;
}
bool RouteToLocation::operator==(const RouteToLocation& rhs) const {
return
(getDnai() == rhs.getDnai()) &&
((!routeInfoIsSet() && !rhs.routeInfoIsSet()) ||
(routeInfoIsSet() && rhs.routeInfoIsSet() &&
getRouteInfo() == rhs.getRouteInfo())) &&
((!routeProfIdIsSet() && !rhs.routeProfIdIsSet()) ||
(routeProfIdIsSet() && rhs.routeProfIdIsSet() &&
getRouteProfId() == rhs.getRouteProfId()))
;
}
bool RouteToLocation::operator!=(const RouteToLocation& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const RouteToLocation& o) { void to_json(nlohmann::json& j, const RouteToLocation& o) {
j = nlohmann::json(); j = nlohmann::json();
j["dnai"] = o.m_Dnai; j["dnai"] = o.m_Dnai;
......
...@@ -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
......
/**
* 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 "SmPolicyContextData.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
SmPolicyContextData::SmPolicyContextData() {
// m_AccNetChIdIsSet = false;
// m_ChargEntityAddrIsSet = false;
m_Gpsi = "";
m_GpsiIsSet = false;
m_Supi = "";
m_InterGrpIdsIsSet = false;
m_PduSessionId = 0;
m_Chargingcharacteristics = "";
m_ChargingcharacteristicsIsSet = false;
m_Dnn = "";
m_DnnSelModeIsSet = false;
m_NotificationUri = "";
m_AccessTypeIsSet = false;
m_RatTypeIsSet = false;
// m_AddAccessInfoIsSet = false;
m_ServingNetworkIsSet = false;
m_UserLocationInfoIsSet = false;
m_UeTimeZone = "";
m_UeTimeZoneIsSet = false;
m_Pei = "";
m_PeiIsSet = false;
m_Ipv4Address = "";
m_Ipv4AddressIsSet = false;
// m_Ipv6AddressPrefixIsSet = false;
m_IpDomain = "";
m_IpDomainIsSet = false;
// m_SubsSessAmbrIsSet = false;
m_AuthProfIndex = "";
m_AuthProfIndexIsSet = false;
// m_SubsDefQosIsSet = false;
m_NumOfPackFilter = 0;
m_NumOfPackFilterIsSet = false;
m_Online = false;
m_OnlineIsSet = false;
m_Offline = false;
m_OfflineIsSet = false;
m_r_3gppPsDataOffStatus = false;
m_r_3gppPsDataOffStatusIsSet = false;
m_RefQosIndication = false;
m_RefQosIndicationIsSet = false;
m_TraceReqIsSet = false;
// m_QosFlowUsageIsSet = false;
// m_ServNfIdIsSet = false;
m_SuppFeat = "";
m_SuppFeatIsSet = false;
m_SmfId = "";
m_SmfIdIsSet = false;
m_RecoveryTime = "";
m_RecoveryTimeIsSet = false;
// m_MaPduIndIsSet = false;
// m_AtsssCapabIsSet = false;
}
void SmPolicyContextData::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool SmPolicyContextData::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool SmPolicyContextData::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "SmPolicyContextData" : pathPrefix;
if (gpsiIsSet()) {
const std::string& value = m_Gpsi;
const std::string currentValuePath = _pathPrefix + ".gpsi";
}
/* Supi */ {
const std::string& value = m_Supi;
const std::string currentValuePath = _pathPrefix + ".supi";
}
if (interGrpIdsIsSet()) {
const std::vector<std::string>& value = m_InterGrpIds;
const std::string currentValuePath = _pathPrefix + ".interGrpIds";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const std::string& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
i++;
}
}
}
/* PduSessionId */ {
const int32_t& value = m_PduSessionId;
const std::string currentValuePath = _pathPrefix + ".pduSessionId";
if (value < 0) {
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
if (value > 255) {
success = false;
msg << currentValuePath << ": must be less than or equal to 255;";
}
}
if (peiIsSet()) {
const std::string& value = m_Pei;
const std::string currentValuePath = _pathPrefix + ".pei";
}
if (ipv4AddressIsSet()) {
const std::string& value = m_Ipv4Address;
const std::string currentValuePath = _pathPrefix + ".ipv4Address";
}
if (suppFeatIsSet()) {
const std::string& value = m_SuppFeat;
const std::string currentValuePath = _pathPrefix + ".suppFeat";
}
return success;
}
bool SmPolicyContextData::operator==(const SmPolicyContextData& rhs) const {
return
/*
((!accNetChIdIsSet() && !rhs.accNetChIdIsSet()) ||
(accNetChIdIsSet() && rhs.accNetChIdIsSet() &&
getAccNetChId() == rhs.getAccNetChId())) &&
((!chargEntityAddrIsSet() && !rhs.chargEntityAddrIsSet()) ||
(chargEntityAddrIsSet() && rhs.chargEntityAddrIsSet() &&
getChargEntityAddr() == rhs.getChargEntityAddr())) &&
*/
((!gpsiIsSet() && !rhs.gpsiIsSet()) ||
(gpsiIsSet() && rhs.gpsiIsSet() && getGpsi() == rhs.getGpsi())) &&
(getSupi() == rhs.getSupi()) &&
((!interGrpIdsIsSet() && !rhs.interGrpIdsIsSet()) ||
(interGrpIdsIsSet() && rhs.interGrpIdsIsSet() &&
getInterGrpIds() == rhs.getInterGrpIds())) &&
(getPduSessionId() == rhs.getPduSessionId()) &&
(getPduSessionType() == rhs.getPduSessionType()) &&
((!chargingcharacteristicsIsSet() &&
!rhs.chargingcharacteristicsIsSet()) ||
(chargingcharacteristicsIsSet() && rhs.chargingcharacteristicsIsSet() &&
getChargingcharacteristics() == rhs.getChargingcharacteristics())) &&
(getDnn() == rhs.getDnn()) &&
((!dnnSelModeIsSet() && !rhs.dnnSelModeIsSet()) ||
(dnnSelModeIsSet() && rhs.dnnSelModeIsSet() &&
getDnnSelMode() == rhs.getDnnSelMode())) &&
(getNotificationUri() == rhs.getNotificationUri()) &&
((!accessTypeIsSet() && !rhs.accessTypeIsSet()) ||
(accessTypeIsSet() && rhs.accessTypeIsSet() &&
getAccessType() == rhs.getAccessType())) &&
((!ratTypeIsSet() && !rhs.ratTypeIsSet()) ||
(ratTypeIsSet() && rhs.ratTypeIsSet() &&
getRatType() == rhs.getRatType())) &&
/*
((!addAccessInfoIsSet() && !rhs.addAccessInfoIsSet()) ||
(addAccessInfoIsSet() && rhs.addAccessInfoIsSet() &&
getAddAccessInfo() == rhs.getAddAccessInfo())) &&
*/
((!servingNetworkIsSet() && !rhs.servingNetworkIsSet()) ||
(servingNetworkIsSet() && rhs.servingNetworkIsSet() &&
getServingNetwork() == rhs.getServingNetwork())) &&
((!userLocationInfoIsSet() && !rhs.userLocationInfoIsSet()) ||
(userLocationInfoIsSet() && rhs.userLocationInfoIsSet() &&
getUserLocationInfo() == rhs.getUserLocationInfo())) &&
((!ueTimeZoneIsSet() && !rhs.ueTimeZoneIsSet()) ||
(ueTimeZoneIsSet() && rhs.ueTimeZoneIsSet() &&
getUeTimeZone() == rhs.getUeTimeZone())) &&
((!peiIsSet() && !rhs.peiIsSet()) ||
(peiIsSet() && rhs.peiIsSet() && getPei() == rhs.getPei())) &&
((!ipv4AddressIsSet() && !rhs.ipv4AddressIsSet()) ||
(ipv4AddressIsSet() && rhs.ipv4AddressIsSet() &&
getIpv4Address() == rhs.getIpv4Address())) &&
/*
((!ipv6AddressPrefixIsSet() && !rhs.ipv6AddressPrefixIsSet()) ||
(ipv6AddressPrefixIsSet() && rhs.ipv6AddressPrefixIsSet() &&
getIpv6AddressPrefix() == rhs.getIpv6AddressPrefix())) &&
*/
((!ipDomainIsSet() && !rhs.ipDomainIsSet()) ||
(ipDomainIsSet() && rhs.ipDomainIsSet() &&
getIpDomain() == rhs.getIpDomain())) &&
/*
((!subsSessAmbrIsSet() && !rhs.subsSessAmbrIsSet()) ||
(subsSessAmbrIsSet() && rhs.subsSessAmbrIsSet() &&
getSubsSessAmbr() == rhs.getSubsSessAmbr())) &&
*/
((!authProfIndexIsSet() && !rhs.authProfIndexIsSet()) ||
(authProfIndexIsSet() && rhs.authProfIndexIsSet() &&
getAuthProfIndex() == rhs.getAuthProfIndex())) &&
/*
((!subsDefQosIsSet() && !rhs.subsDefQosIsSet()) ||
(subsDefQosIsSet() && rhs.subsDefQosIsSet() &&
getSubsDefQos() == rhs.getSubsDefQos())) &&
*/
((!numOfPackFilterIsSet() && !rhs.numOfPackFilterIsSet()) ||
(numOfPackFilterIsSet() && rhs.numOfPackFilterIsSet() &&
getNumOfPackFilter() == rhs.getNumOfPackFilter())) &&
((!onlineIsSet() && !rhs.onlineIsSet()) ||
(onlineIsSet() && rhs.onlineIsSet() && isOnline() == rhs.isOnline())) &&
((!offlineIsSet() && !rhs.offlineIsSet()) ||
(offlineIsSet() && rhs.offlineIsSet() &&
isOffline() == rhs.isOffline())) &&
((!r3gppPsDataOffStatusIsSet() && !rhs.r3gppPsDataOffStatusIsSet()) ||
(r3gppPsDataOffStatusIsSet() && rhs.r3gppPsDataOffStatusIsSet() &&
isR3gppPsDataOffStatus() == rhs.isR3gppPsDataOffStatus())) &&
((!refQosIndicationIsSet() && !rhs.refQosIndicationIsSet()) ||
(refQosIndicationIsSet() && rhs.refQosIndicationIsSet() &&
isRefQosIndication() == rhs.isRefQosIndication())) &&
((!traceReqIsSet() && !rhs.traceReqIsSet()) ||
(traceReqIsSet() && rhs.traceReqIsSet() &&
getTraceReq() == rhs.getTraceReq())) &&
(getSliceInfo() == rhs.getSliceInfo()) &&
/*
((!qosFlowUsageIsSet() && !rhs.qosFlowUsageIsSet()) ||
(qosFlowUsageIsSet() && rhs.qosFlowUsageIsSet() &&
getQosFlowUsage() == rhs.getQosFlowUsage())) &&
((!servNfIdIsSet() && !rhs.servNfIdIsSet()) ||
(servNfIdIsSet() && rhs.servNfIdIsSet() &&
getServNfId() == rhs.getServNfId())) &&
*/
((!suppFeatIsSet() && !rhs.suppFeatIsSet()) ||
(suppFeatIsSet() && rhs.suppFeatIsSet() &&
getSuppFeat() == rhs.getSuppFeat())) &&
((!smfIdIsSet() && !rhs.smfIdIsSet()) ||
(smfIdIsSet() && rhs.smfIdIsSet() && getSmfId() == rhs.getSmfId())) &&
((!recoveryTimeIsSet() && !rhs.recoveryTimeIsSet()) ||
(recoveryTimeIsSet() && rhs.recoveryTimeIsSet() &&
getRecoveryTime() == rhs.getRecoveryTime()))
/*
&&
((!maPduIndIsSet() && !rhs.maPduIndIsSet()) ||
(maPduIndIsSet() && rhs.maPduIndIsSet() &&
getMaPduInd() == rhs.getMaPduInd())) &&
((!atsssCapabIsSet() && !rhs.atsssCapabIsSet()) ||
(atsssCapabIsSet() && rhs.atsssCapabIsSet() &&
getAtsssCapab() == rhs.getAtsssCapab()))
*/
;
}
bool SmPolicyContextData::operator!=(const SmPolicyContextData& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const SmPolicyContextData& o) {
j = nlohmann::json();
// if (o.accNetChIdIsSet()) j["accNetChId"] = o.m_AccNetChId;
// if (o.chargEntityAddrIsSet()) j["chargEntityAddr"] = o.m_ChargEntityAddr;
if (o.gpsiIsSet()) j["gpsi"] = o.m_Gpsi;
j["supi"] = o.m_Supi;
if (o.interGrpIdsIsSet() || !o.m_InterGrpIds.empty())
j["interGrpIds"] = o.m_InterGrpIds;
j["pduSessionId"] = o.m_PduSessionId;
j["pduSessionType"] = o.m_PduSessionType;
if (o.chargingcharacteristicsIsSet())
j["chargingcharacteristics"] = o.m_Chargingcharacteristics;
j["dnn"] = o.m_Dnn;
if (o.dnnSelModeIsSet()) j["dnnSelMode"] = o.m_DnnSelMode;
j["notificationUri"] = o.m_NotificationUri;
if (o.accessTypeIsSet()) j["accessType"] = o.m_AccessType;
if (o.ratTypeIsSet()) j["ratType"] = o.m_RatType;
// if (o.addAccessInfoIsSet()) j["addAccessInfo"] = o.m_AddAccessInfo;
if (o.servingNetworkIsSet()) j["servingNetwork"] = o.m_ServingNetwork;
if (o.userLocationInfoIsSet()) j["userLocationInfo"] = o.m_UserLocationInfo;
if (o.ueTimeZoneIsSet()) j["ueTimeZone"] = o.m_UeTimeZone;
if (o.peiIsSet()) j["pei"] = o.m_Pei;
if (o.ipv4AddressIsSet()) j["ipv4Address"] = o.m_Ipv4Address;
/*
if (o.ipv6AddressPrefixIsSet())
j["ipv6AddressPrefix"] = o.m_Ipv6AddressPrefix;
*/
if (o.ipDomainIsSet()) j["ipDomain"] = o.m_IpDomain;
/*
if (o.subsSessAmbrIsSet()) j["subsSessAmbr"] = o.m_SubsSessAmbr;
*/
if (o.authProfIndexIsSet()) j["authProfIndex"] = o.m_AuthProfIndex;
// if (o.subsDefQosIsSet()) j["subsDefQos"] = o.m_SubsDefQos;
if (o.numOfPackFilterIsSet()) j["numOfPackFilter"] = o.m_NumOfPackFilter;
if (o.onlineIsSet()) j["online"] = o.m_Online;
if (o.offlineIsSet()) j["offline"] = o.m_Offline;
if (o.r3gppPsDataOffStatusIsSet())
j["3gppPsDataOffStatus"] = o.m_r_3gppPsDataOffStatus;
if (o.refQosIndicationIsSet()) j["refQosIndication"] = o.m_RefQosIndication;
if (o.traceReqIsSet()) j["traceReq"] = o.m_TraceReq;
j["sliceInfo"] = o.m_SliceInfo;
// if (o.qosFlowUsageIsSet()) j["qosFlowUsage"] = o.m_QosFlowUsage;
// if (o.servNfIdIsSet()) j["servNfId"] = o.m_ServNfId;
if (o.suppFeatIsSet()) j["suppFeat"] = o.m_SuppFeat;
if (o.smfIdIsSet()) j["smfId"] = o.m_SmfId;
if (o.recoveryTimeIsSet()) j["recoveryTime"] = o.m_RecoveryTime;
// if (o.maPduIndIsSet()) j["maPduInd"] = o.m_MaPduInd;
// if (o.atsssCapabIsSet()) j["atsssCapab"] = o.m_AtsssCapab;
}
void from_json(const nlohmann::json& j, SmPolicyContextData& o) {
/*
if (j.find("accNetChId") != j.end()) {
j.at("accNetChId").get_to(o.m_AccNetChId);
o.m_AccNetChIdIsSet = true;
}
if (j.find("chargEntityAddr") != j.end()) {
j.at("chargEntityAddr").get_to(o.m_ChargEntityAddr);
o.m_ChargEntityAddrIsSet = true;
}
*/
if (j.find("gpsi") != j.end()) {
j.at("gpsi").get_to(o.m_Gpsi);
o.m_GpsiIsSet = true;
}
j.at("supi").get_to(o.m_Supi);
if (j.find("interGrpIds") != j.end()) {
j.at("interGrpIds").get_to(o.m_InterGrpIds);
o.m_InterGrpIdsIsSet = true;
}
j.at("pduSessionId").get_to(o.m_PduSessionId);
j.at("pduSessionType").get_to(o.m_PduSessionType);
if (j.find("chargingcharacteristics") != j.end()) {
j.at("chargingcharacteristics").get_to(o.m_Chargingcharacteristics);
o.m_ChargingcharacteristicsIsSet = true;
}
j.at("dnn").get_to(o.m_Dnn);
if (j.find("dnnSelMode") != j.end()) {
j.at("dnnSelMode").get_to(o.m_DnnSelMode);
o.m_DnnSelModeIsSet = true;
}
j.at("notificationUri").get_to(o.m_NotificationUri);
if (j.find("accessType") != j.end()) {
j.at("accessType").get_to(o.m_AccessType);
o.m_AccessTypeIsSet = true;
}
if (j.find("ratType") != j.end()) {
j.at("ratType").get_to(o.m_RatType);
o.m_RatTypeIsSet = true;
}
/*
if (j.find("addAccessInfo") != j.end()) {
j.at("addAccessInfo").get_to(o.m_AddAccessInfo);
o.m_AddAccessInfoIsSet = true;
}
*/
if (j.find("servingNetwork") != j.end()) {
j.at("servingNetwork").get_to(o.m_ServingNetwork);
o.m_ServingNetworkIsSet = true;
}
if (j.find("userLocationInfo") != j.end()) {
j.at("userLocationInfo").get_to(o.m_UserLocationInfo);
o.m_UserLocationInfoIsSet = true;
}
if (j.find("ueTimeZone") != j.end()) {
j.at("ueTimeZone").get_to(o.m_UeTimeZone);
o.m_UeTimeZoneIsSet = true;
}
if (j.find("pei") != j.end()) {
j.at("pei").get_to(o.m_Pei);
o.m_PeiIsSet = true;
}
if (j.find("ipv4Address") != j.end()) {
j.at("ipv4Address").get_to(o.m_Ipv4Address);
o.m_Ipv4AddressIsSet = true;
}
/*
if (j.find("ipv6AddressPrefix") != j.end()) {
j.at("ipv6AddressPrefix").get_to(o.m_Ipv6AddressPrefix);
o.m_Ipv6AddressPrefixIsSet = true;
}
*/
if (j.find("ipDomain") != j.end()) {
j.at("ipDomain").get_to(o.m_IpDomain);
o.m_IpDomainIsSet = true;
}
/*
if (j.find("subsSessAmbr") != j.end()) {
j.at("subsSessAmbr").get_to(o.m_SubsSessAmbr);
o.m_SubsSessAmbrIsSet = true;
}
*/
if (j.find("authProfIndex") != j.end()) {
j.at("authProfIndex").get_to(o.m_AuthProfIndex);
o.m_AuthProfIndexIsSet = true;
}
/*
if (j.find("subsDefQos") != j.end()) {
j.at("subsDefQos").get_to(o.m_SubsDefQos);
o.m_SubsDefQosIsSet = true;
}
*/
if (j.find("numOfPackFilter") != j.end()) {
j.at("numOfPackFilter").get_to(o.m_NumOfPackFilter);
o.m_NumOfPackFilterIsSet = true;
}
if (j.find("online") != j.end()) {
j.at("online").get_to(o.m_Online);
o.m_OnlineIsSet = true;
}
if (j.find("offline") != j.end()) {
j.at("offline").get_to(o.m_Offline);
o.m_OfflineIsSet = true;
}
if (j.find("3gppPsDataOffStatus") != j.end()) {
j.at("3gppPsDataOffStatus").get_to(o.m_r_3gppPsDataOffStatus);
o.m_r_3gppPsDataOffStatusIsSet = true;
}
if (j.find("refQosIndication") != j.end()) {
j.at("refQosIndication").get_to(o.m_RefQosIndication);
o.m_RefQosIndicationIsSet = true;
}
if (j.find("traceReq") != j.end()) {
j.at("traceReq").get_to(o.m_TraceReq);
o.m_TraceReqIsSet = true;
}
/*
j.at("sliceInfo").get_to(o.m_SliceInfo);
if (j.find("qosFlowUsage") != j.end()) {
j.at("qosFlowUsage").get_to(o.m_QosFlowUsage);
o.m_QosFlowUsageIsSet = true;
}
if (j.find("servNfId") != j.end()) {
j.at("servNfId").get_to(o.m_ServNfId);
o.m_ServNfIdIsSet = true;
}
*/
if (j.find("suppFeat") != j.end()) {
j.at("suppFeat").get_to(o.m_SuppFeat);
o.m_SuppFeatIsSet = true;
}
if (j.find("smfId") != j.end()) {
j.at("smfId").get_to(o.m_SmfId);
o.m_SmfIdIsSet = true;
}
if (j.find("recoveryTime") != j.end()) {
j.at("recoveryTime").get_to(o.m_RecoveryTime);
o.m_RecoveryTimeIsSet = true;
}
/*
if (j.find("maPduInd") != j.end()) {
j.at("maPduInd").get_to(o.m_MaPduInd);
o.m_MaPduIndIsSet = true;
}
if (j.find("atsssCapab") != j.end()) {
j.at("atsssCapab").get_to(o.m_AtsssCapab);
o.m_AtsssCapabIsSet = true;
}
*/
}
/*
AccNetChId SmPolicyContextData::getAccNetChId() const {
return m_AccNetChId;
}
void SmPolicyContextData::setAccNetChId(AccNetChId const& value) {
m_AccNetChId = value;
m_AccNetChIdIsSet = true;
}
bool SmPolicyContextData::accNetChIdIsSet() const {
return m_AccNetChIdIsSet;
}
void SmPolicyContextData::unsetAccNetChId() {
m_AccNetChIdIsSet = false;
}
AccNetChargingAddress SmPolicyContextData::getChargEntityAddr() const {
return m_ChargEntityAddr;
}
void SmPolicyContextData::setChargEntityAddr(
AccNetChargingAddress const& value) {
m_ChargEntityAddr = value;
m_ChargEntityAddrIsSet = true;
}
bool SmPolicyContextData::chargEntityAddrIsSet() const {
return m_ChargEntityAddrIsSet;
}
void SmPolicyContextData::unsetChargEntityAddr() {
m_ChargEntityAddrIsSet = false;
}
*/
std::string SmPolicyContextData::getGpsi() const {
return m_Gpsi;
}
void SmPolicyContextData::setGpsi(std::string const& value) {
m_Gpsi = value;
m_GpsiIsSet = true;
}
bool SmPolicyContextData::gpsiIsSet() const {
return m_GpsiIsSet;
}
void SmPolicyContextData::unsetGpsi() {
m_GpsiIsSet = false;
}
std::string SmPolicyContextData::getSupi() const {
return m_Supi;
}
void SmPolicyContextData::setSupi(std::string const& value) {
m_Supi = value;
}
std::vector<std::string> SmPolicyContextData::getInterGrpIds() const {
return m_InterGrpIds;
}
void SmPolicyContextData::setInterGrpIds(
std::vector<std::string> const& value) {
m_InterGrpIds = value;
m_InterGrpIdsIsSet = true;
}
bool SmPolicyContextData::interGrpIdsIsSet() const {
return m_InterGrpIdsIsSet;
}
void SmPolicyContextData::unsetInterGrpIds() {
m_InterGrpIdsIsSet = false;
}
int32_t SmPolicyContextData::getPduSessionId() const {
return m_PduSessionId;
}
void SmPolicyContextData::setPduSessionId(int32_t const value) {
m_PduSessionId = value;
}
PduSessionType SmPolicyContextData::getPduSessionType() const {
return m_PduSessionType;
}
void SmPolicyContextData::setPduSessionType(PduSessionType const& value) {
m_PduSessionType = value;
}
std::string SmPolicyContextData::getChargingcharacteristics() const {
return m_Chargingcharacteristics;
}
void SmPolicyContextData::setChargingcharacteristics(std::string const& value) {
m_Chargingcharacteristics = value;
m_ChargingcharacteristicsIsSet = true;
}
bool SmPolicyContextData::chargingcharacteristicsIsSet() const {
return m_ChargingcharacteristicsIsSet;
}
void SmPolicyContextData::unsetChargingcharacteristics() {
m_ChargingcharacteristicsIsSet = false;
}
std::string SmPolicyContextData::getDnn() const {
return m_Dnn;
}
void SmPolicyContextData::setDnn(std::string const& value) {
m_Dnn = value;
}
DnnSelectionMode SmPolicyContextData::getDnnSelMode() const {
return m_DnnSelMode;
}
void SmPolicyContextData::setDnnSelMode(DnnSelectionMode const& value) {
m_DnnSelMode = value;
m_DnnSelModeIsSet = true;
}
bool SmPolicyContextData::dnnSelModeIsSet() const {
return m_DnnSelModeIsSet;
}
void SmPolicyContextData::unsetDnnSelMode() {
m_DnnSelModeIsSet = false;
}
std::string SmPolicyContextData::getNotificationUri() const {
return m_NotificationUri;
}
void SmPolicyContextData::setNotificationUri(std::string const& value) {
m_NotificationUri = value;
}
AccessType SmPolicyContextData::getAccessType() const {
return m_AccessType;
}
void SmPolicyContextData::setAccessType(AccessType const& value) {
m_AccessType = value;
m_AccessTypeIsSet = true;
}
bool SmPolicyContextData::accessTypeIsSet() const {
return m_AccessTypeIsSet;
}
void SmPolicyContextData::unsetAccessType() {
m_AccessTypeIsSet = false;
}
RatType SmPolicyContextData::getRatType() const {
return m_RatType;
}
void SmPolicyContextData::setRatType(RatType const& value) {
m_RatType = value;
m_RatTypeIsSet = true;
}
bool SmPolicyContextData::ratTypeIsSet() const {
return m_RatTypeIsSet;
}
void SmPolicyContextData::unsetRatType() {
m_RatTypeIsSet = false;
}
/*
AdditionalAccessInfo SmPolicyContextData::getAddAccessInfo() const {
return m_AddAccessInfo;
}
void SmPolicyContextData::setAddAccessInfo(AdditionalAccessInfo const& value) {
m_AddAccessInfo = value;
m_AddAccessInfoIsSet = true;
}
bool SmPolicyContextData::addAccessInfoIsSet() const {
return m_AddAccessInfoIsSet;
}
void SmPolicyContextData::unsetAddAccessInfo() {
m_AddAccessInfoIsSet = false;
}
*/
PlmnIdNid SmPolicyContextData::getServingNetwork() const {
return m_ServingNetwork;
}
void SmPolicyContextData::setServingNetwork(PlmnIdNid const& value) {
m_ServingNetwork = value;
m_ServingNetworkIsSet = true;
}
bool SmPolicyContextData::servingNetworkIsSet() const {
return m_ServingNetworkIsSet;
}
void SmPolicyContextData::unsetServingNetwork() {
m_ServingNetworkIsSet = false;
}
UserLocation SmPolicyContextData::getUserLocationInfo() const {
return m_UserLocationInfo;
}
void SmPolicyContextData::setUserLocationInfo(UserLocation const& value) {
m_UserLocationInfo = value;
m_UserLocationInfoIsSet = true;
}
bool SmPolicyContextData::userLocationInfoIsSet() const {
return m_UserLocationInfoIsSet;
}
void SmPolicyContextData::unsetUserLocationInfo() {
m_UserLocationInfoIsSet = false;
}
std::string SmPolicyContextData::getUeTimeZone() const {
return m_UeTimeZone;
}
void SmPolicyContextData::setUeTimeZone(std::string const& value) {
m_UeTimeZone = value;
m_UeTimeZoneIsSet = true;
}
bool SmPolicyContextData::ueTimeZoneIsSet() const {
return m_UeTimeZoneIsSet;
}
void SmPolicyContextData::unsetUeTimeZone() {
m_UeTimeZoneIsSet = false;
}
std::string SmPolicyContextData::getPei() const {
return m_Pei;
}
void SmPolicyContextData::setPei(std::string const& value) {
m_Pei = value;
m_PeiIsSet = true;
}
bool SmPolicyContextData::peiIsSet() const {
return m_PeiIsSet;
}
void SmPolicyContextData::unsetPei() {
m_PeiIsSet = false;
}
std::string SmPolicyContextData::getIpv4Address() const {
return m_Ipv4Address;
}
void SmPolicyContextData::setIpv4Address(std::string const& value) {
m_Ipv4Address = value;
m_Ipv4AddressIsSet = true;
}
bool SmPolicyContextData::ipv4AddressIsSet() const {
return m_Ipv4AddressIsSet;
}
void SmPolicyContextData::unsetIpv4Address() {
m_Ipv4AddressIsSet = false;
}
/*
Ipv6Prefix SmPolicyContextData::getIpv6AddressPrefix() const {
return m_Ipv6AddressPrefix;
}
void SmPolicyContextData::setIpv6AddressPrefix(Ipv6Prefix const& value) {
m_Ipv6AddressPrefix = value;
m_Ipv6AddressPrefixIsSet = true;
}
bool SmPolicyContextData::ipv6AddressPrefixIsSet() const {
return m_Ipv6AddressPrefixIsSet;
}
void SmPolicyContextData::unsetIpv6AddressPrefix() {
m_Ipv6AddressPrefixIsSet = false;
}
*/
std::string SmPolicyContextData::getIpDomain() const {
return m_IpDomain;
}
void SmPolicyContextData::setIpDomain(std::string const& value) {
m_IpDomain = value;
m_IpDomainIsSet = true;
}
bool SmPolicyContextData::ipDomainIsSet() const {
return m_IpDomainIsSet;
}
void SmPolicyContextData::unsetIpDomain() {
m_IpDomainIsSet = false;
}
/*
Ambr SmPolicyContextData::getSubsSessAmbr() const {
return m_SubsSessAmbr;
}
void SmPolicyContextData::setSubsSessAmbr(Ambr const& value) {
m_SubsSessAmbr = value;
m_SubsSessAmbrIsSet = true;
}
bool SmPolicyContextData::subsSessAmbrIsSet() const {
return m_SubsSessAmbrIsSet;
}
void SmPolicyContextData::unsetSubsSessAmbr() {
m_SubsSessAmbrIsSet = false;
}
*/
std::string SmPolicyContextData::getAuthProfIndex() const {
return m_AuthProfIndex;
}
void SmPolicyContextData::setAuthProfIndex(std::string const& value) {
m_AuthProfIndex = value;
m_AuthProfIndexIsSet = true;
}
bool SmPolicyContextData::authProfIndexIsSet() const {
return m_AuthProfIndexIsSet;
}
void SmPolicyContextData::unsetAuthProfIndex() {
m_AuthProfIndexIsSet = false;
}
/*
SubscribedDefaultQos SmPolicyContextData::getSubsDefQos() const {
return m_SubsDefQos;
}
void SmPolicyContextData::setSubsDefQos(SubscribedDefaultQos const& value) {
m_SubsDefQos = value;
m_SubsDefQosIsSet = true;
}
bool SmPolicyContextData::subsDefQosIsSet() const {
return m_SubsDefQosIsSet;
}
void SmPolicyContextData::unsetSubsDefQos() {
m_SubsDefQosIsSet = false;
}
*/
int32_t SmPolicyContextData::getNumOfPackFilter() const {
return m_NumOfPackFilter;
}
void SmPolicyContextData::setNumOfPackFilter(int32_t const value) {
m_NumOfPackFilter = value;
m_NumOfPackFilterIsSet = true;
}
bool SmPolicyContextData::numOfPackFilterIsSet() const {
return m_NumOfPackFilterIsSet;
}
void SmPolicyContextData::unsetNumOfPackFilter() {
m_NumOfPackFilterIsSet = false;
}
bool SmPolicyContextData::isOnline() const {
return m_Online;
}
void SmPolicyContextData::setOnline(bool const value) {
m_Online = value;
m_OnlineIsSet = true;
}
bool SmPolicyContextData::onlineIsSet() const {
return m_OnlineIsSet;
}
void SmPolicyContextData::unsetOnline() {
m_OnlineIsSet = false;
}
bool SmPolicyContextData::isOffline() const {
return m_Offline;
}
void SmPolicyContextData::setOffline(bool const value) {
m_Offline = value;
m_OfflineIsSet = true;
}
bool SmPolicyContextData::offlineIsSet() const {
return m_OfflineIsSet;
}
void SmPolicyContextData::unsetOffline() {
m_OfflineIsSet = false;
}
bool SmPolicyContextData::isR3gppPsDataOffStatus() const {
return m_r_3gppPsDataOffStatus;
}
void SmPolicyContextData::setR3gppPsDataOffStatus(bool const value) {
m_r_3gppPsDataOffStatus = value;
m_r_3gppPsDataOffStatusIsSet = true;
}
bool SmPolicyContextData::r3gppPsDataOffStatusIsSet() const {
return m_r_3gppPsDataOffStatusIsSet;
}
void SmPolicyContextData::unsetr_3gppPsDataOffStatus() {
m_r_3gppPsDataOffStatusIsSet = false;
}
bool SmPolicyContextData::isRefQosIndication() const {
return m_RefQosIndication;
}
void SmPolicyContextData::setRefQosIndication(bool const value) {
m_RefQosIndication = value;
m_RefQosIndicationIsSet = true;
}
bool SmPolicyContextData::refQosIndicationIsSet() const {
return m_RefQosIndicationIsSet;
}
void SmPolicyContextData::unsetRefQosIndication() {
m_RefQosIndicationIsSet = false;
}
TraceData SmPolicyContextData::getTraceReq() const {
return m_TraceReq;
}
void SmPolicyContextData::setTraceReq(TraceData const& value) {
m_TraceReq = value;
m_TraceReqIsSet = true;
}
bool SmPolicyContextData::traceReqIsSet() const {
return m_TraceReqIsSet;
}
void SmPolicyContextData::unsetTraceReq() {
m_TraceReqIsSet = false;
}
Snssai SmPolicyContextData::getSliceInfo() const {
return m_SliceInfo;
}
void SmPolicyContextData::setSliceInfo(Snssai const& value) {
m_SliceInfo = value;
}
/*
QosFlowUsage SmPolicyContextData::getQosFlowUsage() const {
return m_QosFlowUsage;
}
void SmPolicyContextData::setQosFlowUsage(QosFlowUsage const& value) {
m_QosFlowUsage = value;
m_QosFlowUsageIsSet = true;
}
bool SmPolicyContextData::qosFlowUsageIsSet() const {
return m_QosFlowUsageIsSet;
}
void SmPolicyContextData::unsetQosFlowUsage() {
m_QosFlowUsageIsSet = false;
}
ServingNfIdentity SmPolicyContextData::getServNfId() const {
return m_ServNfId;
}
void SmPolicyContextData::setServNfId(ServingNfIdentity const& value) {
m_ServNfId = value;
m_ServNfIdIsSet = true;
}
bool SmPolicyContextData::servNfIdIsSet() const {
return m_ServNfIdIsSet;
}
void SmPolicyContextData::unsetServNfId() {
m_ServNfIdIsSet = false;
}
*/
std::string SmPolicyContextData::getSuppFeat() const {
return m_SuppFeat;
}
void SmPolicyContextData::setSuppFeat(std::string const& value) {
m_SuppFeat = value;
m_SuppFeatIsSet = true;
}
bool SmPolicyContextData::suppFeatIsSet() const {
return m_SuppFeatIsSet;
}
void SmPolicyContextData::unsetSuppFeat() {
m_SuppFeatIsSet = false;
}
std::string SmPolicyContextData::getSmfId() const {
return m_SmfId;
}
void SmPolicyContextData::setSmfId(std::string const& value) {
m_SmfId = value;
m_SmfIdIsSet = true;
}
bool SmPolicyContextData::smfIdIsSet() const {
return m_SmfIdIsSet;
}
void SmPolicyContextData::unsetSmfId() {
m_SmfIdIsSet = false;
}
std::string SmPolicyContextData::getRecoveryTime() const {
return m_RecoveryTime;
}
void SmPolicyContextData::setRecoveryTime(std::string const& value) {
m_RecoveryTime = value;
m_RecoveryTimeIsSet = true;
}
bool SmPolicyContextData::recoveryTimeIsSet() const {
return m_RecoveryTimeIsSet;
}
void SmPolicyContextData::unsetRecoveryTime() {
m_RecoveryTimeIsSet = false;
}
/*
MaPduIndication SmPolicyContextData::getMaPduInd() const {
return m_MaPduInd;
}
void SmPolicyContextData::setMaPduInd(MaPduIndication const& value) {
m_MaPduInd = value;
m_MaPduIndIsSet = true;
}
bool SmPolicyContextData::maPduIndIsSet() const {
return m_MaPduIndIsSet;
}
void SmPolicyContextData::unsetMaPduInd() {
m_MaPduIndIsSet = false;
}
AtsssCapability SmPolicyContextData::getAtsssCapab() const {
return m_AtsssCapab;
}
void SmPolicyContextData::setAtsssCapab(AtsssCapability const& value) {
m_AtsssCapab = value;
m_AtsssCapabIsSet = true;
}
bool SmPolicyContextData::atsssCapabIsSet() const {
return m_AtsssCapabIsSet;
}
void SmPolicyContextData::unsetAtsssCapab() {
m_AtsssCapabIsSet = 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.
*/
/*
* SmPolicyContextData.h
*
*
*/
#ifndef SmPolicyContextData_H_
#define SmPolicyContextData_H_
// TODO unsupported models commented out
//#include "AccNetChId.h"
#include "Ambr.h"
#include "AtsssCapability.h"
//#include "SubscribedDefaultQos.h"
#include "RatType.h"
#include <string>
//#include "ServingNfIdentity.h"
//#include "MaPduIndication.h"
#include "Snssai.h"
#include "TraceData.h"
#include <vector>
#include "AccessType.h"
//#include "AccNetChargingAddress.h"
#include "DnnSelectionMode.h"
#include "PlmnIdNid.h"
//#include "QosFlowUsage.h"
#include "Ipv6Prefix.h"
#include "UserLocation.h"
#include "PduSessionType.h"
//#include "AdditionalAccessInfo.h"
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class SmPolicyContextData {
public:
SmPolicyContextData();
virtual ~SmPolicyContextData() = 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 SmPolicyContextData& rhs) const;
bool operator!=(const SmPolicyContextData& rhs) const;
/////////////////////////////////////////////
/// SmPolicyContextData members
/// <summary>
///
/// </summary>
/*
AccNetChId getAccNetChId() const;
void setAccNetChId(AccNetChId const& value);
bool accNetChIdIsSet() const;
void unsetAccNetChId();
/// <summary>
///
/// </summary>
AccNetChargingAddress getChargEntityAddr() const;
void setChargEntityAddr(AccNetChargingAddress const& value);
bool chargEntityAddrIsSet() const;
void unsetChargEntityAddr();
*/
/// <summary>
///
/// </summary>
std::string getGpsi() const;
void setGpsi(std::string const& value);
bool gpsiIsSet() const;
void unsetGpsi();
/// <summary>
///
/// </summary>
std::string getSupi() const;
void setSupi(std::string const& value);
/// <summary>
///
/// </summary>
std::vector<std::string> getInterGrpIds() const;
void setInterGrpIds(std::vector<std::string> const& value);
bool interGrpIdsIsSet() const;
void unsetInterGrpIds();
/// <summary>
///
/// </summary>
int32_t getPduSessionId() const;
void setPduSessionId(int32_t const value);
/// <summary>
///
/// </summary>
PduSessionType getPduSessionType() const;
void setPduSessionType(PduSessionType const& value);
/// <summary>
///
/// </summary>
std::string getChargingcharacteristics() const;
void setChargingcharacteristics(std::string const& value);
bool chargingcharacteristicsIsSet() const;
void unsetChargingcharacteristics();
/// <summary>
///
/// </summary>
std::string getDnn() const;
void setDnn(std::string const& value);
/// <summary>
///
/// </summary>
DnnSelectionMode getDnnSelMode() const;
void setDnnSelMode(DnnSelectionMode const& value);
bool dnnSelModeIsSet() const;
void unsetDnnSelMode();
/// <summary>
///
/// </summary>
std::string getNotificationUri() const;
void setNotificationUri(std::string const& value);
/// <summary>
///
/// </summary>
AccessType getAccessType() const;
void setAccessType(AccessType const& value);
bool accessTypeIsSet() const;
void unsetAccessType();
/// <summary>
///
/// </summary>
RatType getRatType() const;
void setRatType(RatType const& value);
bool ratTypeIsSet() const;
void unsetRatType();
/// <summary>
///
/// </summary>
/*
AdditionalAccessInfo getAddAccessInfo() const;
void setAddAccessInfo(AdditionalAccessInfo const& value);
bool addAccessInfoIsSet() const;
void unsetAddAccessInfo();
*/
/// <summary>
///
/// </summary>
PlmnIdNid getServingNetwork() const;
void setServingNetwork(PlmnIdNid const& value);
bool servingNetworkIsSet() const;
void unsetServingNetwork();
/// <summary>
///
/// </summary>
UserLocation getUserLocationInfo() const;
void setUserLocationInfo(UserLocation const& value);
bool userLocationInfoIsSet() const;
void unsetUserLocationInfo();
/// <summary>
///
/// </summary>
std::string getUeTimeZone() const;
void setUeTimeZone(std::string const& value);
bool ueTimeZoneIsSet() const;
void unsetUeTimeZone();
/// <summary>
///
/// </summary>
std::string getPei() const;
void setPei(std::string const& value);
bool peiIsSet() const;
void unsetPei();
/// <summary>
///
/// </summary>
std::string getIpv4Address() const;
void setIpv4Address(std::string const& value);
bool ipv4AddressIsSet() const;
void unsetIpv4Address();
/// <summary>
///
/// </summary>
/*
Ipv6Prefix getIpv6AddressPrefix() const;
void setIpv6AddressPrefix(Ipv6Prefix const& value);
bool ipv6AddressPrefixIsSet() const;
void unsetIpv6AddressPrefix();
*/
/// <summary>
/// Indicates the IPv4 address domain
/// </summary>
std::string getIpDomain() const;
void setIpDomain(std::string const& value);
bool ipDomainIsSet() const;
void unsetIpDomain();
/// <summary>
///
/// </summary>
/*
Ambr getSubsSessAmbr() const;
void setSubsSessAmbr(Ambr const& value);
bool subsSessAmbrIsSet() const;
void unsetSubsSessAmbr();
*/
/// <summary>
/// Indicates the DN-AAA authorization profile index
/// </summary>
std::string getAuthProfIndex() const;
void setAuthProfIndex(std::string const& value);
bool authProfIndexIsSet() const;
void unsetAuthProfIndex();
/// <summary>
///
/// </summary>
/*
SubscribedDefaultQos getSubsDefQos() const;
void setSubsDefQos(SubscribedDefaultQos const& value);
bool subsDefQosIsSet() const;
void unsetSubsDefQos();
*/
/// <summary>
/// Contains the number of supported packet filter for signalled QoS rules.
/// </summary>
int32_t getNumOfPackFilter() const;
void setNumOfPackFilter(int32_t const value);
bool numOfPackFilterIsSet() const;
void unsetNumOfPackFilter();
/// <summary>
/// If it is included and set to true, the online charging is applied to the
/// PDU session.
/// </summary>
bool isOnline() const;
void setOnline(bool const value);
bool onlineIsSet() const;
void unsetOnline();
/// <summary>
/// If it is included and set to true, the offline charging is applied to the
/// PDU session.
/// </summary>
bool isOffline() const;
void setOffline(bool const value);
bool offlineIsSet() const;
void unsetOffline();
/// <summary>
/// If it is included and set to true, the 3GPP PS Data Off is activated by
/// the UE.
/// </summary>
bool isR3gppPsDataOffStatus() const;
void setR3gppPsDataOffStatus(bool const value);
bool r3gppPsDataOffStatusIsSet() const;
void unsetr_3gppPsDataOffStatus();
/// <summary>
/// If it is included and set to true, the reflective QoS is supported by the
/// UE.
/// </summary>
bool isRefQosIndication() const;
void setRefQosIndication(bool const value);
bool refQosIndicationIsSet() const;
void unsetRefQosIndication();
/// <summary>
///
/// </summary>
TraceData getTraceReq() const;
void setTraceReq(TraceData const& value);
bool traceReqIsSet() const;
void unsetTraceReq();
/// <summary>
///
/// </summary>
Snssai getSliceInfo() const;
void setSliceInfo(Snssai const& value);
/// <summary>
///
/// </summary>
/*
QosFlowUsage getQosFlowUsage() const;
void setQosFlowUsage(QosFlowUsage const& value);
bool qosFlowUsageIsSet() const;
void unsetQosFlowUsage();
/// <summary>
///
/// </summary>
ServingNfIdentity getServNfId() const;
void setServNfId(ServingNfIdentity const& value);
bool servNfIdIsSet() const;
void unsetServNfId();
*/
/// <summary>
///
/// </summary>
std::string getSuppFeat() const;
void setSuppFeat(std::string const& value);
bool suppFeatIsSet() const;
void unsetSuppFeat();
/// <summary>
///
/// </summary>
std::string getSmfId() const;
void setSmfId(std::string const& value);
bool smfIdIsSet() const;
void unsetSmfId();
/// <summary>
///
/// </summary>
std::string getRecoveryTime() const;
void setRecoveryTime(std::string const& value);
bool recoveryTimeIsSet() const;
void unsetRecoveryTime();
/// <summary>
///
/// </summary>
/*
MaPduIndication getMaPduInd() const;
void setMaPduInd(MaPduIndication const& value);
bool maPduIndIsSet() const;
void unsetMaPduInd();
/// <summary>
///
/// </summary>
AtsssCapability getAtsssCapab() const;
void setAtsssCapab(AtsssCapability const& value);
bool atsssCapabIsSet() const;
void unsetAtsssCapab();
*/
friend void to_json(nlohmann::json& j, const SmPolicyContextData& o);
friend void from_json(const nlohmann::json& j, SmPolicyContextData& o);
protected:
// AccNetChId m_AccNetChId;
// bool m_AccNetChIdIsSet;
// AccNetChargingAddress m_ChargEntityAddr;
// bool m_ChargEntityAddrIsSet;
std::string m_Gpsi;
bool m_GpsiIsSet;
std::string m_Supi;
std::vector<std::string> m_InterGrpIds;
bool m_InterGrpIdsIsSet;
int32_t m_PduSessionId;
PduSessionType m_PduSessionType;
std::string m_Chargingcharacteristics;
bool m_ChargingcharacteristicsIsSet;
std::string m_Dnn;
DnnSelectionMode m_DnnSelMode;
bool m_DnnSelModeIsSet;
std::string m_NotificationUri;
AccessType m_AccessType;
bool m_AccessTypeIsSet;
RatType m_RatType;
bool m_RatTypeIsSet;
// AdditionalAccessInfo m_AddAccessInfo;
// bool m_AddAccessInfoIsSet;
PlmnIdNid m_ServingNetwork;
bool m_ServingNetworkIsSet;
UserLocation m_UserLocationInfo;
bool m_UserLocationInfoIsSet;
std::string m_UeTimeZone;
bool m_UeTimeZoneIsSet;
std::string m_Pei;
bool m_PeiIsSet;
std::string m_Ipv4Address;
bool m_Ipv4AddressIsSet;
// Ipv6Prefix m_Ipv6AddressPrefix;
// bool m_Ipv6AddressPrefixIsSet;
std::string m_IpDomain;
bool m_IpDomainIsSet;
// Ambr m_SubsSessAmbr;
// bool m_SubsSessAmbrIsSet;
std::string m_AuthProfIndex;
bool m_AuthProfIndexIsSet;
// SubscribedDefaultQos m_SubsDefQos;
// bool m_SubsDefQosIsSet;
int32_t m_NumOfPackFilter;
bool m_NumOfPackFilterIsSet;
bool m_Online;
bool m_OnlineIsSet;
bool m_Offline;
bool m_OfflineIsSet;
bool m_r_3gppPsDataOffStatus;
bool m_r_3gppPsDataOffStatusIsSet;
bool m_RefQosIndication;
bool m_RefQosIndicationIsSet;
TraceData m_TraceReq;
bool m_TraceReqIsSet;
Snssai m_SliceInfo;
// QosFlowUsage m_QosFlowUsage;
// bool m_QosFlowUsageIsSet;
// ServingNfIdentity m_ServNfId;
// bool m_ServNfIdIsSet;
std::string m_SuppFeat;
bool m_SuppFeatIsSet;
std::string m_SmfId;
bool m_SmfIdIsSet;
std::string m_RecoveryTime;
bool m_RecoveryTimeIsSet;
// MaPduIndication m_MaPduInd;
// bool m_MaPduIndIsSet;
// AtsssCapability m_AtsssCapab;
// bool m_AtsssCapabIsSet;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* SmPolicyContextData_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 "SmPolicyDecision.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
SmPolicyDecision::SmPolicyDecision() {
// m_SessRulesIsSet = false;
m_PccRulesIsSet = false;
// m_PcscfRestIndication = false;
// m_PcscfRestIndicationIsSet = false;
// m_QosDecsIsSet = false;
// m_ChgDecsIsSet = false;
// m_ChargingInfoIsSet = false;
m_TraffContDecsIsSet = false;
// m_UmDecsIsSet = false;
// m_QosCharsIsSet = false;
// m_QosMonDecsIsSet = false;
// m_ReflectiveQoSTimer = 0;
// m_ReflectiveQoSTimerIsSet = false;
// m_CondsIsSet = false;
// m_RevalidationTime = "";
// m_RevalidationTimeIsSet = false;
// m_Offline = false;
// m_OfflineIsSet = false;
// m_Online = false;
// m_OnlineIsSet = false;
m_PolicyCtrlReqTriggersIsSet = false;
// m_LastReqRuleDataIsSet = false;
// m_LastReqUsageDataIsSet = false;
// m_PraInfosIsSet = false;
m_Ipv4Index = 0;
m_Ipv4IndexIsSet = false;
// m_Ipv6Index = 0;
// m_Ipv6IndexIsSet = false;
// m_QosFlowUsageIsSet = false;
// m_RelCauseIsSet = false;
// m_SuppFeat = "";
// m_SuppFeatIsSet = false;
// m_TsnPortManContDsttIsSet = false;
// m_TsnPortManContNwttsIsSet = false;
}
void SmPolicyDecision::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool SmPolicyDecision::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool SmPolicyDecision::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "SmPolicyDecision" : pathPrefix;
/*
if (sessRulesIsSet()) {
const std::map<std::string, SessionRule>& value = m_SessRules;
const std::string currentValuePath = _pathPrefix + ".sessRules";
} */
if (pccRulesIsSet()) {
const std::map<std::string, PccRule>& value = m_PccRules;
const std::string currentValuePath = _pathPrefix + ".pccRules";
}
/*
if (qosDecsIsSet()) {
const std::map<std::string, QosData>& value = m_QosDecs;
const std::string currentValuePath = _pathPrefix + ".qosDecs";
}
if (chgDecsIsSet()) {
const std::map<std::string, ChargingData>& value = m_ChgDecs;
const std::string currentValuePath = _pathPrefix + ".chgDecs";
}
*/
if (traffContDecsIsSet()) {
const std::map<std::string, TrafficControlData>& value = m_TraffContDecs;
const std::string currentValuePath = _pathPrefix + ".traffContDecs";
}
/*
if (umDecsIsSet()) {
const std::map<std::string, UsageMonitoringData>& value = m_UmDecs;
const std::string currentValuePath = _pathPrefix + ".umDecs";
}
if (qosCharsIsSet()) {
const std::map<std::string, QosCharacteristics>& value = m_QosChars;
const std::string currentValuePath = _pathPrefix + ".qosChars";
}
if (qosMonDecsIsSet()) {
const std::map<std::string, QosMonitoringData>& value = m_QosMonDecs;
const std::string currentValuePath = _pathPrefix + ".qosMonDecs";
}
if (condsIsSet()) {
const std::map<std::string, ConditionData>& value = m_Conds;
const std::string currentValuePath = _pathPrefix + ".conds";
}
*/
if (policyCtrlReqTriggersIsSet()) {
const std::vector<PolicyControlRequestTrigger>& value =
m_PolicyCtrlReqTriggers;
const std::string currentValuePath = _pathPrefix + ".policyCtrlReqTriggers";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const PolicyControlRequestTrigger& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
success =
value.validate(msg, currentValuePath + ".policyCtrlReqTriggers") &&
success;
i++;
}
}
}
/*
if (lastReqRuleDataIsSet()) {
const std::vector<RequestedRuleData>& value = m_LastReqRuleData;
const std::string currentValuePath = _pathPrefix + ".lastReqRuleData";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const RequestedRuleData& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
success = value.validate(msg, currentValuePath + ".lastReqRuleData") &&
success;
i++;
}
}
}
if (praInfosIsSet()) {
const std::map<std::string, PresenceInfoRm>& value = m_PraInfos;
const std::string currentValuePath = _pathPrefix + ".praInfos";
}
if (suppFeatIsSet()) {
const std::string& value = m_SuppFeat;
const std::string currentValuePath = _pathPrefix + ".suppFeat";
}
if (tsnPortManContNwttsIsSet()) {
const std::vector<PortManagementContainer>& value = m_TsnPortManContNwtts;
const std::string currentValuePath = _pathPrefix + ".tsnPortManContNwtts";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const PortManagementContainer& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
success =
value.validate(msg, currentValuePath + ".tsnPortManContNwtts") &&
success;
i++;
}
}
} */
return success;
}
bool SmPolicyDecision::operator==(const SmPolicyDecision& rhs) const {
return
/*
((!sessRulesIsSet() && !rhs.sessRulesIsSet()) ||
(sessRulesIsSet() && rhs.sessRulesIsSet() &&
getSessRules() == rhs.getSessRules())) &&
*/
((!pccRulesIsSet() && !rhs.pccRulesIsSet()) ||
(pccRulesIsSet() && rhs.pccRulesIsSet() &&
getPccRules() == rhs.getPccRules())) &&
/*
((!pcscfRestIndicationIsSet() && !rhs.pcscfRestIndicationIsSet()) ||
(pcscfRestIndicationIsSet() && rhs.pcscfRestIndicationIsSet() &&
isPcscfRestIndication() == rhs.isPcscfRestIndication())) &&
((!qosDecsIsSet() && !rhs.qosDecsIsSet()) ||
(qosDecsIsSet() && rhs.qosDecsIsSet() &&
getQosDecs() == rhs.getQosDecs())) &&
((!chgDecsIsSet() && !rhs.chgDecsIsSet()) ||
(chgDecsIsSet() && rhs.chgDecsIsSet() &&
getChgDecs() == rhs.getChgDecs())) &&
((!chargingInfoIsSet() && !rhs.chargingInfoIsSet()) ||
(chargingInfoIsSet() && rhs.chargingInfoIsSet() &&
getChargingInfo() == rhs.getChargingInfo())) &&
*/
((!traffContDecsIsSet() && !rhs.traffContDecsIsSet()) ||
(traffContDecsIsSet() && rhs.traffContDecsIsSet() &&
getTraffContDecs() == rhs.getTraffContDecs())) &&
/*
((!umDecsIsSet() && !rhs.umDecsIsSet()) ||
(umDecsIsSet() && rhs.umDecsIsSet() &&
getUmDecs() == rhs.getUmDecs())) &&
((!qosCharsIsSet() && !rhs.qosCharsIsSet()) ||
(qosCharsIsSet() && rhs.qosCharsIsSet() &&
getQosChars() == rhs.getQosChars())) &&
((!qosMonDecsIsSet() && !rhs.qosMonDecsIsSet()) ||
(qosMonDecsIsSet() && rhs.qosMonDecsIsSet() &&
getQosMonDecs() == rhs.getQosMonDecs())) &&
((!reflectiveQoSTimerIsSet() && !rhs.reflectiveQoSTimerIsSet()) ||
(reflectiveQoSTimerIsSet() && rhs.reflectiveQoSTimerIsSet() &&
getReflectiveQoSTimer() == rhs.getReflectiveQoSTimer())) &&
((!condsIsSet() && !rhs.condsIsSet()) ||
(condsIsSet() && rhs.condsIsSet() && getConds() == rhs.getConds())) &&
((!revalidationTimeIsSet() && !rhs.revalidationTimeIsSet()) ||
(revalidationTimeIsSet() && rhs.revalidationTimeIsSet() &&
getRevalidationTime() == rhs.getRevalidationTime())) &&
((!offlineIsSet() && !rhs.offlineIsSet()) ||
(offlineIsSet() && rhs.offlineIsSet() &&
isOffline() == rhs.isOffline())) &&
((!onlineIsSet() && !rhs.onlineIsSet()) ||
(onlineIsSet() && rhs.onlineIsSet() && isOnline() == rhs.isOnline())) &&
*/
((!policyCtrlReqTriggersIsSet() && !rhs.policyCtrlReqTriggersIsSet()) ||
(policyCtrlReqTriggersIsSet() && rhs.policyCtrlReqTriggersIsSet() &&
getPolicyCtrlReqTriggers() == rhs.getPolicyCtrlReqTriggers())) &&
/*
((!lastReqRuleDataIsSet() && !rhs.lastReqRuleDataIsSet()) ||
(lastReqRuleDataIsSet() && rhs.lastReqRuleDataIsSet() &&
getLastReqRuleData() == rhs.getLastReqRuleData())) &&
((!lastReqUsageDataIsSet() && !rhs.lastReqUsageDataIsSet()) ||
(lastReqUsageDataIsSet() && rhs.lastReqUsageDataIsSet() &&
getLastReqUsageData() == rhs.getLastReqUsageData())) &&
((!praInfosIsSet() && !rhs.praInfosIsSet()) ||
(praInfosIsSet() && rhs.praInfosIsSet() &&
getPraInfos() == rhs.getPraInfos())) &&
*/
((!ipv4IndexIsSet() && !rhs.ipv4IndexIsSet()) ||
(ipv4IndexIsSet() && rhs.ipv4IndexIsSet() &&
getIpv4Index() == rhs.getIpv4Index()))
/*
((!ipv6IndexIsSet() && !rhs.ipv6IndexIsSet()) ||
(ipv6IndexIsSet() && rhs.ipv6IndexIsSet() &&
getIpv6Index() == rhs.getIpv6Index())) &&
((!qosFlowUsageIsSet() && !rhs.qosFlowUsageIsSet()) ||
(qosFlowUsageIsSet() && rhs.qosFlowUsageIsSet() &&
getQosFlowUsage() == rhs.getQosFlowUsage())) &&
((!relCauseIsSet() && !rhs.relCauseIsSet()) ||
(relCauseIsSet() && rhs.relCauseIsSet() &&
getRelCause() == rhs.getRelCause())) &&
((!suppFeatIsSet() && !rhs.suppFeatIsSet()) ||
(suppFeatIsSet() && rhs.suppFeatIsSet() &&
getSuppFeat() == rhs.getSuppFeat())) &&
((!tsnPortManContDsttIsSet() && !rhs.tsnPortManContDsttIsSet()) ||
(tsnPortManContDsttIsSet() && rhs.tsnPortManContDsttIsSet() &&
getTsnPortManContDstt() == rhs.getTsnPortManContDstt())) &&
((!tsnPortManContNwttsIsSet() && !rhs.tsnPortManContNwttsIsSet()) ||
(tsnPortManContNwttsIsSet() && rhs.tsnPortManContNwttsIsSet() &&
getTsnPortManContNwtts() == rhs.getTsnPortManContNwtts()))
*/
;
}
bool SmPolicyDecision::operator!=(const SmPolicyDecision& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const SmPolicyDecision& o) {
j = nlohmann::json();
/*
if (o.sessRulesIsSet() || !o.m_SessRules.empty())
j["sessRules"] = o.m_SessRules;
*/
if (o.pccRulesIsSet() || !o.m_PccRules.empty()) j["pccRules"] = o.m_PccRules;
/*
if (o.pcscfRestIndicationIsSet())
j["pcscfRestIndication"] = o.m_PcscfRestIndication;
if (o.qosDecsIsSet() || !o.m_QosDecs.empty()) j["qosDecs"] = o.m_QosDecs;
if (o.chgDecsIsSet() || !o.m_ChgDecs.empty()) j["chgDecs"] = o.m_ChgDecs;
if (o.chargingInfoIsSet()) j["chargingInfo"] = o.m_ChargingInfo;
*/
if (o.traffContDecsIsSet() || !o.m_TraffContDecs.empty())
j["traffContDecs"] = o.m_TraffContDecs;
/*
if (o.umDecsIsSet() || !o.m_UmDecs.empty()) j["umDecs"] = o.m_UmDecs;
if (o.qosCharsIsSet() || !o.m_QosChars.empty()) j["qosChars"] = o.m_QosChars;
if (o.qosMonDecsIsSet() || !o.m_QosMonDecs.empty())
j["qosMonDecs"] = o.m_QosMonDecs;
if (o.reflectiveQoSTimerIsSet())
j["reflectiveQoSTimer"] = o.m_ReflectiveQoSTimer;
if (o.condsIsSet() || !o.m_Conds.empty()) j["conds"] = o.m_Conds;
if (o.revalidationTimeIsSet()) j["revalidationTime"] = o.m_RevalidationTime;
if (o.offlineIsSet()) j["offline"] = o.m_Offline;
if (o.onlineIsSet()) j["online"] = o.m_Online;
*/
if (o.policyCtrlReqTriggersIsSet() || !o.m_PolicyCtrlReqTriggers.empty())
j["policyCtrlReqTriggers"] = o.m_PolicyCtrlReqTriggers;
/*
if (o.lastReqRuleDataIsSet() || !o.m_LastReqRuleData.empty())
j["lastReqRuleData"] = o.m_LastReqRuleData;
if (o.lastReqUsageDataIsSet()) j["lastReqUsageData"] = o.m_LastReqUsageData;
if (o.praInfosIsSet() || !o.m_PraInfos.empty()) j["praInfos"] = o.m_PraInfos;
*/
if (o.ipv4IndexIsSet()) j["ipv4Index"] = o.m_Ipv4Index;
/*
if (o.ipv6IndexIsSet()) j["ipv6Index"] = o.m_Ipv6Index;
if (o.qosFlowUsageIsSet()) j["qosFlowUsage"] = o.m_QosFlowUsage;
if (o.relCauseIsSet()) j["relCause"] = o.m_RelCause;
if (o.suppFeatIsSet()) j["suppFeat"] = o.m_SuppFeat;
if (o.tsnPortManContDsttIsSet())
j["tsnPortManContDstt"] = o.m_TsnPortManContDstt;
if (o.tsnPortManContNwttsIsSet() || !o.m_TsnPortManContNwtts.empty())
j["tsnPortManContNwtts"] = o.m_TsnPortManContNwtts;
*/
}
void from_json(const nlohmann::json& j, SmPolicyDecision& o) {
/*
if (j.find("sessRules") != j.end()) {
j.at("sessRules").get_to(o.m_SessRules);
o.m_SessRulesIsSet = true;
}
*/
if (j.find("pccRules") != j.end()) {
j.at("pccRules").get_to(o.m_PccRules);
o.m_PccRulesIsSet = true;
}
/*
if (j.find("pcscfRestIndication") != j.end()) {
j.at("pcscfRestIndication").get_to(o.m_PcscfRestIndication);
o.m_PcscfRestIndicationIsSet = true;
}
if (j.find("qosDecs") != j.end()) {
j.at("qosDecs").get_to(o.m_QosDecs);
o.m_QosDecsIsSet = true;
}
if (j.find("chgDecs") != j.end()) {
j.at("chgDecs").get_to(o.m_ChgDecs);
o.m_ChgDecsIsSet = true;
}
if (j.find("chargingInfo") != j.end()) {
j.at("chargingInfo").get_to(o.m_ChargingInfo);
o.m_ChargingInfoIsSet = true;
}
*/
if (j.find("traffContDecs") != j.end()) {
j.at("traffContDecs").get_to(o.m_TraffContDecs);
o.m_TraffContDecsIsSet = true;
}
/*
if (j.find("umDecs") != j.end()) {
j.at("umDecs").get_to(o.m_UmDecs);
o.m_UmDecsIsSet = true;
}
if (j.find("qosChars") != j.end()) {
j.at("qosChars").get_to(o.m_QosChars);
o.m_QosCharsIsSet = true;
}
if (j.find("qosMonDecs") != j.end()) {
j.at("qosMonDecs").get_to(o.m_QosMonDecs);
o.m_QosMonDecsIsSet = true;
}
if (j.find("reflectiveQoSTimer") != j.end()) {
j.at("reflectiveQoSTimer").get_to(o.m_ReflectiveQoSTimer);
o.m_ReflectiveQoSTimerIsSet = true;
}
if (j.find("conds") != j.end()) {
j.at("conds").get_to(o.m_Conds);
o.m_CondsIsSet = true;
}
if (j.find("revalidationTime") != j.end()) {
j.at("revalidationTime").get_to(o.m_RevalidationTime);
o.m_RevalidationTimeIsSet = true;
}
if (j.find("offline") != j.end()) {
j.at("offline").get_to(o.m_Offline);
o.m_OfflineIsSet = true;
}
if (j.find("online") != j.end()) {
j.at("online").get_to(o.m_Online);
o.m_OnlineIsSet = true;
}
*/
if (j.find("policyCtrlReqTriggers") != j.end()) {
j.at("policyCtrlReqTriggers").get_to(o.m_PolicyCtrlReqTriggers);
o.m_PolicyCtrlReqTriggersIsSet = true;
}
/*
if (j.find("lastReqRuleData") != j.end()) {
j.at("lastReqRuleData").get_to(o.m_LastReqRuleData);
o.m_LastReqRuleDataIsSet = true;
}
if (j.find("lastReqUsageData") != j.end()) {
j.at("lastReqUsageData").get_to(o.m_LastReqUsageData);
o.m_LastReqUsageDataIsSet = true;
}
if (j.find("praInfos") != j.end()) {
j.at("praInfos").get_to(o.m_PraInfos);
o.m_PraInfosIsSet = true;
}
*/
if (j.find("ipv4Index") != j.end()) {
j.at("ipv4Index").get_to(o.m_Ipv4Index);
o.m_Ipv4IndexIsSet = true;
}
/*
if (j.find("ipv6Index") != j.end()) {
j.at("ipv6Index").get_to(o.m_Ipv6Index);
o.m_Ipv6IndexIsSet = true;
}
if (j.find("qosFlowUsage") != j.end()) {
j.at("qosFlowUsage").get_to(o.m_QosFlowUsage);
o.m_QosFlowUsageIsSet = true;
}
if (j.find("relCause") != j.end()) {
j.at("relCause").get_to(o.m_RelCause);
o.m_RelCauseIsSet = true;
}
if (j.find("suppFeat") != j.end()) {
j.at("suppFeat").get_to(o.m_SuppFeat);
o.m_SuppFeatIsSet = true;
}
if (j.find("tsnPortManContDstt") != j.end()) {
j.at("tsnPortManContDstt").get_to(o.m_TsnPortManContDstt);
o.m_TsnPortManContDsttIsSet = true;
}
if (j.find("tsnPortManContNwtts") != j.end()) {
j.at("tsnPortManContNwtts").get_to(o.m_TsnPortManContNwtts);
o.m_TsnPortManContNwttsIsSet = true;
} */
}
/*
std::map<std::string, SessionRule> SmPolicyDecision::getSessRules() const {
return m_SessRules;
}
void SmPolicyDecision::setSessRules(
std::map<std::string, SessionRule> const& value) {
m_SessRules = value;
m_SessRulesIsSet = true;
}
bool SmPolicyDecision::sessRulesIsSet() const {
return m_SessRulesIsSet;
}
void SmPolicyDecision::unsetSessRules() {
m_SessRulesIsSet = false;
}
*/
std::map<std::string, PccRule> SmPolicyDecision::getPccRules() const {
return m_PccRules;
}
void SmPolicyDecision::setPccRules(
std::map<std::string, PccRule> const& value) {
m_PccRules = value;
m_PccRulesIsSet = true;
}
bool SmPolicyDecision::pccRulesIsSet() const {
return m_PccRulesIsSet;
}
void SmPolicyDecision::unsetPccRules() {
m_PccRulesIsSet = false;
}
/*
bool SmPolicyDecision::isPcscfRestIndication() const {
return m_PcscfRestIndication;
}
void SmPolicyDecision::setPcscfRestIndication(bool const value) {
m_PcscfRestIndication = value;
m_PcscfRestIndicationIsSet = true;
}
bool SmPolicyDecision::pcscfRestIndicationIsSet() const {
return m_PcscfRestIndicationIsSet;
}
void SmPolicyDecision::unsetPcscfRestIndication() {
m_PcscfRestIndicationIsSet = false;
}
std::map<std::string, QosData> SmPolicyDecision::getQosDecs() const {
return m_QosDecs;
}
void SmPolicyDecision::setQosDecs(std::map<std::string, QosData> const& value) {
m_QosDecs = value;
m_QosDecsIsSet = true;
}
bool SmPolicyDecision::qosDecsIsSet() const {
return m_QosDecsIsSet;
}
void SmPolicyDecision::unsetQosDecs() {
m_QosDecsIsSet = false;
}
std::map<std::string, ChargingData> SmPolicyDecision::getChgDecs() const {
return m_ChgDecs;
}
void SmPolicyDecision::setChgDecs(
std::map<std::string, ChargingData> const& value) {
m_ChgDecs = value;
m_ChgDecsIsSet = true;
}
bool SmPolicyDecision::chgDecsIsSet() const {
return m_ChgDecsIsSet;
}
void SmPolicyDecision::unsetChgDecs() {
m_ChgDecsIsSet = false;
}
ChargingInformation SmPolicyDecision::getChargingInfo() const {
return m_ChargingInfo;
}
void SmPolicyDecision::setChargingInfo(ChargingInformation const& value) {
m_ChargingInfo = value;
m_ChargingInfoIsSet = true;
}
bool SmPolicyDecision::chargingInfoIsSet() const {
return m_ChargingInfoIsSet;
}
void SmPolicyDecision::unsetChargingInfo() {
m_ChargingInfoIsSet = false;
}
*/
std::map<std::string, TrafficControlData> SmPolicyDecision::getTraffContDecs()
const {
return m_TraffContDecs;
}
void SmPolicyDecision::setTraffContDecs(
std::map<std::string, TrafficControlData> const& value) {
m_TraffContDecs = value;
m_TraffContDecsIsSet = true;
}
bool SmPolicyDecision::traffContDecsIsSet() const {
return m_TraffContDecsIsSet;
}
void SmPolicyDecision::unsetTraffContDecs() {
m_TraffContDecsIsSet = false;
}
/*
std::map<std::string, UsageMonitoringData> SmPolicyDecision::getUmDecs() const {
return m_UmDecs;
}
void SmPolicyDecision::setUmDecs(
std::map<std::string, UsageMonitoringData> const& value) {
m_UmDecs = value;
m_UmDecsIsSet = true;
}
bool SmPolicyDecision::umDecsIsSet() const {
return m_UmDecsIsSet;
}
void SmPolicyDecision::unsetUmDecs() {
m_UmDecsIsSet = false;
}
std::map<std::string, QosCharacteristics> SmPolicyDecision::getQosChars()
const {
return m_QosChars;
}
void SmPolicyDecision::setQosChars(
std::map<std::string, QosCharacteristics> const& value) {
m_QosChars = value;
m_QosCharsIsSet = true;
}
bool SmPolicyDecision::qosCharsIsSet() const {
return m_QosCharsIsSet;
}
void SmPolicyDecision::unsetQosChars() {
m_QosCharsIsSet = false;
}
std::map<std::string, QosMonitoringData> SmPolicyDecision::getQosMonDecs()
const {
return m_QosMonDecs;
}
void SmPolicyDecision::setQosMonDecs(
std::map<std::string, QosMonitoringData> const& value) {
m_QosMonDecs = value;
m_QosMonDecsIsSet = true;
}
bool SmPolicyDecision::qosMonDecsIsSet() const {
return m_QosMonDecsIsSet;
}
void SmPolicyDecision::unsetQosMonDecs() {
m_QosMonDecsIsSet = false;
}
int32_t SmPolicyDecision::getReflectiveQoSTimer() const {
return m_ReflectiveQoSTimer;
}
void SmPolicyDecision::setReflectiveQoSTimer(int32_t const value) {
m_ReflectiveQoSTimer = value;
m_ReflectiveQoSTimerIsSet = true;
}
bool SmPolicyDecision::reflectiveQoSTimerIsSet() const {
return m_ReflectiveQoSTimerIsSet;
}
void SmPolicyDecision::unsetReflectiveQoSTimer() {
m_ReflectiveQoSTimerIsSet = false;
}
std::map<std::string, ConditionData> SmPolicyDecision::getConds() const {
return m_Conds;
}
void SmPolicyDecision::setConds(
std::map<std::string, ConditionData> const& value) {
m_Conds = value;
m_CondsIsSet = true;
}
bool SmPolicyDecision::condsIsSet() const {
return m_CondsIsSet;
}
void SmPolicyDecision::unsetConds() {
m_CondsIsSet = false;
}
std::string SmPolicyDecision::getRevalidationTime() const {
return m_RevalidationTime;
}
void SmPolicyDecision::setRevalidationTime(std::string const& value) {
m_RevalidationTime = value;
m_RevalidationTimeIsSet = true;
}
bool SmPolicyDecision::revalidationTimeIsSet() const {
return m_RevalidationTimeIsSet;
}
void SmPolicyDecision::unsetRevalidationTime() {
m_RevalidationTimeIsSet = false;
}
bool SmPolicyDecision::isOffline() const {
return m_Offline;
}
void SmPolicyDecision::setOffline(bool const value) {
m_Offline = value;
m_OfflineIsSet = true;
}
bool SmPolicyDecision::offlineIsSet() const {
return m_OfflineIsSet;
}
void SmPolicyDecision::unsetOffline() {
m_OfflineIsSet = false;
}
bool SmPolicyDecision::isOnline() const {
return m_Online;
}
void SmPolicyDecision::setOnline(bool const value) {
m_Online = value;
m_OnlineIsSet = true;
}
bool SmPolicyDecision::onlineIsSet() const {
return m_OnlineIsSet;
}
void SmPolicyDecision::unsetOnline() {
m_OnlineIsSet = false;
}
*/
std::vector<PolicyControlRequestTrigger>
SmPolicyDecision::getPolicyCtrlReqTriggers() const {
return m_PolicyCtrlReqTriggers;
}
void SmPolicyDecision::setPolicyCtrlReqTriggers(
std::vector<PolicyControlRequestTrigger> const& value) {
m_PolicyCtrlReqTriggers = value;
m_PolicyCtrlReqTriggersIsSet = true;
}
bool SmPolicyDecision::policyCtrlReqTriggersIsSet() const {
return m_PolicyCtrlReqTriggersIsSet;
}
void SmPolicyDecision::unsetPolicyCtrlReqTriggers() {
m_PolicyCtrlReqTriggersIsSet = false;
}
/*
std::vector<RequestedRuleData> SmPolicyDecision::getLastReqRuleData() const {
return m_LastReqRuleData;
}
void SmPolicyDecision::setLastReqRuleData(
std::vector<RequestedRuleData> const& value) {
m_LastReqRuleData = value;
m_LastReqRuleDataIsSet = true;
}
bool SmPolicyDecision::lastReqRuleDataIsSet() const {
return m_LastReqRuleDataIsSet;
}
void SmPolicyDecision::unsetLastReqRuleData() {
m_LastReqRuleDataIsSet = false;
}
RequestedUsageData SmPolicyDecision::getLastReqUsageData() const {
return m_LastReqUsageData;
}
void SmPolicyDecision::setLastReqUsageData(RequestedUsageData const& value) {
m_LastReqUsageData = value;
m_LastReqUsageDataIsSet = true;
}
bool SmPolicyDecision::lastReqUsageDataIsSet() const {
return m_LastReqUsageDataIsSet;
}
void SmPolicyDecision::unsetLastReqUsageData() {
m_LastReqUsageDataIsSet = false;
}
std::map<std::string, PresenceInfoRm> SmPolicyDecision::getPraInfos() const {
return m_PraInfos;
}
void SmPolicyDecision::setPraInfos(
std::map<std::string, PresenceInfoRm> const& value) {
m_PraInfos = value;
m_PraInfosIsSet = true;
}
bool SmPolicyDecision::praInfosIsSet() const {
return m_PraInfosIsSet;
}
void SmPolicyDecision::unsetPraInfos() {
m_PraInfosIsSet = false;
}
*/
int32_t SmPolicyDecision::getIpv4Index() const {
return m_Ipv4Index;
}
void SmPolicyDecision::setIpv4Index(int32_t const value) {
m_Ipv4Index = value;
m_Ipv4IndexIsSet = true;
}
bool SmPolicyDecision::ipv4IndexIsSet() const {
return m_Ipv4IndexIsSet;
}
void SmPolicyDecision::unsetIpv4Index() {
m_Ipv4IndexIsSet = false;
}
/*
int32_t SmPolicyDecision::getIpv6Index() const {
return m_Ipv6Index;
}
void SmPolicyDecision::setIpv6Index(int32_t const value) {
m_Ipv6Index = value;
m_Ipv6IndexIsSet = true;
}
bool SmPolicyDecision::ipv6IndexIsSet() const {
return m_Ipv6IndexIsSet;
}
void SmPolicyDecision::unsetIpv6Index() {
m_Ipv6IndexIsSet = false;
}
QosFlowUsage SmPolicyDecision::getQosFlowUsage() const {
return m_QosFlowUsage;
}
void SmPolicyDecision::setQosFlowUsage(QosFlowUsage const& value) {
m_QosFlowUsage = value;
m_QosFlowUsageIsSet = true;
}
bool SmPolicyDecision::qosFlowUsageIsSet() const {
return m_QosFlowUsageIsSet;
}
void SmPolicyDecision::unsetQosFlowUsage() {
m_QosFlowUsageIsSet = false;
}
SmPolicyAssociationReleaseCause SmPolicyDecision::getRelCause() const {
return m_RelCause;
}
void SmPolicyDecision::setRelCause(
SmPolicyAssociationReleaseCause const& value) {
m_RelCause = value;
m_RelCauseIsSet = true;
}
bool SmPolicyDecision::relCauseIsSet() const {
return m_RelCauseIsSet;
}
void SmPolicyDecision::unsetRelCause() {
m_RelCauseIsSet = false;
}
std::string SmPolicyDecision::getSuppFeat() const {
return m_SuppFeat;
}
void SmPolicyDecision::setSuppFeat(std::string const& value) {
m_SuppFeat = value;
m_SuppFeatIsSet = true;
}
bool SmPolicyDecision::suppFeatIsSet() const {
return m_SuppFeatIsSet;
}
void SmPolicyDecision::unsetSuppFeat() {
m_SuppFeatIsSet = false;
}
PortManagementContainer SmPolicyDecision::getTsnPortManContDstt() const {
return m_TsnPortManContDstt;
}
void SmPolicyDecision::setTsnPortManContDstt(
PortManagementContainer const& value) {
m_TsnPortManContDstt = value;
m_TsnPortManContDsttIsSet = true;
}
bool SmPolicyDecision::tsnPortManContDsttIsSet() const {
return m_TsnPortManContDsttIsSet;
}
void SmPolicyDecision::unsetTsnPortManContDstt() {
m_TsnPortManContDsttIsSet = false;
}
std::vector<PortManagementContainer> SmPolicyDecision::getTsnPortManContNwtts()
const {
return m_TsnPortManContNwtts;
}
void SmPolicyDecision::setTsnPortManContNwtts(
std::vector<PortManagementContainer> const& value) {
m_TsnPortManContNwtts = value;
m_TsnPortManContNwttsIsSet = true;
}
bool SmPolicyDecision::tsnPortManContNwttsIsSet() const {
return m_TsnPortManContNwttsIsSet;
}
void SmPolicyDecision::unsetTsnPortManContNwtts() {
m_TsnPortManContNwttsIsSet = 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.
*/
/*
* SmPolicyDecision.h
*
*
*/
#ifndef SmPolicyDecision_H_
#define SmPolicyDecision_H_
// TODO unsupported messages are commented out
//#include "UsageMonitoringData.h"
//#include "ChargingData.h"
#include "PccRule.h"
//#include "SmPolicyAssociationReleaseCause.h"
#include <string>
//#include "ChargingInformation.h"
//#include "ConditionData.h"
//#include "RequestedRuleData.h"
#include <vector>
//#include "QosCharacteristics.h"
//#include "PresenceInfoRm.h"
#include "PolicyControlRequestTrigger.h"
//#include "RequestedUsageData.h"
#include "TrafficControlData.h"
//#include "SessionRule.h"
//#include "QosFlowUsage.h"
//#include "QosData.h"
//#include "QosMonitoringData.h"
//#include "PortManagementContainer.h"
#include <map>
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class SmPolicyDecision {
public:
SmPolicyDecision();
virtual ~SmPolicyDecision() = 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 SmPolicyDecision& rhs) const;
bool operator!=(const SmPolicyDecision& rhs) const;
/////////////////////////////////////////////
/// SmPolicyDecision members
/// <summary>
/// A map of Sessionrules with the content being the SessionRule as described
/// in subclause 5.6.2.7.
/// </summary>
// std::map<std::string, SessionRule> getSessRules() const;
// void setSessRules(std::map<std::string, SessionRule> const& value);
// bool sessRulesIsSet() const;
// void unsetSessRules();
/// <summary>
/// A map of PCC rules with the content being the PCCRule as described in
/// subclause 5.6.2.6.
/// </summary>
std::map<std::string, PccRule> getPccRules() const;
void setPccRules(std::map<std::string, PccRule> const& value);
bool pccRulesIsSet() const;
void unsetPccRules();
/// <summary>
/// If it is included and set to true, it indicates the P-CSCF Restoration is
/// requested.
/// </summary>
// bool isPcscfRestIndication() const;
// void setPcscfRestIndication(bool const value);
// bool pcscfRestIndicationIsSet() const;
// void unsetPcscfRestIndication();
/// <summary>
/// Map of QoS data policy decisions.
/// </summary>
// std::map<std::string, QosData> getQosDecs() const;
// void setQosDecs(std::map<std::string, QosData> const& value);
// bool qosDecsIsSet() const;
// void unsetQosDecs();
/// <summary>
/// Map of Charging data policy decisions.
/// </summary>
// std::map<std::string, ChargingData> getChgDecs() const;
// void setChgDecs(std::map<std::string, ChargingData> const& value);
// bool chgDecsIsSet() const;
// void unsetChgDecs();
/// <summary>
///
/// </summary>
// ChargingInformation getChargingInfo() const;
// void setChargingInfo(ChargingInformation const& value);
// bool chargingInfoIsSet() const;
// void unsetChargingInfo();
/// <summary>
/// Map of Traffic Control data policy decisions.
/// </summary>
std::map<std::string, TrafficControlData> getTraffContDecs() const;
void setTraffContDecs(std::map<std::string, TrafficControlData> const& value);
bool traffContDecsIsSet() const;
void unsetTraffContDecs();
/// <summary>
/// Map of Usage Monitoring data policy decisions.
/// </summary>
/*
std::map<std::string, UsageMonitoringData> getUmDecs() const;
void setUmDecs(std::map<std::string, UsageMonitoringData> const& value);
bool umDecsIsSet() const;
void unsetUmDecs();
*/
/// <summary>
/// Map of QoS characteristics for non standard 5QIs. This map uses the 5QI
/// values as keys.
/// </summary>
/*
std::map<std::string, QosCharacteristics> getQosChars() const;
void setQosChars(std::map<std::string, QosCharacteristics> const& value);
bool qosCharsIsSet() const;
void unsetQosChars();
*/
/// <summary>
/// Map of QoS Monitoring data policy decisions.
/// </summary>
/*
std::map<std::string, QosMonitoringData> getQosMonDecs() const;
void setQosMonDecs(std::map<std::string, QosMonitoringData> const& value);
bool qosMonDecsIsSet() const;
void unsetQosMonDecs();
*/
/// <summary>
///
/// </summary>
/*
int32_t getReflectiveQoSTimer() const;
void setReflectiveQoSTimer(int32_t const value);
bool reflectiveQoSTimerIsSet() const;
void unsetReflectiveQoSTimer();
*/
/// <summary>
/// A map of condition data with the content being as described in
/// subclause 5.6.2.9.
/// </summary>
/*
std::map<std::string, ConditionData> getConds() const;
void setConds(std::map<std::string, ConditionData> const& value);
bool condsIsSet() const;
void unsetConds();
*/
/// <summary>
///
/// </summary>
/*
std::string getRevalidationTime() const;
void setRevalidationTime(std::string const& value);
bool revalidationTimeIsSet() const;
void unsetRevalidationTime();
*/
/// <summary>
/// Indicates the offline charging is applicable to the PDU session or PCC
/// rule.
/// </summary>
/*
bool isOffline() const;
void setOffline(bool const value);
bool offlineIsSet() const;
void unsetOffline();
*/
/// <summary>
/// Indicates the online charging is applicable to the PDU session or PCC
/// rule.
/// </summary>
/*
bool isOnline() const;
void setOnline(bool const value);
bool onlineIsSet() const;
void unsetOnline();
*/
/// <summary>
/// Defines the policy control request triggers subscribed by the PCF.
/// </summary>
std::vector<PolicyControlRequestTrigger> getPolicyCtrlReqTriggers() const;
void setPolicyCtrlReqTriggers(
std::vector<PolicyControlRequestTrigger> const& value);
bool policyCtrlReqTriggersIsSet() const;
void unsetPolicyCtrlReqTriggers();
/// <summary>
/// Defines the last list of rule control data requested by the PCF.
/// </summary>
/*
std::vector<RequestedRuleData> getLastReqRuleData() const;
void setLastReqRuleData(std::vector<RequestedRuleData> const& value);
bool lastReqRuleDataIsSet() const;
void unsetLastReqRuleData();
*/
/// <summary>
///
/// </summary>
/*
RequestedUsageData getLastReqUsageData() const;
void setLastReqUsageData(RequestedUsageData const& value);
bool lastReqUsageDataIsSet() const;
void unsetLastReqUsageData();
*/
/// <summary>
/// Map of PRA information.
/// </summary>
/*
std::map<std::string, PresenceInfoRm> getPraInfos() const;
void setPraInfos(std::map<std::string, PresenceInfoRm> const& value);
bool praInfosIsSet() const;
void unsetPraInfos();
*/
/// <summary>
///
/// </summary>
int32_t getIpv4Index() const;
void setIpv4Index(int32_t const value);
bool ipv4IndexIsSet() const;
void unsetIpv4Index();
/// <summary>
///
/// </summary>
/*
int32_t getIpv6Index() const;
void setIpv6Index(int32_t const value);
bool ipv6IndexIsSet() const;
void unsetIpv6Index();
*/
/// <summary>
///
/// </summary>
/*
QosFlowUsage getQosFlowUsage() const;
void setQosFlowUsage(QosFlowUsage const& value);
bool qosFlowUsageIsSet() const;
void unsetQosFlowUsage();
*/
/// <summary>
///
/// </summary>
/*
SmPolicyAssociationReleaseCause getRelCause() const;
void setRelCause(SmPolicyAssociationReleaseCause const& value);
bool relCauseIsSet() const;
void unsetRelCause();
*/
/// <summary>
///
/// </summary>
/*
std::string getSuppFeat() const;
void setSuppFeat(std::string const& value);
bool suppFeatIsSet() const;
void unsetSuppFeat();
*/
/// <summary>
///
/// </summary>
/*
PortManagementContainer getTsnPortManContDstt() const;
void setTsnPortManContDstt(PortManagementContainer const& value);
bool tsnPortManContDsttIsSet() const;
void unsetTsnPortManContDstt();
*/
/// <summary>
///
/// </summary>
/*
std::vector<PortManagementContainer> getTsnPortManContNwtts() const;
void setTsnPortManContNwtts(
std::vector<PortManagementContainer> const& value);
bool tsnPortManContNwttsIsSet() const;
void unsetTsnPortManContNwtts();
*/
friend void to_json(nlohmann::json& j, const SmPolicyDecision& o);
friend void from_json(const nlohmann::json& j, SmPolicyDecision& o);
protected:
// std::map<std::string, SessionRule> m_SessRules;
// bool m_SessRulesIsSet;
std::map<std::string, PccRule> m_PccRules;
bool m_PccRulesIsSet;
// bool m_PcscfRestIndication;
// bool m_PcscfRestIndicationIsSet;
// std::map<std::string, QosData> m_QosDecs;
// bool m_QosDecsIsSet;
// std::map<std::string, ChargingData> m_ChgDecs;
// bool m_ChgDecsIsSet;
// ChargingInformation m_ChargingInfo;
// bool m_ChargingInfoIsSet;
std::map<std::string, TrafficControlData> m_TraffContDecs;
bool m_TraffContDecsIsSet;
// std::map<std::string, UsageMonitoringData> m_UmDecs;
// bool m_UmDecsIsSet;
// std::map<std::string, QosCharacteristics> m_QosChars;
// bool m_QosCharsIsSet;
// std::map<std::string, QosMonitoringData> m_QosMonDecs;
// bool m_QosMonDecsIsSet;
// int32_t m_ReflectiveQoSTimer;
// bool m_ReflectiveQoSTimerIsSet;
// std::map<std::string, ConditionData> m_Conds;
// bool m_CondsIsSet;
// std::string m_RevalidationTime;
// bool m_RevalidationTimeIsSet;
// bool m_Offline;
// bool m_OfflineIsSet;
// bool m_Online;
// bool m_OnlineIsSet;
std::vector<PolicyControlRequestTrigger> m_PolicyCtrlReqTriggers;
bool m_PolicyCtrlReqTriggersIsSet;
// std::vector<RequestedRuleData> m_LastReqRuleData;
// bool m_LastReqRuleDataIsSet;
// RequestedUsageData m_LastReqUsageData;
// bool m_LastReqUsageDataIsSet;
// std::map<std::string, PresenceInfoRm> m_PraInfos;
// bool m_PraInfosIsSet;
int32_t m_Ipv4Index;
bool m_Ipv4IndexIsSet;
// int32_t m_Ipv6Index;
// bool m_Ipv6IndexIsSet;
// QosFlowUsage m_QosFlowUsage;
// bool m_QosFlowUsageIsSet;
// SmPolicyAssociationReleaseCause m_RelCause;
// bool m_RelCauseIsSet;
// std::string m_SuppFeat;
// bool m_SuppFeatIsSet;
// PortManagementContainer m_TsnPortManContDstt;
// bool m_TsnPortManContDsttIsSet;
// std::vector<PortManagementContainer> m_TsnPortManContNwtts;
// bool m_TsnPortManContNwttsIsSet;
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* SmPolicyDecision_H_ */
...@@ -29,6 +29,21 @@ void Snssai::validate() { ...@@ -29,6 +29,21 @@ void Snssai::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool Snssai::operator==(const Snssai& rhs) const {
return
(getSst() == rhs.getSst()) &&
((!sdIsSet() && !rhs.sdIsSet()) ||
(sdIsSet() && rhs.sdIsSet() && getSd() == rhs.getSd()))
;
}
bool Snssai::operator!=(const Snssai& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Snssai& o) { void to_json(nlohmann::json& j, const Snssai& o) {
j = nlohmann::json(); j = nlohmann::json();
j["sst"] = o.m_Sst; j["sst"] = o.m_Sst;
......
...@@ -39,6 +39,9 @@ class Snssai { ...@@ -39,6 +39,9 @@ class Snssai {
void validate(); void validate();
bool operator==(const Snssai& rhs) const;
bool operator!=(const Snssai& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// Snssai members /// Snssai members
......
...@@ -27,6 +27,29 @@ void Tai::validate() { ...@@ -27,6 +27,29 @@ void Tai::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool Tai::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool Tai::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
// TODO implement validation
}
bool Tai::operator==(const Tai& rhs) const {
return
(getPlmnId() == rhs.getPlmnId()) &&
(getTac() == rhs.getTac())
;
}
bool Tai::operator!=(const Tai& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Tai& o) { void to_json(nlohmann::json& j, const Tai& o) {
j = nlohmann::json(); j = nlohmann::json();
j["plmnId"] = o.m_PlmnId; j["plmnId"] = o.m_PlmnId;
......
...@@ -37,6 +37,13 @@ class Tai { ...@@ -37,6 +37,13 @@ class Tai {
void validate(); void validate();
bool validate(std::stringstream& msg) const;
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Tai& rhs) const;
bool operator!=(const Tai& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// Tai members /// Tai members
......
...@@ -34,6 +34,40 @@ void TraceData::validate() { ...@@ -34,6 +34,40 @@ void TraceData::validate() {
// TODO: implement validation // TODO: implement validation
} }
bool TraceData::operator==(const TraceData& rhs) const {
return
(getTraceRef() == rhs.getTraceRef()) &&
//(getTraceDepth() == rhs.getTraceDepth()) &&
(getNeTypeList() == rhs.getNeTypeList()) &&
(getEventList() == rhs.getEventList()) &&
((!collectionEntityIpv4AddrIsSet() &&
!rhs.collectionEntityIpv4AddrIsSet()) ||
(collectionEntityIpv4AddrIsSet() &&
rhs.collectionEntityIpv4AddrIsSet() &&
getCollectionEntityIpv4Addr() == rhs.getCollectionEntityIpv4Addr())) &&
((!collectionEntityIpv6AddrIsSet() &&
!rhs.collectionEntityIpv6AddrIsSet()) ||
(collectionEntityIpv6AddrIsSet() &&
rhs.collectionEntityIpv6AddrIsSet() &&
getCollectionEntityIpv6Addr() == rhs.getCollectionEntityIpv6Addr())) &&
((!interfaceListIsSet() && !rhs.interfaceListIsSet()) ||
(interfaceListIsSet() && rhs.interfaceListIsSet() &&
getInterfaceList() == rhs.getInterfaceList()))
;
}
bool TraceData::operator!=(const TraceData& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const TraceData& o) { void to_json(nlohmann::json& j, const TraceData& o) {
j = nlohmann::json(); j = nlohmann::json();
j["traceRef"] = o.m_TraceRef; j["traceRef"] = o.m_TraceRef;
......
...@@ -37,6 +37,9 @@ class TraceData { ...@@ -37,6 +37,9 @@ class TraceData {
void validate(); void validate();
bool operator==(const TraceData& rhs) const;
bool operator!=(const TraceData& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// TraceData members /// TraceData 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 "TrafficControlData.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace smf_server {
namespace model {
TrafficControlData::TrafficControlData() {
m_TcId = "";
m_FlowStatusIsSet = false;
m_RedirectInfoIsSet = false;
m_AddRedirectInfoIsSet = false;
m_MuteNotif = false;
m_MuteNotifIsSet = false;
m_TrafficSteeringPolIdDl = "";
m_TrafficSteeringPolIdDlIsSet = false;
m_TrafficSteeringPolIdUl = "";
m_TrafficSteeringPolIdUlIsSet = false;
m_RouteToLocsIsSet = false;
m_TraffCorreInd = false;
m_TraffCorreIndIsSet = false;
// m_UpPathChgEventIsSet = false;
// m_SteerFunIsSet = false;
// m_SteerModeDlIsSet = false;
// m_SteerModeUlIsSet = false;
// m_MulAccCtrlIsSet = false;
}
void TrafficControlData::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool TrafficControlData::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool TrafficControlData::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "TrafficControlData" : pathPrefix;
if (addRedirectInfoIsSet()) {
const std::vector<RedirectInformation>& value = m_AddRedirectInfo;
const std::string currentValuePath = _pathPrefix + ".addRedirectInfo";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const RedirectInformation& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
success = value.validate(msg, currentValuePath + ".addRedirectInfo") &&
success;
i++;
}
}
}
if (routeToLocsIsSet()) {
const std::vector<RouteToLocation>& value = m_RouteToLocs;
const std::string currentValuePath = _pathPrefix + ".routeToLocs";
if (value.size() < 1) {
success = false;
msg << currentValuePath << ": must have at least 1 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const RouteToLocation& value : value) {
const std::string currentValuePath =
oldValuePath + "[" + std::to_string(i) + "]";
success =
value.validate(msg, currentValuePath + ".routeToLocs") && success;
i++;
}
}
}
return success;
}
bool TrafficControlData::operator==(const TrafficControlData& rhs) const {
return
(getTcId() == rhs.getTcId()) &&
((!flowStatusIsSet() && !rhs.flowStatusIsSet()) ||
(flowStatusIsSet() && rhs.flowStatusIsSet() &&
getFlowStatus() == rhs.getFlowStatus())) &&
((!redirectInfoIsSet() && !rhs.redirectInfoIsSet()) ||
(redirectInfoIsSet() && rhs.redirectInfoIsSet() &&
getRedirectInfo() == rhs.getRedirectInfo())) &&
((!addRedirectInfoIsSet() && !rhs.addRedirectInfoIsSet()) ||
(addRedirectInfoIsSet() && rhs.addRedirectInfoIsSet() &&
getAddRedirectInfo() == rhs.getAddRedirectInfo())) &&
((!muteNotifIsSet() && !rhs.muteNotifIsSet()) ||
(muteNotifIsSet() && rhs.muteNotifIsSet() &&
isMuteNotif() == rhs.isMuteNotif())) &&
((!trafficSteeringPolIdDlIsSet() && !rhs.trafficSteeringPolIdDlIsSet()) ||
(trafficSteeringPolIdDlIsSet() && rhs.trafficSteeringPolIdDlIsSet() &&
getTrafficSteeringPolIdDl() == rhs.getTrafficSteeringPolIdDl())) &&
((!trafficSteeringPolIdUlIsSet() && !rhs.trafficSteeringPolIdUlIsSet()) ||
(trafficSteeringPolIdUlIsSet() && rhs.trafficSteeringPolIdUlIsSet() &&
getTrafficSteeringPolIdUl() == rhs.getTrafficSteeringPolIdUl())) &&
((!routeToLocsIsSet() && !rhs.routeToLocsIsSet()) ||
(routeToLocsIsSet() && rhs.routeToLocsIsSet() &&
getRouteToLocs() == rhs.getRouteToLocs())) &&
((!traffCorreIndIsSet() && !rhs.traffCorreIndIsSet()) ||
(traffCorreIndIsSet() && rhs.traffCorreIndIsSet() &&
isTraffCorreInd() == rhs.isTraffCorreInd()))
/*
&&
((!upPathChgEventIsSet() && !rhs.upPathChgEventIsSet()) ||
(upPathChgEventIsSet() && rhs.upPathChgEventIsSet() &&
getUpPathChgEvent() == rhs.getUpPathChgEvent())) &&
((!steerFunIsSet() && !rhs.steerFunIsSet()) ||
(steerFunIsSet() && rhs.steerFunIsSet() &&
getSteerFun() == rhs.getSteerFun())) &&
((!steerModeDlIsSet() && !rhs.steerModeDlIsSet()) ||
(steerModeDlIsSet() && rhs.steerModeDlIsSet() &&
getSteerModeDl() == rhs.getSteerModeDl())) &&
((!steerModeUlIsSet() && !rhs.steerModeUlIsSet()) ||
(steerModeUlIsSet() && rhs.steerModeUlIsSet() &&
getSteerModeUl() == rhs.getSteerModeUl())) &&
((!mulAccCtrlIsSet() && !rhs.mulAccCtrlIsSet()) ||
(mulAccCtrlIsSet() && rhs.mulAccCtrlIsSet() &&
getMulAccCtrl() == rhs.getMulAccCtrl()))
*/
;
}
bool TrafficControlData::operator!=(const TrafficControlData& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const TrafficControlData& o) {
j = nlohmann::json();
j["tcId"] = o.m_TcId;
if (o.flowStatusIsSet()) j["flowStatus"] = o.m_FlowStatus;
if (o.redirectInfoIsSet()) j["redirectInfo"] = o.m_RedirectInfo;
if (o.addRedirectInfoIsSet() || !o.m_AddRedirectInfo.empty())
j["addRedirectInfo"] = o.m_AddRedirectInfo;
if (o.muteNotifIsSet()) j["muteNotif"] = o.m_MuteNotif;
if (o.trafficSteeringPolIdDlIsSet())
j["trafficSteeringPolIdDl"] = o.m_TrafficSteeringPolIdDl;
if (o.trafficSteeringPolIdUlIsSet())
j["trafficSteeringPolIdUl"] = o.m_TrafficSteeringPolIdUl;
if (o.routeToLocsIsSet() || !o.m_RouteToLocs.empty())
j["routeToLocs"] = o.m_RouteToLocs;
if (o.traffCorreIndIsSet()) j["traffCorreInd"] = o.m_TraffCorreInd;
/*
if (o.upPathChgEventIsSet()) j["upPathChgEvent"] = o.m_UpPathChgEvent;
if (o.steerFunIsSet()) j["steerFun"] = o.m_SteerFun;
if (o.steerModeDlIsSet()) j["steerModeDl"] = o.m_SteerModeDl;
if (o.steerModeUlIsSet()) j["steerModeUl"] = o.m_SteerModeUl;
if (o.mulAccCtrlIsSet()) j["mulAccCtrl"] = o.m_MulAccCtrl;
*/
}
void from_json(const nlohmann::json& j, TrafficControlData& o) {
j.at("tcId").get_to(o.m_TcId);
if (j.find("flowStatus") != j.end()) {
j.at("flowStatus").get_to(o.m_FlowStatus);
o.m_FlowStatusIsSet = true;
}
if (j.find("redirectInfo") != j.end()) {
j.at("redirectInfo").get_to(o.m_RedirectInfo);
o.m_RedirectInfoIsSet = true;
}
if (j.find("addRedirectInfo") != j.end()) {
j.at("addRedirectInfo").get_to(o.m_AddRedirectInfo);
o.m_AddRedirectInfoIsSet = true;
}
if (j.find("muteNotif") != j.end()) {
j.at("muteNotif").get_to(o.m_MuteNotif);
o.m_MuteNotifIsSet = true;
}
if (j.find("trafficSteeringPolIdDl") != j.end()) {
j.at("trafficSteeringPolIdDl").get_to(o.m_TrafficSteeringPolIdDl);
o.m_TrafficSteeringPolIdDlIsSet = true;
}
if (j.find("trafficSteeringPolIdUl") != j.end()) {
j.at("trafficSteeringPolIdUl").get_to(o.m_TrafficSteeringPolIdUl);
o.m_TrafficSteeringPolIdUlIsSet = true;
}
if (j.find("routeToLocs") != j.end()) {
j.at("routeToLocs").get_to(o.m_RouteToLocs);
o.m_RouteToLocsIsSet = true;
}
if (j.find("traffCorreInd") != j.end()) {
j.at("traffCorreInd").get_to(o.m_TraffCorreInd);
o.m_TraffCorreIndIsSet = true;
}
/*
if (j.find("upPathChgEvent") != j.end()) {
j.at("upPathChgEvent").get_to(o.m_UpPathChgEvent);
o.m_UpPathChgEventIsSet = true;
}
if (j.find("steerFun") != j.end()) {
j.at("steerFun").get_to(o.m_SteerFun);
o.m_SteerFunIsSet = true;
}
if (j.find("steerModeDl") != j.end()) {
j.at("steerModeDl").get_to(o.m_SteerModeDl);
o.m_SteerModeDlIsSet = true;
}
if (j.find("steerModeUl") != j.end()) {
j.at("steerModeUl").get_to(o.m_SteerModeUl);
o.m_SteerModeUlIsSet = true;
}
if (j.find("mulAccCtrl") != j.end()) {
j.at("mulAccCtrl").get_to(o.m_MulAccCtrl);
o.m_MulAccCtrlIsSet = true;
} */
}
std::string TrafficControlData::getTcId() const {
return m_TcId;
}
void TrafficControlData::setTcId(std::string const& value) {
m_TcId = value;
}
FlowStatus TrafficControlData::getFlowStatus() const {
return m_FlowStatus;
}
void TrafficControlData::setFlowStatus(FlowStatus const& value) {
m_FlowStatus = value;
m_FlowStatusIsSet = true;
}
bool TrafficControlData::flowStatusIsSet() const {
return m_FlowStatusIsSet;
}
void TrafficControlData::unsetFlowStatus() {
m_FlowStatusIsSet = false;
}
RedirectInformation TrafficControlData::getRedirectInfo() const {
return m_RedirectInfo;
}
void TrafficControlData::setRedirectInfo(RedirectInformation const& value) {
m_RedirectInfo = value;
m_RedirectInfoIsSet = true;
}
bool TrafficControlData::redirectInfoIsSet() const {
return m_RedirectInfoIsSet;
}
void TrafficControlData::unsetRedirectInfo() {
m_RedirectInfoIsSet = false;
}
std::vector<RedirectInformation> TrafficControlData::getAddRedirectInfo()
const {
return m_AddRedirectInfo;
}
void TrafficControlData::setAddRedirectInfo(
std::vector<RedirectInformation> const& value) {
m_AddRedirectInfo = value;
m_AddRedirectInfoIsSet = true;
}
bool TrafficControlData::addRedirectInfoIsSet() const {
return m_AddRedirectInfoIsSet;
}
void TrafficControlData::unsetAddRedirectInfo() {
m_AddRedirectInfoIsSet = false;
}
bool TrafficControlData::isMuteNotif() const {
return m_MuteNotif;
}
void TrafficControlData::setMuteNotif(bool const value) {
m_MuteNotif = value;
m_MuteNotifIsSet = true;
}
bool TrafficControlData::muteNotifIsSet() const {
return m_MuteNotifIsSet;
}
void TrafficControlData::unsetMuteNotif() {
m_MuteNotifIsSet = false;
}
std::string TrafficControlData::getTrafficSteeringPolIdDl() const {
return m_TrafficSteeringPolIdDl;
}
void TrafficControlData::setTrafficSteeringPolIdDl(std::string const& value) {
m_TrafficSteeringPolIdDl = value;
m_TrafficSteeringPolIdDlIsSet = true;
}
bool TrafficControlData::trafficSteeringPolIdDlIsSet() const {
return m_TrafficSteeringPolIdDlIsSet;
}
void TrafficControlData::unsetTrafficSteeringPolIdDl() {
m_TrafficSteeringPolIdDlIsSet = false;
}
std::string TrafficControlData::getTrafficSteeringPolIdUl() const {
return m_TrafficSteeringPolIdUl;
}
void TrafficControlData::setTrafficSteeringPolIdUl(std::string const& value) {
m_TrafficSteeringPolIdUl = value;
m_TrafficSteeringPolIdUlIsSet = true;
}
bool TrafficControlData::trafficSteeringPolIdUlIsSet() const {
return m_TrafficSteeringPolIdUlIsSet;
}
void TrafficControlData::unsetTrafficSteeringPolIdUl() {
m_TrafficSteeringPolIdUlIsSet = false;
}
std::vector<RouteToLocation> TrafficControlData::getRouteToLocs() const {
return m_RouteToLocs;
}
void TrafficControlData::setRouteToLocs(
std::vector<RouteToLocation> const& value) {
m_RouteToLocs = value;
m_RouteToLocsIsSet = true;
}
bool TrafficControlData::routeToLocsIsSet() const {
return m_RouteToLocsIsSet;
}
void TrafficControlData::unsetRouteToLocs() {
m_RouteToLocsIsSet = false;
}
bool TrafficControlData::isTraffCorreInd() const {
return m_TraffCorreInd;
}
void TrafficControlData::setTraffCorreInd(bool const value) {
m_TraffCorreInd = value;
m_TraffCorreIndIsSet = true;
}
bool TrafficControlData::traffCorreIndIsSet() const {
return m_TraffCorreIndIsSet;
}
void TrafficControlData::unsetTraffCorreInd() {
m_TraffCorreIndIsSet = false;
}
/*
UpPathChgEvent TrafficControlData::getUpPathChgEvent() const {
return m_UpPathChgEvent;
}
void TrafficControlData::setUpPathChgEvent(UpPathChgEvent const& value) {
m_UpPathChgEvent = value;
m_UpPathChgEventIsSet = true;
}
bool TrafficControlData::upPathChgEventIsSet() const {
return m_UpPathChgEventIsSet;
}
void TrafficControlData::unsetUpPathChgEvent() {
m_UpPathChgEventIsSet = false;
}
SteeringFunctionality TrafficControlData::getSteerFun() const {
return m_SteerFun;
}
void TrafficControlData::setSteerFun(SteeringFunctionality const& value) {
m_SteerFun = value;
m_SteerFunIsSet = true;
}
bool TrafficControlData::steerFunIsSet() const {
return m_SteerFunIsSet;
}
void TrafficControlData::unsetSteerFun() {
m_SteerFunIsSet = false;
}
SteeringMode TrafficControlData::getSteerModeDl() const {
return m_SteerModeDl;
}
void TrafficControlData::setSteerModeDl(SteeringMode const& value) {
m_SteerModeDl = value;
m_SteerModeDlIsSet = true;
}
bool TrafficControlData::steerModeDlIsSet() const {
return m_SteerModeDlIsSet;
}
void TrafficControlData::unsetSteerModeDl() {
m_SteerModeDlIsSet = false;
}
SteeringMode TrafficControlData::getSteerModeUl() const {
return m_SteerModeUl;
}
void TrafficControlData::setSteerModeUl(SteeringMode const& value) {
m_SteerModeUl = value;
m_SteerModeUlIsSet = true;
}
bool TrafficControlData::steerModeUlIsSet() const {
return m_SteerModeUlIsSet;
}
void TrafficControlData::unsetSteerModeUl() {
m_SteerModeUlIsSet = false;
}
MulticastAccessControl TrafficControlData::getMulAccCtrl() const {
return m_MulAccCtrl;
}
void TrafficControlData::setMulAccCtrl(MulticastAccessControl const& value) {
m_MulAccCtrl = value;
m_MulAccCtrlIsSet = true;
}
bool TrafficControlData::mulAccCtrlIsSet() const {
return m_MulAccCtrlIsSet;
}
void TrafficControlData::unsetMulAccCtrl() {
m_MulAccCtrlIsSet = 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.
*/
/*
* TrafficControlData.h
*
*
*/
#ifndef TrafficControlData_H_
#define TrafficControlData_H_
#include "RedirectInformation.h"
//#include "SteeringFunctionality.h"
#include "FlowStatus.h"
#include <string>
//#include "MulticastAccessControl.h"
//#include "SteeringMode.h"
#include "RouteToLocation.h"
#include <vector>
//#include "UpPathChgEvent.h"
#include <nlohmann/json.hpp>
// TODO unsupported models are commented out
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class TrafficControlData {
public:
TrafficControlData();
virtual ~TrafficControlData() = 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 TrafficControlData& rhs) const;
bool operator!=(const TrafficControlData& rhs) const;
/////////////////////////////////////////////
/// TrafficControlData members
/// <summary>
/// Univocally identifies the traffic control policy data within a PDU
/// session.
/// </summary>
std::string getTcId() const;
void setTcId(std::string const& value);
/// <summary>
///
/// </summary>
FlowStatus getFlowStatus() const;
void setFlowStatus(FlowStatus const& value);
bool flowStatusIsSet() const;
void unsetFlowStatus();
/// <summary>
///
/// </summary>
RedirectInformation getRedirectInfo() const;
void setRedirectInfo(RedirectInformation const& value);
bool redirectInfoIsSet() const;
void unsetRedirectInfo();
/// <summary>
///
/// </summary>
std::vector<RedirectInformation> getAddRedirectInfo() const;
void setAddRedirectInfo(std::vector<RedirectInformation> const& value);
bool addRedirectInfoIsSet() const;
void unsetAddRedirectInfo();
/// <summary>
/// Indicates whether applicat&#39;on&#39;s start or stop notification is to
/// be muted.
/// </summary>
bool isMuteNotif() const;
void setMuteNotif(bool const value);
bool muteNotifIsSet() const;
void unsetMuteNotif();
/// <summary>
/// Reference to a pre-configured traffic steering policy for downlink traffic
/// at the SMF.
/// </summary>
std::string getTrafficSteeringPolIdDl() const;
void setTrafficSteeringPolIdDl(std::string const& value);
bool trafficSteeringPolIdDlIsSet() const;
void unsetTrafficSteeringPolIdDl();
/// <summary>
/// Reference to a pre-configured traffic steering policy for uplink traffic
/// at the SMF.
/// </summary>
std::string getTrafficSteeringPolIdUl() const;
void setTrafficSteeringPolIdUl(std::string const& value);
bool trafficSteeringPolIdUlIsSet() const;
void unsetTrafficSteeringPolIdUl();
/// <summary>
/// A list of location which the traffic shall be routed to for the AF request
/// </summary>
std::vector<RouteToLocation> getRouteToLocs() const;
void setRouteToLocs(std::vector<RouteToLocation> const& value);
bool routeToLocsIsSet() const;
void unsetRouteToLocs();
/// <summary>
///
/// </summary>
bool isTraffCorreInd() const;
void setTraffCorreInd(bool const value);
bool traffCorreIndIsSet() const;
void unsetTraffCorreInd();
/// <summary>
///
/// </summary>
/*
UpPathChgEvent getUpPathChgEvent() const;
void setUpPathChgEvent(UpPathChgEvent const& value);
bool upPathChgEventIsSet() const;
void unsetUpPathChgEvent();
/// <summary>
///
/// </summary>
SteeringFunctionality getSteerFun() const;
void setSteerFun(SteeringFunctionality const& value);
bool steerFunIsSet() const;
void unsetSteerFun();
/// <summary>
///
/// </summary>
SteeringMode getSteerModeDl() const;
void setSteerModeDl(SteeringMode const& value);
bool steerModeDlIsSet() const;
void unsetSteerModeDl();
/// <summary>
///
/// </summary>
SteeringMode getSteerModeUl() const;
void setSteerModeUl(SteeringMode const& value);
bool steerModeUlIsSet() const;
void unsetSteerModeUl();
/// <summary>
///
/// </summary>
MulticastAccessControl getMulAccCtrl() const;
void setMulAccCtrl(MulticastAccessControl const& value);
bool mulAccCtrlIsSet() const;
void unsetMulAccCtrl();
*/
friend void to_json(nlohmann::json& j, const TrafficControlData& o);
friend void from_json(const nlohmann::json& j, TrafficControlData& o);
protected:
std::string m_TcId;
FlowStatus m_FlowStatus;
bool m_FlowStatusIsSet;
RedirectInformation m_RedirectInfo;
bool m_RedirectInfoIsSet;
std::vector<RedirectInformation> m_AddRedirectInfo;
bool m_AddRedirectInfoIsSet;
bool m_MuteNotif;
bool m_MuteNotifIsSet;
std::string m_TrafficSteeringPolIdDl;
bool m_TrafficSteeringPolIdDlIsSet;
std::string m_TrafficSteeringPolIdUl;
bool m_TrafficSteeringPolIdUlIsSet;
std::vector<RouteToLocation> m_RouteToLocs;
bool m_RouteToLocsIsSet;
bool m_TraffCorreInd;
bool m_TraffCorreIndIsSet;
/*
UpPathChgEvent m_UpPathChgEvent;
bool m_UpPathChgEventIsSet;
SteeringFunctionality m_SteerFun;
bool m_SteerFunIsSet;
SteeringMode m_SteerModeDl;
bool m_SteerModeDlIsSet;
SteeringMode m_SteerModeUl;
bool m_SteerModeUlIsSet;
MulticastAccessControl m_MulAccCtrl;
bool m_MulAccCtrlIsSet;
*/
};
} // namespace model
} // namespace smf_server
} // namespace oai
#endif /* TrafficControlData_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 "UserLocation.h" #include "UserLocation.h"
#include "Helpers.h"
#include <sstream>
namespace oai { namespace oai {
namespace smf_server { namespace smf_server {
...@@ -23,10 +26,45 @@ UserLocation::UserLocation() { ...@@ -23,10 +26,45 @@ UserLocation::UserLocation() {
m_N3gaLocationIsSet = false; m_N3gaLocationIsSet = false;
} }
UserLocation::~UserLocation() {} void UserLocation::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool UserLocation::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool UserLocation::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "UserLocation" : pathPrefix;
return success;
}
bool UserLocation::operator==(const UserLocation& rhs) const {
return
((!eutraLocationIsSet() && !rhs.eutraLocationIsSet()) ||
(eutraLocationIsSet() && rhs.eutraLocationIsSet() &&
getEutraLocation() == rhs.getEutraLocation())) &&
((!nrLocationIsSet() && !rhs.nrLocationIsSet()) ||
(nrLocationIsSet() && rhs.nrLocationIsSet() &&
getNrLocation() == rhs.getNrLocation())) &&
((!n3gaLocationIsSet() && !rhs.n3gaLocationIsSet()) ||
(n3gaLocationIsSet() && rhs.n3gaLocationIsSet() &&
getN3gaLocation() == rhs.getN3gaLocation()));
}
void UserLocation::validate() { bool UserLocation::operator!=(const UserLocation& rhs) const {
// TODO: implement validation return !(*this == rhs);
} }
void to_json(nlohmann::json& j, const UserLocation& o) { void to_json(nlohmann::json& j, const UserLocation& o) {
......
/** /**
* 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
...@@ -34,9 +34,28 @@ namespace model { ...@@ -34,9 +34,28 @@ namespace model {
class UserLocation { class UserLocation {
public: public:
UserLocation(); UserLocation();
virtual ~UserLocation(); virtual ~UserLocation() = 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 UserLocation& rhs) const;
bool operator!=(const UserLocation& rhs) const;
///////////////////////////////////////////// /////////////////////////////////////////////
/// UserLocation members /// UserLocation members
...@@ -78,5 +97,4 @@ class UserLocation { ...@@ -78,5 +97,4 @@ class UserLocation {
} // namespace model } // namespace model
} // namespace smf_server } // namespace smf_server
} // namespace oai } // namespace oai
#endif /* UserLocation_H_ */ #endif /* UserLocation_H_ */
...@@ -63,6 +63,7 @@ void Logger::_init( ...@@ -63,6 +63,7 @@ void Logger::_init(
m_smf_n1 = new _Logger("smf_n1 ", m_sinks, ss.str().c_str()); m_smf_n1 = new _Logger("smf_n1 ", m_sinks, ss.str().c_str());
m_smf_n2 = new _Logger("smf_n2 ", m_sinks, ss.str().c_str()); m_smf_n2 = new _Logger("smf_n2 ", m_sinks, ss.str().c_str());
m_smf_n4 = new _Logger("smf_n4 ", m_sinks, ss.str().c_str()); m_smf_n4 = new _Logger("smf_n4 ", m_sinks, ss.str().c_str());
m_smf_n7 = new _Logger("smf_n7 ", m_sinks, ss.str().c_str());
m_smf_sbi = new _Logger("smf_sbi", m_sinks, ss.str().c_str()); m_smf_sbi = new _Logger("smf_sbi", m_sinks, ss.str().c_str());
m_smf_api_server = new _Logger("sbi_srv", m_sinks, ss.str().c_str()); m_smf_api_server = new _Logger("sbi_srv", m_sinks, ss.str().c_str());
} }
......
...@@ -84,6 +84,7 @@ class Logger { ...@@ -84,6 +84,7 @@ class Logger {
static _Logger& smf_n1() { return *singleton().m_smf_n1; } static _Logger& smf_n1() { return *singleton().m_smf_n1; }
static _Logger& smf_n2() { return *singleton().m_smf_n2; } static _Logger& smf_n2() { return *singleton().m_smf_n2; }
static _Logger& smf_n4() { return *singleton().m_smf_n4; } static _Logger& smf_n4() { return *singleton().m_smf_n4; }
static _Logger& smf_n7() { return *singleton().m_smf_n7; }
static _Logger& smf_sbi() { return *singleton().m_smf_sbi; } static _Logger& smf_sbi() { return *singleton().m_smf_sbi; }
static _Logger& smf_api_server() { return *singleton().m_smf_api_server; } static _Logger& smf_api_server() { return *singleton().m_smf_api_server; }
...@@ -113,6 +114,7 @@ class Logger { ...@@ -113,6 +114,7 @@ class Logger {
_Logger* m_smf_n1; _Logger* m_smf_n1;
_Logger* m_smf_n2; _Logger* m_smf_n2;
_Logger* m_smf_n4; _Logger* m_smf_n4;
_Logger* m_smf_n7;
_Logger* m_smf_sbi; _Logger* m_smf_sbi;
_Logger* m_smf_api_server; _Logger* m_smf_api_server;
}; };
......
...@@ -675,7 +675,7 @@ int smf_config::load(const string& config_file) { ...@@ -675,7 +675,7 @@ int smf_config::load(const string& config_file) {
} }
} }
} }
// Get PCF address if necessary
if (!use_local_pcc_rules) { if (!use_local_pcc_rules) {
if (!discover_pcf) { if (!discover_pcf) {
const Setting& pcf_cfg = smf_cfg[SMF_CONFIG_STRING_PCF]; const Setting& pcf_cfg = smf_cfg[SMF_CONFIG_STRING_PCF];
...@@ -687,7 +687,7 @@ int smf_config::load(const string& config_file) { ...@@ -687,7 +687,7 @@ int smf_config::load(const string& config_file) {
pcf_cfg.lookupValue(SMF_CONFIG_STRING_PCF_IPV4_ADDRESS, astring); pcf_cfg.lookupValue(SMF_CONFIG_STRING_PCF_IPV4_ADDRESS, astring);
IPV4_STR_ADDR_TO_INADDR( IPV4_STR_ADDR_TO_INADDR(
util::trim(astring).c_str(), pcf_ipv4_addr, util::trim(astring).c_str(), pcf_ipv4_addr,
"BAD IPv4 ADDRESS FORMAT FOR UDM !"); "BAD IPv4 ADDRESS FORMAT FOR PCF !");
pcf_addr.ipv4_addr = pcf_ipv4_addr; pcf_addr.ipv4_addr = pcf_ipv4_addr;
if (!(pcf_cfg.lookupValue(SMF_CONFIG_STRING_PCF_PORT, pcf_port))) { if (!(pcf_cfg.lookupValue(SMF_CONFIG_STRING_PCF_PORT, pcf_port))) {
Logger::smf_app().error(SMF_CONFIG_STRING_PCF_PORT "failed"); Logger::smf_app().error(SMF_CONFIG_STRING_PCF_PORT "failed");
...@@ -709,11 +709,11 @@ int smf_config::load(const string& config_file) { ...@@ -709,11 +709,11 @@ int smf_config::load(const string& config_file) {
fqdn::resolve(astring, address, pcf_port, addr_type); fqdn::resolve(astring, address, pcf_port, addr_type);
if (addr_type != 0) { // IPv6 if (addr_type != 0) { // IPv6
// TODO: // TODO:
throw("DO NOT SUPPORT IPV6 ADDR FOR UDM!"); throw("DO NOT SUPPORT IPV6 ADDR FOR PCF!");
} else { // IPv4 } else { // IPv4
IPV4_STR_ADDR_TO_INADDR( IPV4_STR_ADDR_TO_INADDR(
util::trim(address).c_str(), pcf_ipv4_addr, util::trim(address).c_str(), pcf_ipv4_addr,
"BAD IPv4 ADDRESS FORMAT FOR UDM !"); "BAD IPv4 ADDRESS FORMAT FOR PCF !");
pcf_addr.ipv4_addr = pcf_ipv4_addr; pcf_addr.ipv4_addr = pcf_ipv4_addr;
pcf_addr.port = pcf_port; pcf_addr.port = pcf_port;
pcf_addr.api_version = "v1"; // TODO: to get API version from DNS pcf_addr.api_version = "v1"; // TODO: to get API version from DNS
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "smf_n7.hpp" #include "smf_n7.hpp"
#include "smf_config.hpp" #include "smf_config.hpp"
#include "fqdn.hpp"
using namespace smf; using namespace smf;
using namespace smf::n7; using namespace smf::n7;
...@@ -36,15 +37,66 @@ using namespace oai::smf_server::model; ...@@ -36,15 +37,66 @@ using namespace oai::smf_server::model;
extern smf_config smf_cfg; extern smf_config smf_cfg;
bool smf_n7::discover_pcf( bool smf_n7::discover_pcf(
std::string& addr, std::string& port, std::string& api_version, std::string& addr, std::string& api_version, const Snssai snssai,
const Snssai snssai, const PlmnId, const std::string) { const PlmnId plmn_id, const std::string dnn) {
// if (smf_cfg.) if (smf_cfg.use_local_pcc_rules) {
Logger::smf_n7().info("Local PCC rules are enabled, do not discover PCF");
return false;
}
if (smf_cfg.discover_pcf) {
return discover_pcf_with_nrf(addr, api_version, snssai, plmn_id, dnn);
} else {
return discover_pcf_from_config_file(
addr, api_version, snssai, plmn_id, dnn);
}
} }
bool smf_n7::discover_pcf_with_nrf( bool smf_n7::discover_pcf_with_nrf(
std::string& addr, std::string& port, std::string& api_version, std::string& addr, std::string& api_version, const Snssai snssai,
const Snssai snssai, const PlmnId, const std::string) {} const PlmnId plmn_id, const std::string dnn) {
Logger::smf_n7().debug("Discover PCF with NRF");
Logger::smf_n7().warn("NRF discovery not yet supported!");
return false;
}
bool smf_n7::discover_pcf_from_config_file( bool smf_n7::discover_pcf_from_config_file(
std::string& addr, std::string& port, std::string& api_version, std::string& addr, std::string& api_version, const Snssai snssai,
const Snssai snssai, const PlmnId, const std::string) {} const PlmnId plmn_id, const std::string dnn) {
// TODO ignore snssai, plmn_id and dnn, because it is not part of
// configuration
Logger::smf_n7().debug("Discover PCF from config file");
api_version = smf_cfg.pcf_addr.api_version;
if (!smf_cfg.use_fqdn_dns) {
// read config from config file
addr = std::string(
inet_ntoa(*((struct in_addr*) &smf_cfg.pcf_addr.ipv4_addr)));
addr += ":" + std::to_string(smf_cfg.pcf_addr.port);
return true;
} else {
Logger::smf_n7().debug(
"Resolving %s with DNS", smf_cfg.pcf_addr.fqdn.c_str());
// resolve IP address
uint8_t addr_type = 0;
uint32_t pcf_port = 0;
std::string addr_temp = "";
if (!fqdn::resolve(smf_cfg.fqdn, addr_temp, pcf_port, addr_type)) {
Logger::smf_n7().warn("Could not resolve FQDN %s", smf_cfg.fqdn.c_str());
return false;
}
if (addr_type != 0) {
// TODO IPv6
Logger::smf_n7().warn("IPv6 not supported for PCF address");
return false;
} else {
if (smf_cfg.http_version == 2) {
pcf_port = 8080; // TODO this is not good to hardcode it here.
// Shouldnt we be able to get this from the DNS query based on the
// service?
}
addr = addr_temp + ":" + std::to_string(pcf_port);
return true;
}
}
}
...@@ -32,30 +32,82 @@ ...@@ -32,30 +32,82 @@
#include <string> #include <string>
#include "Snssai.h" #include "Snssai.h"
#include "PlmnId.h" #include "PlmnId.h"
#include "SmPolicyDecision.h"
#include "SmPolicyContextData.h"
namespace smf::n7 { namespace smf::n7 {
/**
* @brief Status codes for the communication with the PCF
*
*/
enum class sm_policy_status_code {
CREATED,
USER_UNKOWN,
INVALID_PARAMETERS,
CONTEXT_DENIED,
NOT_FOUND,
OK,
PCF_NOT_AVAILABLE
};
/**
* @brief Implements the N7 procedures (communication between SMF and PCF). It
* is the interface for PCF communication that should be used by other
* components
*
*/
class smf_n7 { class smf_n7 {
public: public:
static smf_n7& get_instance() {
static smf_n7 instance;
return instance;
}
explicit smf_n7(); explicit smf_n7();
virtual ~smf_n7(); virtual ~smf_n7();
smf::n7::sm_policy_status_code create_sm_policy_association(
const std::string pcf_addr, const std::string pcf_api_version,
const oai::smf_server::model::SmPolicyContextData& context,
oai::smf_server::model::SmPolicyDecision& policy_decision);
/**
* @brief Allows the discovery of a PCF, either via NRF or local
* configuration, depending on the DISCOVER_PCF option in the configuration
* file.
*
* @param addr output: The address of the PCF, ip:port
* @param api_version output: The API version of the PCF
* @param snssai input: The Snssai of the context
* @param plmn_id input: The PLMN of the context
* @param dnn input: The DNN of the context
* @return true
* @return false
*/
bool discover_pcf( bool discover_pcf(
std::string& addr, std::string& port, std::string& api_version, std::string& addr, std::string& api_version,
const oai::smf_server::model::Snssai snssai, const oai::smf_server::model::Snssai snssai,
const oai::smf_server::model::PlmnId, const std::string); const oai::smf_server::model::PlmnId plmn_id, const std::string dnn);
private: private:
bool discover_pcf_with_nrf( bool discover_pcf_with_nrf(
std::string& addr, std::string& port, std::string& api_version, std::string& addr, std::string& api_version,
const oai::smf_server::model::Snssai snssai, const oai::smf_server::model::Snssai snssai,
const oai::smf_server::model::PlmnId, const std::string); const oai::smf_server::model::PlmnId plmn_id, const std::string dnn);
bool discover_pcf_from_config_file( bool discover_pcf_from_config_file(
std::string& addr, std::string& port, std::string& api_version, std::string& addr, std::string& api_version,
const oai::smf_server::model::Snssai snssai, const oai::smf_server::model::Snssai snssai,
const oai::smf_server::model::PlmnId, const std::string); const oai::smf_server::model::PlmnId plmn_id, const std::string dnn);
}; };
/**
* @brief Client which handles the SMPolicyControl API (3GPP TS 29.512)
*
*/
class smf_pcf_client {};
} // namespace smf::n7 } // namespace smf::n7
#endif /* FILE_SMF_N4_HPP_SEEN */ #endif /* FILE_SMF_N4_HPP_SEEN */
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