Skip to content
Snippets Groups Projects
Commit b0b18bf2 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen
Browse files

Merge branch 'remove_pcf_models' into 'develop'

Remove PCF Models

See merge request !42
parents 688f929c 3c49411d
No related branches found
No related tags found
1 merge request!42Remove PCF Models
Pipeline #40513 passed
Showing
with 142 additions and 962 deletions
......@@ -25,6 +25,7 @@
## build speed
include(${SRC_TOP_DIR}/${MOUNTED_COMMON}/model/common_model/common_model.cmake)
include(${SRC_TOP_DIR}/${MOUNTED_COMMON}/model/pcf/pcf_model.cmake)
list(APPEND USED_COMMON_MODEL_SRC_FILES
${COMMON_MODEL_DIR}/AccessTokenErr.cpp
......@@ -64,9 +65,9 @@ list(APPEND USED_COMMON_MODEL_SRC_FILES
${COMMON_MODEL_DIR}/TraceDepth.cpp
${COMMON_MODEL_DIR}/TwapId.cpp
${COMMON_MODEL_DIR}/AccessType.cpp
${COMMON_MODEL_DIR}/AccessTypeRm.cpp
${COMMON_MODEL_DIR}/Ambr.cpp
${COMMON_MODEL_DIR}/Arp.cpp
${COMMON_MODEL_DIR}/Arp.cpp
${COMMON_MODEL_DIR}/AtsssCapability.cpp
${COMMON_MODEL_DIR}/DnaiChangeType_anyOf.cpp
${COMMON_MODEL_DIR}/DnaiChangeType.cpp
......@@ -93,7 +94,129 @@ list(APPEND USED_COMMON_MODEL_SRC_FILES
${COMMON_MODEL_DIR}/SubscribedDefaultQos.cpp
${COMMON_MODEL_DIR}/TraceData.cpp
${COMMON_MODEL_DIR}/UserLocation.cpp
${COMMON_MODEL_DIR}/DlDataDeliveryStatus.cpp
${COMMON_MODEL_DIR}/DlDataDeliveryStatus_anyOf.cpp
${COMMON_MODEL_DIR}/DddTrafficDescriptor.cpp
)
list(APPEND USED_PCF_MODEL_SRC_FILES
${PCF_MODEL_DIR}/QosData.cpp
${PCF_MODEL_DIR}/SmPolicyDecision.cpp
# SM Policy Context
${PCF_MODEL_DIR}/SmPolicyContextData.cpp
${PCF_MODEL_DIR}/AccNetChId.cpp
${PCF_MODEL_DIR}/AccNetChargingAddress.cpp
${PCF_MODEL_DIR}/AdditionalAccessInfo.cpp
${PCF_MODEL_DIR}/ServingNfIdentity.cpp
${PCF_MODEL_DIR}/AnGwAddress.cpp
${PCF_MODEL_DIR}/MaPduIndication.cpp
${PCF_MODEL_DIR}/MaPduIndication_anyOf.cpp
${PCF_MODEL_DIR}/PcfAtsssCapability.cpp
${PCF_MODEL_DIR}/PcfAtsssCapability_anyOf.cpp
# SmPolicyUpateContextData
${PCF_MODEL_DIR}/SmPolicyUpdateContextData.cpp
${PCF_MODEL_DIR}/UeInitiatedResourceRequest.cpp
${PCF_MODEL_DIR}/RuleOperation.cpp
${PCF_MODEL_DIR}/RuleOperation_anyOf.cpp
${PCF_MODEL_DIR}/RequestedQos.cpp
${PCF_MODEL_DIR}/PacketFilterInfo.cpp
${PCF_MODEL_DIR}/CreditManagementStatus.cpp
${PCF_MODEL_DIR}/CreditManagementStatus_anyOf.cpp
${PCF_MODEL_DIR}/TsnBridgeInfo.cpp
${PCF_MODEL_DIR}/AppDetectionInfo.cpp
${PCF_MODEL_DIR}/RuleReport.cpp
${PCF_MODEL_DIR}/RuleStatus.cpp
${PCF_MODEL_DIR}/RuleStatus_anyOf.cpp
${PCF_MODEL_DIR}/FailureCode.cpp
${PCF_MODEL_DIR}/FailureCode_anyOf.cpp
${PCF_MODEL_DIR}/RanNasRelCause.cpp
${PCF_MODEL_DIR}/FinalUnitAction.cpp
${PCF_MODEL_DIR}/FinalUnitAction_anyOf.cpp
${PCF_MODEL_DIR}/SessionRuleReport.cpp
${PCF_MODEL_DIR}/SessionRuleFailureCode.cpp
${PCF_MODEL_DIR}/SessionRuleFailureCode_anyOf.cpp
${PCF_MODEL_DIR}/QosNotificationControlInfo.cpp
${PCF_MODEL_DIR}/QosNotifType.cpp
${PCF_MODEL_DIR}/QosNotifType_anyOf.cpp
${PCF_MODEL_DIR}/QosMonitoringReport.cpp
${PCF_MODEL_DIR}/IpMulticastAddressInfo.cpp
${PCF_MODEL_DIR}/PolicyDecisionFailureCode.cpp
${PCF_MODEL_DIR}/PolicyDecisionFailureCode_anyOf.cpp
${PCF_MODEL_DIR}/CreditManagementStatus.cpp
${PCF_MODEL_DIR}/TsnBridgeInfo.cpp
${PCF_MODEL_DIR}/AccuUsageReport.cpp
# Sm Policy Delete Data
${PCF_MODEL_DIR}/SmPolicyDeleteData.cpp
${PCF_MODEL_DIR}/PduSessionRelCause.cpp
${PCF_MODEL_DIR}/PduSessionRelCause_anyOf.cpp
#
${PCF_MODEL_DIR}/SmPolicyControl.cpp
${PCF_MODEL_DIR}/ChargingInformation.cpp
${PCF_MODEL_DIR}/RequestedUsageData.cpp
${PCF_MODEL_DIR}/QosFlowUsage.cpp
${PCF_MODEL_DIR}/BridgeManagementContainer.cpp
${PCF_MODEL_DIR}/PortManagementContainer.cpp
${PCF_MODEL_DIR}/PolicyControlRequestTrigger.cpp
${PCF_MODEL_DIR}/RequestedRuleData.cpp
${PCF_MODEL_DIR}/SmPolicyAssociationReleaseCause.cpp
${PCF_MODEL_DIR}/SmPolicyAssociationReleaseCause_anyOf.cpp
${PCF_MODEL_DIR}/SessionRule.cpp
${PCF_MODEL_DIR}/PccRule.cpp
${PCF_MODEL_DIR}/ChargingData.cpp
${PCF_MODEL_DIR}/TrafficControlData.cpp
${PCF_MODEL_DIR}/UsageMonitoringData.cpp
${PCF_MODEL_DIR}/QosCharacteristics.cpp
${PCF_MODEL_DIR}/QosMonitoringData.cpp
${PCF_MODEL_DIR}/ConditionData.cpp
${PCF_MODEL_DIR}/QosFlowUsage_anyOf.cpp
${PCF_MODEL_DIR}/PolicyControlRequestTrigger_anyOf.cpp
${PCF_MODEL_DIR}/RequestedRuleDataType.cpp
${PCF_MODEL_DIR}/RequestedRuleDataType_anyOf.cpp
${PCF_MODEL_DIR}/AuthorizedDefaultQos.cpp
${PCF_MODEL_DIR}/TscaiInputContainer.cpp
${PCF_MODEL_DIR}/DownlinkDataNotificationControl.cpp
${PCF_MODEL_DIR}/NotificationControlIndication.cpp
${PCF_MODEL_DIR}/NotificationControlIndication_anyOf.cpp
${PCF_MODEL_DIR}/DownlinkDataNotificationControlRm.cpp
${PCF_MODEL_DIR}/AfSigProtocol.cpp
${PCF_MODEL_DIR}/AfSigProtocol_anyOf.cpp
${PCF_MODEL_DIR}/FlowInformation.cpp
${PCF_MODEL_DIR}/EthFlowDescription.cpp
${PCF_MODEL_DIR}/FlowDirection.cpp
${PCF_MODEL_DIR}/FlowDirection_anyOf.cpp
${PCF_MODEL_DIR}/FlowDirectionRm.cpp
${PCF_MODEL_DIR}/MeteringMethod.cpp
${PCF_MODEL_DIR}/MeteringMethod_anyOf.cpp
${PCF_MODEL_DIR}/RedirectInformation.cpp
${PCF_MODEL_DIR}/RedirectAddressType.cpp
${PCF_MODEL_DIR}/RedirectAddressType_anyOf.cpp
${PCF_MODEL_DIR}/UpPathChgEvent.cpp
${PCF_MODEL_DIR}/SteeringFunctionality.cpp
${PCF_MODEL_DIR}/SteeringFunctionality_anyOf.cpp
${PCF_MODEL_DIR}/SteeringMode.cpp
${PCF_MODEL_DIR}/SteerModeValue.cpp
${PCF_MODEL_DIR}/SteerModeValue_anyOf.cpp
${PCF_MODEL_DIR}/MulticastAccessControl.cpp
${PCF_MODEL_DIR}/MulticastAccessControl_anyOf.cpp
${PCF_MODEL_DIR}/ReportingLevel.cpp
${PCF_MODEL_DIR}/ReportingLevel_anyOf.cpp
${PCF_MODEL_DIR}/FlowStatus.cpp
${PCF_MODEL_DIR}/FlowStatus_anyOf.cpp
${PCF_MODEL_DIR}/RequestedQosMonitoringParameter.cpp
${PCF_MODEL_DIR}/RequestedQosMonitoringParameter_anyOf.cpp
${PCF_MODEL_DIR}/ReportingFrequency.cpp
${PCF_MODEL_DIR}/ReportingFrequency_anyOf.cpp
)
include(${SRC_TOP_DIR}/${MOUNTED_COMMON}/model/smf/smf_model.cmake)
list(APPEND USED_SMF_MODEL_SRC_FILES
${SMF_MODEL_DIR}/DnnSelectionMode.cpp
${SMF_MODEL_DIR}/DnnSelectionMode_anyOf.cpp
${SMF_MODEL_DIR}/VplmnQos.cpp
)
include(${SRC_TOP_DIR}/${MOUNTED_COMMON}/model/smf/smf_model.cmake)
# finally, we have to include common_model.cmake (has to be last
include(${SRC_TOP_DIR}/${MOUNTED_COMMON}/model/common_model/common_model.cmake)
\ No newline at end of file
......@@ -23,7 +23,6 @@ set(PCF_API_SERVER_DIR "${SRC_TOP_DIR}/api-server")
include_directories(${PCF_API_SERVER_DIR}/api)
include_directories(${PCF_API_SERVER_DIR}/impl)
include_directories(${PCF_API_SERVER_DIR}/model)
include_directories(${PCF_API_SERVER_DIR}/handler)
include_directories(${PCF_API_SERVER_DIR}/)
include_directories(${SRC_TOP_DIR}/pcf_app)
......@@ -32,12 +31,13 @@ include_directories(${SRC_TOP_DIR}/common/utils)
include_directories(${SRC_TOP_DIR}/${MOUNTED_COMMON}/logger)
include_directories(${SRC_TOP_DIR}/${MOUNTED_COMMON}/config)
include(${SRC_TOP_DIR}/${MOUNTED_COMMON}/model/common_model/common_model.cmake)
include(${SRC_TOP_DIR}/${MOUNTED_COMMON}/model/pcf/pcf_model.cmake)
include(${SRC_TOP_DIR}/${MOUNTED_COMMON}/model/smf/smf_model.cmake)
file(GLOB PCF_API_SERVER_src_files
${PCF_API_SERVER_DIR}/pcf-api-server.cpp
${PCF_API_SERVER_DIR}/pcf-http2-server.cpp
${PCF_API_SERVER_DIR}/api_defs.cpp
${PCF_API_SERVER_DIR}/model/*.cpp
${PCF_API_SERVER_DIR}/api/*.cpp
${PCF_API_SERVER_DIR}/impl/*.cpp
${PCF_API_SERVER_DIR}/handler/*.cpp
......
......@@ -19,7 +19,7 @@
namespace oai::pcf::api {
using namespace oai::model::common::helpers;
using namespace oai::pcf::model;
using namespace oai::model::pcf;
IndividualSMPolicyDocumentApi::IndividualSMPolicyDocumentApi(
const std::shared_ptr<Pistache::Rest::Router>& rtr)
......
......@@ -35,7 +35,7 @@
namespace oai::pcf::api {
using namespace oai::pcf::model;
using namespace oai::model::pcf;
class IndividualSMPolicyDocumentApi {
public:
......@@ -90,7 +90,7 @@ class IndividualSMPolicyDocumentApi {
/// <param name="smPolicyDeleteData"></param>
virtual void delete_sm_policy(
const std::string& smPolicyId,
const oai::pcf::model::SmPolicyDeleteData& smPolicyDeleteData,
const oai::model::pcf::SmPolicyDeleteData& smPolicyDeleteData,
Pistache::Http::ResponseWriter& response) = 0;
/// <summary>
/// Read an Individual SM Policy
......@@ -112,7 +112,7 @@ class IndividualSMPolicyDocumentApi {
/// <param name="smPolicyUpdateContextData"></param>
virtual void update_sm_policy(
const std::string& smPolicyId,
const oai::pcf::model::SmPolicyUpdateContextData&
const oai::model::pcf::SmPolicyUpdateContextData&
smPolicyUpdateContextData,
Pistache::Http::ResponseWriter& response) = 0;
};
......
......@@ -20,7 +20,7 @@ namespace pcf {
namespace api {
using namespace oai::model::common::helpers;
using namespace oai::pcf::model;
using namespace oai::model::pcf;
SMPoliciesCollectionApi::SMPoliciesCollectionApi(
const std::shared_ptr<Pistache::Rest::Router>& rtr)
......
......@@ -37,7 +37,7 @@ namespace pcf {
namespace api {
using namespace oai::model::common::helpers;
using namespace oai::pcf::model;
using namespace oai::model::pcf;
class SMPoliciesCollectionApi {
public:
......@@ -84,7 +84,7 @@ class SMPoliciesCollectionApi {
/// </remarks>
/// <param name="smPolicyContextData"></param>
virtual void create_sm_policy(
const oai::pcf::model::SmPolicyContextData& smPolicyContextData,
const oai::model::pcf::SmPolicyContextData& smPolicyContextData,
Pistache::Http::ResponseWriter& response) = 0;
};
......
......@@ -32,7 +32,7 @@
namespace oai::pcf::api {
using namespace oai::pcf::model;
using namespace oai::model::pcf;
using namespace oai::model::common;
using namespace oai::pcf::app::sm_policy;
......
......@@ -52,7 +52,7 @@ class individual_sm_policy_document_api_handler {
*/
api_response delete_sm_policy(
const std::string& sm_policy_id,
const oai::pcf::model::SmPolicyDeleteData& sm_policy_delete_data);
const oai::model::pcf::SmPolicyDeleteData& sm_policy_delete_data);
/**
* Get SM Policy by ID
......@@ -69,7 +69,7 @@ class individual_sm_policy_document_api_handler {
*/
api_response update_sm_policy(
const std::string& sm_policy_id,
const oai::pcf::model::SmPolicyUpdateContextData&
const oai::model::pcf::SmPolicyUpdateContextData&
smPolicyUpdateContextData);
private:
......
......@@ -39,7 +39,7 @@
namespace oai::pcf::api {
using namespace oai::pcf::model;
using namespace oai::model::pcf;
using namespace oai::model::common;
using namespace oai::pcf::app::sm_policy;
......
......@@ -52,7 +52,7 @@ class sm_policies_collection_api_handler {
* @return api_response with SmPolicyDecision
*/
api_response create_sm_policy(
const model::SmPolicyContextData& sm_policy_context_data);
const oai::model::pcf::SmPolicyContextData& sm_policy_context_data);
private:
std::string m_address;
......
......@@ -16,7 +16,7 @@
namespace oai::pcf::api {
using namespace oai::pcf::model;
using namespace oai::model::pcf;
using namespace oai::pcf::app;
using namespace oai::pcf::app::sm_policy;
using namespace oai::model::common;
......
......@@ -39,7 +39,7 @@
namespace oai::pcf::api {
using namespace oai::pcf::model;
using namespace oai::model::pcf;
using namespace pcf;
class IndividualSMPolicyDocumentApiImpl
......
......@@ -17,7 +17,7 @@
namespace oai::pcf::api {
using namespace oai::pcf::model;
using namespace oai::model::pcf;
using namespace oai::pcf::app;
using namespace oai::pcf::app::sm_policy;
using namespace oai::model::common;
......
......@@ -37,7 +37,7 @@
namespace oai::pcf::api {
using namespace oai::pcf::model;
using namespace oai::model::pcf;
using namespace pcf;
class SMPoliciesCollectionApiImpl
......
/**
* 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 "AccNetChId.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace pcf {
namespace model {
AccNetChId::AccNetChId() {
m_AccNetChaIdValue = 0;
m_RefPccRuleIdsIsSet = false;
m_SessionChScope = false;
m_SessionChScopeIsSet = false;
}
void AccNetChId::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AccNetChId::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AccNetChId::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AccNetChId" : pathPrefix;
if (refPccRuleIdsIsSet()) {
const std::vector<std::string>& value = m_RefPccRuleIds;
const std::string currentValuePath = _pathPrefix + ".refPccRuleIds";
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++;
}
}
*/
}
return success;
}
bool AccNetChId::operator==(const AccNetChId& rhs) const {
return
(getAccNetChaIdValue() == rhs.getAccNetChaIdValue()) &&
((!refPccRuleIdsIsSet() && !rhs.refPccRuleIdsIsSet()) ||
(refPccRuleIdsIsSet() && rhs.refPccRuleIdsIsSet() &&
getRefPccRuleIds() == rhs.getRefPccRuleIds())) &&
((!sessionChScopeIsSet() && !rhs.sessionChScopeIsSet()) ||
(sessionChScopeIsSet() && rhs.sessionChScopeIsSet() &&
isSessionChScope() == rhs.isSessionChScope()))
;
}
bool AccNetChId::operator!=(const AccNetChId& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const AccNetChId& o) {
j = nlohmann::json();
j["accNetChaIdValue"] = o.m_AccNetChaIdValue;
if (o.refPccRuleIdsIsSet() || !o.m_RefPccRuleIds.empty())
j["refPccRuleIds"] = o.m_RefPccRuleIds;
if (o.sessionChScopeIsSet()) j["sessionChScope"] = o.m_SessionChScope;
}
void from_json(const nlohmann::json& j, AccNetChId& o) {
j.at("accNetChaIdValue").get_to(o.m_AccNetChaIdValue);
if (j.find("refPccRuleIds") != j.end()) {
j.at("refPccRuleIds").get_to(o.m_RefPccRuleIds);
o.m_RefPccRuleIdsIsSet = true;
}
if (j.find("sessionChScope") != j.end()) {
j.at("sessionChScope").get_to(o.m_SessionChScope);
o.m_SessionChScopeIsSet = true;
}
}
uint32_t AccNetChId::getAccNetChaIdValue() const {
return m_AccNetChaIdValue;
}
void AccNetChId::setAccNetChaIdValue(uint32_t const value) {
m_AccNetChaIdValue = value;
}
std::vector<std::string> AccNetChId::getRefPccRuleIds() const {
return m_RefPccRuleIds;
}
void AccNetChId::setRefPccRuleIds(std::vector<std::string> const& value) {
m_RefPccRuleIds = value;
m_RefPccRuleIdsIsSet = true;
}
bool AccNetChId::refPccRuleIdsIsSet() const {
return m_RefPccRuleIdsIsSet;
}
void AccNetChId::unsetRefPccRuleIds() {
m_RefPccRuleIdsIsSet = false;
}
bool AccNetChId::isSessionChScope() const {
return m_SessionChScope;
}
void AccNetChId::setSessionChScope(bool const value) {
m_SessionChScope = value;
m_SessionChScopeIsSet = true;
}
bool AccNetChId::sessionChScopeIsSet() const {
return m_SessionChScopeIsSet;
}
void AccNetChId::unsetSessionChScope() {
m_SessionChScopeIsSet = false;
}
} // namespace model
} // namespace pcf
} // 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.
*/
/*
* AccNetChId.h
*
*
*/
#ifndef AccNetChId_H_
#define AccNetChId_H_
#include <string>
#include <vector>
#include <nlohmann/json.hpp>
namespace oai {
namespace pcf {
namespace model {
/// <summary>
///
/// </summary>
class AccNetChId {
public:
AccNetChId();
virtual ~AccNetChId() = 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 AccNetChId& rhs) const;
bool operator!=(const AccNetChId& rhs) const;
/////////////////////////////////////////////
/// AccNetChId members
/// <summary>
///
/// </summary>
uint32_t getAccNetChaIdValue() const;
void setAccNetChaIdValue(uint32_t const value);
/// <summary>
/// Contains the identifier of the PCC rule(s) associated to the provided
/// Access Network Charging Identifier.
/// </summary>
std::vector<std::string> getRefPccRuleIds() const;
void setRefPccRuleIds(std::vector<std::string> const& value);
bool refPccRuleIdsIsSet() const;
void unsetRefPccRuleIds();
/// <summary>
/// When it is included and set to true, indicates the Access Network Charging
/// Identifier applies to the whole PDU Session
/// </summary>
bool isSessionChScope() const;
void setSessionChScope(bool const value);
bool sessionChScopeIsSet() const;
void unsetSessionChScope();
friend void to_json(nlohmann::json& j, const AccNetChId& o);
friend void from_json(const nlohmann::json& j, AccNetChId& o);
protected:
uint32_t m_AccNetChaIdValue;
std::vector<std::string> m_RefPccRuleIds;
bool m_RefPccRuleIdsIsSet;
bool m_SessionChScope;
bool m_SessionChScopeIsSet;
};
} // namespace model
} // namespace pcf
} // namespace oai
#endif /* AccNetChId_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 "AccNetChargingAddress.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace pcf {
namespace model {
using namespace oai::model::common;
AccNetChargingAddress::AccNetChargingAddress() {
m_AnChargIpv4Addr = "";
m_AnChargIpv4AddrIsSet = false;
m_AnChargIpv6AddrIsSet = false;
}
void AccNetChargingAddress::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AccNetChargingAddress::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AccNetChargingAddress::validate(
std::stringstream& /* msg */, const std::string& /* pathPrefix */) const {
bool success = true;
/*
const std::string _pathPrefix =
pathPrefix.empty() ? "AccNetChargingAddress" : pathPrefix;
if (anChargIpv4AddrIsSet()) {
const std::string& value = m_AnChargIpv4Addr;
const std::string currentValuePath = _pathPrefix + ".anChargIpv4Addr";
}
*/
return success;
}
bool AccNetChargingAddress::operator==(const AccNetChargingAddress& rhs) const {
return
((!anChargIpv4AddrIsSet() && !rhs.anChargIpv4AddrIsSet()) ||
(anChargIpv4AddrIsSet() && rhs.anChargIpv4AddrIsSet() &&
getAnChargIpv4Addr() == rhs.getAnChargIpv4Addr())) &&
((!anChargIpv6AddrIsSet() && !rhs.anChargIpv6AddrIsSet()) ||
(anChargIpv6AddrIsSet() && rhs.anChargIpv6AddrIsSet() &&
getAnChargIpv6Addr() == rhs.getAnChargIpv6Addr()))
;
}
bool AccNetChargingAddress::operator!=(const AccNetChargingAddress& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const AccNetChargingAddress& o) {
j = nlohmann::json();
if (o.anChargIpv4AddrIsSet()) j["anChargIpv4Addr"] = o.m_AnChargIpv4Addr;
if (o.anChargIpv6AddrIsSet()) j["anChargIpv6Addr"] = o.m_AnChargIpv6Addr;
}
void from_json(const nlohmann::json& j, AccNetChargingAddress& o) {
if (j.find("anChargIpv4Addr") != j.end()) {
j.at("anChargIpv4Addr").get_to(o.m_AnChargIpv4Addr);
o.m_AnChargIpv4AddrIsSet = true;
}
if (j.find("anChargIpv6Addr") != j.end()) {
j.at("anChargIpv6Addr").get_to(o.m_AnChargIpv6Addr);
o.m_AnChargIpv6AddrIsSet = true;
}
}
std::string AccNetChargingAddress::getAnChargIpv4Addr() const {
return m_AnChargIpv4Addr;
}
void AccNetChargingAddress::setAnChargIpv4Addr(std::string const& value) {
m_AnChargIpv4Addr = value;
m_AnChargIpv4AddrIsSet = true;
}
bool AccNetChargingAddress::anChargIpv4AddrIsSet() const {
return m_AnChargIpv4AddrIsSet;
}
void AccNetChargingAddress::unsetAnChargIpv4Addr() {
m_AnChargIpv4AddrIsSet = false;
}
Ipv6Addr AccNetChargingAddress::getAnChargIpv6Addr() const {
return m_AnChargIpv6Addr;
}
void AccNetChargingAddress::setAnChargIpv6Addr(Ipv6Addr const& value) {
m_AnChargIpv6Addr = value;
m_AnChargIpv6AddrIsSet = true;
}
bool AccNetChargingAddress::anChargIpv6AddrIsSet() const {
return m_AnChargIpv6AddrIsSet;
}
void AccNetChargingAddress::unsetAnChargIpv6Addr() {
m_AnChargIpv6AddrIsSet = false;
}
} // namespace model
} // namespace pcf
} // 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.
*/
/*
* AccNetChargingAddress.h
*
* Describes the network entity within the access network performing charging
*/
#ifndef AccNetChargingAddress_H_
#define AccNetChargingAddress_H_
#include <string>
#include "Ipv6Addr.h"
#include <nlohmann/json.hpp>
namespace oai {
namespace pcf {
namespace model {
/// <summary>
/// Describes the network entity within the access network performing charging
/// </summary>
class AccNetChargingAddress {
public:
AccNetChargingAddress();
virtual ~AccNetChargingAddress() = 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 AccNetChargingAddress& rhs) const;
bool operator!=(const AccNetChargingAddress& rhs) const;
/////////////////////////////////////////////
/// AccNetChargingAddress members
/// <summary>
///
/// </summary>
std::string getAnChargIpv4Addr() const;
void setAnChargIpv4Addr(std::string const& value);
bool anChargIpv4AddrIsSet() const;
void unsetAnChargIpv4Addr();
/// <summary>
///
/// </summary>
oai::model::common::Ipv6Addr getAnChargIpv6Addr() const;
void setAnChargIpv6Addr(oai::model::common::Ipv6Addr const& value);
bool anChargIpv6AddrIsSet() const;
void unsetAnChargIpv6Addr();
friend void to_json(nlohmann::json& j, const AccNetChargingAddress& o);
friend void from_json(const nlohmann::json& j, AccNetChargingAddress& o);
protected:
std::string m_AnChargIpv4Addr;
bool m_AnChargIpv4AddrIsSet;
oai::model::common::Ipv6Addr m_AnChargIpv6Addr;
bool m_AnChargIpv6AddrIsSet;
};
} // namespace model
} // namespace pcf
} // namespace oai
#endif /* AccNetChargingAddress_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 "AccuUsageReport.h"
#include "Helpers.h"
#include <sstream>
namespace oai {
namespace pcf {
namespace model {
AccuUsageReport::AccuUsageReport() {
m_RefUmIds = "";
m_VolUsage = 0L;
m_VolUsageIsSet = false;
m_VolUsageUplink = 0L;
m_VolUsageUplinkIsSet = false;
m_VolUsageDownlink = 0L;
m_VolUsageDownlinkIsSet = false;
m_TimeUsage = 0;
m_TimeUsageIsSet = false;
m_NextVolUsage = 0L;
m_NextVolUsageIsSet = false;
m_NextVolUsageUplink = 0L;
m_NextVolUsageUplinkIsSet = false;
m_NextVolUsageDownlink = 0L;
m_NextVolUsageDownlinkIsSet = false;
m_NextTimeUsage = 0;
m_NextTimeUsageIsSet = false;
}
void AccuUsageReport::validate() const {
std::stringstream msg;
if (!validate(msg)) {
// throw
// org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool AccuUsageReport::validate(std::stringstream& msg) const {
return validate(msg, "");
}
bool AccuUsageReport::validate(
std::stringstream& msg, const std::string& pathPrefix) const {
bool success = true;
const std::string _pathPrefix =
pathPrefix.empty() ? "AccuUsageReport" : pathPrefix;
if (volUsageIsSet()) {
const int64_t& value = m_VolUsage;
const std::string currentValuePath = _pathPrefix + ".volUsage";
if (value < 0ll) {
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (volUsageUplinkIsSet()) {
const int64_t& value = m_VolUsageUplink;
const std::string currentValuePath = _pathPrefix + ".volUsageUplink";
if (value < 0ll) {
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (volUsageDownlinkIsSet()) {
const int64_t& value = m_VolUsageDownlink;
const std::string currentValuePath = _pathPrefix + ".volUsageDownlink";
if (value < 0ll) {
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (nextVolUsageIsSet()) {
const int64_t& value = m_NextVolUsage;
const std::string currentValuePath = _pathPrefix + ".nextVolUsage";
if (value < 0ll) {
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (nextVolUsageUplinkIsSet()) {
const int64_t& value = m_NextVolUsageUplink;
const std::string currentValuePath = _pathPrefix + ".nextVolUsageUplink";
if (value < 0ll) {
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (nextVolUsageDownlinkIsSet()) {
const int64_t& value = m_NextVolUsageDownlink;
const std::string currentValuePath = _pathPrefix + ".nextVolUsageDownlink";
if (value < 0ll) {
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
return success;
}
bool AccuUsageReport::operator==(const AccuUsageReport& rhs) const {
return
(getRefUmIds() == rhs.getRefUmIds()) &&
((!volUsageIsSet() && !rhs.volUsageIsSet()) ||
(volUsageIsSet() && rhs.volUsageIsSet() &&
getVolUsage() == rhs.getVolUsage())) &&
((!volUsageUplinkIsSet() && !rhs.volUsageUplinkIsSet()) ||
(volUsageUplinkIsSet() && rhs.volUsageUplinkIsSet() &&
getVolUsageUplink() == rhs.getVolUsageUplink())) &&
((!volUsageDownlinkIsSet() && !rhs.volUsageDownlinkIsSet()) ||
(volUsageDownlinkIsSet() && rhs.volUsageDownlinkIsSet() &&
getVolUsageDownlink() == rhs.getVolUsageDownlink())) &&
((!timeUsageIsSet() && !rhs.timeUsageIsSet()) ||
(timeUsageIsSet() && rhs.timeUsageIsSet() &&
getTimeUsage() == rhs.getTimeUsage())) &&
((!nextVolUsageIsSet() && !rhs.nextVolUsageIsSet()) ||
(nextVolUsageIsSet() && rhs.nextVolUsageIsSet() &&
getNextVolUsage() == rhs.getNextVolUsage())) &&
((!nextVolUsageUplinkIsSet() && !rhs.nextVolUsageUplinkIsSet()) ||
(nextVolUsageUplinkIsSet() && rhs.nextVolUsageUplinkIsSet() &&
getNextVolUsageUplink() == rhs.getNextVolUsageUplink())) &&
((!nextVolUsageDownlinkIsSet() && !rhs.nextVolUsageDownlinkIsSet()) ||
(nextVolUsageDownlinkIsSet() && rhs.nextVolUsageDownlinkIsSet() &&
getNextVolUsageDownlink() == rhs.getNextVolUsageDownlink())) &&
((!nextTimeUsageIsSet() && !rhs.nextTimeUsageIsSet()) ||
(nextTimeUsageIsSet() && rhs.nextTimeUsageIsSet() &&
getNextTimeUsage() == rhs.getNextTimeUsage()))
;
}
bool AccuUsageReport::operator!=(const AccuUsageReport& rhs) const {
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const AccuUsageReport& o) {
j = nlohmann::json();
j["refUmIds"] = o.m_RefUmIds;
if (o.volUsageIsSet()) j["volUsage"] = o.m_VolUsage;
if (o.volUsageUplinkIsSet()) j["volUsageUplink"] = o.m_VolUsageUplink;
if (o.volUsageDownlinkIsSet()) j["volUsageDownlink"] = o.m_VolUsageDownlink;
if (o.timeUsageIsSet()) j["timeUsage"] = o.m_TimeUsage;
if (o.nextVolUsageIsSet()) j["nextVolUsage"] = o.m_NextVolUsage;
if (o.nextVolUsageUplinkIsSet())
j["nextVolUsageUplink"] = o.m_NextVolUsageUplink;
if (o.nextVolUsageDownlinkIsSet())
j["nextVolUsageDownlink"] = o.m_NextVolUsageDownlink;
if (o.nextTimeUsageIsSet()) j["nextTimeUsage"] = o.m_NextTimeUsage;
}
void from_json(const nlohmann::json& j, AccuUsageReport& o) {
j.at("refUmIds").get_to(o.m_RefUmIds);
if (j.find("volUsage") != j.end()) {
j.at("volUsage").get_to(o.m_VolUsage);
o.m_VolUsageIsSet = true;
}
if (j.find("volUsageUplink") != j.end()) {
j.at("volUsageUplink").get_to(o.m_VolUsageUplink);
o.m_VolUsageUplinkIsSet = true;
}
if (j.find("volUsageDownlink") != j.end()) {
j.at("volUsageDownlink").get_to(o.m_VolUsageDownlink);
o.m_VolUsageDownlinkIsSet = true;
}
if (j.find("timeUsage") != j.end()) {
j.at("timeUsage").get_to(o.m_TimeUsage);
o.m_TimeUsageIsSet = true;
}
if (j.find("nextVolUsage") != j.end()) {
j.at("nextVolUsage").get_to(o.m_NextVolUsage);
o.m_NextVolUsageIsSet = true;
}
if (j.find("nextVolUsageUplink") != j.end()) {
j.at("nextVolUsageUplink").get_to(o.m_NextVolUsageUplink);
o.m_NextVolUsageUplinkIsSet = true;
}
if (j.find("nextVolUsageDownlink") != j.end()) {
j.at("nextVolUsageDownlink").get_to(o.m_NextVolUsageDownlink);
o.m_NextVolUsageDownlinkIsSet = true;
}
if (j.find("nextTimeUsage") != j.end()) {
j.at("nextTimeUsage").get_to(o.m_NextTimeUsage);
o.m_NextTimeUsageIsSet = true;
}
}
std::string AccuUsageReport::getRefUmIds() const {
return m_RefUmIds;
}
void AccuUsageReport::setRefUmIds(std::string const& value) {
m_RefUmIds = value;
}
int64_t AccuUsageReport::getVolUsage() const {
return m_VolUsage;
}
void AccuUsageReport::setVolUsage(int64_t const value) {
m_VolUsage = value;
m_VolUsageIsSet = true;
}
bool AccuUsageReport::volUsageIsSet() const {
return m_VolUsageIsSet;
}
void AccuUsageReport::unsetVolUsage() {
m_VolUsageIsSet = false;
}
int64_t AccuUsageReport::getVolUsageUplink() const {
return m_VolUsageUplink;
}
void AccuUsageReport::setVolUsageUplink(int64_t const value) {
m_VolUsageUplink = value;
m_VolUsageUplinkIsSet = true;
}
bool AccuUsageReport::volUsageUplinkIsSet() const {
return m_VolUsageUplinkIsSet;
}
void AccuUsageReport::unsetVolUsageUplink() {
m_VolUsageUplinkIsSet = false;
}
int64_t AccuUsageReport::getVolUsageDownlink() const {
return m_VolUsageDownlink;
}
void AccuUsageReport::setVolUsageDownlink(int64_t const value) {
m_VolUsageDownlink = value;
m_VolUsageDownlinkIsSet = true;
}
bool AccuUsageReport::volUsageDownlinkIsSet() const {
return m_VolUsageDownlinkIsSet;
}
void AccuUsageReport::unsetVolUsageDownlink() {
m_VolUsageDownlinkIsSet = false;
}
int32_t AccuUsageReport::getTimeUsage() const {
return m_TimeUsage;
}
void AccuUsageReport::setTimeUsage(int32_t const value) {
m_TimeUsage = value;
m_TimeUsageIsSet = true;
}
bool AccuUsageReport::timeUsageIsSet() const {
return m_TimeUsageIsSet;
}
void AccuUsageReport::unsetTimeUsage() {
m_TimeUsageIsSet = false;
}
int64_t AccuUsageReport::getNextVolUsage() const {
return m_NextVolUsage;
}
void AccuUsageReport::setNextVolUsage(int64_t const value) {
m_NextVolUsage = value;
m_NextVolUsageIsSet = true;
}
bool AccuUsageReport::nextVolUsageIsSet() const {
return m_NextVolUsageIsSet;
}
void AccuUsageReport::unsetNextVolUsage() {
m_NextVolUsageIsSet = false;
}
int64_t AccuUsageReport::getNextVolUsageUplink() const {
return m_NextVolUsageUplink;
}
void AccuUsageReport::setNextVolUsageUplink(int64_t const value) {
m_NextVolUsageUplink = value;
m_NextVolUsageUplinkIsSet = true;
}
bool AccuUsageReport::nextVolUsageUplinkIsSet() const {
return m_NextVolUsageUplinkIsSet;
}
void AccuUsageReport::unsetNextVolUsageUplink() {
m_NextVolUsageUplinkIsSet = false;
}
int64_t AccuUsageReport::getNextVolUsageDownlink() const {
return m_NextVolUsageDownlink;
}
void AccuUsageReport::setNextVolUsageDownlink(int64_t const value) {
m_NextVolUsageDownlink = value;
m_NextVolUsageDownlinkIsSet = true;
}
bool AccuUsageReport::nextVolUsageDownlinkIsSet() const {
return m_NextVolUsageDownlinkIsSet;
}
void AccuUsageReport::unsetNextVolUsageDownlink() {
m_NextVolUsageDownlinkIsSet = false;
}
int32_t AccuUsageReport::getNextTimeUsage() const {
return m_NextTimeUsage;
}
void AccuUsageReport::setNextTimeUsage(int32_t const value) {
m_NextTimeUsage = value;
m_NextTimeUsageIsSet = true;
}
bool AccuUsageReport::nextTimeUsageIsSet() const {
return m_NextTimeUsageIsSet;
}
void AccuUsageReport::unsetNextTimeUsage() {
m_NextTimeUsageIsSet = false;
}
} // namespace model
} // namespace pcf
} // 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.
*/
/*
* AccuUsageReport.h
*
*
*/
#ifndef AccuUsageReport_H_
#define AccuUsageReport_H_
#include <string>
#include <nlohmann/json.hpp>
namespace oai {
namespace pcf {
namespace model {
/// <summary>
///
/// </summary>
class AccuUsageReport {
public:
AccuUsageReport();
virtual ~AccuUsageReport() = 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 AccuUsageReport& rhs) const;
bool operator!=(const AccuUsageReport& rhs) const;
/////////////////////////////////////////////
/// AccuUsageReport members
/// <summary>
/// An id referencing UsageMonitoringData objects associated with this usage
/// report.
/// </summary>
std::string getRefUmIds() const;
void setRefUmIds(std::string const& value);
/// <summary>
/// Unsigned integer identifying a volume in units of bytes.
/// </summary>
int64_t getVolUsage() const;
void setVolUsage(int64_t const value);
bool volUsageIsSet() const;
void unsetVolUsage();
/// <summary>
/// Unsigned integer identifying a volume in units of bytes.
/// </summary>
int64_t getVolUsageUplink() const;
void setVolUsageUplink(int64_t const value);
bool volUsageUplinkIsSet() const;
void unsetVolUsageUplink();
/// <summary>
/// Unsigned integer identifying a volume in units of bytes.
/// </summary>
int64_t getVolUsageDownlink() const;
void setVolUsageDownlink(int64_t const value);
bool volUsageDownlinkIsSet() const;
void unsetVolUsageDownlink();
/// <summary>
///
/// </summary>
int32_t getTimeUsage() const;
void setTimeUsage(int32_t const value);
bool timeUsageIsSet() const;
void unsetTimeUsage();
/// <summary>
/// Unsigned integer identifying a volume in units of bytes.
/// </summary>
int64_t getNextVolUsage() const;
void setNextVolUsage(int64_t const value);
bool nextVolUsageIsSet() const;
void unsetNextVolUsage();
/// <summary>
/// Unsigned integer identifying a volume in units of bytes.
/// </summary>
int64_t getNextVolUsageUplink() const;
void setNextVolUsageUplink(int64_t const value);
bool nextVolUsageUplinkIsSet() const;
void unsetNextVolUsageUplink();
/// <summary>
/// Unsigned integer identifying a volume in units of bytes.
/// </summary>
int64_t getNextVolUsageDownlink() const;
void setNextVolUsageDownlink(int64_t const value);
bool nextVolUsageDownlinkIsSet() const;
void unsetNextVolUsageDownlink();
/// <summary>
///
/// </summary>
int32_t getNextTimeUsage() const;
void setNextTimeUsage(int32_t const value);
bool nextTimeUsageIsSet() const;
void unsetNextTimeUsage();
friend void to_json(nlohmann::json& j, const AccuUsageReport& o);
friend void from_json(const nlohmann::json& j, AccuUsageReport& o);
protected:
std::string m_RefUmIds;
int64_t m_VolUsage;
bool m_VolUsageIsSet;
int64_t m_VolUsageUplink;
bool m_VolUsageUplinkIsSet;
int64_t m_VolUsageDownlink;
bool m_VolUsageDownlinkIsSet;
int32_t m_TimeUsage;
bool m_TimeUsageIsSet;
int64_t m_NextVolUsage;
bool m_NextVolUsageIsSet;
int64_t m_NextVolUsageUplink;
bool m_NextVolUsageUplinkIsSet;
int64_t m_NextVolUsageDownlink;
bool m_NextVolUsageDownlinkIsSet;
int32_t m_NextTimeUsage;
bool m_NextTimeUsageIsSet;
};
} // namespace model
} // namespace pcf
} // namespace oai
#endif /* AccuUsageReport_H_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment