diff --git a/CHANGELOG.md b/CHANGELOG.md index e656860b44d6abbe9777eb719b33e65e9c73b4fd..1e7f8c210adaabdf0e490ea6b56901c4ba445619 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # RELEASE NOTES: # +## v2.0.0 -- December 2023 ## + +* Features + - Support YAML configuration file + * Yaml validation default value + - Add support for traffic steering rules + - Add support for redirection rules +* Fixes + - Handling boolean values in yaml parsing for policies +* Tech debt + - Updated common models to 3GPP TS 29.571 Release 16.13.0 and moved them to the shared common submodule + - Updated PCF models to Release 16.17.0 and moved them to the shared common submodule + - Switching to clang-format-12 + - Published image on Docker-Hub is using now Ubuntu-22 as base image + * Ubuntu-18 is no longer supported + ## v1.5.1 -- May 2023 ## * Add HTTP/2 support diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2548db239e35ec061b6391d2d84ced76f1909eac..15fa47656b44d7d2a09d0b441e545a5f64f4668b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,18 +32,16 @@ If the synchronization fails, you may need to go into the path of the failing gi We are using `clang-format` as formatting tool on the C/C++ code. -At the time of writing (March 30th, 2020), we are using `clang-format` version 8.0.0 or above. By default, on a Ubuntu bionic Desktop edition, you would install version 6.0.0. +At the time of writing (September 27th, 2023), we are using `clang-format` version 12.0.0. -So it is very likely you will have to install it manually. Again, at the time of writing, the working version we found was 9.0.0. +On a Ubuntu-20/22 server: ```bash -$ wget https://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz -$ mkdir clang_tmp -$ tar xvfJ clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz -C ./clang_tmp -$ sudo cp clang_tmp/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format /usr/bin/clang-format -$ rm -Rf clang* +$ sudo apt-get update +$ sudo apt-get install clang-format-12 dos2unix +$ sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-12 20 $ clang-format --version -clang-format version 9.0.0 (tags/RELEASE_900/final) +Ubuntu clang-format version 12.0.0-3ubuntu1~20.04.5 ``` How to format: @@ -51,6 +49,7 @@ How to format: ```bash $ cd myClonedWorkspace/src $ clang-format -i theFilesYouWantToFormat +$ dos2unix theFilesYouWantToFormat ``` ## License ## diff --git a/README.md b/README.md index f858d517ffb5b66c65cc37ef25d9c0503d761db3..2f669fe188dfe6888098e53509c6c7175e5c791a 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,17 @@ At the moment, it contains the following network elements: * Access and Mobility Management Function (**AMF**) * Authentication Server Management Function (**AUSF**) +* Location Management Function (**LMF**) +* Network Exposure Function (**NEF**) +* Network Slicing Selection Function (**NSSF**) * Network Repository Function (**NRF**) +* Network Data Analytics Function (**NWDAF**) +* Policy Control Function (**PCF**) * Session Management Function (**SMF**) * Unified Data Management (**UDM**) * Unified Data Repository (**UDR**) -* User Plane Function (**UPF**) -* Network Slicing Selection Function (**NSSF**) -* Network Data Analytics Function (**NWDAF**) * Unstructured Data Storage Function (**UDSF**) -* Policy Control Function (**PCF**) +* User Plane Function (**UPF**) Each has its own repository: this repository (`oai-cn5g-pcf`) is meant for PCF. diff --git a/build/common-build b/build/common-build index ba305ed369af79558564e003a30f7ed792453223..1658381e06a477c79d34508f10610e54ff1e62ef 160000 --- a/build/common-build +++ b/build/common-build @@ -1 +1 @@ -Subproject commit ba305ed369af79558564e003a30f7ed792453223 +Subproject commit 1658381e06a477c79d34508f10610e54ff1e62ef diff --git a/build/pcf/used_common_files.cmake b/build/pcf/used_common_files.cmake index 45fc6c49e587eac13745f40fac40e71be4144537..493663ed20b246bca4c64eb68e951d7a192c4308 100644 --- a/build/pcf/used_common_files.cmake +++ b/build/pcf/used_common_files.cmake @@ -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 diff --git a/ci-scripts/common b/ci-scripts/common index 92a6d16525a1500143fb60f24262e9856056a0ca..a5a3d12c62ae2497458fd6e1495fc4c8854f79b0 160000 --- a/ci-scripts/common +++ b/ci-scripts/common @@ -1 +1 @@ -Subproject commit 92a6d16525a1500143fb60f24262e9856056a0ca +Subproject commit a5a3d12c62ae2497458fd6e1495fc4c8854f79b0 diff --git a/docker/Dockerfile.pcf.rhel8 b/docker/Dockerfile.pcf.rhel8 index 6d1c360b926d910ffa924fe2f7047d64748c370f..09d2e3765efe05b3b8bb360507424d27cc37fc05 100644 --- a/docker/Dockerfile.pcf.rhel8 +++ b/docker/Dockerfile.pcf.rhel8 @@ -93,11 +93,15 @@ COPY ./rhsm-ca /etc/rhsm/ca RUN rm -f /etc/rhsm-host && \ microdnf update -y && \ microdnf install -y \ +# Debug Tools that are not mandatory tzdata \ -# libasan \ procps-ng \ psmisc \ net-tools \ + iputils \ + tcpdump \ +# Mandatory packages for the NF to run +# libasan \ libicu \ boost \ libevent \ diff --git a/docker/Dockerfile.pcf.rocky8 b/docker/Dockerfile.pcf.rocky8 index 231962b346cc963c682721c5721b7641909ce3be..6fc081e0d30aff0f2e69ce239c060fafbbf9a467 100644 --- a/docker/Dockerfile.pcf.rocky8 +++ b/docker/Dockerfile.pcf.rocky8 @@ -75,11 +75,15 @@ ENV TZ=Europe/Paris # We install some debug tools for the moment in addition of mandatory libraries RUN microdnf update -y && \ microdnf install -y \ +# Debug Tools that are not mandatory tzdata \ -# libasan \ procps-ng \ psmisc \ net-tools \ + iputils \ + tcpdump \ +# Mandatory packages for the NF to run +# libasan \ libicu \ boost \ libevent \ diff --git a/docker/Dockerfile.pcf.ubuntu b/docker/Dockerfile.pcf.ubuntu index 534f2bc115579bb757af32ccc391770a09411655..88966a5ab2024daba8e930e8e20e649786dc9005 100644 --- a/docker/Dockerfile.pcf.ubuntu +++ b/docker/Dockerfile.pcf.ubuntu @@ -31,7 +31,7 @@ #--------------------------------------------------------------------- # BASE IMAGE #--------------------------------------------------------------------- -ARG BASE_IMAGE=ubuntu:focal +ARG BASE_IMAGE=ubuntu:jammy FROM $BASE_IMAGE as oai-pcf-base ENV DEBIAN_FRONTEND=noninteractive @@ -84,10 +84,14 @@ ENV TZ=Europe/Paris RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ DEBIAN_FRONTEND=noninteractive apt-get install --yes \ +# Debug Tools that are not mandatory + tzdata \ psmisc \ net-tools \ - tzdata \ + tcpdump \ + iputils-ping \ bc \ +# Mandatory packages for the NF to run openssl \ # Ubuntu 20 --> libasan5 # Ubuntu 22 --> libasan6 diff --git a/src/api-server/CMakeLists.txt b/src/api-server/CMakeLists.txt index bf55ea9cd0fca7943465f3fcf0bc4ee82887ea97..4412458c3016b5ef694a8cc1fb6db63856ba4a98 100644 --- a/src/api-server/CMakeLists.txt +++ b/src/api-server/CMakeLists.txt @@ -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 diff --git a/src/api-server/api/IndividualSMPolicyDocumentApi.cpp b/src/api-server/api/IndividualSMPolicyDocumentApi.cpp index 87d3d4a5a7d36db47dc214d95e336c863a2abc43..3ef5cf5ed17e1003cf161bdedea7a80e1eda4904 100644 --- a/src/api-server/api/IndividualSMPolicyDocumentApi.cpp +++ b/src/api-server/api/IndividualSMPolicyDocumentApi.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) diff --git a/src/api-server/api/IndividualSMPolicyDocumentApi.h b/src/api-server/api/IndividualSMPolicyDocumentApi.h index 8c85924d0b4490cced1a87c5a22045b4e2b9272c..afccbd235aa8840878849f9f2e2a2678105acc91 100644 --- a/src/api-server/api/IndividualSMPolicyDocumentApi.h +++ b/src/api-server/api/IndividualSMPolicyDocumentApi.h @@ -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; }; diff --git a/src/api-server/api/SMPoliciesCollectionApi.cpp b/src/api-server/api/SMPoliciesCollectionApi.cpp index a72272587e664362d7cb7770db34e9b1166e68ea..d46c9f75ce1df86ecd5f4451113d4c54d9bfd624 100644 --- a/src/api-server/api/SMPoliciesCollectionApi.cpp +++ b/src/api-server/api/SMPoliciesCollectionApi.cpp @@ -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) diff --git a/src/api-server/api/SMPoliciesCollectionApi.h b/src/api-server/api/SMPoliciesCollectionApi.h index 49c79e0218e8aab38c75b7487e4c37b16f1970b9..cdb4e922df549ca220f4db704a4459a50d5d850b 100755 --- a/src/api-server/api/SMPoliciesCollectionApi.h +++ b/src/api-server/api/SMPoliciesCollectionApi.h @@ -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; }; diff --git a/src/api-server/handler/individual_sm_policy_document_api_handler.cpp b/src/api-server/handler/individual_sm_policy_document_api_handler.cpp index 2a7cbfb3383882a3f5754851f5b60eb29bd18a58..2ec29dd544f57b7a8524b94da9cd618848a12094 100644 --- a/src/api-server/handler/individual_sm_policy_document_api_handler.cpp +++ b/src/api-server/handler/individual_sm_policy_document_api_handler.cpp @@ -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; diff --git a/src/api-server/handler/individual_sm_policy_document_api_handler.h b/src/api-server/handler/individual_sm_policy_document_api_handler.h index 644f8b069dd6063eb02a389a294cbad41aec1a37..24340b13770b1fd944975f30eb2b603940520005 100644 --- a/src/api-server/handler/individual_sm_policy_document_api_handler.h +++ b/src/api-server/handler/individual_sm_policy_document_api_handler.h @@ -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: diff --git a/src/api-server/handler/sm_policies_collection_api_handler.cpp b/src/api-server/handler/sm_policies_collection_api_handler.cpp index b212d1ecc5f561984dcfef0b90ff0523174aab6d..301ec20be99200e3c8fe6356fd7fc4b9f2748a8e 100644 --- a/src/api-server/handler/sm_policies_collection_api_handler.cpp +++ b/src/api-server/handler/sm_policies_collection_api_handler.cpp @@ -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; diff --git a/src/api-server/handler/sm_policies_collection_api_handler.h b/src/api-server/handler/sm_policies_collection_api_handler.h index 8f9bd8c4acdebc884103d6b7d2c3a8e3f05cc600..781f2e4c69a90857b3beb185c86f26ac6b020f4c 100644 --- a/src/api-server/handler/sm_policies_collection_api_handler.h +++ b/src/api-server/handler/sm_policies_collection_api_handler.h @@ -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; diff --git a/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.cpp b/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.cpp index 347b548ac06b6d2f3568e4d32c47b5d758525ad5..6e020e9254b0271603bc611689b203714aa756f0 100644 --- a/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.cpp +++ b/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.cpp @@ -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; diff --git a/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.h b/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.h index b957acd8a04f62f7ff44e6f8f39b40add67713c4..aa8e6c75ff30050135c2b5c9786caa99e8502b6c 100644 --- a/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.h +++ b/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.h @@ -39,7 +39,7 @@ namespace oai::pcf::api { -using namespace oai::pcf::model; +using namespace oai::model::pcf; using namespace pcf; class IndividualSMPolicyDocumentApiImpl diff --git a/src/api-server/impl/SMPoliciesCollectionApiImpl.cpp b/src/api-server/impl/SMPoliciesCollectionApiImpl.cpp index bc99da85d61222d855d0f3cf306cd77d90c4ab53..146c251f51a94ee79ae2607fde0219a42273b4e1 100644 --- a/src/api-server/impl/SMPoliciesCollectionApiImpl.cpp +++ b/src/api-server/impl/SMPoliciesCollectionApiImpl.cpp @@ -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; diff --git a/src/api-server/impl/SMPoliciesCollectionApiImpl.h b/src/api-server/impl/SMPoliciesCollectionApiImpl.h index 74ac948a50bb888b86529a0947f2115340e3eb07..ed04d97bff5e14dfc5b16c17a026557977799571 100644 --- a/src/api-server/impl/SMPoliciesCollectionApiImpl.h +++ b/src/api-server/impl/SMPoliciesCollectionApiImpl.h @@ -37,7 +37,7 @@ namespace oai::pcf::api { -using namespace oai::pcf::model; +using namespace oai::model::pcf; using namespace pcf; class SMPoliciesCollectionApiImpl diff --git a/src/api-server/model/AccNetChId.cpp b/src/api-server/model/AccNetChId.cpp deleted file mode 100755 index e03d250e5c36c83402e058ae6ef393f92bb7c7e7..0000000000000000000000000000000000000000 --- a/src/api-server/model/AccNetChId.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/** - * 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 diff --git a/src/api-server/model/AccNetChId.h b/src/api-server/model/AccNetChId.h deleted file mode 100755 index da281e7554fdec18fc50047b0cc7f2141627e832..0000000000000000000000000000000000000000 --- a/src/api-server/model/AccNetChId.h +++ /dev/null @@ -1,99 +0,0 @@ -/** - * 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_ */ diff --git a/src/api-server/model/AccNetChargingAddress.cpp b/src/api-server/model/AccNetChargingAddress.cpp deleted file mode 100644 index 6446e4a875dd02e6ff26ff4bee7ec6519fe9207d..0000000000000000000000000000000000000000 --- a/src/api-server/model/AccNetChargingAddress.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/** - * 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 diff --git a/src/api-server/model/AccNetChargingAddress.h b/src/api-server/model/AccNetChargingAddress.h deleted file mode 100644 index 640dbb0ab14c39ac77b79ad35278ab05f7d4a416..0000000000000000000000000000000000000000 --- a/src/api-server/model/AccNetChargingAddress.h +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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_ */ diff --git a/src/api-server/model/AccuUsageReport.cpp b/src/api-server/model/AccuUsageReport.cpp deleted file mode 100755 index 0f621a570acd3f16bbb009b3a93dd72985bd7875..0000000000000000000000000000000000000000 --- a/src/api-server/model/AccuUsageReport.cpp +++ /dev/null @@ -1,332 +0,0 @@ -/** - * 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 diff --git a/src/api-server/model/AccuUsageReport.h b/src/api-server/model/AccuUsageReport.h deleted file mode 100755 index 7a04d80cf4a1c48cd6878f1da0a816b37347524a..0000000000000000000000000000000000000000 --- a/src/api-server/model/AccuUsageReport.h +++ /dev/null @@ -1,151 +0,0 @@ -/** - * 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_ */ diff --git a/src/api-server/model/AdditionalAccessInfo.cpp b/src/api-server/model/AdditionalAccessInfo.cpp deleted file mode 100644 index 8f95aeefb6a1fdba5a9c093eec9b3faecd24afe9..0000000000000000000000000000000000000000 --- a/src/api-server/model/AdditionalAccessInfo.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/** - * 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 "AdditionalAccessInfo.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -AdditionalAccessInfo::AdditionalAccessInfo() { - m_RatTypeIsSet = false; -} - -void AdditionalAccessInfo::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool AdditionalAccessInfo::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool AdditionalAccessInfo::validate( - std::stringstream& /* msg */, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "AdditionalAccessInfo" : pathPrefix; - - return success; -} - -bool AdditionalAccessInfo::operator==(const AdditionalAccessInfo& rhs) const { - return - - (getAccessType() == rhs.getAccessType()) && - - ((!ratTypeIsSet() && !rhs.ratTypeIsSet()) || - (ratTypeIsSet() && rhs.ratTypeIsSet() && - getRatType() == rhs.getRatType())) - - ; -} - -bool AdditionalAccessInfo::operator!=(const AdditionalAccessInfo& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const AdditionalAccessInfo& o) { - j = nlohmann::json(); - j["accessType"] = o.m_AccessType; - if (o.ratTypeIsSet()) j["ratType"] = o.m_RatType; -} - -void from_json(const nlohmann::json& j, AdditionalAccessInfo& o) { - j.at("accessType").get_to(o.m_AccessType); - if (j.find("ratType") != j.end()) { - j.at("ratType").get_to(o.m_RatType); - o.m_RatTypeIsSet = true; - } -} - -AccessType AdditionalAccessInfo::getAccessType() const { - return m_AccessType; -} -void AdditionalAccessInfo::setAccessType(AccessType const& value) { - m_AccessType = value; -} -RatType AdditionalAccessInfo::getRatType() const { - return m_RatType; -} -void AdditionalAccessInfo::setRatType(RatType const& value) { - m_RatType = value; - m_RatTypeIsSet = true; -} -bool AdditionalAccessInfo::ratTypeIsSet() const { - return m_RatTypeIsSet; -} -void AdditionalAccessInfo::unsetRatType() { - m_RatTypeIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/AdditionalAccessInfo.h b/src/api-server/model/AdditionalAccessInfo.h deleted file mode 100755 index 87fef851ccfb6f178ac346b268ac940d268dd5fe..0000000000000000000000000000000000000000 --- a/src/api-server/model/AdditionalAccessInfo.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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. - */ -/* - * AdditionalAccessInfo.h - * - * - */ - -#ifndef AdditionalAccessInfo_H_ -#define AdditionalAccessInfo_H_ - -#include "RatType.h" -#include "AccessType.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class AdditionalAccessInfo { - public: - AdditionalAccessInfo(); - virtual ~AdditionalAccessInfo() = 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 AdditionalAccessInfo& rhs) const; - bool operator!=(const AdditionalAccessInfo& rhs) const; - - ///////////////////////////////////////////// - /// AdditionalAccessInfo members - - /// <summary> - /// - /// </summary> - oai::model::common::AccessType getAccessType() const; - void setAccessType(oai::model::common::AccessType const& value); - /// <summary> - /// - /// </summary> - oai::model::common::RatType getRatType() const; - void setRatType(oai::model::common::RatType const& value); - bool ratTypeIsSet() const; - void unsetRatType(); - - friend void to_json(nlohmann::json& j, const AdditionalAccessInfo& o); - friend void from_json(const nlohmann::json& j, AdditionalAccessInfo& o); - - protected: - oai::model::common::AccessType m_AccessType; - - oai::model::common::RatType m_RatType; - bool m_RatTypeIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* AdditionalAccessInfo_H_ */ diff --git a/src/api-server/model/AfSigProtocol.cpp b/src/api-server/model/AfSigProtocol.cpp deleted file mode 100644 index ace66be11aa0864bf8038f79f58e3a7d1fef78da..0000000000000000000000000000000000000000 --- a/src/api-server/model/AfSigProtocol.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/** - * 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 "AfSigProtocol.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -AfSigProtocol::AfSigProtocol() {} - -void AfSigProtocol::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool AfSigProtocol::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool AfSigProtocol::validate( - std::stringstream& /* msg */, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "AfSigProtocol" : pathPrefix; - - return success; -} - -bool AfSigProtocol::operator==(const AfSigProtocol& rhs) const { - return getValue() == rhs.getValue(); -} - -bool AfSigProtocol::operator!=(const AfSigProtocol& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const AfSigProtocol& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, AfSigProtocol& o) { - from_json(j, o.m_value); -} - -AfSigProtocol_anyOf AfSigProtocol::getValue() const { - return m_value; -} - -void AfSigProtocol::setValue(AfSigProtocol_anyOf value) { - m_value = value; -} - -AfSigProtocol_anyOf::eAfSigProtocol_anyOf AfSigProtocol::getEnumValue() const { - return m_value.getValue(); -} - -void AfSigProtocol::setEnumValue( - AfSigProtocol_anyOf::eAfSigProtocol_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/AfSigProtocol.h b/src/api-server/model/AfSigProtocol.h deleted file mode 100755 index 4d01d19b397bbd6843d4a96fe10110dfe7c272d1..0000000000000000000000000000000000000000 --- a/src/api-server/model/AfSigProtocol.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - * 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. - */ -/* - * AfSigProtocol.h - * - * Possible values are - NO_INFORMATION: Indicate that no information about the - * AF signalling protocol is being provided. - SIP: Indicate that the - * signalling protocol is Session Initiation Protocol. - */ - -#ifndef AfSigProtocol_H_ -#define AfSigProtocol_H_ - -#include "AfSigProtocol_anyOf.h" -#include "NullValue.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// Possible values are - NO_INFORMATION: Indicate that no information about the -/// AF signalling protocol is being provided. - SIP: Indicate that the -/// signalling protocol is Session Initiation Protocol. -/// </summary> -class AfSigProtocol { - public: - AfSigProtocol(); - virtual ~AfSigProtocol() = 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 AfSigProtocol& rhs) const; - bool operator!=(const AfSigProtocol& rhs) const; - - ///////////////////////////////////////////// - /// AfSigProtocol members - - friend void to_json(nlohmann::json& j, const AfSigProtocol& o); - friend void from_json(const nlohmann::json& j, AfSigProtocol& o); - - AfSigProtocol_anyOf getValue() const; - void setValue(AfSigProtocol_anyOf value); - AfSigProtocol_anyOf::eAfSigProtocol_anyOf getEnumValue() const; - void setEnumValue(AfSigProtocol_anyOf::eAfSigProtocol_anyOf value); - - protected: - AfSigProtocol_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* AfSigProtocol_H_ */ diff --git a/src/api-server/model/AfSigProtocol_anyOf.cpp b/src/api-server/model/AfSigProtocol_anyOf.cpp deleted file mode 100755 index a5fff120f827473fb3e00f11eb956e763133a39a..0000000000000000000000000000000000000000 --- a/src/api-server/model/AfSigProtocol_anyOf.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/** - * 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 "AfSigProtocol_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -AfSigProtocol_anyOf::AfSigProtocol_anyOf() {} - -void AfSigProtocol_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool AfSigProtocol_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool AfSigProtocol_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "AfSigProtocol_anyOf" : pathPrefix; - - if (m_value == AfSigProtocol_anyOf::eAfSigProtocol_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool AfSigProtocol_anyOf::operator==(const AfSigProtocol_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool AfSigProtocol_anyOf::operator!=(const AfSigProtocol_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const AfSigProtocol_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case AfSigProtocol_anyOf::eAfSigProtocol_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case AfSigProtocol_anyOf::eAfSigProtocol_anyOf::NO_INFORMATION: - j = "NO_INFORMATION"; - break; - case AfSigProtocol_anyOf::eAfSigProtocol_anyOf::SIP: - j = "SIP"; - break; - case AfSigProtocol_anyOf::eAfSigProtocol_anyOf::NULL_VALUE: - j = nullptr; - break; - } -} - -void from_json(const nlohmann::json& j, AfSigProtocol_anyOf& o) { - if (j.is_null()) { - o.setValue(AfSigProtocol_anyOf::eAfSigProtocol_anyOf::NULL_VALUE); - return; - } - - auto s = j.get<std::string>(); - if (s == "NO_INFORMATION") { - o.setValue(AfSigProtocol_anyOf::eAfSigProtocol_anyOf::NO_INFORMATION); - } else if (s == "SIP") { - o.setValue(AfSigProtocol_anyOf::eAfSigProtocol_anyOf::SIP); - } else if (s == "null") { - o.setValue(AfSigProtocol_anyOf::eAfSigProtocol_anyOf::NULL_VALUE); - } - - else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " AfSigProtocol_anyOf::eAfSigProtocol_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -AfSigProtocol_anyOf::eAfSigProtocol_anyOf AfSigProtocol_anyOf::getValue() - const { - return m_value; -} -void AfSigProtocol_anyOf::setValue( - AfSigProtocol_anyOf::eAfSigProtocol_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/AfSigProtocol_anyOf.h b/src/api-server/model/AfSigProtocol_anyOf.h deleted file mode 100755 index be97e6d3d967a9cec4733d3a24ae17de1e76ceca..0000000000000000000000000000000000000000 --- a/src/api-server/model/AfSigProtocol_anyOf.h +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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. - */ -/* - * AfSigProtocol_anyOf.h - * - * - */ - -#ifndef AfSigProtocol_anyOf_H_ -#define AfSigProtocol_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class AfSigProtocol_anyOf { - public: - AfSigProtocol_anyOf(); - virtual ~AfSigProtocol_anyOf() = default; - - enum class eAfSigProtocol_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - NULL_VALUE, - NO_INFORMATION, - SIP - }; - - /// <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 AfSigProtocol_anyOf& rhs) const; - bool operator!=(const AfSigProtocol_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// AfSigProtocol_anyOf members - - AfSigProtocol_anyOf::eAfSigProtocol_anyOf getValue() const; - void setValue(AfSigProtocol_anyOf::eAfSigProtocol_anyOf value); - - friend void to_json(nlohmann::json& j, const AfSigProtocol_anyOf& o); - friend void from_json(const nlohmann::json& j, AfSigProtocol_anyOf& o); - - protected: - AfSigProtocol_anyOf::eAfSigProtocol_anyOf m_value = AfSigProtocol_anyOf:: - eAfSigProtocol_anyOf::INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* AfSigProtocol_anyOf_H_ */ diff --git a/src/api-server/model/AnGwAddress.cpp b/src/api-server/model/AnGwAddress.cpp deleted file mode 100644 index b3d26d623057943b5da1a419135acd1ba54f30bd..0000000000000000000000000000000000000000 --- a/src/api-server/model/AnGwAddress.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/** - * 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 "AnGwAddress.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -AnGwAddress::AnGwAddress() { - m_AnGwIpv4Addr = ""; - m_AnGwIpv4AddrIsSet = false; - m_AnGwIpv6AddrIsSet = false; -} - -void AnGwAddress::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool AnGwAddress::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool AnGwAddress::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "AnGwAddress" : pathPrefix; - - if (anGwIpv4AddrIsSet()) { - const std::string& value = m_AnGwIpv4Addr; - const std::string currentValuePath = _pathPrefix + ".anGwIpv4Addr"; - } - */ - return success; -} - -bool AnGwAddress::operator==(const AnGwAddress& rhs) const { - return - - ((!anGwIpv4AddrIsSet() && !rhs.anGwIpv4AddrIsSet()) || - (anGwIpv4AddrIsSet() && rhs.anGwIpv4AddrIsSet() && - getAnGwIpv4Addr() == rhs.getAnGwIpv4Addr())) && - - ((!anGwIpv6AddrIsSet() && !rhs.anGwIpv6AddrIsSet()) || - (anGwIpv6AddrIsSet() && rhs.anGwIpv6AddrIsSet() && - getAnGwIpv6Addr() == rhs.getAnGwIpv6Addr())) - - ; -} - -bool AnGwAddress::operator!=(const AnGwAddress& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const AnGwAddress& o) { - j = nlohmann::json(); - if (o.anGwIpv4AddrIsSet()) j["anGwIpv4Addr"] = o.m_AnGwIpv4Addr; - if (o.anGwIpv6AddrIsSet()) j["anGwIpv6Addr"] = o.m_AnGwIpv6Addr; -} - -void from_json(const nlohmann::json& j, AnGwAddress& o) { - if (j.find("anGwIpv4Addr") != j.end()) { - j.at("anGwIpv4Addr").get_to(o.m_AnGwIpv4Addr); - o.m_AnGwIpv4AddrIsSet = true; - } - if (j.find("anGwIpv6Addr") != j.end()) { - j.at("anGwIpv6Addr").get_to(o.m_AnGwIpv6Addr); - o.m_AnGwIpv6AddrIsSet = true; - } -} - -std::string AnGwAddress::getAnGwIpv4Addr() const { - return m_AnGwIpv4Addr; -} -void AnGwAddress::setAnGwIpv4Addr(std::string const& value) { - m_AnGwIpv4Addr = value; - m_AnGwIpv4AddrIsSet = true; -} -bool AnGwAddress::anGwIpv4AddrIsSet() const { - return m_AnGwIpv4AddrIsSet; -} -void AnGwAddress::unsetAnGwIpv4Addr() { - m_AnGwIpv4AddrIsSet = false; -} -Ipv6Addr AnGwAddress::getAnGwIpv6Addr() const { - return m_AnGwIpv6Addr; -} -void AnGwAddress::setAnGwIpv6Addr(Ipv6Addr const& value) { - m_AnGwIpv6Addr = value; - m_AnGwIpv6AddrIsSet = true; -} -bool AnGwAddress::anGwIpv6AddrIsSet() const { - return m_AnGwIpv6AddrIsSet; -} -void AnGwAddress::unsetAnGwIpv6Addr() { - m_AnGwIpv6AddrIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/AnGwAddress.h b/src/api-server/model/AnGwAddress.h deleted file mode 100755 index 82dae4b8b490e9972f15c75458e93ae78e7d006c..0000000000000000000000000000000000000000 --- a/src/api-server/model/AnGwAddress.h +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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. - */ -/* - * AnGwAddress.h - * - * describes the address of the access network gateway control node - */ - -#ifndef AnGwAddress_H_ -#define AnGwAddress_H_ - -#include <string> -#include "Ipv6Addr.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// describes the address of the access network gateway control node -/// </summary> -class AnGwAddress { - public: - AnGwAddress(); - virtual ~AnGwAddress() = 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 AnGwAddress& rhs) const; - bool operator!=(const AnGwAddress& rhs) const; - - ///////////////////////////////////////////// - /// AnGwAddress members - - /// <summary> - /// - /// </summary> - std::string getAnGwIpv4Addr() const; - void setAnGwIpv4Addr(std::string const& value); - bool anGwIpv4AddrIsSet() const; - void unsetAnGwIpv4Addr(); - /// <summary> - /// - /// </summary> - oai::model::common::Ipv6Addr getAnGwIpv6Addr() const; - void setAnGwIpv6Addr(oai::model::common::Ipv6Addr const& value); - bool anGwIpv6AddrIsSet() const; - void unsetAnGwIpv6Addr(); - - friend void to_json(nlohmann::json& j, const AnGwAddress& o); - friend void from_json(const nlohmann::json& j, AnGwAddress& o); - - protected: - std::string m_AnGwIpv4Addr; - bool m_AnGwIpv4AddrIsSet; - oai::model::common::Ipv6Addr m_AnGwIpv6Addr; - bool m_AnGwIpv6AddrIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* AnGwAddress_H_ */ diff --git a/src/api-server/model/AppDetectionInfo.cpp b/src/api-server/model/AppDetectionInfo.cpp deleted file mode 100755 index 0a06c6dad894c6dae4b91d4d1d0643dbb365339e..0000000000000000000000000000000000000000 --- a/src/api-server/model/AppDetectionInfo.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/** - * 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 "AppDetectionInfo.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -AppDetectionInfo::AppDetectionInfo() { - m_AppId = ""; - m_InstanceId = ""; - m_InstanceIdIsSet = false; - m_SdfDescriptionsIsSet = false; -} - -void AppDetectionInfo::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool AppDetectionInfo::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool AppDetectionInfo::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "AppDetectionInfo" : pathPrefix; - - if (sdfDescriptionsIsSet()) { - const std::vector<FlowInformation>& value = m_SdfDescriptions; - const std::string currentValuePath = _pathPrefix + ".sdfDescriptions"; - - 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 + ".sdfDescriptions") && - success; - - i++; - } - } - } - - return success; -} - -bool AppDetectionInfo::operator==(const AppDetectionInfo& rhs) const { - return - - (getAppId() == rhs.getAppId()) && - - ((!instanceIdIsSet() && !rhs.instanceIdIsSet()) || - (instanceIdIsSet() && rhs.instanceIdIsSet() && - getInstanceId() == rhs.getInstanceId())) && - - ((!sdfDescriptionsIsSet() && !rhs.sdfDescriptionsIsSet()) || - (sdfDescriptionsIsSet() && rhs.sdfDescriptionsIsSet() && - getSdfDescriptions() == rhs.getSdfDescriptions())) - - ; -} - -bool AppDetectionInfo::operator!=(const AppDetectionInfo& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const AppDetectionInfo& o) { - j = nlohmann::json(); - j["appId"] = o.m_AppId; - if (o.instanceIdIsSet()) j["instanceId"] = o.m_InstanceId; - if (o.sdfDescriptionsIsSet() || !o.m_SdfDescriptions.empty()) - j["sdfDescriptions"] = o.m_SdfDescriptions; -} - -void from_json(const nlohmann::json& j, AppDetectionInfo& o) { - j.at("appId").get_to(o.m_AppId); - if (j.find("instanceId") != j.end()) { - j.at("instanceId").get_to(o.m_InstanceId); - o.m_InstanceIdIsSet = true; - } - if (j.find("sdfDescriptions") != j.end()) { - j.at("sdfDescriptions").get_to(o.m_SdfDescriptions); - o.m_SdfDescriptionsIsSet = true; - } -} - -std::string AppDetectionInfo::getAppId() const { - return m_AppId; -} -void AppDetectionInfo::setAppId(std::string const& value) { - m_AppId = value; -} -std::string AppDetectionInfo::getInstanceId() const { - return m_InstanceId; -} -void AppDetectionInfo::setInstanceId(std::string const& value) { - m_InstanceId = value; - m_InstanceIdIsSet = true; -} -bool AppDetectionInfo::instanceIdIsSet() const { - return m_InstanceIdIsSet; -} -void AppDetectionInfo::unsetInstanceId() { - m_InstanceIdIsSet = false; -} -std::vector<FlowInformation> AppDetectionInfo::getSdfDescriptions() const { - return m_SdfDescriptions; -} -void AppDetectionInfo::setSdfDescriptions( - std::vector<FlowInformation> const& value) { - m_SdfDescriptions = value; - m_SdfDescriptionsIsSet = true; -} -bool AppDetectionInfo::sdfDescriptionsIsSet() const { - return m_SdfDescriptionsIsSet; -} -void AppDetectionInfo::unsetSdfDescriptions() { - m_SdfDescriptionsIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/AppDetectionInfo.h b/src/api-server/model/AppDetectionInfo.h deleted file mode 100755 index c73ea5fe1c298fcaffa454b7cb2f5c6417f21e7e..0000000000000000000000000000000000000000 --- a/src/api-server/model/AppDetectionInfo.h +++ /dev/null @@ -1,101 +0,0 @@ -/** - * 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. - */ -/* - * AppDetectionInfo.h - * - * - */ - -#ifndef AppDetectionInfo_H_ -#define AppDetectionInfo_H_ - -#include <string> -#include "FlowInformation.h" -#include <vector> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class AppDetectionInfo { - public: - AppDetectionInfo(); - virtual ~AppDetectionInfo() = 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 AppDetectionInfo& rhs) const; - bool operator!=(const AppDetectionInfo& rhs) const; - - ///////////////////////////////////////////// - /// AppDetectionInfo members - - /// <summary> - /// A reference to the application detection filter configured at the UPF - /// </summary> - std::string getAppId() const; - void setAppId(std::string const& value); - /// <summary> - /// Identifier sent by the SMF in order to allow correlation of application - /// Start and Stop events to the specific service data flow description, if - /// service data flow descriptions are deducible. - /// </summary> - std::string getInstanceId() const; - void setInstanceId(std::string const& value); - bool instanceIdIsSet() const; - void unsetInstanceId(); - /// <summary> - /// Contains the detected service data flow descriptions if they are - /// deducible. - /// </summary> - std::vector<FlowInformation> getSdfDescriptions() const; - void setSdfDescriptions(std::vector<FlowInformation> const& value); - bool sdfDescriptionsIsSet() const; - void unsetSdfDescriptions(); - - friend void to_json(nlohmann::json& j, const AppDetectionInfo& o); - friend void from_json(const nlohmann::json& j, AppDetectionInfo& o); - - protected: - std::string m_AppId; - - std::string m_InstanceId; - bool m_InstanceIdIsSet; - std::vector<FlowInformation> m_SdfDescriptions; - bool m_SdfDescriptionsIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* AppDetectionInfo_H_ */ diff --git a/src/api-server/model/AtsssCapability_anyOf.cpp b/src/api-server/model/AtsssCapability_anyOf.cpp deleted file mode 100755 index 1dd03d16902dcb9b73c56068c88923c5e5892874..0000000000000000000000000000000000000000 --- a/src/api-server/model/AtsssCapability_anyOf.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/** - * 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 "AtsssCapability_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -AtsssCapability_anyOf::AtsssCapability_anyOf() {} - -void AtsssCapability_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool AtsssCapability_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool AtsssCapability_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "AtsssCapability_anyOf" : pathPrefix; - - if (m_value == AtsssCapability_anyOf::eAtsssCapability_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool AtsssCapability_anyOf::operator==(const AtsssCapability_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool AtsssCapability_anyOf::operator!=(const AtsssCapability_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const AtsssCapability_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case AtsssCapability_anyOf::eAtsssCapability_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case AtsssCapability_anyOf::eAtsssCapability_anyOf:: - MPTCP_ATSSS_LL_WITH_ASMODE_UL: - j = "MPTCP_ATSSS_LL_WITH_ASMODE_UL"; - break; - case AtsssCapability_anyOf::eAtsssCapability_anyOf:: - MPTCP_ATSSS_LL_WITH_ASMODE_DLUL: - j = "MPTCP_ATSSS_LL_WITH_ASMODE_DLUL"; - break; - case AtsssCapability_anyOf::eAtsssCapability_anyOf::ATSSS_LL: - j = "ATSSS_LL"; - break; - case AtsssCapability_anyOf::eAtsssCapability_anyOf::MPTCP_ATSSS_LL: - j = "MPTCP_ATSSS_LL"; - break; - } -} - -void from_json(const nlohmann::json& j, AtsssCapability_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "MPTCP_ATSSS_LL_WITH_ASMODE_UL") { - o.setValue(AtsssCapability_anyOf::eAtsssCapability_anyOf:: - MPTCP_ATSSS_LL_WITH_ASMODE_UL); - } else if (s == "MPTCP_ATSSS_LL_WITH_ASMODE_DLUL") { - o.setValue(AtsssCapability_anyOf::eAtsssCapability_anyOf:: - MPTCP_ATSSS_LL_WITH_ASMODE_DLUL); - } else if (s == "ATSSS_LL") { - o.setValue(AtsssCapability_anyOf::eAtsssCapability_anyOf::ATSSS_LL); - } else if (s == "MPTCP_ATSSS_LL") { - o.setValue(AtsssCapability_anyOf::eAtsssCapability_anyOf::MPTCP_ATSSS_LL); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " AtsssCapability_anyOf::eAtsssCapability_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -AtsssCapability_anyOf::eAtsssCapability_anyOf AtsssCapability_anyOf::getValue() - const { - return m_value; -} -void AtsssCapability_anyOf::setValue( - AtsssCapability_anyOf::eAtsssCapability_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/AtsssCapability_anyOf.h b/src/api-server/model/AtsssCapability_anyOf.h deleted file mode 100755 index e95112582e8f732ecbc42e7b1a5e16990c253700..0000000000000000000000000000000000000000 --- a/src/api-server/model/AtsssCapability_anyOf.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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. - */ -/* - * AtsssCapability_anyOf.h - * - * - */ - -#ifndef AtsssCapability_anyOf_H_ -#define AtsssCapability_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class AtsssCapability_anyOf { - public: - AtsssCapability_anyOf(); - virtual ~AtsssCapability_anyOf() = default; - - enum class eAtsssCapability_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - MPTCP_ATSSS_LL_WITH_ASMODE_UL, - MPTCP_ATSSS_LL_WITH_ASMODE_DLUL, - ATSSS_LL, - MPTCP_ATSSS_LL - }; - - /// <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 AtsssCapability_anyOf& rhs) const; - bool operator!=(const AtsssCapability_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// AtsssCapability_anyOf members - - AtsssCapability_anyOf::eAtsssCapability_anyOf getValue() const; - void setValue(AtsssCapability_anyOf::eAtsssCapability_anyOf value); - - friend void to_json(nlohmann::json& j, const AtsssCapability_anyOf& o); - friend void from_json(const nlohmann::json& j, AtsssCapability_anyOf& o); - - protected: - AtsssCapability_anyOf::eAtsssCapability_anyOf m_value = - AtsssCapability_anyOf::eAtsssCapability_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* AtsssCapability_anyOf_H_ */ diff --git a/src/api-server/model/AuthorizedDefaultQos.cpp b/src/api-server/model/AuthorizedDefaultQos.cpp deleted file mode 100755 index 09528eb80ed8dd192eca295816419b0170368e25..0000000000000000000000000000000000000000 --- a/src/api-server/model/AuthorizedDefaultQos.cpp +++ /dev/null @@ -1,418 +0,0 @@ -/** - * 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 "AuthorizedDefaultQos.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -AuthorizedDefaultQos::AuthorizedDefaultQos() { - m_r_5qi = 0; - m_r_5qiIsSet = false; - m_ArpIsSet = false; - m_PriorityLevel = 0; - m_PriorityLevelIsSet = false; - m_AverWindow = 2000; - m_AverWindowIsSet = false; - m_MaxDataBurstVol = 0; - m_MaxDataBurstVolIsSet = false; - m_MaxbrUl = ""; - m_MaxbrUlIsSet = false; - m_MaxbrDl = ""; - m_MaxbrDlIsSet = false; - m_GbrUl = ""; - m_GbrUlIsSet = false; - m_GbrDl = ""; - m_GbrDlIsSet = false; - m_Qnc = false; - m_QncIsSet = false; - m_ExtMaxDataBurstVol = 0; - m_ExtMaxDataBurstVolIsSet = false; -} - -void AuthorizedDefaultQos::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool AuthorizedDefaultQos::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool AuthorizedDefaultQos::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "AuthorizedDefaultQos" : pathPrefix; - - if (r5qiIsSet()) { - const int32_t& value = m_r_5qi; - const std::string currentValuePath = _pathPrefix + ".r5qi"; - - 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 (priorityLevelIsSet()) { - const int32_t& value = m_PriorityLevel; - const std::string currentValuePath = _pathPrefix + ".priorityLevel"; - - if (value < 1) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 1;"; - } - if (value > 127) { - success = false; - msg << currentValuePath << ": must be less than or equal to 127;"; - } - } - - if (averWindowIsSet()) { - const int32_t& value = m_AverWindow; - const std::string currentValuePath = _pathPrefix + ".averWindow"; - - if (value < 1) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 1;"; - } - if (value > 4095) { - success = false; - msg << currentValuePath << ": must be less than or equal to 4095;"; - } - } - - if (maxDataBurstVolIsSet()) { - const int32_t& value = m_MaxDataBurstVol; - const std::string currentValuePath = _pathPrefix + ".maxDataBurstVol"; - - if (value < 1) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 1;"; - } - if (value > 4095) { - success = false; - msg << currentValuePath << ": must be less than or equal to 4095;"; - } - } - /* - if (maxbrUlIsSet()) { - const std::string& value = m_MaxbrUl; - const std::string currentValuePath = _pathPrefix + ".maxbrUl"; - } - - if (maxbrDlIsSet()) { - const std::string& value = m_MaxbrDl; - const std::string currentValuePath = _pathPrefix + ".maxbrDl"; - } - - if (gbrUlIsSet()) { - const std::string& value = m_GbrUl; - const std::string currentValuePath = _pathPrefix + ".gbrUl"; - } - - if (gbrDlIsSet()) { - const std::string& value = m_GbrDl; - const std::string currentValuePath = _pathPrefix + ".gbrDl"; - } - */ - if (extMaxDataBurstVolIsSet()) { - const int32_t& value = m_ExtMaxDataBurstVol; - const std::string currentValuePath = _pathPrefix + ".extMaxDataBurstVol"; - - if (value < 4096) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 4096;"; - } - if (value > 2000000) { - success = false; - msg << currentValuePath << ": must be less than or equal to 2000000;"; - } - } - - return success; -} - -bool AuthorizedDefaultQos::operator==(const AuthorizedDefaultQos& rhs) const { - return - - ((!r5qiIsSet() && !rhs.r5qiIsSet()) || - (r5qiIsSet() && rhs.r5qiIsSet() && getR5qi() == rhs.getR5qi())) && - - ((!arpIsSet() && !rhs.arpIsSet()) || - (arpIsSet() && rhs.arpIsSet() && getArp() == rhs.getArp())) && - - ((!priorityLevelIsSet() && !rhs.priorityLevelIsSet()) || - (priorityLevelIsSet() && rhs.priorityLevelIsSet() && - getPriorityLevel() == rhs.getPriorityLevel())) && - - ((!averWindowIsSet() && !rhs.averWindowIsSet()) || - (averWindowIsSet() && rhs.averWindowIsSet() && - getAverWindow() == rhs.getAverWindow())) && - - ((!maxDataBurstVolIsSet() && !rhs.maxDataBurstVolIsSet()) || - (maxDataBurstVolIsSet() && rhs.maxDataBurstVolIsSet() && - getMaxDataBurstVol() == rhs.getMaxDataBurstVol())) && - - ((!maxbrUlIsSet() && !rhs.maxbrUlIsSet()) || - (maxbrUlIsSet() && rhs.maxbrUlIsSet() && - getMaxbrUl() == rhs.getMaxbrUl())) && - - ((!maxbrDlIsSet() && !rhs.maxbrDlIsSet()) || - (maxbrDlIsSet() && rhs.maxbrDlIsSet() && - getMaxbrDl() == rhs.getMaxbrDl())) && - - ((!gbrUlIsSet() && !rhs.gbrUlIsSet()) || - (gbrUlIsSet() && rhs.gbrUlIsSet() && getGbrUl() == rhs.getGbrUl())) && - - ((!gbrDlIsSet() && !rhs.gbrDlIsSet()) || - (gbrDlIsSet() && rhs.gbrDlIsSet() && getGbrDl() == rhs.getGbrDl())) && - - ((!qncIsSet() && !rhs.qncIsSet()) || - (qncIsSet() && rhs.qncIsSet() && isQnc() == rhs.isQnc())) && - - ((!extMaxDataBurstVolIsSet() && !rhs.extMaxDataBurstVolIsSet()) || - (extMaxDataBurstVolIsSet() && rhs.extMaxDataBurstVolIsSet() && - getExtMaxDataBurstVol() == rhs.getExtMaxDataBurstVol())) - - ; -} - -bool AuthorizedDefaultQos::operator!=(const AuthorizedDefaultQos& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const AuthorizedDefaultQos& o) { - j = nlohmann::json(); - if (o.r5qiIsSet()) j["5qi"] = o.m_r_5qi; - if (o.arpIsSet()) j["arp"] = o.m_Arp; - if (o.priorityLevelIsSet()) j["priorityLevel"] = o.m_PriorityLevel; - if (o.averWindowIsSet()) j["averWindow"] = o.m_AverWindow; - if (o.maxDataBurstVolIsSet()) j["maxDataBurstVol"] = o.m_MaxDataBurstVol; - if (o.maxbrUlIsSet()) j["maxbrUl"] = o.m_MaxbrUl; - if (o.maxbrDlIsSet()) j["maxbrDl"] = o.m_MaxbrDl; - if (o.gbrUlIsSet()) j["gbrUl"] = o.m_GbrUl; - if (o.gbrDlIsSet()) j["gbrDl"] = o.m_GbrDl; - if (o.qncIsSet()) j["qnc"] = o.m_Qnc; - if (o.extMaxDataBurstVolIsSet()) - j["extMaxDataBurstVol"] = o.m_ExtMaxDataBurstVol; -} - -void from_json(const nlohmann::json& j, AuthorizedDefaultQos& o) { - if (j.find("5qi") != j.end()) { - j.at("5qi").get_to(o.m_r_5qi); - o.m_r_5qiIsSet = true; - } - if (j.find("arp") != j.end()) { - j.at("arp").get_to(o.m_Arp); - o.m_ArpIsSet = true; - } - if (j.find("priorityLevel") != j.end()) { - j.at("priorityLevel").get_to(o.m_PriorityLevel); - o.m_PriorityLevelIsSet = true; - } - if (j.find("averWindow") != j.end()) { - j.at("averWindow").get_to(o.m_AverWindow); - o.m_AverWindowIsSet = true; - } - if (j.find("maxDataBurstVol") != j.end()) { - j.at("maxDataBurstVol").get_to(o.m_MaxDataBurstVol); - o.m_MaxDataBurstVolIsSet = true; - } - if (j.find("maxbrUl") != j.end()) { - j.at("maxbrUl").get_to(o.m_MaxbrUl); - o.m_MaxbrUlIsSet = true; - } - if (j.find("maxbrDl") != j.end()) { - j.at("maxbrDl").get_to(o.m_MaxbrDl); - o.m_MaxbrDlIsSet = true; - } - if (j.find("gbrUl") != j.end()) { - j.at("gbrUl").get_to(o.m_GbrUl); - o.m_GbrUlIsSet = true; - } - if (j.find("gbrDl") != j.end()) { - j.at("gbrDl").get_to(o.m_GbrDl); - o.m_GbrDlIsSet = true; - } - if (j.find("qnc") != j.end()) { - j.at("qnc").get_to(o.m_Qnc); - o.m_QncIsSet = true; - } - if (j.find("extMaxDataBurstVol") != j.end()) { - j.at("extMaxDataBurstVol").get_to(o.m_ExtMaxDataBurstVol); - o.m_ExtMaxDataBurstVolIsSet = true; - } -} - -int32_t AuthorizedDefaultQos::getR5qi() const { - return m_r_5qi; -} -void AuthorizedDefaultQos::setR5qi(int32_t const value) { - m_r_5qi = value; - m_r_5qiIsSet = true; -} -bool AuthorizedDefaultQos::r5qiIsSet() const { - return m_r_5qiIsSet; -} -void AuthorizedDefaultQos::unsetr_5qi() { - m_r_5qiIsSet = false; -} -Arp AuthorizedDefaultQos::getArp() const { - return m_Arp; -} -void AuthorizedDefaultQos::setArp(Arp const& value) { - m_Arp = value; - m_ArpIsSet = true; -} -bool AuthorizedDefaultQos::arpIsSet() const { - return m_ArpIsSet; -} -void AuthorizedDefaultQos::unsetArp() { - m_ArpIsSet = false; -} -int32_t AuthorizedDefaultQos::getPriorityLevel() const { - return m_PriorityLevel; -} -void AuthorizedDefaultQos::setPriorityLevel(int32_t const value) { - m_PriorityLevel = value; - m_PriorityLevelIsSet = true; -} -bool AuthorizedDefaultQos::priorityLevelIsSet() const { - return m_PriorityLevelIsSet; -} -void AuthorizedDefaultQos::unsetPriorityLevel() { - m_PriorityLevelIsSet = false; -} -int32_t AuthorizedDefaultQos::getAverWindow() const { - return m_AverWindow; -} -void AuthorizedDefaultQos::setAverWindow(int32_t const value) { - m_AverWindow = value; - m_AverWindowIsSet = true; -} -bool AuthorizedDefaultQos::averWindowIsSet() const { - return m_AverWindowIsSet; -} -void AuthorizedDefaultQos::unsetAverWindow() { - m_AverWindowIsSet = false; -} -int32_t AuthorizedDefaultQos::getMaxDataBurstVol() const { - return m_MaxDataBurstVol; -} -void AuthorizedDefaultQos::setMaxDataBurstVol(int32_t const value) { - m_MaxDataBurstVol = value; - m_MaxDataBurstVolIsSet = true; -} -bool AuthorizedDefaultQos::maxDataBurstVolIsSet() const { - return m_MaxDataBurstVolIsSet; -} -void AuthorizedDefaultQos::unsetMaxDataBurstVol() { - m_MaxDataBurstVolIsSet = false; -} -std::string AuthorizedDefaultQos::getMaxbrUl() const { - return m_MaxbrUl; -} -void AuthorizedDefaultQos::setMaxbrUl(std::string const& value) { - m_MaxbrUl = value; - m_MaxbrUlIsSet = true; -} -bool AuthorizedDefaultQos::maxbrUlIsSet() const { - return m_MaxbrUlIsSet; -} -void AuthorizedDefaultQos::unsetMaxbrUl() { - m_MaxbrUlIsSet = false; -} -std::string AuthorizedDefaultQos::getMaxbrDl() const { - return m_MaxbrDl; -} -void AuthorizedDefaultQos::setMaxbrDl(std::string const& value) { - m_MaxbrDl = value; - m_MaxbrDlIsSet = true; -} -bool AuthorizedDefaultQos::maxbrDlIsSet() const { - return m_MaxbrDlIsSet; -} -void AuthorizedDefaultQos::unsetMaxbrDl() { - m_MaxbrDlIsSet = false; -} -std::string AuthorizedDefaultQos::getGbrUl() const { - return m_GbrUl; -} -void AuthorizedDefaultQos::setGbrUl(std::string const& value) { - m_GbrUl = value; - m_GbrUlIsSet = true; -} -bool AuthorizedDefaultQos::gbrUlIsSet() const { - return m_GbrUlIsSet; -} -void AuthorizedDefaultQos::unsetGbrUl() { - m_GbrUlIsSet = false; -} -std::string AuthorizedDefaultQos::getGbrDl() const { - return m_GbrDl; -} -void AuthorizedDefaultQos::setGbrDl(std::string const& value) { - m_GbrDl = value; - m_GbrDlIsSet = true; -} -bool AuthorizedDefaultQos::gbrDlIsSet() const { - return m_GbrDlIsSet; -} -void AuthorizedDefaultQos::unsetGbrDl() { - m_GbrDlIsSet = false; -} -bool AuthorizedDefaultQos::isQnc() const { - return m_Qnc; -} -void AuthorizedDefaultQos::setQnc(bool const value) { - m_Qnc = value; - m_QncIsSet = true; -} -bool AuthorizedDefaultQos::qncIsSet() const { - return m_QncIsSet; -} -void AuthorizedDefaultQos::unsetQnc() { - m_QncIsSet = false; -} -int32_t AuthorizedDefaultQos::getExtMaxDataBurstVol() const { - return m_ExtMaxDataBurstVol; -} -void AuthorizedDefaultQos::setExtMaxDataBurstVol(int32_t const value) { - m_ExtMaxDataBurstVol = value; - m_ExtMaxDataBurstVolIsSet = true; -} -bool AuthorizedDefaultQos::extMaxDataBurstVolIsSet() const { - return m_ExtMaxDataBurstVolIsSet; -} -void AuthorizedDefaultQos::unsetExtMaxDataBurstVol() { - m_ExtMaxDataBurstVolIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/AuthorizedDefaultQos.h b/src/api-server/model/AuthorizedDefaultQos.h deleted file mode 100644 index 2dc9ff1d18bc47e6c00cfd4512b3a1130803caef..0000000000000000000000000000000000000000 --- a/src/api-server/model/AuthorizedDefaultQos.h +++ /dev/null @@ -1,173 +0,0 @@ -/** - * 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. - */ -/* - * AuthorizedDefaultQos.h - * - * - */ - -#ifndef AuthorizedDefaultQos_H_ -#define AuthorizedDefaultQos_H_ - -#include <string> -#include "Arp.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class AuthorizedDefaultQos { - public: - AuthorizedDefaultQos(); - virtual ~AuthorizedDefaultQos() = 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 AuthorizedDefaultQos& rhs) const; - bool operator!=(const AuthorizedDefaultQos& rhs) const; - - ///////////////////////////////////////////// - /// AuthorizedDefaultQos members - - /// <summary> - /// - /// </summary> - int32_t getR5qi() const; - void setR5qi(int32_t const value); - bool r5qiIsSet() const; - void unsetr_5qi(); - /// <summary> - /// - /// </summary> - oai::model::common::Arp getArp() const; - void setArp(oai::model::common::Arp const& value); - bool arpIsSet() const; - void unsetArp(); - /// <summary> - /// - /// </summary> - int32_t getPriorityLevel() const; - void setPriorityLevel(int32_t const value); - bool priorityLevelIsSet() const; - void unsetPriorityLevel(); - /// <summary> - /// - /// </summary> - int32_t getAverWindow() const; - void setAverWindow(int32_t const value); - bool averWindowIsSet() const; - void unsetAverWindow(); - /// <summary> - /// - /// </summary> - int32_t getMaxDataBurstVol() const; - void setMaxDataBurstVol(int32_t const value); - bool maxDataBurstVolIsSet() const; - void unsetMaxDataBurstVol(); - /// <summary> - /// - /// </summary> - std::string getMaxbrUl() const; - void setMaxbrUl(std::string const& value); - bool maxbrUlIsSet() const; - void unsetMaxbrUl(); - /// <summary> - /// - /// </summary> - std::string getMaxbrDl() const; - void setMaxbrDl(std::string const& value); - bool maxbrDlIsSet() const; - void unsetMaxbrDl(); - /// <summary> - /// - /// </summary> - std::string getGbrUl() const; - void setGbrUl(std::string const& value); - bool gbrUlIsSet() const; - void unsetGbrUl(); - /// <summary> - /// - /// </summary> - std::string getGbrDl() const; - void setGbrDl(std::string const& value); - bool gbrDlIsSet() const; - void unsetGbrDl(); - /// <summary> - /// Indicates whether notifications are requested from 3GPP NG-RAN when the - /// GFBR can no longer (or again) be guaranteed for a QoS Flow during the - /// lifetime of the QoS Flow. - /// </summary> - bool isQnc() const; - void setQnc(bool const value); - bool qncIsSet() const; - void unsetQnc(); - /// <summary> - /// - /// </summary> - int32_t getExtMaxDataBurstVol() const; - void setExtMaxDataBurstVol(int32_t const value); - bool extMaxDataBurstVolIsSet() const; - void unsetExtMaxDataBurstVol(); - - friend void to_json(nlohmann::json& j, const AuthorizedDefaultQos& o); - friend void from_json(const nlohmann::json& j, AuthorizedDefaultQos& o); - - protected: - int32_t m_r_5qi; - bool m_r_5qiIsSet; - oai::model::common::Arp m_Arp; - bool m_ArpIsSet; - int32_t m_PriorityLevel; - bool m_PriorityLevelIsSet; - int32_t m_AverWindow; - bool m_AverWindowIsSet; - int32_t m_MaxDataBurstVol; - bool m_MaxDataBurstVolIsSet; - std::string m_MaxbrUl; - bool m_MaxbrUlIsSet; - std::string m_MaxbrDl; - bool m_MaxbrDlIsSet; - std::string m_GbrUl; - bool m_GbrUlIsSet; - std::string m_GbrDl; - bool m_GbrDlIsSet; - bool m_Qnc; - bool m_QncIsSet; - int32_t m_ExtMaxDataBurstVol; - bool m_ExtMaxDataBurstVolIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* AuthorizedDefaultQos_H_ */ diff --git a/src/api-server/model/ChargingData.cpp b/src/api-server/model/ChargingData.cpp deleted file mode 100644 index 4062a320ee87ea54c054e74f83caf5cb13337db4..0000000000000000000000000000000000000000 --- a/src/api-server/model/ChargingData.cpp +++ /dev/null @@ -1,342 +0,0 @@ -/** - * 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 "ChargingData.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -ChargingData::ChargingData() { - m_ChgId = ""; - m_MeteringMethodIsSet = false; - m_Offline = false; - m_OfflineIsSet = false; - m_Online = false; - m_OnlineIsSet = false; - m_SdfHandl = false; - m_SdfHandlIsSet = false; - m_RatingGroup = 0; - m_RatingGroupIsSet = false; - m_ReportingLevelIsSet = false; - m_ServiceId = 0; - m_ServiceIdIsSet = false; - m_SponsorId = ""; - m_SponsorIdIsSet = false; - m_AppSvcProvId = ""; - m_AppSvcProvIdIsSet = false; - m_AfChargingIdentifier = 0; - m_AfChargingIdentifierIsSet = false; - m_AfChargId = ""; - m_AfChargIdIsSet = false; -} - -void ChargingData::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool ChargingData::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool ChargingData::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "ChargingData" : pathPrefix; - } - */ - return success; -} - -bool ChargingData::operator==(const ChargingData& rhs) const { - return - - (getChgId() == rhs.getChgId()) && - - ((!meteringMethodIsSet() && !rhs.meteringMethodIsSet()) || - (meteringMethodIsSet() && rhs.meteringMethodIsSet() && - getMeteringMethod() == rhs.getMeteringMethod())) && - - ((!offlineIsSet() && !rhs.offlineIsSet()) || - (offlineIsSet() && rhs.offlineIsSet() && - isOffline() == rhs.isOffline())) && - - ((!onlineIsSet() && !rhs.onlineIsSet()) || - (onlineIsSet() && rhs.onlineIsSet() && isOnline() == rhs.isOnline())) && - - ((!sdfHandlIsSet() && !rhs.sdfHandlIsSet()) || - (sdfHandlIsSet() && rhs.sdfHandlIsSet() && - isSdfHandl() == rhs.isSdfHandl())) && - - ((!ratingGroupIsSet() && !rhs.ratingGroupIsSet()) || - (ratingGroupIsSet() && rhs.ratingGroupIsSet() && - getRatingGroup() == rhs.getRatingGroup())) && - - ((!reportingLevelIsSet() && !rhs.reportingLevelIsSet()) || - (reportingLevelIsSet() && rhs.reportingLevelIsSet() && - getReportingLevel() == rhs.getReportingLevel())) && - - ((!serviceIdIsSet() && !rhs.serviceIdIsSet()) || - (serviceIdIsSet() && rhs.serviceIdIsSet() && - getServiceId() == rhs.getServiceId())) && - - ((!sponsorIdIsSet() && !rhs.sponsorIdIsSet()) || - (sponsorIdIsSet() && rhs.sponsorIdIsSet() && - getSponsorId() == rhs.getSponsorId())) && - - ((!appSvcProvIdIsSet() && !rhs.appSvcProvIdIsSet()) || - (appSvcProvIdIsSet() && rhs.appSvcProvIdIsSet() && - getAppSvcProvId() == rhs.getAppSvcProvId())) && - - ((!afChargingIdentifierIsSet() && !rhs.afChargingIdentifierIsSet()) || - (afChargingIdentifierIsSet() && rhs.afChargingIdentifierIsSet() && - getAfChargingIdentifier() == rhs.getAfChargingIdentifier())) && - - ((!afChargIdIsSet() && !rhs.afChargIdIsSet()) || - (afChargIdIsSet() && rhs.afChargIdIsSet() && - getAfChargId() == rhs.getAfChargId())) - - ; -} - -bool ChargingData::operator!=(const ChargingData& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const ChargingData& o) { - j = nlohmann::json(); - j["chgId"] = o.m_ChgId; - if (o.meteringMethodIsSet()) j["meteringMethod"] = o.m_MeteringMethod; - if (o.offlineIsSet()) j["offline"] = o.m_Offline; - if (o.onlineIsSet()) j["online"] = o.m_Online; - if (o.sdfHandlIsSet()) j["sdfHandl"] = o.m_SdfHandl; - if (o.ratingGroupIsSet()) j["ratingGroup"] = o.m_RatingGroup; - if (o.reportingLevelIsSet()) j["reportingLevel"] = o.m_ReportingLevel; - if (o.serviceIdIsSet()) j["serviceId"] = o.m_ServiceId; - if (o.sponsorIdIsSet()) j["sponsorId"] = o.m_SponsorId; - if (o.appSvcProvIdIsSet()) j["appSvcProvId"] = o.m_AppSvcProvId; - if (o.afChargingIdentifierIsSet()) - j["afChargingIdentifier"] = o.m_AfChargingIdentifier; - if (o.afChargIdIsSet()) j["afChargId"] = o.m_AfChargId; -} - -void from_json(const nlohmann::json& j, ChargingData& o) { - j.at("chgId").get_to(o.m_ChgId); - if (j.find("meteringMethod") != j.end()) { - j.at("meteringMethod").get_to(o.m_MeteringMethod); - o.m_MeteringMethodIsSet = 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("sdfHandl") != j.end()) { - j.at("sdfHandl").get_to(o.m_SdfHandl); - o.m_SdfHandlIsSet = true; - } - if (j.find("ratingGroup") != j.end()) { - j.at("ratingGroup").get_to(o.m_RatingGroup); - o.m_RatingGroupIsSet = true; - } - if (j.find("reportingLevel") != j.end()) { - j.at("reportingLevel").get_to(o.m_ReportingLevel); - o.m_ReportingLevelIsSet = true; - } - if (j.find("serviceId") != j.end()) { - j.at("serviceId").get_to(o.m_ServiceId); - o.m_ServiceIdIsSet = true; - } - if (j.find("sponsorId") != j.end()) { - j.at("sponsorId").get_to(o.m_SponsorId); - o.m_SponsorIdIsSet = true; - } - if (j.find("appSvcProvId") != j.end()) { - j.at("appSvcProvId").get_to(o.m_AppSvcProvId); - o.m_AppSvcProvIdIsSet = true; - } - if (j.find("afChargingIdentifier") != j.end()) { - j.at("afChargingIdentifier").get_to(o.m_AfChargingIdentifier); - o.m_AfChargingIdentifierIsSet = true; - } - if (j.find("afChargId") != j.end()) { - j.at("afChargId").get_to(o.m_AfChargId); - o.m_AfChargIdIsSet = true; - } -} - -std::string ChargingData::getChgId() const { - return m_ChgId; -} -void ChargingData::setChgId(std::string const& value) { - m_ChgId = value; -} -MeteringMethod ChargingData::getMeteringMethod() const { - return m_MeteringMethod; -} -void ChargingData::setMeteringMethod(MeteringMethod const& value) { - m_MeteringMethod = value; - m_MeteringMethodIsSet = true; -} -bool ChargingData::meteringMethodIsSet() const { - return m_MeteringMethodIsSet; -} -void ChargingData::unsetMeteringMethod() { - m_MeteringMethodIsSet = false; -} -bool ChargingData::isOffline() const { - return m_Offline; -} -void ChargingData::setOffline(bool const value) { - m_Offline = value; - m_OfflineIsSet = true; -} -bool ChargingData::offlineIsSet() const { - return m_OfflineIsSet; -} -void ChargingData::unsetOffline() { - m_OfflineIsSet = false; -} -bool ChargingData::isOnline() const { - return m_Online; -} -void ChargingData::setOnline(bool const value) { - m_Online = value; - m_OnlineIsSet = true; -} -bool ChargingData::onlineIsSet() const { - return m_OnlineIsSet; -} -void ChargingData::unsetOnline() { - m_OnlineIsSet = false; -} -bool ChargingData::isSdfHandl() const { - return m_SdfHandl; -} -void ChargingData::setSdfHandl(bool const value) { - m_SdfHandl = value; - m_SdfHandlIsSet = true; -} -bool ChargingData::sdfHandlIsSet() const { - return m_SdfHandlIsSet; -} -void ChargingData::unsetSdfHandl() { - m_SdfHandlIsSet = false; -} -uint32_t ChargingData::getRatingGroup() const { - return m_RatingGroup; -} -void ChargingData::setRatingGroup(uint32_t const value) { - m_RatingGroup = value; - m_RatingGroupIsSet = true; -} -bool ChargingData::ratingGroupIsSet() const { - return m_RatingGroupIsSet; -} -void ChargingData::unsetRatingGroup() { - m_RatingGroupIsSet = false; -} -ReportingLevel ChargingData::getReportingLevel() const { - return m_ReportingLevel; -} -void ChargingData::setReportingLevel(ReportingLevel const& value) { - m_ReportingLevel = value; - m_ReportingLevelIsSet = true; -} -bool ChargingData::reportingLevelIsSet() const { - return m_ReportingLevelIsSet; -} -void ChargingData::unsetReportingLevel() { - m_ReportingLevelIsSet = false; -} -uint32_t ChargingData::getServiceId() const { - return m_ServiceId; -} -void ChargingData::setServiceId(uint32_t const value) { - m_ServiceId = value; - m_ServiceIdIsSet = true; -} -bool ChargingData::serviceIdIsSet() const { - return m_ServiceIdIsSet; -} -void ChargingData::unsetServiceId() { - m_ServiceIdIsSet = false; -} -std::string ChargingData::getSponsorId() const { - return m_SponsorId; -} -void ChargingData::setSponsorId(std::string const& value) { - m_SponsorId = value; - m_SponsorIdIsSet = true; -} -bool ChargingData::sponsorIdIsSet() const { - return m_SponsorIdIsSet; -} -void ChargingData::unsetSponsorId() { - m_SponsorIdIsSet = false; -} -std::string ChargingData::getAppSvcProvId() const { - return m_AppSvcProvId; -} -void ChargingData::setAppSvcProvId(std::string const& value) { - m_AppSvcProvId = value; - m_AppSvcProvIdIsSet = true; -} -bool ChargingData::appSvcProvIdIsSet() const { - return m_AppSvcProvIdIsSet; -} -void ChargingData::unsetAppSvcProvId() { - m_AppSvcProvIdIsSet = false; -} -uint32_t ChargingData::getAfChargingIdentifier() const { - return m_AfChargingIdentifier; -} -void ChargingData::setAfChargingIdentifier(uint32_t const value) { - m_AfChargingIdentifier = value; - m_AfChargingIdentifierIsSet = true; -} -bool ChargingData::afChargingIdentifierIsSet() const { - return m_AfChargingIdentifierIsSet; -} -void ChargingData::unsetAfChargingIdentifier() { - m_AfChargingIdentifierIsSet = false; -} -std::string ChargingData::getAfChargId() const { - return m_AfChargId; -} -void ChargingData::setAfChargId(std::string const& value) { - m_AfChargId = value; - m_AfChargIdIsSet = true; -} -bool ChargingData::afChargIdIsSet() const { - return m_AfChargIdIsSet; -} -void ChargingData::unsetAfChargId() { - m_AfChargIdIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/ChargingData.h b/src/api-server/model/ChargingData.h deleted file mode 100755 index e257bfa8711842df3c4ac78f4eb8150da8903ed8..0000000000000000000000000000000000000000 --- a/src/api-server/model/ChargingData.h +++ /dev/null @@ -1,181 +0,0 @@ -/** - * 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. - */ -/* - * ChargingData.h - * - * - */ - -#ifndef ChargingData_H_ -#define ChargingData_H_ - -#include "ReportingLevel.h" -#include <string> -#include "MeteringMethod.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class ChargingData { - public: - ChargingData(); - virtual ~ChargingData() = 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 ChargingData& rhs) const; - bool operator!=(const ChargingData& rhs) const; - - ///////////////////////////////////////////// - /// ChargingData members - - /// <summary> - /// Univocally identifies the charging control policy data within a PDU - /// session. - /// </summary> - std::string getChgId() const; - void setChgId(std::string const& value); - /// <summary> - /// - /// </summary> - MeteringMethod getMeteringMethod() const; - void setMeteringMethod(MeteringMethod const& value); - bool meteringMethodIsSet() const; - void unsetMeteringMethod(); - /// <summary> - /// Indicates the offline charging is applicable to the 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 PCC rule. - /// </summary> - bool isOnline() const; - void setOnline(bool const value); - bool onlineIsSet() const; - void unsetOnline(); - /// <summary> - /// Indicates whether the service data flow is allowed to start while the SMF - /// is waiting for the response to the credit request. - /// </summary> - bool isSdfHandl() const; - void setSdfHandl(bool const value); - bool sdfHandlIsSet() const; - void unsetSdfHandl(); - /// <summary> - /// - /// </summary> - uint32_t getRatingGroup() const; - void setRatingGroup(uint32_t const value); - bool ratingGroupIsSet() const; - void unsetRatingGroup(); - /// <summary> - /// - /// </summary> - ReportingLevel getReportingLevel() const; - void setReportingLevel(ReportingLevel const& value); - bool reportingLevelIsSet() const; - void unsetReportingLevel(); - /// <summary> - /// - /// </summary> - uint32_t getServiceId() const; - void setServiceId(uint32_t const value); - bool serviceIdIsSet() const; - void unsetServiceId(); - /// <summary> - /// Indicates the sponsor identity. - /// </summary> - std::string getSponsorId() const; - void setSponsorId(std::string const& value); - bool sponsorIdIsSet() const; - void unsetSponsorId(); - /// <summary> - /// Indicates the application service provider identity. - /// </summary> - std::string getAppSvcProvId() const; - void setAppSvcProvId(std::string const& value); - bool appSvcProvIdIsSet() const; - void unsetAppSvcProvId(); - /// <summary> - /// - /// </summary> - uint32_t getAfChargingIdentifier() const; - void setAfChargingIdentifier(uint32_t const value); - bool afChargingIdentifierIsSet() const; - void unsetAfChargingIdentifier(); - /// <summary> - /// - /// </summary> - std::string getAfChargId() const; - void setAfChargId(std::string const& value); - bool afChargIdIsSet() const; - void unsetAfChargId(); - - friend void to_json(nlohmann::json& j, const ChargingData& o); - friend void from_json(const nlohmann::json& j, ChargingData& o); - - protected: - std::string m_ChgId; - - MeteringMethod m_MeteringMethod; - bool m_MeteringMethodIsSet; - bool m_Offline; - bool m_OfflineIsSet; - bool m_Online; - bool m_OnlineIsSet; - bool m_SdfHandl; - bool m_SdfHandlIsSet; - uint32_t m_RatingGroup; - bool m_RatingGroupIsSet; - ReportingLevel m_ReportingLevel; - bool m_ReportingLevelIsSet; - uint32_t m_ServiceId; - bool m_ServiceIdIsSet; - std::string m_SponsorId; - bool m_SponsorIdIsSet; - std::string m_AppSvcProvId; - bool m_AppSvcProvIdIsSet; - uint32_t m_AfChargingIdentifier; - bool m_AfChargingIdentifierIsSet; - std::string m_AfChargId; - bool m_AfChargIdIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* ChargingData_H_ */ diff --git a/src/api-server/model/ChargingInformation.cpp b/src/api-server/model/ChargingInformation.cpp deleted file mode 100644 index aa86a78d022d7a35d828d0f678e4d251e2fac5d6..0000000000000000000000000000000000000000 --- a/src/api-server/model/ChargingInformation.cpp +++ /dev/null @@ -1,189 +0,0 @@ -/** - * 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 "ChargingInformation.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -ChargingInformation::ChargingInformation() { - m_PrimaryChfAddress = ""; - m_SecondaryChfAddress = ""; - m_PrimaryChfSetId = ""; - m_PrimaryChfSetIdIsSet = false; - m_PrimaryChfInstanceId = ""; - m_PrimaryChfInstanceIdIsSet = false; - m_SecondaryChfSetId = ""; - m_SecondaryChfSetIdIsSet = false; - m_SecondaryChfInstanceId = ""; - m_SecondaryChfInstanceIdIsSet = false; -} - -void ChargingInformation::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool ChargingInformation::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool ChargingInformation::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "ChargingInformation" : pathPrefix; - */ - return success; -} - -bool ChargingInformation::operator==(const ChargingInformation& rhs) const { - return - - (getPrimaryChfAddress() == rhs.getPrimaryChfAddress()) && - - (getSecondaryChfAddress() == rhs.getSecondaryChfAddress()) && - - ((!primaryChfSetIdIsSet() && !rhs.primaryChfSetIdIsSet()) || - (primaryChfSetIdIsSet() && rhs.primaryChfSetIdIsSet() && - getPrimaryChfSetId() == rhs.getPrimaryChfSetId())) && - - ((!primaryChfInstanceIdIsSet() && !rhs.primaryChfInstanceIdIsSet()) || - (primaryChfInstanceIdIsSet() && rhs.primaryChfInstanceIdIsSet() && - getPrimaryChfInstanceId() == rhs.getPrimaryChfInstanceId())) && - - ((!secondaryChfSetIdIsSet() && !rhs.secondaryChfSetIdIsSet()) || - (secondaryChfSetIdIsSet() && rhs.secondaryChfSetIdIsSet() && - getSecondaryChfSetId() == rhs.getSecondaryChfSetId())) && - - ((!secondaryChfInstanceIdIsSet() && !rhs.secondaryChfInstanceIdIsSet()) || - (secondaryChfInstanceIdIsSet() && rhs.secondaryChfInstanceIdIsSet() && - getSecondaryChfInstanceId() == rhs.getSecondaryChfInstanceId())) - - ; -} - -bool ChargingInformation::operator!=(const ChargingInformation& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const ChargingInformation& o) { - j = nlohmann::json(); - j["primaryChfAddress"] = o.m_PrimaryChfAddress; - j["secondaryChfAddress"] = o.m_SecondaryChfAddress; - if (o.primaryChfSetIdIsSet()) j["primaryChfSetId"] = o.m_PrimaryChfSetId; - if (o.primaryChfInstanceIdIsSet()) - j["primaryChfInstanceId"] = o.m_PrimaryChfInstanceId; - if (o.secondaryChfSetIdIsSet()) - j["secondaryChfSetId"] = o.m_SecondaryChfSetId; - if (o.secondaryChfInstanceIdIsSet()) - j["secondaryChfInstanceId"] = o.m_SecondaryChfInstanceId; -} - -void from_json(const nlohmann::json& j, ChargingInformation& o) { - j.at("primaryChfAddress").get_to(o.m_PrimaryChfAddress); - j.at("secondaryChfAddress").get_to(o.m_SecondaryChfAddress); - if (j.find("primaryChfSetId") != j.end()) { - j.at("primaryChfSetId").get_to(o.m_PrimaryChfSetId); - o.m_PrimaryChfSetIdIsSet = true; - } - if (j.find("primaryChfInstanceId") != j.end()) { - j.at("primaryChfInstanceId").get_to(o.m_PrimaryChfInstanceId); - o.m_PrimaryChfInstanceIdIsSet = true; - } - if (j.find("secondaryChfSetId") != j.end()) { - j.at("secondaryChfSetId").get_to(o.m_SecondaryChfSetId); - o.m_SecondaryChfSetIdIsSet = true; - } - if (j.find("secondaryChfInstanceId") != j.end()) { - j.at("secondaryChfInstanceId").get_to(o.m_SecondaryChfInstanceId); - o.m_SecondaryChfInstanceIdIsSet = true; - } -} - -std::string ChargingInformation::getPrimaryChfAddress() const { - return m_PrimaryChfAddress; -} -void ChargingInformation::setPrimaryChfAddress(std::string const& value) { - m_PrimaryChfAddress = value; -} -std::string ChargingInformation::getSecondaryChfAddress() const { - return m_SecondaryChfAddress; -} -void ChargingInformation::setSecondaryChfAddress(std::string const& value) { - m_SecondaryChfAddress = value; -} -std::string ChargingInformation::getPrimaryChfSetId() const { - return m_PrimaryChfSetId; -} -void ChargingInformation::setPrimaryChfSetId(std::string const& value) { - m_PrimaryChfSetId = value; - m_PrimaryChfSetIdIsSet = true; -} -bool ChargingInformation::primaryChfSetIdIsSet() const { - return m_PrimaryChfSetIdIsSet; -} -void ChargingInformation::unsetPrimaryChfSetId() { - m_PrimaryChfSetIdIsSet = false; -} -std::string ChargingInformation::getPrimaryChfInstanceId() const { - return m_PrimaryChfInstanceId; -} -void ChargingInformation::setPrimaryChfInstanceId(std::string const& value) { - m_PrimaryChfInstanceId = value; - m_PrimaryChfInstanceIdIsSet = true; -} -bool ChargingInformation::primaryChfInstanceIdIsSet() const { - return m_PrimaryChfInstanceIdIsSet; -} -void ChargingInformation::unsetPrimaryChfInstanceId() { - m_PrimaryChfInstanceIdIsSet = false; -} -std::string ChargingInformation::getSecondaryChfSetId() const { - return m_SecondaryChfSetId; -} -void ChargingInformation::setSecondaryChfSetId(std::string const& value) { - m_SecondaryChfSetId = value; - m_SecondaryChfSetIdIsSet = true; -} -bool ChargingInformation::secondaryChfSetIdIsSet() const { - return m_SecondaryChfSetIdIsSet; -} -void ChargingInformation::unsetSecondaryChfSetId() { - m_SecondaryChfSetIdIsSet = false; -} -std::string ChargingInformation::getSecondaryChfInstanceId() const { - return m_SecondaryChfInstanceId; -} -void ChargingInformation::setSecondaryChfInstanceId(std::string const& value) { - m_SecondaryChfInstanceId = value; - m_SecondaryChfInstanceIdIsSet = true; -} -bool ChargingInformation::secondaryChfInstanceIdIsSet() const { - return m_SecondaryChfInstanceIdIsSet; -} -void ChargingInformation::unsetSecondaryChfInstanceId() { - m_SecondaryChfInstanceIdIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/ChargingInformation.h b/src/api-server/model/ChargingInformation.h deleted file mode 100755 index 7e21fd70c075b23688efa2f2af492e7f01f68ac1..0000000000000000000000000000000000000000 --- a/src/api-server/model/ChargingInformation.h +++ /dev/null @@ -1,121 +0,0 @@ -/** - * 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. - */ -/* - * ChargingInformation.h - * - * - */ - -#ifndef ChargingInformation_H_ -#define ChargingInformation_H_ - -#include <string> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class ChargingInformation { - public: - ChargingInformation(); - virtual ~ChargingInformation() = 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 ChargingInformation& rhs) const; - bool operator!=(const ChargingInformation& rhs) const; - - ///////////////////////////////////////////// - /// ChargingInformation members - - /// <summary> - /// - /// </summary> - std::string getPrimaryChfAddress() const; - void setPrimaryChfAddress(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getSecondaryChfAddress() const; - void setSecondaryChfAddress(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getPrimaryChfSetId() const; - void setPrimaryChfSetId(std::string const& value); - bool primaryChfSetIdIsSet() const; - void unsetPrimaryChfSetId(); - /// <summary> - /// - /// </summary> - std::string getPrimaryChfInstanceId() const; - void setPrimaryChfInstanceId(std::string const& value); - bool primaryChfInstanceIdIsSet() const; - void unsetPrimaryChfInstanceId(); - /// <summary> - /// - /// </summary> - std::string getSecondaryChfSetId() const; - void setSecondaryChfSetId(std::string const& value); - bool secondaryChfSetIdIsSet() const; - void unsetSecondaryChfSetId(); - /// <summary> - /// - /// </summary> - std::string getSecondaryChfInstanceId() const; - void setSecondaryChfInstanceId(std::string const& value); - bool secondaryChfInstanceIdIsSet() const; - void unsetSecondaryChfInstanceId(); - - friend void to_json(nlohmann::json& j, const ChargingInformation& o); - friend void from_json(const nlohmann::json& j, ChargingInformation& o); - - protected: - std::string m_PrimaryChfAddress; - - std::string m_SecondaryChfAddress; - - std::string m_PrimaryChfSetId; - bool m_PrimaryChfSetIdIsSet; - std::string m_PrimaryChfInstanceId; - bool m_PrimaryChfInstanceIdIsSet; - std::string m_SecondaryChfSetId; - bool m_SecondaryChfSetIdIsSet; - std::string m_SecondaryChfInstanceId; - bool m_SecondaryChfInstanceIdIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* ChargingInformation_H_ */ diff --git a/src/api-server/model/ConditionData.cpp b/src/api-server/model/ConditionData.cpp deleted file mode 100644 index 013e6855889b090d87c510954b3b476893dba8b8..0000000000000000000000000000000000000000 --- a/src/api-server/model/ConditionData.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/** - * 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 "ConditionData.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -ConditionData::ConditionData() { - m_CondId = ""; - m_ActivationTime = ""; - m_ActivationTimeIsSet = false; - m_DeactivationTime = ""; - m_DeactivationTimeIsSet = false; - m_AccessTypeIsSet = false; - m_RatTypeIsSet = false; -} - -void ConditionData::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool ConditionData::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool ConditionData::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "ConditionData" : pathPrefix; - */ - return success; -} - -bool ConditionData::operator==(const ConditionData& rhs) const { - return - - (getCondId() == rhs.getCondId()) && - - ((!activationTimeIsSet() && !rhs.activationTimeIsSet()) || - (activationTimeIsSet() && rhs.activationTimeIsSet() && - getActivationTime() == rhs.getActivationTime())) && - - ((!deactivationTimeIsSet() && !rhs.deactivationTimeIsSet()) || - (deactivationTimeIsSet() && rhs.deactivationTimeIsSet() && - getDeactivationTime() == rhs.getDeactivationTime())) && - - ((!accessTypeIsSet() && !rhs.accessTypeIsSet()) || - (accessTypeIsSet() && rhs.accessTypeIsSet() && - getAccessType() == rhs.getAccessType())) && - - ((!ratTypeIsSet() && !rhs.ratTypeIsSet()) || - (ratTypeIsSet() && rhs.ratTypeIsSet() && - getRatType() == rhs.getRatType())) - - ; -} - -bool ConditionData::operator!=(const ConditionData& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const ConditionData& o) { - j = nlohmann::json(); - j["condId"] = o.m_CondId; - if (o.activationTimeIsSet()) j["activationTime"] = o.m_ActivationTime; - if (o.deactivationTimeIsSet()) j["deactivationTime"] = o.m_DeactivationTime; - if (o.accessTypeIsSet()) j["accessType"] = o.m_AccessType; - if (o.ratTypeIsSet()) j["ratType"] = o.m_RatType; -} - -void from_json(const nlohmann::json& j, ConditionData& o) { - j.at("condId").get_to(o.m_CondId); - if (j.find("activationTime") != j.end()) { - j.at("activationTime").get_to(o.m_ActivationTime); - o.m_ActivationTimeIsSet = true; - } - if (j.find("deactivationTime") != j.end()) { - j.at("deactivationTime").get_to(o.m_DeactivationTime); - o.m_DeactivationTimeIsSet = true; - } - 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; - } -} - -std::string ConditionData::getCondId() const { - return m_CondId; -} -void ConditionData::setCondId(std::string const& value) { - m_CondId = value; -} -std::string ConditionData::getActivationTime() const { - return m_ActivationTime; -} -void ConditionData::setActivationTime(std::string const& value) { - m_ActivationTime = value; - m_ActivationTimeIsSet = true; -} -bool ConditionData::activationTimeIsSet() const { - return m_ActivationTimeIsSet; -} -void ConditionData::unsetActivationTime() { - m_ActivationTimeIsSet = false; -} -std::string ConditionData::getDeactivationTime() const { - return m_DeactivationTime; -} -void ConditionData::setDeactivationTime(std::string const& value) { - m_DeactivationTime = value; - m_DeactivationTimeIsSet = true; -} -bool ConditionData::deactivationTimeIsSet() const { - return m_DeactivationTimeIsSet; -} -void ConditionData::unsetDeactivationTime() { - m_DeactivationTimeIsSet = false; -} -AccessType ConditionData::getAccessType() const { - return m_AccessType; -} -void ConditionData::setAccessType(AccessType const& value) { - m_AccessType = value; - m_AccessTypeIsSet = true; -} -bool ConditionData::accessTypeIsSet() const { - return m_AccessTypeIsSet; -} -void ConditionData::unsetAccessType() { - m_AccessTypeIsSet = false; -} -RatType ConditionData::getRatType() const { - return m_RatType; -} -void ConditionData::setRatType(RatType const& value) { - m_RatType = value; - m_RatTypeIsSet = true; -} -bool ConditionData::ratTypeIsSet() const { - return m_RatTypeIsSet; -} -void ConditionData::unsetRatType() { - m_RatTypeIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/ConditionData.h b/src/api-server/model/ConditionData.h deleted file mode 100755 index fcdcc23c57a27b5c8ca297da80f6c5662a62c3eb..0000000000000000000000000000000000000000 --- a/src/api-server/model/ConditionData.h +++ /dev/null @@ -1,116 +0,0 @@ -/** - * 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. - */ -/* - * ConditionData.h - * - * - */ - -#ifndef ConditionData_H_ -#define ConditionData_H_ - -#include "RatType.h" -#include <string> -#include "AccessType.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class ConditionData { - public: - ConditionData(); - virtual ~ConditionData() = 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 ConditionData& rhs) const; - bool operator!=(const ConditionData& rhs) const; - - ///////////////////////////////////////////// - /// ConditionData members - - /// <summary> - /// Uniquely identifies the condition data within a PDU session. - /// </summary> - std::string getCondId() const; - void setCondId(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getActivationTime() const; - void setActivationTime(std::string const& value); - bool activationTimeIsSet() const; - void unsetActivationTime(); - /// <summary> - /// - /// </summary> - std::string getDeactivationTime() const; - void setDeactivationTime(std::string const& value); - bool deactivationTimeIsSet() const; - void unsetDeactivationTime(); - /// <summary> - /// - /// </summary> - oai::model::common::AccessType getAccessType() const; - void setAccessType(oai::model::common::AccessType const& value); - bool accessTypeIsSet() const; - void unsetAccessType(); - /// <summary> - /// - /// </summary> - oai::model::common::RatType getRatType() const; - void setRatType(oai::model::common::RatType const& value); - bool ratTypeIsSet() const; - void unsetRatType(); - - friend void to_json(nlohmann::json& j, const ConditionData& o); - friend void from_json(const nlohmann::json& j, ConditionData& o); - - protected: - std::string m_CondId; - - std::string m_ActivationTime; - bool m_ActivationTimeIsSet; - std::string m_DeactivationTime; - bool m_DeactivationTimeIsSet; - oai::model::common::AccessType m_AccessType; - bool m_AccessTypeIsSet; - oai::model::common::RatType m_RatType; - bool m_RatTypeIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* ConditionData_H_ */ diff --git a/src/api-server/model/CreditManagementStatus.cpp b/src/api-server/model/CreditManagementStatus.cpp deleted file mode 100755 index e80a882bce6f612fdaf37a55053396cbce0b3d8b..0000000000000000000000000000000000000000 --- a/src/api-server/model/CreditManagementStatus.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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 "CreditManagementStatus.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -CreditManagementStatus::CreditManagementStatus() {} - -void CreditManagementStatus::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool CreditManagementStatus::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool CreditManagementStatus::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "CreditManagementStatus" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool CreditManagementStatus::operator==( - const CreditManagementStatus& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool CreditManagementStatus::operator!=( - const CreditManagementStatus& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const CreditManagementStatus& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, CreditManagementStatus& o) { - from_json(j, o.m_value); -} - -CreditManagementStatus_anyOf CreditManagementStatus::getValue() const { - return m_value; -} - -void CreditManagementStatus::setValue(CreditManagementStatus_anyOf value) { - m_value = value; -} - -CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf -CreditManagementStatus::getEnumValue() const { - return m_value.getValue(); -} - -void CreditManagementStatus::setEnumValue( - CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/CreditManagementStatus.h b/src/api-server/model/CreditManagementStatus.h deleted file mode 100755 index 6a44ea6a7f881c60cdf1e29ef0f48cb224d289e6..0000000000000000000000000000000000000000 --- a/src/api-server/model/CreditManagementStatus.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * 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. - */ -/* - * CreditManagementStatus.h - * - * - */ - -#ifndef CreditManagementStatus_H_ -#define CreditManagementStatus_H_ - -#include "CreditManagementStatus_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class CreditManagementStatus { - public: - CreditManagementStatus(); - virtual ~CreditManagementStatus() = 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 CreditManagementStatus& rhs) const; - bool operator!=(const CreditManagementStatus& rhs) const; - - ///////////////////////////////////////////// - /// CreditManagementStatus members - - CreditManagementStatus_anyOf getValue() const; - void setValue(CreditManagementStatus_anyOf value); - CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf getEnumValue() - const; - void setEnumValue( - CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf value); - friend void to_json(nlohmann::json& j, const CreditManagementStatus& o); - friend void from_json(const nlohmann::json& j, CreditManagementStatus& o); - friend void to_json(nlohmann::json& j, const CreditManagementStatus_anyOf& o); - friend void from_json( - const nlohmann::json& j, CreditManagementStatus_anyOf& o); - - protected: - CreditManagementStatus_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* CreditManagementStatus_H_ */ diff --git a/src/api-server/model/CreditManagementStatus_anyOf.cpp b/src/api-server/model/CreditManagementStatus_anyOf.cpp deleted file mode 100755 index 1d117fd7453d18c198f32b2333e9bd01abf77abd..0000000000000000000000000000000000000000 --- a/src/api-server/model/CreditManagementStatus_anyOf.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/** - * 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 "CreditManagementStatus_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -CreditManagementStatus_anyOf::CreditManagementStatus_anyOf() {} - -void CreditManagementStatus_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool CreditManagementStatus_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool CreditManagementStatus_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "CreditManagementStatus_anyOf" : pathPrefix; - - if (m_value == CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool CreditManagementStatus_anyOf::operator==( - const CreditManagementStatus_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool CreditManagementStatus_anyOf::operator!=( - const CreditManagementStatus_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const CreditManagementStatus_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: - END_USER_SER_DENIED: - j = "END_USER_SER_DENIED"; - break; - case CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: - CREDIT_CTRL_NOT_APP: - j = "CREDIT_CTRL_NOT_APP"; - break; - case CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: - AUTH_REJECTED: - j = "AUTH_REJECTED"; - break; - case CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: - USER_UNKNOWN: - j = "USER_UNKNOWN"; - break; - case CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: - RATING_FAILED: - j = "RATING_FAILED"; - break; - } -} - -void from_json(const nlohmann::json& j, CreditManagementStatus_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "END_USER_SER_DENIED") { - o.setValue(CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: - END_USER_SER_DENIED); - } else if (s == "CREDIT_CTRL_NOT_APP") { - o.setValue(CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: - CREDIT_CTRL_NOT_APP); - } else if (s == "AUTH_REJECTED") { - o.setValue(CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: - AUTH_REJECTED); - } else if (s == "USER_UNKNOWN") { - o.setValue(CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: - USER_UNKNOWN); - } else if (s == "RATING_FAILED") { - o.setValue(CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: - RATING_FAILED); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf -CreditManagementStatus_anyOf::getValue() const { - return m_value; -} -void CreditManagementStatus_anyOf::setValue( - CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/CreditManagementStatus_anyOf.h b/src/api-server/model/CreditManagementStatus_anyOf.h deleted file mode 100755 index f4dd30073bb998c3b9bec27ab70e1a80bdee9d20..0000000000000000000000000000000000000000 --- a/src/api-server/model/CreditManagementStatus_anyOf.h +++ /dev/null @@ -1,89 +0,0 @@ -/** - * 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. - */ -/* - * CreditManagementStatus_anyOf.h - * - * - */ - -#ifndef CreditManagementStatus_anyOf_H_ -#define CreditManagementStatus_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class CreditManagementStatus_anyOf { - public: - CreditManagementStatus_anyOf(); - virtual ~CreditManagementStatus_anyOf() = default; - - enum class eCreditManagementStatus_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - END_USER_SER_DENIED, - CREDIT_CTRL_NOT_APP, - AUTH_REJECTED, - USER_UNKNOWN, - RATING_FAILED - }; - - /// <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 CreditManagementStatus_anyOf& rhs) const; - bool operator!=(const CreditManagementStatus_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// CreditManagementStatus_anyOf members - - CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf getValue() const; - void setValue( - CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf value); - - friend void to_json(nlohmann::json& j, const CreditManagementStatus_anyOf& o); - friend void from_json( - const nlohmann::json& j, CreditManagementStatus_anyOf& o); - - protected: - CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf m_value = - CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* CreditManagementStatus_anyOf_H_ */ diff --git a/src/api-server/model/DnnSelectionMode.cpp b/src/api-server/model/DnnSelectionMode.cpp deleted file mode 100755 index cc62d19e18b67f92bb49dd4632dbe2c2e07ab3b4..0000000000000000000000000000000000000000 --- a/src/api-server/model/DnnSelectionMode.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -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(); -} - -bool DnnSelectionMode::operator!=(const DnnSelectionMode& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const DnnSelectionMode& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -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 pcf -} // namespace oai diff --git a/src/api-server/model/DnnSelectionMode.h b/src/api-server/model/DnnSelectionMode.h deleted file mode 100755 index a66c01fc724d722c9fd9e24a9555e3f6479583f2..0000000000000000000000000000000000000000 --- a/src/api-server/model/DnnSelectionMode.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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.h - * - * Possible values are - VERIFIED - UE_DNN_NOT_VERIFIED - NW_DNN_NOT_VERIFIED - */ - -#ifndef DnnSelectionMode_H_ -#define DnnSelectionMode_H_ - -#include "DnnSelectionMode_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// Possible values are - VERIFIED - UE_DNN_NOT_VERIFIED - NW_DNN_NOT_VERIFIED -/// </summary> -class DnnSelectionMode { - public: - DnnSelectionMode(); - virtual ~DnnSelectionMode() = 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 DnnSelectionMode& rhs) const; - bool operator!=(const DnnSelectionMode& rhs) const; - - ///////////////////////////////////////////// - /// 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 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: - DnnSelectionMode_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* DnnSelectionMode_H_ */ diff --git a/src/api-server/model/DnnSelectionMode_anyOf.cpp b/src/api-server/model/DnnSelectionMode_anyOf.cpp deleted file mode 100755 index 56c5df0233aa8a4c89ed64f88f0f134e94abcc03..0000000000000000000000000000000000000000 --- a/src/api-server/model/DnnSelectionMode_anyOf.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai diff --git a/src/api-server/model/DnnSelectionMode_anyOf.h b/src/api-server/model/DnnSelectionMode_anyOf.h deleted file mode 100755 index 0ad21161b538edf3ab6a9f56069ba55dbb89508f..0000000000000000000000000000000000000000 --- a/src/api-server/model/DnnSelectionMode_anyOf.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai -#endif /* DnnSelectionMode_anyOf_H_ */ diff --git a/src/api-server/model/ErrorReport.cpp b/src/api-server/model/ErrorReport.cpp deleted file mode 100755 index 36315361db99ddf098aaba89d3e9049c6120b51c..0000000000000000000000000000000000000000 --- a/src/api-server/model/ErrorReport.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/** - * 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 "ErrorReport.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -ErrorReport::ErrorReport() { - m_ErrorIsSet = false; - m_RuleReportsIsSet = false; - m_SessRuleReportsIsSet = false; -} - -void ErrorReport::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool ErrorReport::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool ErrorReport::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "ErrorReport" : pathPrefix; - - if (ruleReportsIsSet()) { - const std::vector<RuleReport>& value = m_RuleReports; - const std::string currentValuePath = _pathPrefix + ".ruleReports"; - - 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 RuleReport& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = - value.validate(msg, currentValuePath + ".ruleReports") && success; - - i++; - } - } - } - - if (sessRuleReportsIsSet()) { - const std::vector<SessionRuleReport>& value = m_SessRuleReports; - const std::string currentValuePath = _pathPrefix + ".sessRuleReports"; - - 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 SessionRuleReport& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".sessRuleReports") && - success; - - i++; - } - } - } - - return success; -} - -bool ErrorReport::operator==(const ErrorReport& rhs) const { - return - - ((!errorIsSet() && !rhs.errorIsSet()) || - (errorIsSet() && rhs.errorIsSet() && getError() == rhs.getError())) && - - ((!ruleReportsIsSet() && !rhs.ruleReportsIsSet()) || - (ruleReportsIsSet() && rhs.ruleReportsIsSet() && - getRuleReports() == rhs.getRuleReports())) && - - ((!sessRuleReportsIsSet() && !rhs.sessRuleReportsIsSet()) || - (sessRuleReportsIsSet() && rhs.sessRuleReportsIsSet() && - getSessRuleReports() == rhs.getSessRuleReports())) - - ; -} - -bool ErrorReport::operator!=(const ErrorReport& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const ErrorReport& o) { - j = nlohmann::json(); - if (o.errorIsSet()) j["error"] = o.m_Error; - if (o.ruleReportsIsSet() || !o.m_RuleReports.empty()) - j["ruleReports"] = o.m_RuleReports; - if (o.sessRuleReportsIsSet() || !o.m_SessRuleReports.empty()) - j["sessRuleReports"] = o.m_SessRuleReports; -} - -void from_json(const nlohmann::json& j, ErrorReport& o) { - if (j.find("error") != j.end()) { - j.at("error").get_to(o.m_Error); - o.m_ErrorIsSet = true; - } - if (j.find("ruleReports") != j.end()) { - j.at("ruleReports").get_to(o.m_RuleReports); - o.m_RuleReportsIsSet = true; - } - if (j.find("sessRuleReports") != j.end()) { - j.at("sessRuleReports").get_to(o.m_SessRuleReports); - o.m_SessRuleReportsIsSet = true; - } -} - -ProblemDetails ErrorReport::getError() const { - return m_Error; -} -void ErrorReport::setError(ProblemDetails const& value) { - m_Error = value; - m_ErrorIsSet = true; -} -bool ErrorReport::errorIsSet() const { - return m_ErrorIsSet; -} -void ErrorReport::unsetError() { - m_ErrorIsSet = false; -} -std::vector<RuleReport> ErrorReport::getRuleReports() const { - return m_RuleReports; -} -void ErrorReport::setRuleReports(std::vector<RuleReport> const& value) { - m_RuleReports = value; - m_RuleReportsIsSet = true; -} -bool ErrorReport::ruleReportsIsSet() const { - return m_RuleReportsIsSet; -} -void ErrorReport::unsetRuleReports() { - m_RuleReportsIsSet = false; -} -std::vector<SessionRuleReport> ErrorReport::getSessRuleReports() const { - return m_SessRuleReports; -} -void ErrorReport::setSessRuleReports( - std::vector<SessionRuleReport> const& value) { - m_SessRuleReports = value; - m_SessRuleReportsIsSet = true; -} -bool ErrorReport::sessRuleReportsIsSet() const { - return m_SessRuleReportsIsSet; -} -void ErrorReport::unsetSessRuleReports() { - m_SessRuleReportsIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/ErrorReport.h b/src/api-server/model/ErrorReport.h deleted file mode 100755 index b815edf1f6bb6e95e9815fb6f4db9cd07b67dbfd..0000000000000000000000000000000000000000 --- a/src/api-server/model/ErrorReport.h +++ /dev/null @@ -1,101 +0,0 @@ -/** - * 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. - */ -/* - * ErrorReport.h - * - * - */ - -#ifndef ErrorReport_H_ -#define ErrorReport_H_ - -#include "RuleReport.h" -#include "SessionRuleReport.h" -#include <vector> -#include "ProblemDetails.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class ErrorReport { - public: - ErrorReport(); - virtual ~ErrorReport() = 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 ErrorReport& rhs) const; - bool operator!=(const ErrorReport& rhs) const; - - ///////////////////////////////////////////// - /// ErrorReport members - - /// <summary> - /// - /// </summary> - oai::model::common::ProblemDetails getError() const; - void setError(oai::model::common::ProblemDetails const& value); - bool errorIsSet() const; - void unsetError(); - /// <summary> - /// Used to report the PCC rule failure. - /// </summary> - std::vector<RuleReport> getRuleReports() const; - void setRuleReports(std::vector<RuleReport> const& value); - bool ruleReportsIsSet() const; - void unsetRuleReports(); - /// <summary> - /// Used to report the session rule failure. - /// </summary> - std::vector<SessionRuleReport> getSessRuleReports() const; - void setSessRuleReports(std::vector<SessionRuleReport> const& value); - bool sessRuleReportsIsSet() const; - void unsetSessRuleReports(); - - friend void to_json(nlohmann::json& j, const ErrorReport& o); - friend void from_json(const nlohmann::json& j, ErrorReport& o); - - protected: - oai::model::common::ProblemDetails m_Error; - bool m_ErrorIsSet; - std::vector<RuleReport> m_RuleReports; - bool m_RuleReportsIsSet; - std::vector<SessionRuleReport> m_SessRuleReports; - bool m_SessRuleReportsIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* ErrorReport_H_ */ diff --git a/src/api-server/model/EthFlowDescription.cpp b/src/api-server/model/EthFlowDescription.cpp deleted file mode 100755 index 283c4573346f911c6c134e35a8505b7eae632b15..0000000000000000000000000000000000000000 --- a/src/api-server/model/EthFlowDescription.cpp +++ /dev/null @@ -1,286 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai diff --git a/src/api-server/model/EthFlowDescription.h b/src/api-server/model/EthFlowDescription.h deleted file mode 100755 index b65c49ea75b29ee4eeab080d9153d7cf8b01961e..0000000000000000000000000000000000000000 --- a/src/api-server/model/EthFlowDescription.h +++ /dev/null @@ -1,143 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai -#endif /* EthFlowDescription_H_ */ diff --git a/src/api-server/model/FailureCause.cpp b/src/api-server/model/FailureCause.cpp deleted file mode 100755 index bdadcf5308cc87d0bb68142155160237f428c238..0000000000000000000000000000000000000000 --- a/src/api-server/model/FailureCause.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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 "FailureCause.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -FailureCause::FailureCause() {} - -void FailureCause::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool FailureCause::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool FailureCause::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "FailureCause" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool FailureCause::operator==(const FailureCause& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool FailureCause::operator!=(const FailureCause& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const FailureCause& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, FailureCause& o) { - from_json(j, o.m_value); -} - -FailureCause_anyOf FailureCause::getValue() const { - return m_value; -} - -void FailureCause::setValue(FailureCause_anyOf value) { - m_value = value; -} - -FailureCause_anyOf::eFailureCause_anyOf FailureCause::getEnumValue() const { - return m_value.getValue(); -} - -void FailureCause::setEnumValue(FailureCause_anyOf::eFailureCause_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/FailureCause.h b/src/api-server/model/FailureCause.h deleted file mode 100755 index e3a07dfbce4e104b4483f26f8f959d94634c0216..0000000000000000000000000000000000000000 --- a/src/api-server/model/FailureCause.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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. - */ -/* - * FailureCause.h - * - * - */ - -#ifndef FailureCause_H_ -#define FailureCause_H_ - -#include "FailureCause_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class FailureCause { - public: - FailureCause(); - virtual ~FailureCause() = 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 FailureCause& rhs) const; - bool operator!=(const FailureCause& rhs) const; - - ///////////////////////////////////////////// - /// FailureCause members - - FailureCause_anyOf getValue() const; - void setValue(FailureCause_anyOf value); - FailureCause_anyOf::eFailureCause_anyOf getEnumValue() const; - void setEnumValue(FailureCause_anyOf::eFailureCause_anyOf value); - friend void to_json(nlohmann::json& j, const FailureCause& o); - friend void from_json(const nlohmann::json& j, FailureCause& o); - friend void to_json(nlohmann::json& j, const FailureCause_anyOf& o); - friend void from_json(const nlohmann::json& j, FailureCause_anyOf& o); - - protected: - FailureCause_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* FailureCause_H_ */ diff --git a/src/api-server/model/FailureCause_anyOf.cpp b/src/api-server/model/FailureCause_anyOf.cpp deleted file mode 100755 index ab075f665d36c3f293c3b56c1e3a401f62b06c95..0000000000000000000000000000000000000000 --- a/src/api-server/model/FailureCause_anyOf.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/** - * 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 "FailureCause_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -FailureCause_anyOf::FailureCause_anyOf() {} - -void FailureCause_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool FailureCause_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool FailureCause_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "FailureCause_anyOf" : pathPrefix; - - if (m_value == FailureCause_anyOf::eFailureCause_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool FailureCause_anyOf::operator==(const FailureCause_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool FailureCause_anyOf::operator!=(const FailureCause_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const FailureCause_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case FailureCause_anyOf::eFailureCause_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case FailureCause_anyOf::eFailureCause_anyOf::PCC_RULE_EVENT: - j = "PCC_RULE_EVENT"; - break; - case FailureCause_anyOf::eFailureCause_anyOf::PCC_QOS_FLOW_EVENT: - j = "PCC_QOS_FLOW_EVENT"; - break; - case FailureCause_anyOf::eFailureCause_anyOf::RULE_PERMANENT_ERROR: - j = "RULE_PERMANENT_ERROR"; - break; - case FailureCause_anyOf::eFailureCause_anyOf::RULE_TEMPORARY_ERROR: - j = "RULE_TEMPORARY_ERROR"; - break; - } -} - -void from_json(const nlohmann::json& j, FailureCause_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "PCC_RULE_EVENT") { - o.setValue(FailureCause_anyOf::eFailureCause_anyOf::PCC_RULE_EVENT); - } else if (s == "PCC_QOS_FLOW_EVENT") { - o.setValue(FailureCause_anyOf::eFailureCause_anyOf::PCC_QOS_FLOW_EVENT); - } else if (s == "RULE_PERMANENT_ERROR") { - o.setValue(FailureCause_anyOf::eFailureCause_anyOf::RULE_PERMANENT_ERROR); - } else if (s == "RULE_TEMPORARY_ERROR") { - o.setValue(FailureCause_anyOf::eFailureCause_anyOf::RULE_TEMPORARY_ERROR); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " FailureCause_anyOf::eFailureCause_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -FailureCause_anyOf::eFailureCause_anyOf FailureCause_anyOf::getValue() const { - return m_value; -} -void FailureCause_anyOf::setValue( - FailureCause_anyOf::eFailureCause_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/FailureCause_anyOf.h b/src/api-server/model/FailureCause_anyOf.h deleted file mode 100755 index 26f6c608f732805d65708e1f0fde34ab90cdd178..0000000000000000000000000000000000000000 --- a/src/api-server/model/FailureCause_anyOf.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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. - */ -/* - * FailureCause_anyOf.h - * - * - */ - -#ifndef FailureCause_anyOf_H_ -#define FailureCause_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class FailureCause_anyOf { - public: - FailureCause_anyOf(); - virtual ~FailureCause_anyOf() = default; - - enum class eFailureCause_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - PCC_RULE_EVENT, - PCC_QOS_FLOW_EVENT, - RULE_PERMANENT_ERROR, - RULE_TEMPORARY_ERROR - }; - - /// <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 FailureCause_anyOf& rhs) const; - bool operator!=(const FailureCause_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// FailureCause_anyOf members - - FailureCause_anyOf::eFailureCause_anyOf getValue() const; - void setValue(FailureCause_anyOf::eFailureCause_anyOf value); - - friend void to_json(nlohmann::json& j, const FailureCause_anyOf& o); - friend void from_json(const nlohmann::json& j, FailureCause_anyOf& o); - - protected: - FailureCause_anyOf::eFailureCause_anyOf m_value = - FailureCause_anyOf::eFailureCause_anyOf::INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* FailureCause_anyOf_H_ */ diff --git a/src/api-server/model/FailureCode.cpp b/src/api-server/model/FailureCode.cpp deleted file mode 100755 index bd0c0d4b984026be9811331f5103bd3bfe1e6cbc..0000000000000000000000000000000000000000 --- a/src/api-server/model/FailureCode.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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 "FailureCode.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -FailureCode::FailureCode() {} - -void FailureCode::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool FailureCode::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool FailureCode::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "FailureCode" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool FailureCode::operator==(const FailureCode& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool FailureCode::operator!=(const FailureCode& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const FailureCode& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, FailureCode& o) { - from_json(j, o.m_value); -} - -FailureCode_anyOf FailureCode::getValue() const { - return m_value; -} - -void FailureCode::setValue(FailureCode_anyOf value) { - m_value = value; -} - -FailureCode_anyOf::eFailureCode_anyOf FailureCode::getEnumValue() const { - return m_value.getValue(); -} - -void FailureCode::setEnumValue(FailureCode_anyOf::eFailureCode_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/FailureCode.h b/src/api-server/model/FailureCode.h deleted file mode 100755 index 8bbdceea229cbc3b6103d4f4421d5d5e05264697..0000000000000000000000000000000000000000 --- a/src/api-server/model/FailureCode.h +++ /dev/null @@ -1,195 +0,0 @@ -/** - * 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. - */ -/* - * FailureCode.h - * - * Possible values are - UNK_RULE_ID: Indicates that the pre-provisioned PCC - * rule could not be successfully activated because the PCC rule identifier is - * unknown to the SMF. - RA_GR_ERR: Indicate that the PCC rule could not be - * successfully installed or enforced because the Rating Group specified within - * the Charging Data policy decision which the PCC rule refers to is unknown or, - * invalid. - SER_ID_ERR: Indicate that the PCC rule could not be successfully - * installed or enforced because the Service Identifier specified within the - * Charging Data policy decision which the PCC rule refers to is invalid, - * unknown, or not applicable to the service being charged. - NF_MAL: Indicate - * that the PCC rule could not be successfully installed (for those provisioned - * from the PCF) or activated (for those pre-defined in SMF) or enforced (for - * those already successfully installed) due to SMF/UPF malfunction. - - * RES_LIM: Indicate that the PCC rule could not be successfully installed (for - * those provisioned from PCF) or activated (for those pre-defined in SMF) or - * enforced (for those already successfully installed) due to a limitation of - * resources at the SMF/UPF. - MAX_NR_QoS_FLOW: Indicate that the PCC rule - * could not be successfully installed (for those provisioned from PCF) or - * activated (for those pre-defined in SMF) or enforced (for those already - * successfully installed) due to the fact that the maximum number of QoS flows - * has been reached for the PDU session. - MISS_FLOW_INFO: Indicate that the - * PCC rule could not be successfully installed or enforced because neither the - * \"flowInfos\" attribute nor the \"appId\" attribute is - * specified within the PccRule data structure by the PCF during the first - * install request of the PCC rule. - RES_ALLO_FAIL: Indicate that the PCC - * rule could not be successfully installed or maintained since the QoS flow - * establishment/modification failed, or the QoS flow was released. - - * UNSUCC_QOS_VAL: indicate that the QoS validation has failed or when - * Guaranteed Bandwidth > Max-Requested-Bandwidth. - INCOR_FLOW_INFO: - * Indicate that the PCC rule could not be successfully installed or modified at - * the SMF because the provided flow information is not supported by the network - * (e.g. the provided IP address(es) or Ipv6 prefix(es) do not correspond to an - * IP version applicable for the PDU session). - PS_TO_CS_HAN: Indicate that - * the PCC rule could not be maintained because of PS to CS handover. - - * APP_ID_ERR: Indicate that the rule could not be successfully installed or - * enforced because the Application Identifier is invalid, unknown, or not - * applicable to the application required for detection. - NO_QOS_FLOW_BOUND: - * Indicate that there is no QoS flow which the SMF can bind the PCC rule(s) to. - * - FILTER_RES: Indicate that the Flow Information within the - * \"flowInfos\" attribute cannot be handled by the SMF because any of - * the restrictions defined in subclause 5.4.2 of 3GPP TS 29.212 was not met. - - * MISS_REDI_SER_ADDR: Indicate that the PCC rule could not be successfully - * installed or enforced at the SMF because there is no valid Redirect Server - * Address within the Traffic Control Data policy decision which the PCC rule - * refers to provided by the PCF and no preconfigured redirection address for - * this PCC rule at the SMF. - CM_END_USER_SER_DENIED: Indicate that the - * charging system denied the service request due to service restrictions (e.g. - * terminate rating group) or limitations related to the end-user, for example - * the end-user's account could not cover the requested service. - - * CM_CREDIT_CON_NOT_APP: Indicate that the charging system determined that the - * service can be granted to the end user but no further credit control is - * needed for the service (e.g. service is free of charge or is treated for - * offline charging). - CM_AUTH_REJ: Indicate that the charging system denied - * the service request in order to terminate the service for which credit is - * requested. - CM_USER_UNK: Indicate that the specified end user could not be - * found in the charging system. - CM_RAT_FAILED: Indicate that the charging - * system cannot rate the service request due to insufficient rating input, - * incorrect AVP combination or due to an attribute or an attribute value that - * is not recognized or supported in the rating. - UE_STA_SUSP: Indicates that - * the UE is in suspend state. - */ - -#ifndef FailureCode_H_ -#define FailureCode_H_ - -#include "FailureCode_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// Possible values are - UNK_RULE_ID: Indicates that the pre-provisioned PCC -/// rule could not be successfully activated because the PCC rule identifier is -/// unknown to the SMF. - RA_GR_ERR: Indicate that the PCC rule could not be -/// successfully installed or enforced because the Rating Group specified within -/// the Charging Data policy decision which the PCC rule refers to is unknown -/// or, invalid. - SER_ID_ERR: Indicate that the PCC rule could not be -/// successfully installed or enforced because the Service Identifier specified -/// within the Charging Data policy decision which the PCC rule refers to is -/// invalid, unknown, or not applicable to the service being charged. - -/// NF_MAL: Indicate that the PCC rule could not be successfully installed (for -/// those provisioned from the PCF) or activated (for those pre-defined in SMF) -/// or enforced (for those already successfully installed) due to SMF/UPF -/// malfunction. - RES_LIM: Indicate that the PCC rule could not be -/// successfully installed (for those provisioned from PCF) or activated (for -/// those pre-defined in SMF) or enforced (for those already successfully -/// installed) due to a limitation of resources at the SMF/UPF. - -/// MAX_NR_QoS_FLOW: Indicate that the PCC rule could not be successfully -/// installed (for those provisioned from PCF) or activated (for those -/// pre-defined in SMF) or enforced (for those already successfully installed) -/// due to the fact that the maximum number of QoS flows has been reached for -/// the PDU session. - MISS_FLOW_INFO: Indicate that the PCC rule could not be -/// successfully installed or enforced because neither the -/// \"flowInfos\" attribute nor the \"appId\" attribute is -/// specified within the PccRule data structure by the PCF during the first -/// install request of the PCC rule. - RES_ALLO_FAIL: Indicate that the PCC -/// rule could not be successfully installed or maintained since the QoS flow -/// establishment/modification failed, or the QoS flow was released. - -/// UNSUCC_QOS_VAL: indicate that the QoS validation has failed or when -/// Guaranteed Bandwidth > Max-Requested-Bandwidth. - INCOR_FLOW_INFO: -/// Indicate that the PCC rule could not be successfully installed or modified -/// at the SMF because the provided flow information is not supported by the -/// network (e.g. the provided IP address(es) or Ipv6 prefix(es) do not -/// correspond to an IP version applicable for the PDU session). - -/// PS_TO_CS_HAN: Indicate that the PCC rule could not be maintained because of -/// PS to CS handover. - APP_ID_ERR: Indicate that the rule could not be -/// successfully installed or enforced because the Application Identifier is -/// invalid, unknown, or not applicable to the application required for -/// detection. - NO_QOS_FLOW_BOUND: Indicate that there is no QoS flow which -/// the SMF can bind the PCC rule(s) to. - FILTER_RES: Indicate that the Flow -/// Information within the \"flowInfos\" attribute cannot be handled -/// by the SMF because any of the restrictions defined in subclause 5.4.2 of -/// 3GPP TS 29.212 was not met. - MISS_REDI_SER_ADDR: Indicate that the PCC -/// rule could not be successfully installed or enforced at the SMF because -/// there is no valid Redirect Server Address within the Traffic Control Data -/// policy decision which the PCC rule refers to provided by the PCF and no -/// preconfigured redirection address for this PCC rule at the SMF. - -/// CM_END_USER_SER_DENIED: Indicate that the charging system denied the service -/// request due to service restrictions (e.g. terminate rating group) or -/// limitations related to the end-user, for example the end-user's account -/// could not cover the requested service. - CM_CREDIT_CON_NOT_APP: Indicate -/// that the charging system determined that the service can be granted to the -/// end user but no further credit control is needed for the service (e.g. -/// service is free of charge or is treated for offline charging). - -/// CM_AUTH_REJ: Indicate that the charging system denied the service request in -/// order to terminate the service for which credit is requested. - -/// CM_USER_UNK: Indicate that the specified end user could not be found in the -/// charging system. - CM_RAT_FAILED: Indicate that the charging system cannot -/// rate the service request due to insufficient rating input, incorrect AVP -/// combination or due to an attribute or an attribute value that is not -/// recognized or supported in the rating. - UE_STA_SUSP: Indicates that the -/// UE is in suspend state. -/// </summary> -class FailureCode { - public: - FailureCode(); - virtual ~FailureCode() = 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 FailureCode& rhs) const; - bool operator!=(const FailureCode& rhs) const; - - ///////////////////////////////////////////// - /// FailureCode members - - FailureCode_anyOf getValue() const; - void setValue(FailureCode_anyOf value); - FailureCode_anyOf::eFailureCode_anyOf getEnumValue() const; - void setEnumValue(FailureCode_anyOf::eFailureCode_anyOf value); - friend void to_json(nlohmann::json& j, const FailureCode& o); - friend void from_json(const nlohmann::json& j, FailureCode& o); - friend void to_json(nlohmann::json& j, const FailureCode_anyOf& o); - friend void from_json(const nlohmann::json& j, FailureCode_anyOf& o); - - protected: - FailureCode_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* FailureCode_H_ */ diff --git a/src/api-server/model/FailureCode_anyOf.cpp b/src/api-server/model/FailureCode_anyOf.cpp deleted file mode 100755 index 20943233987e7e90ee20483737f3661752098e19..0000000000000000000000000000000000000000 --- a/src/api-server/model/FailureCode_anyOf.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/** - * 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 "FailureCode_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -FailureCode_anyOf::FailureCode_anyOf() {} - -void FailureCode_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool FailureCode_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool FailureCode_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "FailureCode_anyOf" : pathPrefix; - - if (m_value == - FailureCode_anyOf::eFailureCode_anyOf::INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool FailureCode_anyOf::operator==(const FailureCode_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool FailureCode_anyOf::operator!=(const FailureCode_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const FailureCode_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case FailureCode_anyOf::eFailureCode_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::UNK_RULE_ID: - j = "UNK_RULE_ID"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::RA_GR_ERR: - j = "RA_GR_ERR"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::SER_ID_ERR: - j = "SER_ID_ERR"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::NF_MAL: - j = "NF_MAL"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::RES_LIM: - j = "RES_LIM"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::MAX_NR_QOS_FLOW: - j = "MAX_NR_QoS_FLOW"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::MISS_FLOW_INFO: - j = "MISS_FLOW_INFO"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::RES_ALLO_FAIL: - j = "RES_ALLO_FAIL"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::UNSUCC_QOS_VAL: - j = "UNSUCC_QOS_VAL"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::INCOR_FLOW_INFO: - j = "INCOR_FLOW_INFO"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::PS_TO_CS_HAN: - j = "PS_TO_CS_HAN"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::APP_ID_ERR: - j = "APP_ID_ERR"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::NO_QOS_FLOW_BOUND: - j = "NO_QOS_FLOW_BOUND"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::FILTER_RES: - j = "FILTER_RES"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::MISS_REDI_SER_ADDR: - j = "MISS_REDI_SER_ADDR"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::CM_END_USER_SER_DENIED: - j = "CM_END_USER_SER_DENIED"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::CM_CREDIT_CON_NOT_APP: - j = "CM_CREDIT_CON_NOT_APP"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::CM_AUTH_REJ: - j = "CM_AUTH_REJ"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::CM_USER_UNK: - j = "CM_USER_UNK"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::CM_RAT_FAILED: - j = "CM_RAT_FAILED"; - break; - case FailureCode_anyOf::eFailureCode_anyOf::UE_STA_SUSP: - j = "UE_STA_SUSP"; - break; - } -} - -void from_json(const nlohmann::json& j, FailureCode_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "UNK_RULE_ID") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::UNK_RULE_ID); - } else if (s == "RA_GR_ERR") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::RA_GR_ERR); - } else if (s == "SER_ID_ERR") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::SER_ID_ERR); - } else if (s == "NF_MAL") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::NF_MAL); - } else if (s == "RES_LIM") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::RES_LIM); - } else if (s == "MAX_NR_QoS_FLOW") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::MAX_NR_QOS_FLOW); - } else if (s == "MISS_FLOW_INFO") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::MISS_FLOW_INFO); - } else if (s == "RES_ALLO_FAIL") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::RES_ALLO_FAIL); - } else if (s == "UNSUCC_QOS_VAL") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::UNSUCC_QOS_VAL); - } else if (s == "INCOR_FLOW_INFO") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::INCOR_FLOW_INFO); - } else if (s == "PS_TO_CS_HAN") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::PS_TO_CS_HAN); - } else if (s == "APP_ID_ERR") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::APP_ID_ERR); - } else if (s == "NO_QOS_FLOW_BOUND") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::NO_QOS_FLOW_BOUND); - } else if (s == "FILTER_RES") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::FILTER_RES); - } else if (s == "MISS_REDI_SER_ADDR") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::MISS_REDI_SER_ADDR); - } else if (s == "CM_END_USER_SER_DENIED") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::CM_END_USER_SER_DENIED); - } else if (s == "CM_CREDIT_CON_NOT_APP") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::CM_CREDIT_CON_NOT_APP); - } else if (s == "CM_AUTH_REJ") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::CM_AUTH_REJ); - } else if (s == "CM_USER_UNK") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::CM_USER_UNK); - } else if (s == "CM_RAT_FAILED") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::CM_RAT_FAILED); - } else if (s == "UE_STA_SUSP") { - o.setValue(FailureCode_anyOf::eFailureCode_anyOf::UE_STA_SUSP); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " FailureCode_anyOf::eFailureCode_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -FailureCode_anyOf::eFailureCode_anyOf FailureCode_anyOf::getValue() const { - return m_value; -} -void FailureCode_anyOf::setValue(FailureCode_anyOf::eFailureCode_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/FailureCode_anyOf.h b/src/api-server/model/FailureCode_anyOf.h deleted file mode 100755 index f52ec6840d9d41d7a83c3043ddf469354635665d..0000000000000000000000000000000000000000 --- a/src/api-server/model/FailureCode_anyOf.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * 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. - */ -/* - * FailureCode_anyOf.h - * - * - */ - -#ifndef FailureCode_anyOf_H_ -#define FailureCode_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class FailureCode_anyOf { - public: - FailureCode_anyOf(); - virtual ~FailureCode_anyOf() = default; - - enum class eFailureCode_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - UNK_RULE_ID, - RA_GR_ERR, - SER_ID_ERR, - NF_MAL, - RES_LIM, - MAX_NR_QOS_FLOW, - MISS_FLOW_INFO, - RES_ALLO_FAIL, - UNSUCC_QOS_VAL, - INCOR_FLOW_INFO, - PS_TO_CS_HAN, - APP_ID_ERR, - NO_QOS_FLOW_BOUND, - FILTER_RES, - MISS_REDI_SER_ADDR, - CM_END_USER_SER_DENIED, - CM_CREDIT_CON_NOT_APP, - CM_AUTH_REJ, - CM_USER_UNK, - CM_RAT_FAILED, - UE_STA_SUSP - }; - - /// <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 FailureCode_anyOf& rhs) const; - bool operator!=(const FailureCode_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// FailureCode_anyOf members - - FailureCode_anyOf::eFailureCode_anyOf getValue() const; - void setValue(FailureCode_anyOf::eFailureCode_anyOf value); - - friend void to_json(nlohmann::json& j, const FailureCode_anyOf& o); - friend void from_json(const nlohmann::json& j, FailureCode_anyOf& o); - - protected: - FailureCode_anyOf::eFailureCode_anyOf m_value = - FailureCode_anyOf::eFailureCode_anyOf::INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* FailureCode_anyOf_H_ */ diff --git a/src/api-server/model/FinalUnitAction.cpp b/src/api-server/model/FinalUnitAction.cpp deleted file mode 100755 index fe905a4666ec7e5643443d36bf80dce6119976f5..0000000000000000000000000000000000000000 --- a/src/api-server/model/FinalUnitAction.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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 "FinalUnitAction.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -FinalUnitAction::FinalUnitAction() {} - -void FinalUnitAction::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool FinalUnitAction::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool FinalUnitAction::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "FinalUnitAction" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool FinalUnitAction::operator==(const FinalUnitAction& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool FinalUnitAction::operator!=(const FinalUnitAction& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const FinalUnitAction& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, FinalUnitAction& o) { - from_json(j, o.m_value); -} - -FinalUnitAction_anyOf FinalUnitAction::getValue() const { - return m_value; -} - -void FinalUnitAction::setValue(FinalUnitAction_anyOf value) { - m_value = value; -} - -FinalUnitAction_anyOf::eFinalUnitAction_anyOf FinalUnitAction::getEnumValue() - const { - return m_value.getValue(); -} - -void FinalUnitAction::setEnumValue( - FinalUnitAction_anyOf::eFinalUnitAction_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/FinalUnitAction.h b/src/api-server/model/FinalUnitAction.h deleted file mode 100755 index 3acaa6d1be969c5ac0d2c1afd19f246d99e24374..0000000000000000000000000000000000000000 --- a/src/api-server/model/FinalUnitAction.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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. - */ -/* - * FinalUnitAction.h - * - * - */ - -#ifndef FinalUnitAction_H_ -#define FinalUnitAction_H_ - -#include "FinalUnitAction_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class FinalUnitAction { - public: - FinalUnitAction(); - virtual ~FinalUnitAction() = 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 FinalUnitAction& rhs) const; - bool operator!=(const FinalUnitAction& rhs) const; - - ///////////////////////////////////////////// - /// FinalUnitAction members - - FinalUnitAction_anyOf getValue() const; - void setValue(FinalUnitAction_anyOf value); - FinalUnitAction_anyOf::eFinalUnitAction_anyOf getEnumValue() const; - void setEnumValue(FinalUnitAction_anyOf::eFinalUnitAction_anyOf value); - friend void to_json(nlohmann::json& j, const FinalUnitAction& o); - friend void from_json(const nlohmann::json& j, FinalUnitAction& o); - friend void to_json(nlohmann::json& j, const FinalUnitAction_anyOf& o); - friend void from_json(const nlohmann::json& j, FinalUnitAction_anyOf& o); - - protected: - FinalUnitAction_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* FinalUnitAction_H_ */ diff --git a/src/api-server/model/FinalUnitAction_anyOf.cpp b/src/api-server/model/FinalUnitAction_anyOf.cpp deleted file mode 100755 index e876dd506d1cece3e20ca215615b08275b309925..0000000000000000000000000000000000000000 --- a/src/api-server/model/FinalUnitAction_anyOf.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/** - * 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 "FinalUnitAction_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -FinalUnitAction_anyOf::FinalUnitAction_anyOf() {} - -void FinalUnitAction_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool FinalUnitAction_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool FinalUnitAction_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "FinalUnitAction_anyOf" : pathPrefix; - - if (m_value == FinalUnitAction_anyOf::eFinalUnitAction_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool FinalUnitAction_anyOf::operator==(const FinalUnitAction_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool FinalUnitAction_anyOf::operator!=(const FinalUnitAction_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const FinalUnitAction_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case FinalUnitAction_anyOf::eFinalUnitAction_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case FinalUnitAction_anyOf::eFinalUnitAction_anyOf::TERMINATE: - j = "TERMINATE"; - break; - case FinalUnitAction_anyOf::eFinalUnitAction_anyOf::REDIRECT: - j = "REDIRECT"; - break; - case FinalUnitAction_anyOf::eFinalUnitAction_anyOf::RESTRICT_ACCESS: - j = "RESTRICT_ACCESS"; - break; - } -} - -void from_json(const nlohmann::json& j, FinalUnitAction_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "TERMINATE") { - o.setValue(FinalUnitAction_anyOf::eFinalUnitAction_anyOf::TERMINATE); - } else if (s == "REDIRECT") { - o.setValue(FinalUnitAction_anyOf::eFinalUnitAction_anyOf::REDIRECT); - } else if (s == "RESTRICT_ACCESS") { - o.setValue(FinalUnitAction_anyOf::eFinalUnitAction_anyOf::RESTRICT_ACCESS); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " FinalUnitAction_anyOf::eFinalUnitAction_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -FinalUnitAction_anyOf::eFinalUnitAction_anyOf FinalUnitAction_anyOf::getValue() - const { - return m_value; -} -void FinalUnitAction_anyOf::setValue( - FinalUnitAction_anyOf::eFinalUnitAction_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/FinalUnitAction_anyOf.h b/src/api-server/model/FinalUnitAction_anyOf.h deleted file mode 100755 index a35d751d78d774e85cd29a222dcab84cb8134b32..0000000000000000000000000000000000000000 --- a/src/api-server/model/FinalUnitAction_anyOf.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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. - */ -/* - * FinalUnitAction_anyOf.h - * - * - */ - -#ifndef FinalUnitAction_anyOf_H_ -#define FinalUnitAction_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class FinalUnitAction_anyOf { - public: - FinalUnitAction_anyOf(); - virtual ~FinalUnitAction_anyOf() = default; - - enum class eFinalUnitAction_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - TERMINATE, - REDIRECT, - RESTRICT_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 FinalUnitAction_anyOf& rhs) const; - bool operator!=(const FinalUnitAction_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// FinalUnitAction_anyOf members - - FinalUnitAction_anyOf::eFinalUnitAction_anyOf getValue() const; - void setValue(FinalUnitAction_anyOf::eFinalUnitAction_anyOf value); - - friend void to_json(nlohmann::json& j, const FinalUnitAction_anyOf& o); - friend void from_json(const nlohmann::json& j, FinalUnitAction_anyOf& o); - - protected: - FinalUnitAction_anyOf::eFinalUnitAction_anyOf m_value = - FinalUnitAction_anyOf::eFinalUnitAction_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* FinalUnitAction_anyOf_H_ */ diff --git a/src/api-server/model/FlowDirection.cpp b/src/api-server/model/FlowDirection.cpp deleted file mode 100755 index 7f912b142c82c2eee315a5a3879330f893ddb725..0000000000000000000000000000000000000000 --- a/src/api-server/model/FlowDirection.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai diff --git a/src/api-server/model/FlowDirection.h b/src/api-server/model/FlowDirection.h deleted file mode 100755 index df4f9cb76535c92efe240ae7df6a743ccc13a2f1..0000000000000000000000000000000000000000 --- a/src/api-server/model/FlowDirection.h +++ /dev/null @@ -1,95 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai -#endif /* FlowDirection_H_ */ diff --git a/src/api-server/model/FlowDirectionRm.cpp b/src/api-server/model/FlowDirectionRm.cpp deleted file mode 100644 index 22c8bcfab8b583f76ed8d0252f158e9cf9356321..0000000000000000000000000000000000000000 --- a/src/api-server/model/FlowDirectionRm.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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 "logger.hpp" - -#include <sstream> - -namespace oai { -namespace pcf { -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(); - Logger::pcf_app().error( - __PRETTY_FUNCTION__ + std::string{" not implemented"}); -} - -void from_json(const nlohmann::json& /*j*/, FlowDirectionRm& /*o*/) { - Logger::pcf_app().error( - __PRETTY_FUNCTION__ + std::string{" not implemented"}); -} - -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 pcf -} // namespace oai diff --git a/src/api-server/model/FlowDirectionRm.h b/src/api-server/model/FlowDirectionRm.h deleted file mode 100755 index 13b326e36a169aa9c9222fd64affed4df1c2bb29..0000000000000000000000000000000000000000 --- a/src/api-server/model/FlowDirectionRm.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai -#endif /* FlowDirectionRm_H_ */ diff --git a/src/api-server/model/FlowDirection_anyOf.cpp b/src/api-server/model/FlowDirection_anyOf.cpp deleted file mode 100755 index 443ff6a493c61219e74bd640521a22235b2abd6c..0000000000000000000000000000000000000000 --- a/src/api-server/model/FlowDirection_anyOf.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai diff --git a/src/api-server/model/FlowDirection_anyOf.h b/src/api-server/model/FlowDirection_anyOf.h deleted file mode 100755 index 1ee7b3906cfc4728953512dbf7f04cf9d7afa174..0000000000000000000000000000000000000000 --- a/src/api-server/model/FlowDirection_anyOf.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai -#endif /* FlowDirection_anyOf_H_ */ diff --git a/src/api-server/model/FlowInformation.cpp b/src/api-server/model/FlowInformation.cpp deleted file mode 100644 index aed0cfb03b3d362cab1784d7ab67150d7485ff94..0000000000000000000000000000000000000000 --- a/src/api-server/model/FlowInformation.cpp +++ /dev/null @@ -1,259 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai diff --git a/src/api-server/model/FlowInformation.h b/src/api-server/model/FlowInformation.h deleted file mode 100755 index 4cf3ca718a2d6e542d5aad10a41121f3eae313a2..0000000000000000000000000000000000000000 --- a/src/api-server/model/FlowInformation.h +++ /dev/null @@ -1,147 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai -#endif /* FlowInformation_H_ */ diff --git a/src/api-server/model/FlowStatus.cpp b/src/api-server/model/FlowStatus.cpp deleted file mode 100755 index 1d03a298de153a308631c8823ae34a82fb340eba..0000000000000000000000000000000000000000 --- a/src/api-server/model/FlowStatus.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai diff --git a/src/api-server/model/FlowStatus.h b/src/api-server/model/FlowStatus.h deleted file mode 100755 index bcfbdd4fe3e4fb8796a9c5b6402bdbb34c734bf2..0000000000000000000000000000000000000000 --- a/src/api-server/model/FlowStatus.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai -#endif /* FlowStatus_H_ */ diff --git a/src/api-server/model/FlowStatus_anyOf.cpp b/src/api-server/model/FlowStatus_anyOf.cpp deleted file mode 100755 index 4503725f07afe71e15d7844fdb4b8c2fd078bf4f..0000000000000000000000000000000000000000 --- a/src/api-server/model/FlowStatus_anyOf.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai diff --git a/src/api-server/model/FlowStatus_anyOf.h b/src/api-server/model/FlowStatus_anyOf.h deleted file mode 100755 index 373f7af1a66397914b2d5393555be9900d5ceabe..0000000000000000000000000000000000000000 --- a/src/api-server/model/FlowStatus_anyOf.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai -#endif /* FlowStatus_anyOf_H_ */ diff --git a/src/api-server/model/IpMulticastAddressInfo.cpp b/src/api-server/model/IpMulticastAddressInfo.cpp deleted file mode 100644 index e1db266a7d71ba11b2fa15f1a9063ad3c5c80bb8..0000000000000000000000000000000000000000 --- a/src/api-server/model/IpMulticastAddressInfo.cpp +++ /dev/null @@ -1,176 +0,0 @@ -/** - * 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 "IpMulticastAddressInfo.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -IpMulticastAddressInfo::IpMulticastAddressInfo() { - m_SrcIpv4Addr = ""; - m_SrcIpv4AddrIsSet = false; - m_Ipv4MulAddr = ""; - m_Ipv4MulAddrIsSet = false; - m_SrcIpv6AddrIsSet = false; - m_Ipv6MulAddrIsSet = false; -} - -void IpMulticastAddressInfo::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool IpMulticastAddressInfo::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool IpMulticastAddressInfo::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "IpMulticastAddressInfo" : pathPrefix; - - if (srcIpv4AddrIsSet()) { - const std::string& value = m_SrcIpv4Addr; - const std::string currentValuePath = _pathPrefix + ".srcIpv4Addr"; - } - - if (ipv4MulAddrIsSet()) { - const std::string& value = m_Ipv4MulAddr; - const std::string currentValuePath = _pathPrefix + ".ipv4MulAddr"; - } - */ - return success; -} - -bool IpMulticastAddressInfo::operator==( - const IpMulticastAddressInfo& rhs) const { - return - - ((!srcIpv4AddrIsSet() && !rhs.srcIpv4AddrIsSet()) || - (srcIpv4AddrIsSet() && rhs.srcIpv4AddrIsSet() && - getSrcIpv4Addr() == rhs.getSrcIpv4Addr())) && - - ((!ipv4MulAddrIsSet() && !rhs.ipv4MulAddrIsSet()) || - (ipv4MulAddrIsSet() && rhs.ipv4MulAddrIsSet() && - getIpv4MulAddr() == rhs.getIpv4MulAddr())) && - - ((!srcIpv6AddrIsSet() && !rhs.srcIpv6AddrIsSet()) || - (srcIpv6AddrIsSet() && rhs.srcIpv6AddrIsSet() && - getSrcIpv6Addr() == rhs.getSrcIpv6Addr())) && - - ((!ipv6MulAddrIsSet() && !rhs.ipv6MulAddrIsSet()) || - (ipv6MulAddrIsSet() && rhs.ipv6MulAddrIsSet() && - getIpv6MulAddr() == rhs.getIpv6MulAddr())) - - ; -} - -bool IpMulticastAddressInfo::operator!=( - const IpMulticastAddressInfo& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const IpMulticastAddressInfo& o) { - j = nlohmann::json(); - if (o.srcIpv4AddrIsSet()) j["srcIpv4Addr"] = o.m_SrcIpv4Addr; - if (o.ipv4MulAddrIsSet()) j["ipv4MulAddr"] = o.m_Ipv4MulAddr; - if (o.srcIpv6AddrIsSet()) j["srcIpv6Addr"] = o.m_SrcIpv6Addr; - if (o.ipv6MulAddrIsSet()) j["ipv6MulAddr"] = o.m_Ipv6MulAddr; -} - -void from_json(const nlohmann::json& j, IpMulticastAddressInfo& o) { - if (j.find("srcIpv4Addr") != j.end()) { - j.at("srcIpv4Addr").get_to(o.m_SrcIpv4Addr); - o.m_SrcIpv4AddrIsSet = true; - } - if (j.find("ipv4MulAddr") != j.end()) { - j.at("ipv4MulAddr").get_to(o.m_Ipv4MulAddr); - o.m_Ipv4MulAddrIsSet = true; - } - if (j.find("srcIpv6Addr") != j.end()) { - j.at("srcIpv6Addr").get_to(o.m_SrcIpv6Addr); - o.m_SrcIpv6AddrIsSet = true; - } - if (j.find("ipv6MulAddr") != j.end()) { - j.at("ipv6MulAddr").get_to(o.m_Ipv6MulAddr); - o.m_Ipv6MulAddrIsSet = true; - } -} - -std::string IpMulticastAddressInfo::getSrcIpv4Addr() const { - return m_SrcIpv4Addr; -} -void IpMulticastAddressInfo::setSrcIpv4Addr(std::string const& value) { - m_SrcIpv4Addr = value; - m_SrcIpv4AddrIsSet = true; -} -bool IpMulticastAddressInfo::srcIpv4AddrIsSet() const { - return m_SrcIpv4AddrIsSet; -} -void IpMulticastAddressInfo::unsetSrcIpv4Addr() { - m_SrcIpv4AddrIsSet = false; -} -std::string IpMulticastAddressInfo::getIpv4MulAddr() const { - return m_Ipv4MulAddr; -} -void IpMulticastAddressInfo::setIpv4MulAddr(std::string const& value) { - m_Ipv4MulAddr = value; - m_Ipv4MulAddrIsSet = true; -} -bool IpMulticastAddressInfo::ipv4MulAddrIsSet() const { - return m_Ipv4MulAddrIsSet; -} -void IpMulticastAddressInfo::unsetIpv4MulAddr() { - m_Ipv4MulAddrIsSet = false; -} -Ipv6Addr IpMulticastAddressInfo::getSrcIpv6Addr() const { - return m_SrcIpv6Addr; -} -void IpMulticastAddressInfo::setSrcIpv6Addr(Ipv6Addr const& value) { - m_SrcIpv6Addr = value; - m_SrcIpv6AddrIsSet = true; -} -bool IpMulticastAddressInfo::srcIpv6AddrIsSet() const { - return m_SrcIpv6AddrIsSet; -} -void IpMulticastAddressInfo::unsetSrcIpv6Addr() { - m_SrcIpv6AddrIsSet = false; -} -Ipv6Addr IpMulticastAddressInfo::getIpv6MulAddr() const { - return m_Ipv6MulAddr; -} -void IpMulticastAddressInfo::setIpv6MulAddr(Ipv6Addr const& value) { - m_Ipv6MulAddr = value; - m_Ipv6MulAddrIsSet = true; -} -bool IpMulticastAddressInfo::ipv6MulAddrIsSet() const { - return m_Ipv6MulAddrIsSet; -} -void IpMulticastAddressInfo::unsetIpv6MulAddr() { - m_Ipv6MulAddrIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/IpMulticastAddressInfo.h b/src/api-server/model/IpMulticastAddressInfo.h deleted file mode 100755 index f59016379d837afcc04c43cbe252e0d3af477f7b..0000000000000000000000000000000000000000 --- a/src/api-server/model/IpMulticastAddressInfo.h +++ /dev/null @@ -1,108 +0,0 @@ -/** - * 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. - */ -/* - * IpMulticastAddressInfo.h - * - * - */ - -#ifndef IpMulticastAddressInfo_H_ -#define IpMulticastAddressInfo_H_ - -#include <string> -#include "Ipv6Addr.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class IpMulticastAddressInfo { - public: - IpMulticastAddressInfo(); - virtual ~IpMulticastAddressInfo() = 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 IpMulticastAddressInfo& rhs) const; - bool operator!=(const IpMulticastAddressInfo& rhs) const; - - ///////////////////////////////////////////// - /// IpMulticastAddressInfo members - - /// <summary> - /// - /// </summary> - std::string getSrcIpv4Addr() const; - void setSrcIpv4Addr(std::string const& value); - bool srcIpv4AddrIsSet() const; - void unsetSrcIpv4Addr(); - /// <summary> - /// - /// </summary> - std::string getIpv4MulAddr() const; - void setIpv4MulAddr(std::string const& value); - bool ipv4MulAddrIsSet() const; - void unsetIpv4MulAddr(); - /// <summary> - /// - /// </summary> - oai::model::common::Ipv6Addr getSrcIpv6Addr() const; - void setSrcIpv6Addr(oai::model::common::Ipv6Addr const& value); - bool srcIpv6AddrIsSet() const; - void unsetSrcIpv6Addr(); - /// <summary> - /// - /// </summary> - oai::model::common::Ipv6Addr getIpv6MulAddr() const; - void setIpv6MulAddr(oai::model::common::Ipv6Addr const& value); - bool ipv6MulAddrIsSet() const; - void unsetIpv6MulAddr(); - - friend void to_json(nlohmann::json& j, const IpMulticastAddressInfo& o); - friend void from_json(const nlohmann::json& j, IpMulticastAddressInfo& o); - - protected: - std::string m_SrcIpv4Addr; - bool m_SrcIpv4AddrIsSet; - std::string m_Ipv4MulAddr; - bool m_Ipv4MulAddrIsSet; - oai::model::common::Ipv6Addr m_SrcIpv6Addr; - bool m_SrcIpv6AddrIsSet; - oai::model::common::Ipv6Addr m_Ipv6MulAddr; - bool m_Ipv6MulAddrIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* IpMulticastAddressInfo_H_ */ diff --git a/src/api-server/model/MaPduIndication.cpp b/src/api-server/model/MaPduIndication.cpp deleted file mode 100755 index 310704021e268ee4e15af111af9f719903d19b17..0000000000000000000000000000000000000000 --- a/src/api-server/model/MaPduIndication.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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 "MaPduIndication.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -MaPduIndication::MaPduIndication() {} - -void MaPduIndication::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool MaPduIndication::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool MaPduIndication::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "MaPduIndication" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool MaPduIndication::operator==(const MaPduIndication& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool MaPduIndication::operator!=(const MaPduIndication& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const MaPduIndication& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, MaPduIndication& o) { - from_json(j, o.m_value); -} - -MaPduIndication_anyOf MaPduIndication::getValue() const { - return m_value; -} - -void MaPduIndication::setValue(MaPduIndication_anyOf value) { - m_value = value; -} - -MaPduIndication_anyOf::eMaPduIndication_anyOf MaPduIndication::getEnumValue() - const { - return m_value.getValue(); -} - -void MaPduIndication::setEnumValue( - MaPduIndication_anyOf::eMaPduIndication_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/MaPduIndication.h b/src/api-server/model/MaPduIndication.h deleted file mode 100755 index b127743bd06af0e01cd2c0e60e6eda93751d0ad4..0000000000000000000000000000000000000000 --- a/src/api-server/model/MaPduIndication.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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. - */ -/* - * MaPduIndication.h - * - * - */ - -#ifndef MaPduIndication_H_ -#define MaPduIndication_H_ - -#include "MaPduIndication_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class MaPduIndication { - public: - MaPduIndication(); - virtual ~MaPduIndication() = 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 MaPduIndication& rhs) const; - bool operator!=(const MaPduIndication& rhs) const; - - ///////////////////////////////////////////// - /// MaPduIndication members - - MaPduIndication_anyOf getValue() const; - void setValue(MaPduIndication_anyOf value); - MaPduIndication_anyOf::eMaPduIndication_anyOf getEnumValue() const; - void setEnumValue(MaPduIndication_anyOf::eMaPduIndication_anyOf value); - friend void to_json(nlohmann::json& j, const MaPduIndication& o); - friend void from_json(const nlohmann::json& j, MaPduIndication& o); - friend void to_json(nlohmann::json& j, const MaPduIndication_anyOf& o); - friend void from_json(const nlohmann::json& j, MaPduIndication_anyOf& o); - - protected: - MaPduIndication_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* MaPduIndication_H_ */ diff --git a/src/api-server/model/MaPduIndication_anyOf.cpp b/src/api-server/model/MaPduIndication_anyOf.cpp deleted file mode 100755 index 942259e2e2a9d3ddb363beb3d6eeeac216f5b301..0000000000000000000000000000000000000000 --- a/src/api-server/model/MaPduIndication_anyOf.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/** - * 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 "MaPduIndication_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -MaPduIndication_anyOf::MaPduIndication_anyOf() {} - -void MaPduIndication_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool MaPduIndication_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool MaPduIndication_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "MaPduIndication_anyOf" : pathPrefix; - - if (m_value == MaPduIndication_anyOf::eMaPduIndication_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool MaPduIndication_anyOf::operator==(const MaPduIndication_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool MaPduIndication_anyOf::operator!=(const MaPduIndication_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const MaPduIndication_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case MaPduIndication_anyOf::eMaPduIndication_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case MaPduIndication_anyOf::eMaPduIndication_anyOf::REQUEST: - j = "MA_PDU_REQUEST"; - break; - case MaPduIndication_anyOf::eMaPduIndication_anyOf:: - _NETWORK_UPGRADE_ALLOWED: - j = "MA_PDU_ NETWORK_UPGRADE ALLOWED"; - break; - } -} - -void from_json(const nlohmann::json& j, MaPduIndication_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "MA_PDU_REQUEST") { - o.setValue(MaPduIndication_anyOf::eMaPduIndication_anyOf::REQUEST); - } else if (s == "MA_PDU_ NETWORK_UPGRADE ALLOWED") { - o.setValue(MaPduIndication_anyOf::eMaPduIndication_anyOf:: - _NETWORK_UPGRADE_ALLOWED); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " MaPduIndication_anyOf::eMaPduIndication_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -MaPduIndication_anyOf::eMaPduIndication_anyOf MaPduIndication_anyOf::getValue() - const { - return m_value; -} -void MaPduIndication_anyOf::setValue( - MaPduIndication_anyOf::eMaPduIndication_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/MaPduIndication_anyOf.h b/src/api-server/model/MaPduIndication_anyOf.h deleted file mode 100755 index 3158979f6b8f2bb056d965a85f447cb19a1934d5..0000000000000000000000000000000000000000 --- a/src/api-server/model/MaPduIndication_anyOf.h +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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. - */ -/* - * MaPduIndication_anyOf.h - * - * - */ - -#ifndef MaPduIndication_anyOf_H_ -#define MaPduIndication_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class MaPduIndication_anyOf { - public: - MaPduIndication_anyOf(); - virtual ~MaPduIndication_anyOf() = default; - - enum class eMaPduIndication_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - REQUEST, - _NETWORK_UPGRADE_ALLOWED - }; - - /// <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 MaPduIndication_anyOf& rhs) const; - bool operator!=(const MaPduIndication_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// MaPduIndication_anyOf members - - MaPduIndication_anyOf::eMaPduIndication_anyOf getValue() const; - void setValue(MaPduIndication_anyOf::eMaPduIndication_anyOf value); - - friend void to_json(nlohmann::json& j, const MaPduIndication_anyOf& o); - friend void from_json(const nlohmann::json& j, MaPduIndication_anyOf& o); - - protected: - MaPduIndication_anyOf::eMaPduIndication_anyOf m_value = - MaPduIndication_anyOf::eMaPduIndication_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* MaPduIndication_anyOf_H_ */ diff --git a/src/api-server/model/MeteringMethod.cpp b/src/api-server/model/MeteringMethod.cpp deleted file mode 100644 index 483077cdbdbf386536c8a33fa9e37c4305d14ea0..0000000000000000000000000000000000000000 --- a/src/api-server/model/MeteringMethod.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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 "MeteringMethod.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -MeteringMethod::MeteringMethod() {} - -void MeteringMethod::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool MeteringMethod::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool MeteringMethod::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "MeteringMethod" : pathPrefix; - */ - return success; -} - -bool MeteringMethod::operator==(const MeteringMethod& rhs) const { - return getValue() == rhs.getValue(); -} - -bool MeteringMethod::operator!=(const MeteringMethod& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const MeteringMethod& o) { - j = nlohmann::json(); - to_json(j, o); -} - -void from_json(const nlohmann::json& j, MeteringMethod& o) { - from_json(j, o.m_value); -} - -MeteringMethod_anyOf MeteringMethod::getValue() const { - return m_value; -} - -void MeteringMethod::setValue(MeteringMethod_anyOf value) { - m_value = value; -} - -MeteringMethod_anyOf::eMeteringMethod_anyOf MeteringMethod::getEnumValue() - const { - return m_value.getValue(); -} - -void MeteringMethod::setEnumValue( - MeteringMethod_anyOf::eMeteringMethod_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/MeteringMethod.h b/src/api-server/model/MeteringMethod.h deleted file mode 100755 index 329ca6da32383135cf9e47012c44518a879de468..0000000000000000000000000000000000000000 --- a/src/api-server/model/MeteringMethod.h +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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. - */ -/* - * MeteringMethod.h - * - * Possible values are - DURATION: Indicates that the duration of the service - * data flow traffic shall be metered. - VOLUME: Indicates that volume of the - * service data flow traffic shall be metered. - DURATION_VOLUME: Indicates that - * the duration and the volume of the service data flow traffic shall be - * metered. - EVENT: Indicates that events of the service data flow traffic - * shall be metered. - */ - -#ifndef MeteringMethod_H_ -#define MeteringMethod_H_ - -#include "NullValue.h" -#include "MeteringMethod_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// Possible values are - DURATION: Indicates that the duration of the service -/// data flow traffic shall be metered. - VOLUME: Indicates that volume of the -/// service data flow traffic shall be metered. - DURATION_VOLUME: Indicates -/// that the duration and the volume of the service data flow traffic shall be -/// metered. - EVENT: Indicates that events of the service data flow traffic -/// shall be metered. -/// </summary> -class MeteringMethod { - public: - MeteringMethod(); - virtual ~MeteringMethod() = 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 MeteringMethod& rhs) const; - bool operator!=(const MeteringMethod& rhs) const; - - ///////////////////////////////////////////// - /// MeteringMethod members - - MeteringMethod_anyOf getValue() const; - void setValue(MeteringMethod_anyOf value); - MeteringMethod_anyOf::eMeteringMethod_anyOf getEnumValue() const; - void setEnumValue(MeteringMethod_anyOf::eMeteringMethod_anyOf value); - - friend void to_json(nlohmann::json& j, const MeteringMethod& o); - friend void from_json(const nlohmann::json& j, MeteringMethod& o); - - protected: - MeteringMethod_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* MeteringMethod_H_ */ diff --git a/src/api-server/model/MeteringMethod_anyOf.cpp b/src/api-server/model/MeteringMethod_anyOf.cpp deleted file mode 100755 index 985d6e8ba1ac2d1b1dd2f52e8bbe6d914b3eeba5..0000000000000000000000000000000000000000 --- a/src/api-server/model/MeteringMethod_anyOf.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * 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 "MeteringMethod_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -MeteringMethod_anyOf::MeteringMethod_anyOf() {} - -void MeteringMethod_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool MeteringMethod_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool MeteringMethod_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "MeteringMethod_anyOf" : pathPrefix; - - if (m_value == MeteringMethod_anyOf::eMeteringMethod_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool MeteringMethod_anyOf::operator==(const MeteringMethod_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool MeteringMethod_anyOf::operator!=(const MeteringMethod_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const MeteringMethod_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case MeteringMethod_anyOf::eMeteringMethod_anyOf::NULL_VALUE: - j = nullptr; - break; - case MeteringMethod_anyOf::eMeteringMethod_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case MeteringMethod_anyOf::eMeteringMethod_anyOf::DURATION: - j = "DURATION"; - break; - case MeteringMethod_anyOf::eMeteringMethod_anyOf::VOLUME: - j = "VOLUME"; - break; - case MeteringMethod_anyOf::eMeteringMethod_anyOf::DURATION_VOLUME: - j = "DURATION_VOLUME"; - break; - case MeteringMethod_anyOf::eMeteringMethod_anyOf::EVENT: - j = "EVENT"; - break; - } -} - -void from_json(const nlohmann::json& j, MeteringMethod_anyOf& o) { - if (j.is_null()) { - o.setValue(MeteringMethod_anyOf::eMeteringMethod_anyOf::NULL_VALUE); - return; - } - - auto s = j.get<std::string>(); - if (s == "DURATION") { - o.setValue(MeteringMethod_anyOf::eMeteringMethod_anyOf::DURATION); - } else if (s == "VOLUME") { - o.setValue(MeteringMethod_anyOf::eMeteringMethod_anyOf::VOLUME); - } else if (s == "DURATION_VOLUME") { - o.setValue(MeteringMethod_anyOf::eMeteringMethod_anyOf::DURATION_VOLUME); - } else if (s == "EVENT") { - o.setValue(MeteringMethod_anyOf::eMeteringMethod_anyOf::EVENT); - } else if (s == "null") { - o.setValue(MeteringMethod_anyOf::eMeteringMethod_anyOf::NULL_VALUE); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " MeteringMethod_anyOf::eMeteringMethod_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -MeteringMethod_anyOf::eMeteringMethod_anyOf MeteringMethod_anyOf::getValue() - const { - return m_value; -} -void MeteringMethod_anyOf::setValue( - MeteringMethod_anyOf::eMeteringMethod_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/MeteringMethod_anyOf.h b/src/api-server/model/MeteringMethod_anyOf.h deleted file mode 100755 index 8351ab5e43de16a003da0bf481a5283e20cc884e..0000000000000000000000000000000000000000 --- a/src/api-server/model/MeteringMethod_anyOf.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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. - */ -/* - * MeteringMethod_anyOf.h - * - * - */ - -#ifndef MeteringMethod_anyOf_H_ -#define MeteringMethod_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class MeteringMethod_anyOf { - public: - MeteringMethod_anyOf(); - virtual ~MeteringMethod_anyOf() = default; - - enum class eMeteringMethod_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - NULL_VALUE, - DURATION, - VOLUME, - DURATION_VOLUME, - EVENT - }; - - /// <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 MeteringMethod_anyOf& rhs) const; - bool operator!=(const MeteringMethod_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// MeteringMethod_anyOf members - - MeteringMethod_anyOf::eMeteringMethod_anyOf getValue() const; - void setValue(MeteringMethod_anyOf::eMeteringMethod_anyOf value); - - friend void to_json(nlohmann::json& j, const MeteringMethod_anyOf& o); - friend void from_json(const nlohmann::json& j, MeteringMethod_anyOf& o); - - protected: - MeteringMethod_anyOf::eMeteringMethod_anyOf m_value = MeteringMethod_anyOf:: - eMeteringMethod_anyOf::INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* MeteringMethod_anyOf_H_ */ diff --git a/src/api-server/model/MulticastAccessControl.cpp b/src/api-server/model/MulticastAccessControl.cpp deleted file mode 100755 index 9ad536264bbaaa7a05651d7206973cfcd5c45929..0000000000000000000000000000000000000000 --- a/src/api-server/model/MulticastAccessControl.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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 "MulticastAccessControl.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -MulticastAccessControl::MulticastAccessControl() {} - -void MulticastAccessControl::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool MulticastAccessControl::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool MulticastAccessControl::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "MulticastAccessControl" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool MulticastAccessControl::operator==( - const MulticastAccessControl& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool MulticastAccessControl::operator!=( - const MulticastAccessControl& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const MulticastAccessControl& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, MulticastAccessControl& o) { - from_json(j, o.m_value); -} - -MulticastAccessControl_anyOf MulticastAccessControl::getValue() const { - return m_value; -} - -void MulticastAccessControl::setValue(MulticastAccessControl_anyOf value) { - m_value = value; -} - -MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf -MulticastAccessControl::getEnumValue() const { - return m_value.getValue(); -} - -void MulticastAccessControl::setEnumValue( - MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/MulticastAccessControl.h b/src/api-server/model/MulticastAccessControl.h deleted file mode 100755 index 88092e40ada327e12743dcfb32bd910270ed26ad..0000000000000000000000000000000000000000 --- a/src/api-server/model/MulticastAccessControl.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * 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. - */ -/* - * MulticastAccessControl.h - * - * - */ - -#ifndef MulticastAccessControl_H_ -#define MulticastAccessControl_H_ - -#include "MulticastAccessControl_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class MulticastAccessControl { - public: - MulticastAccessControl(); - virtual ~MulticastAccessControl() = 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 MulticastAccessControl& rhs) const; - bool operator!=(const MulticastAccessControl& rhs) const; - - ///////////////////////////////////////////// - /// MulticastAccessControl members - - MulticastAccessControl_anyOf getValue() const; - void setValue(MulticastAccessControl_anyOf value); - MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf getEnumValue() - const; - void setEnumValue( - MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf value); - friend void to_json(nlohmann::json& j, const MulticastAccessControl& o); - friend void from_json(const nlohmann::json& j, MulticastAccessControl& o); - friend void to_json(nlohmann::json& j, const MulticastAccessControl_anyOf& o); - friend void from_json( - const nlohmann::json& j, MulticastAccessControl_anyOf& o); - - protected: - MulticastAccessControl_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* MulticastAccessControl_H_ */ diff --git a/src/api-server/model/MulticastAccessControl_anyOf.cpp b/src/api-server/model/MulticastAccessControl_anyOf.cpp deleted file mode 100755 index 16b5cef7420af84ed03589414d8471ada4df4b39..0000000000000000000000000000000000000000 --- a/src/api-server/model/MulticastAccessControl_anyOf.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/** - * 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 "MulticastAccessControl_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -MulticastAccessControl_anyOf::MulticastAccessControl_anyOf() {} - -void MulticastAccessControl_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool MulticastAccessControl_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool MulticastAccessControl_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "MulticastAccessControl_anyOf" : pathPrefix; - - if (m_value == MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool MulticastAccessControl_anyOf::operator==( - const MulticastAccessControl_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool MulticastAccessControl_anyOf::operator!=( - const MulticastAccessControl_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const MulticastAccessControl_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf::ALLOWED: - j = "ALLOWED"; - break; - case MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf:: - NOT_ALLOWED: - j = "NOT_ALLOWED"; - break; - } -} - -void from_json(const nlohmann::json& j, MulticastAccessControl_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "ALLOWED") { - o.setValue( - MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf::ALLOWED); - } else if (s == "NOT_ALLOWED") { - o.setValue(MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf:: - NOT_ALLOWED); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf -MulticastAccessControl_anyOf::getValue() const { - return m_value; -} -void MulticastAccessControl_anyOf::setValue( - MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/MulticastAccessControl_anyOf.h b/src/api-server/model/MulticastAccessControl_anyOf.h deleted file mode 100755 index 424b3d9ea0a445c303233054dcf642b592d77c00..0000000000000000000000000000000000000000 --- a/src/api-server/model/MulticastAccessControl_anyOf.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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. - */ -/* - * MulticastAccessControl_anyOf.h - * - * - */ - -#ifndef MulticastAccessControl_anyOf_H_ -#define MulticastAccessControl_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class MulticastAccessControl_anyOf { - public: - MulticastAccessControl_anyOf(); - virtual ~MulticastAccessControl_anyOf() = default; - - enum class eMulticastAccessControl_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - ALLOWED, - NOT_ALLOWED - }; - - /// <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 MulticastAccessControl_anyOf& rhs) const; - bool operator!=(const MulticastAccessControl_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// MulticastAccessControl_anyOf members - - MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf getValue() const; - void setValue( - MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf value); - - friend void to_json(nlohmann::json& j, const MulticastAccessControl_anyOf& o); - friend void from_json( - const nlohmann::json& j, MulticastAccessControl_anyOf& o); - - protected: - MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf m_value = - MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* MulticastAccessControl_anyOf_H_ */ diff --git a/src/api-server/model/NFType.cpp b/src/api-server/model/NFType.cpp deleted file mode 100755 index ee36409ae03dba81d3b26c15f31a86b15f4e446e..0000000000000000000000000000000000000000 --- a/src/api-server/model/NFType.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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 "NFType.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -NFType::NFType() {} - -void NFType::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool NFType::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool NFType::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "NFType" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool NFType::operator==(const NFType& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool NFType::operator!=(const NFType& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const NFType& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, NFType& o) { - from_json(j, o.m_value); -} - -NFType_anyOf NFType::getValue() const { - return m_value; -} - -void NFType::setValue(NFType_anyOf value) { - m_value = value; -} - -NFType_anyOf::eNFType_anyOf NFType::getEnumValue() const { - return m_value.getValue(); -} - -void NFType::setEnumValue(NFType_anyOf::eNFType_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/NFType.h b/src/api-server/model/NFType.h deleted file mode 100755 index bfe78cbfccfe3462063ad22efdd4a49675edc272..0000000000000000000000000000000000000000 --- a/src/api-server/model/NFType.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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. - */ -/* - * NFType.h - * - * NF types known to NRF - */ - -#ifndef NFType_H_ -#define NFType_H_ - -#include "NFType_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// NF types known to NRF -/// </summary> -class NFType { - public: - NFType(); - virtual ~NFType() = 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 NFType& rhs) const; - bool operator!=(const NFType& rhs) const; - - ///////////////////////////////////////////// - /// NFType members - - NFType_anyOf getValue() const; - void setValue(NFType_anyOf value); - NFType_anyOf::eNFType_anyOf getEnumValue() const; - void setEnumValue(NFType_anyOf::eNFType_anyOf value); - friend void to_json(nlohmann::json& j, const NFType& o); - friend void from_json(const nlohmann::json& j, NFType& o); - friend void to_json(nlohmann::json& j, const NFType_anyOf& o); - friend void from_json(const nlohmann::json& j, NFType_anyOf& o); - - protected: - NFType_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* NFType_H_ */ diff --git a/src/api-server/model/NFType_anyOf.cpp b/src/api-server/model/NFType_anyOf.cpp deleted file mode 100755 index 5c193fca95fbd3407f473b4f1754a214cf8ffe0a..0000000000000000000000000000000000000000 --- a/src/api-server/model/NFType_anyOf.cpp +++ /dev/null @@ -1,276 +0,0 @@ -/** - * 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 "NFType_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -NFType_anyOf::NFType_anyOf() {} - -void NFType_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool NFType_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool NFType_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "NFType_anyOf" : pathPrefix; - - if (m_value == NFType_anyOf::eNFType_anyOf::INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool NFType_anyOf::operator==(const NFType_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool NFType_anyOf::operator!=(const NFType_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const NFType_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case NFType_anyOf::eNFType_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case NFType_anyOf::eNFType_anyOf::NRF: - j = "NRF"; - break; - case NFType_anyOf::eNFType_anyOf::UDM: - j = "UDM"; - break; - case NFType_anyOf::eNFType_anyOf::AMF: - j = "AMF"; - break; - case NFType_anyOf::eNFType_anyOf::SMF: - j = "SMF"; - break; - case NFType_anyOf::eNFType_anyOf::AUSF: - j = "AUSF"; - break; - case NFType_anyOf::eNFType_anyOf::NEF: - j = "NEF"; - break; - case NFType_anyOf::eNFType_anyOf::PCF: - j = "PCF"; - break; - case NFType_anyOf::eNFType_anyOf::SMSF: - j = "SMSF"; - break; - case NFType_anyOf::eNFType_anyOf::NSSF: - j = "NSSF"; - break; - case NFType_anyOf::eNFType_anyOf::UDR: - j = "UDR"; - break; - case NFType_anyOf::eNFType_anyOf::LMF: - j = "LMF"; - break; - case NFType_anyOf::eNFType_anyOf::GMLC: - j = "GMLC"; - break; - case NFType_anyOf::eNFType_anyOf::_5G_EIR: - j = "5G_EIR"; - break; - case NFType_anyOf::eNFType_anyOf::SEPP: - j = "SEPP"; - break; - case NFType_anyOf::eNFType_anyOf::UPF: - j = "UPF"; - break; - case NFType_anyOf::eNFType_anyOf::N3IWF: - j = "N3IWF"; - break; - case NFType_anyOf::eNFType_anyOf::AF: - j = "AF"; - break; - case NFType_anyOf::eNFType_anyOf::UDSF: - j = "UDSF"; - break; - case NFType_anyOf::eNFType_anyOf::BSF: - j = "BSF"; - break; - case NFType_anyOf::eNFType_anyOf::CHF: - j = "CHF"; - break; - case NFType_anyOf::eNFType_anyOf::NWDAF: - j = "NWDAF"; - break; - case NFType_anyOf::eNFType_anyOf::PCSCF: - j = "PCSCF"; - break; - case NFType_anyOf::eNFType_anyOf::CBCF: - j = "CBCF"; - break; - case NFType_anyOf::eNFType_anyOf::HSS: - j = "HSS"; - break; - case NFType_anyOf::eNFType_anyOf::UCMF: - j = "UCMF"; - break; - case NFType_anyOf::eNFType_anyOf::SOR_AF: - j = "SOR_AF"; - break; - case NFType_anyOf::eNFType_anyOf::SPAF: - j = "SPAF"; - break; - case NFType_anyOf::eNFType_anyOf::MME: - j = "MME"; - break; - case NFType_anyOf::eNFType_anyOf::SCSAS: - j = "SCSAS"; - break; - case NFType_anyOf::eNFType_anyOf::SCEF: - j = "SCEF"; - break; - case NFType_anyOf::eNFType_anyOf::SCP: - j = "SCP"; - break; - case NFType_anyOf::eNFType_anyOf::NSSAAF: - j = "NSSAAF"; - break; - case NFType_anyOf::eNFType_anyOf::ICSCF: - j = "ICSCF"; - break; - case NFType_anyOf::eNFType_anyOf::SCSCF: - j = "SCSCF"; - break; - case NFType_anyOf::eNFType_anyOf::DRA: - j = "DRA"; - break; - case NFType_anyOf::eNFType_anyOf::IMS_AS: - j = "IMS_AS"; - break; - case NFType_anyOf::eNFType_anyOf::CEF: - j = "CEF"; - break; - } -} - -void from_json(const nlohmann::json& j, NFType_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "NRF") { - o.setValue(NFType_anyOf::eNFType_anyOf::NRF); - } else if (s == "UDM") { - o.setValue(NFType_anyOf::eNFType_anyOf::UDM); - } else if (s == "AMF") { - o.setValue(NFType_anyOf::eNFType_anyOf::AMF); - } else if (s == "SMF") { - o.setValue(NFType_anyOf::eNFType_anyOf::SMF); - } else if (s == "AUSF") { - o.setValue(NFType_anyOf::eNFType_anyOf::AUSF); - } else if (s == "NEF") { - o.setValue(NFType_anyOf::eNFType_anyOf::NEF); - } else if (s == "PCF") { - o.setValue(NFType_anyOf::eNFType_anyOf::PCF); - } else if (s == "SMSF") { - o.setValue(NFType_anyOf::eNFType_anyOf::SMSF); - } else if (s == "NSSF") { - o.setValue(NFType_anyOf::eNFType_anyOf::NSSF); - } else if (s == "UDR") { - o.setValue(NFType_anyOf::eNFType_anyOf::UDR); - } else if (s == "LMF") { - o.setValue(NFType_anyOf::eNFType_anyOf::LMF); - } else if (s == "GMLC") { - o.setValue(NFType_anyOf::eNFType_anyOf::GMLC); - } else if (s == "5G_EIR") { - o.setValue(NFType_anyOf::eNFType_anyOf::_5G_EIR); - } else if (s == "SEPP") { - o.setValue(NFType_anyOf::eNFType_anyOf::SEPP); - } else if (s == "UPF") { - o.setValue(NFType_anyOf::eNFType_anyOf::UPF); - } else if (s == "N3IWF") { - o.setValue(NFType_anyOf::eNFType_anyOf::N3IWF); - } else if (s == "AF") { - o.setValue(NFType_anyOf::eNFType_anyOf::AF); - } else if (s == "UDSF") { - o.setValue(NFType_anyOf::eNFType_anyOf::UDSF); - } else if (s == "BSF") { - o.setValue(NFType_anyOf::eNFType_anyOf::BSF); - } else if (s == "CHF") { - o.setValue(NFType_anyOf::eNFType_anyOf::CHF); - } else if (s == "NWDAF") { - o.setValue(NFType_anyOf::eNFType_anyOf::NWDAF); - } else if (s == "PCSCF") { - o.setValue(NFType_anyOf::eNFType_anyOf::PCSCF); - } else if (s == "CBCF") { - o.setValue(NFType_anyOf::eNFType_anyOf::CBCF); - } else if (s == "HSS") { - o.setValue(NFType_anyOf::eNFType_anyOf::HSS); - } else if (s == "UCMF") { - o.setValue(NFType_anyOf::eNFType_anyOf::UCMF); - } else if (s == "SOR_AF") { - o.setValue(NFType_anyOf::eNFType_anyOf::SOR_AF); - } else if (s == "SPAF") { - o.setValue(NFType_anyOf::eNFType_anyOf::SPAF); - } else if (s == "MME") { - o.setValue(NFType_anyOf::eNFType_anyOf::MME); - } else if (s == "SCSAS") { - o.setValue(NFType_anyOf::eNFType_anyOf::SCSAS); - } else if (s == "SCEF") { - o.setValue(NFType_anyOf::eNFType_anyOf::SCEF); - } else if (s == "SCP") { - o.setValue(NFType_anyOf::eNFType_anyOf::SCP); - } else if (s == "NSSAAF") { - o.setValue(NFType_anyOf::eNFType_anyOf::NSSAAF); - } else if (s == "ICSCF") { - o.setValue(NFType_anyOf::eNFType_anyOf::ICSCF); - } else if (s == "SCSCF") { - o.setValue(NFType_anyOf::eNFType_anyOf::SCSCF); - } else if (s == "DRA") { - o.setValue(NFType_anyOf::eNFType_anyOf::DRA); - } else if (s == "IMS_AS") { - o.setValue(NFType_anyOf::eNFType_anyOf::IMS_AS); - } else if (s == "CEF") { - o.setValue(NFType_anyOf::eNFType_anyOf::CEF); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " NFType_anyOf::eNFType_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -NFType_anyOf::eNFType_anyOf NFType_anyOf::getValue() const { - return m_value; -} -void NFType_anyOf::setValue(NFType_anyOf::eNFType_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/NFType_anyOf.h b/src/api-server/model/NFType_anyOf.h deleted file mode 100755 index a94a3c00e5b6d80d487b504b506540876fabd2a0..0000000000000000000000000000000000000000 --- a/src/api-server/model/NFType_anyOf.h +++ /dev/null @@ -1,118 +0,0 @@ -/** - * 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. - */ -/* - * NFType_anyOf.h - * - * - */ - -#ifndef NFType_anyOf_H_ -#define NFType_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class NFType_anyOf { - public: - NFType_anyOf(); - virtual ~NFType_anyOf() = default; - - enum class eNFType_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - NRF, - UDM, - AMF, - SMF, - AUSF, - NEF, - PCF, - SMSF, - NSSF, - UDR, - LMF, - GMLC, - _5G_EIR, - SEPP, - UPF, - N3IWF, - AF, - UDSF, - BSF, - CHF, - NWDAF, - PCSCF, - CBCF, - HSS, - UCMF, - SOR_AF, - SPAF, - MME, - SCSAS, - SCEF, - SCP, - NSSAAF, - ICSCF, - SCSCF, - DRA, - IMS_AS, - CEF - }; - - /// <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 NFType_anyOf& rhs) const; - bool operator!=(const NFType_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// NFType_anyOf members - - NFType_anyOf::eNFType_anyOf getValue() const; - void setValue(NFType_anyOf::eNFType_anyOf value); - - friend void to_json(nlohmann::json& j, const NFType_anyOf& o); - friend void from_json(const nlohmann::json& j, NFType_anyOf& o); - - protected: - NFType_anyOf::eNFType_anyOf m_value = - NFType_anyOf::eNFType_anyOf::INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* NFType_anyOf_H_ */ diff --git a/src/api-server/model/PacketFilterInfo.cpp b/src/api-server/model/PacketFilterInfo.cpp deleted file mode 100644 index 685db8197b27629434c01dca5c42c9215faea0ea..0000000000000000000000000000000000000000 --- a/src/api-server/model/PacketFilterInfo.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/** - * 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 "PacketFilterInfo.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -PacketFilterInfo::PacketFilterInfo() { - m_PackFiltId = ""; - m_PackFiltIdIsSet = false; - m_PackFiltCont = ""; - m_PackFiltContIsSet = false; - m_TosTrafficClass = ""; - m_TosTrafficClassIsSet = false; - m_Spi = ""; - m_SpiIsSet = false; - m_FlowLabel = ""; - m_FlowLabelIsSet = false; - m_FlowDirectionIsSet = false; -} - -void PacketFilterInfo::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool PacketFilterInfo::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool PacketFilterInfo::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "PacketFilterInfo" : pathPrefix; - */ - return success; -} - -bool PacketFilterInfo::operator==(const PacketFilterInfo& rhs) const { - return - - ((!packFiltIdIsSet() && !rhs.packFiltIdIsSet()) || - (packFiltIdIsSet() && rhs.packFiltIdIsSet() && - getPackFiltId() == rhs.getPackFiltId())) && - - ((!packFiltContIsSet() && !rhs.packFiltContIsSet()) || - (packFiltContIsSet() && rhs.packFiltContIsSet() && - getPackFiltCont() == rhs.getPackFiltCont())) && - - ((!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 PacketFilterInfo::operator!=(const PacketFilterInfo& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const PacketFilterInfo& o) { - j = nlohmann::json(); - if (o.packFiltIdIsSet()) j["packFiltId"] = o.m_PackFiltId; - if (o.packFiltContIsSet()) j["packFiltCont"] = o.m_PackFiltCont; - 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, PacketFilterInfo& o) { - if (j.find("packFiltId") != j.end()) { - j.at("packFiltId").get_to(o.m_PackFiltId); - o.m_PackFiltIdIsSet = true; - } - if (j.find("packFiltCont") != j.end()) { - j.at("packFiltCont").get_to(o.m_PackFiltCont); - o.m_PackFiltContIsSet = 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 PacketFilterInfo::getPackFiltId() const { - return m_PackFiltId; -} -void PacketFilterInfo::setPackFiltId(std::string const& value) { - m_PackFiltId = value; - m_PackFiltIdIsSet = true; -} -bool PacketFilterInfo::packFiltIdIsSet() const { - return m_PackFiltIdIsSet; -} -void PacketFilterInfo::unsetPackFiltId() { - m_PackFiltIdIsSet = false; -} -std::string PacketFilterInfo::getPackFiltCont() const { - return m_PackFiltCont; -} -void PacketFilterInfo::setPackFiltCont(std::string const& value) { - m_PackFiltCont = value; - m_PackFiltContIsSet = true; -} -bool PacketFilterInfo::packFiltContIsSet() const { - return m_PackFiltContIsSet; -} -void PacketFilterInfo::unsetPackFiltCont() { - m_PackFiltContIsSet = false; -} -std::string PacketFilterInfo::getTosTrafficClass() const { - return m_TosTrafficClass; -} -void PacketFilterInfo::setTosTrafficClass(std::string const& value) { - m_TosTrafficClass = value; - m_TosTrafficClassIsSet = true; -} -bool PacketFilterInfo::tosTrafficClassIsSet() const { - return m_TosTrafficClassIsSet; -} -void PacketFilterInfo::unsetTosTrafficClass() { - m_TosTrafficClassIsSet = false; -} -std::string PacketFilterInfo::getSpi() const { - return m_Spi; -} -void PacketFilterInfo::setSpi(std::string const& value) { - m_Spi = value; - m_SpiIsSet = true; -} -bool PacketFilterInfo::spiIsSet() const { - return m_SpiIsSet; -} -void PacketFilterInfo::unsetSpi() { - m_SpiIsSet = false; -} -std::string PacketFilterInfo::getFlowLabel() const { - return m_FlowLabel; -} -void PacketFilterInfo::setFlowLabel(std::string const& value) { - m_FlowLabel = value; - m_FlowLabelIsSet = true; -} -bool PacketFilterInfo::flowLabelIsSet() const { - return m_FlowLabelIsSet; -} -void PacketFilterInfo::unsetFlowLabel() { - m_FlowLabelIsSet = false; -} -FlowDirection PacketFilterInfo::getFlowDirection() const { - return m_FlowDirection; -} -void PacketFilterInfo::setFlowDirection(FlowDirection const& value) { - m_FlowDirection = value; - m_FlowDirectionIsSet = true; -} -bool PacketFilterInfo::flowDirectionIsSet() const { - return m_FlowDirectionIsSet; -} -void PacketFilterInfo::unsetFlowDirection() { - m_FlowDirectionIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/PacketFilterInfo.h b/src/api-server/model/PacketFilterInfo.h deleted file mode 100755 index 0a42b6181c70d7a4c1b58146b1a7f161c5dbd228..0000000000000000000000000000000000000000 --- a/src/api-server/model/PacketFilterInfo.h +++ /dev/null @@ -1,128 +0,0 @@ -/** - * 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. - */ -/* - * PacketFilterInfo.h - * - * - */ - -#ifndef PacketFilterInfo_H_ -#define PacketFilterInfo_H_ - -#include "FlowDirection.h" -#include <string> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class PacketFilterInfo { - public: - PacketFilterInfo(); - virtual ~PacketFilterInfo() = 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 PacketFilterInfo& rhs) const; - bool operator!=(const PacketFilterInfo& rhs) const; - - ///////////////////////////////////////////// - /// PacketFilterInfo members - - /// <summary> - /// An identifier of packet filter. - /// </summary> - std::string getPackFiltId() const; - void setPackFiltId(std::string const& value); - bool packFiltIdIsSet() const; - void unsetPackFiltId(); - /// <summary> - /// Defines a packet filter for an IP flow. Refer to subclause 5.3.54 of 3GPP - /// TS 29.212 for encoding. - /// </summary> - std::string getPackFiltCont() const; - void setPackFiltCont(std::string const& value); - bool packFiltContIsSet() const; - void unsetPackFiltCont(); - /// <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> - FlowDirection getFlowDirection() const; - void setFlowDirection(FlowDirection const& value); - bool flowDirectionIsSet() const; - void unsetFlowDirection(); - - friend void to_json(nlohmann::json& j, const PacketFilterInfo& o); - friend void from_json(const nlohmann::json& j, PacketFilterInfo& o); - - protected: - std::string m_PackFiltId; - bool m_PackFiltIdIsSet; - std::string m_PackFiltCont; - bool m_PackFiltContIsSet; - std::string m_TosTrafficClass; - bool m_TosTrafficClassIsSet; - std::string m_Spi; - bool m_SpiIsSet; - std::string m_FlowLabel; - bool m_FlowLabelIsSet; - FlowDirection m_FlowDirection; - bool m_FlowDirectionIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* PacketFilterInfo_H_ */ diff --git a/src/api-server/model/PartialSuccessReport.cpp b/src/api-server/model/PartialSuccessReport.cpp deleted file mode 100755 index 8b694c43c635ec56d5ca5ed753632959848bbb9e..0000000000000000000000000000000000000000 --- a/src/api-server/model/PartialSuccessReport.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/** - * 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 "PartialSuccessReport.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -PartialSuccessReport::PartialSuccessReport() { - m_RuleReportsIsSet = false; - m_SessRuleReportsIsSet = false; - m_UeCampingRepIsSet = false; -} - -void PartialSuccessReport::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool PartialSuccessReport::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool PartialSuccessReport::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "PartialSuccessReport" : pathPrefix; - - if (ruleReportsIsSet()) { - const std::vector<RuleReport>& value = m_RuleReports; - const std::string currentValuePath = _pathPrefix + ".ruleReports"; - - 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 RuleReport& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = - value.validate(msg, currentValuePath + ".ruleReports") && success; - - i++; - } - } - } - - if (sessRuleReportsIsSet()) { - const std::vector<SessionRuleReport>& value = m_SessRuleReports; - const std::string currentValuePath = _pathPrefix + ".sessRuleReports"; - - 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 SessionRuleReport& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".sessRuleReports") && - success; - - i++; - } - } - } - - return success; -} - -bool PartialSuccessReport::operator==(const PartialSuccessReport& rhs) const { - return - - (getFailureCause() == rhs.getFailureCause()) && - - ((!ruleReportsIsSet() && !rhs.ruleReportsIsSet()) || - (ruleReportsIsSet() && rhs.ruleReportsIsSet() && - getRuleReports() == rhs.getRuleReports())) && - - ((!sessRuleReportsIsSet() && !rhs.sessRuleReportsIsSet()) || - (sessRuleReportsIsSet() && rhs.sessRuleReportsIsSet() && - getSessRuleReports() == rhs.getSessRuleReports())) && - - ((!ueCampingRepIsSet() && !rhs.ueCampingRepIsSet()) || - (ueCampingRepIsSet() && rhs.ueCampingRepIsSet() && - getUeCampingRep() == rhs.getUeCampingRep())) - - ; -} - -bool PartialSuccessReport::operator!=(const PartialSuccessReport& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const PartialSuccessReport& o) { - j = nlohmann::json(); - j["failureCause"] = o.m_FailureCause; - if (o.ruleReportsIsSet() || !o.m_RuleReports.empty()) - j["ruleReports"] = o.m_RuleReports; - if (o.sessRuleReportsIsSet() || !o.m_SessRuleReports.empty()) - j["sessRuleReports"] = o.m_SessRuleReports; - if (o.ueCampingRepIsSet()) j["ueCampingRep"] = o.m_UeCampingRep; -} - -void from_json(const nlohmann::json& j, PartialSuccessReport& o) { - j.at("failureCause").get_to(o.m_FailureCause); - if (j.find("ruleReports") != j.end()) { - j.at("ruleReports").get_to(o.m_RuleReports); - o.m_RuleReportsIsSet = true; - } - if (j.find("sessRuleReports") != j.end()) { - j.at("sessRuleReports").get_to(o.m_SessRuleReports); - o.m_SessRuleReportsIsSet = true; - } - if (j.find("ueCampingRep") != j.end()) { - j.at("ueCampingRep").get_to(o.m_UeCampingRep); - o.m_UeCampingRepIsSet = true; - } -} - -FailureCause PartialSuccessReport::getFailureCause() const { - return m_FailureCause; -} -void PartialSuccessReport::setFailureCause(FailureCause const& value) { - m_FailureCause = value; -} -std::vector<RuleReport> PartialSuccessReport::getRuleReports() const { - return m_RuleReports; -} -void PartialSuccessReport::setRuleReports( - std::vector<RuleReport> const& value) { - m_RuleReports = value; - m_RuleReportsIsSet = true; -} -bool PartialSuccessReport::ruleReportsIsSet() const { - return m_RuleReportsIsSet; -} -void PartialSuccessReport::unsetRuleReports() { - m_RuleReportsIsSet = false; -} -std::vector<SessionRuleReport> PartialSuccessReport::getSessRuleReports() - const { - return m_SessRuleReports; -} -void PartialSuccessReport::setSessRuleReports( - std::vector<SessionRuleReport> const& value) { - m_SessRuleReports = value; - m_SessRuleReportsIsSet = true; -} -bool PartialSuccessReport::sessRuleReportsIsSet() const { - return m_SessRuleReportsIsSet; -} -void PartialSuccessReport::unsetSessRuleReports() { - m_SessRuleReportsIsSet = false; -} -UeCampingRep PartialSuccessReport::getUeCampingRep() const { - return m_UeCampingRep; -} -void PartialSuccessReport::setUeCampingRep(UeCampingRep const& value) { - m_UeCampingRep = value; - m_UeCampingRepIsSet = true; -} -bool PartialSuccessReport::ueCampingRepIsSet() const { - return m_UeCampingRepIsSet; -} -void PartialSuccessReport::unsetUeCampingRep() { - m_UeCampingRepIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/PartialSuccessReport.h b/src/api-server/model/PartialSuccessReport.h deleted file mode 100755 index 874f770f7390540f77976c0f50acd7877b2e5832..0000000000000000000000000000000000000000 --- a/src/api-server/model/PartialSuccessReport.h +++ /dev/null @@ -1,111 +0,0 @@ -/** - * 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. - */ -/* - * PartialSuccessReport.h - * - * - */ - -#ifndef PartialSuccessReport_H_ -#define PartialSuccessReport_H_ - -#include "FailureCause.h" -#include "UeCampingRep.h" -#include "RuleReport.h" -#include "SessionRuleReport.h" -#include <vector> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class PartialSuccessReport { - public: - PartialSuccessReport(); - virtual ~PartialSuccessReport() = 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 PartialSuccessReport& rhs) const; - bool operator!=(const PartialSuccessReport& rhs) const; - - ///////////////////////////////////////////// - /// PartialSuccessReport members - - /// <summary> - /// - /// </summary> - FailureCause getFailureCause() const; - void setFailureCause(FailureCause const& value); - /// <summary> - /// Information about the PCC rules provisioned by the PCF not successfully - /// installed/activated. - /// </summary> - std::vector<RuleReport> getRuleReports() const; - void setRuleReports(std::vector<RuleReport> const& value); - bool ruleReportsIsSet() const; - void unsetRuleReports(); - /// <summary> - /// Information about the session rules provisioned by the PCF not - /// successfully installed. - /// </summary> - std::vector<SessionRuleReport> getSessRuleReports() const; - void setSessRuleReports(std::vector<SessionRuleReport> const& value); - bool sessRuleReportsIsSet() const; - void unsetSessRuleReports(); - /// <summary> - /// - /// </summary> - UeCampingRep getUeCampingRep() const; - void setUeCampingRep(UeCampingRep const& value); - bool ueCampingRepIsSet() const; - void unsetUeCampingRep(); - - friend void to_json(nlohmann::json& j, const PartialSuccessReport& o); - friend void from_json(const nlohmann::json& j, PartialSuccessReport& o); - - protected: - FailureCause m_FailureCause; - - std::vector<RuleReport> m_RuleReports; - bool m_RuleReportsIsSet; - std::vector<SessionRuleReport> m_SessRuleReports; - bool m_SessRuleReportsIsSet; - UeCampingRep m_UeCampingRep; - bool m_UeCampingRepIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* PartialSuccessReport_H_ */ diff --git a/src/api-server/model/PccRule.cpp b/src/api-server/model/PccRule.cpp deleted file mode 100755 index 6961f4e077223ce9b73fc5adc4befd0637ebba12..0000000000000000000000000000000000000000 --- a/src/api-server/model/PccRule.cpp +++ /dev/null @@ -1,744 +0,0 @@ -/** - * 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 pcf { -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; - } - if (j.find("pccRuleId") != j.end()) { - 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 pcf -} // namespace oai diff --git a/src/api-server/model/PccRule.h b/src/api-server/model/PccRule.h deleted file mode 100755 index 7ce47cd67b5838ad4cef4778d0f463c623a21b5a..0000000000000000000000000000000000000000 --- a/src/api-server/model/PccRule.h +++ /dev/null @@ -1,255 +0,0 @@ -/** - * 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 pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class PccRule { - 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 \"ATSSS\" 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 \"ATSSS\" 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 pcf -} // namespace oai -#endif /* PccRule_H_ */ diff --git a/src/api-server/model/PduSessionRelCause.cpp b/src/api-server/model/PduSessionRelCause.cpp deleted file mode 100755 index c9caa8d894226faab7e787fcb5cdef0a5636b66d..0000000000000000000000000000000000000000 --- a/src/api-server/model/PduSessionRelCause.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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 "PduSessionRelCause.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -PduSessionRelCause::PduSessionRelCause() {} - -void PduSessionRelCause::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool PduSessionRelCause::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool PduSessionRelCause::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "PduSessionRelCause" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool PduSessionRelCause::operator==(const PduSessionRelCause& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool PduSessionRelCause::operator!=(const PduSessionRelCause& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const PduSessionRelCause& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, PduSessionRelCause& o) { - from_json(j, o.m_value); -} - -PduSessionRelCause_anyOf PduSessionRelCause::getValue() const { - return m_value; -} - -void PduSessionRelCause::setValue(PduSessionRelCause_anyOf value) { - m_value = value; -} - -PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf -PduSessionRelCause::getEnumValue() const { - return m_value.getValue(); -} - -void PduSessionRelCause::setEnumValue( - PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/PduSessionRelCause.h b/src/api-server/model/PduSessionRelCause.h deleted file mode 100755 index b104d35e306e45dc74a09ddf0f1eb10d83b1cfd5..0000000000000000000000000000000000000000 --- a/src/api-server/model/PduSessionRelCause.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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. - */ -/* - * PduSessionRelCause.h - * - * - */ - -#ifndef PduSessionRelCause_H_ -#define PduSessionRelCause_H_ - -#include "PduSessionRelCause_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class PduSessionRelCause { - public: - PduSessionRelCause(); - virtual ~PduSessionRelCause() = 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 PduSessionRelCause& rhs) const; - bool operator!=(const PduSessionRelCause& rhs) const; - - ///////////////////////////////////////////// - /// PduSessionRelCause members - - PduSessionRelCause_anyOf getValue() const; - void setValue(PduSessionRelCause_anyOf value); - PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf getEnumValue() const; - void setEnumValue(PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf value); - friend void to_json(nlohmann::json& j, const PduSessionRelCause& o); - friend void from_json(const nlohmann::json& j, PduSessionRelCause& o); - friend void to_json(nlohmann::json& j, const PduSessionRelCause_anyOf& o); - friend void from_json(const nlohmann::json& j, PduSessionRelCause_anyOf& o); - - protected: - PduSessionRelCause_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* PduSessionRelCause_H_ */ diff --git a/src/api-server/model/PduSessionRelCause_anyOf.cpp b/src/api-server/model/PduSessionRelCause_anyOf.cpp deleted file mode 100755 index 4216d36b9f67698c75947c3b6ef7536152ef13a8..0000000000000000000000000000000000000000 --- a/src/api-server/model/PduSessionRelCause_anyOf.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/** - * 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 "PduSessionRelCause_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -PduSessionRelCause_anyOf::PduSessionRelCause_anyOf() {} - -void PduSessionRelCause_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool PduSessionRelCause_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool PduSessionRelCause_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "PduSessionRelCause_anyOf" : pathPrefix; - - if (m_value == PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool PduSessionRelCause_anyOf::operator==( - const PduSessionRelCause_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool PduSessionRelCause_anyOf::operator!=( - const PduSessionRelCause_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const PduSessionRelCause_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf::PS_TO_CS_HO: - j = "PS_TO_CS_HO"; - break; - } -} - -void from_json(const nlohmann::json& j, PduSessionRelCause_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "PS_TO_CS_HO") { - o.setValue( - PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf::PS_TO_CS_HO); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf -PduSessionRelCause_anyOf::getValue() const { - return m_value; -} -void PduSessionRelCause_anyOf::setValue( - PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/PduSessionRelCause_anyOf.h b/src/api-server/model/PduSessionRelCause_anyOf.h deleted file mode 100755 index 281c95a62df45e8a3eca3f6fbe67cd544d71aadf..0000000000000000000000000000000000000000 --- a/src/api-server/model/PduSessionRelCause_anyOf.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 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. - */ -/* - * PduSessionRelCause_anyOf.h - * - * - */ - -#ifndef PduSessionRelCause_anyOf_H_ -#define PduSessionRelCause_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class PduSessionRelCause_anyOf { - public: - PduSessionRelCause_anyOf(); - virtual ~PduSessionRelCause_anyOf() = default; - - enum class ePduSessionRelCause_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - PS_TO_CS_HO - }; - - /// <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 PduSessionRelCause_anyOf& rhs) const; - bool operator!=(const PduSessionRelCause_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// PduSessionRelCause_anyOf members - - PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf getValue() const; - void setValue(PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf value); - - friend void to_json(nlohmann::json& j, const PduSessionRelCause_anyOf& o); - friend void from_json(const nlohmann::json& j, PduSessionRelCause_anyOf& o); - - protected: - PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf m_value = - PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* PduSessionRelCause_anyOf_H_ */ diff --git a/src/api-server/model/PolicyControlRequestTrigger.cpp b/src/api-server/model/PolicyControlRequestTrigger.cpp deleted file mode 100755 index d62a7ee4c5dae89d50ff0fc7a12bc12e5e45daca..0000000000000000000000000000000000000000 --- a/src/api-server/model/PolicyControlRequestTrigger.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai diff --git a/src/api-server/model/PolicyControlRequestTrigger.h b/src/api-server/model/PolicyControlRequestTrigger.h deleted file mode 100755 index 4cf23a4b77a5636461dec6fb4bd5f55c931e1e82..0000000000000000000000000000000000000000 --- a/src/api-server/model/PolicyControlRequestTrigger.h +++ /dev/null @@ -1,155 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai -#endif /* PolicyControlRequestTrigger_H_ */ diff --git a/src/api-server/model/PolicyControlRequestTrigger_anyOf.cpp b/src/api-server/model/PolicyControlRequestTrigger_anyOf.cpp deleted file mode 100755 index 3b32be699f6156b6889b6a2aa963793f9d3c5233..0000000000000000000000000000000000000000 --- a/src/api-server/model/PolicyControlRequestTrigger_anyOf.cpp +++ /dev/null @@ -1,359 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai diff --git a/src/api-server/model/PolicyControlRequestTrigger_anyOf.h b/src/api-server/model/PolicyControlRequestTrigger_anyOf.h deleted file mode 100755 index d2698cb44df3f5e67359a2efddd304b1964f5d3f..0000000000000000000000000000000000000000 --- a/src/api-server/model/PolicyControlRequestTrigger_anyOf.h +++ /dev/null @@ -1,124 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai -#endif /* PolicyControlRequestTrigger_anyOf_H_ */ diff --git a/src/api-server/model/PortManagementContainer.cpp b/src/api-server/model/PortManagementContainer.cpp deleted file mode 100644 index 663df467a1152a5f20482739ad955eb5f3275fdb..0000000000000000000000000000000000000000 --- a/src/api-server/model/PortManagementContainer.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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 "PortManagementContainer.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -PortManagementContainer::PortManagementContainer() {} - -void PortManagementContainer::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool PortManagementContainer::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool PortManagementContainer::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "PortManagementContainer" : pathPrefix; - */ - return success; -} - -bool PortManagementContainer::operator==( - const PortManagementContainer& rhs) const { - return - - (getPortManCont() == rhs.getPortManCont()) && - - (getPortIdentifier() == rhs.getPortIdentifier()) - - ; -} - -bool PortManagementContainer::operator!=( - const PortManagementContainer& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const PortManagementContainer& o) { - j = nlohmann::json(); - j["portManCont"] = o.m_PortManCont; - j["portIdentifier"] = o.m_PortIdentifier; -} - -void from_json(const nlohmann::json& j, PortManagementContainer& o) { - j.at("portManCont").get_to(o.m_PortManCont); - j.at("portIdentifier").get_to(o.m_PortIdentifier); -} - -std::string PortManagementContainer::getPortManCont() const { - return m_PortManCont; -} -void PortManagementContainer::setPortManCont(std::string const& value) { - m_PortManCont = value; -} -TsnPortIdentifier PortManagementContainer::getPortIdentifier() const { - return m_PortIdentifier; -} -void PortManagementContainer::setPortIdentifier( - TsnPortIdentifier const& value) { - m_PortIdentifier = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/PortManagementContainer.h b/src/api-server/model/PortManagementContainer.h deleted file mode 100755 index 172fe1e67dc2b3d98e78769e7412b988e6aead20..0000000000000000000000000000000000000000 --- a/src/api-server/model/PortManagementContainer.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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. - */ -/* - * PortManagementContainer.h - * - * - */ - -#ifndef PortManagementContainer_H_ -#define PortManagementContainer_H_ - -#include "TsnPortIdentifier.h" -#include <string> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class PortManagementContainer { - public: - PortManagementContainer(); - virtual ~PortManagementContainer() = 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 PortManagementContainer& rhs) const; - bool operator!=(const PortManagementContainer& rhs) const; - - ///////////////////////////////////////////// - /// PortManagementContainer members - - /// <summary> - /// - /// </summary> - std::string getPortManCont() const; - void setPortManCont(std::string const& value); - /// <summary> - /// - /// </summary> - TsnPortIdentifier getPortIdentifier() const; - void setPortIdentifier(TsnPortIdentifier const& value); - - friend void to_json(nlohmann::json& j, const PortManagementContainer& o); - friend void from_json(const nlohmann::json& j, PortManagementContainer& o); - - protected: - std::string m_PortManCont; - - TsnPortIdentifier m_PortIdentifier; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* PortManagementContainer_H_ */ diff --git a/src/api-server/model/QosCharacteristics.cpp b/src/api-server/model/QosCharacteristics.cpp deleted file mode 100644 index 7b2826d3b323b5947ebcdaa446c3bb5ab2832bab..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosCharacteristics.cpp +++ /dev/null @@ -1,282 +0,0 @@ -/** - * 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 "QosCharacteristics.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -QosCharacteristics::QosCharacteristics() { - m_r_5qi = 0; - m_PriorityLevel = 0; - m_PacketDelayBudget = 0; - m_PacketErrorRate = ""; - m_AveragingWindow = 2000; - m_AveragingWindowIsSet = false; - m_MaxDataBurstVol = 0; - m_MaxDataBurstVolIsSet = false; - m_ExtMaxDataBurstVol = 0; - m_ExtMaxDataBurstVolIsSet = false; -} - -void QosCharacteristics::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool QosCharacteristics::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool QosCharacteristics::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "QosCharacteristics" : pathPrefix; - - /* r_5qi */ { - const int32_t& value = m_r_5qi; - const std::string currentValuePath = _pathPrefix + ".r5qi"; - - 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;"; - } - } - - /* PriorityLevel */ { - const int32_t& value = m_PriorityLevel; - const std::string currentValuePath = _pathPrefix + ".priorityLevel"; - - if (value < 1) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 1;"; - } - if (value > 127) { - success = false; - msg << currentValuePath << ": must be less than or equal to 127;"; - } - } - - /* PacketDelayBudget */ { - const int32_t& value = m_PacketDelayBudget; - const std::string currentValuePath = _pathPrefix + ".packetDelayBudget"; - - if (value < 1) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 1;"; - } - } - /* - // PacketErrorRate - { - const std::string& value = m_PacketErrorRate; - const std::string currentValuePath = _pathPrefix + ".packetErrorRate"; - } - */ - if (averagingWindowIsSet()) { - const int32_t& value = m_AveragingWindow; - const std::string currentValuePath = _pathPrefix + ".averagingWindow"; - - if (value < 1) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 1;"; - } - if (value > 4095) { - success = false; - msg << currentValuePath << ": must be less than or equal to 4095;"; - } - } - - if (maxDataBurstVolIsSet()) { - const int32_t& value = m_MaxDataBurstVol; - const std::string currentValuePath = _pathPrefix + ".maxDataBurstVol"; - - if (value < 1) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 1;"; - } - if (value > 4095) { - success = false; - msg << currentValuePath << ": must be less than or equal to 4095;"; - } - } - - if (extMaxDataBurstVolIsSet()) { - const int32_t& value = m_ExtMaxDataBurstVol; - const std::string currentValuePath = _pathPrefix + ".extMaxDataBurstVol"; - - if (value < 4096) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 4096;"; - } - if (value > 2000000) { - success = false; - msg << currentValuePath << ": must be less than or equal to 2000000;"; - } - } - - return success; -} - -bool QosCharacteristics::operator==(const QosCharacteristics& rhs) const { - return - - (getR5qi() == rhs.getR5qi()) && - - (getResourceType() == rhs.getResourceType()) && - - (getPriorityLevel() == rhs.getPriorityLevel()) && - - (getPacketDelayBudget() == rhs.getPacketDelayBudget()) && - - (getPacketErrorRate() == rhs.getPacketErrorRate()) && - - ((!averagingWindowIsSet() && !rhs.averagingWindowIsSet()) || - (averagingWindowIsSet() && rhs.averagingWindowIsSet() && - getAveragingWindow() == rhs.getAveragingWindow())) && - - ((!maxDataBurstVolIsSet() && !rhs.maxDataBurstVolIsSet()) || - (maxDataBurstVolIsSet() && rhs.maxDataBurstVolIsSet() && - getMaxDataBurstVol() == rhs.getMaxDataBurstVol())) && - - ((!extMaxDataBurstVolIsSet() && !rhs.extMaxDataBurstVolIsSet()) || - (extMaxDataBurstVolIsSet() && rhs.extMaxDataBurstVolIsSet() && - getExtMaxDataBurstVol() == rhs.getExtMaxDataBurstVol())) - - ; -} - -bool QosCharacteristics::operator!=(const QosCharacteristics& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const QosCharacteristics& o) { - j = nlohmann::json(); - j["5qi"] = o.m_r_5qi; - j["resourceType"] = o.m_ResourceType; - j["priorityLevel"] = o.m_PriorityLevel; - j["packetDelayBudget"] = o.m_PacketDelayBudget; - j["packetErrorRate"] = o.m_PacketErrorRate; - if (o.averagingWindowIsSet()) j["averagingWindow"] = o.m_AveragingWindow; - if (o.maxDataBurstVolIsSet()) j["maxDataBurstVol"] = o.m_MaxDataBurstVol; - if (o.extMaxDataBurstVolIsSet()) - j["extMaxDataBurstVol"] = o.m_ExtMaxDataBurstVol; -} - -void from_json(const nlohmann::json& j, QosCharacteristics& o) { - j.at("5qi").get_to(o.m_r_5qi); - j.at("resourceType").get_to(o.m_ResourceType); - j.at("priorityLevel").get_to(o.m_PriorityLevel); - j.at("packetDelayBudget").get_to(o.m_PacketDelayBudget); - j.at("packetErrorRate").get_to(o.m_PacketErrorRate); - if (j.find("averagingWindow") != j.end()) { - j.at("averagingWindow").get_to(o.m_AveragingWindow); - o.m_AveragingWindowIsSet = true; - } - if (j.find("maxDataBurstVol") != j.end()) { - j.at("maxDataBurstVol").get_to(o.m_MaxDataBurstVol); - o.m_MaxDataBurstVolIsSet = true; - } - if (j.find("extMaxDataBurstVol") != j.end()) { - j.at("extMaxDataBurstVol").get_to(o.m_ExtMaxDataBurstVol); - o.m_ExtMaxDataBurstVolIsSet = true; - } -} - -int32_t QosCharacteristics::getR5qi() const { - return m_r_5qi; -} -void QosCharacteristics::setR5qi(int32_t const value) { - m_r_5qi = value; -} -QosResourceType QosCharacteristics::getResourceType() const { - return m_ResourceType; -} -void QosCharacteristics::setResourceType(QosResourceType const& value) { - m_ResourceType = value; -} -int32_t QosCharacteristics::getPriorityLevel() const { - return m_PriorityLevel; -} -void QosCharacteristics::setPriorityLevel(int32_t const value) { - m_PriorityLevel = value; -} -int32_t QosCharacteristics::getPacketDelayBudget() const { - return m_PacketDelayBudget; -} -void QosCharacteristics::setPacketDelayBudget(int32_t const value) { - m_PacketDelayBudget = value; -} -std::string QosCharacteristics::getPacketErrorRate() const { - return m_PacketErrorRate; -} -void QosCharacteristics::setPacketErrorRate(std::string const& value) { - m_PacketErrorRate = value; -} -int32_t QosCharacteristics::getAveragingWindow() const { - return m_AveragingWindow; -} -void QosCharacteristics::setAveragingWindow(int32_t const value) { - m_AveragingWindow = value; - m_AveragingWindowIsSet = true; -} -bool QosCharacteristics::averagingWindowIsSet() const { - return m_AveragingWindowIsSet; -} -void QosCharacteristics::unsetAveragingWindow() { - m_AveragingWindowIsSet = false; -} -int32_t QosCharacteristics::getMaxDataBurstVol() const { - return m_MaxDataBurstVol; -} -void QosCharacteristics::setMaxDataBurstVol(int32_t const value) { - m_MaxDataBurstVol = value; - m_MaxDataBurstVolIsSet = true; -} -bool QosCharacteristics::maxDataBurstVolIsSet() const { - return m_MaxDataBurstVolIsSet; -} -void QosCharacteristics::unsetMaxDataBurstVol() { - m_MaxDataBurstVolIsSet = false; -} -int32_t QosCharacteristics::getExtMaxDataBurstVol() const { - return m_ExtMaxDataBurstVol; -} -void QosCharacteristics::setExtMaxDataBurstVol(int32_t const value) { - m_ExtMaxDataBurstVol = value; - m_ExtMaxDataBurstVolIsSet = true; -} -bool QosCharacteristics::extMaxDataBurstVolIsSet() const { - return m_ExtMaxDataBurstVolIsSet; -} -void QosCharacteristics::unsetExtMaxDataBurstVol() { - m_ExtMaxDataBurstVolIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/QosCharacteristics.h b/src/api-server/model/QosCharacteristics.h deleted file mode 100644 index 442249bc5efd5a6ae94076d19969f78f73241095..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosCharacteristics.h +++ /dev/null @@ -1,134 +0,0 @@ -/** - * 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. - */ -/* - * QosCharacteristics.h - * - * - */ - -#ifndef QosCharacteristics_H_ -#define QosCharacteristics_H_ - -#include "QosResourceType.h" -#include <string> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class QosCharacteristics { - public: - QosCharacteristics(); - virtual ~QosCharacteristics() = 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 QosCharacteristics& rhs) const; - bool operator!=(const QosCharacteristics& rhs) const; - - ///////////////////////////////////////////// - /// QosCharacteristics members - - /// <summary> - /// - /// </summary> - int32_t getR5qi() const; - void setR5qi(int32_t const value); - /// <summary> - /// - /// </summary> - oai::model::common::QosResourceType getResourceType() const; - void setResourceType(oai::model::common::QosResourceType const& value); - /// <summary> - /// - /// </summary> - int32_t getPriorityLevel() const; - void setPriorityLevel(int32_t const value); - /// <summary> - /// - /// </summary> - int32_t getPacketDelayBudget() const; - void setPacketDelayBudget(int32_t const value); - /// <summary> - /// - /// </summary> - std::string getPacketErrorRate() const; - void setPacketErrorRate(std::string const& value); - /// <summary> - /// - /// </summary> - int32_t getAveragingWindow() const; - void setAveragingWindow(int32_t const value); - bool averagingWindowIsSet() const; - void unsetAveragingWindow(); - /// <summary> - /// - /// </summary> - int32_t getMaxDataBurstVol() const; - void setMaxDataBurstVol(int32_t const value); - bool maxDataBurstVolIsSet() const; - void unsetMaxDataBurstVol(); - /// <summary> - /// - /// </summary> - int32_t getExtMaxDataBurstVol() const; - void setExtMaxDataBurstVol(int32_t const value); - bool extMaxDataBurstVolIsSet() const; - void unsetExtMaxDataBurstVol(); - - friend void to_json(nlohmann::json& j, const QosCharacteristics& o); - friend void from_json(const nlohmann::json& j, QosCharacteristics& o); - - protected: - int32_t m_r_5qi; - - oai::model::common::QosResourceType m_ResourceType; - - int32_t m_PriorityLevel; - - int32_t m_PacketDelayBudget; - - std::string m_PacketErrorRate; - - int32_t m_AveragingWindow; - bool m_AveragingWindowIsSet; - int32_t m_MaxDataBurstVol; - bool m_MaxDataBurstVolIsSet; - int32_t m_ExtMaxDataBurstVol; - bool m_ExtMaxDataBurstVolIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* QosCharacteristics_H_ */ diff --git a/src/api-server/model/QosData.cpp b/src/api-server/model/QosData.cpp deleted file mode 100644 index ced3f5604f0f878b3030ea55b7529dbe1ebd5a0b..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosData.cpp +++ /dev/null @@ -1,612 +0,0 @@ -/** - * 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 "QosData.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -QosData::QosData() { - m_QosId = ""; - m_r_5qi = 0; - m_r_5qiIsSet = false; - m_MaxbrUl = ""; - m_MaxbrUlIsSet = false; - m_MaxbrDl = ""; - m_MaxbrDlIsSet = false; - m_GbrUl = ""; - m_GbrUlIsSet = false; - m_GbrDl = ""; - m_GbrDlIsSet = false; - m_ArpIsSet = false; - m_Qnc = false; - m_QncIsSet = false; - m_PriorityLevel = 0; - m_PriorityLevelIsSet = false; - m_AverWindow = 2000; - m_AverWindowIsSet = false; - m_MaxDataBurstVol = 0; - m_MaxDataBurstVolIsSet = false; - m_ReflectiveQos = false; - m_ReflectiveQosIsSet = false; - m_SharingKeyDl = ""; - m_SharingKeyDlIsSet = false; - m_SharingKeyUl = ""; - m_SharingKeyUlIsSet = false; - m_MaxPacketLossRateDl = 0; - m_MaxPacketLossRateDlIsSet = false; - m_MaxPacketLossRateUl = 0; - m_MaxPacketLossRateUlIsSet = false; - m_DefQosFlowIndication = false; - m_DefQosFlowIndicationIsSet = false; - m_ExtMaxDataBurstVol = 0; - m_ExtMaxDataBurstVolIsSet = false; -} - -void QosData::validate() const { - std::stringstream msg; - if (!validate(msg)) { - throw oai::model::common::helpers::ValidationException(msg.str()); - } -} - -bool QosData::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool QosData::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "QosData" : pathPrefix; - - if (r5qiIsSet()) { - const int32_t& value = m_r_5qi; - const std::string currentValuePath = _pathPrefix + ".r5qi"; - - 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 (maxbrUlIsSet()) { - const std::string& value = m_MaxbrUl; - const std::string currentValuePath = _pathPrefix + ".maxbrUl"; - success &= helpers::validate_regex( - BANDWIDTH_VALIDATION_REGEX, value, msg, currentValuePath); - } - - if (maxbrDlIsSet()) { - const std::string& value = m_MaxbrDl; - const std::string currentValuePath = _pathPrefix + ".maxbrDl"; - success &= helpers::validate_regex( - BANDWIDTH_VALIDATION_REGEX, value, msg, currentValuePath); - } - - if (gbrUlIsSet()) { - const std::string& value = m_GbrUl; - const std::string currentValuePath = _pathPrefix + ".gbrUl"; - success &= helpers::validate_regex( - BANDWIDTH_VALIDATION_REGEX, value, msg, currentValuePath); - } - - if (gbrDlIsSet()) { - const std::string& value = m_GbrDl; - const std::string currentValuePath = _pathPrefix + ".gbrDl"; - success &= helpers::validate_regex( - BANDWIDTH_VALIDATION_REGEX, value, msg, currentValuePath); - } - - if (priorityLevelIsSet()) { - const int32_t& value = m_PriorityLevel; - const std::string currentValuePath = _pathPrefix + ".priorityLevel"; - - if (value < 1) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 1;"; - } - if (value > 127) { - success = false; - msg << currentValuePath << ": must be less than or equal to 127;"; - } - } - - if (averWindowIsSet()) { - const int32_t& value = m_AverWindow; - const std::string currentValuePath = _pathPrefix + ".averWindow"; - - if (value < 1) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 1;"; - } - if (value > 4095) { - success = false; - msg << currentValuePath << ": must be less than or equal to 4095;"; - } - } - - if (maxDataBurstVolIsSet()) { - const int32_t& value = m_MaxDataBurstVol; - const std::string currentValuePath = _pathPrefix + ".maxDataBurstVol"; - - if (value < 1) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 1;"; - } - if (value > 4095) { - success = false; - msg << currentValuePath << ": must be less than or equal to 4095;"; - } - } - - if (maxPacketLossRateDlIsSet()) { - const int32_t& value = m_MaxPacketLossRateDl; - const std::string currentValuePath = _pathPrefix + ".maxPacketLossRateDl"; - - if (value < 0) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - if (value > 1000) { - success = false; - msg << currentValuePath << ": must be less than or equal to 1000;"; - } - } - - if (maxPacketLossRateUlIsSet()) { - const int32_t& value = m_MaxPacketLossRateUl; - const std::string currentValuePath = _pathPrefix + ".maxPacketLossRateUl"; - - if (value < 0) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - if (value > 1000) { - success = false; - msg << currentValuePath << ": must be less than or equal to 1000;"; - } - } - - if (extMaxDataBurstVolIsSet()) { - const int32_t& value = m_ExtMaxDataBurstVol; - const std::string currentValuePath = _pathPrefix + ".extMaxDataBurstVol"; - - if (value < 4096) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 4096;"; - } - if (value > 2000000) { - success = false; - msg << currentValuePath << ": must be less than or equal to 2000000;"; - } - } - - return success; -} - -bool QosData::operator==(const QosData& rhs) const { - return - - (getQosId() == rhs.getQosId()) && - - ((!r5qiIsSet() && !rhs.r5qiIsSet()) || - (r5qiIsSet() && rhs.r5qiIsSet() && getR5qi() == rhs.getR5qi())) && - - ((!maxbrUlIsSet() && !rhs.maxbrUlIsSet()) || - (maxbrUlIsSet() && rhs.maxbrUlIsSet() && - getMaxbrUl() == rhs.getMaxbrUl())) && - - ((!maxbrDlIsSet() && !rhs.maxbrDlIsSet()) || - (maxbrDlIsSet() && rhs.maxbrDlIsSet() && - getMaxbrDl() == rhs.getMaxbrDl())) && - - ((!gbrUlIsSet() && !rhs.gbrUlIsSet()) || - (gbrUlIsSet() && rhs.gbrUlIsSet() && getGbrUl() == rhs.getGbrUl())) && - - ((!gbrDlIsSet() && !rhs.gbrDlIsSet()) || - (gbrDlIsSet() && rhs.gbrDlIsSet() && getGbrDl() == rhs.getGbrDl())) && - - ((!arpIsSet() && !rhs.arpIsSet()) || - (arpIsSet() && rhs.arpIsSet() && getArp() == rhs.getArp())) && - - ((!qncIsSet() && !rhs.qncIsSet()) || - (qncIsSet() && rhs.qncIsSet() && isQnc() == rhs.isQnc())) && - - ((!priorityLevelIsSet() && !rhs.priorityLevelIsSet()) || - (priorityLevelIsSet() && rhs.priorityLevelIsSet() && - getPriorityLevel() == rhs.getPriorityLevel())) && - - ((!averWindowIsSet() && !rhs.averWindowIsSet()) || - (averWindowIsSet() && rhs.averWindowIsSet() && - getAverWindow() == rhs.getAverWindow())) && - - ((!maxDataBurstVolIsSet() && !rhs.maxDataBurstVolIsSet()) || - (maxDataBurstVolIsSet() && rhs.maxDataBurstVolIsSet() && - getMaxDataBurstVol() == rhs.getMaxDataBurstVol())) && - - ((!reflectiveQosIsSet() && !rhs.reflectiveQosIsSet()) || - (reflectiveQosIsSet() && rhs.reflectiveQosIsSet() && - isReflectiveQos() == rhs.isReflectiveQos())) && - - ((!sharingKeyDlIsSet() && !rhs.sharingKeyDlIsSet()) || - (sharingKeyDlIsSet() && rhs.sharingKeyDlIsSet() && - getSharingKeyDl() == rhs.getSharingKeyDl())) && - - ((!sharingKeyUlIsSet() && !rhs.sharingKeyUlIsSet()) || - (sharingKeyUlIsSet() && rhs.sharingKeyUlIsSet() && - getSharingKeyUl() == rhs.getSharingKeyUl())) && - - ((!maxPacketLossRateDlIsSet() && !rhs.maxPacketLossRateDlIsSet()) || - (maxPacketLossRateDlIsSet() && rhs.maxPacketLossRateDlIsSet() && - getMaxPacketLossRateDl() == rhs.getMaxPacketLossRateDl())) && - - ((!maxPacketLossRateUlIsSet() && !rhs.maxPacketLossRateUlIsSet()) || - (maxPacketLossRateUlIsSet() && rhs.maxPacketLossRateUlIsSet() && - getMaxPacketLossRateUl() == rhs.getMaxPacketLossRateUl())) && - - ((!defQosFlowIndicationIsSet() && !rhs.defQosFlowIndicationIsSet()) || - (defQosFlowIndicationIsSet() && rhs.defQosFlowIndicationIsSet() && - isDefQosFlowIndication() == rhs.isDefQosFlowIndication())) && - - ((!extMaxDataBurstVolIsSet() && !rhs.extMaxDataBurstVolIsSet()) || - (extMaxDataBurstVolIsSet() && rhs.extMaxDataBurstVolIsSet() && - getExtMaxDataBurstVol() == rhs.getExtMaxDataBurstVol())) - - ; -} - -bool QosData::operator!=(const QosData& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const QosData& o) { - j = nlohmann::json(); - j["qosId"] = o.m_QosId; - if (o.r5qiIsSet()) j["5qi"] = o.m_r_5qi; - if (o.maxbrUlIsSet()) j["maxbrUl"] = o.m_MaxbrUl; - if (o.maxbrDlIsSet()) j["maxbrDl"] = o.m_MaxbrDl; - if (o.gbrUlIsSet()) j["gbrUl"] = o.m_GbrUl; - if (o.gbrDlIsSet()) j["gbrDl"] = o.m_GbrDl; - if (o.arpIsSet()) j["arp"] = o.m_Arp; - if (o.qncIsSet()) j["qnc"] = o.m_Qnc; - if (o.priorityLevelIsSet()) j["priorityLevel"] = o.m_PriorityLevel; - if (o.averWindowIsSet()) j["averWindow"] = o.m_AverWindow; - if (o.maxDataBurstVolIsSet()) j["maxDataBurstVol"] = o.m_MaxDataBurstVol; - if (o.reflectiveQosIsSet()) j["reflectiveQos"] = o.m_ReflectiveQos; - if (o.sharingKeyDlIsSet()) j["sharingKeyDl"] = o.m_SharingKeyDl; - if (o.sharingKeyUlIsSet()) j["sharingKeyUl"] = o.m_SharingKeyUl; - if (o.maxPacketLossRateDlIsSet()) - j["maxPacketLossRateDl"] = o.m_MaxPacketLossRateDl; - if (o.maxPacketLossRateUlIsSet()) - j["maxPacketLossRateUl"] = o.m_MaxPacketLossRateUl; - if (o.defQosFlowIndicationIsSet()) - j["defQosFlowIndication"] = o.m_DefQosFlowIndication; - if (o.extMaxDataBurstVolIsSet()) - j["extMaxDataBurstVol"] = o.m_ExtMaxDataBurstVol; -} - -void from_json(const nlohmann::json& j, QosData& o) { - if (j.find("qosId") != j.end()) { - j.at("qosId").get_to(o.m_QosId); - } - if (j.find("5qi") != j.end()) { - j.at("5qi").get_to(o.m_r_5qi); - o.m_r_5qiIsSet = true; - } - if (j.find("maxbrUl") != j.end()) { - j.at("maxbrUl").get_to(o.m_MaxbrUl); - o.m_MaxbrUlIsSet = true; - } - if (j.find("maxbrDl") != j.end()) { - j.at("maxbrDl").get_to(o.m_MaxbrDl); - o.m_MaxbrDlIsSet = true; - } - if (j.find("gbrUl") != j.end()) { - j.at("gbrUl").get_to(o.m_GbrUl); - o.m_GbrUlIsSet = true; - } - if (j.find("gbrDl") != j.end()) { - j.at("gbrDl").get_to(o.m_GbrDl); - o.m_GbrDlIsSet = true; - } - if (j.find("arp") != j.end()) { - j.at("arp").get_to(o.m_Arp); - o.m_ArpIsSet = true; - } - if (j.find("qnc") != j.end()) { - j.at("qnc").get_to(o.m_Qnc); - o.m_QncIsSet = true; - } - if (j.find("priorityLevel") != j.end()) { - j.at("priorityLevel").get_to(o.m_PriorityLevel); - o.m_PriorityLevelIsSet = true; - } - if (j.find("averWindow") != j.end()) { - j.at("averWindow").get_to(o.m_AverWindow); - o.m_AverWindowIsSet = true; - } - if (j.find("maxDataBurstVol") != j.end()) { - j.at("maxDataBurstVol").get_to(o.m_MaxDataBurstVol); - o.m_MaxDataBurstVolIsSet = true; - } - if (j.find("reflectiveQos") != j.end()) { - j.at("reflectiveQos").get_to(o.m_ReflectiveQos); - o.m_ReflectiveQosIsSet = true; - } - if (j.find("sharingKeyDl") != j.end()) { - j.at("sharingKeyDl").get_to(o.m_SharingKeyDl); - o.m_SharingKeyDlIsSet = true; - } - if (j.find("sharingKeyUl") != j.end()) { - j.at("sharingKeyUl").get_to(o.m_SharingKeyUl); - o.m_SharingKeyUlIsSet = true; - } - if (j.find("maxPacketLossRateDl") != j.end()) { - j.at("maxPacketLossRateDl").get_to(o.m_MaxPacketLossRateDl); - o.m_MaxPacketLossRateDlIsSet = true; - } - if (j.find("maxPacketLossRateUl") != j.end()) { - j.at("maxPacketLossRateUl").get_to(o.m_MaxPacketLossRateUl); - o.m_MaxPacketLossRateUlIsSet = true; - } - if (j.find("defQosFlowIndication") != j.end()) { - j.at("defQosFlowIndication").get_to(o.m_DefQosFlowIndication); - o.m_DefQosFlowIndicationIsSet = true; - } - if (j.find("extMaxDataBurstVol") != j.end()) { - j.at("extMaxDataBurstVol").get_to(o.m_ExtMaxDataBurstVol); - o.m_ExtMaxDataBurstVolIsSet = true; - } -} - -std::string QosData::getQosId() const { - return m_QosId; -} -void QosData::setQosId(std::string const& value) { - m_QosId = value; -} -int32_t QosData::getR5qi() const { - return m_r_5qi; -} -void QosData::setR5qi(int32_t const value) { - m_r_5qi = value; - m_r_5qiIsSet = true; -} -bool QosData::r5qiIsSet() const { - return m_r_5qiIsSet; -} -void QosData::unsetr_5qi() { - m_r_5qiIsSet = false; -} -std::string QosData::getMaxbrUl() const { - return m_MaxbrUl; -} -void QosData::setMaxbrUl(std::string const& value) { - m_MaxbrUl = value; - m_MaxbrUlIsSet = true; -} -bool QosData::maxbrUlIsSet() const { - return m_MaxbrUlIsSet; -} -void QosData::unsetMaxbrUl() { - m_MaxbrUlIsSet = false; -} -std::string QosData::getMaxbrDl() const { - return m_MaxbrDl; -} -void QosData::setMaxbrDl(std::string const& value) { - m_MaxbrDl = value; - m_MaxbrDlIsSet = true; -} -bool QosData::maxbrDlIsSet() const { - return m_MaxbrDlIsSet; -} -void QosData::unsetMaxbrDl() { - m_MaxbrDlIsSet = false; -} -std::string QosData::getGbrUl() const { - return m_GbrUl; -} -void QosData::setGbrUl(std::string const& value) { - m_GbrUl = value; - m_GbrUlIsSet = true; -} -bool QosData::gbrUlIsSet() const { - return m_GbrUlIsSet; -} -void QosData::unsetGbrUl() { - m_GbrUlIsSet = false; -} -std::string QosData::getGbrDl() const { - return m_GbrDl; -} -void QosData::setGbrDl(std::string const& value) { - m_GbrDl = value; - m_GbrDlIsSet = true; -} -bool QosData::gbrDlIsSet() const { - return m_GbrDlIsSet; -} -void QosData::unsetGbrDl() { - m_GbrDlIsSet = false; -} -Arp QosData::getArp() const { - return m_Arp; -} -void QosData::setArp(Arp const& value) { - m_Arp = value; - m_ArpIsSet = true; -} -bool QosData::arpIsSet() const { - return m_ArpIsSet; -} -void QosData::unsetArp() { - m_ArpIsSet = false; -} -bool QosData::isQnc() const { - return m_Qnc; -} -void QosData::setQnc(bool const value) { - m_Qnc = value; - m_QncIsSet = true; -} -bool QosData::qncIsSet() const { - return m_QncIsSet; -} -void QosData::unsetQnc() { - m_QncIsSet = false; -} -int32_t QosData::getPriorityLevel() const { - return m_PriorityLevel; -} -void QosData::setPriorityLevel(int32_t const value) { - m_PriorityLevel = value; - m_PriorityLevelIsSet = true; -} -bool QosData::priorityLevelIsSet() const { - return m_PriorityLevelIsSet; -} -void QosData::unsetPriorityLevel() { - m_PriorityLevelIsSet = false; -} -int32_t QosData::getAverWindow() const { - return m_AverWindow; -} -void QosData::setAverWindow(int32_t const value) { - m_AverWindow = value; - m_AverWindowIsSet = true; -} -bool QosData::averWindowIsSet() const { - return m_AverWindowIsSet; -} -void QosData::unsetAverWindow() { - m_AverWindowIsSet = false; -} -int32_t QosData::getMaxDataBurstVol() const { - return m_MaxDataBurstVol; -} -void QosData::setMaxDataBurstVol(int32_t const value) { - m_MaxDataBurstVol = value; - m_MaxDataBurstVolIsSet = true; -} -bool QosData::maxDataBurstVolIsSet() const { - return m_MaxDataBurstVolIsSet; -} -void QosData::unsetMaxDataBurstVol() { - m_MaxDataBurstVolIsSet = false; -} -bool QosData::isReflectiveQos() const { - return m_ReflectiveQos; -} -void QosData::setReflectiveQos(bool const value) { - m_ReflectiveQos = value; - m_ReflectiveQosIsSet = true; -} -bool QosData::reflectiveQosIsSet() const { - return m_ReflectiveQosIsSet; -} -void QosData::unsetReflectiveQos() { - m_ReflectiveQosIsSet = false; -} -std::string QosData::getSharingKeyDl() const { - return m_SharingKeyDl; -} -void QosData::setSharingKeyDl(std::string const& value) { - m_SharingKeyDl = value; - m_SharingKeyDlIsSet = true; -} -bool QosData::sharingKeyDlIsSet() const { - return m_SharingKeyDlIsSet; -} -void QosData::unsetSharingKeyDl() { - m_SharingKeyDlIsSet = false; -} -std::string QosData::getSharingKeyUl() const { - return m_SharingKeyUl; -} -void QosData::setSharingKeyUl(std::string const& value) { - m_SharingKeyUl = value; - m_SharingKeyUlIsSet = true; -} -bool QosData::sharingKeyUlIsSet() const { - return m_SharingKeyUlIsSet; -} -void QosData::unsetSharingKeyUl() { - m_SharingKeyUlIsSet = false; -} -int32_t QosData::getMaxPacketLossRateDl() const { - return m_MaxPacketLossRateDl; -} -void QosData::setMaxPacketLossRateDl(int32_t const value) { - m_MaxPacketLossRateDl = value; - m_MaxPacketLossRateDlIsSet = true; -} -bool QosData::maxPacketLossRateDlIsSet() const { - return m_MaxPacketLossRateDlIsSet; -} -void QosData::unsetMaxPacketLossRateDl() { - m_MaxPacketLossRateDlIsSet = false; -} -int32_t QosData::getMaxPacketLossRateUl() const { - return m_MaxPacketLossRateUl; -} -void QosData::setMaxPacketLossRateUl(int32_t const value) { - m_MaxPacketLossRateUl = value; - m_MaxPacketLossRateUlIsSet = true; -} -bool QosData::maxPacketLossRateUlIsSet() const { - return m_MaxPacketLossRateUlIsSet; -} -void QosData::unsetMaxPacketLossRateUl() { - m_MaxPacketLossRateUlIsSet = false; -} -bool QosData::isDefQosFlowIndication() const { - return m_DefQosFlowIndication; -} -void QosData::setDefQosFlowIndication(bool const value) { - m_DefQosFlowIndication = value; - m_DefQosFlowIndicationIsSet = true; -} -bool QosData::defQosFlowIndicationIsSet() const { - return m_DefQosFlowIndicationIsSet; -} -void QosData::unsetDefQosFlowIndication() { - m_DefQosFlowIndicationIsSet = false; -} -int32_t QosData::getExtMaxDataBurstVol() const { - return m_ExtMaxDataBurstVol; -} -void QosData::setExtMaxDataBurstVol(int32_t const value) { - m_ExtMaxDataBurstVol = value; - m_ExtMaxDataBurstVolIsSet = true; -} -bool QosData::extMaxDataBurstVolIsSet() const { - return m_ExtMaxDataBurstVolIsSet; -} -void QosData::unsetExtMaxDataBurstVol() { - m_ExtMaxDataBurstVolIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/QosData.h b/src/api-server/model/QosData.h deleted file mode 100644 index 81e9409e00101284754cb40e31f8d52b398e14b1..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosData.h +++ /dev/null @@ -1,241 +0,0 @@ -/** - * 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. - */ -/* - * QosData.h - * - * - */ - -#ifndef QosData_H_ -#define QosData_H_ - -#include <string> -#include "Arp.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class QosData { - const std::string BANDWIDTH_VALIDATION_REGEX = - R"(^\d+(\.\d+)? (bps|Kbps|Mbps|Gbps|Tbps)$)"; - - public: - QosData(); - virtual ~QosData() = 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 QosData& rhs) const; - bool operator!=(const QosData& rhs) const; - - ///////////////////////////////////////////// - /// QosData members - - /// <summary> - /// Univocally identifies the QoS control policy data within a PDU session. - /// </summary> - std::string getQosId() const; - void setQosId(std::string const& value); - /// <summary> - /// - /// </summary> - int32_t getR5qi() const; - void setR5qi(int32_t const value); - bool r5qiIsSet() const; - void unsetr_5qi(); - /// <summary> - /// - /// </summary> - std::string getMaxbrUl() const; - void setMaxbrUl(std::string const& value); - bool maxbrUlIsSet() const; - void unsetMaxbrUl(); - /// <summary> - /// - /// </summary> - std::string getMaxbrDl() const; - void setMaxbrDl(std::string const& value); - bool maxbrDlIsSet() const; - void unsetMaxbrDl(); - /// <summary> - /// - /// </summary> - std::string getGbrUl() const; - void setGbrUl(std::string const& value); - bool gbrUlIsSet() const; - void unsetGbrUl(); - /// <summary> - /// - /// </summary> - std::string getGbrDl() const; - void setGbrDl(std::string const& value); - bool gbrDlIsSet() const; - void unsetGbrDl(); - /// <summary> - /// - /// </summary> - oai::model::common::Arp getArp() const; - void setArp(oai::model::common::Arp const& value); - bool arpIsSet() const; - void unsetArp(); - /// <summary> - /// Indicates whether notifications are requested from 3GPP NG-RAN when the - /// GFBR can no longer (or again) be guaranteed for a QoS Flow during the - /// lifetime of the QoS Flow. - /// </summary> - bool isQnc() const; - void setQnc(bool const value); - bool qncIsSet() const; - void unsetQnc(); - /// <summary> - /// - /// </summary> - int32_t getPriorityLevel() const; - void setPriorityLevel(int32_t const value); - bool priorityLevelIsSet() const; - void unsetPriorityLevel(); - /// <summary> - /// - /// </summary> - int32_t getAverWindow() const; - void setAverWindow(int32_t const value); - bool averWindowIsSet() const; - void unsetAverWindow(); - /// <summary> - /// - /// </summary> - int32_t getMaxDataBurstVol() const; - void setMaxDataBurstVol(int32_t const value); - bool maxDataBurstVolIsSet() const; - void unsetMaxDataBurstVol(); - /// <summary> - /// Indicates whether the QoS information is reflective for the corresponding - /// service data flow. - /// </summary> - bool isReflectiveQos() const; - void setReflectiveQos(bool const value); - bool reflectiveQosIsSet() const; - void unsetReflectiveQos(); - /// <summary> - /// Indicates, by containing the same value, what PCC rules may share resource - /// in downlink direction. - /// </summary> - std::string getSharingKeyDl() const; - void setSharingKeyDl(std::string const& value); - bool sharingKeyDlIsSet() const; - void unsetSharingKeyDl(); - /// <summary> - /// Indicates, by containing the same value, what PCC rules may share resource - /// in uplink direction. - /// </summary> - std::string getSharingKeyUl() const; - void setSharingKeyUl(std::string const& value); - bool sharingKeyUlIsSet() const; - void unsetSharingKeyUl(); - /// <summary> - /// - /// </summary> - int32_t getMaxPacketLossRateDl() const; - void setMaxPacketLossRateDl(int32_t const value); - bool maxPacketLossRateDlIsSet() const; - void unsetMaxPacketLossRateDl(); - /// <summary> - /// - /// </summary> - int32_t getMaxPacketLossRateUl() const; - void setMaxPacketLossRateUl(int32_t const value); - bool maxPacketLossRateUlIsSet() const; - void unsetMaxPacketLossRateUl(); - /// <summary> - /// Indicates that the dynamic PCC rule shall always have its binding with the - /// QoS Flow associated with the default QoS rule - /// </summary> - bool isDefQosFlowIndication() const; - void setDefQosFlowIndication(bool const value); - bool defQosFlowIndicationIsSet() const; - void unsetDefQosFlowIndication(); - /// <summary> - /// - /// </summary> - int32_t getExtMaxDataBurstVol() const; - void setExtMaxDataBurstVol(int32_t const value); - bool extMaxDataBurstVolIsSet() const; - void unsetExtMaxDataBurstVol(); - - friend void to_json(nlohmann::json& j, const QosData& o); - friend void from_json(const nlohmann::json& j, QosData& o); - - protected: - std::string m_QosId; - - int32_t m_r_5qi; - bool m_r_5qiIsSet; - std::string m_MaxbrUl; - bool m_MaxbrUlIsSet; - std::string m_MaxbrDl; - bool m_MaxbrDlIsSet; - std::string m_GbrUl; - bool m_GbrUlIsSet; - std::string m_GbrDl; - bool m_GbrDlIsSet; - oai::model::common::Arp m_Arp; - bool m_ArpIsSet; - bool m_Qnc; - bool m_QncIsSet; - int32_t m_PriorityLevel; - bool m_PriorityLevelIsSet; - int32_t m_AverWindow; - bool m_AverWindowIsSet; - int32_t m_MaxDataBurstVol; - bool m_MaxDataBurstVolIsSet; - bool m_ReflectiveQos; - bool m_ReflectiveQosIsSet; - std::string m_SharingKeyDl; - bool m_SharingKeyDlIsSet; - std::string m_SharingKeyUl; - bool m_SharingKeyUlIsSet; - int32_t m_MaxPacketLossRateDl; - bool m_MaxPacketLossRateDlIsSet; - int32_t m_MaxPacketLossRateUl; - bool m_MaxPacketLossRateUlIsSet; - bool m_DefQosFlowIndication; - bool m_DefQosFlowIndicationIsSet; - int32_t m_ExtMaxDataBurstVol; - bool m_ExtMaxDataBurstVolIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* QosData_H_ */ diff --git a/src/api-server/model/QosFlowUsage.cpp b/src/api-server/model/QosFlowUsage.cpp deleted file mode 100644 index 79d0a00844c7727ea83edbb71c9a53ec53098b77..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosFlowUsage.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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 "QosFlowUsage.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -QosFlowUsage::QosFlowUsage() {} - -void QosFlowUsage::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool QosFlowUsage::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool QosFlowUsage::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "QosFlowUsage" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool QosFlowUsage::operator==(const QosFlowUsage& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool QosFlowUsage::operator!=(const QosFlowUsage& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const QosFlowUsage& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, QosFlowUsage& o) { - from_json(j, o.m_value); -} - -QosFlowUsage_anyOf QosFlowUsage::getValue() const { - return m_value; -} - -void QosFlowUsage::setValue(QosFlowUsage_anyOf value) { - m_value = value; -} - -QosFlowUsage_anyOf::eQosFlowUsage_anyOf QosFlowUsage::getEnumValue() const { - return m_value.getValue(); -} - -void QosFlowUsage::setEnumValue(QosFlowUsage_anyOf::eQosFlowUsage_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/QosFlowUsage.h b/src/api-server/model/QosFlowUsage.h deleted file mode 100644 index a5913d38da220ddae076f90b8921b3a1692f94bd..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosFlowUsage.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - * 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. - */ -/* - * QosFlowUsage.h - * - * Possible values are - GENERAL: Indicate no specific QoS flow usage - * information is available. - IMS_SIG: Indicate that the QoS flow is used for - * IMS signalling only. - */ - -#ifndef QosFlowUsage_H_ -#define QosFlowUsage_H_ - -#include "QosFlowUsage_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// Possible values are - GENERAL: Indicate no specific QoS flow usage -/// information is available. - IMS_SIG: Indicate that the QoS flow is used for -/// IMS signalling only. -/// </summary> -class QosFlowUsage { - public: - QosFlowUsage(); - virtual ~QosFlowUsage() = 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 QosFlowUsage& rhs) const; - bool operator!=(const QosFlowUsage& rhs) const; - - ///////////////////////////////////////////// - /// QosFlowUsage members - - QosFlowUsage_anyOf getValue() const; - void setValue(QosFlowUsage_anyOf value); - QosFlowUsage_anyOf::eQosFlowUsage_anyOf getEnumValue() const; - void setEnumValue(QosFlowUsage_anyOf::eQosFlowUsage_anyOf value); - friend void to_json(nlohmann::json& j, const QosFlowUsage& o); - friend void from_json(const nlohmann::json& j, QosFlowUsage& o); - friend void to_json(nlohmann::json& j, const QosFlowUsage_anyOf& o); - friend void from_json(const nlohmann::json& j, QosFlowUsage_anyOf& o); - - protected: - QosFlowUsage_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* QosFlowUsage_H_ */ diff --git a/src/api-server/model/QosFlowUsage_anyOf.cpp b/src/api-server/model/QosFlowUsage_anyOf.cpp deleted file mode 100644 index 8d59bb791b5e7ce6af8d0a5e6f5897a3e339d57b..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosFlowUsage_anyOf.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/** - * 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 "QosFlowUsage_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -QosFlowUsage_anyOf::QosFlowUsage_anyOf() {} - -void QosFlowUsage_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool QosFlowUsage_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool QosFlowUsage_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "QosFlowUsage_anyOf" : pathPrefix; - - if (m_value == QosFlowUsage_anyOf::eQosFlowUsage_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool QosFlowUsage_anyOf::operator==(const QosFlowUsage_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool QosFlowUsage_anyOf::operator!=(const QosFlowUsage_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const QosFlowUsage_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case QosFlowUsage_anyOf::eQosFlowUsage_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case QosFlowUsage_anyOf::eQosFlowUsage_anyOf::GENERAL: - j = "GENERAL"; - break; - case QosFlowUsage_anyOf::eQosFlowUsage_anyOf::IMS_SIG: - j = "IMS_SIG"; - break; - } -} - -void from_json(const nlohmann::json& j, QosFlowUsage_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "GENERAL") { - o.setValue(QosFlowUsage_anyOf::eQosFlowUsage_anyOf::GENERAL); - } else if (s == "IMS_SIG") { - o.setValue(QosFlowUsage_anyOf::eQosFlowUsage_anyOf::IMS_SIG); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " QosFlowUsage_anyOf::eQosFlowUsage_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -QosFlowUsage_anyOf::eQosFlowUsage_anyOf QosFlowUsage_anyOf::getValue() const { - return m_value; -} -void QosFlowUsage_anyOf::setValue( - QosFlowUsage_anyOf::eQosFlowUsage_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/QosFlowUsage_anyOf.h b/src/api-server/model/QosFlowUsage_anyOf.h deleted file mode 100644 index 7838491863f69a748a651fd6b59eaf555ae21fc0..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosFlowUsage_anyOf.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 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. - */ -/* - * QosFlowUsage_anyOf.h - * - * - */ - -#ifndef QosFlowUsage_anyOf_H_ -#define QosFlowUsage_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class QosFlowUsage_anyOf { - public: - QosFlowUsage_anyOf(); - virtual ~QosFlowUsage_anyOf() = default; - - enum class eQosFlowUsage_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - GENERAL, - IMS_SIG - }; - - /// <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 QosFlowUsage_anyOf& rhs) const; - bool operator!=(const QosFlowUsage_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// QosFlowUsage_anyOf members - - QosFlowUsage_anyOf::eQosFlowUsage_anyOf getValue() const; - void setValue(QosFlowUsage_anyOf::eQosFlowUsage_anyOf value); - - friend void to_json(nlohmann::json& j, const QosFlowUsage_anyOf& o); - friend void from_json(const nlohmann::json& j, QosFlowUsage_anyOf& o); - - protected: - QosFlowUsage_anyOf::eQosFlowUsage_anyOf m_value = - QosFlowUsage_anyOf::eQosFlowUsage_anyOf::INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* QosFlowUsage_anyOf_H_ */ diff --git a/src/api-server/model/QosMonitoringData.cpp b/src/api-server/model/QosMonitoringData.cpp deleted file mode 100644 index 4dc103bbcae2182b49027ca68613ce8d10f0adea..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosMonitoringData.cpp +++ /dev/null @@ -1,347 +0,0 @@ -/** - * 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 "QosMonitoringData.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -QosMonitoringData::QosMonitoringData() { - m_QmId = ""; - m_ReqQosMonParamsIsSet = false; - m_RepFreqsIsSet = false; - m_RepThreshDl = 0; - m_RepThreshDlIsSet = false; - m_RepThreshUl = 0; - m_RepThreshUlIsSet = false; - m_RepThreshRp = 0; - m_RepThreshRpIsSet = false; - m_WaitTime = 0; - m_WaitTimeIsSet = false; - m_RepPeriod = 0; - m_RepPeriodIsSet = false; - m_NotifyUri = ""; - m_NotifyUriIsSet = false; - m_NotifyCorreId = ""; - m_NotifyCorreIdIsSet = false; -} - -void QosMonitoringData::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool QosMonitoringData::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool QosMonitoringData::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "QosMonitoringData" : pathPrefix; - - if (reqQosMonParamsIsSet()) { - const std::vector<RequestedQosMonitoringParameter>& value = - m_ReqQosMonParams; - const std::string currentValuePath = _pathPrefix + ".reqQosMonParams"; - - if (value.size() < 1) { - success = false; - msg << currentValuePath << ": must have at least 1 elements;"; - } - if (value.size() > 3) { - success = false; - msg << currentValuePath << ": must have at most 3 elements;"; - } - { // Recursive validation of array elements - const std::string oldValuePath = currentValuePath; - int i = 0; - for (const RequestedQosMonitoringParameter& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".reqQosMonParams") && - success; - - i++; - } - } - } - - if (repFreqsIsSet()) { - const std::vector<ReportingFrequency>& value = m_RepFreqs; - const std::string currentValuePath = _pathPrefix + ".repFreqs"; - - 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 ReportingFrequency& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = - value.validate(msg, currentValuePath + ".repFreqs") && success; - - i++; - } - } - } - - return success; -} - -bool QosMonitoringData::operator==(const QosMonitoringData& rhs) const { - return - - (getQmId() == rhs.getQmId()) && - - ((!reqQosMonParamsIsSet() && !rhs.reqQosMonParamsIsSet()) || - (reqQosMonParamsIsSet() && rhs.reqQosMonParamsIsSet() && - getReqQosMonParams() == rhs.getReqQosMonParams())) && - - ((!repFreqsIsSet() && !rhs.repFreqsIsSet()) || - (repFreqsIsSet() && rhs.repFreqsIsSet() && - getRepFreqs() == rhs.getRepFreqs())) && - - ((!repThreshDlIsSet() && !rhs.repThreshDlIsSet()) || - (repThreshDlIsSet() && rhs.repThreshDlIsSet() && - getRepThreshDl() == rhs.getRepThreshDl())) && - - ((!repThreshUlIsSet() && !rhs.repThreshUlIsSet()) || - (repThreshUlIsSet() && rhs.repThreshUlIsSet() && - getRepThreshUl() == rhs.getRepThreshUl())) && - - ((!repThreshRpIsSet() && !rhs.repThreshRpIsSet()) || - (repThreshRpIsSet() && rhs.repThreshRpIsSet() && - getRepThreshRp() == rhs.getRepThreshRp())) && - - ((!waitTimeIsSet() && !rhs.waitTimeIsSet()) || - (waitTimeIsSet() && rhs.waitTimeIsSet() && - getWaitTime() == rhs.getWaitTime())) && - - ((!repPeriodIsSet() && !rhs.repPeriodIsSet()) || - (repPeriodIsSet() && rhs.repPeriodIsSet() && - getRepPeriod() == rhs.getRepPeriod())) && - - ((!notifyUriIsSet() && !rhs.notifyUriIsSet()) || - (notifyUriIsSet() && rhs.notifyUriIsSet() && - getNotifyUri() == rhs.getNotifyUri())) && - - ((!notifyCorreIdIsSet() && !rhs.notifyCorreIdIsSet()) || - (notifyCorreIdIsSet() && rhs.notifyCorreIdIsSet() && - getNotifyCorreId() == rhs.getNotifyCorreId())) - - ; -} - -bool QosMonitoringData::operator!=(const QosMonitoringData& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const QosMonitoringData& o) { - j = nlohmann::json(); - j["qmId"] = o.m_QmId; - if (o.reqQosMonParamsIsSet() || !o.m_ReqQosMonParams.empty()) - j["reqQosMonParams"] = o.m_ReqQosMonParams; - if (o.repFreqsIsSet() || !o.m_RepFreqs.empty()) j["repFreqs"] = o.m_RepFreqs; - if (o.repThreshDlIsSet()) j["repThreshDl"] = o.m_RepThreshDl; - if (o.repThreshUlIsSet()) j["repThreshUl"] = o.m_RepThreshUl; - if (o.repThreshRpIsSet()) j["repThreshRp"] = o.m_RepThreshRp; - if (o.waitTimeIsSet()) j["waitTime"] = o.m_WaitTime; - if (o.repPeriodIsSet()) j["repPeriod"] = o.m_RepPeriod; - if (o.notifyUriIsSet()) j["notifyUri"] = o.m_NotifyUri; - if (o.notifyCorreIdIsSet()) j["notifyCorreId"] = o.m_NotifyCorreId; -} - -void from_json(const nlohmann::json& j, QosMonitoringData& o) { - j.at("qmId").get_to(o.m_QmId); - if (j.find("reqQosMonParams") != j.end()) { - j.at("reqQosMonParams").get_to(o.m_ReqQosMonParams); - o.m_ReqQosMonParamsIsSet = true; - } - if (j.find("repFreqs") != j.end()) { - j.at("repFreqs").get_to(o.m_RepFreqs); - o.m_RepFreqsIsSet = true; - } - if (j.find("repThreshDl") != j.end()) { - j.at("repThreshDl").get_to(o.m_RepThreshDl); - o.m_RepThreshDlIsSet = true; - } - if (j.find("repThreshUl") != j.end()) { - j.at("repThreshUl").get_to(o.m_RepThreshUl); - o.m_RepThreshUlIsSet = true; - } - if (j.find("repThreshRp") != j.end()) { - j.at("repThreshRp").get_to(o.m_RepThreshRp); - o.m_RepThreshRpIsSet = true; - } - if (j.find("waitTime") != j.end()) { - j.at("waitTime").get_to(o.m_WaitTime); - o.m_WaitTimeIsSet = true; - } - if (j.find("repPeriod") != j.end()) { - j.at("repPeriod").get_to(o.m_RepPeriod); - o.m_RepPeriodIsSet = true; - } - if (j.find("notifyUri") != j.end()) { - j.at("notifyUri").get_to(o.m_NotifyUri); - o.m_NotifyUriIsSet = true; - } - if (j.find("notifyCorreId") != j.end()) { - j.at("notifyCorreId").get_to(o.m_NotifyCorreId); - o.m_NotifyCorreIdIsSet = true; - } -} - -std::string QosMonitoringData::getQmId() const { - return m_QmId; -} -void QosMonitoringData::setQmId(std::string const& value) { - m_QmId = value; -} -std::vector<RequestedQosMonitoringParameter> -QosMonitoringData::getReqQosMonParams() const { - return m_ReqQosMonParams; -} -void QosMonitoringData::setReqQosMonParams( - std::vector<RequestedQosMonitoringParameter> const& value) { - m_ReqQosMonParams = value; - m_ReqQosMonParamsIsSet = true; -} -bool QosMonitoringData::reqQosMonParamsIsSet() const { - return m_ReqQosMonParamsIsSet; -} -void QosMonitoringData::unsetReqQosMonParams() { - m_ReqQosMonParamsIsSet = false; -} -std::vector<ReportingFrequency> QosMonitoringData::getRepFreqs() const { - return m_RepFreqs; -} -void QosMonitoringData::setRepFreqs( - std::vector<ReportingFrequency> const& value) { - m_RepFreqs = value; - m_RepFreqsIsSet = true; -} -bool QosMonitoringData::repFreqsIsSet() const { - return m_RepFreqsIsSet; -} -void QosMonitoringData::unsetRepFreqs() { - m_RepFreqsIsSet = false; -} -int32_t QosMonitoringData::getRepThreshDl() const { - return m_RepThreshDl; -} -void QosMonitoringData::setRepThreshDl(int32_t const value) { - m_RepThreshDl = value; - m_RepThreshDlIsSet = true; -} -bool QosMonitoringData::repThreshDlIsSet() const { - return m_RepThreshDlIsSet; -} -void QosMonitoringData::unsetRepThreshDl() { - m_RepThreshDlIsSet = false; -} -int32_t QosMonitoringData::getRepThreshUl() const { - return m_RepThreshUl; -} -void QosMonitoringData::setRepThreshUl(int32_t const value) { - m_RepThreshUl = value; - m_RepThreshUlIsSet = true; -} -bool QosMonitoringData::repThreshUlIsSet() const { - return m_RepThreshUlIsSet; -} -void QosMonitoringData::unsetRepThreshUl() { - m_RepThreshUlIsSet = false; -} -int32_t QosMonitoringData::getRepThreshRp() const { - return m_RepThreshRp; -} -void QosMonitoringData::setRepThreshRp(int32_t const value) { - m_RepThreshRp = value; - m_RepThreshRpIsSet = true; -} -bool QosMonitoringData::repThreshRpIsSet() const { - return m_RepThreshRpIsSet; -} -void QosMonitoringData::unsetRepThreshRp() { - m_RepThreshRpIsSet = false; -} -int32_t QosMonitoringData::getWaitTime() const { - return m_WaitTime; -} -void QosMonitoringData::setWaitTime(int32_t const value) { - m_WaitTime = value; - m_WaitTimeIsSet = true; -} -bool QosMonitoringData::waitTimeIsSet() const { - return m_WaitTimeIsSet; -} -void QosMonitoringData::unsetWaitTime() { - m_WaitTimeIsSet = false; -} -int32_t QosMonitoringData::getRepPeriod() const { - return m_RepPeriod; -} -void QosMonitoringData::setRepPeriod(int32_t const value) { - m_RepPeriod = value; - m_RepPeriodIsSet = true; -} -bool QosMonitoringData::repPeriodIsSet() const { - return m_RepPeriodIsSet; -} -void QosMonitoringData::unsetRepPeriod() { - m_RepPeriodIsSet = false; -} -std::string QosMonitoringData::getNotifyUri() const { - return m_NotifyUri; -} -void QosMonitoringData::setNotifyUri(std::string const& value) { - m_NotifyUri = value; - m_NotifyUriIsSet = true; -} -bool QosMonitoringData::notifyUriIsSet() const { - return m_NotifyUriIsSet; -} -void QosMonitoringData::unsetNotifyUri() { - m_NotifyUriIsSet = false; -} -std::string QosMonitoringData::getNotifyCorreId() const { - return m_NotifyCorreId; -} -void QosMonitoringData::setNotifyCorreId(std::string const& value) { - m_NotifyCorreId = value; - m_NotifyCorreIdIsSet = true; -} -bool QosMonitoringData::notifyCorreIdIsSet() const { - return m_NotifyCorreIdIsSet; -} -void QosMonitoringData::unsetNotifyCorreId() { - m_NotifyCorreIdIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/QosMonitoringData.h b/src/api-server/model/QosMonitoringData.h deleted file mode 100644 index f85f9d4163d23ab04aca9329353d5cd69b0f89b1..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosMonitoringData.h +++ /dev/null @@ -1,168 +0,0 @@ -/** - * 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. - */ -/* - * QosMonitoringData.h - * - * - */ - -#ifndef QosMonitoringData_H_ -#define QosMonitoringData_H_ - -#include "ReportingFrequency.h" -#include "RequestedQosMonitoringParameter.h" -#include <string> -#include <vector> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class QosMonitoringData { - public: - QosMonitoringData(); - virtual ~QosMonitoringData() = 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 QosMonitoringData& rhs) const; - bool operator!=(const QosMonitoringData& rhs) const; - - ///////////////////////////////////////////// - /// QosMonitoringData members - - /// <summary> - /// Univocally identifies the QoS monitoring policy data within a PDU session. - /// </summary> - std::string getQmId() const; - void setQmId(std::string const& value); - /// <summary> - /// indicates the UL packet delay, DL packet delay and/or round trip packet - /// delay between the UE and the UPF is to be monitored when the QoS - /// Monitoring for URLLC is enabled for the service data flow.. - /// </summary> - std::vector<RequestedQosMonitoringParameter> getReqQosMonParams() const; - void setReqQosMonParams( - std::vector<RequestedQosMonitoringParameter> const& value); - bool reqQosMonParamsIsSet() const; - void unsetReqQosMonParams(); - /// <summary> - /// - /// </summary> - std::vector<ReportingFrequency> getRepFreqs() const; - void setRepFreqs(std::vector<ReportingFrequency> const& value); - bool repFreqsIsSet() const; - void unsetRepFreqs(); - /// <summary> - /// Unsigned integer identifying a period of time in units of miliiseconds for - /// DL packet delay. - /// </summary> - int32_t getRepThreshDl() const; - void setRepThreshDl(int32_t const value); - bool repThreshDlIsSet() const; - void unsetRepThreshDl(); - /// <summary> - /// Unsigned integer identifying a period of time in units of miliiseconds for - /// UL packet delay. - /// </summary> - int32_t getRepThreshUl() const; - void setRepThreshUl(int32_t const value); - bool repThreshUlIsSet() const; - void unsetRepThreshUl(); - /// <summary> - /// Unsigned integer identifying a period of time in units of miliiseconds for - /// round trip packet delay. - /// </summary> - int32_t getRepThreshRp() const; - void setRepThreshRp(int32_t const value); - bool repThreshRpIsSet() const; - void unsetRepThreshRp(); - /// <summary> - /// - /// </summary> - int32_t getWaitTime() const; - void setWaitTime(int32_t const value); - bool waitTimeIsSet() const; - void unsetWaitTime(); - /// <summary> - /// - /// </summary> - int32_t getRepPeriod() const; - void setRepPeriod(int32_t const value); - bool repPeriodIsSet() const; - void unsetRepPeriod(); - /// <summary> - /// - /// </summary> - std::string getNotifyUri() const; - void setNotifyUri(std::string const& value); - bool notifyUriIsSet() const; - void unsetNotifyUri(); - /// <summary> - /// - /// </summary> - std::string getNotifyCorreId() const; - void setNotifyCorreId(std::string const& value); - bool notifyCorreIdIsSet() const; - void unsetNotifyCorreId(); - - friend void to_json(nlohmann::json& j, const QosMonitoringData& o); - friend void from_json(const nlohmann::json& j, QosMonitoringData& o); - - protected: - std::string m_QmId; - - std::vector<RequestedQosMonitoringParameter> m_ReqQosMonParams; - bool m_ReqQosMonParamsIsSet; - std::vector<ReportingFrequency> m_RepFreqs; - bool m_RepFreqsIsSet; - int32_t m_RepThreshDl; - bool m_RepThreshDlIsSet; - int32_t m_RepThreshUl; - bool m_RepThreshUlIsSet; - int32_t m_RepThreshRp; - bool m_RepThreshRpIsSet; - int32_t m_WaitTime; - bool m_WaitTimeIsSet; - int32_t m_RepPeriod; - bool m_RepPeriodIsSet; - std::string m_NotifyUri; - bool m_NotifyUriIsSet; - std::string m_NotifyCorreId; - bool m_NotifyCorreIdIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* QosMonitoringData_H_ */ diff --git a/src/api-server/model/QosMonitoringReport.cpp b/src/api-server/model/QosMonitoringReport.cpp deleted file mode 100644 index aeda559a965b5c0c9ef65eef0dcbd7bb1321604f..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosMonitoringReport.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/** - * 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 "QosMonitoringReport.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -QosMonitoringReport::QosMonitoringReport() { - m_UlDelaysIsSet = false; - m_DlDelaysIsSet = false; - m_RtDelaysIsSet = false; -} - -void QosMonitoringReport::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool QosMonitoringReport::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool QosMonitoringReport::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "QosMonitoringReport" : pathPrefix; - - /* RefPccRuleIds */ { - 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++; - } - } - */ - } - /* - if (ulDelaysIsSet()) { - const std::vector<int32_t>& value = m_UlDelays; - const std::string currentValuePath = _pathPrefix + ".ulDelays"; - - { // Recursive validation of array elements - const std::string oldValuePath = currentValuePath; - int i = 0; - for (const int32_t& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - i++; - } - } - } - - if (dlDelaysIsSet()) { - const std::vector<int32_t>& value = m_DlDelays; - const std::string currentValuePath = _pathPrefix + ".dlDelays"; - - { // Recursive validation of array elements - const std::string oldValuePath = currentValuePath; - int i = 0; - for (const int32_t& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - i++; - } - } - } - - if (rtDelaysIsSet()) { - const std::vector<int32_t>& value = m_RtDelays; - const std::string currentValuePath = _pathPrefix + ".rtDelays"; - - { // Recursive validation of array elements - const std::string oldValuePath = currentValuePath; - int i = 0; - for (const int32_t& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - i++; - } - } - } - */ - - return success; -} - -bool QosMonitoringReport::operator==(const QosMonitoringReport& rhs) const { - return - - (getRefPccRuleIds() == rhs.getRefPccRuleIds()) && - - ((!ulDelaysIsSet() && !rhs.ulDelaysIsSet()) || - (ulDelaysIsSet() && rhs.ulDelaysIsSet() && - getUlDelays() == rhs.getUlDelays())) && - - ((!dlDelaysIsSet() && !rhs.dlDelaysIsSet()) || - (dlDelaysIsSet() && rhs.dlDelaysIsSet() && - getDlDelays() == rhs.getDlDelays())) && - - ((!rtDelaysIsSet() && !rhs.rtDelaysIsSet()) || - (rtDelaysIsSet() && rhs.rtDelaysIsSet() && - getRtDelays() == rhs.getRtDelays())) - - ; -} - -bool QosMonitoringReport::operator!=(const QosMonitoringReport& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const QosMonitoringReport& o) { - j = nlohmann::json(); - j["refPccRuleIds"] = o.m_RefPccRuleIds; - if (o.ulDelaysIsSet() || !o.m_UlDelays.empty()) j["ulDelays"] = o.m_UlDelays; - if (o.dlDelaysIsSet() || !o.m_DlDelays.empty()) j["dlDelays"] = o.m_DlDelays; - if (o.rtDelaysIsSet() || !o.m_RtDelays.empty()) j["rtDelays"] = o.m_RtDelays; -} - -void from_json(const nlohmann::json& j, QosMonitoringReport& o) { - j.at("refPccRuleIds").get_to(o.m_RefPccRuleIds); - if (j.find("ulDelays") != j.end()) { - j.at("ulDelays").get_to(o.m_UlDelays); - o.m_UlDelaysIsSet = true; - } - if (j.find("dlDelays") != j.end()) { - j.at("dlDelays").get_to(o.m_DlDelays); - o.m_DlDelaysIsSet = true; - } - if (j.find("rtDelays") != j.end()) { - j.at("rtDelays").get_to(o.m_RtDelays); - o.m_RtDelaysIsSet = true; - } -} - -std::vector<std::string> QosMonitoringReport::getRefPccRuleIds() const { - return m_RefPccRuleIds; -} -void QosMonitoringReport::setRefPccRuleIds( - std::vector<std::string> const& value) { - m_RefPccRuleIds = value; -} -std::vector<int32_t> QosMonitoringReport::getUlDelays() const { - return m_UlDelays; -} -void QosMonitoringReport::setUlDelays(std::vector<int32_t> const value) { - m_UlDelays = value; - m_UlDelaysIsSet = true; -} -bool QosMonitoringReport::ulDelaysIsSet() const { - return m_UlDelaysIsSet; -} -void QosMonitoringReport::unsetUlDelays() { - m_UlDelaysIsSet = false; -} -std::vector<int32_t> QosMonitoringReport::getDlDelays() const { - return m_DlDelays; -} -void QosMonitoringReport::setDlDelays(std::vector<int32_t> const value) { - m_DlDelays = value; - m_DlDelaysIsSet = true; -} -bool QosMonitoringReport::dlDelaysIsSet() const { - return m_DlDelaysIsSet; -} -void QosMonitoringReport::unsetDlDelays() { - m_DlDelaysIsSet = false; -} -std::vector<int32_t> QosMonitoringReport::getRtDelays() const { - return m_RtDelays; -} -void QosMonitoringReport::setRtDelays(std::vector<int32_t> const value) { - m_RtDelays = value; - m_RtDelaysIsSet = true; -} -bool QosMonitoringReport::rtDelaysIsSet() const { - return m_RtDelaysIsSet; -} -void QosMonitoringReport::unsetRtDelays() { - m_RtDelaysIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/QosMonitoringReport.h b/src/api-server/model/QosMonitoringReport.h deleted file mode 100644 index 8b2cb1e3c1c86a1c9748f27ac0ea92ccd089ed06..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosMonitoringReport.h +++ /dev/null @@ -1,107 +0,0 @@ -/** - * 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. - */ -/* - * QosMonitoringReport.h - * - * - */ - -#ifndef QosMonitoringReport_H_ -#define QosMonitoringReport_H_ - -#include <string> -#include <vector> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class QosMonitoringReport { - public: - QosMonitoringReport(); - virtual ~QosMonitoringReport() = 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 QosMonitoringReport& rhs) const; - bool operator!=(const QosMonitoringReport& rhs) const; - - ///////////////////////////////////////////// - /// QosMonitoringReport members - - /// <summary> - /// An array of PCC rule id references to the PCC rules associated with the - /// QoS monitoring report. - /// </summary> - std::vector<std::string> getRefPccRuleIds() const; - void setRefPccRuleIds(std::vector<std::string> const& value); - /// <summary> - /// - /// </summary> - std::vector<int32_t> getUlDelays() const; - void setUlDelays(std::vector<int32_t> const value); - bool ulDelaysIsSet() const; - void unsetUlDelays(); - /// <summary> - /// - /// </summary> - std::vector<int32_t> getDlDelays() const; - void setDlDelays(std::vector<int32_t> const value); - bool dlDelaysIsSet() const; - void unsetDlDelays(); - /// <summary> - /// - /// </summary> - std::vector<int32_t> getRtDelays() const; - void setRtDelays(std::vector<int32_t> const value); - bool rtDelaysIsSet() const; - void unsetRtDelays(); - - friend void to_json(nlohmann::json& j, const QosMonitoringReport& o); - friend void from_json(const nlohmann::json& j, QosMonitoringReport& o); - - protected: - std::vector<std::string> m_RefPccRuleIds; - - std::vector<int32_t> m_UlDelays; - bool m_UlDelaysIsSet; - std::vector<int32_t> m_DlDelays; - bool m_DlDelaysIsSet; - std::vector<int32_t> m_RtDelays; - bool m_RtDelaysIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* QosMonitoringReport_H_ */ diff --git a/src/api-server/model/QosNotifType.cpp b/src/api-server/model/QosNotifType.cpp deleted file mode 100644 index f2aa980efc865a9577c07c48de5304d20cd9a67a..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosNotifType.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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 "QosNotifType.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -QosNotifType::QosNotifType() {} - -void QosNotifType::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool QosNotifType::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool QosNotifType::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "QosNotifType" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool QosNotifType::operator==(const QosNotifType& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool QosNotifType::operator!=(const QosNotifType& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const QosNotifType& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, QosNotifType& o) { - from_json(j, o.m_value); -} - -QosNotifType_anyOf QosNotifType::getValue() const { - return m_value; -} - -void QosNotifType::setValue(QosNotifType_anyOf value) { - m_value = value; -} - -QosNotifType_anyOf::eQosNotifType_anyOf QosNotifType::getEnumValue() const { - return m_value.getValue(); -} - -void QosNotifType::setEnumValue(QosNotifType_anyOf::eQosNotifType_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/QosNotifType.h b/src/api-server/model/QosNotifType.h deleted file mode 100644 index b20df501c85fc34dc50365c861c5f88ac67ef555..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosNotifType.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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. - */ -/* - * QosNotifType.h - * - * - */ - -#ifndef QosNotifType_H_ -#define QosNotifType_H_ - -#include "QosNotifType_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class QosNotifType { - public: - QosNotifType(); - virtual ~QosNotifType() = 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 QosNotifType& rhs) const; - bool operator!=(const QosNotifType& rhs) const; - - ///////////////////////////////////////////// - /// QosNotifType members - - QosNotifType_anyOf getValue() const; - void setValue(QosNotifType_anyOf value); - QosNotifType_anyOf::eQosNotifType_anyOf getEnumValue() const; - void setEnumValue(QosNotifType_anyOf::eQosNotifType_anyOf value); - friend void to_json(nlohmann::json& j, const QosNotifType& o); - friend void from_json(const nlohmann::json& j, QosNotifType& o); - friend void to_json(nlohmann::json& j, const QosNotifType_anyOf& o); - friend void from_json(const nlohmann::json& j, QosNotifType_anyOf& o); - - protected: - QosNotifType_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* QosNotifType_H_ */ diff --git a/src/api-server/model/QosNotifType_anyOf.cpp b/src/api-server/model/QosNotifType_anyOf.cpp deleted file mode 100644 index f3782c64589873ae02c273c5c04bceee0feafadf..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosNotifType_anyOf.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/** - * 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 "QosNotifType_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -QosNotifType_anyOf::QosNotifType_anyOf() {} - -void QosNotifType_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool QosNotifType_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool QosNotifType_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "QosNotifType_anyOf" : pathPrefix; - - if (m_value == QosNotifType_anyOf::eQosNotifType_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool QosNotifType_anyOf::operator==(const QosNotifType_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool QosNotifType_anyOf::operator!=(const QosNotifType_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const QosNotifType_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case QosNotifType_anyOf::eQosNotifType_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case QosNotifType_anyOf::eQosNotifType_anyOf::GUARANTEED: - j = "GUARANTEED"; - break; - case QosNotifType_anyOf::eQosNotifType_anyOf::NOT_GUARANTEED: - j = "NOT_GUARANTEED"; - break; - } -} - -void from_json(const nlohmann::json& j, QosNotifType_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "GUARANTEED") { - o.setValue(QosNotifType_anyOf::eQosNotifType_anyOf::GUARANTEED); - } else if (s == "NOT_GUARANTEED") { - o.setValue(QosNotifType_anyOf::eQosNotifType_anyOf::NOT_GUARANTEED); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " QosNotifType_anyOf::eQosNotifType_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -QosNotifType_anyOf::eQosNotifType_anyOf QosNotifType_anyOf::getValue() const { - return m_value; -} -void QosNotifType_anyOf::setValue( - QosNotifType_anyOf::eQosNotifType_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/QosNotifType_anyOf.h b/src/api-server/model/QosNotifType_anyOf.h deleted file mode 100644 index e5796a56d52016d27de282e9795d804161977329..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosNotifType_anyOf.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 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. - */ -/* - * QosNotifType_anyOf.h - * - * - */ - -#ifndef QosNotifType_anyOf_H_ -#define QosNotifType_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class QosNotifType_anyOf { - public: - QosNotifType_anyOf(); - virtual ~QosNotifType_anyOf() = default; - - enum class eQosNotifType_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - GUARANTEED, - NOT_GUARANTEED - }; - - /// <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 QosNotifType_anyOf& rhs) const; - bool operator!=(const QosNotifType_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// QosNotifType_anyOf members - - QosNotifType_anyOf::eQosNotifType_anyOf getValue() const; - void setValue(QosNotifType_anyOf::eQosNotifType_anyOf value); - - friend void to_json(nlohmann::json& j, const QosNotifType_anyOf& o); - friend void from_json(const nlohmann::json& j, QosNotifType_anyOf& o); - - protected: - QosNotifType_anyOf::eQosNotifType_anyOf m_value = - QosNotifType_anyOf::eQosNotifType_anyOf::INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* QosNotifType_anyOf_H_ */ diff --git a/src/api-server/model/QosNotificationControlInfo.cpp b/src/api-server/model/QosNotificationControlInfo.cpp deleted file mode 100644 index 6650f38cf3f38d4c063cc2c2df7f64fe0b5f5a01..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosNotificationControlInfo.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/** - * 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 "QosNotificationControlInfo.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -QosNotificationControlInfo::QosNotificationControlInfo() { - m_ContVer = 0; - m_ContVerIsSet = false; - m_AltQosParamId = ""; - m_AltQosParamIdIsSet = false; -} - -void QosNotificationControlInfo::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool QosNotificationControlInfo::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool QosNotificationControlInfo::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "QosNotificationControlInfo" : pathPrefix; - - /* RefPccRuleIds */ { - 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 QosNotificationControlInfo::operator==( - const QosNotificationControlInfo& rhs) const { - return - - (getRefPccRuleIds() == rhs.getRefPccRuleIds()) && - - (getNotifType() == rhs.getNotifType()) && - - ((!contVerIsSet() && !rhs.contVerIsSet()) || - (contVerIsSet() && rhs.contVerIsSet() && - getContVer() == rhs.getContVer())) && - - ((!altQosParamIdIsSet() && !rhs.altQosParamIdIsSet()) || - (altQosParamIdIsSet() && rhs.altQosParamIdIsSet() && - getAltQosParamId() == rhs.getAltQosParamId())) - - ; -} - -bool QosNotificationControlInfo::operator!=( - const QosNotificationControlInfo& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const QosNotificationControlInfo& o) { - j = nlohmann::json(); - j["refPccRuleIds"] = o.m_RefPccRuleIds; - j["notifType"] = o.m_NotifType; - if (o.contVerIsSet()) j["contVer"] = o.m_ContVer; - if (o.altQosParamIdIsSet()) j["altQosParamId"] = o.m_AltQosParamId; -} - -void from_json(const nlohmann::json& j, QosNotificationControlInfo& o) { - j.at("refPccRuleIds").get_to(o.m_RefPccRuleIds); - j.at("notifType").get_to(o.m_NotifType); - if (j.find("contVer") != j.end()) { - j.at("contVer").get_to(o.m_ContVer); - o.m_ContVerIsSet = true; - } - if (j.find("altQosParamId") != j.end()) { - j.at("altQosParamId").get_to(o.m_AltQosParamId); - o.m_AltQosParamIdIsSet = true; - } -} - -std::vector<std::string> QosNotificationControlInfo::getRefPccRuleIds() const { - return m_RefPccRuleIds; -} -void QosNotificationControlInfo::setRefPccRuleIds( - std::vector<std::string> const& value) { - m_RefPccRuleIds = value; -} -QosNotifType QosNotificationControlInfo::getNotifType() const { - return m_NotifType; -} -void QosNotificationControlInfo::setNotifType(QosNotifType const& value) { - m_NotifType = value; -} -int32_t QosNotificationControlInfo::getContVer() const { - return m_ContVer; -} -void QosNotificationControlInfo::setContVer(int32_t const value) { - m_ContVer = value; - m_ContVerIsSet = true; -} -bool QosNotificationControlInfo::contVerIsSet() const { - return m_ContVerIsSet; -} -void QosNotificationControlInfo::unsetContVer() { - m_ContVerIsSet = false; -} -std::string QosNotificationControlInfo::getAltQosParamId() const { - return m_AltQosParamId; -} -void QosNotificationControlInfo::setAltQosParamId(std::string const& value) { - m_AltQosParamId = value; - m_AltQosParamIdIsSet = true; -} -bool QosNotificationControlInfo::altQosParamIdIsSet() const { - return m_AltQosParamIdIsSet; -} -void QosNotificationControlInfo::unsetAltQosParamId() { - m_AltQosParamIdIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/QosNotificationControlInfo.h b/src/api-server/model/QosNotificationControlInfo.h deleted file mode 100644 index 3d1b769e427c6e5508165321408273d4a7269766..0000000000000000000000000000000000000000 --- a/src/api-server/model/QosNotificationControlInfo.h +++ /dev/null @@ -1,106 +0,0 @@ -/** - * 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. - */ -/* - * QosNotificationControlInfo.h - * - * - */ - -#ifndef QosNotificationControlInfo_H_ -#define QosNotificationControlInfo_H_ - -#include <string> -#include "QosNotifType.h" -#include <vector> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class QosNotificationControlInfo { - public: - QosNotificationControlInfo(); - virtual ~QosNotificationControlInfo() = 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 QosNotificationControlInfo& rhs) const; - bool operator!=(const QosNotificationControlInfo& rhs) const; - - ///////////////////////////////////////////// - /// QosNotificationControlInfo members - - /// <summary> - /// An array of PCC rule id references to the PCC rules associated with the - /// QoS notification control info. - /// </summary> - std::vector<std::string> getRefPccRuleIds() const; - void setRefPccRuleIds(std::vector<std::string> const& value); - /// <summary> - /// - /// </summary> - QosNotifType getNotifType() const; - void setNotifType(QosNotifType const& value); - /// <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> - /// - /// </summary> - std::string getAltQosParamId() const; - void setAltQosParamId(std::string const& value); - bool altQosParamIdIsSet() const; - void unsetAltQosParamId(); - - friend void to_json(nlohmann::json& j, const QosNotificationControlInfo& o); - friend void from_json(const nlohmann::json& j, QosNotificationControlInfo& o); - - protected: - std::vector<std::string> m_RefPccRuleIds; - - QosNotifType m_NotifType; - - int32_t m_ContVer; - bool m_ContVerIsSet; - std::string m_AltQosParamId; - bool m_AltQosParamIdIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* QosNotificationControlInfo_H_ */ diff --git a/src/api-server/model/RanNasRelCause.cpp b/src/api-server/model/RanNasRelCause.cpp deleted file mode 100644 index 8943d59d8dae11f5b9fd33dd84a4c5dc0eb51222..0000000000000000000000000000000000000000 --- a/src/api-server/model/RanNasRelCause.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/** - * 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 "RanNasRelCause.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -RanNasRelCause::RanNasRelCause() { - m_NgApCauseIsSet = false; - m_r_5gMmCause = 0; - m_r_5gMmCauseIsSet = false; - m_r_5gSmCause = 0; - m_r_5gSmCauseIsSet = false; -} - -void RanNasRelCause::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RanNasRelCause::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool RanNasRelCause::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "RanNasRelCause" : pathPrefix; - - if (r5gMmCauseIsSet()) { - const int32_t& value = m_r_5gMmCause; - const std::string currentValuePath = _pathPrefix + ".r5gMmCause"; - - if (value < 0) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - } - - if (r5gSmCauseIsSet()) { - const int32_t& value = m_r_5gSmCause; - const std::string currentValuePath = _pathPrefix + ".r5gSmCause"; - - if (value < 0) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - } - - return success; -} - -bool RanNasRelCause::operator==(const RanNasRelCause& rhs) const { - return - - ((!ngApCauseIsSet() && !rhs.ngApCauseIsSet()) || - (ngApCauseIsSet() && rhs.ngApCauseIsSet() && - getNgApCause() == rhs.getNgApCause())) && - - ((!r5gMmCauseIsSet() && !rhs.r5gMmCauseIsSet()) || - (r5gMmCauseIsSet() && rhs.r5gMmCauseIsSet() && - getR5gMmCause() == rhs.getR5gMmCause())) && - - ((!r5gSmCauseIsSet() && !rhs.r5gSmCauseIsSet()) || - (r5gSmCauseIsSet() && rhs.r5gSmCauseIsSet() && - getR5gSmCause() == rhs.getR5gSmCause())) - - ; -} - -bool RanNasRelCause::operator!=(const RanNasRelCause& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RanNasRelCause& o) { - j = nlohmann::json(); - if (o.ngApCauseIsSet()) j["ngApCause"] = o.m_NgApCause; - if (o.r5gMmCauseIsSet()) j["5gMmCause"] = o.m_r_5gMmCause; - if (o.r5gSmCauseIsSet()) j["5gSmCause"] = o.m_r_5gSmCause; -} - -void from_json(const nlohmann::json& j, RanNasRelCause& o) { - if (j.find("ngApCause") != j.end()) { - j.at("ngApCause").get_to(o.m_NgApCause); - o.m_NgApCauseIsSet = true; - } - if (j.find("5gMmCause") != j.end()) { - j.at("5gMmCause").get_to(o.m_r_5gMmCause); - o.m_r_5gMmCauseIsSet = true; - } - if (j.find("5gSmCause") != j.end()) { - j.at("5gSmCause").get_to(o.m_r_5gSmCause); - o.m_r_5gSmCauseIsSet = true; - } -} - -NgApCause RanNasRelCause::getNgApCause() const { - return m_NgApCause; -} -void RanNasRelCause::setNgApCause(NgApCause const& value) { - m_NgApCause = value; - m_NgApCauseIsSet = true; -} -bool RanNasRelCause::ngApCauseIsSet() const { - return m_NgApCauseIsSet; -} -void RanNasRelCause::unsetNgApCause() { - m_NgApCauseIsSet = false; -} -int32_t RanNasRelCause::getR5gMmCause() const { - return m_r_5gMmCause; -} -void RanNasRelCause::setR5gMmCause(int32_t const value) { - m_r_5gMmCause = value; - m_r_5gMmCauseIsSet = true; -} -bool RanNasRelCause::r5gMmCauseIsSet() const { - return m_r_5gMmCauseIsSet; -} -void RanNasRelCause::unsetr_5gMmCause() { - m_r_5gMmCauseIsSet = false; -} -int32_t RanNasRelCause::getR5gSmCause() const { - return m_r_5gSmCause; -} -void RanNasRelCause::setR5gSmCause(int32_t const value) { - m_r_5gSmCause = value; - m_r_5gSmCauseIsSet = true; -} -bool RanNasRelCause::r5gSmCauseIsSet() const { - return m_r_5gSmCauseIsSet; -} -void RanNasRelCause::unsetr_5gSmCause() { - m_r_5gSmCauseIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/RanNasRelCause.h b/src/api-server/model/RanNasRelCause.h deleted file mode 100644 index c891c8f0168755be98ffd38f814319903a8a7dfb..0000000000000000000000000000000000000000 --- a/src/api-server/model/RanNasRelCause.h +++ /dev/null @@ -1,98 +0,0 @@ -/** - * 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. - */ -/* - * RanNasRelCause.h - * - * - */ - -#ifndef RanNasRelCause_H_ -#define RanNasRelCause_H_ - -#include "NgApCause.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class RanNasRelCause { - public: - RanNasRelCause(); - virtual ~RanNasRelCause() = 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 RanNasRelCause& rhs) const; - bool operator!=(const RanNasRelCause& rhs) const; - - ///////////////////////////////////////////// - /// RanNasRelCause members - - /// <summary> - /// - /// </summary> - oai::model::common::NgApCause getNgApCause() const; - void setNgApCause(oai::model::common::NgApCause const& value); - bool ngApCauseIsSet() const; - void unsetNgApCause(); - /// <summary> - /// - /// </summary> - int32_t getR5gMmCause() const; - void setR5gMmCause(int32_t const value); - bool r5gMmCauseIsSet() const; - void unsetr_5gMmCause(); - /// <summary> - /// - /// </summary> - int32_t getR5gSmCause() const; - void setR5gSmCause(int32_t const value); - bool r5gSmCauseIsSet() const; - void unsetr_5gSmCause(); - - friend void to_json(nlohmann::json& j, const RanNasRelCause& o); - friend void from_json(const nlohmann::json& j, RanNasRelCause& o); - - protected: - oai::model::common::NgApCause m_NgApCause; - bool m_NgApCauseIsSet; - int32_t m_r_5gMmCause; - bool m_r_5gMmCauseIsSet; - int32_t m_r_5gSmCause; - bool m_r_5gSmCauseIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* RanNasRelCause_H_ */ diff --git a/src/api-server/model/RedirectAddressType.cpp b/src/api-server/model/RedirectAddressType.cpp deleted file mode 100644 index c100c6335f69b3842734bafc450c8ad0703edd8f..0000000000000000000000000000000000000000 --- a/src/api-server/model/RedirectAddressType.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai diff --git a/src/api-server/model/RedirectAddressType.h b/src/api-server/model/RedirectAddressType.h deleted file mode 100644 index 563f157c2e4fd8d2b09dc4edf8c1e3dba3be5127..0000000000000000000000000000000000000000 --- a/src/api-server/model/RedirectAddressType.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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 \"dotted-decimal\" 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 pcf { -namespace model { - -/// <summary> -/// Possible values are - IPV4_ADDR: Indicates that the address type is in the -/// form of \"dotted-decimal\" 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 pcf -} // namespace oai -#endif /* RedirectAddressType_H_ */ diff --git a/src/api-server/model/RedirectAddressType_anyOf.cpp b/src/api-server/model/RedirectAddressType_anyOf.cpp deleted file mode 100644 index 1bf668807bd01cd149c4f677a4bb7ab64bc98057..0000000000000000000000000000000000000000 --- a/src/api-server/model/RedirectAddressType_anyOf.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai diff --git a/src/api-server/model/RedirectAddressType_anyOf.h b/src/api-server/model/RedirectAddressType_anyOf.h deleted file mode 100644 index 762811859c9d99c4b9dec068fafe5bca895d6321..0000000000000000000000000000000000000000 --- a/src/api-server/model/RedirectAddressType_anyOf.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai -#endif /* RedirectAddressType_anyOf_H_ */ diff --git a/src/api-server/model/RedirectInformation.cpp b/src/api-server/model/RedirectInformation.cpp deleted file mode 100644 index 7b69a9404efb32bfe7a596bdd41137fb6d36f447..0000000000000000000000000000000000000000 --- a/src/api-server/model/RedirectInformation.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai diff --git a/src/api-server/model/RedirectInformation.h b/src/api-server/model/RedirectInformation.h deleted file mode 100644 index 112f9989630a34ef3dcd238c428864d55bf975f6..0000000000000000000000000000000000000000 --- a/src/api-server/model/RedirectInformation.h +++ /dev/null @@ -1,99 +0,0 @@ -/** - * 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 pcf { -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 pcf -} // namespace oai -#endif /* RedirectInformation_H_ */ diff --git a/src/api-server/model/ReportingFrequency.cpp b/src/api-server/model/ReportingFrequency.cpp deleted file mode 100644 index ccae4587a0945bea1053d2d1d142f5c7af8fc728..0000000000000000000000000000000000000000 --- a/src/api-server/model/ReportingFrequency.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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 "ReportingFrequency.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -ReportingFrequency::ReportingFrequency() {} - -void ReportingFrequency::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool ReportingFrequency::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool ReportingFrequency::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "ReportingFrequency" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool ReportingFrequency::operator==(const ReportingFrequency& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool ReportingFrequency::operator!=(const ReportingFrequency& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const ReportingFrequency& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, ReportingFrequency& o) { - from_json(j, o.m_value); -} - -ReportingFrequency_anyOf ReportingFrequency::getValue() const { - return m_value; -} - -void ReportingFrequency::setValue(ReportingFrequency_anyOf value) { - m_value = value; -} - -ReportingFrequency_anyOf::eReportingFrequency_anyOf -ReportingFrequency::getEnumValue() const { - return m_value.getValue(); -} - -void ReportingFrequency::setEnumValue( - ReportingFrequency_anyOf::eReportingFrequency_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/ReportingFrequency.h b/src/api-server/model/ReportingFrequency.h deleted file mode 100644 index ed289d44aa81f1abadc5c0178c39ce5c3c6ee6f2..0000000000000000000000000000000000000000 --- a/src/api-server/model/ReportingFrequency.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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. - */ -/* - * ReportingFrequency.h - * - * - */ - -#ifndef ReportingFrequency_H_ -#define ReportingFrequency_H_ - -#include "ReportingFrequency_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class ReportingFrequency { - public: - ReportingFrequency(); - virtual ~ReportingFrequency() = 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 ReportingFrequency& rhs) const; - bool operator!=(const ReportingFrequency& rhs) const; - - ///////////////////////////////////////////// - /// ReportingFrequency members - - ReportingFrequency_anyOf getValue() const; - void setValue(ReportingFrequency_anyOf value); - ReportingFrequency_anyOf::eReportingFrequency_anyOf getEnumValue() const; - void setEnumValue(ReportingFrequency_anyOf::eReportingFrequency_anyOf value); - friend void to_json(nlohmann::json& j, const ReportingFrequency& o); - friend void from_json(const nlohmann::json& j, ReportingFrequency& o); - friend void to_json(nlohmann::json& j, const ReportingFrequency_anyOf& o); - friend void from_json(const nlohmann::json& j, ReportingFrequency_anyOf& o); - - protected: - ReportingFrequency_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* ReportingFrequency_H_ */ diff --git a/src/api-server/model/ReportingFrequency_anyOf.cpp b/src/api-server/model/ReportingFrequency_anyOf.cpp deleted file mode 100644 index 837ef4d24d4c179653bb44e67d3e2af6964f81b0..0000000000000000000000000000000000000000 --- a/src/api-server/model/ReportingFrequency_anyOf.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/** - * 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 "ReportingFrequency_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -ReportingFrequency_anyOf::ReportingFrequency_anyOf() {} - -void ReportingFrequency_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool ReportingFrequency_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool ReportingFrequency_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "ReportingFrequency_anyOf" : pathPrefix; - - if (m_value == ReportingFrequency_anyOf::eReportingFrequency_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool ReportingFrequency_anyOf::operator==( - const ReportingFrequency_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool ReportingFrequency_anyOf::operator!=( - const ReportingFrequency_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const ReportingFrequency_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case ReportingFrequency_anyOf::eReportingFrequency_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case ReportingFrequency_anyOf::eReportingFrequency_anyOf::EVENT_TRIGGERED: - j = "EVENT_TRIGGERED"; - break; - case ReportingFrequency_anyOf::eReportingFrequency_anyOf::PERIODIC: - j = "PERIODIC"; - break; - case ReportingFrequency_anyOf::eReportingFrequency_anyOf::SESSION_RELEASE: - j = "SESSION_RELEASE"; - break; - } -} - -void from_json(const nlohmann::json& j, ReportingFrequency_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "EVENT_TRIGGERED") { - o.setValue( - ReportingFrequency_anyOf::eReportingFrequency_anyOf::EVENT_TRIGGERED); - } else if (s == "PERIODIC") { - o.setValue(ReportingFrequency_anyOf::eReportingFrequency_anyOf::PERIODIC); - } else if (s == "SESSION_RELEASE") { - o.setValue( - ReportingFrequency_anyOf::eReportingFrequency_anyOf::SESSION_RELEASE); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " ReportingFrequency_anyOf::eReportingFrequency_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -ReportingFrequency_anyOf::eReportingFrequency_anyOf -ReportingFrequency_anyOf::getValue() const { - return m_value; -} -void ReportingFrequency_anyOf::setValue( - ReportingFrequency_anyOf::eReportingFrequency_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/ReportingFrequency_anyOf.h b/src/api-server/model/ReportingFrequency_anyOf.h deleted file mode 100644 index 57f50916a7d0e339f7ad8a06a071aee2543ecbfe..0000000000000000000000000000000000000000 --- a/src/api-server/model/ReportingFrequency_anyOf.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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. - */ -/* - * ReportingFrequency_anyOf.h - * - * - */ - -#ifndef ReportingFrequency_anyOf_H_ -#define ReportingFrequency_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class ReportingFrequency_anyOf { - public: - ReportingFrequency_anyOf(); - virtual ~ReportingFrequency_anyOf() = default; - - enum class eReportingFrequency_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - EVENT_TRIGGERED, - PERIODIC, - SESSION_RELEASE - }; - - /// <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 ReportingFrequency_anyOf& rhs) const; - bool operator!=(const ReportingFrequency_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// ReportingFrequency_anyOf members - - ReportingFrequency_anyOf::eReportingFrequency_anyOf getValue() const; - void setValue(ReportingFrequency_anyOf::eReportingFrequency_anyOf value); - - friend void to_json(nlohmann::json& j, const ReportingFrequency_anyOf& o); - friend void from_json(const nlohmann::json& j, ReportingFrequency_anyOf& o); - - protected: - ReportingFrequency_anyOf::eReportingFrequency_anyOf m_value = - ReportingFrequency_anyOf::eReportingFrequency_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* ReportingFrequency_anyOf_H_ */ diff --git a/src/api-server/model/ReportingLevel.cpp b/src/api-server/model/ReportingLevel.cpp deleted file mode 100644 index 5502b97b9e8e5fa46746ec8f72033068c5ae04de..0000000000000000000000000000000000000000 --- a/src/api-server/model/ReportingLevel.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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 "ReportingLevel.h" -#include "Helpers.h" -#include "logger.hpp" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -ReportingLevel::ReportingLevel() {} - -void ReportingLevel::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool ReportingLevel::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool ReportingLevel::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "ReportingLevel" : pathPrefix; - */ - return success; -} - -bool ReportingLevel::operator==(const ReportingLevel& rhs) const { - return getValue() == rhs.getValue(); -} - -bool ReportingLevel::operator!=(const ReportingLevel& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& /* j */, const ReportingLevel& /* o */) { - // j = nlohmann::json(); - Logger::pcf_app().error( - __PRETTY_FUNCTION__ + std::string{" not implemented"}); -} - -void from_json(const nlohmann::json& /* j */, ReportingLevel& /* o */) { - Logger::pcf_app().error( - __PRETTY_FUNCTION__ + std::string{" not implemented"}); -} - -ReportingLevel_anyOf ReportingLevel::getValue() const { - return m_value; -} - -void ReportingLevel::setValue(ReportingLevel_anyOf value) { - m_value = value; -} - -ReportingLevel_anyOf::eReportingLevel_anyOf ReportingLevel::getEnumValue() - const { - return m_value.getValue(); -} - -void ReportingLevel::setEnumValue( - ReportingLevel_anyOf::eReportingLevel_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/ReportingLevel.h b/src/api-server/model/ReportingLevel.h deleted file mode 100644 index ba1b0d4cdf5e434b05e3db4d2c907c5f47f81be2..0000000000000000000000000000000000000000 --- a/src/api-server/model/ReportingLevel.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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. - */ -/* - * ReportingLevel.h - * - * Possible values are - SER_ID_LEVEL: Indicates that the usage shall be - * reported on service id and rating group combination level. - RAT_GR_LEVEL: - * Indicates that the usage shall be reported on rating group level. - - * SPON_CON_LEVEL: Indicates that the usage shall be reported on sponsor - * identity and rating group combination level. - */ - -#ifndef ReportingLevel_H_ -#define ReportingLevel_H_ - -#include "NullValue.h" -#include "ReportingLevel_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// Possible values are - SER_ID_LEVEL: Indicates that the usage shall be -/// reported on service id and rating group combination level. - RAT_GR_LEVEL: -/// Indicates that the usage shall be reported on rating group level. - -/// SPON_CON_LEVEL: Indicates that the usage shall be reported on sponsor -/// identity and rating group combination level. -/// </summary> -class ReportingLevel { - public: - ReportingLevel(); - virtual ~ReportingLevel() = 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 ReportingLevel& rhs) const; - bool operator!=(const ReportingLevel& rhs) const; - - ///////////////////////////////////////////// - /// ReportingLevel members - - ReportingLevel_anyOf getValue() const; - void setValue(ReportingLevel_anyOf value); - ReportingLevel_anyOf::eReportingLevel_anyOf getEnumValue() const; - void setEnumValue(ReportingLevel_anyOf::eReportingLevel_anyOf value); - - friend void to_json(nlohmann::json& j, const ReportingLevel& o); - friend void from_json(const nlohmann::json& j, ReportingLevel& o); - - protected: - ReportingLevel_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* ReportingLevel_H_ */ diff --git a/src/api-server/model/ReportingLevel_anyOf.cpp b/src/api-server/model/ReportingLevel_anyOf.cpp deleted file mode 100644 index bbfe14b0a1936e4c4baa7c733bf7d3193fe431ae..0000000000000000000000000000000000000000 --- a/src/api-server/model/ReportingLevel_anyOf.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/** - * 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 "ReportingLevel_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -ReportingLevel_anyOf::ReportingLevel_anyOf() {} - -void ReportingLevel_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool ReportingLevel_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool ReportingLevel_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "ReportingLevel_anyOf" : pathPrefix; - - if (m_value == ReportingLevel_anyOf::eReportingLevel_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool ReportingLevel_anyOf::operator==(const ReportingLevel_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool ReportingLevel_anyOf::operator!=(const ReportingLevel_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const ReportingLevel_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case ReportingLevel_anyOf::eReportingLevel_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case ReportingLevel_anyOf::eReportingLevel_anyOf::SER_ID_LEVEL: - j = "SER_ID_LEVEL"; - break; - case ReportingLevel_anyOf::eReportingLevel_anyOf::RAT_GR_LEVEL: - j = "RAT_GR_LEVEL"; - break; - case ReportingLevel_anyOf::eReportingLevel_anyOf::SPON_CON_LEVEL: - j = "SPON_CON_LEVEL"; - break; - case ReportingLevel_anyOf::eReportingLevel_anyOf::NULL_VALUE: - j = nullptr; - break; - } -} - -void from_json(const nlohmann::json& j, ReportingLevel_anyOf& o) { - if (j.is_null()) { - o.setValue(ReportingLevel_anyOf::eReportingLevel_anyOf::NULL_VALUE); - return; - } - - auto s = j.get<std::string>(); - if (s == "SER_ID_LEVEL") { - o.setValue(ReportingLevel_anyOf::eReportingLevel_anyOf::SER_ID_LEVEL); - } else if (s == "RAT_GR_LEVEL") { - o.setValue(ReportingLevel_anyOf::eReportingLevel_anyOf::RAT_GR_LEVEL); - } else if (s == "SPON_CON_LEVEL") { - o.setValue(ReportingLevel_anyOf::eReportingLevel_anyOf::SPON_CON_LEVEL); - } else if (s == "null") { - o.setValue(ReportingLevel_anyOf::eReportingLevel_anyOf::NULL_VALUE); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " ReportingLevel_anyOf::eReportingLevel_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -ReportingLevel_anyOf::eReportingLevel_anyOf ReportingLevel_anyOf::getValue() - const { - return m_value; -} -void ReportingLevel_anyOf::setValue( - ReportingLevel_anyOf::eReportingLevel_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/ReportingLevel_anyOf.h b/src/api-server/model/ReportingLevel_anyOf.h deleted file mode 100644 index 4e21686518afad37f4dd347b2b8d34406fdea0e7..0000000000000000000000000000000000000000 --- a/src/api-server/model/ReportingLevel_anyOf.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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. - */ -/* - * ReportingLevel_anyOf.h - * - * - */ - -#ifndef ReportingLevel_anyOf_H_ -#define ReportingLevel_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class ReportingLevel_anyOf { - public: - ReportingLevel_anyOf(); - virtual ~ReportingLevel_anyOf() = default; - - enum class eReportingLevel_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - NULL_VALUE, - SER_ID_LEVEL, - RAT_GR_LEVEL, - SPON_CON_LEVEL - }; - - /// <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 ReportingLevel_anyOf& rhs) const; - bool operator!=(const ReportingLevel_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// ReportingLevel_anyOf members - - ReportingLevel_anyOf::eReportingLevel_anyOf getValue() const; - void setValue(ReportingLevel_anyOf::eReportingLevel_anyOf value); - - friend void to_json(nlohmann::json& j, const ReportingLevel_anyOf& o); - friend void from_json(const nlohmann::json& j, ReportingLevel_anyOf& o); - - protected: - ReportingLevel_anyOf::eReportingLevel_anyOf m_value = ReportingLevel_anyOf:: - eReportingLevel_anyOf::INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* ReportingLevel_anyOf_H_ */ diff --git a/src/api-server/model/RequestedQos.cpp b/src/api-server/model/RequestedQos.cpp deleted file mode 100644 index d9725805a6b20b4ad679dd241010a68e6c9452c5..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedQos.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/** - * 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 "RequestedQos.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -RequestedQos::RequestedQos() { - m_r_5qi = 0; - m_GbrUl = ""; - m_GbrUlIsSet = false; - m_GbrDl = ""; - m_GbrDlIsSet = false; -} - -void RequestedQos::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RequestedQos::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool RequestedQos::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "RequestedQos" : pathPrefix; - - /* r_5qi */ { - const int32_t& value = m_r_5qi; - const std::string currentValuePath = _pathPrefix + ".r5qi"; - - 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 (gbrUlIsSet()) { - const std::string& value = m_GbrUl; - const std::string currentValuePath = _pathPrefix + ".gbrUl"; - } - - if (gbrDlIsSet()) { - const std::string& value = m_GbrDl; - const std::string currentValuePath = _pathPrefix + ".gbrDl"; - } - */ - return success; -} - -bool RequestedQos::operator==(const RequestedQos& rhs) const { - return - - (getR5qi() == rhs.getR5qi()) && - - ((!gbrUlIsSet() && !rhs.gbrUlIsSet()) || - (gbrUlIsSet() && rhs.gbrUlIsSet() && getGbrUl() == rhs.getGbrUl())) && - - ((!gbrDlIsSet() && !rhs.gbrDlIsSet()) || - (gbrDlIsSet() && rhs.gbrDlIsSet() && getGbrDl() == rhs.getGbrDl())) - - ; -} - -bool RequestedQos::operator!=(const RequestedQos& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RequestedQos& o) { - j = nlohmann::json(); - j["5qi"] = o.m_r_5qi; - if (o.gbrUlIsSet()) j["gbrUl"] = o.m_GbrUl; - if (o.gbrDlIsSet()) j["gbrDl"] = o.m_GbrDl; -} - -void from_json(const nlohmann::json& j, RequestedQos& o) { - j.at("5qi").get_to(o.m_r_5qi); - if (j.find("gbrUl") != j.end()) { - j.at("gbrUl").get_to(o.m_GbrUl); - o.m_GbrUlIsSet = true; - } - if (j.find("gbrDl") != j.end()) { - j.at("gbrDl").get_to(o.m_GbrDl); - o.m_GbrDlIsSet = true; - } -} - -int32_t RequestedQos::getR5qi() const { - return m_r_5qi; -} -void RequestedQos::setR5qi(int32_t const value) { - m_r_5qi = value; -} -std::string RequestedQos::getGbrUl() const { - return m_GbrUl; -} -void RequestedQos::setGbrUl(std::string const& value) { - m_GbrUl = value; - m_GbrUlIsSet = true; -} -bool RequestedQos::gbrUlIsSet() const { - return m_GbrUlIsSet; -} -void RequestedQos::unsetGbrUl() { - m_GbrUlIsSet = false; -} -std::string RequestedQos::getGbrDl() const { - return m_GbrDl; -} -void RequestedQos::setGbrDl(std::string const& value) { - m_GbrDl = value; - m_GbrDlIsSet = true; -} -bool RequestedQos::gbrDlIsSet() const { - return m_GbrDlIsSet; -} -void RequestedQos::unsetGbrDl() { - m_GbrDlIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/RequestedQos.h b/src/api-server/model/RequestedQos.h deleted file mode 100644 index 12acc2880f34a26418e3f50f751a1de7521fbece..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedQos.h +++ /dev/null @@ -1,96 +0,0 @@ -/** - * 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. - */ -/* - * RequestedQos.h - * - * - */ - -#ifndef RequestedQos_H_ -#define RequestedQos_H_ - -#include <string> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class RequestedQos { - public: - RequestedQos(); - virtual ~RequestedQos() = 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 RequestedQos& rhs) const; - bool operator!=(const RequestedQos& rhs) const; - - ///////////////////////////////////////////// - /// RequestedQos members - - /// <summary> - /// - /// </summary> - int32_t getR5qi() const; - void setR5qi(int32_t const value); - /// <summary> - /// - /// </summary> - std::string getGbrUl() const; - void setGbrUl(std::string const& value); - bool gbrUlIsSet() const; - void unsetGbrUl(); - /// <summary> - /// - /// </summary> - std::string getGbrDl() const; - void setGbrDl(std::string const& value); - bool gbrDlIsSet() const; - void unsetGbrDl(); - - friend void to_json(nlohmann::json& j, const RequestedQos& o); - friend void from_json(const nlohmann::json& j, RequestedQos& o); - - protected: - int32_t m_r_5qi; - - std::string m_GbrUl; - bool m_GbrUlIsSet; - std::string m_GbrDl; - bool m_GbrDlIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* RequestedQos_H_ */ diff --git a/src/api-server/model/RequestedQosMonitoringParameter.cpp b/src/api-server/model/RequestedQosMonitoringParameter.cpp deleted file mode 100644 index 9313b4f15a4a7fe7d54b35f7f28ac78c82999839..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedQosMonitoringParameter.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/** - * 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 "RequestedQosMonitoringParameter.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -RequestedQosMonitoringParameter::RequestedQosMonitoringParameter() {} - -void RequestedQosMonitoringParameter::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RequestedQosMonitoringParameter::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool RequestedQosMonitoringParameter::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "RequestedQosMonitoringParameter" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool RequestedQosMonitoringParameter::operator==( - const RequestedQosMonitoringParameter& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool RequestedQosMonitoringParameter::operator!=( - const RequestedQosMonitoringParameter& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RequestedQosMonitoringParameter& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, RequestedQosMonitoringParameter& o) { - from_json(j, o.m_value); -} - -RequestedQosMonitoringParameter_anyOf -RequestedQosMonitoringParameter::getValue() const { - return m_value; -} - -void RequestedQosMonitoringParameter::setValue( - RequestedQosMonitoringParameter_anyOf value) { - m_value = value; -} - -RequestedQosMonitoringParameter_anyOf::eRequestedQosMonitoringParameter_anyOf -RequestedQosMonitoringParameter::getEnumValue() const { - return m_value.getValue(); -} - -void RequestedQosMonitoringParameter::setEnumValue( - RequestedQosMonitoringParameter_anyOf:: - eRequestedQosMonitoringParameter_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/RequestedQosMonitoringParameter.h b/src/api-server/model/RequestedQosMonitoringParameter.h deleted file mode 100644 index 490cf408823e0d4acef905b87c7f30081d059125..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedQosMonitoringParameter.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 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. - */ -/* - * RequestedQosMonitoringParameter.h - * - * - */ - -#ifndef RequestedQosMonitoringParameter_H_ -#define RequestedQosMonitoringParameter_H_ - -#include "RequestedQosMonitoringParameter_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class RequestedQosMonitoringParameter { - public: - RequestedQosMonitoringParameter(); - virtual ~RequestedQosMonitoringParameter() = 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 RequestedQosMonitoringParameter& rhs) const; - bool operator!=(const RequestedQosMonitoringParameter& rhs) const; - - ///////////////////////////////////////////// - /// RequestedQosMonitoringParameter members - - RequestedQosMonitoringParameter_anyOf getValue() const; - void setValue(RequestedQosMonitoringParameter_anyOf value); - RequestedQosMonitoringParameter_anyOf::eRequestedQosMonitoringParameter_anyOf - getEnumValue() const; - void setEnumValue(RequestedQosMonitoringParameter_anyOf:: - eRequestedQosMonitoringParameter_anyOf value); - friend void to_json( - nlohmann::json& j, const RequestedQosMonitoringParameter& o); - friend void from_json( - const nlohmann::json& j, RequestedQosMonitoringParameter& o); - friend void to_json( - nlohmann::json& j, const RequestedQosMonitoringParameter_anyOf& o); - friend void from_json( - const nlohmann::json& j, RequestedQosMonitoringParameter_anyOf& o); - - protected: - RequestedQosMonitoringParameter_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* RequestedQosMonitoringParameter_H_ */ diff --git a/src/api-server/model/RequestedQosMonitoringParameter_anyOf.cpp b/src/api-server/model/RequestedQosMonitoringParameter_anyOf.cpp deleted file mode 100644 index 2f11ef8b7147842512a0c6af86c7e820ac37c0b1..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedQosMonitoringParameter_anyOf.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/** - * 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 "RequestedQosMonitoringParameter_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -RequestedQosMonitoringParameter_anyOf::RequestedQosMonitoringParameter_anyOf() { - -} - -void RequestedQosMonitoringParameter_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RequestedQosMonitoringParameter_anyOf::validate( - std::stringstream& msg) const { - return validate(msg, ""); -} - -bool RequestedQosMonitoringParameter_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "RequestedQosMonitoringParameter_anyOf" : pathPrefix; - - if (m_value == RequestedQosMonitoringParameter_anyOf:: - eRequestedQosMonitoringParameter_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool RequestedQosMonitoringParameter_anyOf::operator==( - const RequestedQosMonitoringParameter_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool RequestedQosMonitoringParameter_anyOf::operator!=( - const RequestedQosMonitoringParameter_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json( - nlohmann::json& j, const RequestedQosMonitoringParameter_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case RequestedQosMonitoringParameter_anyOf:: - eRequestedQosMonitoringParameter_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case RequestedQosMonitoringParameter_anyOf:: - eRequestedQosMonitoringParameter_anyOf::DOWNLINK: - j = "DOWNLINK"; - break; - case RequestedQosMonitoringParameter_anyOf:: - eRequestedQosMonitoringParameter_anyOf::UPLINK: - j = "UPLINK"; - break; - case RequestedQosMonitoringParameter_anyOf:: - eRequestedQosMonitoringParameter_anyOf::ROUND_TRIP: - j = "ROUND_TRIP"; - break; - } -} - -void from_json( - const nlohmann::json& j, RequestedQosMonitoringParameter_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "DOWNLINK") { - o.setValue(RequestedQosMonitoringParameter_anyOf:: - eRequestedQosMonitoringParameter_anyOf::DOWNLINK); - } else if (s == "UPLINK") { - o.setValue(RequestedQosMonitoringParameter_anyOf:: - eRequestedQosMonitoringParameter_anyOf::UPLINK); - } else if (s == "ROUND_TRIP") { - o.setValue(RequestedQosMonitoringParameter_anyOf:: - eRequestedQosMonitoringParameter_anyOf::ROUND_TRIP); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " RequestedQosMonitoringParameter_anyOf::" - "eRequestedQosMonitoringParameter_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -RequestedQosMonitoringParameter_anyOf::eRequestedQosMonitoringParameter_anyOf -RequestedQosMonitoringParameter_anyOf::getValue() const { - return m_value; -} -void RequestedQosMonitoringParameter_anyOf::setValue( - RequestedQosMonitoringParameter_anyOf:: - eRequestedQosMonitoringParameter_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/RequestedQosMonitoringParameter_anyOf.h b/src/api-server/model/RequestedQosMonitoringParameter_anyOf.h deleted file mode 100644 index 327a890113634ebc923f9d69e8a3d40641fea831..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedQosMonitoringParameter_anyOf.h +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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. - */ -/* - * RequestedQosMonitoringParameter_anyOf.h - * - * - */ - -#ifndef RequestedQosMonitoringParameter_anyOf_H_ -#define RequestedQosMonitoringParameter_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class RequestedQosMonitoringParameter_anyOf { - public: - RequestedQosMonitoringParameter_anyOf(); - virtual ~RequestedQosMonitoringParameter_anyOf() = default; - - enum class eRequestedQosMonitoringParameter_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - DOWNLINK, - UPLINK, - ROUND_TRIP - }; - - /// <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 RequestedQosMonitoringParameter_anyOf& rhs) const; - bool operator!=(const RequestedQosMonitoringParameter_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// RequestedQosMonitoringParameter_anyOf members - - RequestedQosMonitoringParameter_anyOf::eRequestedQosMonitoringParameter_anyOf - getValue() const; - void setValue(RequestedQosMonitoringParameter_anyOf:: - eRequestedQosMonitoringParameter_anyOf value); - - friend void to_json( - nlohmann::json& j, const RequestedQosMonitoringParameter_anyOf& o); - friend void from_json( - const nlohmann::json& j, RequestedQosMonitoringParameter_anyOf& o); - - protected: - RequestedQosMonitoringParameter_anyOf::eRequestedQosMonitoringParameter_anyOf - m_value = RequestedQosMonitoringParameter_anyOf:: - eRequestedQosMonitoringParameter_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* RequestedQosMonitoringParameter_anyOf_H_ */ diff --git a/src/api-server/model/RequestedRuleData.cpp b/src/api-server/model/RequestedRuleData.cpp deleted file mode 100644 index 6425f9cf34bb583fde0e7a33bef54915a7e5087e..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedRuleData.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/** - * 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 "RequestedRuleData.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -RequestedRuleData::RequestedRuleData() {} - -void RequestedRuleData::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RequestedRuleData::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool RequestedRuleData::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "RequestedRuleData" : pathPrefix; - - /* RefPccRuleIds */ { - 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++; - } - } - */ - } - - /* ReqData */ { - const std::vector<RequestedRuleDataType>& value = m_ReqData; - const std::string currentValuePath = _pathPrefix + ".reqData"; - - 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 RequestedRuleDataType& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".reqData") && success; - - i++; - } - } - } - - return success; -} - -bool RequestedRuleData::operator==(const RequestedRuleData& rhs) const { - return - - (getRefPccRuleIds() == rhs.getRefPccRuleIds()) && - - (getReqData() == rhs.getReqData()) - - ; -} - -bool RequestedRuleData::operator!=(const RequestedRuleData& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RequestedRuleData& o) { - j = nlohmann::json(); - j["refPccRuleIds"] = o.m_RefPccRuleIds; - j["reqData"] = o.m_ReqData; -} - -void from_json(const nlohmann::json& j, RequestedRuleData& o) { - j.at("refPccRuleIds").get_to(o.m_RefPccRuleIds); - j.at("reqData").get_to(o.m_ReqData); -} - -std::vector<std::string> RequestedRuleData::getRefPccRuleIds() const { - return m_RefPccRuleIds; -} -void RequestedRuleData::setRefPccRuleIds( - std::vector<std::string> const& value) { - m_RefPccRuleIds = value; -} -std::vector<RequestedRuleDataType> RequestedRuleData::getReqData() const { - return m_ReqData; -} -void RequestedRuleData::setReqData( - std::vector<RequestedRuleDataType> const& value) { - m_ReqData = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/RequestedRuleData.h b/src/api-server/model/RequestedRuleData.h deleted file mode 100644 index fab0878f3418154ef1a81dbf03742e7895d2cec3..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedRuleData.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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. - */ -/* - * RequestedRuleData.h - * - * - */ - -#ifndef RequestedRuleData_H_ -#define RequestedRuleData_H_ - -#include <string> -#include <vector> -#include "RequestedRuleDataType.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class RequestedRuleData { - public: - RequestedRuleData(); - virtual ~RequestedRuleData() = 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 RequestedRuleData& rhs) const; - bool operator!=(const RequestedRuleData& rhs) const; - - ///////////////////////////////////////////// - /// RequestedRuleData members - - /// <summary> - /// An array of PCC rule id references to the PCC rules associated with the - /// control data. - /// </summary> - std::vector<std::string> getRefPccRuleIds() const; - void setRefPccRuleIds(std::vector<std::string> const& value); - /// <summary> - /// Array of requested rule data type elements indicating what type of rule - /// data is requested for the corresponding referenced PCC rules. - /// </summary> - std::vector<RequestedRuleDataType> getReqData() const; - void setReqData(std::vector<RequestedRuleDataType> const& value); - - friend void to_json(nlohmann::json& j, const RequestedRuleData& o); - friend void from_json(const nlohmann::json& j, RequestedRuleData& o); - - protected: - std::vector<std::string> m_RefPccRuleIds; - - std::vector<RequestedRuleDataType> m_ReqData; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* RequestedRuleData_H_ */ diff --git a/src/api-server/model/RequestedRuleDataType.cpp b/src/api-server/model/RequestedRuleDataType.cpp deleted file mode 100644 index 7615f8d0eb86506342594a6ef3e011a579fa0711..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedRuleDataType.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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 "RequestedRuleDataType.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -RequestedRuleDataType::RequestedRuleDataType() {} - -void RequestedRuleDataType::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RequestedRuleDataType::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool RequestedRuleDataType::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "RequestedRuleDataType" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool RequestedRuleDataType::operator==(const RequestedRuleDataType& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool RequestedRuleDataType::operator!=(const RequestedRuleDataType& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RequestedRuleDataType& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, RequestedRuleDataType& o) { - from_json(j, o.m_value); -} - -RequestedRuleDataType_anyOf RequestedRuleDataType::getValue() const { - return m_value; -} - -void RequestedRuleDataType::setValue(RequestedRuleDataType_anyOf value) { - m_value = value; -} - -RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf -RequestedRuleDataType::getEnumValue() const { - return m_value.getValue(); -} - -void RequestedRuleDataType::setEnumValue( - RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/RequestedRuleDataType.h b/src/api-server/model/RequestedRuleDataType.h deleted file mode 100644 index 7b9a4a984b2fc51aa92ba76e30d2805575f11cdf..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedRuleDataType.h +++ /dev/null @@ -1,94 +0,0 @@ -/** - * 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. - */ -/* - * RequestedRuleDataType.h - * - * Possible values are - CH_ID: Indicates that the requested rule data is the - * charging identifier. - MS_TIME_ZONE: Indicates that the requested access - * network info type is the UE's timezone. - USER_LOC_INFO: Indicates that - * the requested access network info type is the UE's location. - - * RES_RELEASE: Indicates that the requested rule data is the result of the - * release of resource. - SUCC_RES_ALLO: Indicates that the requested rule data - * is the successful resource allocation. - EPS_FALLBACK: Indicates that the - * requested rule data is the report of QoS flow rejection due to EPS fallback. - */ - -#ifndef RequestedRuleDataType_H_ -#define RequestedRuleDataType_H_ - -#include "RequestedRuleDataType_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// Possible values are - CH_ID: Indicates that the requested rule data is the -/// charging identifier. - MS_TIME_ZONE: Indicates that the requested access -/// network info type is the UE's timezone. - USER_LOC_INFO: Indicates that -/// the requested access network info type is the UE's location. - -/// RES_RELEASE: Indicates that the requested rule data is the result of the -/// release of resource. - SUCC_RES_ALLO: Indicates that the requested rule data -/// is the successful resource allocation. - EPS_FALLBACK: Indicates that the -/// requested rule data is the report of QoS flow rejection due to EPS fallback. -/// </summary> -class RequestedRuleDataType { - public: - RequestedRuleDataType(); - virtual ~RequestedRuleDataType() = 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 RequestedRuleDataType& rhs) const; - bool operator!=(const RequestedRuleDataType& rhs) const; - - ///////////////////////////////////////////// - /// RequestedRuleDataType members - - RequestedRuleDataType_anyOf getValue() const; - void setValue(RequestedRuleDataType_anyOf value); - RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf getEnumValue() - const; - void setEnumValue( - RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf value); - friend void to_json(nlohmann::json& j, const RequestedRuleDataType& o); - friend void from_json(const nlohmann::json& j, RequestedRuleDataType& o); - friend void to_json(nlohmann::json& j, const RequestedRuleDataType_anyOf& o); - friend void from_json( - const nlohmann::json& j, RequestedRuleDataType_anyOf& o); - - protected: - RequestedRuleDataType_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* RequestedRuleDataType_H_ */ diff --git a/src/api-server/model/RequestedRuleDataType_anyOf.cpp b/src/api-server/model/RequestedRuleDataType_anyOf.cpp deleted file mode 100644 index c52afa74bb88d9d4ca3e9d754f0b300f125542ec..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedRuleDataType_anyOf.cpp +++ /dev/null @@ -1,137 +0,0 @@ -/** - * 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 "RequestedRuleDataType_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -RequestedRuleDataType_anyOf::RequestedRuleDataType_anyOf() {} - -void RequestedRuleDataType_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RequestedRuleDataType_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool RequestedRuleDataType_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "RequestedRuleDataType_anyOf" : pathPrefix; - - if (m_value == RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool RequestedRuleDataType_anyOf::operator==( - const RequestedRuleDataType_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool RequestedRuleDataType_anyOf::operator!=( - const RequestedRuleDataType_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RequestedRuleDataType_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf::CH_ID: - j = "CH_ID"; - break; - case RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf:: - MS_TIME_ZONE: - j = "MS_TIME_ZONE"; - break; - case RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf:: - USER_LOC_INFO: - j = "USER_LOC_INFO"; - break; - case RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf::RES_RELEASE: - j = "RES_RELEASE"; - break; - case RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf:: - SUCC_RES_ALLO: - j = "SUCC_RES_ALLO"; - break; - case RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf:: - EPS_FALLBACK: - j = "EPS_FALLBACK"; - break; - } -} - -void from_json(const nlohmann::json& j, RequestedRuleDataType_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "CH_ID") { - o.setValue( - RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf::CH_ID); - } else if (s == "MS_TIME_ZONE") { - o.setValue(RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf:: - MS_TIME_ZONE); - } else if (s == "USER_LOC_INFO") { - o.setValue(RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf:: - USER_LOC_INFO); - } else if (s == "RES_RELEASE") { - o.setValue( - RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf::RES_RELEASE); - } else if (s == "SUCC_RES_ALLO") { - o.setValue(RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf:: - SUCC_RES_ALLO); - } else if (s == "EPS_FALLBACK") { - o.setValue(RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf:: - EPS_FALLBACK); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf -RequestedRuleDataType_anyOf::getValue() const { - return m_value; -} -void RequestedRuleDataType_anyOf::setValue( - RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/RequestedRuleDataType_anyOf.h b/src/api-server/model/RequestedRuleDataType_anyOf.h deleted file mode 100644 index 35dc4629b30ade20ce2dea1385dcc39800cc2d8e..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedRuleDataType_anyOf.h +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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. - */ -/* - * RequestedRuleDataType_anyOf.h - * - * - */ - -#ifndef RequestedRuleDataType_anyOf_H_ -#define RequestedRuleDataType_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class RequestedRuleDataType_anyOf { - public: - RequestedRuleDataType_anyOf(); - virtual ~RequestedRuleDataType_anyOf() = default; - - enum class eRequestedRuleDataType_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - CH_ID, - MS_TIME_ZONE, - USER_LOC_INFO, - RES_RELEASE, - SUCC_RES_ALLO, - EPS_FALLBACK - }; - - /// <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 RequestedRuleDataType_anyOf& rhs) const; - bool operator!=(const RequestedRuleDataType_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// RequestedRuleDataType_anyOf members - - RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf getValue() const; - void setValue( - RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf value); - - friend void to_json(nlohmann::json& j, const RequestedRuleDataType_anyOf& o); - friend void from_json( - const nlohmann::json& j, RequestedRuleDataType_anyOf& o); - - protected: - RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf m_value = - RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* RequestedRuleDataType_anyOf_H_ */ diff --git a/src/api-server/model/RequestedUsageData.cpp b/src/api-server/model/RequestedUsageData.cpp deleted file mode 100644 index 3e7d5cd89dcbac87b2bf7631017e7ba07d45e5b1..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedUsageData.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/** - * 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 "RequestedUsageData.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -RequestedUsageData::RequestedUsageData() { - m_RefUmIdsIsSet = false; - m_AllUmIds = false; - m_AllUmIdsIsSet = false; -} - -void RequestedUsageData::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RequestedUsageData::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool RequestedUsageData::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "RequestedUsageData" : pathPrefix; - - if (refUmIdsIsSet()) { - const std::vector<std::string>& value = m_RefUmIds; - const std::string currentValuePath = _pathPrefix + ".refUmIds"; - - 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 RequestedUsageData::operator==(const RequestedUsageData& rhs) const { - return - - ((!refUmIdsIsSet() && !rhs.refUmIdsIsSet()) || - (refUmIdsIsSet() && rhs.refUmIdsIsSet() && - getRefUmIds() == rhs.getRefUmIds())) && - - ((!allUmIdsIsSet() && !rhs.allUmIdsIsSet()) || - (allUmIdsIsSet() && rhs.allUmIdsIsSet() && - isAllUmIds() == rhs.isAllUmIds())) - - ; -} - -bool RequestedUsageData::operator!=(const RequestedUsageData& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RequestedUsageData& o) { - j = nlohmann::json(); - if (o.refUmIdsIsSet() || !o.m_RefUmIds.empty()) j["refUmIds"] = o.m_RefUmIds; - if (o.allUmIdsIsSet()) j["allUmIds"] = o.m_AllUmIds; -} - -void from_json(const nlohmann::json& j, RequestedUsageData& o) { - if (j.find("refUmIds") != j.end()) { - j.at("refUmIds").get_to(o.m_RefUmIds); - o.m_RefUmIdsIsSet = true; - } - if (j.find("allUmIds") != j.end()) { - j.at("allUmIds").get_to(o.m_AllUmIds); - o.m_AllUmIdsIsSet = true; - } -} - -std::vector<std::string> RequestedUsageData::getRefUmIds() const { - return m_RefUmIds; -} -void RequestedUsageData::setRefUmIds(std::vector<std::string> const& value) { - m_RefUmIds = value; - m_RefUmIdsIsSet = true; -} -bool RequestedUsageData::refUmIdsIsSet() const { - return m_RefUmIdsIsSet; -} -void RequestedUsageData::unsetRefUmIds() { - m_RefUmIdsIsSet = false; -} -bool RequestedUsageData::isAllUmIds() const { - return m_AllUmIds; -} -void RequestedUsageData::setAllUmIds(bool const value) { - m_AllUmIds = value; - m_AllUmIdsIsSet = true; -} -bool RequestedUsageData::allUmIdsIsSet() const { - return m_AllUmIdsIsSet; -} -void RequestedUsageData::unsetAllUmIds() { - m_AllUmIdsIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/RequestedUsageData.h b/src/api-server/model/RequestedUsageData.h deleted file mode 100644 index cce499da598ff652f7191653c2d4785c108d6c15..0000000000000000000000000000000000000000 --- a/src/api-server/model/RequestedUsageData.h +++ /dev/null @@ -1,95 +0,0 @@ -/** - * 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. - */ -/* - * RequestedUsageData.h - * - * - */ - -#ifndef RequestedUsageData_H_ -#define RequestedUsageData_H_ - -#include <string> -#include <vector> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class RequestedUsageData { - public: - RequestedUsageData(); - virtual ~RequestedUsageData() = 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 RequestedUsageData& rhs) const; - bool operator!=(const RequestedUsageData& rhs) const; - - ///////////////////////////////////////////// - /// RequestedUsageData members - - /// <summary> - /// An array of usage monitoring data id references to the usage monitoring - /// data instances for which the PCF is requesting a usage report. This - /// attribute shall only be provided when allUmIds is not set to true. - /// </summary> - std::vector<std::string> getRefUmIds() const; - void setRefUmIds(std::vector<std::string> const& value); - bool refUmIdsIsSet() const; - void unsetRefUmIds(); - /// <summary> - /// Thooleanean indicates whether requested usage data applies to all usage - /// monitoring data instances. When it's not included, it means requested - /// usage data shall only apply to the usage monitoring data instances - /// referenced by the refUmIds attribute. - /// </summary> - bool isAllUmIds() const; - void setAllUmIds(bool const value); - bool allUmIdsIsSet() const; - void unsetAllUmIds(); - - friend void to_json(nlohmann::json& j, const RequestedUsageData& o); - friend void from_json(const nlohmann::json& j, RequestedUsageData& o); - - protected: - std::vector<std::string> m_RefUmIds; - bool m_RefUmIdsIsSet; - bool m_AllUmIds; - bool m_AllUmIdsIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* RequestedUsageData_H_ */ diff --git a/src/api-server/model/RuleOperation.cpp b/src/api-server/model/RuleOperation.cpp deleted file mode 100644 index 4e905fe3961b23a5661c7a2fcc18cc2996b63b63..0000000000000000000000000000000000000000 --- a/src/api-server/model/RuleOperation.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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 "RuleOperation.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -RuleOperation::RuleOperation() {} - -void RuleOperation::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RuleOperation::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool RuleOperation::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "RuleOperation" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool RuleOperation::operator==(const RuleOperation& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool RuleOperation::operator!=(const RuleOperation& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RuleOperation& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, RuleOperation& o) { - from_json(j, o.m_value); -} - -RuleOperation_anyOf RuleOperation::getValue() const { - return m_value; -} - -void RuleOperation::setValue(RuleOperation_anyOf value) { - m_value = value; -} - -RuleOperation_anyOf::eRuleOperation_anyOf RuleOperation::getEnumValue() const { - return m_value.getValue(); -} - -void RuleOperation::setEnumValue( - RuleOperation_anyOf::eRuleOperation_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/RuleOperation.h b/src/api-server/model/RuleOperation.h deleted file mode 100644 index ea646aa3015b0e535e2d1fd10a843579889a849b..0000000000000000000000000000000000000000 --- a/src/api-server/model/RuleOperation.h +++ /dev/null @@ -1,96 +0,0 @@ -/** - * 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. - */ -/* - * RuleOperation.h - * - * Possible values are - CREATE_PCC_RULE: Indicates to create a new PCC rule to - * reserve the resource requested by the UE. - DELETE_PCC_RULE: Indicates to - * delete a PCC rule corresponding to reserve the resource requested by the UE.. - * - MODIFY_PCC_RULE_AND_ADD_PACKET_FILTERS: Indicates to modify the PCC rule by - * adding new packet filter(s). - MODIFY_ PCC_RULE_AND_REPLACE_PACKET_FILTERS: - * Indicates to modify the PCC rule by replacing the existing packet filter(s). - * - MODIFY_ PCC_RULE_AND_DELETE_PACKET_FILTERS: Indicates to modify the PCC - * rule by deleting the existing packet filter(s). - - * MODIFY_PCC_RULE_WITHOUT_MODIFY_PACKET_FILTERS: Indicates to modify the PCC - * rule by modifying the QoS of the PCC rule. - */ - -#ifndef RuleOperation_H_ -#define RuleOperation_H_ - -#include "RuleOperation_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// Possible values are - CREATE_PCC_RULE: Indicates to create a new PCC rule to -/// reserve the resource requested by the UE. - DELETE_PCC_RULE: Indicates to -/// delete a PCC rule corresponding to reserve the resource requested by the -/// UE.. - MODIFY_PCC_RULE_AND_ADD_PACKET_FILTERS: Indicates to modify the PCC -/// rule by adding new packet filter(s). - MODIFY_ -/// PCC_RULE_AND_REPLACE_PACKET_FILTERS: Indicates to modify the PCC rule by -/// replacing the existing packet filter(s). - MODIFY_ -/// PCC_RULE_AND_DELETE_PACKET_FILTERS: Indicates to modify the PCC rule by -/// deleting the existing packet filter(s). - -/// MODIFY_PCC_RULE_WITHOUT_MODIFY_PACKET_FILTERS: Indicates to modify the PCC -/// rule by modifying the QoS of the PCC rule. -/// </summary> -class RuleOperation { - public: - RuleOperation(); - virtual ~RuleOperation() = 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 RuleOperation& rhs) const; - bool operator!=(const RuleOperation& rhs) const; - - ///////////////////////////////////////////// - /// RuleOperation members - - RuleOperation_anyOf getValue() const; - void setValue(RuleOperation_anyOf value); - RuleOperation_anyOf::eRuleOperation_anyOf getEnumValue() const; - void setEnumValue(RuleOperation_anyOf::eRuleOperation_anyOf value); - friend void to_json(nlohmann::json& j, const RuleOperation& o); - friend void from_json(const nlohmann::json& j, RuleOperation& o); - friend void to_json(nlohmann::json& j, const RuleOperation_anyOf& o); - friend void from_json(const nlohmann::json& j, RuleOperation_anyOf& o); - - protected: - RuleOperation_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* RuleOperation_H_ */ diff --git a/src/api-server/model/RuleOperation_anyOf.cpp b/src/api-server/model/RuleOperation_anyOf.cpp deleted file mode 100644 index b2c2bb5b48dbf0c9c188bf7508e1c73449dc2cf8..0000000000000000000000000000000000000000 --- a/src/api-server/model/RuleOperation_anyOf.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/** - * 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 "RuleOperation_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -RuleOperation_anyOf::RuleOperation_anyOf() {} - -void RuleOperation_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RuleOperation_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool RuleOperation_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "RuleOperation_anyOf" : pathPrefix; - - if (m_value == RuleOperation_anyOf::eRuleOperation_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool RuleOperation_anyOf::operator==(const RuleOperation_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool RuleOperation_anyOf::operator!=(const RuleOperation_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RuleOperation_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case RuleOperation_anyOf::eRuleOperation_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case RuleOperation_anyOf::eRuleOperation_anyOf::CREATE_PCC_RULE: - j = "CREATE_PCC_RULE"; - break; - case RuleOperation_anyOf::eRuleOperation_anyOf::DELETE_PCC_RULE: - j = "DELETE_PCC_RULE"; - break; - case RuleOperation_anyOf::eRuleOperation_anyOf:: - MODIFY_PCC_RULE_AND_ADD_PACKET_FILTERS: - j = "MODIFY_PCC_RULE_AND_ADD_PACKET_FILTERS"; - break; - case RuleOperation_anyOf::eRuleOperation_anyOf:: - MODIFY__PCC_RULE_AND_REPLACE_PACKET_FILTERS: - j = "MODIFY_ PCC_RULE_AND_REPLACE_PACKET_FILTERS"; - break; - case RuleOperation_anyOf::eRuleOperation_anyOf:: - MODIFY__PCC_RULE_AND_DELETE_PACKET_FILTERS: - j = "MODIFY_ PCC_RULE_AND_DELETE_PACKET_FILTERS"; - break; - case RuleOperation_anyOf::eRuleOperation_anyOf:: - MODIFY_PCC_RULE_WITHOUT_MODIFY_PACKET_FILTERS: - j = "MODIFY_PCC_RULE_WITHOUT_MODIFY_PACKET_FILTERS"; - break; - } -} - -void from_json(const nlohmann::json& j, RuleOperation_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "CREATE_PCC_RULE") { - o.setValue(RuleOperation_anyOf::eRuleOperation_anyOf::CREATE_PCC_RULE); - } else if (s == "DELETE_PCC_RULE") { - o.setValue(RuleOperation_anyOf::eRuleOperation_anyOf::DELETE_PCC_RULE); - } else if (s == "MODIFY_PCC_RULE_AND_ADD_PACKET_FILTERS") { - o.setValue(RuleOperation_anyOf::eRuleOperation_anyOf:: - MODIFY_PCC_RULE_AND_ADD_PACKET_FILTERS); - } else if (s == "MODIFY_ PCC_RULE_AND_REPLACE_PACKET_FILTERS") { - o.setValue(RuleOperation_anyOf::eRuleOperation_anyOf:: - MODIFY__PCC_RULE_AND_REPLACE_PACKET_FILTERS); - } else if (s == "MODIFY_ PCC_RULE_AND_DELETE_PACKET_FILTERS") { - o.setValue(RuleOperation_anyOf::eRuleOperation_anyOf:: - MODIFY__PCC_RULE_AND_DELETE_PACKET_FILTERS); - } else if (s == "MODIFY_PCC_RULE_WITHOUT_MODIFY_PACKET_FILTERS") { - o.setValue(RuleOperation_anyOf::eRuleOperation_anyOf:: - MODIFY_PCC_RULE_WITHOUT_MODIFY_PACKET_FILTERS); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " RuleOperation_anyOf::eRuleOperation_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -RuleOperation_anyOf::eRuleOperation_anyOf RuleOperation_anyOf::getValue() - const { - return m_value; -} -void RuleOperation_anyOf::setValue( - RuleOperation_anyOf::eRuleOperation_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/RuleOperation_anyOf.h b/src/api-server/model/RuleOperation_anyOf.h deleted file mode 100644 index c9af1267da811c859e305f34013b23779a0fdeb8..0000000000000000000000000000000000000000 --- a/src/api-server/model/RuleOperation_anyOf.h +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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. - */ -/* - * RuleOperation_anyOf.h - * - * - */ - -#ifndef RuleOperation_anyOf_H_ -#define RuleOperation_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class RuleOperation_anyOf { - public: - RuleOperation_anyOf(); - virtual ~RuleOperation_anyOf() = default; - - enum class eRuleOperation_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - CREATE_PCC_RULE, - DELETE_PCC_RULE, - MODIFY_PCC_RULE_AND_ADD_PACKET_FILTERS, - MODIFY__PCC_RULE_AND_REPLACE_PACKET_FILTERS, - MODIFY__PCC_RULE_AND_DELETE_PACKET_FILTERS, - MODIFY_PCC_RULE_WITHOUT_MODIFY_PACKET_FILTERS - }; - - /// <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 RuleOperation_anyOf& rhs) const; - bool operator!=(const RuleOperation_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// RuleOperation_anyOf members - - RuleOperation_anyOf::eRuleOperation_anyOf getValue() const; - void setValue(RuleOperation_anyOf::eRuleOperation_anyOf value); - - friend void to_json(nlohmann::json& j, const RuleOperation_anyOf& o); - friend void from_json(const nlohmann::json& j, RuleOperation_anyOf& o); - - protected: - RuleOperation_anyOf::eRuleOperation_anyOf m_value = RuleOperation_anyOf:: - eRuleOperation_anyOf::INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* RuleOperation_anyOf_H_ */ diff --git a/src/api-server/model/RuleReport.cpp b/src/api-server/model/RuleReport.cpp deleted file mode 100644 index 3fe437b35645bb293970f8dbf2a13f3ffd5a0c57..0000000000000000000000000000000000000000 --- a/src/api-server/model/RuleReport.cpp +++ /dev/null @@ -1,247 +0,0 @@ -/** - * 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 "RuleReport.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -RuleReport::RuleReport() { - m_ContVersIsSet = false; - m_FailureCodeIsSet = false; - m_FinUnitActIsSet = false; - m_RanNasRelCausesIsSet = false; -} - -void RuleReport::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RuleReport::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool RuleReport::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "RuleReport" : pathPrefix; - - /* PccRuleIds */ { - const std::vector<std::string>& value = m_PccRuleIds; - const std::string currentValuePath = _pathPrefix + ".pccRuleIds"; - - 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 (contVersIsSet()) { - const std::vector<int32_t>& value = m_ContVers; - const std::string currentValuePath = _pathPrefix + ".contVers"; - - 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 int32_t& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - i++; - } - } - */ - } - - if (ranNasRelCausesIsSet()) { - const std::vector<RanNasRelCause>& value = m_RanNasRelCauses; - const std::string currentValuePath = _pathPrefix + ".ranNasRelCauses"; - - 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 RanNasRelCause& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".ranNasRelCauses") && - success; - - i++; - } - } - } - - return success; -} - -bool RuleReport::operator==(const RuleReport& rhs) const { - return - - (getPccRuleIds() == rhs.getPccRuleIds()) && - - (getRuleStatus() == rhs.getRuleStatus()) && - - ((!contVersIsSet() && !rhs.contVersIsSet()) || - (contVersIsSet() && rhs.contVersIsSet() && - getContVers() == rhs.getContVers())) && - - ((!failureCodeIsSet() && !rhs.failureCodeIsSet()) || - (failureCodeIsSet() && rhs.failureCodeIsSet() && - getFailureCode() == rhs.getFailureCode())) && - - ((!finUnitActIsSet() && !rhs.finUnitActIsSet()) || - (finUnitActIsSet() && rhs.finUnitActIsSet() && - getFinUnitAct() == rhs.getFinUnitAct())) && - - ((!ranNasRelCausesIsSet() && !rhs.ranNasRelCausesIsSet()) || - (ranNasRelCausesIsSet() && rhs.ranNasRelCausesIsSet() && - getRanNasRelCauses() == rhs.getRanNasRelCauses())) - - ; -} - -bool RuleReport::operator!=(const RuleReport& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RuleReport& o) { - j = nlohmann::json(); - j["pccRuleIds"] = o.m_PccRuleIds; - j["ruleStatus"] = o.m_RuleStatus; - if (o.contVersIsSet() || !o.m_ContVers.empty()) j["contVers"] = o.m_ContVers; - if (o.failureCodeIsSet()) j["failureCode"] = o.m_FailureCode; - if (o.finUnitActIsSet()) j["finUnitAct"] = o.m_FinUnitAct; - if (o.ranNasRelCausesIsSet() || !o.m_RanNasRelCauses.empty()) - j["ranNasRelCauses"] = o.m_RanNasRelCauses; -} - -void from_json(const nlohmann::json& j, RuleReport& o) { - j.at("pccRuleIds").get_to(o.m_PccRuleIds); - j.at("ruleStatus").get_to(o.m_RuleStatus); - if (j.find("contVers") != j.end()) { - j.at("contVers").get_to(o.m_ContVers); - o.m_ContVersIsSet = true; - } - if (j.find("failureCode") != j.end()) { - j.at("failureCode").get_to(o.m_FailureCode); - o.m_FailureCodeIsSet = true; - } - if (j.find("finUnitAct") != j.end()) { - j.at("finUnitAct").get_to(o.m_FinUnitAct); - o.m_FinUnitActIsSet = true; - } - if (j.find("ranNasRelCauses") != j.end()) { - j.at("ranNasRelCauses").get_to(o.m_RanNasRelCauses); - o.m_RanNasRelCausesIsSet = true; - } -} - -std::vector<std::string> RuleReport::getPccRuleIds() const { - return m_PccRuleIds; -} -void RuleReport::setPccRuleIds(std::vector<std::string> const& value) { - m_PccRuleIds = value; -} -RuleStatus RuleReport::getRuleStatus() const { - return m_RuleStatus; -} -void RuleReport::setRuleStatus(RuleStatus const& value) { - m_RuleStatus = value; -} -std::vector<int32_t> RuleReport::getContVers() const { - return m_ContVers; -} -void RuleReport::setContVers(std::vector<int32_t> const value) { - m_ContVers = value; - m_ContVersIsSet = true; -} -bool RuleReport::contVersIsSet() const { - return m_ContVersIsSet; -} -void RuleReport::unsetContVers() { - m_ContVersIsSet = false; -} -FailureCode RuleReport::getFailureCode() const { - return m_FailureCode; -} -void RuleReport::setFailureCode(FailureCode const& value) { - m_FailureCode = value; - m_FailureCodeIsSet = true; -} -bool RuleReport::failureCodeIsSet() const { - return m_FailureCodeIsSet; -} -void RuleReport::unsetFailureCode() { - m_FailureCodeIsSet = false; -} -FinalUnitAction RuleReport::getFinUnitAct() const { - return m_FinUnitAct; -} -void RuleReport::setFinUnitAct(FinalUnitAction const& value) { - m_FinUnitAct = value; - m_FinUnitActIsSet = true; -} -bool RuleReport::finUnitActIsSet() const { - return m_FinUnitActIsSet; -} -void RuleReport::unsetFinUnitAct() { - m_FinUnitActIsSet = false; -} -std::vector<RanNasRelCause> RuleReport::getRanNasRelCauses() const { - return m_RanNasRelCauses; -} -void RuleReport::setRanNasRelCauses(std::vector<RanNasRelCause> const& value) { - m_RanNasRelCauses = value; - m_RanNasRelCausesIsSet = true; -} -bool RuleReport::ranNasRelCausesIsSet() const { - return m_RanNasRelCausesIsSet; -} -void RuleReport::unsetRanNasRelCauses() { - m_RanNasRelCausesIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/RuleReport.h b/src/api-server/model/RuleReport.h deleted file mode 100644 index d434ba3c518cce85df999a8721c04d7f35b2af3b..0000000000000000000000000000000000000000 --- a/src/api-server/model/RuleReport.h +++ /dev/null @@ -1,126 +0,0 @@ -/** - * 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. - */ -/* - * RuleReport.h - * - * - */ - -#ifndef RuleReport_H_ -#define RuleReport_H_ - -#include "RuleStatus.h" -#include <string> -#include "FailureCode.h" -#include "FinalUnitAction.h" -#include <vector> -#include "RanNasRelCause.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class RuleReport { - public: - RuleReport(); - virtual ~RuleReport() = 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 RuleReport& rhs) const; - bool operator!=(const RuleReport& rhs) const; - - ///////////////////////////////////////////// - /// RuleReport members - - /// <summary> - /// Contains the identifier of the affected PCC rule(s). - /// </summary> - std::vector<std::string> getPccRuleIds() const; - void setPccRuleIds(std::vector<std::string> const& value); - /// <summary> - /// - /// </summary> - RuleStatus getRuleStatus() const; - void setRuleStatus(RuleStatus const& value); - /// <summary> - /// Indicates the version of a PCC rule. - /// </summary> - std::vector<int32_t> getContVers() const; - void setContVers(std::vector<int32_t> const value); - bool contVersIsSet() const; - void unsetContVers(); - /// <summary> - /// - /// </summary> - FailureCode getFailureCode() const; - void setFailureCode(FailureCode const& value); - bool failureCodeIsSet() const; - void unsetFailureCode(); - /// <summary> - /// - /// </summary> - FinalUnitAction getFinUnitAct() const; - void setFinUnitAct(FinalUnitAction const& value); - bool finUnitActIsSet() const; - void unsetFinUnitAct(); - /// <summary> - /// indicates the RAN or NAS release cause code information. - /// </summary> - std::vector<RanNasRelCause> getRanNasRelCauses() const; - void setRanNasRelCauses(std::vector<RanNasRelCause> const& value); - bool ranNasRelCausesIsSet() const; - void unsetRanNasRelCauses(); - - friend void to_json(nlohmann::json& j, const RuleReport& o); - friend void from_json(const nlohmann::json& j, RuleReport& o); - - protected: - std::vector<std::string> m_PccRuleIds; - - RuleStatus m_RuleStatus; - - std::vector<int32_t> m_ContVers; - bool m_ContVersIsSet; - FailureCode m_FailureCode; - bool m_FailureCodeIsSet; - FinalUnitAction m_FinUnitAct; - bool m_FinUnitActIsSet; - std::vector<RanNasRelCause> m_RanNasRelCauses; - bool m_RanNasRelCausesIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* RuleReport_H_ */ diff --git a/src/api-server/model/RuleStatus.cpp b/src/api-server/model/RuleStatus.cpp deleted file mode 100644 index e66fdc993b3de2159b2376b2897402606a392a3d..0000000000000000000000000000000000000000 --- a/src/api-server/model/RuleStatus.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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 "RuleStatus.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -RuleStatus::RuleStatus() {} - -void RuleStatus::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RuleStatus::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool RuleStatus::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "RuleStatus" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool RuleStatus::operator==(const RuleStatus& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool RuleStatus::operator!=(const RuleStatus& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RuleStatus& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, RuleStatus& o) { - from_json(j, o.m_value); -} - -RuleStatus_anyOf RuleStatus::getValue() const { - return m_value; -} - -void RuleStatus::setValue(RuleStatus_anyOf value) { - m_value = value; -} - -RuleStatus_anyOf::eRuleStatus_anyOf RuleStatus::getEnumValue() const { - return m_value.getValue(); -} - -void RuleStatus::setEnumValue(RuleStatus_anyOf::eRuleStatus_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/RuleStatus.h b/src/api-server/model/RuleStatus.h deleted file mode 100644 index d3b4e36afb8bda2fdcf2c15355706e90cbf97b4c..0000000000000000000000000000000000000000 --- a/src/api-server/model/RuleStatus.h +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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. - */ -/* - * RuleStatus.h - * - * Possible values are - ACTIVE: Indicates that the PCC rule(s) are successfully - * installed (for those provisioned from PCF) or activated (for those - * pre-defined in SMF), or the session rule(s) are successfully installed - - * INACTIVE: Indicates that the PCC rule(s) are removed (for those provisioned - * from PCF) or inactive (for those pre-defined in SMF) or the session rule(s) - * are removed. - */ - -#ifndef RuleStatus_H_ -#define RuleStatus_H_ - -#include "RuleStatus_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// Possible values are - ACTIVE: Indicates that the PCC rule(s) are -/// successfully installed (for those provisioned from PCF) or activated (for -/// those pre-defined in SMF), or the session rule(s) are successfully installed -/// - INACTIVE: Indicates that the PCC rule(s) are removed (for those -/// provisioned from PCF) or inactive (for those pre-defined in SMF) or the -/// session rule(s) are removed. -/// </summary> -class RuleStatus { - public: - RuleStatus(); - virtual ~RuleStatus() = 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 RuleStatus& rhs) const; - bool operator!=(const RuleStatus& rhs) const; - - ///////////////////////////////////////////// - /// RuleStatus members - - RuleStatus_anyOf getValue() const; - void setValue(RuleStatus_anyOf value); - RuleStatus_anyOf::eRuleStatus_anyOf getEnumValue() const; - void setEnumValue(RuleStatus_anyOf::eRuleStatus_anyOf value); - friend void to_json(nlohmann::json& j, const RuleStatus& o); - friend void from_json(const nlohmann::json& j, RuleStatus& o); - friend void to_json(nlohmann::json& j, const RuleStatus_anyOf& o); - friend void from_json(const nlohmann::json& j, RuleStatus_anyOf& o); - - protected: - RuleStatus_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* RuleStatus_H_ */ diff --git a/src/api-server/model/RuleStatus_anyOf.cpp b/src/api-server/model/RuleStatus_anyOf.cpp deleted file mode 100644 index b0afcf6d029badb69e9061ae8b54cb3d6c0e28cc..0000000000000000000000000000000000000000 --- a/src/api-server/model/RuleStatus_anyOf.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/** - * 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 "RuleStatus_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -RuleStatus_anyOf::RuleStatus_anyOf() {} - -void RuleStatus_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RuleStatus_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool RuleStatus_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "RuleStatus_anyOf" : pathPrefix; - - if (m_value == - RuleStatus_anyOf::eRuleStatus_anyOf::INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool RuleStatus_anyOf::operator==(const RuleStatus_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool RuleStatus_anyOf::operator!=(const RuleStatus_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RuleStatus_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case RuleStatus_anyOf::eRuleStatus_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case RuleStatus_anyOf::eRuleStatus_anyOf::ACTIVE: - j = "ACTIVE"; - break; - case RuleStatus_anyOf::eRuleStatus_anyOf::INACTIVE: - j = "INACTIVE"; - break; - } -} - -void from_json(const nlohmann::json& j, RuleStatus_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "ACTIVE") { - o.setValue(RuleStatus_anyOf::eRuleStatus_anyOf::ACTIVE); - } else if (s == "INACTIVE") { - o.setValue(RuleStatus_anyOf::eRuleStatus_anyOf::INACTIVE); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " RuleStatus_anyOf::eRuleStatus_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -RuleStatus_anyOf::eRuleStatus_anyOf RuleStatus_anyOf::getValue() const { - return m_value; -} -void RuleStatus_anyOf::setValue(RuleStatus_anyOf::eRuleStatus_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/RuleStatus_anyOf.h b/src/api-server/model/RuleStatus_anyOf.h deleted file mode 100644 index e3a4ec786e30710b723c555eaf8532406b712d5c..0000000000000000000000000000000000000000 --- a/src/api-server/model/RuleStatus_anyOf.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 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. - */ -/* - * RuleStatus_anyOf.h - * - * - */ - -#ifndef RuleStatus_anyOf_H_ -#define RuleStatus_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class RuleStatus_anyOf { - public: - RuleStatus_anyOf(); - virtual ~RuleStatus_anyOf() = default; - - enum class eRuleStatus_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - ACTIVE, - INACTIVE - }; - - /// <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 RuleStatus_anyOf& rhs) const; - bool operator!=(const RuleStatus_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// RuleStatus_anyOf members - - RuleStatus_anyOf::eRuleStatus_anyOf getValue() const; - void setValue(RuleStatus_anyOf::eRuleStatus_anyOf value); - - friend void to_json(nlohmann::json& j, const RuleStatus_anyOf& o); - friend void from_json(const nlohmann::json& j, RuleStatus_anyOf& o); - - protected: - RuleStatus_anyOf::eRuleStatus_anyOf m_value = - RuleStatus_anyOf::eRuleStatus_anyOf::INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* RuleStatus_anyOf_H_ */ diff --git a/src/api-server/model/ServingNfIdentity.cpp b/src/api-server/model/ServingNfIdentity.cpp deleted file mode 100644 index 9758a240a59b0618aaf8d98e22074492ca20e945..0000000000000000000000000000000000000000 --- a/src/api-server/model/ServingNfIdentity.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/** - * 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 "ServingNfIdentity.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -ServingNfIdentity::ServingNfIdentity() { - m_ServNfInstId = ""; - m_ServNfInstIdIsSet = false; - m_GuamiIsSet = false; - m_AnGwAddrIsSet = false; -} - -void ServingNfIdentity::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool ServingNfIdentity::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool ServingNfIdentity::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "ServingNfIdentity" : pathPrefix; - */ - return success; -} - -bool ServingNfIdentity::operator==(const ServingNfIdentity& rhs) const { - return - - ((!servNfInstIdIsSet() && !rhs.servNfInstIdIsSet()) || - (servNfInstIdIsSet() && rhs.servNfInstIdIsSet() && - getServNfInstId() == rhs.getServNfInstId())) && - - ((!guamiIsSet() && !rhs.guamiIsSet()) || - (guamiIsSet() && rhs.guamiIsSet() && getGuami() == rhs.getGuami())) && - - ((!anGwAddrIsSet() && !rhs.anGwAddrIsSet()) || - (anGwAddrIsSet() && rhs.anGwAddrIsSet() && - getAnGwAddr() == rhs.getAnGwAddr())) - - ; -} - -bool ServingNfIdentity::operator!=(const ServingNfIdentity& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const ServingNfIdentity& o) { - j = nlohmann::json(); - if (o.servNfInstIdIsSet()) j["servNfInstId"] = o.m_ServNfInstId; - if (o.guamiIsSet()) j["guami"] = o.m_Guami; - if (o.anGwAddrIsSet()) j["anGwAddr"] = o.m_AnGwAddr; -} - -void from_json(const nlohmann::json& j, ServingNfIdentity& o) { - if (j.find("servNfInstId") != j.end()) { - j.at("servNfInstId").get_to(o.m_ServNfInstId); - o.m_ServNfInstIdIsSet = true; - } - if (j.find("guami") != j.end()) { - j.at("guami").get_to(o.m_Guami); - o.m_GuamiIsSet = true; - } - if (j.find("anGwAddr") != j.end()) { - j.at("anGwAddr").get_to(o.m_AnGwAddr); - o.m_AnGwAddrIsSet = true; - } -} - -std::string ServingNfIdentity::getServNfInstId() const { - return m_ServNfInstId; -} -void ServingNfIdentity::setServNfInstId(std::string const& value) { - m_ServNfInstId = value; - m_ServNfInstIdIsSet = true; -} -bool ServingNfIdentity::servNfInstIdIsSet() const { - return m_ServNfInstIdIsSet; -} -void ServingNfIdentity::unsetServNfInstId() { - m_ServNfInstIdIsSet = false; -} -Guami ServingNfIdentity::getGuami() const { - return m_Guami; -} -void ServingNfIdentity::setGuami(Guami const& value) { - m_Guami = value; - m_GuamiIsSet = true; -} -bool ServingNfIdentity::guamiIsSet() const { - return m_GuamiIsSet; -} -void ServingNfIdentity::unsetGuami() { - m_GuamiIsSet = false; -} -AnGwAddress ServingNfIdentity::getAnGwAddr() const { - return m_AnGwAddr; -} -void ServingNfIdentity::setAnGwAddr(AnGwAddress const& value) { - m_AnGwAddr = value; - m_AnGwAddrIsSet = true; -} -bool ServingNfIdentity::anGwAddrIsSet() const { - return m_AnGwAddrIsSet; -} -void ServingNfIdentity::unsetAnGwAddr() { - m_AnGwAddrIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/ServingNfIdentity.h b/src/api-server/model/ServingNfIdentity.h deleted file mode 100644 index 8d4e13d371c556f613bd1977105dc60d83dec7be..0000000000000000000000000000000000000000 --- a/src/api-server/model/ServingNfIdentity.h +++ /dev/null @@ -1,100 +0,0 @@ -/** - * 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. - */ -/* - * ServingNfIdentity.h - * - * - */ - -#ifndef ServingNfIdentity_H_ -#define ServingNfIdentity_H_ - -#include <string> -#include "AnGwAddress.h" -#include "Guami.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class ServingNfIdentity { - public: - ServingNfIdentity(); - virtual ~ServingNfIdentity() = 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 ServingNfIdentity& rhs) const; - bool operator!=(const ServingNfIdentity& rhs) const; - - ///////////////////////////////////////////// - /// ServingNfIdentity members - - /// <summary> - /// - /// </summary> - std::string getServNfInstId() const; - void setServNfInstId(std::string const& value); - bool servNfInstIdIsSet() const; - void unsetServNfInstId(); - /// <summary> - /// - /// </summary> - oai::model::common::Guami getGuami() const; - void setGuami(oai::model::common::Guami const& value); - bool guamiIsSet() const; - void unsetGuami(); - /// <summary> - /// - /// </summary> - AnGwAddress getAnGwAddr() const; - void setAnGwAddr(AnGwAddress const& value); - bool anGwAddrIsSet() const; - void unsetAnGwAddr(); - - friend void to_json(nlohmann::json& j, const ServingNfIdentity& o); - friend void from_json(const nlohmann::json& j, ServingNfIdentity& o); - - protected: - std::string m_ServNfInstId; - bool m_ServNfInstIdIsSet; - oai::model::common::Guami m_Guami; - bool m_GuamiIsSet; - AnGwAddress m_AnGwAddr; - bool m_AnGwAddrIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* ServingNfIdentity_H_ */ diff --git a/src/api-server/model/SessionRule.cpp b/src/api-server/model/SessionRule.cpp deleted file mode 100644 index 3cc9effa83170898d68e13f600034d037454432b..0000000000000000000000000000000000000000 --- a/src/api-server/model/SessionRule.cpp +++ /dev/null @@ -1,199 +0,0 @@ -/** - * 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 "SessionRule.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -SessionRule::SessionRule() { - m_AuthSessAmbrIsSet = false; - m_AuthDefQosIsSet = false; - m_SessRuleId = ""; - m_RefUmData = ""; - m_RefUmDataIsSet = false; - m_RefUmN3gData = ""; - m_RefUmN3gDataIsSet = false; - m_RefCondData = ""; - m_RefCondDataIsSet = false; -} - -void SessionRule::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SessionRule::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SessionRule::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "SessionRule" : pathPrefix; - */ - return success; -} - -bool SessionRule::operator==(const SessionRule& rhs) const { - return - - ((!authSessAmbrIsSet() && !rhs.authSessAmbrIsSet()) || - (authSessAmbrIsSet() && rhs.authSessAmbrIsSet() && - getAuthSessAmbr() == rhs.getAuthSessAmbr())) && - - ((!authDefQosIsSet() && !rhs.authDefQosIsSet()) || - (authDefQosIsSet() && rhs.authDefQosIsSet() && - getAuthDefQos() == rhs.getAuthDefQos())) && - - (getSessRuleId() == rhs.getSessRuleId()) && - - ((!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())) - - ; -} - -bool SessionRule::operator!=(const SessionRule& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SessionRule& o) { - j = nlohmann::json(); - if (o.authSessAmbrIsSet()) j["authSessAmbr"] = o.m_AuthSessAmbr; - if (o.authDefQosIsSet()) j["authDefQos"] = o.m_AuthDefQos; - j["sessRuleId"] = o.m_SessRuleId; - if (o.refUmDataIsSet()) j["refUmData"] = o.m_RefUmData; - if (o.refUmN3gDataIsSet()) j["refUmN3gData"] = o.m_RefUmN3gData; - if (o.refCondDataIsSet()) j["refCondData"] = o.m_RefCondData; -} - -void from_json(const nlohmann::json& j, SessionRule& o) { - if (j.find("authSessAmbr") != j.end()) { - j.at("authSessAmbr").get_to(o.m_AuthSessAmbr); - o.m_AuthSessAmbrIsSet = true; - } - if (j.find("authDefQos") != j.end()) { - j.at("authDefQos").get_to(o.m_AuthDefQos); - o.m_AuthDefQosIsSet = true; - } - j.at("sessRuleId").get_to(o.m_SessRuleId); - 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; - } -} - -Ambr SessionRule::getAuthSessAmbr() const { - return m_AuthSessAmbr; -} -void SessionRule::setAuthSessAmbr(Ambr const& value) { - m_AuthSessAmbr = value; - m_AuthSessAmbrIsSet = true; -} -bool SessionRule::authSessAmbrIsSet() const { - return m_AuthSessAmbrIsSet; -} -void SessionRule::unsetAuthSessAmbr() { - m_AuthSessAmbrIsSet = false; -} -AuthorizedDefaultQos SessionRule::getAuthDefQos() const { - return m_AuthDefQos; -} -void SessionRule::setAuthDefQos(AuthorizedDefaultQos const& value) { - m_AuthDefQos = value; - m_AuthDefQosIsSet = true; -} -bool SessionRule::authDefQosIsSet() const { - return m_AuthDefQosIsSet; -} -void SessionRule::unsetAuthDefQos() { - m_AuthDefQosIsSet = false; -} -std::string SessionRule::getSessRuleId() const { - return m_SessRuleId; -} -void SessionRule::setSessRuleId(std::string const& value) { - m_SessRuleId = value; -} -std::string SessionRule::getRefUmData() const { - return m_RefUmData; -} -void SessionRule::setRefUmData(std::string const& value) { - m_RefUmData = value; - m_RefUmDataIsSet = true; -} -bool SessionRule::refUmDataIsSet() const { - return m_RefUmDataIsSet; -} -void SessionRule::unsetRefUmData() { - m_RefUmDataIsSet = false; -} -std::string SessionRule::getRefUmN3gData() const { - return m_RefUmN3gData; -} -void SessionRule::setRefUmN3gData(std::string const& value) { - m_RefUmN3gData = value; - m_RefUmN3gDataIsSet = true; -} -bool SessionRule::refUmN3gDataIsSet() const { - return m_RefUmN3gDataIsSet; -} -void SessionRule::unsetRefUmN3gData() { - m_RefUmN3gDataIsSet = false; -} -std::string SessionRule::getRefCondData() const { - return m_RefCondData; -} -void SessionRule::setRefCondData(std::string const& value) { - m_RefCondData = value; - m_RefCondDataIsSet = true; -} -bool SessionRule::refCondDataIsSet() const { - return m_RefCondDataIsSet; -} -void SessionRule::unsetRefCondData() { - m_RefCondDataIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SessionRule.h b/src/api-server/model/SessionRule.h deleted file mode 100644 index b7297490a5a7a0c2a09c989727146eb49aaebf18..0000000000000000000000000000000000000000 --- a/src/api-server/model/SessionRule.h +++ /dev/null @@ -1,128 +0,0 @@ -/** - * 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. - */ -/* - * SessionRule.h - * - * - */ - -#ifndef SessionRule_H_ -#define SessionRule_H_ - -#include "Ambr.h" -#include "AuthorizedDefaultQos.h" -#include <string> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class SessionRule { - public: - SessionRule(); - virtual ~SessionRule() = 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 SessionRule& rhs) const; - bool operator!=(const SessionRule& rhs) const; - - ///////////////////////////////////////////// - /// SessionRule members - - /// <summary> - /// - /// </summary> - oai::model::common::Ambr getAuthSessAmbr() const; - void setAuthSessAmbr(oai::model::common::Ambr const& value); - bool authSessAmbrIsSet() const; - void unsetAuthSessAmbr(); - /// <summary> - /// - /// </summary> - AuthorizedDefaultQos getAuthDefQos() const; - void setAuthDefQos(AuthorizedDefaultQos const& value); - bool authDefQosIsSet() const; - void unsetAuthDefQos(); - /// <summary> - /// Univocally identifies the session rule within a PDU session. - /// </summary> - std::string getSessRuleId() const; - void setSessRuleId(std::string const& value); - /// <summary> - /// A reference to UsageMonitoringData policy decision type. It is the umId - /// described in subclause 5.6.2.12. - /// </summary> - std::string getRefUmData() const; - void setRefUmData(std::string const& value); - bool refUmDataIsSet() const; - void unsetRefUmData(); - /// <summary> - /// A reference to UsageMonitoringData policy decision type to apply for - /// Non-3GPP access. It is the umId described in subclause 5.6.2.12. - /// </summary> - std::string getRefUmN3gData() const; - void setRefUmN3gData(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(); - - friend void to_json(nlohmann::json& j, const SessionRule& o); - friend void from_json(const nlohmann::json& j, SessionRule& o); - - protected: - oai::model::common::Ambr m_AuthSessAmbr; - bool m_AuthSessAmbrIsSet; - AuthorizedDefaultQos m_AuthDefQos; - bool m_AuthDefQosIsSet; - std::string m_SessRuleId; - - std::string m_RefUmData; - bool m_RefUmDataIsSet; - std::string m_RefUmN3gData; - bool m_RefUmN3gDataIsSet; - std::string m_RefCondData; - bool m_RefCondDataIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SessionRule_H_ */ diff --git a/src/api-server/model/SessionRuleFailureCode.cpp b/src/api-server/model/SessionRuleFailureCode.cpp deleted file mode 100644 index c05e92189c80498809b8c493efccd8cd9b4e864c..0000000000000000000000000000000000000000 --- a/src/api-server/model/SessionRuleFailureCode.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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 "SessionRuleFailureCode.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -SessionRuleFailureCode::SessionRuleFailureCode() {} - -void SessionRuleFailureCode::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SessionRuleFailureCode::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SessionRuleFailureCode::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "SessionRuleFailureCode" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool SessionRuleFailureCode::operator==( - const SessionRuleFailureCode& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool SessionRuleFailureCode::operator!=( - const SessionRuleFailureCode& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SessionRuleFailureCode& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, SessionRuleFailureCode& o) { - from_json(j, o.m_value); -} - -SessionRuleFailureCode_anyOf SessionRuleFailureCode::getValue() const { - return m_value; -} - -void SessionRuleFailureCode::setValue(SessionRuleFailureCode_anyOf value) { - m_value = value; -} - -SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf -SessionRuleFailureCode::getEnumValue() const { - return m_value.getValue(); -} - -void SessionRuleFailureCode::setEnumValue( - SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SessionRuleFailureCode.h b/src/api-server/model/SessionRuleFailureCode.h deleted file mode 100644 index 82c6c8b7b7600ff4a98d6d507cc05b16fa2b1b78..0000000000000000000000000000000000000000 --- a/src/api-server/model/SessionRuleFailureCode.h +++ /dev/null @@ -1,96 +0,0 @@ -/** - * 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. - */ -/* - * SessionRuleFailureCode.h - * - * Possible values are - NF_MAL: Indicate that the PCC rule could not be - * successfully installed (for those provisioned from the PCF) or activated (for - * those pre-defined in SMF) or enforced (for those already successfully - * installed) due to SMF/UPF malfunction. - RES_LIM: Indicate that the PCC - * rule could not be successfully installed (for those provisioned from PCF) or - * activated (for those pre-defined in SMF) or enforced (for those already - * successfully installed) due to a limitation of resources at the SMF/UPF. - - * UNSUCC_QOS_VAL: indicate that the QoS validation has failed. - UE_STA_SUSP: - * Indicates that the UE is in suspend state. - */ - -#ifndef SessionRuleFailureCode_H_ -#define SessionRuleFailureCode_H_ - -#include "SessionRuleFailureCode_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// Possible values are - NF_MAL: Indicate that the PCC rule could not be -/// successfully installed (for those provisioned from the PCF) or activated -/// (for those pre-defined in SMF) or enforced (for those already successfully -/// installed) due to SMF/UPF malfunction. - RES_LIM: Indicate that the PCC -/// rule could not be successfully installed (for those provisioned from PCF) or -/// activated (for those pre-defined in SMF) or enforced (for those already -/// successfully installed) due to a limitation of resources at the SMF/UPF. - -/// UNSUCC_QOS_VAL: indicate that the QoS validation has failed. - -/// UE_STA_SUSP: Indicates that the UE is in suspend state. -/// </summary> -class SessionRuleFailureCode { - public: - SessionRuleFailureCode(); - virtual ~SessionRuleFailureCode() = 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 SessionRuleFailureCode& rhs) const; - bool operator!=(const SessionRuleFailureCode& rhs) const; - - ///////////////////////////////////////////// - /// SessionRuleFailureCode members - - SessionRuleFailureCode_anyOf getValue() const; - void setValue(SessionRuleFailureCode_anyOf value); - SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf getEnumValue() - const; - void setEnumValue( - SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf value); - friend void to_json(nlohmann::json& j, const SessionRuleFailureCode& o); - friend void from_json(const nlohmann::json& j, SessionRuleFailureCode& o); - friend void to_json(nlohmann::json& j, const SessionRuleFailureCode_anyOf& o); - friend void from_json( - const nlohmann::json& j, SessionRuleFailureCode_anyOf& o); - - protected: - SessionRuleFailureCode_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SessionRuleFailureCode_H_ */ diff --git a/src/api-server/model/SessionRuleFailureCode_anyOf.cpp b/src/api-server/model/SessionRuleFailureCode_anyOf.cpp deleted file mode 100644 index 7ca6c2588fb7398d92e09cc6a4c676a913d8e872..0000000000000000000000000000000000000000 --- a/src/api-server/model/SessionRuleFailureCode_anyOf.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/** - * 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 "SessionRuleFailureCode_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -SessionRuleFailureCode_anyOf::SessionRuleFailureCode_anyOf() {} - -void SessionRuleFailureCode_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SessionRuleFailureCode_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SessionRuleFailureCode_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "SessionRuleFailureCode_anyOf" : pathPrefix; - - if (m_value == SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool SessionRuleFailureCode_anyOf::operator==( - const SessionRuleFailureCode_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool SessionRuleFailureCode_anyOf::operator!=( - const SessionRuleFailureCode_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SessionRuleFailureCode_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf::NF_MAL: - j = "NF_MAL"; - break; - case SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf::RES_LIM: - j = "RES_LIM"; - break; - case SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf:: - UNSUCC_QOS_VAL: - j = "UNSUCC_QOS_VAL"; - break; - case SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf:: - UE_STA_SUSP: - j = "UE_STA_SUSP"; - break; - } -} - -void from_json(const nlohmann::json& j, SessionRuleFailureCode_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "NF_MAL") { - o.setValue( - SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf::NF_MAL); - } else if (s == "RES_LIM") { - o.setValue( - SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf::RES_LIM); - } else if (s == "UNSUCC_QOS_VAL") { - o.setValue(SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf:: - UNSUCC_QOS_VAL); - } else if (s == "UE_STA_SUSP") { - o.setValue(SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf:: - UE_STA_SUSP); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf -SessionRuleFailureCode_anyOf::getValue() const { - return m_value; -} -void SessionRuleFailureCode_anyOf::setValue( - SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SessionRuleFailureCode_anyOf.h b/src/api-server/model/SessionRuleFailureCode_anyOf.h deleted file mode 100644 index 5cbab484b29886b2b8495b6db4596421edd2c7b3..0000000000000000000000000000000000000000 --- a/src/api-server/model/SessionRuleFailureCode_anyOf.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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. - */ -/* - * SessionRuleFailureCode_anyOf.h - * - * - */ - -#ifndef SessionRuleFailureCode_anyOf_H_ -#define SessionRuleFailureCode_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class SessionRuleFailureCode_anyOf { - public: - SessionRuleFailureCode_anyOf(); - virtual ~SessionRuleFailureCode_anyOf() = default; - - enum class eSessionRuleFailureCode_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - NF_MAL, - RES_LIM, - UNSUCC_QOS_VAL, - UE_STA_SUSP - }; - - /// <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 SessionRuleFailureCode_anyOf& rhs) const; - bool operator!=(const SessionRuleFailureCode_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// SessionRuleFailureCode_anyOf members - - SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf getValue() const; - void setValue( - SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf value); - - friend void to_json(nlohmann::json& j, const SessionRuleFailureCode_anyOf& o); - friend void from_json( - const nlohmann::json& j, SessionRuleFailureCode_anyOf& o); - - protected: - SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf m_value = - SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SessionRuleFailureCode_anyOf_H_ */ diff --git a/src/api-server/model/SessionRuleReport.cpp b/src/api-server/model/SessionRuleReport.cpp deleted file mode 100644 index b97d8391481ac5d2668246b64c3f52a852c7dc47..0000000000000000000000000000000000000000 --- a/src/api-server/model/SessionRuleReport.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/** - * 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 "SessionRuleReport.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -SessionRuleReport::SessionRuleReport() { - m_SessRuleFailureCodeIsSet = false; -} - -void SessionRuleReport::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SessionRuleReport::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SessionRuleReport::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "SessionRuleReport" : pathPrefix; - - /* RuleIds */ { - const std::vector<std::string>& value = m_RuleIds; - const std::string currentValuePath = _pathPrefix + ".ruleIds"; - - 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 SessionRuleReport::operator==(const SessionRuleReport& rhs) const { - return - - (getRuleIds() == rhs.getRuleIds()) && - - (getRuleStatus() == rhs.getRuleStatus()) && - - ((!sessRuleFailureCodeIsSet() && !rhs.sessRuleFailureCodeIsSet()) || - (sessRuleFailureCodeIsSet() && rhs.sessRuleFailureCodeIsSet() && - getSessRuleFailureCode() == rhs.getSessRuleFailureCode())) - - ; -} - -bool SessionRuleReport::operator!=(const SessionRuleReport& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SessionRuleReport& o) { - j = nlohmann::json(); - j["ruleIds"] = o.m_RuleIds; - j["ruleStatus"] = o.m_RuleStatus; - if (o.sessRuleFailureCodeIsSet()) - j["sessRuleFailureCode"] = o.m_SessRuleFailureCode; -} - -void from_json(const nlohmann::json& j, SessionRuleReport& o) { - j.at("ruleIds").get_to(o.m_RuleIds); - j.at("ruleStatus").get_to(o.m_RuleStatus); - if (j.find("sessRuleFailureCode") != j.end()) { - j.at("sessRuleFailureCode").get_to(o.m_SessRuleFailureCode); - o.m_SessRuleFailureCodeIsSet = true; - } -} - -std::vector<std::string> SessionRuleReport::getRuleIds() const { - return m_RuleIds; -} -void SessionRuleReport::setRuleIds(std::vector<std::string> const& value) { - m_RuleIds = value; -} -RuleStatus SessionRuleReport::getRuleStatus() const { - return m_RuleStatus; -} -void SessionRuleReport::setRuleStatus(RuleStatus const& value) { - m_RuleStatus = value; -} -SessionRuleFailureCode SessionRuleReport::getSessRuleFailureCode() const { - return m_SessRuleFailureCode; -} -void SessionRuleReport::setSessRuleFailureCode( - SessionRuleFailureCode const& value) { - m_SessRuleFailureCode = value; - m_SessRuleFailureCodeIsSet = true; -} -bool SessionRuleReport::sessRuleFailureCodeIsSet() const { - return m_SessRuleFailureCodeIsSet; -} -void SessionRuleReport::unsetSessRuleFailureCode() { - m_SessRuleFailureCodeIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SessionRuleReport.h b/src/api-server/model/SessionRuleReport.h deleted file mode 100644 index 026a90af7d425e853780ab14ba94aece1a680718..0000000000000000000000000000000000000000 --- a/src/api-server/model/SessionRuleReport.h +++ /dev/null @@ -1,97 +0,0 @@ -/** - * 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. - */ -/* - * SessionRuleReport.h - * - * - */ - -#ifndef SessionRuleReport_H_ -#define SessionRuleReport_H_ - -#include "RuleStatus.h" -#include <string> -#include "SessionRuleFailureCode.h" -#include <vector> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class SessionRuleReport { - public: - SessionRuleReport(); - virtual ~SessionRuleReport() = 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 SessionRuleReport& rhs) const; - bool operator!=(const SessionRuleReport& rhs) const; - - ///////////////////////////////////////////// - /// SessionRuleReport members - - /// <summary> - /// Contains the identifier of the affected session rule(s). - /// </summary> - std::vector<std::string> getRuleIds() const; - void setRuleIds(std::vector<std::string> const& value); - /// <summary> - /// - /// </summary> - RuleStatus getRuleStatus() const; - void setRuleStatus(RuleStatus const& value); - /// <summary> - /// - /// </summary> - SessionRuleFailureCode getSessRuleFailureCode() const; - void setSessRuleFailureCode(SessionRuleFailureCode const& value); - bool sessRuleFailureCodeIsSet() const; - void unsetSessRuleFailureCode(); - - friend void to_json(nlohmann::json& j, const SessionRuleReport& o); - friend void from_json(const nlohmann::json& j, SessionRuleReport& o); - - protected: - std::vector<std::string> m_RuleIds; - - RuleStatus m_RuleStatus; - - SessionRuleFailureCode m_SessRuleFailureCode; - bool m_SessRuleFailureCodeIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SessionRuleReport_H_ */ diff --git a/src/api-server/model/SmPolicyAssociationReleaseCause.cpp b/src/api-server/model/SmPolicyAssociationReleaseCause.cpp deleted file mode 100644 index 9d57aea5beb257b6921b3a31ac1f61eb7babd110..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyAssociationReleaseCause.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/** - * 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 "SmPolicyAssociationReleaseCause.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -SmPolicyAssociationReleaseCause::SmPolicyAssociationReleaseCause() {} - -void SmPolicyAssociationReleaseCause::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SmPolicyAssociationReleaseCause::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SmPolicyAssociationReleaseCause::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "SmPolicyAssociationReleaseCause" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool SmPolicyAssociationReleaseCause::operator==( - const SmPolicyAssociationReleaseCause& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool SmPolicyAssociationReleaseCause::operator!=( - const SmPolicyAssociationReleaseCause& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SmPolicyAssociationReleaseCause& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, SmPolicyAssociationReleaseCause& o) { - from_json(j, o.m_value); -} - -SmPolicyAssociationReleaseCause_anyOf -SmPolicyAssociationReleaseCause::getValue() const { - return m_value; -} - -void SmPolicyAssociationReleaseCause::setValue( - SmPolicyAssociationReleaseCause_anyOf value) { - m_value = value; -} - -SmPolicyAssociationReleaseCause_anyOf::eSmPolicyAssociationReleaseCause_anyOf -SmPolicyAssociationReleaseCause::getEnumValue() const { - return m_value.getValue(); -} - -void SmPolicyAssociationReleaseCause::setEnumValue( - SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SmPolicyAssociationReleaseCause.h b/src/api-server/model/SmPolicyAssociationReleaseCause.h deleted file mode 100644 index 94734624af4d345781f859d0fa3012f9490348f4..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyAssociationReleaseCause.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 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. - */ -/* - * SmPolicyAssociationReleaseCause.h - * - * - */ - -#ifndef SmPolicyAssociationReleaseCause_H_ -#define SmPolicyAssociationReleaseCause_H_ - -#include "SmPolicyAssociationReleaseCause_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class SmPolicyAssociationReleaseCause { - public: - SmPolicyAssociationReleaseCause(); - virtual ~SmPolicyAssociationReleaseCause() = 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 SmPolicyAssociationReleaseCause& rhs) const; - bool operator!=(const SmPolicyAssociationReleaseCause& rhs) const; - - ///////////////////////////////////////////// - /// SmPolicyAssociationReleaseCause members - - SmPolicyAssociationReleaseCause_anyOf getValue() const; - void setValue(SmPolicyAssociationReleaseCause_anyOf value); - SmPolicyAssociationReleaseCause_anyOf::eSmPolicyAssociationReleaseCause_anyOf - getEnumValue() const; - void setEnumValue(SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf value); - friend void to_json( - nlohmann::json& j, const SmPolicyAssociationReleaseCause& o); - friend void from_json( - const nlohmann::json& j, SmPolicyAssociationReleaseCause& o); - friend void to_json( - nlohmann::json& j, const SmPolicyAssociationReleaseCause_anyOf& o); - friend void from_json( - const nlohmann::json& j, SmPolicyAssociationReleaseCause_anyOf& o); - - protected: - SmPolicyAssociationReleaseCause_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SmPolicyAssociationReleaseCause_H_ */ diff --git a/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.cpp b/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.cpp deleted file mode 100644 index 9a79dcdce3f525c8cff509e078ce4385e1f55369..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/** - * 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 "SmPolicyAssociationReleaseCause_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -SmPolicyAssociationReleaseCause_anyOf::SmPolicyAssociationReleaseCause_anyOf() { - -} - -void SmPolicyAssociationReleaseCause_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SmPolicyAssociationReleaseCause_anyOf::validate( - std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SmPolicyAssociationReleaseCause_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "SmPolicyAssociationReleaseCause_anyOf" : pathPrefix; - - if (m_value == SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool SmPolicyAssociationReleaseCause_anyOf::operator==( - const SmPolicyAssociationReleaseCause_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool SmPolicyAssociationReleaseCause_anyOf::operator!=( - const SmPolicyAssociationReleaseCause_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json( - nlohmann::json& j, const SmPolicyAssociationReleaseCause_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf::UNSPECIFIED: - j = "UNSPECIFIED"; - break; - case SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf::UE_SUBSCRIPTION: - j = "UE_SUBSCRIPTION"; - break; - case SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf::INSUFFICIENT_RES: - j = "INSUFFICIENT_RES"; - break; - case SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf::VALIDATION_CONDITION_NOT_MET: - j = "VALIDATION_CONDITION_NOT_MET"; - break; - } -} - -void from_json( - const nlohmann::json& j, SmPolicyAssociationReleaseCause_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "UNSPECIFIED") { - o.setValue(SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf::UNSPECIFIED); - } else if (s == "UE_SUBSCRIPTION") { - o.setValue(SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf::UE_SUBSCRIPTION); - } else if (s == "INSUFFICIENT_RES") { - o.setValue(SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf::INSUFFICIENT_RES); - } else if (s == "VALIDATION_CONDITION_NOT_MET") { - o.setValue(SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf:: - VALIDATION_CONDITION_NOT_MET); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " SmPolicyAssociationReleaseCause_anyOf::" - "eSmPolicyAssociationReleaseCause_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -SmPolicyAssociationReleaseCause_anyOf::eSmPolicyAssociationReleaseCause_anyOf -SmPolicyAssociationReleaseCause_anyOf::getValue() const { - return m_value; -} -void SmPolicyAssociationReleaseCause_anyOf::setValue( - SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.h b/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.h deleted file mode 100644 index e60e689622045f9fc632dfa6a621d9b1e2151160..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.h +++ /dev/null @@ -1,91 +0,0 @@ -/** - * 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. - */ -/* - * SmPolicyAssociationReleaseCause_anyOf.h - * - * - */ - -#ifndef SmPolicyAssociationReleaseCause_anyOf_H_ -#define SmPolicyAssociationReleaseCause_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class SmPolicyAssociationReleaseCause_anyOf { - public: - SmPolicyAssociationReleaseCause_anyOf(); - virtual ~SmPolicyAssociationReleaseCause_anyOf() = default; - - enum class eSmPolicyAssociationReleaseCause_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - UNSPECIFIED, - UE_SUBSCRIPTION, - INSUFFICIENT_RES, - VALIDATION_CONDITION_NOT_MET - }; - - /// <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 SmPolicyAssociationReleaseCause_anyOf& rhs) const; - bool operator!=(const SmPolicyAssociationReleaseCause_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// SmPolicyAssociationReleaseCause_anyOf members - - SmPolicyAssociationReleaseCause_anyOf::eSmPolicyAssociationReleaseCause_anyOf - getValue() const; - void setValue(SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf value); - - friend void to_json( - nlohmann::json& j, const SmPolicyAssociationReleaseCause_anyOf& o); - friend void from_json( - const nlohmann::json& j, SmPolicyAssociationReleaseCause_anyOf& o); - - protected: - SmPolicyAssociationReleaseCause_anyOf::eSmPolicyAssociationReleaseCause_anyOf - m_value = SmPolicyAssociationReleaseCause_anyOf:: - eSmPolicyAssociationReleaseCause_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SmPolicyAssociationReleaseCause_anyOf_H_ */ diff --git a/src/api-server/model/SmPolicyContextData.cpp b/src/api-server/model/SmPolicyContextData.cpp deleted file mode 100644 index 4d6dd5e6eb5efa91fa33a19c3e88845285ec0490..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyContextData.cpp +++ /dev/null @@ -1,949 +0,0 @@ -/** - * 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 pcf { -namespace model { - -using namespace oai::model::common; - -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 pcf -} // namespace oai diff --git a/src/api-server/model/SmPolicyContextData.h b/src/api-server/model/SmPolicyContextData.h deleted file mode 100644 index 6026464fda7ef9b87ae6241d5e0bbc8bd79a7880..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyContextData.h +++ /dev/null @@ -1,424 +0,0 @@ -/** - * 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_ - -#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 pcf { -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> - oai::model::common::PduSessionType getPduSessionType() const; - void setPduSessionType(oai::model::common::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> - oai::model::common::AccessType getAccessType() const; - void setAccessType(oai::model::common::AccessType const& value); - bool accessTypeIsSet() const; - void unsetAccessType(); - /// <summary> - /// - /// </summary> - oai::model::common::RatType getRatType() const; - void setRatType(oai::model::common::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> - oai::model::common::PlmnIdNid getServingNetwork() const; - void setServingNetwork(oai::model::common::PlmnIdNid const& value); - bool servingNetworkIsSet() const; - void unsetServingNetwork(); - /// <summary> - /// - /// </summary> - oai::model::common::UserLocation getUserLocationInfo() const; - void setUserLocationInfo(oai::model::common::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> - oai::model::common::Ipv6Prefix getIpv6AddressPrefix() const; - void setIpv6AddressPrefix(oai::model::common::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> - oai::model::common::Ambr getSubsSessAmbr() const; - void setSubsSessAmbr(oai::model::common::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> - oai::model::common::SubscribedDefaultQos getSubsDefQos() const; - void setSubsDefQos(oai::model::common::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> - oai::model::common::TraceData getTraceReq() const; - void setTraceReq(oai::model::common::TraceData const& value); - bool traceReqIsSet() const; - void unsetTraceReq(); - /// <summary> - /// - /// </summary> - oai::model::common::Snssai getSliceInfo() const; - void setSliceInfo(oai::model::common::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> - oai::model::common::AtsssCapability getAtsssCapab() const; - void setAtsssCapab(oai::model::common::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; - - oai::model::common::PduSessionType m_PduSessionType; - - std::string m_Chargingcharacteristics; - bool m_ChargingcharacteristicsIsSet; - std::string m_Dnn; - - DnnSelectionMode m_DnnSelMode; - bool m_DnnSelModeIsSet; - std::string m_NotificationUri; - - oai::model::common::AccessType m_AccessType; - bool m_AccessTypeIsSet; - oai::model::common::RatType m_RatType; - bool m_RatTypeIsSet; - AdditionalAccessInfo m_AddAccessInfo; - bool m_AddAccessInfoIsSet; - oai::model::common::PlmnIdNid m_ServingNetwork; - bool m_ServingNetworkIsSet; - oai::model::common::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; - oai::model::common::Ipv6Prefix m_Ipv6AddressPrefix; - bool m_Ipv6AddressPrefixIsSet; - std::string m_IpDomain; - bool m_IpDomainIsSet; - oai::model::common::Ambr m_SubsSessAmbr; - bool m_SubsSessAmbrIsSet; - std::string m_AuthProfIndex; - bool m_AuthProfIndexIsSet; - oai::model::common::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; - oai::model::common::TraceData m_TraceReq; - bool m_TraceReqIsSet; - oai::model::common::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; - oai::model::common::AtsssCapability m_AtsssCapab; - bool m_AtsssCapabIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SmPolicyContextData_H_ */ diff --git a/src/api-server/model/SmPolicyControl.cpp b/src/api-server/model/SmPolicyControl.cpp deleted file mode 100644 index 07d2ba54a9bcf8f31b21b12d34962a7e027bc2fd..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyControl.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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 "SmPolicyControl.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -SmPolicyControl::SmPolicyControl() {} - -void SmPolicyControl::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SmPolicyControl::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SmPolicyControl::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "SmPolicyControl" : pathPrefix; - */ - return success; -} - -bool SmPolicyControl::operator==(const SmPolicyControl& rhs) const { - return - - (getContext() == rhs.getContext()) && - - (getPolicy() == rhs.getPolicy()) - - ; -} - -bool SmPolicyControl::operator!=(const SmPolicyControl& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SmPolicyControl& o) { - j = nlohmann::json(); - j["context"] = o.m_Context; - j["policy"] = o.m_Policy; -} - -void from_json(const nlohmann::json& j, SmPolicyControl& o) { - j.at("context").get_to(o.m_Context); - j.at("policy").get_to(o.m_Policy); -} - -SmPolicyContextData SmPolicyControl::getContext() const { - return m_Context; -} -void SmPolicyControl::setContext(SmPolicyContextData const& value) { - m_Context = value; -} -SmPolicyDecision SmPolicyControl::getPolicy() const { - return m_Policy; -} -void SmPolicyControl::setPolicy(SmPolicyDecision const& value) { - m_Policy = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SmPolicyControl.h b/src/api-server/model/SmPolicyControl.h deleted file mode 100644 index e1486900e2c06f9aa45aaa5790b9512221aadb7f..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyControl.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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. - */ -/* - * SmPolicyControl.h - * - * - */ - -#ifndef SmPolicyControl_H_ -#define SmPolicyControl_H_ - -#include "SmPolicyDecision.h" -#include "SmPolicyContextData.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class SmPolicyControl { - public: - SmPolicyControl(); - virtual ~SmPolicyControl() = 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 SmPolicyControl& rhs) const; - bool operator!=(const SmPolicyControl& rhs) const; - - ///////////////////////////////////////////// - /// SmPolicyControl members - - /// <summary> - /// - /// </summary> - SmPolicyContextData getContext() const; - void setContext(SmPolicyContextData const& value); - /// <summary> - /// - /// </summary> - SmPolicyDecision getPolicy() const; - void setPolicy(SmPolicyDecision const& value); - - friend void to_json(nlohmann::json& j, const SmPolicyControl& o); - friend void from_json(const nlohmann::json& j, SmPolicyControl& o); - - protected: - SmPolicyContextData m_Context; - - SmPolicyDecision m_Policy; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SmPolicyControl_H_ */ diff --git a/src/api-server/model/SmPolicyDecision.cpp b/src/api-server/model/SmPolicyDecision.cpp deleted file mode 100644 index 4fa4940765d9d78677d296ef5c711008b70f28e0..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyDecision.cpp +++ /dev/null @@ -1,845 +0,0 @@ -/** - * 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 pcf { -namespace model { - -using namespace oai::model::common; - -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 pcf -} // namespace oai - -std::ostream& operator<<( - std::ostream& os, const oai::pcf::model::SmPolicyDecision& decision) { - os << "PCC Rule IDs: "; - std::string ids = ""; - for (auto rule : decision.getPccRules()) { - ids.append(rule.first); - ids.append(", "); - } - if (ids.length() > 1) { - ids = ids.substr(0, ids.size() - 2); - } - - os << ids << "\n"; - - return os; -} diff --git a/src/api-server/model/SmPolicyDecision.h b/src/api-server/model/SmPolicyDecision.h deleted file mode 100644 index e4061f2f83f8935ff8edb08a5b91171b18dfca54..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyDecision.h +++ /dev/null @@ -1,338 +0,0 @@ -/** - * 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_ - -#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 pcf { -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, oai::model::common::PresenceInfoRm> getPraInfos() const; - void setPraInfos( - std::map<std::string, oai::model::common::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, oai::model::common::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 pcf -} // namespace oai - -std::ostream& operator<<( - std::ostream& os, const oai::pcf::model::SmPolicyDecision& decision); - -#endif /* SmPolicyDecision_H_ */ diff --git a/src/api-server/model/SmPolicyDeleteData.cpp b/src/api-server/model/SmPolicyDeleteData.cpp deleted file mode 100644 index c0d0a92f5616c34e3f377adf0f5e0156555e3951..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyDeleteData.cpp +++ /dev/null @@ -1,283 +0,0 @@ -/** - * 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 "SmPolicyDeleteData.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -SmPolicyDeleteData::SmPolicyDeleteData() { - m_UserLocationInfoIsSet = false; - m_UeTimeZone = ""; - m_UeTimeZoneIsSet = false; - m_ServingNetworkIsSet = false; - m_UserLocationInfoTime = ""; - m_UserLocationInfoTimeIsSet = false; - m_RanNasRelCausesIsSet = false; - m_AccuUsageReportsIsSet = false; - m_PduSessRelCauseIsSet = false; -} - -void SmPolicyDeleteData::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SmPolicyDeleteData::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SmPolicyDeleteData::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "SmPolicyDeleteData" : pathPrefix; - - if (ranNasRelCausesIsSet()) { - const std::vector<RanNasRelCause>& value = m_RanNasRelCauses; - const std::string currentValuePath = _pathPrefix + ".ranNasRelCauses"; - - 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 RanNasRelCause& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".ranNasRelCauses") && - success; - - i++; - } - } - } - - if (accuUsageReportsIsSet()) { - const std::vector<AccuUsageReport>& value = m_AccuUsageReports; - const std::string currentValuePath = _pathPrefix + ".accuUsageReports"; - - 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 AccuUsageReport& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".accuUsageReports") && - success; - - i++; - } - } - } - - return success; -} - -bool SmPolicyDeleteData::operator==(const SmPolicyDeleteData& rhs) const { - return - - ((!userLocationInfoIsSet() && !rhs.userLocationInfoIsSet()) || - (userLocationInfoIsSet() && rhs.userLocationInfoIsSet() && - getUserLocationInfo() == rhs.getUserLocationInfo())) && - - ((!ueTimeZoneIsSet() && !rhs.ueTimeZoneIsSet()) || - (ueTimeZoneIsSet() && rhs.ueTimeZoneIsSet() && - getUeTimeZone() == rhs.getUeTimeZone())) && - - ((!servingNetworkIsSet() && !rhs.servingNetworkIsSet()) || - (servingNetworkIsSet() && rhs.servingNetworkIsSet() && - getServingNetwork() == rhs.getServingNetwork())) && - - ((!userLocationInfoTimeIsSet() && !rhs.userLocationInfoTimeIsSet()) || - (userLocationInfoTimeIsSet() && rhs.userLocationInfoTimeIsSet() && - getUserLocationInfoTime() == rhs.getUserLocationInfoTime())) && - - ((!ranNasRelCausesIsSet() && !rhs.ranNasRelCausesIsSet()) || - (ranNasRelCausesIsSet() && rhs.ranNasRelCausesIsSet() && - getRanNasRelCauses() == rhs.getRanNasRelCauses())) && - - ((!accuUsageReportsIsSet() && !rhs.accuUsageReportsIsSet()) || - (accuUsageReportsIsSet() && rhs.accuUsageReportsIsSet() && - getAccuUsageReports() == rhs.getAccuUsageReports())) && - - ((!pduSessRelCauseIsSet() && !rhs.pduSessRelCauseIsSet()) || - (pduSessRelCauseIsSet() && rhs.pduSessRelCauseIsSet() && - getPduSessRelCause() == rhs.getPduSessRelCause())) - - ; -} - -bool SmPolicyDeleteData::operator!=(const SmPolicyDeleteData& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SmPolicyDeleteData& o) { - j = nlohmann::json(); - if (o.userLocationInfoIsSet()) j["userLocationInfo"] = o.m_UserLocationInfo; - if (o.ueTimeZoneIsSet()) j["ueTimeZone"] = o.m_UeTimeZone; - if (o.servingNetworkIsSet()) j["servingNetwork"] = o.m_ServingNetwork; - if (o.userLocationInfoTimeIsSet()) - j["userLocationInfoTime"] = o.m_UserLocationInfoTime; - if (o.ranNasRelCausesIsSet() || !o.m_RanNasRelCauses.empty()) - j["ranNasRelCauses"] = o.m_RanNasRelCauses; - if (o.accuUsageReportsIsSet() || !o.m_AccuUsageReports.empty()) - j["accuUsageReports"] = o.m_AccuUsageReports; - if (o.pduSessRelCauseIsSet()) j["pduSessRelCause"] = o.m_PduSessRelCause; -} - -void from_json(const nlohmann::json& j, SmPolicyDeleteData& o) { - 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("servingNetwork") != j.end()) { - j.at("servingNetwork").get_to(o.m_ServingNetwork); - o.m_ServingNetworkIsSet = true; - } - if (j.find("userLocationInfoTime") != j.end()) { - j.at("userLocationInfoTime").get_to(o.m_UserLocationInfoTime); - o.m_UserLocationInfoTimeIsSet = true; - } - if (j.find("ranNasRelCauses") != j.end()) { - j.at("ranNasRelCauses").get_to(o.m_RanNasRelCauses); - o.m_RanNasRelCausesIsSet = true; - } - if (j.find("accuUsageReports") != j.end()) { - j.at("accuUsageReports").get_to(o.m_AccuUsageReports); - o.m_AccuUsageReportsIsSet = true; - } - if (j.find("pduSessRelCause") != j.end()) { - j.at("pduSessRelCause").get_to(o.m_PduSessRelCause); - o.m_PduSessRelCauseIsSet = true; - } -} - -UserLocation SmPolicyDeleteData::getUserLocationInfo() const { - return m_UserLocationInfo; -} -void SmPolicyDeleteData::setUserLocationInfo(UserLocation const& value) { - m_UserLocationInfo = value; - m_UserLocationInfoIsSet = true; -} -bool SmPolicyDeleteData::userLocationInfoIsSet() const { - return m_UserLocationInfoIsSet; -} -void SmPolicyDeleteData::unsetUserLocationInfo() { - m_UserLocationInfoIsSet = false; -} -std::string SmPolicyDeleteData::getUeTimeZone() const { - return m_UeTimeZone; -} -void SmPolicyDeleteData::setUeTimeZone(std::string const& value) { - m_UeTimeZone = value; - m_UeTimeZoneIsSet = true; -} -bool SmPolicyDeleteData::ueTimeZoneIsSet() const { - return m_UeTimeZoneIsSet; -} -void SmPolicyDeleteData::unsetUeTimeZone() { - m_UeTimeZoneIsSet = false; -} -PlmnIdNid SmPolicyDeleteData::getServingNetwork() const { - return m_ServingNetwork; -} -void SmPolicyDeleteData::setServingNetwork(PlmnIdNid const& value) { - m_ServingNetwork = value; - m_ServingNetworkIsSet = true; -} -bool SmPolicyDeleteData::servingNetworkIsSet() const { - return m_ServingNetworkIsSet; -} -void SmPolicyDeleteData::unsetServingNetwork() { - m_ServingNetworkIsSet = false; -} -std::string SmPolicyDeleteData::getUserLocationInfoTime() const { - return m_UserLocationInfoTime; -} -void SmPolicyDeleteData::setUserLocationInfoTime(std::string const& value) { - m_UserLocationInfoTime = value; - m_UserLocationInfoTimeIsSet = true; -} -bool SmPolicyDeleteData::userLocationInfoTimeIsSet() const { - return m_UserLocationInfoTimeIsSet; -} -void SmPolicyDeleteData::unsetUserLocationInfoTime() { - m_UserLocationInfoTimeIsSet = false; -} -std::vector<RanNasRelCause> SmPolicyDeleteData::getRanNasRelCauses() const { - return m_RanNasRelCauses; -} -void SmPolicyDeleteData::setRanNasRelCauses( - std::vector<RanNasRelCause> const& value) { - m_RanNasRelCauses = value; - m_RanNasRelCausesIsSet = true; -} -bool SmPolicyDeleteData::ranNasRelCausesIsSet() const { - return m_RanNasRelCausesIsSet; -} -void SmPolicyDeleteData::unsetRanNasRelCauses() { - m_RanNasRelCausesIsSet = false; -} -std::vector<AccuUsageReport> SmPolicyDeleteData::getAccuUsageReports() const { - return m_AccuUsageReports; -} -void SmPolicyDeleteData::setAccuUsageReports( - std::vector<AccuUsageReport> const& value) { - m_AccuUsageReports = value; - m_AccuUsageReportsIsSet = true; -} -bool SmPolicyDeleteData::accuUsageReportsIsSet() const { - return m_AccuUsageReportsIsSet; -} -void SmPolicyDeleteData::unsetAccuUsageReports() { - m_AccuUsageReportsIsSet = false; -} -PduSessionRelCause SmPolicyDeleteData::getPduSessRelCause() const { - return m_PduSessRelCause; -} -void SmPolicyDeleteData::setPduSessRelCause(PduSessionRelCause const& value) { - m_PduSessRelCause = value; - m_PduSessRelCauseIsSet = true; -} -bool SmPolicyDeleteData::pduSessRelCauseIsSet() const { - return m_PduSessRelCauseIsSet; -} -void SmPolicyDeleteData::unsetPduSessRelCause() { - m_PduSessRelCauseIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SmPolicyDeleteData.h b/src/api-server/model/SmPolicyDeleteData.h deleted file mode 100644 index 3743688b27102ce7c2b255bc84b39d7499ed7987..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyDeleteData.h +++ /dev/null @@ -1,140 +0,0 @@ -/** - * 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. - */ -/* - * SmPolicyDeleteData.h - * - * - */ - -#ifndef SmPolicyDeleteData_H_ -#define SmPolicyDeleteData_H_ - -#include "PduSessionRelCause.h" -#include "PlmnIdNid.h" -#include <string> -#include "UserLocation.h" -#include "AccuUsageReport.h" -#include <vector> -#include "RanNasRelCause.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class SmPolicyDeleteData { - public: - SmPolicyDeleteData(); - virtual ~SmPolicyDeleteData() = 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 SmPolicyDeleteData& rhs) const; - bool operator!=(const SmPolicyDeleteData& rhs) const; - - ///////////////////////////////////////////// - /// SmPolicyDeleteData members - - /// <summary> - /// - /// </summary> - oai::model::common::UserLocation getUserLocationInfo() const; - void setUserLocationInfo(oai::model::common::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> - oai::model::common::PlmnIdNid getServingNetwork() const; - void setServingNetwork(oai::model::common::PlmnIdNid const& value); - bool servingNetworkIsSet() const; - void unsetServingNetwork(); - /// <summary> - /// - /// </summary> - std::string getUserLocationInfoTime() const; - void setUserLocationInfoTime(std::string const& value); - bool userLocationInfoTimeIsSet() const; - void unsetUserLocationInfoTime(); - /// <summary> - /// Contains the RAN and/or NAS release cause. - /// </summary> - std::vector<RanNasRelCause> getRanNasRelCauses() const; - void setRanNasRelCauses(std::vector<RanNasRelCause> const& value); - bool ranNasRelCausesIsSet() const; - void unsetRanNasRelCauses(); - /// <summary> - /// Contains the usage report - /// </summary> - std::vector<AccuUsageReport> getAccuUsageReports() const; - void setAccuUsageReports(std::vector<AccuUsageReport> const& value); - bool accuUsageReportsIsSet() const; - void unsetAccuUsageReports(); - /// <summary> - /// - /// </summary> - PduSessionRelCause getPduSessRelCause() const; - void setPduSessRelCause(PduSessionRelCause const& value); - bool pduSessRelCauseIsSet() const; - void unsetPduSessRelCause(); - - friend void to_json(nlohmann::json& j, const SmPolicyDeleteData& o); - friend void from_json(const nlohmann::json& j, SmPolicyDeleteData& o); - - protected: - oai::model::common::UserLocation m_UserLocationInfo; - bool m_UserLocationInfoIsSet; - std::string m_UeTimeZone; - bool m_UeTimeZoneIsSet; - oai::model::common::PlmnIdNid m_ServingNetwork; - bool m_ServingNetworkIsSet; - std::string m_UserLocationInfoTime; - bool m_UserLocationInfoTimeIsSet; - std::vector<RanNasRelCause> m_RanNasRelCauses; - bool m_RanNasRelCausesIsSet; - std::vector<AccuUsageReport> m_AccuUsageReports; - bool m_AccuUsageReportsIsSet; - PduSessionRelCause m_PduSessRelCause; - bool m_PduSessRelCauseIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SmPolicyDeleteData_H_ */ diff --git a/src/api-server/model/SmPolicyNotification.cpp b/src/api-server/model/SmPolicyNotification.cpp deleted file mode 100644 index 5666b131a7a56c606924db5eb87e07b6cac17c26..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyNotification.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/** - * 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 "SmPolicyNotification.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -SmPolicyNotification::SmPolicyNotification() { - m_ResourceUri = ""; - m_ResourceUriIsSet = false; - m_SmPolicyDecisionIsSet = false; -} - -void SmPolicyNotification::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SmPolicyNotification::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SmPolicyNotification::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "SmPolicyNotification" : pathPrefix; - */ - return success; -} - -bool SmPolicyNotification::operator==(const SmPolicyNotification& rhs) const { - return - - ((!resourceUriIsSet() && !rhs.resourceUriIsSet()) || - (resourceUriIsSet() && rhs.resourceUriIsSet() && - getResourceUri() == rhs.getResourceUri())) && - - ((!smPolicyDecisionIsSet() && !rhs.smPolicyDecisionIsSet()) || - (smPolicyDecisionIsSet() && rhs.smPolicyDecisionIsSet() && - getSmPolicyDecision() == rhs.getSmPolicyDecision())) - - ; -} - -bool SmPolicyNotification::operator!=(const SmPolicyNotification& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SmPolicyNotification& o) { - j = nlohmann::json(); - if (o.resourceUriIsSet()) j["resourceUri"] = o.m_ResourceUri; - if (o.smPolicyDecisionIsSet()) j["smPolicyDecision"] = o.m_SmPolicyDecision; -} - -void from_json(const nlohmann::json& j, SmPolicyNotification& o) { - if (j.find("resourceUri") != j.end()) { - j.at("resourceUri").get_to(o.m_ResourceUri); - o.m_ResourceUriIsSet = true; - } - if (j.find("smPolicyDecision") != j.end()) { - j.at("smPolicyDecision").get_to(o.m_SmPolicyDecision); - o.m_SmPolicyDecisionIsSet = true; - } -} - -std::string SmPolicyNotification::getResourceUri() const { - return m_ResourceUri; -} -void SmPolicyNotification::setResourceUri(std::string const& value) { - m_ResourceUri = value; - m_ResourceUriIsSet = true; -} -bool SmPolicyNotification::resourceUriIsSet() const { - return m_ResourceUriIsSet; -} -void SmPolicyNotification::unsetResourceUri() { - m_ResourceUriIsSet = false; -} -SmPolicyDecision SmPolicyNotification::getSmPolicyDecision() const { - return m_SmPolicyDecision; -} -void SmPolicyNotification::setSmPolicyDecision(SmPolicyDecision const& value) { - m_SmPolicyDecision = value; - m_SmPolicyDecisionIsSet = true; -} -bool SmPolicyNotification::smPolicyDecisionIsSet() const { - return m_SmPolicyDecisionIsSet; -} -void SmPolicyNotification::unsetSmPolicyDecision() { - m_SmPolicyDecisionIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SmPolicyNotification.h b/src/api-server/model/SmPolicyNotification.h deleted file mode 100644 index 7049cbc669727151db7b2dd2c0c454d1b21eb078..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyNotification.h +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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. - */ -/* - * SmPolicyNotification.h - * - * - */ - -#ifndef SmPolicyNotification_H_ -#define SmPolicyNotification_H_ - -#include "SmPolicyDecision.h" -#include <string> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class SmPolicyNotification { - public: - SmPolicyNotification(); - virtual ~SmPolicyNotification() = 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 SmPolicyNotification& rhs) const; - bool operator!=(const SmPolicyNotification& rhs) const; - - ///////////////////////////////////////////// - /// SmPolicyNotification members - - /// <summary> - /// - /// </summary> - std::string getResourceUri() const; - void setResourceUri(std::string const& value); - bool resourceUriIsSet() const; - void unsetResourceUri(); - /// <summary> - /// - /// </summary> - SmPolicyDecision getSmPolicyDecision() const; - void setSmPolicyDecision(SmPolicyDecision const& value); - bool smPolicyDecisionIsSet() const; - void unsetSmPolicyDecision(); - - friend void to_json(nlohmann::json& j, const SmPolicyNotification& o); - friend void from_json(const nlohmann::json& j, SmPolicyNotification& o); - - protected: - std::string m_ResourceUri; - bool m_ResourceUriIsSet; - SmPolicyDecision m_SmPolicyDecision; - bool m_SmPolicyDecisionIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SmPolicyNotification_H_ */ diff --git a/src/api-server/model/SmPolicyUpdateContextData.cpp b/src/api-server/model/SmPolicyUpdateContextData.cpp deleted file mode 100644 index 877c77aac8e9e7bbd7f50394e4427e516fda04f7..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyUpdateContextData.cpp +++ /dev/null @@ -1,1380 +0,0 @@ -/** - * 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 "SmPolicyUpdateContextData.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -SmPolicyUpdateContextData::SmPolicyUpdateContextData() { - m_RepPolicyCtrlReqTriggersIsSet = false; - m_AccNetChIdsIsSet = false; - m_AccessTypeIsSet = false; - m_RatTypeIsSet = false; - m_AddAccessInfoIsSet = false; - m_RelAccessInfoIsSet = false; - m_ServingNetworkIsSet = false; - m_UserLocationInfoIsSet = false; - m_UeTimeZone = ""; - m_UeTimeZoneIsSet = false; - m_RelIpv4Address = ""; - m_RelIpv4AddressIsSet = false; - m_Ipv4Address = ""; - m_Ipv4AddressIsSet = false; - m_IpDomain = ""; - m_IpDomainIsSet = false; - m_Ipv6AddressPrefixIsSet = false; - m_RelIpv6AddressPrefixIsSet = false; - m_AddIpv6AddrPrefixesIsSet = false; - m_AddRelIpv6AddrPrefixesIsSet = false; - m_RelUeMac = ""; - m_RelUeMacIsSet = false; - m_UeMac = ""; - m_UeMacIsSet = false; - m_SubsSessAmbrIsSet = false; - m_AuthProfIndex = ""; - m_AuthProfIndexIsSet = false; - m_SubsDefQosIsSet = false; - m_NumOfPackFilter = 0; - m_NumOfPackFilterIsSet = false; - m_AccuUsageReportsIsSet = false; - m_r_3gppPsDataOffStatus = false; - m_r_3gppPsDataOffStatusIsSet = false; - m_AppDetectionInfosIsSet = false; - m_RuleReportsIsSet = false; - m_SessRuleReportsIsSet = false; - m_QncReportsIsSet = false; - m_QosMonReportsIsSet = false; - m_UserLocationInfoTime = ""; - m_UserLocationInfoTimeIsSet = false; - m_RepPraInfosIsSet = false; - m_UeInitResReqIsSet = false; - m_RefQosIndication = false; - m_RefQosIndicationIsSet = false; - m_QosFlowUsageIsSet = false; - m_CreditManageStatusIsSet = false; - m_ServNfIdIsSet = false; - m_TraceReqIsSet = false; - m_MaPduIndIsSet = false; - m_AtsssCapabIsSet = false; - m_TsnBridgeInfoIsSet = false; - m_TsnPortManContDsttIsSet = false; - m_TsnPortManContNwttsIsSet = false; - m_MulAddrInfosIsSet = false; -} - -void SmPolicyUpdateContextData::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SmPolicyUpdateContextData::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SmPolicyUpdateContextData::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "SmPolicyUpdateContextData" : pathPrefix; - - if (repPolicyCtrlReqTriggersIsSet()) { - const std::vector<PolicyControlRequestTrigger>& value = - m_RepPolicyCtrlReqTriggers; - const std::string currentValuePath = - _pathPrefix + ".repPolicyCtrlReqTriggers"; - - 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 + ".repPolicyCtrlReqTriggers") && - success; - - i++; - } - } - } - - if (accNetChIdsIsSet()) { - const std::vector<AccNetChId>& value = m_AccNetChIds; - const std::string currentValuePath = _pathPrefix + ".accNetChIds"; - - 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 AccNetChId& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = - value.validate(msg, currentValuePath + ".accNetChIds") && success; - - i++; - } - } - } - /* - if (relIpv4AddressIsSet()) { - const std::string& value = m_RelIpv4Address; - const std::string currentValuePath = _pathPrefix + ".relIpv4Address"; - } - - if (ipv4AddressIsSet()) { - const std::string& value = m_Ipv4Address; - const std::string currentValuePath = _pathPrefix + ".ipv4Address"; - } - - if (relUeMacIsSet()) { - const std::string& value = m_RelUeMac; - const std::string currentValuePath = _pathPrefix + ".relUeMac"; - } - - if (ueMacIsSet()) { - const std::string& value = m_UeMac; - const std::string currentValuePath = _pathPrefix + ".ueMac"; - } - */ - if (accuUsageReportsIsSet()) { - const std::vector<AccuUsageReport>& value = m_AccuUsageReports; - const std::string currentValuePath = _pathPrefix + ".accuUsageReports"; - - 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 AccuUsageReport& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".accuUsageReports") && - success; - - i++; - } - } - } - - if (appDetectionInfosIsSet()) { - const std::vector<AppDetectionInfo>& value = m_AppDetectionInfos; - const std::string currentValuePath = _pathPrefix + ".appDetectionInfos"; - - 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 AppDetectionInfo& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = - value.validate(msg, currentValuePath + ".appDetectionInfos") && - success; - - i++; - } - } - } - - if (ruleReportsIsSet()) { - const std::vector<RuleReport>& value = m_RuleReports; - const std::string currentValuePath = _pathPrefix + ".ruleReports"; - - 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 RuleReport& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = - value.validate(msg, currentValuePath + ".ruleReports") && success; - - i++; - } - } - } - - if (sessRuleReportsIsSet()) { - const std::vector<SessionRuleReport>& value = m_SessRuleReports; - const std::string currentValuePath = _pathPrefix + ".sessRuleReports"; - - 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 SessionRuleReport& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".sessRuleReports") && - success; - - i++; - } - } - } - - if (qncReportsIsSet()) { - const std::vector<QosNotificationControlInfo>& value = m_QncReports; - const std::string currentValuePath = _pathPrefix + ".qncReports"; - - 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 QosNotificationControlInfo& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = - value.validate(msg, currentValuePath + ".qncReports") && success; - - i++; - } - } - } - - if (qosMonReportsIsSet()) { - const std::vector<QosMonitoringReport>& value = m_QosMonReports; - const std::string currentValuePath = _pathPrefix + ".qosMonReports"; - - { // Recursive validation of array elements - const std::string oldValuePath = currentValuePath; - int i = 0; - for (const QosMonitoringReport& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = - value.validate(msg, currentValuePath + ".qosMonReports") && success; - - i++; - } - } - } - /* - if (repPraInfosIsSet()) { - const std::map<std::string, PresenceInfo>& value = m_RepPraInfos; - const std::string currentValuePath = _pathPrefix + ".repPraInfos"; - } - */ - 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++; - } - } - } - - if (mulAddrInfosIsSet()) { - const std::vector<IpMulticastAddressInfo>& value = m_MulAddrInfos; - const std::string currentValuePath = _pathPrefix + ".mulAddrInfos"; - - 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 IpMulticastAddressInfo& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = - value.validate(msg, currentValuePath + ".mulAddrInfos") && success; - - i++; - } - } - } - - return success; -} - -bool SmPolicyUpdateContextData::operator==( - const SmPolicyUpdateContextData& rhs) const { - return - - ((!repPolicyCtrlReqTriggersIsSet() && - !rhs.repPolicyCtrlReqTriggersIsSet()) || - (repPolicyCtrlReqTriggersIsSet() && - rhs.repPolicyCtrlReqTriggersIsSet() && - getRepPolicyCtrlReqTriggers() == rhs.getRepPolicyCtrlReqTriggers())) && - - ((!accNetChIdsIsSet() && !rhs.accNetChIdsIsSet()) || - (accNetChIdsIsSet() && rhs.accNetChIdsIsSet() && - getAccNetChIds() == rhs.getAccNetChIds())) && - - ((!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())) && - - ((!relAccessInfoIsSet() && !rhs.relAccessInfoIsSet()) || - (relAccessInfoIsSet() && rhs.relAccessInfoIsSet() && - getRelAccessInfo() == rhs.getRelAccessInfo())) && - - ((!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())) && - - ((!relIpv4AddressIsSet() && !rhs.relIpv4AddressIsSet()) || - (relIpv4AddressIsSet() && rhs.relIpv4AddressIsSet() && - getRelIpv4Address() == rhs.getRelIpv4Address())) && - - ((!ipv4AddressIsSet() && !rhs.ipv4AddressIsSet()) || - (ipv4AddressIsSet() && rhs.ipv4AddressIsSet() && - getIpv4Address() == rhs.getIpv4Address())) && - - ((!ipDomainIsSet() && !rhs.ipDomainIsSet()) || - (ipDomainIsSet() && rhs.ipDomainIsSet() && - getIpDomain() == rhs.getIpDomain())) && - - ((!ipv6AddressPrefixIsSet() && !rhs.ipv6AddressPrefixIsSet()) || - (ipv6AddressPrefixIsSet() && rhs.ipv6AddressPrefixIsSet() && - getIpv6AddressPrefix() == rhs.getIpv6AddressPrefix())) && - - ((!relIpv6AddressPrefixIsSet() && !rhs.relIpv6AddressPrefixIsSet()) || - (relIpv6AddressPrefixIsSet() && rhs.relIpv6AddressPrefixIsSet() && - getRelIpv6AddressPrefix() == rhs.getRelIpv6AddressPrefix())) && - - ((!addIpv6AddrPrefixesIsSet() && !rhs.addIpv6AddrPrefixesIsSet()) || - (addIpv6AddrPrefixesIsSet() && rhs.addIpv6AddrPrefixesIsSet() && - getAddIpv6AddrPrefixes() == rhs.getAddIpv6AddrPrefixes())) && - - ((!addRelIpv6AddrPrefixesIsSet() && !rhs.addRelIpv6AddrPrefixesIsSet()) || - (addRelIpv6AddrPrefixesIsSet() && rhs.addRelIpv6AddrPrefixesIsSet() && - getAddRelIpv6AddrPrefixes() == rhs.getAddRelIpv6AddrPrefixes())) && - - ((!relUeMacIsSet() && !rhs.relUeMacIsSet()) || - (relUeMacIsSet() && rhs.relUeMacIsSet() && - getRelUeMac() == rhs.getRelUeMac())) && - - ((!ueMacIsSet() && !rhs.ueMacIsSet()) || - (ueMacIsSet() && rhs.ueMacIsSet() && getUeMac() == rhs.getUeMac())) && - - ((!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())) && - - ((!accuUsageReportsIsSet() && !rhs.accuUsageReportsIsSet()) || - (accuUsageReportsIsSet() && rhs.accuUsageReportsIsSet() && - getAccuUsageReports() == rhs.getAccuUsageReports())) && - - ((!r3gppPsDataOffStatusIsSet() && !rhs.r3gppPsDataOffStatusIsSet()) || - (r3gppPsDataOffStatusIsSet() && rhs.r3gppPsDataOffStatusIsSet() && - isR3gppPsDataOffStatus() == rhs.isR3gppPsDataOffStatus())) && - - ((!appDetectionInfosIsSet() && !rhs.appDetectionInfosIsSet()) || - (appDetectionInfosIsSet() && rhs.appDetectionInfosIsSet() && - getAppDetectionInfos() == rhs.getAppDetectionInfos())) && - - ((!ruleReportsIsSet() && !rhs.ruleReportsIsSet()) || - (ruleReportsIsSet() && rhs.ruleReportsIsSet() && - getRuleReports() == rhs.getRuleReports())) && - - ((!sessRuleReportsIsSet() && !rhs.sessRuleReportsIsSet()) || - (sessRuleReportsIsSet() && rhs.sessRuleReportsIsSet() && - getSessRuleReports() == rhs.getSessRuleReports())) && - - ((!qncReportsIsSet() && !rhs.qncReportsIsSet()) || - (qncReportsIsSet() && rhs.qncReportsIsSet() && - getQncReports() == rhs.getQncReports())) && - - ((!qosMonReportsIsSet() && !rhs.qosMonReportsIsSet()) || - (qosMonReportsIsSet() && rhs.qosMonReportsIsSet() && - getQosMonReports() == rhs.getQosMonReports())) && - - ((!userLocationInfoTimeIsSet() && !rhs.userLocationInfoTimeIsSet()) || - (userLocationInfoTimeIsSet() && rhs.userLocationInfoTimeIsSet() && - getUserLocationInfoTime() == rhs.getUserLocationInfoTime())) && - - ((!repPraInfosIsSet() && !rhs.repPraInfosIsSet()) || - (repPraInfosIsSet() && rhs.repPraInfosIsSet() && - getRepPraInfos() == rhs.getRepPraInfos())) && - - ((!ueInitResReqIsSet() && !rhs.ueInitResReqIsSet()) || - (ueInitResReqIsSet() && rhs.ueInitResReqIsSet() && - getUeInitResReq() == rhs.getUeInitResReq())) && - - ((!refQosIndicationIsSet() && !rhs.refQosIndicationIsSet()) || - (refQosIndicationIsSet() && rhs.refQosIndicationIsSet() && - isRefQosIndication() == rhs.isRefQosIndication())) && - - ((!qosFlowUsageIsSet() && !rhs.qosFlowUsageIsSet()) || - (qosFlowUsageIsSet() && rhs.qosFlowUsageIsSet() && - getQosFlowUsage() == rhs.getQosFlowUsage())) && - - ((!creditManageStatusIsSet() && !rhs.creditManageStatusIsSet()) || - (creditManageStatusIsSet() && rhs.creditManageStatusIsSet() && - getCreditManageStatus() == rhs.getCreditManageStatus())) && - - ((!servNfIdIsSet() && !rhs.servNfIdIsSet()) || - (servNfIdIsSet() && rhs.servNfIdIsSet() && - getServNfId() == rhs.getServNfId())) && - - ((!traceReqIsSet() && !rhs.traceReqIsSet()) || - (traceReqIsSet() && rhs.traceReqIsSet() && - getTraceReq() == rhs.getTraceReq())) && - - ((!maPduIndIsSet() && !rhs.maPduIndIsSet()) || - (maPduIndIsSet() && rhs.maPduIndIsSet() && - getMaPduInd() == rhs.getMaPduInd())) && - - ((!atsssCapabIsSet() && !rhs.atsssCapabIsSet()) || - (atsssCapabIsSet() && rhs.atsssCapabIsSet() && - getAtsssCapab() == rhs.getAtsssCapab())) && - - ((!tsnBridgeInfoIsSet() && !rhs.tsnBridgeInfoIsSet()) || - (tsnBridgeInfoIsSet() && rhs.tsnBridgeInfoIsSet() && - getTsnBridgeInfo() == rhs.getTsnBridgeInfo())) && - - ((!tsnPortManContDsttIsSet() && !rhs.tsnPortManContDsttIsSet()) || - (tsnPortManContDsttIsSet() && rhs.tsnPortManContDsttIsSet() && - getTsnPortManContDstt() == rhs.getTsnPortManContDstt())) && - - ((!tsnPortManContNwttsIsSet() && !rhs.tsnPortManContNwttsIsSet()) || - (tsnPortManContNwttsIsSet() && rhs.tsnPortManContNwttsIsSet() && - getTsnPortManContNwtts() == rhs.getTsnPortManContNwtts())) && - - ((!mulAddrInfosIsSet() && !rhs.mulAddrInfosIsSet()) || - (mulAddrInfosIsSet() && rhs.mulAddrInfosIsSet() && - getMulAddrInfos() == rhs.getMulAddrInfos())) - - ; -} - -bool SmPolicyUpdateContextData::operator!=( - const SmPolicyUpdateContextData& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SmPolicyUpdateContextData& o) { - j = nlohmann::json(); - if (o.repPolicyCtrlReqTriggersIsSet() || - !o.m_RepPolicyCtrlReqTriggers.empty()) - j["repPolicyCtrlReqTriggers"] = o.m_RepPolicyCtrlReqTriggers; - if (o.accNetChIdsIsSet() || !o.m_AccNetChIds.empty()) - j["accNetChIds"] = o.m_AccNetChIds; - 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.relAccessInfoIsSet()) j["relAccessInfo"] = o.m_RelAccessInfo; - 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.relIpv4AddressIsSet()) j["relIpv4Address"] = o.m_RelIpv4Address; - if (o.ipv4AddressIsSet()) j["ipv4Address"] = o.m_Ipv4Address; - if (o.ipDomainIsSet()) j["ipDomain"] = o.m_IpDomain; - if (o.ipv6AddressPrefixIsSet()) - j["ipv6AddressPrefix"] = o.m_Ipv6AddressPrefix; - if (o.relIpv6AddressPrefixIsSet()) - j["relIpv6AddressPrefix"] = o.m_RelIpv6AddressPrefix; - if (o.addIpv6AddrPrefixesIsSet()) - j["addIpv6AddrPrefixes"] = o.m_AddIpv6AddrPrefixes; - if (o.addRelIpv6AddrPrefixesIsSet()) - j["addRelIpv6AddrPrefixes"] = o.m_AddRelIpv6AddrPrefixes; - if (o.relUeMacIsSet()) j["relUeMac"] = o.m_RelUeMac; - if (o.ueMacIsSet()) j["ueMac"] = o.m_UeMac; - 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.accuUsageReportsIsSet() || !o.m_AccuUsageReports.empty()) - j["accuUsageReports"] = o.m_AccuUsageReports; - if (o.r3gppPsDataOffStatusIsSet()) - j["3gppPsDataOffStatus"] = o.m_r_3gppPsDataOffStatus; - if (o.appDetectionInfosIsSet() || !o.m_AppDetectionInfos.empty()) - j["appDetectionInfos"] = o.m_AppDetectionInfos; - if (o.ruleReportsIsSet() || !o.m_RuleReports.empty()) - j["ruleReports"] = o.m_RuleReports; - if (o.sessRuleReportsIsSet() || !o.m_SessRuleReports.empty()) - j["sessRuleReports"] = o.m_SessRuleReports; - if (o.qncReportsIsSet() || !o.m_QncReports.empty()) - j["qncReports"] = o.m_QncReports; - if (o.qosMonReportsIsSet() || !o.m_QosMonReports.empty()) - j["qosMonReports"] = o.m_QosMonReports; - if (o.userLocationInfoTimeIsSet()) - j["userLocationInfoTime"] = o.m_UserLocationInfoTime; - if (o.repPraInfosIsSet() || !o.m_RepPraInfos.empty()) - j["repPraInfos"] = o.m_RepPraInfos; - if (o.ueInitResReqIsSet()) j["ueInitResReq"] = o.m_UeInitResReq; - if (o.refQosIndicationIsSet()) j["refQosIndication"] = o.m_RefQosIndication; - if (o.qosFlowUsageIsSet()) j["qosFlowUsage"] = o.m_QosFlowUsage; - if (o.creditManageStatusIsSet()) - j["creditManageStatus"] = o.m_CreditManageStatus; - if (o.servNfIdIsSet()) j["servNfId"] = o.m_ServNfId; - if (o.traceReqIsSet()) j["traceReq"] = o.m_TraceReq; - if (o.maPduIndIsSet()) j["maPduInd"] = o.m_MaPduInd; - if (o.atsssCapabIsSet()) j["atsssCapab"] = o.m_AtsssCapab; - if (o.tsnBridgeInfoIsSet()) j["tsnBridgeInfo"] = o.m_TsnBridgeInfo; - if (o.tsnPortManContDsttIsSet()) - j["tsnPortManContDstt"] = o.m_TsnPortManContDstt; - if (o.tsnPortManContNwttsIsSet() || !o.m_TsnPortManContNwtts.empty()) - j["tsnPortManContNwtts"] = o.m_TsnPortManContNwtts; - if (o.mulAddrInfosIsSet() || !o.m_MulAddrInfos.empty()) - j["mulAddrInfos"] = o.m_MulAddrInfos; -} - -void from_json(const nlohmann::json& j, SmPolicyUpdateContextData& o) { - if (j.find("repPolicyCtrlReqTriggers") != j.end()) { - j.at("repPolicyCtrlReqTriggers").get_to(o.m_RepPolicyCtrlReqTriggers); - o.m_RepPolicyCtrlReqTriggersIsSet = true; - } - if (j.find("accNetChIds") != j.end()) { - j.at("accNetChIds").get_to(o.m_AccNetChIds); - o.m_AccNetChIdsIsSet = true; - } - 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("relAccessInfo") != j.end()) { - j.at("relAccessInfo").get_to(o.m_RelAccessInfo); - o.m_RelAccessInfoIsSet = 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("relIpv4Address") != j.end()) { - j.at("relIpv4Address").get_to(o.m_RelIpv4Address); - o.m_RelIpv4AddressIsSet = true; - } - if (j.find("ipv4Address") != j.end()) { - j.at("ipv4Address").get_to(o.m_Ipv4Address); - o.m_Ipv4AddressIsSet = true; - } - if (j.find("ipDomain") != j.end()) { - j.at("ipDomain").get_to(o.m_IpDomain); - o.m_IpDomainIsSet = true; - } - if (j.find("ipv6AddressPrefix") != j.end()) { - j.at("ipv6AddressPrefix").get_to(o.m_Ipv6AddressPrefix); - o.m_Ipv6AddressPrefixIsSet = true; - } - if (j.find("relIpv6AddressPrefix") != j.end()) { - j.at("relIpv6AddressPrefix").get_to(o.m_RelIpv6AddressPrefix); - o.m_RelIpv6AddressPrefixIsSet = true; - } - if (j.find("addIpv6AddrPrefixes") != j.end()) { - j.at("addIpv6AddrPrefixes").get_to(o.m_AddIpv6AddrPrefixes); - o.m_AddIpv6AddrPrefixesIsSet = true; - } - if (j.find("addRelIpv6AddrPrefixes") != j.end()) { - j.at("addRelIpv6AddrPrefixes").get_to(o.m_AddRelIpv6AddrPrefixes); - o.m_AddRelIpv6AddrPrefixesIsSet = true; - } - if (j.find("relUeMac") != j.end()) { - j.at("relUeMac").get_to(o.m_RelUeMac); - o.m_RelUeMacIsSet = true; - } - if (j.find("ueMac") != j.end()) { - j.at("ueMac").get_to(o.m_UeMac); - o.m_UeMacIsSet = 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("accuUsageReports") != j.end()) { - j.at("accuUsageReports").get_to(o.m_AccuUsageReports); - o.m_AccuUsageReportsIsSet = true; - } - if (j.find("3gppPsDataOffStatus") != j.end()) { - j.at("3gppPsDataOffStatus").get_to(o.m_r_3gppPsDataOffStatus); - o.m_r_3gppPsDataOffStatusIsSet = true; - } - if (j.find("appDetectionInfos") != j.end()) { - j.at("appDetectionInfos").get_to(o.m_AppDetectionInfos); - o.m_AppDetectionInfosIsSet = true; - } - if (j.find("ruleReports") != j.end()) { - j.at("ruleReports").get_to(o.m_RuleReports); - o.m_RuleReportsIsSet = true; - } - if (j.find("sessRuleReports") != j.end()) { - j.at("sessRuleReports").get_to(o.m_SessRuleReports); - o.m_SessRuleReportsIsSet = true; - } - if (j.find("qncReports") != j.end()) { - j.at("qncReports").get_to(o.m_QncReports); - o.m_QncReportsIsSet = true; - } - if (j.find("qosMonReports") != j.end()) { - j.at("qosMonReports").get_to(o.m_QosMonReports); - o.m_QosMonReportsIsSet = true; - } - if (j.find("userLocationInfoTime") != j.end()) { - j.at("userLocationInfoTime").get_to(o.m_UserLocationInfoTime); - o.m_UserLocationInfoTimeIsSet = true; - } - if (j.find("repPraInfos") != j.end()) { - j.at("repPraInfos").get_to(o.m_RepPraInfos); - o.m_RepPraInfosIsSet = true; - } - if (j.find("ueInitResReq") != j.end()) { - j.at("ueInitResReq").get_to(o.m_UeInitResReq); - o.m_UeInitResReqIsSet = true; - } - if (j.find("refQosIndication") != j.end()) { - j.at("refQosIndication").get_to(o.m_RefQosIndication); - o.m_RefQosIndicationIsSet = true; - } - if (j.find("qosFlowUsage") != j.end()) { - j.at("qosFlowUsage").get_to(o.m_QosFlowUsage); - o.m_QosFlowUsageIsSet = true; - } - if (j.find("creditManageStatus") != j.end()) { - j.at("creditManageStatus").get_to(o.m_CreditManageStatus); - o.m_CreditManageStatusIsSet = true; - } - if (j.find("servNfId") != j.end()) { - j.at("servNfId").get_to(o.m_ServNfId); - o.m_ServNfIdIsSet = true; - } - if (j.find("traceReq") != j.end()) { - j.at("traceReq").get_to(o.m_TraceReq); - o.m_TraceReqIsSet = 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; - } - if (j.find("tsnBridgeInfo") != j.end()) { - j.at("tsnBridgeInfo").get_to(o.m_TsnBridgeInfo); - o.m_TsnBridgeInfoIsSet = 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; - } - if (j.find("mulAddrInfos") != j.end()) { - j.at("mulAddrInfos").get_to(o.m_MulAddrInfos); - o.m_MulAddrInfosIsSet = true; - } -} - -std::vector<PolicyControlRequestTrigger> -SmPolicyUpdateContextData::getRepPolicyCtrlReqTriggers() const { - return m_RepPolicyCtrlReqTriggers; -} -void SmPolicyUpdateContextData::setRepPolicyCtrlReqTriggers( - std::vector<PolicyControlRequestTrigger> const& value) { - m_RepPolicyCtrlReqTriggers = value; - m_RepPolicyCtrlReqTriggersIsSet = true; -} -bool SmPolicyUpdateContextData::repPolicyCtrlReqTriggersIsSet() const { - return m_RepPolicyCtrlReqTriggersIsSet; -} -void SmPolicyUpdateContextData::unsetRepPolicyCtrlReqTriggers() { - m_RepPolicyCtrlReqTriggersIsSet = false; -} -std::vector<AccNetChId> SmPolicyUpdateContextData::getAccNetChIds() const { - return m_AccNetChIds; -} -void SmPolicyUpdateContextData::setAccNetChIds( - std::vector<AccNetChId> const& value) { - m_AccNetChIds = value; - m_AccNetChIdsIsSet = true; -} -bool SmPolicyUpdateContextData::accNetChIdsIsSet() const { - return m_AccNetChIdsIsSet; -} -void SmPolicyUpdateContextData::unsetAccNetChIds() { - m_AccNetChIdsIsSet = false; -} -AccessType SmPolicyUpdateContextData::getAccessType() const { - return m_AccessType; -} -void SmPolicyUpdateContextData::setAccessType(AccessType const& value) { - m_AccessType = value; - m_AccessTypeIsSet = true; -} -bool SmPolicyUpdateContextData::accessTypeIsSet() const { - return m_AccessTypeIsSet; -} -void SmPolicyUpdateContextData::unsetAccessType() { - m_AccessTypeIsSet = false; -} -RatType SmPolicyUpdateContextData::getRatType() const { - return m_RatType; -} -void SmPolicyUpdateContextData::setRatType(RatType const& value) { - m_RatType = value; - m_RatTypeIsSet = true; -} -bool SmPolicyUpdateContextData::ratTypeIsSet() const { - return m_RatTypeIsSet; -} -void SmPolicyUpdateContextData::unsetRatType() { - m_RatTypeIsSet = false; -} -AdditionalAccessInfo SmPolicyUpdateContextData::getAddAccessInfo() const { - return m_AddAccessInfo; -} -void SmPolicyUpdateContextData::setAddAccessInfo( - AdditionalAccessInfo const& value) { - m_AddAccessInfo = value; - m_AddAccessInfoIsSet = true; -} -bool SmPolicyUpdateContextData::addAccessInfoIsSet() const { - return m_AddAccessInfoIsSet; -} -void SmPolicyUpdateContextData::unsetAddAccessInfo() { - m_AddAccessInfoIsSet = false; -} -AdditionalAccessInfo SmPolicyUpdateContextData::getRelAccessInfo() const { - return m_RelAccessInfo; -} -void SmPolicyUpdateContextData::setRelAccessInfo( - AdditionalAccessInfo const& value) { - m_RelAccessInfo = value; - m_RelAccessInfoIsSet = true; -} -bool SmPolicyUpdateContextData::relAccessInfoIsSet() const { - return m_RelAccessInfoIsSet; -} -void SmPolicyUpdateContextData::unsetRelAccessInfo() { - m_RelAccessInfoIsSet = false; -} -PlmnIdNid SmPolicyUpdateContextData::getServingNetwork() const { - return m_ServingNetwork; -} -void SmPolicyUpdateContextData::setServingNetwork(PlmnIdNid const& value) { - m_ServingNetwork = value; - m_ServingNetworkIsSet = true; -} -bool SmPolicyUpdateContextData::servingNetworkIsSet() const { - return m_ServingNetworkIsSet; -} -void SmPolicyUpdateContextData::unsetServingNetwork() { - m_ServingNetworkIsSet = false; -} -UserLocation SmPolicyUpdateContextData::getUserLocationInfo() const { - return m_UserLocationInfo; -} -void SmPolicyUpdateContextData::setUserLocationInfo(UserLocation const& value) { - m_UserLocationInfo = value; - m_UserLocationInfoIsSet = true; -} -bool SmPolicyUpdateContextData::userLocationInfoIsSet() const { - return m_UserLocationInfoIsSet; -} -void SmPolicyUpdateContextData::unsetUserLocationInfo() { - m_UserLocationInfoIsSet = false; -} -std::string SmPolicyUpdateContextData::getUeTimeZone() const { - return m_UeTimeZone; -} -void SmPolicyUpdateContextData::setUeTimeZone(std::string const& value) { - m_UeTimeZone = value; - m_UeTimeZoneIsSet = true; -} -bool SmPolicyUpdateContextData::ueTimeZoneIsSet() const { - return m_UeTimeZoneIsSet; -} -void SmPolicyUpdateContextData::unsetUeTimeZone() { - m_UeTimeZoneIsSet = false; -} -std::string SmPolicyUpdateContextData::getRelIpv4Address() const { - return m_RelIpv4Address; -} -void SmPolicyUpdateContextData::setRelIpv4Address(std::string const& value) { - m_RelIpv4Address = value; - m_RelIpv4AddressIsSet = true; -} -bool SmPolicyUpdateContextData::relIpv4AddressIsSet() const { - return m_RelIpv4AddressIsSet; -} -void SmPolicyUpdateContextData::unsetRelIpv4Address() { - m_RelIpv4AddressIsSet = false; -} -std::string SmPolicyUpdateContextData::getIpv4Address() const { - return m_Ipv4Address; -} -void SmPolicyUpdateContextData::setIpv4Address(std::string const& value) { - m_Ipv4Address = value; - m_Ipv4AddressIsSet = true; -} -bool SmPolicyUpdateContextData::ipv4AddressIsSet() const { - return m_Ipv4AddressIsSet; -} -void SmPolicyUpdateContextData::unsetIpv4Address() { - m_Ipv4AddressIsSet = false; -} -std::string SmPolicyUpdateContextData::getIpDomain() const { - return m_IpDomain; -} -void SmPolicyUpdateContextData::setIpDomain(std::string const& value) { - m_IpDomain = value; - m_IpDomainIsSet = true; -} -bool SmPolicyUpdateContextData::ipDomainIsSet() const { - return m_IpDomainIsSet; -} -void SmPolicyUpdateContextData::unsetIpDomain() { - m_IpDomainIsSet = false; -} -Ipv6Prefix SmPolicyUpdateContextData::getIpv6AddressPrefix() const { - return m_Ipv6AddressPrefix; -} -void SmPolicyUpdateContextData::setIpv6AddressPrefix(Ipv6Prefix const& value) { - m_Ipv6AddressPrefix = value; - m_Ipv6AddressPrefixIsSet = true; -} -bool SmPolicyUpdateContextData::ipv6AddressPrefixIsSet() const { - return m_Ipv6AddressPrefixIsSet; -} -void SmPolicyUpdateContextData::unsetIpv6AddressPrefix() { - m_Ipv6AddressPrefixIsSet = false; -} -Ipv6Prefix SmPolicyUpdateContextData::getRelIpv6AddressPrefix() const { - return m_RelIpv6AddressPrefix; -} -void SmPolicyUpdateContextData::setRelIpv6AddressPrefix( - Ipv6Prefix const& value) { - m_RelIpv6AddressPrefix = value; - m_RelIpv6AddressPrefixIsSet = true; -} -bool SmPolicyUpdateContextData::relIpv6AddressPrefixIsSet() const { - return m_RelIpv6AddressPrefixIsSet; -} -void SmPolicyUpdateContextData::unsetRelIpv6AddressPrefix() { - m_RelIpv6AddressPrefixIsSet = false; -} -Ipv6Prefix SmPolicyUpdateContextData::getAddIpv6AddrPrefixes() const { - return m_AddIpv6AddrPrefixes; -} -void SmPolicyUpdateContextData::setAddIpv6AddrPrefixes( - Ipv6Prefix const& value) { - m_AddIpv6AddrPrefixes = value; - m_AddIpv6AddrPrefixesIsSet = true; -} -bool SmPolicyUpdateContextData::addIpv6AddrPrefixesIsSet() const { - return m_AddIpv6AddrPrefixesIsSet; -} -void SmPolicyUpdateContextData::unsetAddIpv6AddrPrefixes() { - m_AddIpv6AddrPrefixesIsSet = false; -} -Ipv6Prefix SmPolicyUpdateContextData::getAddRelIpv6AddrPrefixes() const { - return m_AddRelIpv6AddrPrefixes; -} -void SmPolicyUpdateContextData::setAddRelIpv6AddrPrefixes( - Ipv6Prefix const& value) { - m_AddRelIpv6AddrPrefixes = value; - m_AddRelIpv6AddrPrefixesIsSet = true; -} -bool SmPolicyUpdateContextData::addRelIpv6AddrPrefixesIsSet() const { - return m_AddRelIpv6AddrPrefixesIsSet; -} -void SmPolicyUpdateContextData::unsetAddRelIpv6AddrPrefixes() { - m_AddRelIpv6AddrPrefixesIsSet = false; -} -std::string SmPolicyUpdateContextData::getRelUeMac() const { - return m_RelUeMac; -} -void SmPolicyUpdateContextData::setRelUeMac(std::string const& value) { - m_RelUeMac = value; - m_RelUeMacIsSet = true; -} -bool SmPolicyUpdateContextData::relUeMacIsSet() const { - return m_RelUeMacIsSet; -} -void SmPolicyUpdateContextData::unsetRelUeMac() { - m_RelUeMacIsSet = false; -} -std::string SmPolicyUpdateContextData::getUeMac() const { - return m_UeMac; -} -void SmPolicyUpdateContextData::setUeMac(std::string const& value) { - m_UeMac = value; - m_UeMacIsSet = true; -} -bool SmPolicyUpdateContextData::ueMacIsSet() const { - return m_UeMacIsSet; -} -void SmPolicyUpdateContextData::unsetUeMac() { - m_UeMacIsSet = false; -} -Ambr SmPolicyUpdateContextData::getSubsSessAmbr() const { - return m_SubsSessAmbr; -} -void SmPolicyUpdateContextData::setSubsSessAmbr(Ambr const& value) { - m_SubsSessAmbr = value; - m_SubsSessAmbrIsSet = true; -} -bool SmPolicyUpdateContextData::subsSessAmbrIsSet() const { - return m_SubsSessAmbrIsSet; -} -void SmPolicyUpdateContextData::unsetSubsSessAmbr() { - m_SubsSessAmbrIsSet = false; -} -std::string SmPolicyUpdateContextData::getAuthProfIndex() const { - return m_AuthProfIndex; -} -void SmPolicyUpdateContextData::setAuthProfIndex(std::string const& value) { - m_AuthProfIndex = value; - m_AuthProfIndexIsSet = true; -} -bool SmPolicyUpdateContextData::authProfIndexIsSet() const { - return m_AuthProfIndexIsSet; -} -void SmPolicyUpdateContextData::unsetAuthProfIndex() { - m_AuthProfIndexIsSet = false; -} -SubscribedDefaultQos SmPolicyUpdateContextData::getSubsDefQos() const { - return m_SubsDefQos; -} -void SmPolicyUpdateContextData::setSubsDefQos( - SubscribedDefaultQos const& value) { - m_SubsDefQos = value; - m_SubsDefQosIsSet = true; -} -bool SmPolicyUpdateContextData::subsDefQosIsSet() const { - return m_SubsDefQosIsSet; -} -void SmPolicyUpdateContextData::unsetSubsDefQos() { - m_SubsDefQosIsSet = false; -} -int32_t SmPolicyUpdateContextData::getNumOfPackFilter() const { - return m_NumOfPackFilter; -} -void SmPolicyUpdateContextData::setNumOfPackFilter(int32_t const value) { - m_NumOfPackFilter = value; - m_NumOfPackFilterIsSet = true; -} -bool SmPolicyUpdateContextData::numOfPackFilterIsSet() const { - return m_NumOfPackFilterIsSet; -} -void SmPolicyUpdateContextData::unsetNumOfPackFilter() { - m_NumOfPackFilterIsSet = false; -} -std::vector<AccuUsageReport> SmPolicyUpdateContextData::getAccuUsageReports() - const { - return m_AccuUsageReports; -} -void SmPolicyUpdateContextData::setAccuUsageReports( - std::vector<AccuUsageReport> const& value) { - m_AccuUsageReports = value; - m_AccuUsageReportsIsSet = true; -} -bool SmPolicyUpdateContextData::accuUsageReportsIsSet() const { - return m_AccuUsageReportsIsSet; -} -void SmPolicyUpdateContextData::unsetAccuUsageReports() { - m_AccuUsageReportsIsSet = false; -} -bool SmPolicyUpdateContextData::isR3gppPsDataOffStatus() const { - return m_r_3gppPsDataOffStatus; -} -void SmPolicyUpdateContextData::setR3gppPsDataOffStatus(bool const value) { - m_r_3gppPsDataOffStatus = value; - m_r_3gppPsDataOffStatusIsSet = true; -} -bool SmPolicyUpdateContextData::r3gppPsDataOffStatusIsSet() const { - return m_r_3gppPsDataOffStatusIsSet; -} -void SmPolicyUpdateContextData::unsetr_3gppPsDataOffStatus() { - m_r_3gppPsDataOffStatusIsSet = false; -} -std::vector<AppDetectionInfo> SmPolicyUpdateContextData::getAppDetectionInfos() - const { - return m_AppDetectionInfos; -} -void SmPolicyUpdateContextData::setAppDetectionInfos( - std::vector<AppDetectionInfo> const& value) { - m_AppDetectionInfos = value; - m_AppDetectionInfosIsSet = true; -} -bool SmPolicyUpdateContextData::appDetectionInfosIsSet() const { - return m_AppDetectionInfosIsSet; -} -void SmPolicyUpdateContextData::unsetAppDetectionInfos() { - m_AppDetectionInfosIsSet = false; -} -std::vector<RuleReport> SmPolicyUpdateContextData::getRuleReports() const { - return m_RuleReports; -} -void SmPolicyUpdateContextData::setRuleReports( - std::vector<RuleReport> const& value) { - m_RuleReports = value; - m_RuleReportsIsSet = true; -} -bool SmPolicyUpdateContextData::ruleReportsIsSet() const { - return m_RuleReportsIsSet; -} -void SmPolicyUpdateContextData::unsetRuleReports() { - m_RuleReportsIsSet = false; -} -std::vector<SessionRuleReport> SmPolicyUpdateContextData::getSessRuleReports() - const { - return m_SessRuleReports; -} -void SmPolicyUpdateContextData::setSessRuleReports( - std::vector<SessionRuleReport> const& value) { - m_SessRuleReports = value; - m_SessRuleReportsIsSet = true; -} -bool SmPolicyUpdateContextData::sessRuleReportsIsSet() const { - return m_SessRuleReportsIsSet; -} -void SmPolicyUpdateContextData::unsetSessRuleReports() { - m_SessRuleReportsIsSet = false; -} -std::vector<QosNotificationControlInfo> -SmPolicyUpdateContextData::getQncReports() const { - return m_QncReports; -} -void SmPolicyUpdateContextData::setQncReports( - std::vector<QosNotificationControlInfo> const& value) { - m_QncReports = value; - m_QncReportsIsSet = true; -} -bool SmPolicyUpdateContextData::qncReportsIsSet() const { - return m_QncReportsIsSet; -} -void SmPolicyUpdateContextData::unsetQncReports() { - m_QncReportsIsSet = false; -} -std::vector<QosMonitoringReport> SmPolicyUpdateContextData::getQosMonReports() - const { - return m_QosMonReports; -} -void SmPolicyUpdateContextData::setQosMonReports( - std::vector<QosMonitoringReport> const& value) { - m_QosMonReports = value; - m_QosMonReportsIsSet = true; -} -bool SmPolicyUpdateContextData::qosMonReportsIsSet() const { - return m_QosMonReportsIsSet; -} -void SmPolicyUpdateContextData::unsetQosMonReports() { - m_QosMonReportsIsSet = false; -} -std::string SmPolicyUpdateContextData::getUserLocationInfoTime() const { - return m_UserLocationInfoTime; -} -void SmPolicyUpdateContextData::setUserLocationInfoTime( - std::string const& value) { - m_UserLocationInfoTime = value; - m_UserLocationInfoTimeIsSet = true; -} -bool SmPolicyUpdateContextData::userLocationInfoTimeIsSet() const { - return m_UserLocationInfoTimeIsSet; -} -void SmPolicyUpdateContextData::unsetUserLocationInfoTime() { - m_UserLocationInfoTimeIsSet = false; -} -std::map<std::string, PresenceInfo> SmPolicyUpdateContextData::getRepPraInfos() - const { - return m_RepPraInfos; -} -void SmPolicyUpdateContextData::setRepPraInfos( - std::map<std::string, PresenceInfo> const& value) { - m_RepPraInfos = value; - m_RepPraInfosIsSet = true; -} -bool SmPolicyUpdateContextData::repPraInfosIsSet() const { - return m_RepPraInfosIsSet; -} -void SmPolicyUpdateContextData::unsetRepPraInfos() { - m_RepPraInfosIsSet = false; -} -UeInitiatedResourceRequest SmPolicyUpdateContextData::getUeInitResReq() const { - return m_UeInitResReq; -} -void SmPolicyUpdateContextData::setUeInitResReq( - UeInitiatedResourceRequest const& value) { - m_UeInitResReq = value; - m_UeInitResReqIsSet = true; -} -bool SmPolicyUpdateContextData::ueInitResReqIsSet() const { - return m_UeInitResReqIsSet; -} -void SmPolicyUpdateContextData::unsetUeInitResReq() { - m_UeInitResReqIsSet = false; -} -bool SmPolicyUpdateContextData::isRefQosIndication() const { - return m_RefQosIndication; -} -void SmPolicyUpdateContextData::setRefQosIndication(bool const value) { - m_RefQosIndication = value; - m_RefQosIndicationIsSet = true; -} -bool SmPolicyUpdateContextData::refQosIndicationIsSet() const { - return m_RefQosIndicationIsSet; -} -void SmPolicyUpdateContextData::unsetRefQosIndication() { - m_RefQosIndicationIsSet = false; -} -QosFlowUsage SmPolicyUpdateContextData::getQosFlowUsage() const { - return m_QosFlowUsage; -} -void SmPolicyUpdateContextData::setQosFlowUsage(QosFlowUsage const& value) { - m_QosFlowUsage = value; - m_QosFlowUsageIsSet = true; -} -bool SmPolicyUpdateContextData::qosFlowUsageIsSet() const { - return m_QosFlowUsageIsSet; -} -void SmPolicyUpdateContextData::unsetQosFlowUsage() { - m_QosFlowUsageIsSet = false; -} -CreditManagementStatus SmPolicyUpdateContextData::getCreditManageStatus() - const { - return m_CreditManageStatus; -} -void SmPolicyUpdateContextData::setCreditManageStatus( - CreditManagementStatus const& value) { - m_CreditManageStatus = value; - m_CreditManageStatusIsSet = true; -} -bool SmPolicyUpdateContextData::creditManageStatusIsSet() const { - return m_CreditManageStatusIsSet; -} -void SmPolicyUpdateContextData::unsetCreditManageStatus() { - m_CreditManageStatusIsSet = false; -} -ServingNfIdentity SmPolicyUpdateContextData::getServNfId() const { - return m_ServNfId; -} -void SmPolicyUpdateContextData::setServNfId(ServingNfIdentity const& value) { - m_ServNfId = value; - m_ServNfIdIsSet = true; -} -bool SmPolicyUpdateContextData::servNfIdIsSet() const { - return m_ServNfIdIsSet; -} -void SmPolicyUpdateContextData::unsetServNfId() { - m_ServNfIdIsSet = false; -} -TraceData SmPolicyUpdateContextData::getTraceReq() const { - return m_TraceReq; -} -void SmPolicyUpdateContextData::setTraceReq(TraceData const& value) { - m_TraceReq = value; - m_TraceReqIsSet = true; -} -bool SmPolicyUpdateContextData::traceReqIsSet() const { - return m_TraceReqIsSet; -} -void SmPolicyUpdateContextData::unsetTraceReq() { - m_TraceReqIsSet = false; -} -MaPduIndication SmPolicyUpdateContextData::getMaPduInd() const { - return m_MaPduInd; -} -void SmPolicyUpdateContextData::setMaPduInd(MaPduIndication const& value) { - m_MaPduInd = value; - m_MaPduIndIsSet = true; -} -bool SmPolicyUpdateContextData::maPduIndIsSet() const { - return m_MaPduIndIsSet; -} -void SmPolicyUpdateContextData::unsetMaPduInd() { - m_MaPduIndIsSet = false; -} -AtsssCapability SmPolicyUpdateContextData::getAtsssCapab() const { - return m_AtsssCapab; -} -void SmPolicyUpdateContextData::setAtsssCapab(AtsssCapability const& value) { - m_AtsssCapab = value; - m_AtsssCapabIsSet = true; -} -bool SmPolicyUpdateContextData::atsssCapabIsSet() const { - return m_AtsssCapabIsSet; -} -void SmPolicyUpdateContextData::unsetAtsssCapab() { - m_AtsssCapabIsSet = false; -} -TsnBridgeInfo SmPolicyUpdateContextData::getTsnBridgeInfo() const { - return m_TsnBridgeInfo; -} -void SmPolicyUpdateContextData::setTsnBridgeInfo(TsnBridgeInfo const& value) { - m_TsnBridgeInfo = value; - m_TsnBridgeInfoIsSet = true; -} -bool SmPolicyUpdateContextData::tsnBridgeInfoIsSet() const { - return m_TsnBridgeInfoIsSet; -} -void SmPolicyUpdateContextData::unsetTsnBridgeInfo() { - m_TsnBridgeInfoIsSet = false; -} -PortManagementContainer SmPolicyUpdateContextData::getTsnPortManContDstt() - const { - return m_TsnPortManContDstt; -} -void SmPolicyUpdateContextData::setTsnPortManContDstt( - PortManagementContainer const& value) { - m_TsnPortManContDstt = value; - m_TsnPortManContDsttIsSet = true; -} -bool SmPolicyUpdateContextData::tsnPortManContDsttIsSet() const { - return m_TsnPortManContDsttIsSet; -} -void SmPolicyUpdateContextData::unsetTsnPortManContDstt() { - m_TsnPortManContDsttIsSet = false; -} -std::vector<PortManagementContainer> -SmPolicyUpdateContextData::getTsnPortManContNwtts() const { - return m_TsnPortManContNwtts; -} -void SmPolicyUpdateContextData::setTsnPortManContNwtts( - std::vector<PortManagementContainer> const& value) { - m_TsnPortManContNwtts = value; - m_TsnPortManContNwttsIsSet = true; -} -bool SmPolicyUpdateContextData::tsnPortManContNwttsIsSet() const { - return m_TsnPortManContNwttsIsSet; -} -void SmPolicyUpdateContextData::unsetTsnPortManContNwtts() { - m_TsnPortManContNwttsIsSet = false; -} -std::vector<IpMulticastAddressInfo> SmPolicyUpdateContextData::getMulAddrInfos() - const { - return m_MulAddrInfos; -} -void SmPolicyUpdateContextData::setMulAddrInfos( - std::vector<IpMulticastAddressInfo> const& value) { - m_MulAddrInfos = value; - m_MulAddrInfosIsSet = true; -} -bool SmPolicyUpdateContextData::mulAddrInfosIsSet() const { - return m_MulAddrInfosIsSet; -} -void SmPolicyUpdateContextData::unsetMulAddrInfos() { - m_MulAddrInfosIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SmPolicyUpdateContextData.h b/src/api-server/model/SmPolicyUpdateContextData.h deleted file mode 100644 index d21d175cad3a53aa90363cab3370166ac610278c..0000000000000000000000000000000000000000 --- a/src/api-server/model/SmPolicyUpdateContextData.h +++ /dev/null @@ -1,496 +0,0 @@ -/** - * 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. - */ -/* - * SmPolicyUpdateContextData.h - * - * - */ - -#ifndef SmPolicyUpdateContextData_H_ -#define SmPolicyUpdateContextData_H_ - -#include "SubscribedDefaultQos.h" -#include "QosNotificationControlInfo.h" -#include "PresenceInfo.h" -#include "MaPduIndication.h" -#include "AccuUsageReport.h" -#include "TraceData.h" -#include "PlmnIdNid.h" -#include "PolicyControlRequestTrigger.h" -#include "Ipv6Prefix.h" -#include "PortManagementContainer.h" -#include "AppDetectionInfo.h" -#include "CreditManagementStatus.h" -#include <map> -#include "AdditionalAccessInfo.h" -#include "AccNetChId.h" -#include "Ambr.h" -#include "AtsssCapability.h" -#include "RatType.h" -#include "SessionRuleReport.h" -#include <string> -#include "ServingNfIdentity.h" -#include "UeInitiatedResourceRequest.h" -#include <vector> -#include "AccessType.h" -#include "QosFlowUsage.h" -#include "QosMonitoringReport.h" -#include "RuleReport.h" -#include "UserLocation.h" -#include "TsnBridgeInfo.h" -#include "IpMulticastAddressInfo.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class SmPolicyUpdateContextData { - public: - SmPolicyUpdateContextData(); - virtual ~SmPolicyUpdateContextData() = 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 SmPolicyUpdateContextData& rhs) const; - bool operator!=(const SmPolicyUpdateContextData& rhs) const; - - ///////////////////////////////////////////// - /// SmPolicyUpdateContextData members - - /// <summary> - /// The policy control reqeust trigges which are met. - /// </summary> - std::vector<PolicyControlRequestTrigger> getRepPolicyCtrlReqTriggers() const; - void setRepPolicyCtrlReqTriggers( - std::vector<PolicyControlRequestTrigger> const& value); - bool repPolicyCtrlReqTriggersIsSet() const; - void unsetRepPolicyCtrlReqTriggers(); - /// <summary> - /// Indicates the access network charging identifier for the PCC rule(s) or - /// whole PDU session. - /// </summary> - std::vector<AccNetChId> getAccNetChIds() const; - void setAccNetChIds(std::vector<AccNetChId> const& value); - bool accNetChIdsIsSet() const; - void unsetAccNetChIds(); - /// <summary> - /// - /// </summary> - oai::model::common::AccessType getAccessType() const; - void setAccessType(oai::model::common::AccessType const& value); - bool accessTypeIsSet() const; - void unsetAccessType(); - /// <summary> - /// - /// </summary> - oai::model::common::RatType getRatType() const; - void setRatType(oai::model::common::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> - AdditionalAccessInfo getRelAccessInfo() const; - void setRelAccessInfo(AdditionalAccessInfo const& value); - bool relAccessInfoIsSet() const; - void unsetRelAccessInfo(); - /// <summary> - /// - /// </summary> - oai::model::common::PlmnIdNid getServingNetwork() const; - void setServingNetwork(oai::model::common::PlmnIdNid const& value); - bool servingNetworkIsSet() const; - void unsetServingNetwork(); - /// <summary> - /// - /// </summary> - oai::model::common::UserLocation getUserLocationInfo() const; - void setUserLocationInfo(oai::model::common::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 getRelIpv4Address() const; - void setRelIpv4Address(std::string const& value); - bool relIpv4AddressIsSet() const; - void unsetRelIpv4Address(); - /// <summary> - /// - /// </summary> - std::string getIpv4Address() const; - void setIpv4Address(std::string const& value); - bool ipv4AddressIsSet() const; - void unsetIpv4Address(); - /// <summary> - /// Indicates the IPv4 address domain - /// </summary> - std::string getIpDomain() const; - void setIpDomain(std::string const& value); - bool ipDomainIsSet() const; - void unsetIpDomain(); - /// <summary> - /// - /// </summary> - oai::model::common::Ipv6Prefix getIpv6AddressPrefix() const; - void setIpv6AddressPrefix(oai::model::common::Ipv6Prefix const& value); - bool ipv6AddressPrefixIsSet() const; - void unsetIpv6AddressPrefix(); - /// <summary> - /// - /// </summary> - oai::model::common::Ipv6Prefix getRelIpv6AddressPrefix() const; - void setRelIpv6AddressPrefix(oai::model::common::Ipv6Prefix const& value); - bool relIpv6AddressPrefixIsSet() const; - void unsetRelIpv6AddressPrefix(); - /// <summary> - /// - /// </summary> - oai::model::common::Ipv6Prefix getAddIpv6AddrPrefixes() const; - void setAddIpv6AddrPrefixes(oai::model::common::Ipv6Prefix const& value); - bool addIpv6AddrPrefixesIsSet() const; - void unsetAddIpv6AddrPrefixes(); - /// <summary> - /// - /// </summary> - oai::model::common::Ipv6Prefix getAddRelIpv6AddrPrefixes() const; - void setAddRelIpv6AddrPrefixes(oai::model::common::Ipv6Prefix const& value); - bool addRelIpv6AddrPrefixesIsSet() const; - void unsetAddRelIpv6AddrPrefixes(); - /// <summary> - /// - /// </summary> - std::string getRelUeMac() const; - void setRelUeMac(std::string const& value); - bool relUeMacIsSet() const; - void unsetRelUeMac(); - /// <summary> - /// - /// </summary> - std::string getUeMac() const; - void setUeMac(std::string const& value); - bool ueMacIsSet() const; - void unsetUeMac(); - /// <summary> - /// - /// </summary> - oai::model::common::Ambr getSubsSessAmbr() const; - void setSubsSessAmbr(oai::model::common::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> - oai::model::common::SubscribedDefaultQos getSubsDefQos() const; - void setSubsDefQos(oai::model::common::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> - /// Contains the usage report - /// </summary> - std::vector<AccuUsageReport> getAccuUsageReports() const; - void setAccuUsageReports(std::vector<AccuUsageReport> const& value); - bool accuUsageReportsIsSet() const; - void unsetAccuUsageReports(); - /// <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> - /// Report the start/stop of the application traffic and detected SDF - /// descriptions if applicable. - /// </summary> - std::vector<AppDetectionInfo> getAppDetectionInfos() const; - void setAppDetectionInfos(std::vector<AppDetectionInfo> const& value); - bool appDetectionInfosIsSet() const; - void unsetAppDetectionInfos(); - /// <summary> - /// Used to report the PCC rule failure. - /// </summary> - std::vector<RuleReport> getRuleReports() const; - void setRuleReports(std::vector<RuleReport> const& value); - bool ruleReportsIsSet() const; - void unsetRuleReports(); - /// <summary> - /// Used to report the session rule failure. - /// </summary> - std::vector<SessionRuleReport> getSessRuleReports() const; - void setSessRuleReports(std::vector<SessionRuleReport> const& value); - bool sessRuleReportsIsSet() const; - void unsetSessRuleReports(); - /// <summary> - /// QoS Notification Control information. - /// </summary> - std::vector<QosNotificationControlInfo> getQncReports() const; - void setQncReports(std::vector<QosNotificationControlInfo> const& value); - bool qncReportsIsSet() const; - void unsetQncReports(); - /// <summary> - /// - /// </summary> - std::vector<QosMonitoringReport> getQosMonReports() const; - void setQosMonReports(std::vector<QosMonitoringReport> const& value); - bool qosMonReportsIsSet() const; - void unsetQosMonReports(); - /// <summary> - /// - /// </summary> - std::string getUserLocationInfoTime() const; - void setUserLocationInfoTime(std::string const& value); - bool userLocationInfoTimeIsSet() const; - void unsetUserLocationInfoTime(); - /// <summary> - /// Reports the changes of presence reporting area. - /// </summary> - std::map<std::string, oai::model::common::PresenceInfo> getRepPraInfos() - const; - void setRepPraInfos( - std::map<std::string, oai::model::common::PresenceInfo> const& value); - bool repPraInfosIsSet() const; - void unsetRepPraInfos(); - /// <summary> - /// - /// </summary> - UeInitiatedResourceRequest getUeInitResReq() const; - void setUeInitResReq(UeInitiatedResourceRequest const& value); - bool ueInitResReqIsSet() const; - void unsetUeInitResReq(); - /// <summary> - /// If it is included and set to true, the reflective QoS is supported by the - /// UE. If it is included and set to false, the reflective QoS is revoked by - /// the UE. - /// </summary> - bool isRefQosIndication() const; - void setRefQosIndication(bool const value); - bool refQosIndicationIsSet() const; - void unsetRefQosIndication(); - /// <summary> - /// - /// </summary> - QosFlowUsage getQosFlowUsage() const; - void setQosFlowUsage(QosFlowUsage const& value); - bool qosFlowUsageIsSet() const; - void unsetQosFlowUsage(); - /// <summary> - /// - /// </summary> - CreditManagementStatus getCreditManageStatus() const; - void setCreditManageStatus(CreditManagementStatus const& value); - bool creditManageStatusIsSet() const; - void unsetCreditManageStatus(); - /// <summary> - /// - /// </summary> - ServingNfIdentity getServNfId() const; - void setServNfId(ServingNfIdentity const& value); - bool servNfIdIsSet() const; - void unsetServNfId(); - /// <summary> - /// - /// </summary> - oai::model::common::TraceData getTraceReq() const; - void setTraceReq(oai::model::common::TraceData const& value); - bool traceReqIsSet() const; - void unsetTraceReq(); - /// <summary> - /// - /// </summary> - MaPduIndication getMaPduInd() const; - void setMaPduInd(MaPduIndication const& value); - bool maPduIndIsSet() const; - void unsetMaPduInd(); - /// <summary> - /// - /// </summary> - oai::model::common::AtsssCapability getAtsssCapab() const; - void setAtsssCapab(oai::model::common::AtsssCapability const& value); - bool atsssCapabIsSet() const; - void unsetAtsssCapab(); - /// <summary> - /// - /// </summary> - TsnBridgeInfo getTsnBridgeInfo() const; - void setTsnBridgeInfo(TsnBridgeInfo const& value); - bool tsnBridgeInfoIsSet() const; - void unsetTsnBridgeInfo(); - /// <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(); - /// <summary> - /// - /// </summary> - std::vector<IpMulticastAddressInfo> getMulAddrInfos() const; - void setMulAddrInfos(std::vector<IpMulticastAddressInfo> const& value); - bool mulAddrInfosIsSet() const; - void unsetMulAddrInfos(); - - friend void to_json(nlohmann::json& j, const SmPolicyUpdateContextData& o); - friend void from_json(const nlohmann::json& j, SmPolicyUpdateContextData& o); - - protected: - std::vector<PolicyControlRequestTrigger> m_RepPolicyCtrlReqTriggers; - bool m_RepPolicyCtrlReqTriggersIsSet; - std::vector<AccNetChId> m_AccNetChIds; - bool m_AccNetChIdsIsSet; - oai::model::common::AccessType m_AccessType; - bool m_AccessTypeIsSet; - oai::model::common::RatType m_RatType; - bool m_RatTypeIsSet; - AdditionalAccessInfo m_AddAccessInfo; - bool m_AddAccessInfoIsSet; - AdditionalAccessInfo m_RelAccessInfo; - bool m_RelAccessInfoIsSet; - oai::model::common::PlmnIdNid m_ServingNetwork; - bool m_ServingNetworkIsSet; - oai::model::common::UserLocation m_UserLocationInfo; - bool m_UserLocationInfoIsSet; - std::string m_UeTimeZone; - bool m_UeTimeZoneIsSet; - std::string m_RelIpv4Address; - bool m_RelIpv4AddressIsSet; - std::string m_Ipv4Address; - bool m_Ipv4AddressIsSet; - std::string m_IpDomain; - bool m_IpDomainIsSet; - oai::model::common::Ipv6Prefix m_Ipv6AddressPrefix; - bool m_Ipv6AddressPrefixIsSet; - oai::model::common::Ipv6Prefix m_RelIpv6AddressPrefix; - bool m_RelIpv6AddressPrefixIsSet; - oai::model::common::Ipv6Prefix m_AddIpv6AddrPrefixes; - bool m_AddIpv6AddrPrefixesIsSet; - oai::model::common::Ipv6Prefix m_AddRelIpv6AddrPrefixes; - bool m_AddRelIpv6AddrPrefixesIsSet; - std::string m_RelUeMac; - bool m_RelUeMacIsSet; - std::string m_UeMac; - bool m_UeMacIsSet; - oai::model::common::Ambr m_SubsSessAmbr; - bool m_SubsSessAmbrIsSet; - std::string m_AuthProfIndex; - bool m_AuthProfIndexIsSet; - oai::model::common::SubscribedDefaultQos m_SubsDefQos; - bool m_SubsDefQosIsSet; - int32_t m_NumOfPackFilter; - bool m_NumOfPackFilterIsSet; - std::vector<AccuUsageReport> m_AccuUsageReports; - bool m_AccuUsageReportsIsSet; - bool m_r_3gppPsDataOffStatus; - bool m_r_3gppPsDataOffStatusIsSet; - std::vector<AppDetectionInfo> m_AppDetectionInfos; - bool m_AppDetectionInfosIsSet; - std::vector<RuleReport> m_RuleReports; - bool m_RuleReportsIsSet; - std::vector<SessionRuleReport> m_SessRuleReports; - bool m_SessRuleReportsIsSet; - std::vector<QosNotificationControlInfo> m_QncReports; - bool m_QncReportsIsSet; - std::vector<QosMonitoringReport> m_QosMonReports; - bool m_QosMonReportsIsSet; - std::string m_UserLocationInfoTime; - bool m_UserLocationInfoTimeIsSet; - std::map<std::string, oai::model::common::PresenceInfo> m_RepPraInfos; - bool m_RepPraInfosIsSet; - UeInitiatedResourceRequest m_UeInitResReq; - bool m_UeInitResReqIsSet; - bool m_RefQosIndication; - bool m_RefQosIndicationIsSet; - QosFlowUsage m_QosFlowUsage; - bool m_QosFlowUsageIsSet; - CreditManagementStatus m_CreditManageStatus; - bool m_CreditManageStatusIsSet; - ServingNfIdentity m_ServNfId; - bool m_ServNfIdIsSet; - oai::model::common::TraceData m_TraceReq; - bool m_TraceReqIsSet; - MaPduIndication m_MaPduInd; - bool m_MaPduIndIsSet; - oai::model::common::AtsssCapability m_AtsssCapab; - bool m_AtsssCapabIsSet; - TsnBridgeInfo m_TsnBridgeInfo; - bool m_TsnBridgeInfoIsSet; - PortManagementContainer m_TsnPortManContDstt; - bool m_TsnPortManContDsttIsSet; - std::vector<PortManagementContainer> m_TsnPortManContNwtts; - bool m_TsnPortManContNwttsIsSet; - std::vector<IpMulticastAddressInfo> m_MulAddrInfos; - bool m_MulAddrInfosIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SmPolicyUpdateContextData_H_ */ diff --git a/src/api-server/model/SteerModeValue.cpp b/src/api-server/model/SteerModeValue.cpp deleted file mode 100644 index 5d7de5ecf0f8b7a5a6b9079e4f7cb8902e460ea0..0000000000000000000000000000000000000000 --- a/src/api-server/model/SteerModeValue.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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 "SteerModeValue.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -SteerModeValue::SteerModeValue() {} - -void SteerModeValue::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SteerModeValue::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SteerModeValue::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "SteerModeValue" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool SteerModeValue::operator==(const SteerModeValue& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool SteerModeValue::operator!=(const SteerModeValue& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SteerModeValue& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, SteerModeValue& o) { - from_json(j, o.m_value); -} - -SteerModeValue_anyOf SteerModeValue::getValue() const { - return m_value; -} - -void SteerModeValue::setValue(SteerModeValue_anyOf value) { - m_value = value; -} - -SteerModeValue_anyOf::eSteerModeValue_anyOf SteerModeValue::getEnumValue() - const { - return m_value.getValue(); -} - -void SteerModeValue::setEnumValue( - SteerModeValue_anyOf::eSteerModeValue_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SteerModeValue.h b/src/api-server/model/SteerModeValue.h deleted file mode 100644 index bd045048582478880b8b3185afeb0617ed5e1e0a..0000000000000000000000000000000000000000 --- a/src/api-server/model/SteerModeValue.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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. - */ -/* - * SteerModeValue.h - * - * - */ - -#ifndef SteerModeValue_H_ -#define SteerModeValue_H_ - -#include "SteerModeValue_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class SteerModeValue { - public: - SteerModeValue(); - virtual ~SteerModeValue() = 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 SteerModeValue& rhs) const; - bool operator!=(const SteerModeValue& rhs) const; - - ///////////////////////////////////////////// - /// SteerModeValue members - - SteerModeValue_anyOf getValue() const; - void setValue(SteerModeValue_anyOf value); - SteerModeValue_anyOf::eSteerModeValue_anyOf getEnumValue() const; - void setEnumValue(SteerModeValue_anyOf::eSteerModeValue_anyOf value); - friend void to_json(nlohmann::json& j, const SteerModeValue& o); - friend void from_json(const nlohmann::json& j, SteerModeValue& o); - friend void to_json(nlohmann::json& j, const SteerModeValue_anyOf& o); - friend void from_json(const nlohmann::json& j, SteerModeValue_anyOf& o); - - protected: - SteerModeValue_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SteerModeValue_H_ */ diff --git a/src/api-server/model/SteerModeValue_anyOf.cpp b/src/api-server/model/SteerModeValue_anyOf.cpp deleted file mode 100644 index 74a5ea4389468459b97d9c0852e7c0c2fd3fe618..0000000000000000000000000000000000000000 --- a/src/api-server/model/SteerModeValue_anyOf.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/** - * 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 "SteerModeValue_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -SteerModeValue_anyOf::SteerModeValue_anyOf() {} - -void SteerModeValue_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SteerModeValue_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SteerModeValue_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "SteerModeValue_anyOf" : pathPrefix; - - if (m_value == SteerModeValue_anyOf::eSteerModeValue_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool SteerModeValue_anyOf::operator==(const SteerModeValue_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool SteerModeValue_anyOf::operator!=(const SteerModeValue_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SteerModeValue_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case SteerModeValue_anyOf::eSteerModeValue_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case SteerModeValue_anyOf::eSteerModeValue_anyOf::ACTIVE_STANDBY: - j = "ACTIVE_STANDBY"; - break; - case SteerModeValue_anyOf::eSteerModeValue_anyOf::LOAD_BALANCING: - j = "LOAD_BALANCING"; - break; - case SteerModeValue_anyOf::eSteerModeValue_anyOf::SMALLEST_DELAY: - j = "SMALLEST_DELAY"; - break; - case SteerModeValue_anyOf::eSteerModeValue_anyOf::PRIORITY_BASED: - j = "PRIORITY_BASED"; - break; - } -} - -void from_json(const nlohmann::json& j, SteerModeValue_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "ACTIVE_STANDBY") { - o.setValue(SteerModeValue_anyOf::eSteerModeValue_anyOf::ACTIVE_STANDBY); - } else if (s == "LOAD_BALANCING") { - o.setValue(SteerModeValue_anyOf::eSteerModeValue_anyOf::LOAD_BALANCING); - } else if (s == "SMALLEST_DELAY") { - o.setValue(SteerModeValue_anyOf::eSteerModeValue_anyOf::SMALLEST_DELAY); - } else if (s == "PRIORITY_BASED") { - o.setValue(SteerModeValue_anyOf::eSteerModeValue_anyOf::PRIORITY_BASED); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " SteerModeValue_anyOf::eSteerModeValue_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -SteerModeValue_anyOf::eSteerModeValue_anyOf SteerModeValue_anyOf::getValue() - const { - return m_value; -} -void SteerModeValue_anyOf::setValue( - SteerModeValue_anyOf::eSteerModeValue_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SteerModeValue_anyOf.h b/src/api-server/model/SteerModeValue_anyOf.h deleted file mode 100644 index a5ca2e086629f4ec9348fefded1dc284b6837cb4..0000000000000000000000000000000000000000 --- a/src/api-server/model/SteerModeValue_anyOf.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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. - */ -/* - * SteerModeValue_anyOf.h - * - * - */ - -#ifndef SteerModeValue_anyOf_H_ -#define SteerModeValue_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class SteerModeValue_anyOf { - public: - SteerModeValue_anyOf(); - virtual ~SteerModeValue_anyOf() = default; - - enum class eSteerModeValue_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - ACTIVE_STANDBY, - LOAD_BALANCING, - SMALLEST_DELAY, - PRIORITY_BASED - }; - - /// <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 SteerModeValue_anyOf& rhs) const; - bool operator!=(const SteerModeValue_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// SteerModeValue_anyOf members - - SteerModeValue_anyOf::eSteerModeValue_anyOf getValue() const; - void setValue(SteerModeValue_anyOf::eSteerModeValue_anyOf value); - - friend void to_json(nlohmann::json& j, const SteerModeValue_anyOf& o); - friend void from_json(const nlohmann::json& j, SteerModeValue_anyOf& o); - - protected: - SteerModeValue_anyOf::eSteerModeValue_anyOf m_value = SteerModeValue_anyOf:: - eSteerModeValue_anyOf::INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SteerModeValue_anyOf_H_ */ diff --git a/src/api-server/model/SteeringFunctionality.cpp b/src/api-server/model/SteeringFunctionality.cpp deleted file mode 100644 index 48595d4acdf97e979099debb63a43855a6af03cb..0000000000000000000000000000000000000000 --- a/src/api-server/model/SteeringFunctionality.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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 "SteeringFunctionality.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -SteeringFunctionality::SteeringFunctionality() {} - -void SteeringFunctionality::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SteeringFunctionality::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SteeringFunctionality::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "SteeringFunctionality" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool SteeringFunctionality::operator==(const SteeringFunctionality& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool SteeringFunctionality::operator!=(const SteeringFunctionality& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SteeringFunctionality& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, SteeringFunctionality& o) { - from_json(j, o.m_value); -} - -SteeringFunctionality_anyOf SteeringFunctionality::getValue() const { - return m_value; -} - -void SteeringFunctionality::setValue(SteeringFunctionality_anyOf value) { - m_value = value; -} - -SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf -SteeringFunctionality::getEnumValue() const { - return m_value.getValue(); -} - -void SteeringFunctionality::setEnumValue( - SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SteeringFunctionality.h b/src/api-server/model/SteeringFunctionality.h deleted file mode 100644 index d05d09b04664178ec9981955c9cb61ac2ccd074d..0000000000000000000000000000000000000000 --- a/src/api-server/model/SteeringFunctionality.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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. - */ -/* - * SteeringFunctionality.h - * - * Possible values are - MPTCP: Indicates that PCF authorizes the MPTCP - * functionality to support traffic steering, switching and splitting. - - * ATSSS_LL: Indicates that PCF authorizes the ATSSS-LL functionality to support - * traffic steering, switching and splitting. - */ - -#ifndef SteeringFunctionality_H_ -#define SteeringFunctionality_H_ - -#include "SteeringFunctionality_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// Possible values are - MPTCP: Indicates that PCF authorizes the MPTCP -/// functionality to support traffic steering, switching and splitting. - -/// ATSSS_LL: Indicates that PCF authorizes the ATSSS-LL functionality to -/// support traffic steering, switching and splitting. -/// </summary> -class SteeringFunctionality { - public: - SteeringFunctionality(); - virtual ~SteeringFunctionality() = 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 SteeringFunctionality& rhs) const; - bool operator!=(const SteeringFunctionality& rhs) const; - - ///////////////////////////////////////////// - /// SteeringFunctionality members - - SteeringFunctionality_anyOf getValue() const; - void setValue(SteeringFunctionality_anyOf value); - SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf getEnumValue() - const; - void setEnumValue( - SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf value); - friend void to_json(nlohmann::json& j, const SteeringFunctionality& o); - friend void from_json(const nlohmann::json& j, SteeringFunctionality& o); - friend void to_json(nlohmann::json& j, const SteeringFunctionality_anyOf& o); - friend void from_json( - const nlohmann::json& j, SteeringFunctionality_anyOf& o); - - protected: - SteeringFunctionality_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SteeringFunctionality_H_ */ diff --git a/src/api-server/model/SteeringFunctionality_anyOf.cpp b/src/api-server/model/SteeringFunctionality_anyOf.cpp deleted file mode 100644 index db806159d1a64477ae0f17a99a5f430699bb666e..0000000000000000000000000000000000000000 --- a/src/api-server/model/SteeringFunctionality_anyOf.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/** - * 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 "SteeringFunctionality_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -SteeringFunctionality_anyOf::SteeringFunctionality_anyOf() {} - -void SteeringFunctionality_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SteeringFunctionality_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SteeringFunctionality_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "SteeringFunctionality_anyOf" : pathPrefix; - - if (m_value == SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool SteeringFunctionality_anyOf::operator==( - const SteeringFunctionality_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool SteeringFunctionality_anyOf::operator!=( - const SteeringFunctionality_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SteeringFunctionality_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf::MPTCP: - j = "MPTCP"; - break; - case SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf::ATSSS_LL: - j = "ATSSS_LL"; - break; - } -} - -void from_json(const nlohmann::json& j, SteeringFunctionality_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "MPTCP") { - o.setValue( - SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf::MPTCP); - } else if (s == "ATSSS_LL") { - o.setValue( - SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf::ATSSS_LL); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf -SteeringFunctionality_anyOf::getValue() const { - return m_value; -} -void SteeringFunctionality_anyOf::setValue( - SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SteeringFunctionality_anyOf.h b/src/api-server/model/SteeringFunctionality_anyOf.h deleted file mode 100644 index 7ce6ce96b478914bb8458656774f6e5b06e3f481..0000000000000000000000000000000000000000 --- a/src/api-server/model/SteeringFunctionality_anyOf.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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. - */ -/* - * SteeringFunctionality_anyOf.h - * - * - */ - -#ifndef SteeringFunctionality_anyOf_H_ -#define SteeringFunctionality_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class SteeringFunctionality_anyOf { - public: - SteeringFunctionality_anyOf(); - virtual ~SteeringFunctionality_anyOf() = default; - - enum class eSteeringFunctionality_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - MPTCP, - ATSSS_LL - }; - - /// <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 SteeringFunctionality_anyOf& rhs) const; - bool operator!=(const SteeringFunctionality_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// SteeringFunctionality_anyOf members - - SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf getValue() const; - void setValue( - SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf value); - - friend void to_json(nlohmann::json& j, const SteeringFunctionality_anyOf& o); - friend void from_json( - const nlohmann::json& j, SteeringFunctionality_anyOf& o); - - protected: - SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf m_value = - SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SteeringFunctionality_anyOf_H_ */ diff --git a/src/api-server/model/SteeringMode.cpp b/src/api-server/model/SteeringMode.cpp deleted file mode 100644 index a4afd8a9b7a93c174ee786da6d7fbc0de700a2c2..0000000000000000000000000000000000000000 --- a/src/api-server/model/SteeringMode.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/** - * 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 "SteeringMode.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -SteeringMode::SteeringMode() { - m_ActiveIsSet = false; - m_StandbyIsSet = false; - m_r_3gLoad = 0; - m_r_3gLoadIsSet = false; - m_PrioAccIsSet = false; -} - -void SteeringMode::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool SteeringMode::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool SteeringMode::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "SteeringMode" : pathPrefix; - - if (r3gLoadIsSet()) { - const int32_t& value = m_r_3gLoad; - const std::string currentValuePath = _pathPrefix + ".r3gLoad"; - - if (value < 0) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - } - - return success; -} - -bool SteeringMode::operator==(const SteeringMode& rhs) const { - return - - (getSteerModeValue() == rhs.getSteerModeValue()) && - - ((!activeIsSet() && !rhs.activeIsSet()) || - (activeIsSet() && rhs.activeIsSet() && - getActive() == rhs.getActive())) && - - ((!standbyIsSet() && !rhs.standbyIsSet()) || - (standbyIsSet() && rhs.standbyIsSet() && - getStandby() == rhs.getStandby())) && - - ((!r3gLoadIsSet() && !rhs.r3gLoadIsSet()) || - (r3gLoadIsSet() && rhs.r3gLoadIsSet() && - getR3gLoad() == rhs.getR3gLoad())) && - - ((!prioAccIsSet() && !rhs.prioAccIsSet()) || - (prioAccIsSet() && rhs.prioAccIsSet() && - getPrioAcc() == rhs.getPrioAcc())) - - ; -} - -bool SteeringMode::operator!=(const SteeringMode& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SteeringMode& o) { - j = nlohmann::json(); - j["steerModeValue"] = o.m_SteerModeValue; - if (o.activeIsSet()) j["active"] = o.m_Active; - if (o.standbyIsSet()) j["standby"] = o.m_Standby; - if (o.r3gLoadIsSet()) j["3gLoad"] = o.m_r_3gLoad; - if (o.prioAccIsSet()) j["prioAcc"] = o.m_PrioAcc; -} - -void from_json(const nlohmann::json& j, SteeringMode& o) { - j.at("steerModeValue").get_to(o.m_SteerModeValue); - if (j.find("active") != j.end()) { - j.at("active").get_to(o.m_Active); - o.m_ActiveIsSet = true; - } - if (j.find("standby") != j.end()) { - j.at("standby").get_to(o.m_Standby); - o.m_StandbyIsSet = true; - } - if (j.find("3gLoad") != j.end()) { - j.at("3gLoad").get_to(o.m_r_3gLoad); - o.m_r_3gLoadIsSet = true; - } - if (j.find("prioAcc") != j.end()) { - j.at("prioAcc").get_to(o.m_PrioAcc); - o.m_PrioAccIsSet = true; - } -} - -SteerModeValue SteeringMode::getSteerModeValue() const { - return m_SteerModeValue; -} -void SteeringMode::setSteerModeValue(SteerModeValue const& value) { - m_SteerModeValue = value; -} -AccessType SteeringMode::getActive() const { - return m_Active; -} -void SteeringMode::setActive(AccessType const& value) { - m_Active = value; - m_ActiveIsSet = true; -} -bool SteeringMode::activeIsSet() const { - return m_ActiveIsSet; -} -void SteeringMode::unsetActive() { - m_ActiveIsSet = false; -} -AccessType SteeringMode::getStandby() const { - return m_Standby; -} -void SteeringMode::setStandby(AccessType const& value) { - m_Standby = value; - m_StandbyIsSet = true; -} -bool SteeringMode::standbyIsSet() const { - return m_StandbyIsSet; -} -void SteeringMode::unsetStandby() { - m_StandbyIsSet = false; -} -int32_t SteeringMode::getR3gLoad() const { - return m_r_3gLoad; -} -void SteeringMode::setR3gLoad(int32_t const value) { - m_r_3gLoad = value; - m_r_3gLoadIsSet = true; -} -bool SteeringMode::r3gLoadIsSet() const { - return m_r_3gLoadIsSet; -} -void SteeringMode::unsetr_3gLoad() { - m_r_3gLoadIsSet = false; -} -AccessType SteeringMode::getPrioAcc() const { - return m_PrioAcc; -} -void SteeringMode::setPrioAcc(AccessType const& value) { - m_PrioAcc = value; - m_PrioAccIsSet = true; -} -bool SteeringMode::prioAccIsSet() const { - return m_PrioAccIsSet; -} -void SteeringMode::unsetPrioAcc() { - m_PrioAccIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/SteeringMode.h b/src/api-server/model/SteeringMode.h deleted file mode 100644 index 784862abc980cae8dd869563046df77c1a2648e5..0000000000000000000000000000000000000000 --- a/src/api-server/model/SteeringMode.h +++ /dev/null @@ -1,115 +0,0 @@ -/** - * 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. - */ -/* - * SteeringMode.h - * - * - */ - -#ifndef SteeringMode_H_ -#define SteeringMode_H_ - -#include "SteerModeValue.h" -#include "AccessType.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class SteeringMode { - public: - SteeringMode(); - virtual ~SteeringMode() = 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 SteeringMode& rhs) const; - bool operator!=(const SteeringMode& rhs) const; - - ///////////////////////////////////////////// - /// SteeringMode members - - /// <summary> - /// - /// </summary> - SteerModeValue getSteerModeValue() const; - void setSteerModeValue(SteerModeValue const& value); - /// <summary> - /// - /// </summary> - oai::model::common::AccessType getActive() const; - void setActive(oai::model::common::AccessType const& value); - bool activeIsSet() const; - void unsetActive(); - /// <summary> - /// - /// </summary> - oai::model::common::AccessType getStandby() const; - void setStandby(oai::model::common::AccessType const& value); - bool standbyIsSet() const; - void unsetStandby(); - /// <summary> - /// - /// </summary> - int32_t getR3gLoad() const; - void setR3gLoad(int32_t const value); - bool r3gLoadIsSet() const; - void unsetr_3gLoad(); - /// <summary> - /// - /// </summary> - oai::model::common::AccessType getPrioAcc() const; - void setPrioAcc(oai::model::common::AccessType const& value); - bool prioAccIsSet() const; - void unsetPrioAcc(); - - friend void to_json(nlohmann::json& j, const SteeringMode& o); - friend void from_json(const nlohmann::json& j, SteeringMode& o); - - protected: - SteerModeValue m_SteerModeValue; - - oai::model::common::AccessType m_Active; - bool m_ActiveIsSet; - oai::model::common::AccessType m_Standby; - bool m_StandbyIsSet; - int32_t m_r_3gLoad; - bool m_r_3gLoadIsSet; - oai::model::common::AccessType m_PrioAcc; - bool m_PrioAccIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* SteeringMode_H_ */ diff --git a/src/api-server/model/TerminationNotification.cpp b/src/api-server/model/TerminationNotification.cpp deleted file mode 100644 index 66afbd5a43988f0ca5e774816500a265be6ef9a9..0000000000000000000000000000000000000000 --- a/src/api-server/model/TerminationNotification.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/** - * 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 "TerminationNotification.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -TerminationNotification::TerminationNotification() { - m_ResourceUri = ""; -} - -void TerminationNotification::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool TerminationNotification::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool TerminationNotification::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "TerminationNotification" : pathPrefix; - */ - return success; -} - -bool TerminationNotification::operator==( - const TerminationNotification& rhs) const { - return - - (getResourceUri() == rhs.getResourceUri()) && - - (getCause() == rhs.getCause()) - - ; -} - -bool TerminationNotification::operator!=( - const TerminationNotification& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const TerminationNotification& o) { - j = nlohmann::json(); - j["resourceUri"] = o.m_ResourceUri; - j["cause"] = o.m_Cause; -} - -void from_json(const nlohmann::json& j, TerminationNotification& o) { - j.at("resourceUri").get_to(o.m_ResourceUri); - j.at("cause").get_to(o.m_Cause); -} - -std::string TerminationNotification::getResourceUri() const { - return m_ResourceUri; -} -void TerminationNotification::setResourceUri(std::string const& value) { - m_ResourceUri = value; -} -SmPolicyAssociationReleaseCause TerminationNotification::getCause() const { - return m_Cause; -} -void TerminationNotification::setCause( - SmPolicyAssociationReleaseCause const& value) { - m_Cause = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/TerminationNotification.h b/src/api-server/model/TerminationNotification.h deleted file mode 100644 index feba811bffebf492f0001d674105cfa1595b88cd..0000000000000000000000000000000000000000 --- a/src/api-server/model/TerminationNotification.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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. - */ -/* - * TerminationNotification.h - * - * - */ - -#ifndef TerminationNotification_H_ -#define TerminationNotification_H_ - -#include "SmPolicyAssociationReleaseCause.h" -#include <string> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class TerminationNotification { - public: - TerminationNotification(); - virtual ~TerminationNotification() = 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 TerminationNotification& rhs) const; - bool operator!=(const TerminationNotification& rhs) const; - - ///////////////////////////////////////////// - /// TerminationNotification members - - /// <summary> - /// - /// </summary> - std::string getResourceUri() const; - void setResourceUri(std::string const& value); - /// <summary> - /// - /// </summary> - SmPolicyAssociationReleaseCause getCause() const; - void setCause(SmPolicyAssociationReleaseCause const& value); - - friend void to_json(nlohmann::json& j, const TerminationNotification& o); - friend void from_json(const nlohmann::json& j, TerminationNotification& o); - - protected: - std::string m_ResourceUri; - - SmPolicyAssociationReleaseCause m_Cause; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* TerminationNotification_H_ */ diff --git a/src/api-server/model/TrafficControlData.cpp b/src/api-server/model/TrafficControlData.cpp deleted file mode 100644 index 1cb077d1df975859d141f3101db2900856dd1b8a..0000000000000000000000000000000000000000 --- a/src/api-server/model/TrafficControlData.cpp +++ /dev/null @@ -1,438 +0,0 @@ -/** - * 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 pcf { -namespace model { - -using namespace oai::model::common; - -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) { - if (j.find("tcId") != j.end()) { - 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 pcf -} // namespace oai diff --git a/src/api-server/model/TrafficControlData.h b/src/api-server/model/TrafficControlData.h deleted file mode 100644 index 3ae0a566587b6704ee35b041a8e8ce01dff04240..0000000000000000000000000000000000000000 --- a/src/api-server/model/TrafficControlData.h +++ /dev/null @@ -1,208 +0,0 @@ -/** - * 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> - -namespace oai { -namespace pcf { -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'on'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<oai::model::common::RouteToLocation> getRouteToLocs() const; - void setRouteToLocs( - std::vector<oai::model::common::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<oai::model::common::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 pcf -} // namespace oai -#endif /* TrafficControlData_H_ */ diff --git a/src/api-server/model/TransportProtocol.cpp b/src/api-server/model/TransportProtocol.cpp deleted file mode 100644 index 4cfbdb174458c214cbbad7912966abd4cd424b14..0000000000000000000000000000000000000000 --- a/src/api-server/model/TransportProtocol.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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 "TransportProtocol.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -TransportProtocol::TransportProtocol() {} - -void TransportProtocol::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool TransportProtocol::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool TransportProtocol::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "TransportProtocol" : pathPrefix; - - if (!m_value.validate(msg)) { - success = false; - } - return success; -} - -bool TransportProtocol::operator==(const TransportProtocol& rhs) const { - return - - getValue() == rhs.getValue(); -} - -bool TransportProtocol::operator!=(const TransportProtocol& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const TransportProtocol& o) { - j = nlohmann::json(); - to_json(j, o.m_value); -} - -void from_json(const nlohmann::json& j, TransportProtocol& o) { - from_json(j, o.m_value); -} - -TransportProtocol_anyOf TransportProtocol::getValue() const { - return m_value; -} - -void TransportProtocol::setValue(TransportProtocol_anyOf value) { - m_value = value; -} - -TransportProtocol_anyOf::eTransportProtocol_anyOf -TransportProtocol::getEnumValue() const { - return m_value.getValue(); -} - -void TransportProtocol::setEnumValue( - TransportProtocol_anyOf::eTransportProtocol_anyOf value) { - m_value.setValue(value); -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/TransportProtocol.h b/src/api-server/model/TransportProtocol.h deleted file mode 100644 index e9ef8ef929a991043626adf85f9129d118f92f19..0000000000000000000000000000000000000000 --- a/src/api-server/model/TransportProtocol.h +++ /dev/null @@ -1,79 +0,0 @@ -/** - * 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. - */ -/* - * TransportProtocol.h - * - * Possible values are - UDP: User Datagram Protocol. - TCP: Transmission - * Control Protocol. - */ - -#ifndef TransportProtocol_H_ -#define TransportProtocol_H_ - -#include "TransportProtocol_anyOf.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// Possible values are - UDP: User Datagram Protocol. - TCP: Transmission -/// Control Protocol. -/// </summary> -class TransportProtocol { - public: - TransportProtocol(); - virtual ~TransportProtocol() = 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 TransportProtocol& rhs) const; - bool operator!=(const TransportProtocol& rhs) const; - - ///////////////////////////////////////////// - /// TransportProtocol members - - TransportProtocol_anyOf getValue() const; - void setValue(TransportProtocol_anyOf value); - TransportProtocol_anyOf::eTransportProtocol_anyOf getEnumValue() const; - void setEnumValue(TransportProtocol_anyOf::eTransportProtocol_anyOf value); - friend void to_json(nlohmann::json& j, const TransportProtocol& o); - friend void from_json(const nlohmann::json& j, TransportProtocol& o); - friend void to_json(nlohmann::json& j, const TransportProtocol_anyOf& o); - friend void from_json(const nlohmann::json& j, TransportProtocol_anyOf& o); - - protected: - TransportProtocol_anyOf m_value; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* TransportProtocol_H_ */ diff --git a/src/api-server/model/TransportProtocol_anyOf.cpp b/src/api-server/model/TransportProtocol_anyOf.cpp deleted file mode 100644 index 43a0f6959e3af0558903ce1da1a1a9e48368f574..0000000000000000000000000000000000000000 --- a/src/api-server/model/TransportProtocol_anyOf.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/** - * 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 "TransportProtocol_anyOf.h" -#include "Helpers.h" -#include <stdexcept> -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -TransportProtocol_anyOf::TransportProtocol_anyOf() {} - -void TransportProtocol_anyOf::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool TransportProtocol_anyOf::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool TransportProtocol_anyOf::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "TransportProtocol_anyOf" : pathPrefix; - - if (m_value == TransportProtocol_anyOf::eTransportProtocol_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED) { - success = false; - msg << _pathPrefix << ": has no value;"; - } - - return success; -} - -bool TransportProtocol_anyOf::operator==( - const TransportProtocol_anyOf& rhs) const { - return getValue() == rhs.getValue() - - ; -} - -bool TransportProtocol_anyOf::operator!=( - const TransportProtocol_anyOf& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const TransportProtocol_anyOf& o) { - j = nlohmann::json(); - - switch (o.getValue()) { - case TransportProtocol_anyOf::eTransportProtocol_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case TransportProtocol_anyOf::eTransportProtocol_anyOf::UDP: - j = "UDP"; - break; - case TransportProtocol_anyOf::eTransportProtocol_anyOf::TCP: - j = "TCP"; - break; - } -} - -void from_json(const nlohmann::json& j, TransportProtocol_anyOf& o) { - auto s = j.get<std::string>(); - if (s == "UDP") { - o.setValue(TransportProtocol_anyOf::eTransportProtocol_anyOf::UDP); - } else if (s == "TCP") { - o.setValue(TransportProtocol_anyOf::eTransportProtocol_anyOf::TCP); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " TransportProtocol_anyOf::eTransportProtocol_anyOf"; - throw std::invalid_argument(ss.str()); - } -} - -TransportProtocol_anyOf::eTransportProtocol_anyOf -TransportProtocol_anyOf::getValue() const { - return m_value; -} -void TransportProtocol_anyOf::setValue( - TransportProtocol_anyOf::eTransportProtocol_anyOf value) { - m_value = value; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/TransportProtocol_anyOf.h b/src/api-server/model/TransportProtocol_anyOf.h deleted file mode 100644 index f41ed81e5966aa441b4fadba902d6fe25c48400d..0000000000000000000000000000000000000000 --- a/src/api-server/model/TransportProtocol_anyOf.h +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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. - */ -/* - * TransportProtocol_anyOf.h - * - * - */ - -#ifndef TransportProtocol_anyOf_H_ -#define TransportProtocol_anyOf_H_ - -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class TransportProtocol_anyOf { - public: - TransportProtocol_anyOf(); - virtual ~TransportProtocol_anyOf() = default; - - enum class eTransportProtocol_anyOf { - // To have a valid default value. - // Avoiding name clashes with user defined - // enum values - INVALID_VALUE_OPENAPI_GENERATED = 0, - UDP, - TCP - }; - - /// <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 TransportProtocol_anyOf& rhs) const; - bool operator!=(const TransportProtocol_anyOf& rhs) const; - - ///////////////////////////////////////////// - /// TransportProtocol_anyOf members - - TransportProtocol_anyOf::eTransportProtocol_anyOf getValue() const; - void setValue(TransportProtocol_anyOf::eTransportProtocol_anyOf value); - - friend void to_json(nlohmann::json& j, const TransportProtocol_anyOf& o); - friend void from_json(const nlohmann::json& j, TransportProtocol_anyOf& o); - - protected: - TransportProtocol_anyOf::eTransportProtocol_anyOf m_value = - TransportProtocol_anyOf::eTransportProtocol_anyOf:: - INVALID_VALUE_OPENAPI_GENERATED; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* TransportProtocol_anyOf_H_ */ diff --git a/src/api-server/model/TscaiInputContainer.cpp b/src/api-server/model/TscaiInputContainer.cpp deleted file mode 100644 index 698bddf660a49a987466fddf86dcbd0ce4947e37..0000000000000000000000000000000000000000 --- a/src/api-server/model/TscaiInputContainer.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/** - * 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 "TscaiInputContainer.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -TscaiInputContainer::TscaiInputContainer() { - m_Periodicity = 0; - m_PeriodicityIsSet = false; - m_BurstArrivalTime = ""; - m_BurstArrivalTimeIsSet = false; -} - -void TscaiInputContainer::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool TscaiInputContainer::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool TscaiInputContainer::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "TscaiInputContainer" : pathPrefix; - - if (periodicityIsSet()) { - const int32_t& value = m_Periodicity; - const std::string currentValuePath = _pathPrefix + ".periodicity"; - - if (value < 0) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - } - - return success; -} - -bool TscaiInputContainer::operator==(const TscaiInputContainer& rhs) const { - return - - ((!periodicityIsSet() && !rhs.periodicityIsSet()) || - (periodicityIsSet() && rhs.periodicityIsSet() && - getPeriodicity() == rhs.getPeriodicity())) && - - ((!burstArrivalTimeIsSet() && !rhs.burstArrivalTimeIsSet()) || - (burstArrivalTimeIsSet() && rhs.burstArrivalTimeIsSet() && - getBurstArrivalTime() == rhs.getBurstArrivalTime())) - - ; -} - -bool TscaiInputContainer::operator!=(const TscaiInputContainer& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const TscaiInputContainer& o) { - j = nlohmann::json(); - if (o.periodicityIsSet()) j["periodicity"] = o.m_Periodicity; - if (o.burstArrivalTimeIsSet()) j["burstArrivalTime"] = o.m_BurstArrivalTime; -} - -void from_json(const nlohmann::json& j, TscaiInputContainer& o) { - if (j.find("periodicity") != j.end()) { - j.at("periodicity").get_to(o.m_Periodicity); - o.m_PeriodicityIsSet = true; - } - if (j.find("burstArrivalTime") != j.end()) { - j.at("burstArrivalTime").get_to(o.m_BurstArrivalTime); - o.m_BurstArrivalTimeIsSet = true; - } -} - -int32_t TscaiInputContainer::getPeriodicity() const { - return m_Periodicity; -} -void TscaiInputContainer::setPeriodicity(int32_t const value) { - m_Periodicity = value; - m_PeriodicityIsSet = true; -} -bool TscaiInputContainer::periodicityIsSet() const { - return m_PeriodicityIsSet; -} -void TscaiInputContainer::unsetPeriodicity() { - m_PeriodicityIsSet = false; -} -std::string TscaiInputContainer::getBurstArrivalTime() const { - return m_BurstArrivalTime; -} -void TscaiInputContainer::setBurstArrivalTime(std::string const& value) { - m_BurstArrivalTime = value; - m_BurstArrivalTimeIsSet = true; -} -bool TscaiInputContainer::burstArrivalTimeIsSet() const { - return m_BurstArrivalTimeIsSet; -} -void TscaiInputContainer::unsetBurstArrivalTime() { - m_BurstArrivalTimeIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/TscaiInputContainer.h b/src/api-server/model/TscaiInputContainer.h deleted file mode 100644 index 8d7f1e2922dab7f1061088ec7135f2f0f705ba01..0000000000000000000000000000000000000000 --- a/src/api-server/model/TscaiInputContainer.h +++ /dev/null @@ -1,89 +0,0 @@ -/** - * 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. - */ -/* - * TscaiInputContainer.h - * - * Indicates TSC Traffic pattern. - */ - -#ifndef TscaiInputContainer_H_ -#define TscaiInputContainer_H_ - -#include <string> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// Indicates TSC Traffic pattern. -/// </summary> -class TscaiInputContainer { - public: - TscaiInputContainer(); - virtual ~TscaiInputContainer() = 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 TscaiInputContainer& rhs) const; - bool operator!=(const TscaiInputContainer& rhs) const; - - ///////////////////////////////////////////// - /// TscaiInputContainer members - - /// <summary> - /// - /// </summary> - int32_t getPeriodicity() const; - void setPeriodicity(int32_t const value); - bool periodicityIsSet() const; - void unsetPeriodicity(); - /// <summary> - /// - /// </summary> - std::string getBurstArrivalTime() const; - void setBurstArrivalTime(std::string const& value); - bool burstArrivalTimeIsSet() const; - void unsetBurstArrivalTime(); - - friend void to_json(nlohmann::json& j, const TscaiInputContainer& o); - friend void from_json(const nlohmann::json& j, TscaiInputContainer& o); - - protected: - int32_t m_Periodicity; - bool m_PeriodicityIsSet; - std::string m_BurstArrivalTime; - bool m_BurstArrivalTimeIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* TscaiInputContainer_H_ */ diff --git a/src/api-server/model/TsnBridgeInfo.cpp b/src/api-server/model/TsnBridgeInfo.cpp deleted file mode 100644 index aa247ce7a63f2285298895ab2ab48dc37698ee0f..0000000000000000000000000000000000000000 --- a/src/api-server/model/TsnBridgeInfo.cpp +++ /dev/null @@ -1,226 +0,0 @@ -/** - * 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 "TsnBridgeInfo.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -TsnBridgeInfo::TsnBridgeInfo() { - m_BridgeName = ""; - m_BridgeNameIsSet = false; - m_BridgeMac = ""; - m_BridgeMacIsSet = false; - m_NwttPortsIsSet = false; - m_DsttPortIsSet = false; - m_DsttResidTime = 0; - m_DsttResidTimeIsSet = false; -} - -void TsnBridgeInfo::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool TsnBridgeInfo::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool TsnBridgeInfo::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "TsnBridgeInfo" : pathPrefix; - /* - if (bridgeMacIsSet()) { - const std::string& value = m_BridgeMac; - const std::string currentValuePath = _pathPrefix + ".bridgeMac"; - } - */ - if (nwttPortsIsSet()) { - const std::vector<TsnPortIdentifier>& value = m_NwttPorts; - const std::string currentValuePath = _pathPrefix + ".nwttPorts"; - - 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 TsnPortIdentifier& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = - value.validate(msg, currentValuePath + ".nwttPorts") && success; - - i++; - } - } - */ - } - - if (dsttResidTimeIsSet()) { - const int32_t& value = m_DsttResidTime; - const std::string currentValuePath = _pathPrefix + ".dsttResidTime"; - - if (value < 0) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - } - - return success; -} - -bool TsnBridgeInfo::operator==(const TsnBridgeInfo& rhs) const { - return - - ((!bridgeNameIsSet() && !rhs.bridgeNameIsSet()) || - (bridgeNameIsSet() && rhs.bridgeNameIsSet() && - getBridgeName() == rhs.getBridgeName())) && - - ((!bridgeMacIsSet() && !rhs.bridgeMacIsSet()) || - (bridgeMacIsSet() && rhs.bridgeMacIsSet() && - getBridgeMac() == rhs.getBridgeMac())) && - - ((!nwttPortsIsSet() && !rhs.nwttPortsIsSet()) || - (nwttPortsIsSet() && rhs.nwttPortsIsSet() && - getNwttPorts() == rhs.getNwttPorts())) && - - ((!dsttPortIsSet() && !rhs.dsttPortIsSet()) || - (dsttPortIsSet() && rhs.dsttPortIsSet() && - getDsttPort() == rhs.getDsttPort())) && - - ((!dsttResidTimeIsSet() && !rhs.dsttResidTimeIsSet()) || - (dsttResidTimeIsSet() && rhs.dsttResidTimeIsSet() && - getDsttResidTime() == rhs.getDsttResidTime())) - - ; -} - -bool TsnBridgeInfo::operator!=(const TsnBridgeInfo& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const TsnBridgeInfo& o) { - j = nlohmann::json(); - if (o.bridgeNameIsSet()) j["bridgeName"] = o.m_BridgeName; - if (o.bridgeMacIsSet()) j["bridgeMac"] = o.m_BridgeMac; - if (o.nwttPortsIsSet() || !o.m_NwttPorts.empty()) - j["nwttPorts"] = o.m_NwttPorts; - if (o.dsttPortIsSet()) j["dsttPort"] = o.m_DsttPort; - if (o.dsttResidTimeIsSet()) j["dsttResidTime"] = o.m_DsttResidTime; -} - -void from_json(const nlohmann::json& j, TsnBridgeInfo& o) { - if (j.find("bridgeName") != j.end()) { - j.at("bridgeName").get_to(o.m_BridgeName); - o.m_BridgeNameIsSet = true; - } - if (j.find("bridgeMac") != j.end()) { - j.at("bridgeMac").get_to(o.m_BridgeMac); - o.m_BridgeMacIsSet = true; - } - if (j.find("nwttPorts") != j.end()) { - j.at("nwttPorts").get_to(o.m_NwttPorts); - o.m_NwttPortsIsSet = true; - } - if (j.find("dsttPort") != j.end()) { - j.at("dsttPort").get_to(o.m_DsttPort); - o.m_DsttPortIsSet = true; - } - if (j.find("dsttResidTime") != j.end()) { - j.at("dsttResidTime").get_to(o.m_DsttResidTime); - o.m_DsttResidTimeIsSet = true; - } -} - -std::string TsnBridgeInfo::getBridgeName() const { - return m_BridgeName; -} -void TsnBridgeInfo::setBridgeName(std::string const& value) { - m_BridgeName = value; - m_BridgeNameIsSet = true; -} -bool TsnBridgeInfo::bridgeNameIsSet() const { - return m_BridgeNameIsSet; -} -void TsnBridgeInfo::unsetBridgeName() { - m_BridgeNameIsSet = false; -} -std::string TsnBridgeInfo::getBridgeMac() const { - return m_BridgeMac; -} -void TsnBridgeInfo::setBridgeMac(std::string const& value) { - m_BridgeMac = value; - m_BridgeMacIsSet = true; -} -bool TsnBridgeInfo::bridgeMacIsSet() const { - return m_BridgeMacIsSet; -} -void TsnBridgeInfo::unsetBridgeMac() { - m_BridgeMacIsSet = false; -} -std::vector<TsnPortIdentifier> TsnBridgeInfo::getNwttPorts() const { - return m_NwttPorts; -} -void TsnBridgeInfo::setNwttPorts(std::vector<TsnPortIdentifier> const& value) { - m_NwttPorts = value; - m_NwttPortsIsSet = true; -} -bool TsnBridgeInfo::nwttPortsIsSet() const { - return m_NwttPortsIsSet; -} -void TsnBridgeInfo::unsetNwttPorts() { - m_NwttPortsIsSet = false; -} -TsnPortIdentifier TsnBridgeInfo::getDsttPort() const { - return m_DsttPort; -} -void TsnBridgeInfo::setDsttPort(TsnPortIdentifier const& value) { - m_DsttPort = value; - m_DsttPortIsSet = true; -} -bool TsnBridgeInfo::dsttPortIsSet() const { - return m_DsttPortIsSet; -} -void TsnBridgeInfo::unsetDsttPort() { - m_DsttPortIsSet = false; -} -int32_t TsnBridgeInfo::getDsttResidTime() const { - return m_DsttResidTime; -} -void TsnBridgeInfo::setDsttResidTime(int32_t const value) { - m_DsttResidTime = value; - m_DsttResidTimeIsSet = true; -} -bool TsnBridgeInfo::dsttResidTimeIsSet() const { - return m_DsttResidTimeIsSet; -} -void TsnBridgeInfo::unsetDsttResidTime() { - m_DsttResidTimeIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/TsnBridgeInfo.h b/src/api-server/model/TsnBridgeInfo.h deleted file mode 100644 index dd25e225a5440a3cf6aee53734190fd57f3d8f88..0000000000000000000000000000000000000000 --- a/src/api-server/model/TsnBridgeInfo.h +++ /dev/null @@ -1,118 +0,0 @@ -/** - * 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. - */ -/* - * TsnBridgeInfo.h - * - * - */ - -#ifndef TsnBridgeInfo_H_ -#define TsnBridgeInfo_H_ - -#include "TsnPortIdentifier.h" -#include <string> -#include <vector> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class TsnBridgeInfo { - public: - TsnBridgeInfo(); - virtual ~TsnBridgeInfo() = 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 TsnBridgeInfo& rhs) const; - bool operator!=(const TsnBridgeInfo& rhs) const; - - ///////////////////////////////////////////// - /// TsnBridgeInfo members - - /// <summary> - /// Name of the bridge. - /// </summary> - std::string getBridgeName() const; - void setBridgeName(std::string const& value); - bool bridgeNameIsSet() const; - void unsetBridgeName(); - /// <summary> - /// - /// </summary> - std::string getBridgeMac() const; - void setBridgeMac(std::string const& value); - bool bridgeMacIsSet() const; - void unsetBridgeMac(); - /// <summary> - /// NW-TT ports available for a PDU session. - /// </summary> - std::vector<TsnPortIdentifier> getNwttPorts() const; - void setNwttPorts(std::vector<TsnPortIdentifier> const& value); - bool nwttPortsIsSet() const; - void unsetNwttPorts(); - /// <summary> - /// - /// </summary> - TsnPortIdentifier getDsttPort() const; - void setDsttPort(TsnPortIdentifier const& value); - bool dsttPortIsSet() const; - void unsetDsttPort(); - /// <summary> - /// - /// </summary> - int32_t getDsttResidTime() const; - void setDsttResidTime(int32_t const value); - bool dsttResidTimeIsSet() const; - void unsetDsttResidTime(); - - friend void to_json(nlohmann::json& j, const TsnBridgeInfo& o); - friend void from_json(const nlohmann::json& j, TsnBridgeInfo& o); - - protected: - std::string m_BridgeName; - bool m_BridgeNameIsSet; - std::string m_BridgeMac; - bool m_BridgeMacIsSet; - std::vector<TsnPortIdentifier> m_NwttPorts; - bool m_NwttPortsIsSet; - TsnPortIdentifier m_DsttPort; - bool m_DsttPortIsSet; - int32_t m_DsttResidTime; - bool m_DsttResidTimeIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* TsnBridgeInfo_H_ */ diff --git a/src/api-server/model/TsnPortIdentifier.cpp b/src/api-server/model/TsnPortIdentifier.cpp deleted file mode 100644 index 9cf5a5951a8ec7c7435ba7a780ea8b0e14593ed4..0000000000000000000000000000000000000000 --- a/src/api-server/model/TsnPortIdentifier.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/** - * 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 "TsnPortIdentifier.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -TsnPortIdentifier::TsnPortIdentifier() { - m_PortMac = ""; - m_PortNumber = 0; - m_PortNumberIsSet = false; -} - -void TsnPortIdentifier::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool TsnPortIdentifier::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool TsnPortIdentifier::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "TsnPortIdentifier" : pathPrefix; - /* - // PortMac - { - const std::string& value = m_PortMac; - const std::string currentValuePath = _pathPrefix + ".portMac"; - } - */ - if (portNumberIsSet()) { - const int32_t& value = m_PortNumber; - const std::string currentValuePath = _pathPrefix + ".portNumber"; - - if (value < 0) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - } - - return success; -} - -bool TsnPortIdentifier::operator==(const TsnPortIdentifier& rhs) const { - return - - (getPortMac() == rhs.getPortMac()) && - - ((!portNumberIsSet() && !rhs.portNumberIsSet()) || - (portNumberIsSet() && rhs.portNumberIsSet() && - getPortNumber() == rhs.getPortNumber())) - - ; -} - -bool TsnPortIdentifier::operator!=(const TsnPortIdentifier& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const TsnPortIdentifier& o) { - j = nlohmann::json(); - j["portMac"] = o.m_PortMac; - if (o.portNumberIsSet()) j["portNumber"] = o.m_PortNumber; -} - -void from_json(const nlohmann::json& j, TsnPortIdentifier& o) { - j.at("portMac").get_to(o.m_PortMac); - if (j.find("portNumber") != j.end()) { - j.at("portNumber").get_to(o.m_PortNumber); - o.m_PortNumberIsSet = true; - } -} - -std::string TsnPortIdentifier::getPortMac() const { - return m_PortMac; -} -void TsnPortIdentifier::setPortMac(std::string const& value) { - m_PortMac = value; -} -int32_t TsnPortIdentifier::getPortNumber() const { - return m_PortNumber; -} -void TsnPortIdentifier::setPortNumber(int32_t const value) { - m_PortNumber = value; - m_PortNumberIsSet = true; -} -bool TsnPortIdentifier::portNumberIsSet() const { - return m_PortNumberIsSet; -} -void TsnPortIdentifier::unsetPortNumber() { - m_PortNumberIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/TsnPortIdentifier.h b/src/api-server/model/TsnPortIdentifier.h deleted file mode 100644 index f6de11e3dfbb44e61474cf3aaa65c7597f885925..0000000000000000000000000000000000000000 --- a/src/api-server/model/TsnPortIdentifier.h +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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. - */ -/* - * TsnPortIdentifier.h - * - * - */ - -#ifndef TsnPortIdentifier_H_ -#define TsnPortIdentifier_H_ - -#include <string> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class TsnPortIdentifier { - public: - TsnPortIdentifier(); - virtual ~TsnPortIdentifier() = 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 TsnPortIdentifier& rhs) const; - bool operator!=(const TsnPortIdentifier& rhs) const; - - ///////////////////////////////////////////// - /// TsnPortIdentifier members - - /// <summary> - /// - /// </summary> - std::string getPortMac() const; - void setPortMac(std::string const& value); - /// <summary> - /// - /// </summary> - int32_t getPortNumber() const; - void setPortNumber(int32_t const value); - bool portNumberIsSet() const; - void unsetPortNumber(); - - friend void to_json(nlohmann::json& j, const TsnPortIdentifier& o); - friend void from_json(const nlohmann::json& j, TsnPortIdentifier& o); - - protected: - std::string m_PortMac; - - int32_t m_PortNumber; - bool m_PortNumberIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* TsnPortIdentifier_H_ */ diff --git a/src/api-server/model/UeCampingRep.cpp b/src/api-server/model/UeCampingRep.cpp deleted file mode 100644 index 23a18975672dd32ce1eebbdbdbebb1fd12f6c9c2..0000000000000000000000000000000000000000 --- a/src/api-server/model/UeCampingRep.cpp +++ /dev/null @@ -1,209 +0,0 @@ -/** - * 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 "UeCampingRep.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -UeCampingRep::UeCampingRep() { - m_AccessTypeIsSet = false; - m_RatTypeIsSet = false; - m_ServNfIdIsSet = false; - m_ServingNetworkIsSet = false; - m_UserLocationInfoIsSet = false; - m_UeTimeZone = ""; - m_UeTimeZoneIsSet = false; -} - -void UeCampingRep::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool UeCampingRep::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool UeCampingRep::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "UeCampingRep" : pathPrefix; - */ - return success; -} - -bool UeCampingRep::operator==(const UeCampingRep& rhs) const { - return - - ((!accessTypeIsSet() && !rhs.accessTypeIsSet()) || - (accessTypeIsSet() && rhs.accessTypeIsSet() && - getAccessType() == rhs.getAccessType())) && - - ((!ratTypeIsSet() && !rhs.ratTypeIsSet()) || - (ratTypeIsSet() && rhs.ratTypeIsSet() && - getRatType() == rhs.getRatType())) && - - ((!servNfIdIsSet() && !rhs.servNfIdIsSet()) || - (servNfIdIsSet() && rhs.servNfIdIsSet() && - getServNfId() == rhs.getServNfId())) && - - ((!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())) - - ; -} - -bool UeCampingRep::operator!=(const UeCampingRep& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const UeCampingRep& o) { - j = nlohmann::json(); - if (o.accessTypeIsSet()) j["accessType"] = o.m_AccessType; - if (o.ratTypeIsSet()) j["ratType"] = o.m_RatType; - if (o.servNfIdIsSet()) j["servNfId"] = o.m_ServNfId; - if (o.servingNetworkIsSet()) j["servingNetwork"] = o.m_ServingNetwork; - if (o.userLocationInfoIsSet()) j["userLocationInfo"] = o.m_UserLocationInfo; - if (o.ueTimeZoneIsSet()) j["ueTimeZone"] = o.m_UeTimeZone; -} - -void from_json(const nlohmann::json& j, UeCampingRep& o) { - 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("servNfId") != j.end()) { - j.at("servNfId").get_to(o.m_ServNfId); - o.m_ServNfIdIsSet = 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; - } -} - -AccessType UeCampingRep::getAccessType() const { - return m_AccessType; -} -void UeCampingRep::setAccessType(AccessType const& value) { - m_AccessType = value; - m_AccessTypeIsSet = true; -} -bool UeCampingRep::accessTypeIsSet() const { - return m_AccessTypeIsSet; -} -void UeCampingRep::unsetAccessType() { - m_AccessTypeIsSet = false; -} -RatType UeCampingRep::getRatType() const { - return m_RatType; -} -void UeCampingRep::setRatType(RatType const& value) { - m_RatType = value; - m_RatTypeIsSet = true; -} -bool UeCampingRep::ratTypeIsSet() const { - return m_RatTypeIsSet; -} -void UeCampingRep::unsetRatType() { - m_RatTypeIsSet = false; -} -ServingNfIdentity UeCampingRep::getServNfId() const { - return m_ServNfId; -} -void UeCampingRep::setServNfId(ServingNfIdentity const& value) { - m_ServNfId = value; - m_ServNfIdIsSet = true; -} -bool UeCampingRep::servNfIdIsSet() const { - return m_ServNfIdIsSet; -} -void UeCampingRep::unsetServNfId() { - m_ServNfIdIsSet = false; -} -PlmnIdNid UeCampingRep::getServingNetwork() const { - return m_ServingNetwork; -} -void UeCampingRep::setServingNetwork(PlmnIdNid const& value) { - m_ServingNetwork = value; - m_ServingNetworkIsSet = true; -} -bool UeCampingRep::servingNetworkIsSet() const { - return m_ServingNetworkIsSet; -} -void UeCampingRep::unsetServingNetwork() { - m_ServingNetworkIsSet = false; -} -UserLocation UeCampingRep::getUserLocationInfo() const { - return m_UserLocationInfo; -} -void UeCampingRep::setUserLocationInfo(UserLocation const& value) { - m_UserLocationInfo = value; - m_UserLocationInfoIsSet = true; -} -bool UeCampingRep::userLocationInfoIsSet() const { - return m_UserLocationInfoIsSet; -} -void UeCampingRep::unsetUserLocationInfo() { - m_UserLocationInfoIsSet = false; -} -std::string UeCampingRep::getUeTimeZone() const { - return m_UeTimeZone; -} -void UeCampingRep::setUeTimeZone(std::string const& value) { - m_UeTimeZone = value; - m_UeTimeZoneIsSet = true; -} -bool UeCampingRep::ueTimeZoneIsSet() const { - return m_UeTimeZoneIsSet; -} -void UeCampingRep::unsetUeTimeZone() { - m_UeTimeZoneIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/UeCampingRep.h b/src/api-server/model/UeCampingRep.h deleted file mode 100644 index 44fa7f9c76cae15a2adc505c5cbb368a6b751b3b..0000000000000000000000000000000000000000 --- a/src/api-server/model/UeCampingRep.h +++ /dev/null @@ -1,130 +0,0 @@ -/** - * 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. - */ -/* - * UeCampingRep.h - * - * - */ - -#ifndef UeCampingRep_H_ -#define UeCampingRep_H_ - -#include "PlmnIdNid.h" -#include "RatType.h" -#include <string> -#include "UserLocation.h" -#include "ServingNfIdentity.h" -#include "AccessType.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class UeCampingRep { - public: - UeCampingRep(); - virtual ~UeCampingRep() = 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 UeCampingRep& rhs) const; - bool operator!=(const UeCampingRep& rhs) const; - - ///////////////////////////////////////////// - /// UeCampingRep members - - /// <summary> - /// - /// </summary> - oai::model::common::AccessType getAccessType() const; - void setAccessType(oai::model::common::AccessType const& value); - bool accessTypeIsSet() const; - void unsetAccessType(); - /// <summary> - /// - /// </summary> - oai::model::common::RatType getRatType() const; - void setRatType(oai::model::common::RatType const& value); - bool ratTypeIsSet() const; - void unsetRatType(); - /// <summary> - /// - /// </summary> - ServingNfIdentity getServNfId() const; - void setServNfId(ServingNfIdentity const& value); - bool servNfIdIsSet() const; - void unsetServNfId(); - /// <summary> - /// - /// </summary> - oai::model::common::PlmnIdNid getServingNetwork() const; - void setServingNetwork(oai::model::common::PlmnIdNid const& value); - bool servingNetworkIsSet() const; - void unsetServingNetwork(); - /// <summary> - /// - /// </summary> - oai::model::common::UserLocation getUserLocationInfo() const; - void setUserLocationInfo(oai::model::common::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(); - - friend void to_json(nlohmann::json& j, const UeCampingRep& o); - friend void from_json(const nlohmann::json& j, UeCampingRep& o); - - protected: - oai::model::common::AccessType m_AccessType; - bool m_AccessTypeIsSet; - oai::model::common::RatType m_RatType; - bool m_RatTypeIsSet; - ServingNfIdentity m_ServNfId; - bool m_ServNfIdIsSet; - oai::model::common::PlmnIdNid m_ServingNetwork; - bool m_ServingNetworkIsSet; - oai::model::common::UserLocation m_UserLocationInfo; - bool m_UserLocationInfoIsSet; - std::string m_UeTimeZone; - bool m_UeTimeZoneIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* UeCampingRep_H_ */ diff --git a/src/api-server/model/UeInitiatedResourceRequest.cpp b/src/api-server/model/UeInitiatedResourceRequest.cpp deleted file mode 100644 index bb4b46c59c0cd1a905d6a24d3c3c96ea6e4d3f2c..0000000000000000000000000000000000000000 --- a/src/api-server/model/UeInitiatedResourceRequest.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/** - * 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 "UeInitiatedResourceRequest.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -UeInitiatedResourceRequest::UeInitiatedResourceRequest() { - m_PccRuleId = ""; - m_PccRuleIdIsSet = false; - m_Precedence = 0; - m_PrecedenceIsSet = false; - m_ReqQosIsSet = false; -} - -void UeInitiatedResourceRequest::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool UeInitiatedResourceRequest::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool UeInitiatedResourceRequest::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "UeInitiatedResourceRequest" : pathPrefix; - - /* PackFiltInfo */ { - const std::vector<PacketFilterInfo>& value = m_PackFiltInfo; - const std::string currentValuePath = _pathPrefix + ".packFiltInfo"; - - 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 PacketFilterInfo& value : value) { - const std::string currentValuePath = - oldValuePath + "[" + std::to_string(i) + "]"; - - success = - value.validate(msg, currentValuePath + ".packFiltInfo") && success; - - i++; - } - } - } - - return success; -} - -bool UeInitiatedResourceRequest::operator==( - const UeInitiatedResourceRequest& rhs) const { - return - - ((!pccRuleIdIsSet() && !rhs.pccRuleIdIsSet()) || - (pccRuleIdIsSet() && rhs.pccRuleIdIsSet() && - getPccRuleId() == rhs.getPccRuleId())) && - - (getRuleOp() == rhs.getRuleOp()) && - - ((!precedenceIsSet() && !rhs.precedenceIsSet()) || - (precedenceIsSet() && rhs.precedenceIsSet() && - getPrecedence() == rhs.getPrecedence())) && - - (getPackFiltInfo() == rhs.getPackFiltInfo()) && - - ((!reqQosIsSet() && !rhs.reqQosIsSet()) || - (reqQosIsSet() && rhs.reqQosIsSet() && getReqQos() == rhs.getReqQos())) - - ; -} - -bool UeInitiatedResourceRequest::operator!=( - const UeInitiatedResourceRequest& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const UeInitiatedResourceRequest& o) { - j = nlohmann::json(); - if (o.pccRuleIdIsSet()) j["pccRuleId"] = o.m_PccRuleId; - j["ruleOp"] = o.m_RuleOp; - if (o.precedenceIsSet()) j["precedence"] = o.m_Precedence; - j["packFiltInfo"] = o.m_PackFiltInfo; - if (o.reqQosIsSet()) j["reqQos"] = o.m_ReqQos; -} - -void from_json(const nlohmann::json& j, UeInitiatedResourceRequest& o) { - if (j.find("pccRuleId") != j.end()) { - j.at("pccRuleId").get_to(o.m_PccRuleId); - o.m_PccRuleIdIsSet = true; - } - j.at("ruleOp").get_to(o.m_RuleOp); - if (j.find("precedence") != j.end()) { - j.at("precedence").get_to(o.m_Precedence); - o.m_PrecedenceIsSet = true; - } - j.at("packFiltInfo").get_to(o.m_PackFiltInfo); - if (j.find("reqQos") != j.end()) { - j.at("reqQos").get_to(o.m_ReqQos); - o.m_ReqQosIsSet = true; - } -} - -std::string UeInitiatedResourceRequest::getPccRuleId() const { - return m_PccRuleId; -} -void UeInitiatedResourceRequest::setPccRuleId(std::string const& value) { - m_PccRuleId = value; - m_PccRuleIdIsSet = true; -} -bool UeInitiatedResourceRequest::pccRuleIdIsSet() const { - return m_PccRuleIdIsSet; -} -void UeInitiatedResourceRequest::unsetPccRuleId() { - m_PccRuleIdIsSet = false; -} -RuleOperation UeInitiatedResourceRequest::getRuleOp() const { - return m_RuleOp; -} -void UeInitiatedResourceRequest::setRuleOp(RuleOperation const& value) { - m_RuleOp = value; -} -int32_t UeInitiatedResourceRequest::getPrecedence() const { - return m_Precedence; -} -void UeInitiatedResourceRequest::setPrecedence(int32_t const value) { - m_Precedence = value; - m_PrecedenceIsSet = true; -} -bool UeInitiatedResourceRequest::precedenceIsSet() const { - return m_PrecedenceIsSet; -} -void UeInitiatedResourceRequest::unsetPrecedence() { - m_PrecedenceIsSet = false; -} -std::vector<PacketFilterInfo> UeInitiatedResourceRequest::getPackFiltInfo() - const { - return m_PackFiltInfo; -} -void UeInitiatedResourceRequest::setPackFiltInfo( - std::vector<PacketFilterInfo> const& value) { - m_PackFiltInfo = value; -} -RequestedQos UeInitiatedResourceRequest::getReqQos() const { - return m_ReqQos; -} -void UeInitiatedResourceRequest::setReqQos(RequestedQos const& value) { - m_ReqQos = value; - m_ReqQosIsSet = true; -} -bool UeInitiatedResourceRequest::reqQosIsSet() const { - return m_ReqQosIsSet; -} -void UeInitiatedResourceRequest::unsetReqQos() { - m_ReqQosIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/UeInitiatedResourceRequest.h b/src/api-server/model/UeInitiatedResourceRequest.h deleted file mode 100644 index 0d70bb186aa152eec8ed79d0029d18131643c305..0000000000000000000000000000000000000000 --- a/src/api-server/model/UeInitiatedResourceRequest.h +++ /dev/null @@ -1,116 +0,0 @@ -/** - * 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. - */ -/* - * UeInitiatedResourceRequest.h - * - * - */ - -#ifndef UeInitiatedResourceRequest_H_ -#define UeInitiatedResourceRequest_H_ - -#include "PacketFilterInfo.h" -#include "RuleOperation.h" -#include <string> -#include <vector> -#include "RequestedQos.h" -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class UeInitiatedResourceRequest { - public: - UeInitiatedResourceRequest(); - virtual ~UeInitiatedResourceRequest() = 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 UeInitiatedResourceRequest& rhs) const; - bool operator!=(const UeInitiatedResourceRequest& rhs) const; - - ///////////////////////////////////////////// - /// UeInitiatedResourceRequest members - - /// <summary> - /// - /// </summary> - std::string getPccRuleId() const; - void setPccRuleId(std::string const& value); - bool pccRuleIdIsSet() const; - void unsetPccRuleId(); - /// <summary> - /// - /// </summary> - RuleOperation getRuleOp() const; - void setRuleOp(RuleOperation const& value); - /// <summary> - /// - /// </summary> - int32_t getPrecedence() const; - void setPrecedence(int32_t const value); - bool precedenceIsSet() const; - void unsetPrecedence(); - /// <summary> - /// - /// </summary> - std::vector<PacketFilterInfo> getPackFiltInfo() const; - void setPackFiltInfo(std::vector<PacketFilterInfo> const& value); - /// <summary> - /// - /// </summary> - RequestedQos getReqQos() const; - void setReqQos(RequestedQos const& value); - bool reqQosIsSet() const; - void unsetReqQos(); - - friend void to_json(nlohmann::json& j, const UeInitiatedResourceRequest& o); - friend void from_json(const nlohmann::json& j, UeInitiatedResourceRequest& o); - - protected: - std::string m_PccRuleId; - bool m_PccRuleIdIsSet; - RuleOperation m_RuleOp; - - int32_t m_Precedence; - bool m_PrecedenceIsSet; - std::vector<PacketFilterInfo> m_PackFiltInfo; - - RequestedQos m_ReqQos; - bool m_ReqQosIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* UeInitiatedResourceRequest_H_ */ diff --git a/src/api-server/model/UpPathChgEvent.cpp b/src/api-server/model/UpPathChgEvent.cpp deleted file mode 100644 index b547f116b5ab84328b10deca3511f328e3b1fc3c..0000000000000000000000000000000000000000 --- a/src/api-server/model/UpPathChgEvent.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/** - * 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 "UpPathChgEvent.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -using namespace oai::model::common; - -UpPathChgEvent::UpPathChgEvent() { - m_NotificationUri = ""; - m_NotifCorreId = ""; - m_AfAckInd = false; - m_AfAckIndIsSet = false; -} - -void UpPathChgEvent::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool UpPathChgEvent::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool UpPathChgEvent::validate( - std::stringstream& /* msg */, const std::string& /* pathPrefix */) const { - bool success = true; - /* - const std::string _pathPrefix = - pathPrefix.empty() ? "UpPathChgEvent" : pathPrefix; - */ - return success; -} - -bool UpPathChgEvent::operator==(const UpPathChgEvent& rhs) const { - return - - (getNotificationUri() == rhs.getNotificationUri()) && - - (getNotifCorreId() == rhs.getNotifCorreId()) && - - (getDnaiChgType() == rhs.getDnaiChgType()) && - - ((!afAckIndIsSet() && !rhs.afAckIndIsSet()) || - (afAckIndIsSet() && rhs.afAckIndIsSet() && - isAfAckInd() == rhs.isAfAckInd())) - - ; -} - -bool UpPathChgEvent::operator!=(const UpPathChgEvent& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const UpPathChgEvent& o) { - j = nlohmann::json(); - j["notificationUri"] = o.m_NotificationUri; - j["notifCorreId"] = o.m_NotifCorreId; - j["dnaiChgType"] = o.m_DnaiChgType; - if (o.afAckIndIsSet()) j["afAckInd"] = o.m_AfAckInd; -} - -void from_json(const nlohmann::json& j, UpPathChgEvent& o) { - j.at("notificationUri").get_to(o.m_NotificationUri); - j.at("notifCorreId").get_to(o.m_NotifCorreId); - j.at("dnaiChgType").get_to(o.m_DnaiChgType); - if (j.find("afAckInd") != j.end()) { - j.at("afAckInd").get_to(o.m_AfAckInd); - o.m_AfAckIndIsSet = true; - } -} - -std::string UpPathChgEvent::getNotificationUri() const { - return m_NotificationUri; -} -void UpPathChgEvent::setNotificationUri(std::string const& value) { - m_NotificationUri = value; -} -std::string UpPathChgEvent::getNotifCorreId() const { - return m_NotifCorreId; -} -void UpPathChgEvent::setNotifCorreId(std::string const& value) { - m_NotifCorreId = value; -} -DnaiChangeType UpPathChgEvent::getDnaiChgType() const { - return m_DnaiChgType; -} -void UpPathChgEvent::setDnaiChgType(DnaiChangeType const& value) { - m_DnaiChgType = value; -} -bool UpPathChgEvent::isAfAckInd() const { - return m_AfAckInd; -} -void UpPathChgEvent::setAfAckInd(bool const value) { - m_AfAckInd = value; - m_AfAckIndIsSet = true; -} -bool UpPathChgEvent::afAckIndIsSet() const { - return m_AfAckIndIsSet; -} -void UpPathChgEvent::unsetAfAckInd() { - m_AfAckIndIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/UpPathChgEvent.h b/src/api-server/model/UpPathChgEvent.h deleted file mode 100644 index 1eac80dff2ec1e089aa4f3f43a31df61dfc050c4..0000000000000000000000000000000000000000 --- a/src/api-server/model/UpPathChgEvent.h +++ /dev/null @@ -1,103 +0,0 @@ -/** - * 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. - */ -/* - * UpPathChgEvent.h - * - * - */ - -#ifndef UpPathChgEvent_H_ -#define UpPathChgEvent_H_ - -#include "DnaiChangeType.h" -#include <string> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class UpPathChgEvent { - public: - UpPathChgEvent(); - virtual ~UpPathChgEvent() = 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 UpPathChgEvent& rhs) const; - bool operator!=(const UpPathChgEvent& rhs) const; - - ///////////////////////////////////////////// - /// UpPathChgEvent members - - /// <summary> - /// - /// </summary> - std::string getNotificationUri() const; - void setNotificationUri(std::string const& value); - /// <summary> - /// It is used to set the value of Notification Correlation ID in the - /// notification sent by the SMF. - /// </summary> - std::string getNotifCorreId() const; - void setNotifCorreId(std::string const& value); - /// <summary> - /// - /// </summary> - oai::model::common::DnaiChangeType getDnaiChgType() const; - void setDnaiChgType(oai::model::common::DnaiChangeType const& value); - /// <summary> - /// - /// </summary> - bool isAfAckInd() const; - void setAfAckInd(bool const value); - bool afAckIndIsSet() const; - void unsetAfAckInd(); - - friend void to_json(nlohmann::json& j, const UpPathChgEvent& o); - friend void from_json(const nlohmann::json& j, UpPathChgEvent& o); - - protected: - std::string m_NotificationUri; - - std::string m_NotifCorreId; - - oai::model::common::DnaiChangeType m_DnaiChgType; - - bool m_AfAckInd; - bool m_AfAckIndIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* UpPathChgEvent_H_ */ diff --git a/src/api-server/model/UsageMonitoringData.cpp b/src/api-server/model/UsageMonitoringData.cpp deleted file mode 100644 index ac858156848a4e4818646eaf88ffb147d46929eb..0000000000000000000000000000000000000000 --- a/src/api-server/model/UsageMonitoringData.cpp +++ /dev/null @@ -1,436 +0,0 @@ -/** - * 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 "UsageMonitoringData.h" -#include "Helpers.h" - -#include <sstream> - -namespace oai { -namespace pcf { -namespace model { - -UsageMonitoringData::UsageMonitoringData() { - m_UmId = ""; - m_VolumeThreshold = 0L; - m_VolumeThresholdIsSet = false; - m_VolumeThresholdUplink = 0L; - m_VolumeThresholdUplinkIsSet = false; - m_VolumeThresholdDownlink = 0L; - m_VolumeThresholdDownlinkIsSet = false; - m_TimeThreshold = 0; - m_TimeThresholdIsSet = false; - m_MonitoringTime = ""; - m_MonitoringTimeIsSet = false; - m_NextVolThreshold = 0L; - m_NextVolThresholdIsSet = false; - m_NextVolThresholdUplink = 0L; - m_NextVolThresholdUplinkIsSet = false; - m_NextVolThresholdDownlink = 0L; - m_NextVolThresholdDownlinkIsSet = false; - m_NextTimeThreshold = 0; - m_NextTimeThresholdIsSet = false; - m_InactivityTime = 0; - m_InactivityTimeIsSet = false; - m_ExUsagePccRuleIdsIsSet = false; -} - -void UsageMonitoringData::validate() const { - std::stringstream msg; - if (!validate(msg)) { - // throw - // org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool UsageMonitoringData::validate(std::stringstream& msg) const { - return validate(msg, ""); -} - -bool UsageMonitoringData::validate( - std::stringstream& msg, const std::string& pathPrefix) const { - bool success = true; - const std::string _pathPrefix = - pathPrefix.empty() ? "UsageMonitoringData" : pathPrefix; - - if (volumeThresholdIsSet()) { - const int64_t& value = m_VolumeThreshold; - const std::string currentValuePath = _pathPrefix + ".volumeThreshold"; - - if (value < 0ll) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - } - - if (volumeThresholdUplinkIsSet()) { - const int64_t& value = m_VolumeThresholdUplink; - const std::string currentValuePath = _pathPrefix + ".volumeThresholdUplink"; - - if (value < 0ll) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - } - - if (volumeThresholdDownlinkIsSet()) { - const int64_t& value = m_VolumeThresholdDownlink; - const std::string currentValuePath = - _pathPrefix + ".volumeThresholdDownlink"; - - if (value < 0ll) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - } - - if (nextVolThresholdIsSet()) { - const int64_t& value = m_NextVolThreshold; - const std::string currentValuePath = _pathPrefix + ".nextVolThreshold"; - - if (value < 0ll) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - } - - if (nextVolThresholdUplinkIsSet()) { - const int64_t& value = m_NextVolThresholdUplink; - const std::string currentValuePath = - _pathPrefix + ".nextVolThresholdUplink"; - - if (value < 0ll) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - } - - if (nextVolThresholdDownlinkIsSet()) { - const int64_t& value = m_NextVolThresholdDownlink; - const std::string currentValuePath = - _pathPrefix + ".nextVolThresholdDownlink"; - - if (value < 0ll) { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - } - - if (exUsagePccRuleIdsIsSet()) { - const std::vector<std::string>& value = m_ExUsagePccRuleIds; - const std::string currentValuePath = _pathPrefix + ".exUsagePccRuleIds"; - - 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 UsageMonitoringData::operator==(const UsageMonitoringData& rhs) const { - return - - (getUmId() == rhs.getUmId()) && - - ((!volumeThresholdIsSet() && !rhs.volumeThresholdIsSet()) || - (volumeThresholdIsSet() && rhs.volumeThresholdIsSet() && - getVolumeThreshold() == rhs.getVolumeThreshold())) && - - ((!volumeThresholdUplinkIsSet() && !rhs.volumeThresholdUplinkIsSet()) || - (volumeThresholdUplinkIsSet() && rhs.volumeThresholdUplinkIsSet() && - getVolumeThresholdUplink() == rhs.getVolumeThresholdUplink())) && - - ((!volumeThresholdDownlinkIsSet() && - !rhs.volumeThresholdDownlinkIsSet()) || - (volumeThresholdDownlinkIsSet() && rhs.volumeThresholdDownlinkIsSet() && - getVolumeThresholdDownlink() == rhs.getVolumeThresholdDownlink())) && - - ((!timeThresholdIsSet() && !rhs.timeThresholdIsSet()) || - (timeThresholdIsSet() && rhs.timeThresholdIsSet() && - getTimeThreshold() == rhs.getTimeThreshold())) && - - ((!monitoringTimeIsSet() && !rhs.monitoringTimeIsSet()) || - (monitoringTimeIsSet() && rhs.monitoringTimeIsSet() && - getMonitoringTime() == rhs.getMonitoringTime())) && - - ((!nextVolThresholdIsSet() && !rhs.nextVolThresholdIsSet()) || - (nextVolThresholdIsSet() && rhs.nextVolThresholdIsSet() && - getNextVolThreshold() == rhs.getNextVolThreshold())) && - - ((!nextVolThresholdUplinkIsSet() && !rhs.nextVolThresholdUplinkIsSet()) || - (nextVolThresholdUplinkIsSet() && rhs.nextVolThresholdUplinkIsSet() && - getNextVolThresholdUplink() == rhs.getNextVolThresholdUplink())) && - - ((!nextVolThresholdDownlinkIsSet() && - !rhs.nextVolThresholdDownlinkIsSet()) || - (nextVolThresholdDownlinkIsSet() && - rhs.nextVolThresholdDownlinkIsSet() && - getNextVolThresholdDownlink() == rhs.getNextVolThresholdDownlink())) && - - ((!nextTimeThresholdIsSet() && !rhs.nextTimeThresholdIsSet()) || - (nextTimeThresholdIsSet() && rhs.nextTimeThresholdIsSet() && - getNextTimeThreshold() == rhs.getNextTimeThreshold())) && - - ((!inactivityTimeIsSet() && !rhs.inactivityTimeIsSet()) || - (inactivityTimeIsSet() && rhs.inactivityTimeIsSet() && - getInactivityTime() == rhs.getInactivityTime())) && - - ((!exUsagePccRuleIdsIsSet() && !rhs.exUsagePccRuleIdsIsSet()) || - (exUsagePccRuleIdsIsSet() && rhs.exUsagePccRuleIdsIsSet() && - getExUsagePccRuleIds() == rhs.getExUsagePccRuleIds())) - - ; -} - -bool UsageMonitoringData::operator!=(const UsageMonitoringData& rhs) const { - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const UsageMonitoringData& o) { - j = nlohmann::json(); - j["umId"] = o.m_UmId; - if (o.volumeThresholdIsSet()) j["volumeThreshold"] = o.m_VolumeThreshold; - if (o.volumeThresholdUplinkIsSet()) - j["volumeThresholdUplink"] = o.m_VolumeThresholdUplink; - if (o.volumeThresholdDownlinkIsSet()) - j["volumeThresholdDownlink"] = o.m_VolumeThresholdDownlink; - if (o.timeThresholdIsSet()) j["timeThreshold"] = o.m_TimeThreshold; - if (o.monitoringTimeIsSet()) j["monitoringTime"] = o.m_MonitoringTime; - if (o.nextVolThresholdIsSet()) j["nextVolThreshold"] = o.m_NextVolThreshold; - if (o.nextVolThresholdUplinkIsSet()) - j["nextVolThresholdUplink"] = o.m_NextVolThresholdUplink; - if (o.nextVolThresholdDownlinkIsSet()) - j["nextVolThresholdDownlink"] = o.m_NextVolThresholdDownlink; - if (o.nextTimeThresholdIsSet()) - j["nextTimeThreshold"] = o.m_NextTimeThreshold; - if (o.inactivityTimeIsSet()) j["inactivityTime"] = o.m_InactivityTime; - if (o.exUsagePccRuleIdsIsSet() || !o.m_ExUsagePccRuleIds.empty()) - j["exUsagePccRuleIds"] = o.m_ExUsagePccRuleIds; -} - -void from_json(const nlohmann::json& j, UsageMonitoringData& o) { - j.at("umId").get_to(o.m_UmId); - if (j.find("volumeThreshold") != j.end()) { - j.at("volumeThreshold").get_to(o.m_VolumeThreshold); - o.m_VolumeThresholdIsSet = true; - } - if (j.find("volumeThresholdUplink") != j.end()) { - j.at("volumeThresholdUplink").get_to(o.m_VolumeThresholdUplink); - o.m_VolumeThresholdUplinkIsSet = true; - } - if (j.find("volumeThresholdDownlink") != j.end()) { - j.at("volumeThresholdDownlink").get_to(o.m_VolumeThresholdDownlink); - o.m_VolumeThresholdDownlinkIsSet = true; - } - if (j.find("timeThreshold") != j.end()) { - j.at("timeThreshold").get_to(o.m_TimeThreshold); - o.m_TimeThresholdIsSet = true; - } - if (j.find("monitoringTime") != j.end()) { - j.at("monitoringTime").get_to(o.m_MonitoringTime); - o.m_MonitoringTimeIsSet = true; - } - if (j.find("nextVolThreshold") != j.end()) { - j.at("nextVolThreshold").get_to(o.m_NextVolThreshold); - o.m_NextVolThresholdIsSet = true; - } - if (j.find("nextVolThresholdUplink") != j.end()) { - j.at("nextVolThresholdUplink").get_to(o.m_NextVolThresholdUplink); - o.m_NextVolThresholdUplinkIsSet = true; - } - if (j.find("nextVolThresholdDownlink") != j.end()) { - j.at("nextVolThresholdDownlink").get_to(o.m_NextVolThresholdDownlink); - o.m_NextVolThresholdDownlinkIsSet = true; - } - if (j.find("nextTimeThreshold") != j.end()) { - j.at("nextTimeThreshold").get_to(o.m_NextTimeThreshold); - o.m_NextTimeThresholdIsSet = true; - } - if (j.find("inactivityTime") != j.end()) { - j.at("inactivityTime").get_to(o.m_InactivityTime); - o.m_InactivityTimeIsSet = true; - } - if (j.find("exUsagePccRuleIds") != j.end()) { - j.at("exUsagePccRuleIds").get_to(o.m_ExUsagePccRuleIds); - o.m_ExUsagePccRuleIdsIsSet = true; - } -} - -std::string UsageMonitoringData::getUmId() const { - return m_UmId; -} -void UsageMonitoringData::setUmId(std::string const& value) { - m_UmId = value; -} -int64_t UsageMonitoringData::getVolumeThreshold() const { - return m_VolumeThreshold; -} -void UsageMonitoringData::setVolumeThreshold(int64_t const value) { - m_VolumeThreshold = value; - m_VolumeThresholdIsSet = true; -} -bool UsageMonitoringData::volumeThresholdIsSet() const { - return m_VolumeThresholdIsSet; -} -void UsageMonitoringData::unsetVolumeThreshold() { - m_VolumeThresholdIsSet = false; -} -int64_t UsageMonitoringData::getVolumeThresholdUplink() const { - return m_VolumeThresholdUplink; -} -void UsageMonitoringData::setVolumeThresholdUplink(int64_t const value) { - m_VolumeThresholdUplink = value; - m_VolumeThresholdUplinkIsSet = true; -} -bool UsageMonitoringData::volumeThresholdUplinkIsSet() const { - return m_VolumeThresholdUplinkIsSet; -} -void UsageMonitoringData::unsetVolumeThresholdUplink() { - m_VolumeThresholdUplinkIsSet = false; -} -int64_t UsageMonitoringData::getVolumeThresholdDownlink() const { - return m_VolumeThresholdDownlink; -} -void UsageMonitoringData::setVolumeThresholdDownlink(int64_t const value) { - m_VolumeThresholdDownlink = value; - m_VolumeThresholdDownlinkIsSet = true; -} -bool UsageMonitoringData::volumeThresholdDownlinkIsSet() const { - return m_VolumeThresholdDownlinkIsSet; -} -void UsageMonitoringData::unsetVolumeThresholdDownlink() { - m_VolumeThresholdDownlinkIsSet = false; -} -int32_t UsageMonitoringData::getTimeThreshold() const { - return m_TimeThreshold; -} -void UsageMonitoringData::setTimeThreshold(int32_t const value) { - m_TimeThreshold = value; - m_TimeThresholdIsSet = true; -} -bool UsageMonitoringData::timeThresholdIsSet() const { - return m_TimeThresholdIsSet; -} -void UsageMonitoringData::unsetTimeThreshold() { - m_TimeThresholdIsSet = false; -} -std::string UsageMonitoringData::getMonitoringTime() const { - return m_MonitoringTime; -} -void UsageMonitoringData::setMonitoringTime(std::string const& value) { - m_MonitoringTime = value; - m_MonitoringTimeIsSet = true; -} -bool UsageMonitoringData::monitoringTimeIsSet() const { - return m_MonitoringTimeIsSet; -} -void UsageMonitoringData::unsetMonitoringTime() { - m_MonitoringTimeIsSet = false; -} -int64_t UsageMonitoringData::getNextVolThreshold() const { - return m_NextVolThreshold; -} -void UsageMonitoringData::setNextVolThreshold(int64_t const value) { - m_NextVolThreshold = value; - m_NextVolThresholdIsSet = true; -} -bool UsageMonitoringData::nextVolThresholdIsSet() const { - return m_NextVolThresholdIsSet; -} -void UsageMonitoringData::unsetNextVolThreshold() { - m_NextVolThresholdIsSet = false; -} -int64_t UsageMonitoringData::getNextVolThresholdUplink() const { - return m_NextVolThresholdUplink; -} -void UsageMonitoringData::setNextVolThresholdUplink(int64_t const value) { - m_NextVolThresholdUplink = value; - m_NextVolThresholdUplinkIsSet = true; -} -bool UsageMonitoringData::nextVolThresholdUplinkIsSet() const { - return m_NextVolThresholdUplinkIsSet; -} -void UsageMonitoringData::unsetNextVolThresholdUplink() { - m_NextVolThresholdUplinkIsSet = false; -} -int64_t UsageMonitoringData::getNextVolThresholdDownlink() const { - return m_NextVolThresholdDownlink; -} -void UsageMonitoringData::setNextVolThresholdDownlink(int64_t const value) { - m_NextVolThresholdDownlink = value; - m_NextVolThresholdDownlinkIsSet = true; -} -bool UsageMonitoringData::nextVolThresholdDownlinkIsSet() const { - return m_NextVolThresholdDownlinkIsSet; -} -void UsageMonitoringData::unsetNextVolThresholdDownlink() { - m_NextVolThresholdDownlinkIsSet = false; -} -int32_t UsageMonitoringData::getNextTimeThreshold() const { - return m_NextTimeThreshold; -} -void UsageMonitoringData::setNextTimeThreshold(int32_t const value) { - m_NextTimeThreshold = value; - m_NextTimeThresholdIsSet = true; -} -bool UsageMonitoringData::nextTimeThresholdIsSet() const { - return m_NextTimeThresholdIsSet; -} -void UsageMonitoringData::unsetNextTimeThreshold() { - m_NextTimeThresholdIsSet = false; -} -int32_t UsageMonitoringData::getInactivityTime() const { - return m_InactivityTime; -} -void UsageMonitoringData::setInactivityTime(int32_t const value) { - m_InactivityTime = value; - m_InactivityTimeIsSet = true; -} -bool UsageMonitoringData::inactivityTimeIsSet() const { - return m_InactivityTimeIsSet; -} -void UsageMonitoringData::unsetInactivityTime() { - m_InactivityTimeIsSet = false; -} -std::vector<std::string> UsageMonitoringData::getExUsagePccRuleIds() const { - return m_ExUsagePccRuleIds; -} -void UsageMonitoringData::setExUsagePccRuleIds( - std::vector<std::string> const& value) { - m_ExUsagePccRuleIds = value; - m_ExUsagePccRuleIdsIsSet = true; -} -bool UsageMonitoringData::exUsagePccRuleIdsIsSet() const { - return m_ExUsagePccRuleIdsIsSet; -} -void UsageMonitoringData::unsetExUsagePccRuleIds() { - m_ExUsagePccRuleIdsIsSet = false; -} - -} // namespace model -} // namespace pcf -} // namespace oai diff --git a/src/api-server/model/UsageMonitoringData.h b/src/api-server/model/UsageMonitoringData.h deleted file mode 100644 index 0a9f8816ad263ee2a2dcfd639c6567d4e32d83ca..0000000000000000000000000000000000000000 --- a/src/api-server/model/UsageMonitoringData.h +++ /dev/null @@ -1,188 +0,0 @@ -/** - * 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. - */ -/* - * UsageMonitoringData.h - * - * - */ - -#ifndef UsageMonitoringData_H_ -#define UsageMonitoringData_H_ - -#include <string> -#include <vector> -#include <nlohmann/json.hpp> - -namespace oai { -namespace pcf { -namespace model { - -/// <summary> -/// -/// </summary> -class UsageMonitoringData { - public: - UsageMonitoringData(); - virtual ~UsageMonitoringData() = 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 UsageMonitoringData& rhs) const; - bool operator!=(const UsageMonitoringData& rhs) const; - - ///////////////////////////////////////////// - /// UsageMonitoringData members - - /// <summary> - /// Univocally identifies the usage monitoring policy data within a PDU - /// session. - /// </summary> - std::string getUmId() const; - void setUmId(std::string const& value); - /// <summary> - /// Unsigned integer identifying a volume in units of bytes with - /// \"nullable=true\" property. - /// </summary> - int64_t getVolumeThreshold() const; - void setVolumeThreshold(int64_t const value); - bool volumeThresholdIsSet() const; - void unsetVolumeThreshold(); - /// <summary> - /// Unsigned integer identifying a volume in units of bytes with - /// \"nullable=true\" property. - /// </summary> - int64_t getVolumeThresholdUplink() const; - void setVolumeThresholdUplink(int64_t const value); - bool volumeThresholdUplinkIsSet() const; - void unsetVolumeThresholdUplink(); - /// <summary> - /// Unsigned integer identifying a volume in units of bytes with - /// \"nullable=true\" property. - /// </summary> - int64_t getVolumeThresholdDownlink() const; - void setVolumeThresholdDownlink(int64_t const value); - bool volumeThresholdDownlinkIsSet() const; - void unsetVolumeThresholdDownlink(); - /// <summary> - /// - /// </summary> - int32_t getTimeThreshold() const; - void setTimeThreshold(int32_t const value); - bool timeThresholdIsSet() const; - void unsetTimeThreshold(); - /// <summary> - /// - /// </summary> - std::string getMonitoringTime() const; - void setMonitoringTime(std::string const& value); - bool monitoringTimeIsSet() const; - void unsetMonitoringTime(); - /// <summary> - /// Unsigned integer identifying a volume in units of bytes with - /// \"nullable=true\" property. - /// </summary> - int64_t getNextVolThreshold() const; - void setNextVolThreshold(int64_t const value); - bool nextVolThresholdIsSet() const; - void unsetNextVolThreshold(); - /// <summary> - /// Unsigned integer identifying a volume in units of bytes with - /// \"nullable=true\" property. - /// </summary> - int64_t getNextVolThresholdUplink() const; - void setNextVolThresholdUplink(int64_t const value); - bool nextVolThresholdUplinkIsSet() const; - void unsetNextVolThresholdUplink(); - /// <summary> - /// Unsigned integer identifying a volume in units of bytes with - /// \"nullable=true\" property. - /// </summary> - int64_t getNextVolThresholdDownlink() const; - void setNextVolThresholdDownlink(int64_t const value); - bool nextVolThresholdDownlinkIsSet() const; - void unsetNextVolThresholdDownlink(); - /// <summary> - /// - /// </summary> - int32_t getNextTimeThreshold() const; - void setNextTimeThreshold(int32_t const value); - bool nextTimeThresholdIsSet() const; - void unsetNextTimeThreshold(); - /// <summary> - /// - /// </summary> - int32_t getInactivityTime() const; - void setInactivityTime(int32_t const value); - bool inactivityTimeIsSet() const; - void unsetInactivityTime(); - /// <summary> - /// Contains the PCC rule identifier(s) which corresponding service data - /// flow(s) shall be excluded from PDU Session usage monitoring. It is only - /// included in the UsageMonitoringData instance for session level usage - /// monitoring. - /// </summary> - std::vector<std::string> getExUsagePccRuleIds() const; - void setExUsagePccRuleIds(std::vector<std::string> const& value); - bool exUsagePccRuleIdsIsSet() const; - void unsetExUsagePccRuleIds(); - - friend void to_json(nlohmann::json& j, const UsageMonitoringData& o); - friend void from_json(const nlohmann::json& j, UsageMonitoringData& o); - - protected: - std::string m_UmId; - - int64_t m_VolumeThreshold; - bool m_VolumeThresholdIsSet; - int64_t m_VolumeThresholdUplink; - bool m_VolumeThresholdUplinkIsSet; - int64_t m_VolumeThresholdDownlink; - bool m_VolumeThresholdDownlinkIsSet; - int32_t m_TimeThreshold; - bool m_TimeThresholdIsSet; - std::string m_MonitoringTime; - bool m_MonitoringTimeIsSet; - int64_t m_NextVolThreshold; - bool m_NextVolThresholdIsSet; - int64_t m_NextVolThresholdUplink; - bool m_NextVolThresholdUplinkIsSet; - int64_t m_NextVolThresholdDownlink; - bool m_NextVolThresholdDownlinkIsSet; - int32_t m_NextTimeThreshold; - bool m_NextTimeThresholdIsSet; - int32_t m_InactivityTime; - bool m_InactivityTimeIsSet; - std::vector<std::string> m_ExUsagePccRuleIds; - bool m_ExUsagePccRuleIdsIsSet; -}; - -} // namespace model -} // namespace pcf -} // namespace oai -#endif /* UsageMonitoringData_H_ */ diff --git a/src/api-server/pcf-http2-server.cpp b/src/api-server/pcf-http2-server.cpp index 88d5eb684bbd115901c042725ae58ebf6e021384..29f1e5d358b67418103f5c76d7f553f313d371ba 100644 --- a/src/api-server/pcf-http2-server.cpp +++ b/src/api-server/pcf-http2-server.cpp @@ -43,7 +43,7 @@ using namespace nghttp2::asio_http2; using namespace nghttp2::asio_http2::server; -using namespace oai::pcf::model; +using namespace oai::model::pcf; using namespace oai::config::pcf; using namespace oai::pcf::api; diff --git a/src/common/3gpp_29.571.h b/src/common/3gpp_29.571.h index dcdf0a2b19e19bc9470af7d2ef0bf57617dc42d3..7668a1a75b0cc81f21eeb6c24c1e6a6d03b7e1aa 100644 --- a/src/common/3gpp_29.571.h +++ b/src/common/3gpp_29.571.h @@ -29,8 +29,8 @@ enum access_type_e { ACESS_3GPP = 1, ACESS_NON_3GPP = 2 }; -static const std::vector<std::string> access_type_e2str = {"3GPP_ACCESS", - "NON_3GPP_ACCESS"}; +static const std::vector<std::string> access_type_e2str = { + "3GPP_ACCESS", "NON_3GPP_ACCESS"}; typedef struct sd_range_s { std::string start; diff --git a/src/common/common_defs.h b/src/common/common_defs.h index d76ad87f2c4b2dc0872e0f6013f558928377dbd3..6e0f8c5ab2654f6d6cbf4b6829246a51d160c9fa 100644 --- a/src/common/common_defs.h +++ b/src/common/common_defs.h @@ -44,9 +44,9 @@ } while (0) #define NIPADDR(addr) \ - (uint8_t)(addr & 0x000000FF), (uint8_t)((addr & 0x0000FF00) >> 8), \ - (uint8_t)((addr & 0x00FF0000) >> 16), \ - (uint8_t)((addr & 0xFF000000) >> 24) + (uint8_t)(addr & 0x000000FF), (uint8_t) ((addr & 0x0000FF00) >> 8), \ + (uint8_t) ((addr & 0x00FF0000) >> 16), \ + (uint8_t) ((addr & 0xFF000000) >> 24) #ifndef UNUSED #define UNUSED(x) (void) (x) diff --git a/src/common/utils/conversions.hpp b/src/common/utils/conversions.hpp index 75589bb4b760d1d570732cd1c58df15cd7476615..e35e9d64dd58822e404798389c47b2b45128bee0 100644 --- a/src/common/utils/conversions.hpp +++ b/src/common/utils/conversions.hpp @@ -36,9 +36,9 @@ #define IN_ADDR_FMT "%u.%u.%u.%u" #define PRI_IN_ADDR(aDDRESS) \ (uint8_t)((aDDRESS.s_addr) & 0x000000ff), \ - (uint8_t)(((aDDRESS.s_addr) & 0x0000ff00) >> 8), \ - (uint8_t)(((aDDRESS.s_addr) & 0x00ff0000) >> 16), \ - (uint8_t)(((aDDRESS.s_addr) & 0xff000000) >> 24) + (uint8_t) (((aDDRESS.s_addr) & 0x0000ff00) >> 8), \ + (uint8_t) (((aDDRESS.s_addr) & 0x00ff0000) >> 16), \ + (uint8_t) (((aDDRESS.s_addr) & 0xff000000) >> 24) #define IPV4_ADDR_DISPLAY_8(aDDRESS) \ (aDDRESS)[0], (aDDRESS)[1], (aDDRESS)[2], (aDDRESS)[3] diff --git a/src/oai-cn5g-common-src b/src/oai-cn5g-common-src index 3e64f08aac80e71337c78f0af73a37f722d98309..411ea5639784eb919a42d4bbfec4ba5b40b88d93 160000 --- a/src/oai-cn5g-common-src +++ b/src/oai-cn5g-common-src @@ -1 +1 @@ -Subproject commit 3e64f08aac80e71337c78f0af73a37f722d98309 +Subproject commit 411ea5639784eb919a42d4bbfec4ba5b40b88d93 diff --git a/src/oai_pcf/CMakeLists.txt b/src/oai_pcf/CMakeLists.txt index 70d90bd0dde109e6cda2cf4f04afd74767fc563d..adcce5452e3f69750a59b938f31345e6a9cbe5be 100644 --- a/src/oai_pcf/CMakeLists.txt +++ b/src/oai_pcf/CMakeLists.txt @@ -282,7 +282,6 @@ include_directories(${SRC_TOP_DIR}/pcf) include_directories(${SRC_TOP_DIR}/api-server) include_directories(${SRC_TOP_DIR}/api-server/api) include_directories(${SRC_TOP_DIR}/api-server/impl) -include_directories(${SRC_TOP_DIR}/api-server/model) include_directories(${SRC_TOP_DIR}/api-server/handler) add_executable(pcf diff --git a/src/pcf_app/CMakeLists.txt b/src/pcf_app/CMakeLists.txt index 31abbdc2963c91eb002392d232c4de7680145489..a3a7e62a41dc16e80a8caf11dd5a6bc3ba502c7c 100644 --- a/src/pcf_app/CMakeLists.txt +++ b/src/pcf_app/CMakeLists.txt @@ -25,7 +25,6 @@ include_directories(${SRC_TOP_DIR}/itti) include_directories(${SRC_TOP_DIR}/pcf) include_directories(${SRC_TOP_DIR}/api-server/api) include_directories(${SRC_TOP_DIR}/api-server/impl) -include_directories(${SRC_TOP_DIR}/api-server/model) include_directories(${SRC_TOP_DIR}/api-server/) include_directories(${SRC_TOP_DIR}/pcf_app/sm_policy/) include_directories(${SRC_TOP_DIR}/${MOUNTED_COMMON}/logger) diff --git a/src/pcf_app/pcf_app.cpp b/src/pcf_app/pcf_app.cpp index ed2c56f486601fdb8d6cc46acf0dee4bc3a50148..6dfdc9c5720232af7ad12be3df2b3959bcd26cf9 100644 --- a/src/pcf_app/pcf_app.cpp +++ b/src/pcf_app/pcf_app.cpp @@ -36,7 +36,7 @@ using namespace oai::pcf::app; using namespace oai::config::pcf; -using namespace oai::pcf::model; +using namespace oai::model::pcf; using namespace std; diff --git a/src/pcf_app/pcf_config.cpp b/src/pcf_app/pcf_config.cpp index 642d5818917b2ec1ce6325be7c3bf1eadf560921..354528dbd45309daee1c95e6ef08d874ece058a9 100644 --- a/src/pcf_app/pcf_config.cpp +++ b/src/pcf_app/pcf_config.cpp @@ -33,8 +33,8 @@ oai::config::pcf::pcf_config::pcf_config( const std::string& config_path, bool log_stdout, bool log_rot_file) : config( config_path, oai::config::PCF_CONFIG_NAME, log_stdout, log_rot_file) { - m_used_sbi_values = {oai::config::PCF_CONFIG_NAME, - oai::config::NRF_CONFIG_NAME}; + m_used_sbi_values = { + oai::config::PCF_CONFIG_NAME, oai::config::NRF_CONFIG_NAME}; m_used_config_values = { oai::config::LOG_LEVEL_CONFIG_NAME, oai::config::REGISTER_NF_CONFIG_NAME, oai::config::NF_LIST_CONFIG_NAME, oai::config::PCF_CONFIG_NAME, diff --git a/src/pcf_app/pcf_sm_policy_control.cpp b/src/pcf_app/pcf_sm_policy_control.cpp index 04a833302845631ac96f2ff4b386ef06e40d0430..b6f80fa11790b2d86b6cef066354e17228342b27 100644 --- a/src/pcf_app/pcf_sm_policy_control.cpp +++ b/src/pcf_app/pcf_sm_policy_control.cpp @@ -49,7 +49,7 @@ using namespace oai::pcf::app; using namespace oai::pcf::app::sm_policy; using namespace oai::config::pcf; -using namespace oai::pcf::model; +using namespace oai::model::pcf; using namespace std; @@ -126,7 +126,7 @@ sm_policy::status_code pcf_smpc::delete_sm_policy_handler( //------------------------------------------------------------------------------ sm_policy::status_code pcf_smpc::get_sm_policy_handler( - const std::string& id, oai::pcf::model::SmPolicyControl& control, + const std::string& id, SmPolicyControl& control, std::string& problem_details) { std::shared_lock lock_associations(m_associations_mutex); auto iter = m_associations.find(id); diff --git a/src/pcf_app/pcf_sm_policy_control.hpp b/src/pcf_app/pcf_sm_policy_control.hpp index dfdfacfc4b1c6636f5471e95703a951c65f98555..f098dd6026b65f45aefeadf46346743ab865b220 100644 --- a/src/pcf_app/pcf_sm_policy_control.hpp +++ b/src/pcf_app/pcf_sm_policy_control.hpp @@ -73,8 +73,8 @@ class pcf_smpc { * @return sm_policy::status_code */ sm_policy::status_code create_sm_policy_handler( - const oai::pcf::model::SmPolicyContextData& context, - oai::pcf::model::SmPolicyDecision& decision, std::string& association_id, + const oai::model::pcf::SmPolicyContextData& context, + oai::model::pcf::SmPolicyDecision& decision, std::string& association_id, std::string& problem_details); /** @@ -89,7 +89,7 @@ class pcf_smpc { */ sm_policy::status_code delete_sm_policy_handler( const std::string& id, - const oai::pcf::model::SmPolicyDeleteData& delete_data, + const oai::model::pcf::SmPolicyDeleteData& delete_data, std::string& problem_details); /** @@ -104,7 +104,7 @@ class pcf_smpc { * @return sm_policy::status_code */ sm_policy::status_code get_sm_policy_handler( - const std::string& id, oai::pcf::model::SmPolicyControl& control, + const std::string& id, oai::model::pcf::SmPolicyControl& control, std::string& problem_details); /** @@ -120,8 +120,8 @@ class pcf_smpc { */ sm_policy::status_code update_sm_policy_handler( const std::string& id, - const oai::pcf::model::SmPolicyUpdateContextData& update_context, - oai::pcf::model::SmPolicyDecision& decision, + const oai::model::pcf::SmPolicyUpdateContextData& update_context, + oai::model::pcf::SmPolicyDecision& decision, std::string& problem_details); private: diff --git a/src/pcf_app/sm_policy/dnn_policy_decision.cpp b/src/pcf_app/sm_policy/dnn_policy_decision.cpp index 85590b1ce6bc9c39c51d07c482f9ae50b27e2d2c..35a90595b4a135c56b990f55e3b7fff7ff4fc7ad 100644 --- a/src/pcf_app/sm_policy/dnn_policy_decision.cpp +++ b/src/pcf_app/sm_policy/dnn_policy_decision.cpp @@ -30,13 +30,13 @@ #include "dnn_policy_decision.hpp" #include <sstream> -using namespace oai::pcf::model; +using namespace oai::model::pcf; using namespace oai::pcf::app::sm_policy; using namespace oai::pcf::app; status_code dnn_policy_decision::decide( const SmPolicyContextData& context, - oai::pcf::model::SmPolicyDecision& decision) const { + oai::model::pcf::SmPolicyDecision& decision) const { if (context.getDnn() != m_dnn) { return status_code::CONTEXT_DENIED; } diff --git a/src/pcf_app/sm_policy/dnn_policy_decision.hpp b/src/pcf_app/sm_policy/dnn_policy_decision.hpp index 8ff693aedde800f19930dfdd9aa14c2e54ffa655..14c9992b3e59c02e9f0f81c34f0fac2499a3e23e 100644 --- a/src/pcf_app/sm_policy/dnn_policy_decision.hpp +++ b/src/pcf_app/sm_policy/dnn_policy_decision.hpp @@ -45,7 +45,7 @@ namespace oai::pcf::app::sm_policy { class dnn_policy_decision : public oai::pcf::app::sm_policy::policy_decision { public: explicit dnn_policy_decision( - const std::string& dnn, const oai::pcf::model::SmPolicyDecision& decision) + const std::string& dnn, const oai::model::pcf::SmPolicyDecision& decision) : policy_decision(decision) { m_dnn = dnn; } @@ -62,8 +62,8 @@ class dnn_policy_decision : public oai::pcf::app::sm_policy::policy_decision { * success */ [[nodiscard]] oai::pcf::app::sm_policy::status_code decide( - const oai::pcf::model::SmPolicyContextData& context, - oai::pcf::model::SmPolicyDecision& decision) const override; + const oai::model::pcf::SmPolicyContextData& context, + oai::model::pcf::SmPolicyDecision& decision) const override; /** * @brief Get the dnn object diff --git a/src/pcf_app/sm_policy/individual_sm_association.cpp b/src/pcf_app/sm_policy/individual_sm_association.cpp index 50ffe32577962df1711fae5c8c404dd9f1762f66..5a41ab2b923b688f9ce321153bb63280f5d2d778 100644 --- a/src/pcf_app/sm_policy/individual_sm_association.cpp +++ b/src/pcf_app/sm_policy/individual_sm_association.cpp @@ -29,7 +29,7 @@ #include "individual_sm_association.hpp" -using namespace oai::pcf::model; +using namespace oai::model::pcf; using namespace oai::pcf::app::sm_policy; const SmPolicyContextData& @@ -55,6 +55,6 @@ individual_sm_association::redecide_policy( } oai::pcf::app::sm_policy::status_code individual_sm_association::decide_policy( - oai::pcf::model::SmPolicyDecision& decision) { + SmPolicyDecision& decision) { return m_decision.decide(m_context, decision); } diff --git a/src/pcf_app/sm_policy/individual_sm_association.hpp b/src/pcf_app/sm_policy/individual_sm_association.hpp index 1afced1e23826a27ed68b7bc362dd7928137d231..35cf3ffe18545bda93207d8a99fa22eb27351bab 100644 --- a/src/pcf_app/sm_policy/individual_sm_association.hpp +++ b/src/pcf_app/sm_policy/individual_sm_association.hpp @@ -41,7 +41,7 @@ namespace oai::pcf::app::sm_policy { class individual_sm_association { public: explicit individual_sm_association( - const oai::pcf::model::SmPolicyContextData& context, + const oai::model::pcf::SmPolicyContextData& context, const oai::pcf::app::sm_policy::policy_decision& decision, const std::string& id) : m_decision(decision) { @@ -51,24 +51,24 @@ class individual_sm_association { virtual ~individual_sm_association() = default; - [[nodiscard]] virtual const oai::pcf::model::SmPolicyContextData& + [[nodiscard]] virtual const oai::model::pcf::SmPolicyContextData& get_sm_policy_context_data() const; - [[nodiscard]] virtual const oai::pcf::model::SmPolicyDecision& + [[nodiscard]] virtual const oai::model::pcf::SmPolicyDecision& get_sm_policy_decision_dto() const; [[nodiscard]] virtual oai::pcf::app::sm_policy::status_code redecide_policy( - const oai::pcf::model::SmPolicyUpdateContextData& update_data, - oai::pcf::model::SmPolicyDecision& new_decision, + const oai::model::pcf::SmPolicyUpdateContextData& update_data, + oai::model::pcf::SmPolicyDecision& new_decision, std::string& problem_details); [[nodiscard]] virtual oai::pcf::app::sm_policy::status_code decide_policy( - oai::pcf::model::SmPolicyDecision& decision); + oai::model::pcf::SmPolicyDecision& decision); [[nodiscard]] virtual std::string get_id() const; private: - oai::pcf::model::SmPolicyContextData m_context; + oai::model::pcf::SmPolicyContextData m_context; oai::pcf::app::sm_policy::policy_decision m_decision; std::string m_id; }; diff --git a/src/pcf_app/sm_policy/policy_decision.cpp b/src/pcf_app/sm_policy/policy_decision.cpp index a4e99d741a7ca026609d4755b2dd6c062502cf7c..20afe36e2b9eccc7ab59ee6125574d250463a466 100644 --- a/src/pcf_app/sm_policy/policy_decision.cpp +++ b/src/pcf_app/sm_policy/policy_decision.cpp @@ -32,7 +32,7 @@ #include "logger.hpp" #include <sstream> -using namespace oai::pcf::model; +using namespace oai::model::pcf; using namespace oai::pcf::app::sm_policy; using namespace oai::pcf::app; @@ -142,8 +142,7 @@ status_code policy_decision::handle_rat_type_change( status_code policy_decision::redecide( SmPolicyContextData& original_context, const SmPolicyUpdateContextData& update_data, - oai::pcf::model::SmPolicyDecision& new_decision, - std::string& problem_details) { + SmPolicyDecision& new_decision, std::string& problem_details) { status_code status = status_code::OK; // that is not very beautiful, but that is how the API is designed // (TS 29.512 4.2.4.2) diff --git a/src/pcf_app/sm_policy/policy_decision.hpp b/src/pcf_app/sm_policy/policy_decision.hpp index 5b1d82a865380167365896aa3a19e9a9a59e95fd..5ab90089a77dcef042b2e2ccfd3fb577d076e340 100644 --- a/src/pcf_app/sm_policy/policy_decision.hpp +++ b/src/pcf_app/sm_policy/policy_decision.hpp @@ -43,7 +43,7 @@ namespace oai::pcf::app::sm_policy { */ class policy_decision { public: - explicit policy_decision(const oai::pcf::model::SmPolicyDecision& decision) { + explicit policy_decision(const oai::model::pcf::SmPolicyDecision& decision) { m_decision = decision; } @@ -61,8 +61,8 @@ class policy_decision { * success */ [[nodiscard]] virtual oai::pcf::app::sm_policy::status_code decide( - const oai::pcf::model::SmPolicyContextData& context, - oai::pcf::model::SmPolicyDecision& decision) const; + const oai::model::pcf::SmPolicyContextData& context, + oai::model::pcf::SmPolicyDecision& decision) const; /** * @brief Redecides based on the original context, original decision and @@ -80,40 +80,40 @@ class policy_decision { * update */ [[nodiscard]] virtual oai::pcf::app::sm_policy::status_code redecide( - oai::pcf::model::SmPolicyContextData& original_context, - const oai::pcf::model::SmPolicyUpdateContextData& update_data, - oai::pcf::model::SmPolicyDecision& new_decision, + oai::model::pcf::SmPolicyContextData& original_context, + const oai::model::pcf::SmPolicyUpdateContextData& update_data, + oai::model::pcf::SmPolicyDecision& new_decision, std::string& problem_details); virtual ~policy_decision() = default; - [[nodiscard]] virtual const oai::pcf::model::SmPolicyDecision& + [[nodiscard]] virtual const oai::model::pcf::SmPolicyDecision& get_sm_policy_decision() const; [[nodiscard]] virtual std::string to_string() const; protected: oai::pcf::app::sm_policy::status_code handle_plmn_change( - oai::pcf::model::SmPolicyContextData& orig_context, - const oai::pcf::model::SmPolicyUpdateContextData& update, + oai::model::pcf::SmPolicyContextData& orig_context, + const oai::model::pcf::SmPolicyUpdateContextData& update, std::string& problem_details); oai::pcf::app::sm_policy::status_code handle_access_type_change( - oai::pcf::model::SmPolicyContextData& orig_context, - const oai::pcf::model::SmPolicyUpdateContextData& update, + oai::model::pcf::SmPolicyContextData& orig_context, + const oai::model::pcf::SmPolicyUpdateContextData& update, std::string& problem_details); oai::pcf::app::sm_policy::status_code handle_ip_address_change( - oai::pcf::model::SmPolicyContextData& orig_context, - const oai::pcf::model::SmPolicyUpdateContextData& update, + oai::model::pcf::SmPolicyContextData& orig_context, + const oai::model::pcf::SmPolicyUpdateContextData& update, std::string& problem_details); oai::pcf::app::sm_policy::status_code handle_rat_type_change( - oai::pcf::model::SmPolicyContextData& orig_context, - const oai::pcf::model::SmPolicyUpdateContextData& update, + oai::model::pcf::SmPolicyContextData& orig_context, + const oai::model::pcf::SmPolicyUpdateContextData& update, std::string& problem_details); - oai::pcf::model::SmPolicyDecision m_decision; + oai::model::pcf::SmPolicyDecision m_decision; }; } // namespace oai::pcf::app::sm_policy diff --git a/src/pcf_app/sm_policy/policy_provisioning_file.cpp b/src/pcf_app/sm_policy/policy_provisioning_file.cpp index 31935d6c42f22af3f7d2d44c1bdb1d453e5ff2ef..963615ea12040f81fb28ea43ab1926f9383e4f01 100644 --- a/src/pcf_app/sm_policy/policy_provisioning_file.cpp +++ b/src/pcf_app/sm_policy/policy_provisioning_file.cpp @@ -42,7 +42,7 @@ using namespace oai::pcf::app; using namespace oai::config::pcf; using namespace oai::pcf::app::sm_policy; -using namespace oai::pcf::model; +using namespace oai::model::pcf; using namespace boost::filesystem; using namespace oai::model::common; diff --git a/src/pcf_app/sm_policy/policy_provisioning_file.hpp b/src/pcf_app/sm_policy/policy_provisioning_file.hpp index bc349cf58a85d4c8c6b433d2cd63892174ae249f..ec2f756710438a2eef568cae01aa4cf51ea1ba70 100644 --- a/src/pcf_app/sm_policy/policy_provisioning_file.hpp +++ b/src/pcf_app/sm_policy/policy_provisioning_file.hpp @@ -53,12 +53,12 @@ class policy_provisioning_file { static bool read_all_files_in_dir( const std::string& dir_path, std::vector<YAML::Node>& yaml_output); - static oai::pcf::model::SmPolicyDecision decision_from_rules( + static oai::model::pcf::SmPolicyDecision decision_from_rules( const YAML::Node& node, - const std::map<std::string, oai::pcf::model::PccRule>& pcc_rules, - const std::map<std::string, oai::pcf::model::TrafficControlData>& + const std::map<std::string, oai::model::pcf::PccRule>& pcc_rules, + const std::map<std::string, oai::model::pcf::TrafficControlData>& traffic_control, - const std::map<std::string, oai::pcf::model::QosData>& qos_data); + const std::map<std::string, oai::model::pcf::QosData>& qos_data); template<class T> static std::map<std::string, T> convert_yaml_to_model( diff --git a/src/pcf_app/sm_policy/policy_storage.cpp b/src/pcf_app/sm_policy/policy_storage.cpp index 2497b78693a26fe5e2b845f57acbbea60dd290af..4410606dc6d6e35a76d7dfe4c88d683a98b39b9a 100644 --- a/src/pcf_app/sm_policy/policy_storage.cpp +++ b/src/pcf_app/sm_policy/policy_storage.cpp @@ -33,7 +33,7 @@ #include <sstream> using namespace oai::pcf::app::sm_policy; -using namespace oai::pcf::model; +using namespace oai::model::pcf; using namespace oai::model::common; void policy_storage::set_default_decision(const SmPolicyDecision& decision) { @@ -79,18 +79,9 @@ void policy_storage::insert_slice_decision( slice_decision_lock.unlock(); notify_subscribers(desc); } -/** - * @brief Finds a policy based on the existing supi, dnn, slice and default - * policies in that order. - * - * @param context The policy context containing supi or dnn or snssai - * @param chosen_decision - * decision base class - * @return pointer to the object implementing the chosen, null in case no - * decision can be found - */ + std::shared_ptr<policy_decision> policy_storage::find_policy( - const oai::pcf::model::SmPolicyContextData& context) { + const SmPolicyContextData& context) { std::string msg_base = "SM Policy request from SUPI:"; std::string supi = context.getSupi(); diff --git a/src/pcf_app/sm_policy/policy_storage.hpp b/src/pcf_app/sm_policy/policy_storage.hpp index d90109e9525167a9855d4ee76a05cab3cec94c8c..f84e45ce26a19bb9d2cb3532e60a86ede271ae4b 100644 --- a/src/pcf_app/sm_policy/policy_storage.hpp +++ b/src/pcf_app/sm_policy/policy_storage.hpp @@ -85,20 +85,30 @@ class policy_storage { // TODO methods to update and delete policies void insert_supi_decision( const std::string& supi, - const oai::pcf::model::SmPolicyDecision& decision); + const oai::model::pcf::SmPolicyDecision& decision); void insert_dnn_decision( const std::string& dnn, - const oai::pcf::model::SmPolicyDecision& decision); + const oai::model::pcf::SmPolicyDecision& decision); void insert_slice_decision( const oai::model::common::Snssai&, - const oai::pcf::model::SmPolicyDecision& decision); + const oai::model::pcf::SmPolicyDecision& decision); - void set_default_decision(const oai::pcf::model::SmPolicyDecision& decision); + void set_default_decision(const oai::model::pcf::SmPolicyDecision& decision); + /** + * @brief Finds a policy based on the existing supi, dnn, slice and default + * policies in that order. + * + * @param context The policy context containing supi or dnn or snssai + * @param chosen_decision + * decision base class + * @return pointer to the object implementing the chosen, null in case no + * decision can be found + */ std::shared_ptr<policy_decision> find_policy( - const oai::pcf::model::SmPolicyContextData& context); + const oai::model::pcf::SmPolicyContextData& context); /** * @brief Calls the callback when any of the policies have been updated diff --git a/src/pcf_app/sm_policy/slice_policy_decision.cpp b/src/pcf_app/sm_policy/slice_policy_decision.cpp index 8c0a5395072a53511c7e0e216e51e3d2e416606f..b8455e1a0258235d48e53c349046424cd2d75c5f 100644 --- a/src/pcf_app/sm_policy/slice_policy_decision.cpp +++ b/src/pcf_app/sm_policy/slice_policy_decision.cpp @@ -30,14 +30,13 @@ #include "slice_policy_decision.hpp" #include <sstream> -using namespace oai::pcf::model; +using namespace oai::model::pcf; using namespace oai::pcf::app::sm_policy; using namespace oai::pcf::app; using namespace oai::model::common; status_code slice_policy_decision::decide( - const SmPolicyContextData& context, - oai::pcf::model::SmPolicyDecision& decision) const { + const SmPolicyContextData& context, SmPolicyDecision& decision) const { if (context.getSliceInfo() != m_snssai) { return status_code::CONTEXT_DENIED; } diff --git a/src/pcf_app/sm_policy/slice_policy_decision.hpp b/src/pcf_app/sm_policy/slice_policy_decision.hpp index 736b2b956f6469b8d1b7488c4a8124b979628083..9fed17999efe4cdd4f5a737799e85a02eeb105ba 100644 --- a/src/pcf_app/sm_policy/slice_policy_decision.hpp +++ b/src/pcf_app/sm_policy/slice_policy_decision.hpp @@ -45,7 +45,7 @@ class slice_policy_decision : public oai::pcf::app::sm_policy::policy_decision { public: explicit slice_policy_decision( const oai::model::common::Snssai& snssai, - const oai::pcf::model::SmPolicyDecision& decision) + const oai::model::pcf::SmPolicyDecision& decision) : policy_decision(decision) { m_snssai = snssai; } @@ -62,13 +62,13 @@ class slice_policy_decision : public oai::pcf::app::sm_policy::policy_decision { * success */ [[nodiscard]] oai::pcf::app::sm_policy::status_code decide( - const oai::pcf::model::SmPolicyContextData& context, - oai::pcf::model::SmPolicyDecision& decision) const override; + const oai::model::pcf::SmPolicyContextData& context, + oai::model::pcf::SmPolicyDecision& decision) const override; /** * @brief Get the snssai object * - * @return oai::pcf::model::Snssai + * @return oai::model::pcf::Snssai */ [[nodiscard]] oai::model::common::Snssai get_snssai() const; diff --git a/src/pcf_app/sm_policy/supi_policy_decision.cpp b/src/pcf_app/sm_policy/supi_policy_decision.cpp index d3945f9efa50dab12ee6554626412478a4db0368..3a13a61330aa1e9c35c3705cace099ced6d0e557 100644 --- a/src/pcf_app/sm_policy/supi_policy_decision.cpp +++ b/src/pcf_app/sm_policy/supi_policy_decision.cpp @@ -30,13 +30,12 @@ #include "supi_policy_decision.hpp" #include <sstream> -using namespace oai::pcf::model; +using namespace oai::model::pcf; using namespace oai::pcf::app::sm_policy; using namespace oai::pcf::app; status_code supi_policy_decision::decide( - const SmPolicyContextData& context, - oai::pcf::model::SmPolicyDecision& decision) const { + const SmPolicyContextData& context, SmPolicyDecision& decision) const { if (context.getSupi() != m_supi) { return status_code::CONTEXT_DENIED; } diff --git a/src/pcf_app/sm_policy/supi_policy_decision.hpp b/src/pcf_app/sm_policy/supi_policy_decision.hpp index ae23060e8f4813286ade5d148c45f69199de8bf4..90a3c0a6d353b29e2de0c7877a13c8ba951c4dd2 100644 --- a/src/pcf_app/sm_policy/supi_policy_decision.hpp +++ b/src/pcf_app/sm_policy/supi_policy_decision.hpp @@ -46,7 +46,7 @@ class supi_policy_decision : public oai::pcf::app::sm_policy::policy_decision { public: explicit supi_policy_decision( const std::string& supi, - const oai::pcf::model::SmPolicyDecision& decision) + const oai::model::pcf::SmPolicyDecision& decision) : policy_decision(decision) { m_supi = supi; } @@ -63,8 +63,8 @@ class supi_policy_decision : public oai::pcf::app::sm_policy::policy_decision { * success */ [[nodiscard]] oai::pcf::app::sm_policy::status_code decide( - const oai::pcf::model::SmPolicyContextData& context, - oai::pcf::model::SmPolicyDecision& decision) const override; + const oai::model::pcf::SmPolicyContextData& context, + oai::model::pcf::SmPolicyDecision& decision) const override; /** * @brief Get the supi object