From 252b41927a86bfc468c6eba0f6e7b72a841b800f Mon Sep 17 00:00:00 2001 From: Stefan Spettel <stefan.spettel@eurecom.fr> Date: Thu, 14 Apr 2022 15:27:10 +0200 Subject: [PATCH] Add .clang-format and apply format to all source files --- src/.clang-format | 117 + .../api/IndividualSMPolicyDocumentApi.cpp | 240 +- .../api/IndividualSMPolicyDocumentApi.h | 170 +- .../api/SMPoliciesCollectionApi.cpp | 136 +- src/api-server/api/SMPoliciesCollectionApi.h | 120 +- .../IndividualSMPolicyDocumentApiImpl.cpp | 54 +- .../impl/IndividualSMPolicyDocumentApiImpl.h | 58 +- .../impl/SMPoliciesCollectionApiImpl.cpp | 42 +- .../impl/SMPoliciesCollectionApiImpl.h | 47 +- src/api-server/model/AccNetChId.cpp | 309 +- src/api-server/model/AccNetChId.h | 129 +- .../model/AccNetChargingAddress.cpp | 230 +- src/api-server/model/AccNetChargingAddress.h | 111 +- src/api-server/model/AccessTokenErr.cpp | 243 +- src/api-server/model/AccessTokenErr.h | 123 +- src/api-server/model/AccessTokenReq.cpp | 1080 +++---- src/api-server/model/AccessTokenReq.h | 367 ++- src/api-server/model/AccessType.cpp | 151 +- src/api-server/model/AccessType.h | 94 +- src/api-server/model/AccuUsageReport.cpp | 661 ++-- src/api-server/model/AccuUsageReport.h | 236 +- src/api-server/model/AdditionalAccessInfo.cpp | 144 +- src/api-server/model/AdditionalAccessInfo.h | 109 +- src/api-server/model/AfSigProtocol.cpp | 77 +- src/api-server/model/AfSigProtocol.h | 84 +- src/api-server/model/AfSigProtocol_anyOf.cpp | 155 +- src/api-server/model/AfSigProtocol_anyOf.h | 94 +- src/api-server/model/Ambr.cpp | 153 +- src/api-server/model/Ambr.h | 122 +- src/api-server/model/AnGwAddress.cpp | 230 +- src/api-server/model/AnGwAddress.h | 111 +- src/api-server/model/AppDetectionInfo.cpp | 284 +- src/api-server/model/AppDetectionInfo.h | 130 +- src/api-server/model/Arp.cpp | 171 +- src/api-server/model/Arp.h | 136 +- src/api-server/model/AtsssCapability.cpp | 115 +- src/api-server/model/AtsssCapability.h | 93 +- .../model/AtsssCapability_anyOf.cpp | 181 +- src/api-server/model/AtsssCapability_anyOf.h | 99 +- src/api-server/model/AuthorizedDefaultQos.cpp | 866 +++-- src/api-server/model/AuthorizedDefaultQos.h | 279 +- src/api-server/model/CellGlobalId.cpp | 173 +- src/api-server/model/CellGlobalId.h | 136 +- src/api-server/model/ChargingData.cpp | 789 ++--- src/api-server/model/ChargingData.h | 291 +- src/api-server/model/ChargingInformation.cpp | 377 +-- src/api-server/model/ChargingInformation.h | 195 +- src/api-server/model/ConditionData.cpp | 345 +- src/api-server/model/ConditionData.h | 163 +- .../model/CreditManagementStatus.cpp | 117 +- src/api-server/model/CreditManagementStatus.h | 96 +- .../model/CreditManagementStatus_anyOf.cpp | 200 +- .../model/CreditManagementStatus_anyOf.h | 103 +- src/api-server/model/DnaiChangeType.cpp | 115 +- src/api-server/model/DnaiChangeType.h | 99 +- src/api-server/model/DnaiChangeType_anyOf.cpp | 166 +- src/api-server/model/DnaiChangeType_anyOf.h | 96 +- src/api-server/model/DnnSelectionMode.cpp | 115 +- src/api-server/model/DnnSelectionMode.h | 93 +- .../model/DnnSelectionMode_anyOf.cpp | 170 +- src/api-server/model/DnnSelectionMode_anyOf.h | 97 +- src/api-server/model/Ecgi.cpp | 239 +- src/api-server/model/Ecgi.h | 141 +- src/api-server/model/ErrorReport.cpp | 349 +- src/api-server/model/ErrorReport.h | 133 +- src/api-server/model/EthFlowDescription.cpp | 567 ++-- src/api-server/model/EthFlowDescription.h | 213 +- src/api-server/model/EutraLocation.cpp | 608 ++-- src/api-server/model/EutraLocation.h | 267 +- src/api-server/model/FailureCause.cpp | 113 +- src/api-server/model/FailureCause.h | 93 +- src/api-server/model/FailureCause_anyOf.cpp | 176 +- src/api-server/model/FailureCause_anyOf.h | 98 +- src/api-server/model/FailureCode.cpp | 113 +- src/api-server/model/FailureCode.h | 211 +- src/api-server/model/FailureCode_anyOf.cpp | 361 +-- src/api-server/model/FailureCode_anyOf.h | 132 +- src/api-server/model/FinalUnitAction.cpp | 115 +- src/api-server/model/FinalUnitAction.h | 93 +- .../model/FinalUnitAction_anyOf.cpp | 166 +- src/api-server/model/FinalUnitAction_anyOf.h | 97 +- src/api-server/model/FlowDirection.cpp | 114 +- src/api-server/model/FlowDirection.h | 111 +- src/api-server/model/FlowDirectionRm.cpp | 77 +- src/api-server/model/FlowDirectionRm.h | 80 +- src/api-server/model/FlowDirection_anyOf.cpp | 177 +- src/api-server/model/FlowDirection_anyOf.h | 98 +- src/api-server/model/FlowInformation.cpp | 501 ++- src/api-server/model/FlowInformation.h | 225 +- src/api-server/model/FlowStatus.cpp | 113 +- src/api-server/model/FlowStatus.h | 93 +- src/api-server/model/FlowStatus_anyOf.cpp | 185 +- src/api-server/model/FlowStatus_anyOf.h | 100 +- src/api-server/model/GNbId.cpp | 166 +- src/api-server/model/GNbId.h | 122 +- src/api-server/model/GeraLocation.cpp | 713 ++-- src/api-server/model/GeraLocation.h | 277 +- src/api-server/model/GlobalRanNodeId.cpp | 541 ++-- src/api-server/model/GlobalRanNodeId.h | 217 +- src/api-server/model/Guami.cpp | 137 +- src/api-server/model/Guami.h | 122 +- src/api-server/model/Helpers.cpp | 198 +- src/api-server/model/Helpers.h | 214 +- src/api-server/model/HfcNodeId.cpp | 124 +- src/api-server/model/HfcNodeId.h | 92 +- src/api-server/model/InvalidParam.cpp | 147 +- src/api-server/model/InvalidParam.h | 109 +- .../model/IpMulticastAddressInfo.cpp | 350 +- src/api-server/model/IpMulticastAddressInfo.h | 151 +- src/api-server/model/Ipv6Addr.cpp | 76 +- src/api-server/model/Ipv6Addr.h | 80 +- src/api-server/model/Ipv6Prefix.cpp | 77 +- src/api-server/model/Ipv6Prefix.h | 80 +- src/api-server/model/LineType.cpp | 112 +- src/api-server/model/LineType.h | 94 +- src/api-server/model/LineType_anyOf.cpp | 152 +- src/api-server/model/LineType_anyOf.h | 94 +- src/api-server/model/LocationAreaId.cpp | 138 +- src/api-server/model/LocationAreaId.h | 122 +- src/api-server/model/MaPduIndication.cpp | 115 +- src/api-server/model/MaPduIndication.h | 93 +- .../model/MaPduIndication_anyOf.cpp | 157 +- src/api-server/model/MaPduIndication_anyOf.h | 95 +- src/api-server/model/MeteringMethod.cpp | 77 +- src/api-server/model/MeteringMethod.h | 90 +- src/api-server/model/MeteringMethod_anyOf.cpp | 177 +- src/api-server/model/MeteringMethod_anyOf.h | 98 +- .../model/MulticastAccessControl.cpp | 117 +- src/api-server/model/MulticastAccessControl.h | 96 +- .../model/MulticastAccessControl_anyOf.cpp | 160 +- .../model/MulticastAccessControl_anyOf.h | 97 +- src/api-server/model/N3gaLocation.cpp | 742 ++--- src/api-server/model/N3gaLocation.h | 295 +- src/api-server/model/NFType.cpp | 112 +- src/api-server/model/NFType.h | 89 +- src/api-server/model/NFType_anyOf.cpp | 536 ++- src/api-server/model/NFType_anyOf.h | 164 +- src/api-server/model/Ncgi.cpp | 239 +- src/api-server/model/Ncgi.h | 141 +- src/api-server/model/NgApCause.cpp | 165 +- src/api-server/model/NgApCause.h | 122 +- src/api-server/model/NrLocation.cpp | 453 ++- src/api-server/model/NrLocation.h | 213 +- src/api-server/model/NullValue.cpp | 139 +- src/api-server/model/NullValue.h | 92 +- src/api-server/model/PacketFilterInfo.cpp | 423 ++- src/api-server/model/PacketFilterInfo.h | 189 +- src/api-server/model/PartialSuccessReport.cpp | 375 +-- src/api-server/model/PartialSuccessReport.h | 147 +- src/api-server/model/PatchItem.cpp | 2 +- src/api-server/model/PccRule.cpp | 1524 ++++----- src/api-server/model/PccRule.h | 426 +-- src/api-server/model/PduSessionRelCause.cpp | 115 +- src/api-server/model/PduSessionRelCause.h | 93 +- .../model/PduSessionRelCause_anyOf.cpp | 147 +- .../model/PduSessionRelCause_anyOf.h | 93 +- src/api-server/model/PduSessionType.cpp | 115 +- src/api-server/model/PduSessionType.h | 93 +- src/api-server/model/PduSessionType_anyOf.cpp | 188 +- src/api-server/model/PduSessionType_anyOf.h | 100 +- src/api-server/model/PlmnId.cpp | 153 +- src/api-server/model/PlmnId.h | 122 +- src/api-server/model/PlmnIdNid.cpp | 255 +- src/api-server/model/PlmnIdNid.h | 141 +- .../model/PolicyControlRequestTrigger.cpp | 120 +- .../model/PolicyControlRequestTrigger.h | 171 +- .../PolicyControlRequestTrigger_anyOf.cpp | 619 ++-- .../model/PolicyControlRequestTrigger_anyOf.h | 170 +- .../model/PortManagementContainer.cpp | 124 +- .../model/PortManagementContainer.h | 122 +- src/api-server/model/PreemptionCapability.cpp | 115 +- src/api-server/model/PreemptionCapability.h | 94 +- .../model/PreemptionCapability_anyOf.cpp | 159 +- .../model/PreemptionCapability_anyOf.h | 95 +- .../model/PreemptionVulnerability.cpp | 117 +- .../model/PreemptionVulnerability.h | 97 +- .../model/PreemptionVulnerability_anyOf.cpp | 161 +- .../model/PreemptionVulnerability_anyOf.h | 99 +- src/api-server/model/PresenceInfo.cpp | 738 ++--- src/api-server/model/PresenceInfo.h | 223 +- src/api-server/model/PresenceInfoRm.cpp | 729 ++--- src/api-server/model/PresenceInfoRm.h | 223 +- src/api-server/model/PresenceState.cpp | 114 +- src/api-server/model/PresenceState.h | 93 +- src/api-server/model/PresenceState_anyOf.cpp | 177 +- src/api-server/model/PresenceState_anyOf.h | 98 +- src/api-server/model/ProblemDetails.cpp | 711 ++-- src/api-server/model/ProblemDetails.h | 277 +- src/api-server/model/QosCharacteristics.cpp | 500 ++- src/api-server/model/QosCharacteristics.h | 219 +- src/api-server/model/QosData.cpp | 1271 ++++---- src/api-server/model/QosData.h | 403 +-- src/api-server/model/QosFlowUsage.cpp | 113 +- src/api-server/model/QosFlowUsage.h | 97 +- src/api-server/model/QosFlowUsage_anyOf.cpp | 154 +- src/api-server/model/QosFlowUsage_anyOf.h | 94 +- src/api-server/model/QosMonitoringData.cpp | 698 ++-- src/api-server/model/QosMonitoringData.h | 259 +- src/api-server/model/QosMonitoringReport.cpp | 372 +-- src/api-server/model/QosMonitoringReport.h | 146 +- src/api-server/model/QosNotifType.cpp | 113 +- src/api-server/model/QosNotifType.h | 93 +- src/api-server/model/QosNotifType_anyOf.cpp | 154 +- src/api-server/model/QosNotifType_anyOf.h | 94 +- .../model/QosNotificationControlInfo.cpp | 305 +- .../model/QosNotificationControlInfo.h | 160 +- src/api-server/model/QosResourceType.cpp | 115 +- src/api-server/model/QosResourceType.h | 93 +- .../model/QosResourceType_anyOf.cpp | 166 +- src/api-server/model/QosResourceType_anyOf.h | 97 +- src/api-server/model/RanNasRelCause.cpp | 299 +- src/api-server/model/RanNasRelCause.h | 133 +- src/api-server/model/RatType.cpp | 112 +- src/api-server/model/RatType.h | 93 +- src/api-server/model/RatType_anyOf.cpp | 295 +- src/api-server/model/RatType_anyOf.h | 120 +- src/api-server/model/RedirectAddressType.cpp | 115 +- src/api-server/model/RedirectAddressType.h | 104 +- .../model/RedirectAddressType_anyOf.cpp | 181 +- .../model/RedirectAddressType_anyOf.h | 99 +- src/api-server/model/RedirectInformation.cpp | 272 +- src/api-server/model/RedirectInformation.h | 133 +- src/api-server/model/ReportingFrequency.cpp | 115 +- src/api-server/model/ReportingFrequency.h | 93 +- .../model/ReportingFrequency_anyOf.cpp | 170 +- .../model/ReportingFrequency_anyOf.h | 97 +- src/api-server/model/ReportingLevel.cpp | 77 +- src/api-server/model/ReportingLevel.h | 88 +- src/api-server/model/ReportingLevel_anyOf.cpp | 166 +- src/api-server/model/ReportingLevel_anyOf.h | 96 +- src/api-server/model/RequestedQos.cpp | 290 +- src/api-server/model/RequestedQos.h | 127 +- .../model/RequestedQosMonitoringParameter.cpp | 120 +- .../model/RequestedQosMonitoringParameter.h | 99 +- .../RequestedQosMonitoringParameter_anyOf.cpp | 180 +- .../RequestedQosMonitoringParameter_anyOf.h | 102 +- src/api-server/model/RequestedRuleData.cpp | 209 +- src/api-server/model/RequestedRuleData.h | 124 +- .../model/RequestedRuleDataType.cpp | 115 +- src/api-server/model/RequestedRuleDataType.h | 110 +- .../model/RequestedRuleDataType_anyOf.cpp | 211 +- .../model/RequestedRuleDataType_anyOf.h | 105 +- src/api-server/model/RequestedUsageData.cpp | 250 +- src/api-server/model/RequestedUsageData.h | 120 +- src/api-server/model/RouteInformation.cpp | 263 +- src/api-server/model/RouteInformation.h | 128 +- src/api-server/model/RouteToLocation.cpp | 241 +- src/api-server/model/RouteToLocation.h | 127 +- src/api-server/model/RoutingAreaId.cpp | 173 +- src/api-server/model/RoutingAreaId.h | 136 +- src/api-server/model/RuleOperation.cpp | 114 +- src/api-server/model/RuleOperation.h | 112 +- src/api-server/model/RuleOperation_anyOf.cpp | 207 +- src/api-server/model/RuleOperation_anyOf.h | 102 +- src/api-server/model/RuleReport.cpp | 422 ++- src/api-server/model/RuleReport.h | 195 +- src/api-server/model/RuleStatus.cpp | 113 +- src/api-server/model/RuleStatus.h | 103 +- src/api-server/model/RuleStatus_anyOf.cpp | 152 +- src/api-server/model/RuleStatus_anyOf.h | 94 +- src/api-server/model/ServiceAreaId.cpp | 173 +- src/api-server/model/ServiceAreaId.h | 136 +- src/api-server/model/ServingNfIdentity.cpp | 266 +- src/api-server/model/ServingNfIdentity.h | 133 +- src/api-server/model/SessionRule.cpp | 398 ++- src/api-server/model/SessionRule.h | 184 +- .../model/SessionRuleFailureCode.cpp | 117 +- src/api-server/model/SessionRuleFailureCode.h | 112 +- .../model/SessionRuleFailureCode_anyOf.cpp | 185 +- .../model/SessionRuleFailureCode_anyOf.h | 101 +- src/api-server/model/SessionRuleReport.cpp | 245 +- src/api-server/model/SessionRuleReport.h | 141 +- .../model/SmPolicyAssociationReleaseCause.cpp | 120 +- .../model/SmPolicyAssociationReleaseCause.h | 99 +- .../SmPolicyAssociationReleaseCause_anyOf.cpp | 194 +- .../SmPolicyAssociationReleaseCause_anyOf.h | 104 +- src/api-server/model/SmPolicyContextData.cpp | 2020 ++++++------ src/api-server/model/SmPolicyContextData.h | 731 ++--- src/api-server/model/SmPolicyControl.cpp | 121 +- src/api-server/model/SmPolicyControl.h | 122 +- src/api-server/model/SmPolicyDecision.cpp | 1724 +++++----- src/api-server/model/SmPolicyDecision.h | 556 ++-- src/api-server/model/SmPolicyDeleteData.cpp | 536 ++- src/api-server/model/SmPolicyDeleteData.h | 205 +- src/api-server/model/SmPolicyNotification.cpp | 176 +- src/api-server/model/SmPolicyNotification.h | 115 +- .../model/SmPolicyUpdateContextData.cpp | 2864 ++++++++--------- .../model/SmPolicyUpdateContextData.h | 860 ++--- src/api-server/model/Snssai.cpp | 189 +- src/api-server/model/Snssai.h | 109 +- src/api-server/model/SteerModeValue.cpp | 115 +- src/api-server/model/SteerModeValue.h | 93 +- src/api-server/model/SteerModeValue_anyOf.cpp | 177 +- src/api-server/model/SteerModeValue_anyOf.h | 98 +- .../model/SteeringFunctionality.cpp | 115 +- src/api-server/model/SteeringFunctionality.h | 102 +- .../model/SteeringFunctionality_anyOf.cpp | 159 +- .../model/SteeringFunctionality_anyOf.h | 97 +- src/api-server/model/SteeringMode.cpp | 351 +- src/api-server/model/SteeringMode.h | 163 +- src/api-server/model/SubscribedDefaultQos.cpp | 263 +- src/api-server/model/SubscribedDefaultQos.h | 141 +- src/api-server/model/Tai.cpp | 239 +- src/api-server/model/Tai.h | 141 +- .../model/TerminationNotification.cpp | 125 +- .../model/TerminationNotification.h | 122 +- src/api-server/model/TnapId.cpp | 266 +- src/api-server/model/TnapId.h | 133 +- src/api-server/model/TraceData.cpp | 365 +-- src/api-server/model/TraceData.h | 205 +- src/api-server/model/TraceDepth.cpp | 113 +- src/api-server/model/TraceDepth.h | 93 +- src/api-server/model/TraceDepth_anyOf.cpp | 198 +- src/api-server/model/TraceDepth_anyOf.h | 102 +- src/api-server/model/TrafficControlData.cpp | 891 +++-- src/api-server/model/TrafficControlData.h | 329 +- src/api-server/model/TransportProtocol.cpp | 115 +- src/api-server/model/TransportProtocol.h | 95 +- .../model/TransportProtocol_anyOf.cpp | 157 +- .../model/TransportProtocol_anyOf.h | 95 +- src/api-server/model/TscaiInputContainer.cpp | 228 +- src/api-server/model/TscaiInputContainer.h | 111 +- src/api-server/model/TsnBridgeInfo.cpp | 381 +-- src/api-server/model/TsnBridgeInfo.h | 169 +- src/api-server/model/TsnPortIdentifier.cpp | 180 +- src/api-server/model/TsnPortIdentifier.h | 109 +- src/api-server/model/TwapId.cpp | 239 +- src/api-server/model/TwapId.h | 127 +- src/api-server/model/UeCampingRep.cpp | 416 ++- src/api-server/model/UeCampingRep.h | 187 +- .../model/UeInitiatedResourceRequest.cpp | 359 +-- .../model/UeInitiatedResourceRequest.h | 177 +- src/api-server/model/UpPathChgEvent.cpp | 238 +- src/api-server/model/UpPathChgEvent.h | 156 +- src/api-server/model/UsageMonitoringData.cpp | 873 +++-- src/api-server/model/UsageMonitoringData.h | 299 +- src/api-server/model/UserLocation.cpp | 367 +-- src/api-server/model/UserLocation.h | 169 +- src/api-server/model/UtraLocation.cpp | 554 ++-- src/api-server/model/UtraLocation.h | 223 +- src/api-server/pcf-api-server.cpp | 3 +- src/api-server/pcf-api-server.h | 4 +- src/api-server/pcf-http2-server.cpp | 12 +- src/api-server/pcf-http2-server.h | 11 +- src/common/3gpp_29.500.h | 94 +- src/common/3gpp_29.571.h | 4 +- src/common/common_defs.h | 6 +- src/common/logger.cpp | 4 +- src/common/pcf.h | 2 +- src/common/utils/conversions.hpp | 6 +- src/oai_pcf/main.cpp | 45 +- src/pcf_app/pcf_app.cpp | 7 +- src/pcf_app/pcf_app.hpp | 19 +- src/pcf_app/pcf_config.cpp | 127 +- src/pcf_app/pcf_config.hpp | 16 +- src/pcf_app/pcf_nrf.cpp | 5 +- src/pcf_app/pcf_nrf.hpp | 23 +- src/pcf_app/pcf_profile.cpp | 19 +- src/pcf_app/pcf_profile.hpp | 6 +- src/pcf_app/pcf_sm_policy_control.cpp | 2 +- src/pcf_app/pcf_sm_policy_control.hpp | 18 +- 361 files changed, 35949 insertions(+), 40530 deletions(-) create mode 100644 src/.clang-format mode change 100755 => 100644 src/api-server/model/PresenceState.cpp mode change 100755 => 100644 src/api-server/model/PresenceState.h mode change 100755 => 100644 src/api-server/model/ProblemDetails.cpp mode change 100755 => 100644 src/api-server/model/ProblemDetails.h mode change 100755 => 100644 src/api-server/model/QosCharacteristics.cpp mode change 100755 => 100644 src/api-server/model/QosCharacteristics.h mode change 100755 => 100644 src/api-server/model/QosData.cpp mode change 100755 => 100644 src/api-server/model/QosData.h mode change 100755 => 100644 src/api-server/model/QosFlowUsage.cpp mode change 100755 => 100644 src/api-server/model/QosFlowUsage.h mode change 100755 => 100644 src/api-server/model/QosFlowUsage_anyOf.cpp mode change 100755 => 100644 src/api-server/model/QosFlowUsage_anyOf.h mode change 100755 => 100644 src/api-server/model/QosMonitoringData.cpp mode change 100755 => 100644 src/api-server/model/QosMonitoringData.h mode change 100755 => 100644 src/api-server/model/QosMonitoringReport.cpp mode change 100755 => 100644 src/api-server/model/QosMonitoringReport.h mode change 100755 => 100644 src/api-server/model/QosNotifType.cpp mode change 100755 => 100644 src/api-server/model/QosNotifType.h mode change 100755 => 100644 src/api-server/model/QosNotifType_anyOf.cpp mode change 100755 => 100644 src/api-server/model/QosNotifType_anyOf.h mode change 100755 => 100644 src/api-server/model/QosNotificationControlInfo.cpp mode change 100755 => 100644 src/api-server/model/QosNotificationControlInfo.h mode change 100755 => 100644 src/api-server/model/QosResourceType.cpp mode change 100755 => 100644 src/api-server/model/QosResourceType.h mode change 100755 => 100644 src/api-server/model/QosResourceType_anyOf.cpp mode change 100755 => 100644 src/api-server/model/QosResourceType_anyOf.h mode change 100755 => 100644 src/api-server/model/RanNasRelCause.cpp mode change 100755 => 100644 src/api-server/model/RanNasRelCause.h mode change 100755 => 100644 src/api-server/model/RatType.cpp mode change 100755 => 100644 src/api-server/model/RatType.h mode change 100755 => 100644 src/api-server/model/RatType_anyOf.cpp mode change 100755 => 100644 src/api-server/model/RatType_anyOf.h mode change 100755 => 100644 src/api-server/model/RedirectAddressType.cpp mode change 100755 => 100644 src/api-server/model/RedirectAddressType.h mode change 100755 => 100644 src/api-server/model/RedirectAddressType_anyOf.cpp mode change 100755 => 100644 src/api-server/model/RedirectAddressType_anyOf.h mode change 100755 => 100644 src/api-server/model/RedirectInformation.cpp mode change 100755 => 100644 src/api-server/model/RedirectInformation.h mode change 100755 => 100644 src/api-server/model/ReportingFrequency.cpp mode change 100755 => 100644 src/api-server/model/ReportingFrequency.h mode change 100755 => 100644 src/api-server/model/ReportingFrequency_anyOf.cpp mode change 100755 => 100644 src/api-server/model/ReportingFrequency_anyOf.h mode change 100755 => 100644 src/api-server/model/ReportingLevel.cpp mode change 100755 => 100644 src/api-server/model/ReportingLevel.h mode change 100755 => 100644 src/api-server/model/ReportingLevel_anyOf.cpp mode change 100755 => 100644 src/api-server/model/ReportingLevel_anyOf.h mode change 100755 => 100644 src/api-server/model/RequestedQos.cpp mode change 100755 => 100644 src/api-server/model/RequestedQos.h mode change 100755 => 100644 src/api-server/model/RequestedQosMonitoringParameter.cpp mode change 100755 => 100644 src/api-server/model/RequestedQosMonitoringParameter.h mode change 100755 => 100644 src/api-server/model/RequestedQosMonitoringParameter_anyOf.cpp mode change 100755 => 100644 src/api-server/model/RequestedQosMonitoringParameter_anyOf.h mode change 100755 => 100644 src/api-server/model/RequestedRuleData.cpp mode change 100755 => 100644 src/api-server/model/RequestedRuleData.h mode change 100755 => 100644 src/api-server/model/RequestedRuleDataType.cpp mode change 100755 => 100644 src/api-server/model/RequestedRuleDataType.h mode change 100755 => 100644 src/api-server/model/RequestedRuleDataType_anyOf.cpp mode change 100755 => 100644 src/api-server/model/RequestedRuleDataType_anyOf.h mode change 100755 => 100644 src/api-server/model/RequestedUsageData.cpp mode change 100755 => 100644 src/api-server/model/RequestedUsageData.h mode change 100755 => 100644 src/api-server/model/RouteInformation.cpp mode change 100755 => 100644 src/api-server/model/RouteInformation.h mode change 100755 => 100644 src/api-server/model/RouteToLocation.cpp mode change 100755 => 100644 src/api-server/model/RouteToLocation.h mode change 100755 => 100644 src/api-server/model/RoutingAreaId.cpp mode change 100755 => 100644 src/api-server/model/RoutingAreaId.h mode change 100755 => 100644 src/api-server/model/RuleOperation.cpp mode change 100755 => 100644 src/api-server/model/RuleOperation.h mode change 100755 => 100644 src/api-server/model/RuleOperation_anyOf.cpp mode change 100755 => 100644 src/api-server/model/RuleOperation_anyOf.h mode change 100755 => 100644 src/api-server/model/RuleReport.cpp mode change 100755 => 100644 src/api-server/model/RuleReport.h mode change 100755 => 100644 src/api-server/model/RuleStatus.cpp mode change 100755 => 100644 src/api-server/model/RuleStatus.h mode change 100755 => 100644 src/api-server/model/RuleStatus_anyOf.cpp mode change 100755 => 100644 src/api-server/model/RuleStatus_anyOf.h mode change 100755 => 100644 src/api-server/model/ServiceAreaId.cpp mode change 100755 => 100644 src/api-server/model/ServiceAreaId.h mode change 100755 => 100644 src/api-server/model/ServingNfIdentity.cpp mode change 100755 => 100644 src/api-server/model/ServingNfIdentity.h mode change 100755 => 100644 src/api-server/model/SessionRule.cpp mode change 100755 => 100644 src/api-server/model/SessionRule.h mode change 100755 => 100644 src/api-server/model/SessionRuleFailureCode.cpp mode change 100755 => 100644 src/api-server/model/SessionRuleFailureCode.h mode change 100755 => 100644 src/api-server/model/SessionRuleFailureCode_anyOf.cpp mode change 100755 => 100644 src/api-server/model/SessionRuleFailureCode_anyOf.h mode change 100755 => 100644 src/api-server/model/SessionRuleReport.cpp mode change 100755 => 100644 src/api-server/model/SessionRuleReport.h mode change 100755 => 100644 src/api-server/model/SmPolicyAssociationReleaseCause.cpp mode change 100755 => 100644 src/api-server/model/SmPolicyAssociationReleaseCause.h mode change 100755 => 100644 src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.cpp mode change 100755 => 100644 src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.h mode change 100755 => 100644 src/api-server/model/SmPolicyContextData.cpp mode change 100755 => 100644 src/api-server/model/SmPolicyContextData.h mode change 100755 => 100644 src/api-server/model/SmPolicyControl.cpp mode change 100755 => 100644 src/api-server/model/SmPolicyControl.h mode change 100755 => 100644 src/api-server/model/SmPolicyDecision.cpp mode change 100755 => 100644 src/api-server/model/SmPolicyDecision.h mode change 100755 => 100644 src/api-server/model/SmPolicyDeleteData.cpp mode change 100755 => 100644 src/api-server/model/SmPolicyDeleteData.h mode change 100755 => 100644 src/api-server/model/SmPolicyNotification.cpp mode change 100755 => 100644 src/api-server/model/SmPolicyNotification.h mode change 100755 => 100644 src/api-server/model/SmPolicyUpdateContextData.cpp mode change 100755 => 100644 src/api-server/model/SmPolicyUpdateContextData.h mode change 100755 => 100644 src/api-server/model/Snssai.cpp mode change 100755 => 100644 src/api-server/model/Snssai.h mode change 100755 => 100644 src/api-server/model/SteerModeValue.cpp mode change 100755 => 100644 src/api-server/model/SteerModeValue.h mode change 100755 => 100644 src/api-server/model/SteerModeValue_anyOf.cpp mode change 100755 => 100644 src/api-server/model/SteerModeValue_anyOf.h mode change 100755 => 100644 src/api-server/model/SteeringFunctionality.cpp mode change 100755 => 100644 src/api-server/model/SteeringFunctionality.h mode change 100755 => 100644 src/api-server/model/SteeringFunctionality_anyOf.cpp mode change 100755 => 100644 src/api-server/model/SteeringFunctionality_anyOf.h mode change 100755 => 100644 src/api-server/model/SteeringMode.cpp mode change 100755 => 100644 src/api-server/model/SteeringMode.h mode change 100755 => 100644 src/api-server/model/SubscribedDefaultQos.cpp mode change 100755 => 100644 src/api-server/model/SubscribedDefaultQos.h mode change 100755 => 100644 src/api-server/model/Tai.cpp mode change 100755 => 100644 src/api-server/model/Tai.h mode change 100755 => 100644 src/api-server/model/TerminationNotification.cpp mode change 100755 => 100644 src/api-server/model/TerminationNotification.h mode change 100755 => 100644 src/api-server/model/TnapId.cpp mode change 100755 => 100644 src/api-server/model/TnapId.h mode change 100755 => 100644 src/api-server/model/TraceData.cpp mode change 100755 => 100644 src/api-server/model/TraceData.h mode change 100755 => 100644 src/api-server/model/TraceDepth.cpp mode change 100755 => 100644 src/api-server/model/TraceDepth.h mode change 100755 => 100644 src/api-server/model/TraceDepth_anyOf.cpp mode change 100755 => 100644 src/api-server/model/TraceDepth_anyOf.h mode change 100755 => 100644 src/api-server/model/TrafficControlData.cpp mode change 100755 => 100644 src/api-server/model/TrafficControlData.h mode change 100755 => 100644 src/api-server/model/TransportProtocol.cpp mode change 100755 => 100644 src/api-server/model/TransportProtocol.h mode change 100755 => 100644 src/api-server/model/TransportProtocol_anyOf.cpp mode change 100755 => 100644 src/api-server/model/TransportProtocol_anyOf.h mode change 100755 => 100644 src/api-server/model/TscaiInputContainer.cpp mode change 100755 => 100644 src/api-server/model/TscaiInputContainer.h mode change 100755 => 100644 src/api-server/model/TsnBridgeInfo.cpp mode change 100755 => 100644 src/api-server/model/TsnBridgeInfo.h mode change 100755 => 100644 src/api-server/model/TsnPortIdentifier.cpp mode change 100755 => 100644 src/api-server/model/TsnPortIdentifier.h mode change 100755 => 100644 src/api-server/model/TwapId.cpp mode change 100755 => 100644 src/api-server/model/TwapId.h mode change 100755 => 100644 src/api-server/model/UeCampingRep.cpp mode change 100755 => 100644 src/api-server/model/UeCampingRep.h mode change 100755 => 100644 src/api-server/model/UeInitiatedResourceRequest.cpp mode change 100755 => 100644 src/api-server/model/UeInitiatedResourceRequest.h mode change 100755 => 100644 src/api-server/model/UpPathChgEvent.cpp mode change 100755 => 100644 src/api-server/model/UpPathChgEvent.h mode change 100755 => 100644 src/api-server/model/UsageMonitoringData.cpp mode change 100755 => 100644 src/api-server/model/UsageMonitoringData.h mode change 100755 => 100644 src/api-server/model/UserLocation.cpp mode change 100755 => 100644 src/api-server/model/UserLocation.h mode change 100755 => 100644 src/api-server/model/UtraLocation.cpp mode change 100755 => 100644 src/api-server/model/UtraLocation.h mode change 100755 => 100644 src/api-server/pcf-api-server.cpp mode change 100755 => 100644 src/api-server/pcf-api-server.h mode change 100755 => 100644 src/api-server/pcf-http2-server.cpp mode change 100755 => 100644 src/api-server/pcf-http2-server.h diff --git a/src/.clang-format b/src/.clang-format new file mode 100644 index 0000000..90e3d43 --- /dev/null +++ b/src/.clang-format @@ -0,0 +1,117 @@ +# +# Copyright (c) 2015, EURECOM (www.eurecom.fr) +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# The views and conclusions contained in the software and documentation are those +# of the authors and should not be interpreted as representing official policies, +# either expressed or implied, of the FreeBSD Project. +# + +# see https://clang.llvm.org/docs/ClangFormatStyleOptions.html for explanation +# of style options + +BasedOnStyle: Google +Language: Cpp +IndentWidth: 2 +ColumnLimit: 80 + +IncludeBlocks: Preserve +SortIncludes: false + +# alignment +AlignAfterOpenBracket: AlwaysBreak +AlignConsecutiveAssignments: true +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: Right +AlignOperands: true +AlignTrailingComments: true +DerivePointerAlignment: false +PointerAlignment: Left + +# function style +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortFunctionsOnASingleLine: Inline +AlwaysBreakAfterReturnType: None +IndentWrappedFunctionNames: false + +# template style +AlwaysBreakTemplateDeclarations: Yes + +# preprocessor style +IndentPPDirectives: None + +# block style +AllowShortBlocksOnASingleLine: false +KeepEmptyLinesAtTheStartOfBlocks: false + +# break style +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Attach +BreakBeforeTernaryOperators: false +BreakStringLiterals: true +CompactNamespaces: false +ContinuationIndentWidth: 4 +MaxEmptyLinesToKeep: 1 +ReflowComments: true + +# spacing style +UseTab: Never +SpaceAfterCStyleCast: true +SpaceAfterTemplateKeyword: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 2 +SpacesInAngles: false +SpacesInCStyleCastParentheses: false +SpacesInContainerLiterals: false +SpacesInParentheses: false +SpacesInSquareBrackets: false + +# class style +BreakConstructorInitializers: BeforeColon +BreakInheritanceList: BeforeColon +ConstructorInitializerAllOnOneLineOrOnePerLine: true +ConstructorInitializerIndentWidth: 4 + +# case statements +IndentCaseLabels: true + +# cpp +Cpp11BracedListStyle: true +FixNamespaceComments: true +NamespaceIndentation: None +SortUsingDeclarations: true + +# todo +# AlwaysBreakBeforeMultilineStrings: bool +# PenaltyBreakAssignment (unsigned) +# PenaltyBreakBeforeFirstCallParameter (unsigned) +# PenaltyBreakComment (unsigned) +# PenaltyBreakFirstLessLess (unsigned) +# PenaltyBreakString (unsigned) +# PenaltyBreakTemplateDeclaration (unsigned) +# PenaltyExcessCharacter (unsigned) +# PenaltyReturnTypeOnItsOwnLine (unsigned) diff --git a/src/api-server/api/IndividualSMPolicyDocumentApi.cpp b/src/api-server/api/IndividualSMPolicyDocumentApi.cpp index 77b71e4..6c33b81 100755 --- a/src/api-server/api/IndividualSMPolicyDocumentApi.cpp +++ b/src/api-server/api/IndividualSMPolicyDocumentApi.cpp @@ -1,14 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "IndividualSMPolicyDocumentApi.h" #include "Helpers.h" @@ -20,143 +21,168 @@ namespace api { using namespace oai::pcf::helpers; using namespace oai::pcf::model; -const std::string IndividualSMPolicyDocumentApi::base = "/npcf-smpolicycontrol/v1"; +const std::string IndividualSMPolicyDocumentApi::base = + "/npcf-smpolicycontrol/v1"; -IndividualSMPolicyDocumentApi::IndividualSMPolicyDocumentApi(const std::shared_ptr<Pistache::Rest::Router>& rtr) - : router(rtr) -{ -} +IndividualSMPolicyDocumentApi::IndividualSMPolicyDocumentApi( + const std::shared_ptr<Pistache::Rest::Router>& rtr) + : router(rtr) {} void IndividualSMPolicyDocumentApi::init() { - setupRoutes(); + setupRoutes(); } void IndividualSMPolicyDocumentApi::setupRoutes() { - using namespace Pistache::Rest; - - Routes::Post(*router, base + "/sm-policies/:smPolicyId/delete", Routes::bind(&IndividualSMPolicyDocumentApi::delete_sm_policy_handler, this)); - Routes::Get(*router, base + "/sm-policies/:smPolicyId", Routes::bind(&IndividualSMPolicyDocumentApi::get_sm_policy_handler, this)); - Routes::Post(*router, base + "/sm-policies/:smPolicyId/update", Routes::bind(&IndividualSMPolicyDocumentApi::update_sm_policy_handler, this)); - - // Default handler, called when a route is not found - router->addCustomHandler(Routes::bind(&IndividualSMPolicyDocumentApi::individual_sm_policy_document_api_default_handler, this)); + using namespace Pistache::Rest; + + Routes::Post( + *router, base + "/sm-policies/:smPolicyId/delete", + Routes::bind( + &IndividualSMPolicyDocumentApi::delete_sm_policy_handler, this)); + Routes::Get( + *router, base + "/sm-policies/:smPolicyId", + Routes::bind( + &IndividualSMPolicyDocumentApi::get_sm_policy_handler, this)); + Routes::Post( + *router, base + "/sm-policies/:smPolicyId/update", + Routes::bind( + &IndividualSMPolicyDocumentApi::update_sm_policy_handler, this)); + + // Default handler, called when a route is not found + router->addCustomHandler(Routes::bind( + &IndividualSMPolicyDocumentApi:: + individual_sm_policy_document_api_default_handler, + this)); } -std::pair<Pistache::Http::Code, std::string> IndividualSMPolicyDocumentApi::handleParsingException(const std::exception& ex) const noexcept -{ - try { - throw; - } catch (nlohmann::detail::exception &e) { - return std::make_pair(Pistache::Http::Code::Bad_Request, e.what()); -// } catch (org::openapitools::server::helpers::ValidationException &e) { -// return std::make_pair(Pistache::Http::Code::Bad_Request, e.what()); - } catch (std::exception &e) { - return std::make_pair(Pistache::Http::Code::Internal_Server_Error, e.what()); - } +std::pair<Pistache::Http::Code, std::string> +IndividualSMPolicyDocumentApi::handleParsingException( + const std::exception& ex) const noexcept { + try { + throw; + } catch (nlohmann::detail::exception& e) { + return std::make_pair(Pistache::Http::Code::Bad_Request, e.what()); + // } catch (org::openapitools::server::helpers::ValidationException &e) { + // return std::make_pair(Pistache::Http::Code::Bad_Request, + // e.what()); + } catch (std::exception& e) { + return std::make_pair( + Pistache::Http::Code::Internal_Server_Error, e.what()); + } } -std::pair<Pistache::Http::Code, std::string> IndividualSMPolicyDocumentApi::handleOperationException(const std::exception& ex) const noexcept -{ - return std::make_pair(Pistache::Http::Code::Internal_Server_Error, ex.what()); +std::pair<Pistache::Http::Code, std::string> +IndividualSMPolicyDocumentApi::handleOperationException( + const std::exception& ex) const noexcept { + return std::make_pair(Pistache::Http::Code::Internal_Server_Error, ex.what()); } -void IndividualSMPolicyDocumentApi::delete_sm_policy_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - +void IndividualSMPolicyDocumentApi::delete_sm_policy_handler( + const Pistache::Rest::Request& request, + Pistache::Http::ResponseWriter response) { + try { // Getting the path params auto smPolicyId = request.param(":smPolicyId").as<std::string>(); - + // Getting the body param - + SmPolicyDeleteData smPolicyDeleteData; - - try { - nlohmann::json::parse(request.body()).get_to(smPolicyDeleteData); - smPolicyDeleteData.validate(); - } catch (std::exception &e) { - const std::pair<Pistache::Http::Code, std::string> errorInfo = this->handleParsingException(e); - response.send(errorInfo.first, errorInfo.second); - return; - } try { - this->delete_sm_policy(smPolicyId, smPolicyDeleteData, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast<Pistache::Http::Code>(e.code()), e.what()); - return; - } catch (std::exception &e) { - const std::pair<Pistache::Http::Code, std::string> errorInfo = this->handleOperationException(e); - response.send(errorInfo.first, errorInfo.second); - return; + nlohmann::json::parse(request.body()).get_to(smPolicyDeleteData); + smPolicyDeleteData.validate(); + } catch (std::exception& e) { + const std::pair<Pistache::Http::Code, std::string> errorInfo = + this->handleParsingException(e); + response.send(errorInfo.first, errorInfo.second); + return; } - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + try { + this->delete_sm_policy(smPolicyId, smPolicyDeleteData, response); + } catch (Pistache::Http::HttpError& e) { + response.send(static_cast<Pistache::Http::Code>(e.code()), e.what()); + return; + } catch (std::exception& e) { + const std::pair<Pistache::Http::Code, std::string> errorInfo = + this->handleOperationException(e); + response.send(errorInfo.first, errorInfo.second); + return; } + } catch (std::exception& e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } } -void IndividualSMPolicyDocumentApi::get_sm_policy_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - +void IndividualSMPolicyDocumentApi::get_sm_policy_handler( + const Pistache::Rest::Request& request, + Pistache::Http::ResponseWriter response) { + try { // Getting the path params auto smPolicyId = request.param(":smPolicyId").as<std::string>(); - - try { - this->get_sm_policy(smPolicyId, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast<Pistache::Http::Code>(e.code()), e.what()); - return; - } catch (std::exception &e) { - const std::pair<Pistache::Http::Code, std::string> errorInfo = this->handleOperationException(e); - response.send(errorInfo.first, errorInfo.second); - return; - } - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + try { + this->get_sm_policy(smPolicyId, response); + } catch (Pistache::Http::HttpError& e) { + response.send(static_cast<Pistache::Http::Code>(e.code()), e.what()); + return; + } catch (std::exception& e) { + const std::pair<Pistache::Http::Code, std::string> errorInfo = + this->handleOperationException(e); + response.send(errorInfo.first, errorInfo.second); + return; } + } catch (std::exception& e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } } -void IndividualSMPolicyDocumentApi::update_sm_policy_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - +void IndividualSMPolicyDocumentApi::update_sm_policy_handler( + const Pistache::Rest::Request& request, + Pistache::Http::ResponseWriter response) { + try { // Getting the path params auto smPolicyId = request.param(":smPolicyId").as<std::string>(); - + // Getting the body param - + SmPolicyUpdateContextData smPolicyUpdateContextData; - - try { - nlohmann::json::parse(request.body()).get_to(smPolicyUpdateContextData); - smPolicyUpdateContextData.validate(); - } catch (std::exception &e) { - const std::pair<Pistache::Http::Code, std::string> errorInfo = this->handleParsingException(e); - response.send(errorInfo.first, errorInfo.second); - return; - } try { - this->update_sm_policy(smPolicyId, smPolicyUpdateContextData, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast<Pistache::Http::Code>(e.code()), e.what()); - return; - } catch (std::exception &e) { - const std::pair<Pistache::Http::Code, std::string> errorInfo = this->handleOperationException(e); - response.send(errorInfo.first, errorInfo.second); - return; + nlohmann::json::parse(request.body()).get_to(smPolicyUpdateContextData); + smPolicyUpdateContextData.validate(); + } catch (std::exception& e) { + const std::pair<Pistache::Http::Code, std::string> errorInfo = + this->handleParsingException(e); + response.send(errorInfo.first, errorInfo.second); + return; } - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + try { + this->update_sm_policy(smPolicyId, smPolicyUpdateContextData, response); + } catch (Pistache::Http::HttpError& e) { + response.send(static_cast<Pistache::Http::Code>(e.code()), e.what()); + return; + } catch (std::exception& e) { + const std::pair<Pistache::Http::Code, std::string> errorInfo = + this->handleOperationException(e); + response.send(errorInfo.first, errorInfo.second); + return; } + } catch (std::exception& e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } } -void IndividualSMPolicyDocumentApi::individual_sm_policy_document_api_default_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - response.send(Pistache::Http::Code::Not_Found, "The requested method does not exist"); +void IndividualSMPolicyDocumentApi:: + individual_sm_policy_document_api_default_handler( + const Pistache::Rest::Request&, + Pistache::Http::ResponseWriter response) { + response.send( + Pistache::Http::Code::Not_Found, "The requested method does not exist"); } -} // namespace api -} // namespace pcf -} // namespace oai \ No newline at end of file +} // namespace api +} // namespace pcf +} // namespace oai \ No newline at end of file diff --git a/src/api-server/api/IndividualSMPolicyDocumentApi.h b/src/api-server/api/IndividualSMPolicyDocumentApi.h index 883d3d2..fde978c 100755 --- a/src/api-server/api/IndividualSMPolicyDocumentApi.h +++ b/src/api-server/api/IndividualSMPolicyDocumentApi.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * IndividualSMPolicyDocumentApi.h * - * + * */ #ifndef IndividualSMPolicyDocumentApi_H_ #define IndividualSMPolicyDocumentApi_H_ - #include <pistache/http.h> #include <pistache/router.h> #include <pistache/http_headers.h> @@ -39,70 +39,90 @@ namespace api { using namespace oai::pcf::model; -class IndividualSMPolicyDocumentApi { -public: - explicit IndividualSMPolicyDocumentApi(const std::shared_ptr<Pistache::Rest::Router>& rtr); - virtual ~IndividualSMPolicyDocumentApi() = default; - void init(); - - static const std::string base; - -private: - void setupRoutes(); - - void delete_sm_policy_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); - void get_sm_policy_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); - void update_sm_policy_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); - void individual_sm_policy_document_api_default_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); - - const std::shared_ptr<Pistache::Rest::Router> router; - - /// <summary> - /// Helper function to handle unexpected Exceptions during Parameter parsing and validation. - /// May be overridden to return custom error formats. This is called inside a catch block. - /// Important: When overriding, do not call `throw ex;`, but instead use `throw;`. - /// </summary> - virtual std::pair<Pistache::Http::Code, std::string> handleParsingException(const std::exception& ex) const noexcept; - - /// <summary> - /// Helper function to handle unexpected Exceptions during processing of the request in handler functions. - /// May be overridden to return custom error formats. This is called inside a catch block. - /// Important: When overriding, do not call `throw ex;`, but instead use `throw;`. - /// </summary> - virtual std::pair<Pistache::Http::Code, std::string> handleOperationException(const std::exception& ex) const noexcept; - - /// <summary> - /// Delete an existing Individual SM Policy - /// </summary> - /// <remarks> - /// - /// </remarks> - /// <param name="smPolicyId">Identifier of a policy association</param> - /// <param name="smPolicyDeleteData"></param> - virtual void delete_sm_policy(const std::string &smPolicyId, const oai::pcf::model::SmPolicyDeleteData &smPolicyDeleteData, Pistache::Http::ResponseWriter &response) = 0; - /// <summary> - /// Read an Individual SM Policy - /// </summary> - /// <remarks> - /// - /// </remarks> - /// <param name="smPolicyId">Identifier of a policy association</param> - virtual void get_sm_policy(const std::string &smPolicyId, Pistache::Http::ResponseWriter &response) = 0; - /// <summary> - /// Update an existing Individual SM Policy - /// </summary> - /// <remarks> - /// - /// </remarks> - /// <param name="smPolicyId">Identifier of a policy association</param> - /// <param name="smPolicyUpdateContextData"></param> - virtual void update_sm_policy(const std::string &smPolicyId, const oai::pcf::model::SmPolicyUpdateContextData &smPolicyUpdateContextData, Pistache::Http::ResponseWriter &response) = 0; - +class IndividualSMPolicyDocumentApi { + public: + explicit IndividualSMPolicyDocumentApi( + const std::shared_ptr<Pistache::Rest::Router>& rtr); + virtual ~IndividualSMPolicyDocumentApi() = default; + void init(); + + static const std::string base; + + private: + void setupRoutes(); + + void delete_sm_policy_handler( + const Pistache::Rest::Request& request, + Pistache::Http::ResponseWriter response); + void get_sm_policy_handler( + const Pistache::Rest::Request& request, + Pistache::Http::ResponseWriter response); + void update_sm_policy_handler( + const Pistache::Rest::Request& request, + Pistache::Http::ResponseWriter response); + void individual_sm_policy_document_api_default_handler( + const Pistache::Rest::Request& request, + Pistache::Http::ResponseWriter response); + + const std::shared_ptr<Pistache::Rest::Router> router; + + /// <summary> + /// Helper function to handle unexpected Exceptions during Parameter parsing + /// and validation. May be overridden to return custom error formats. This is + /// called inside a catch block. Important: When overriding, do not call + /// `throw ex;`, but instead use `throw;`. + /// </summary> + virtual std::pair<Pistache::Http::Code, std::string> handleParsingException( + const std::exception& ex) const noexcept; + + /// <summary> + /// Helper function to handle unexpected Exceptions during processing of the + /// request in handler functions. May be overridden to return custom error + /// formats. This is called inside a catch block. Important: When overriding, + /// do not call `throw ex;`, but instead use `throw;`. + /// </summary> + virtual std::pair<Pistache::Http::Code, std::string> handleOperationException( + const std::exception& ex) const noexcept; + + /// <summary> + /// Delete an existing Individual SM Policy + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <param name="smPolicyId">Identifier of a policy association</param> + /// <param name="smPolicyDeleteData"></param> + virtual void delete_sm_policy( + const std::string& smPolicyId, + const oai::pcf::model::SmPolicyDeleteData& smPolicyDeleteData, + Pistache::Http::ResponseWriter& response) = 0; + /// <summary> + /// Read an Individual SM Policy + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <param name="smPolicyId">Identifier of a policy association</param> + virtual void get_sm_policy( + const std::string& smPolicyId, + Pistache::Http::ResponseWriter& response) = 0; + /// <summary> + /// Update an existing Individual SM Policy + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <param name="smPolicyId">Identifier of a policy association</param> + /// <param name="smPolicyUpdateContextData"></param> + virtual void update_sm_policy( + const std::string& smPolicyId, + const oai::pcf::model::SmPolicyUpdateContextData& + smPolicyUpdateContextData, + Pistache::Http::ResponseWriter& response) = 0; }; -} // namespace api -} // namespace pcf -} // namespace oai +} // namespace api +} // namespace pcf +} // namespace oai #endif /* IndividualSMPolicyDocumentApi_H_ */ - diff --git a/src/api-server/api/SMPoliciesCollectionApi.cpp b/src/api-server/api/SMPoliciesCollectionApi.cpp index ce10d1d..209d18d 100755 --- a/src/api-server/api/SMPoliciesCollectionApi.cpp +++ b/src/api-server/api/SMPoliciesCollectionApi.cpp @@ -1,14 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "SMPoliciesCollectionApi.h" @@ -21,81 +22,90 @@ using namespace oai::pcf::model; const std::string SMPoliciesCollectionApi::base = "/npcf-smpolicycontrol/v1"; -SMPoliciesCollectionApi::SMPoliciesCollectionApi(const std::shared_ptr<Pistache::Rest::Router>& rtr) - : router(rtr) -{ -} +SMPoliciesCollectionApi::SMPoliciesCollectionApi( + const std::shared_ptr<Pistache::Rest::Router>& rtr) + : router(rtr) {} void SMPoliciesCollectionApi::init() { - setupRoutes(); + setupRoutes(); } void SMPoliciesCollectionApi::setupRoutes() { - using namespace Pistache::Rest; + using namespace Pistache::Rest; - Routes::Post(*router, base + "/sm-policies", Routes::bind(&SMPoliciesCollectionApi::create_sm_policy_handler, this)); + Routes::Post( + *router, base + "/sm-policies", + Routes::bind(&SMPoliciesCollectionApi::create_sm_policy_handler, this)); - // Default handler, called when a route is not found - router->addCustomHandler(Routes::bind(&SMPoliciesCollectionApi::sm_policies_collection_api_default_handler, this)); + // Default handler, called when a route is not found + router->addCustomHandler(Routes::bind( + &SMPoliciesCollectionApi::sm_policies_collection_api_default_handler, + this)); } -std::pair<Pistache::Http::Code, std::string> SMPoliciesCollectionApi::handleParsingException(const std::exception& ex) const noexcept -{ - try { - throw; - } catch (nlohmann::detail::exception &e) { - return std::make_pair(Pistache::Http::Code::Bad_Request, e.what()); -// } catch (org::openapitools::server::helpers::ValidationException &e) { -// return std::make_pair(Pistache::Http::Code::Bad_Request, e.what()); - } catch (std::exception &e) { - return std::make_pair(Pistache::Http::Code::Internal_Server_Error, e.what()); - } +std::pair<Pistache::Http::Code, std::string> +SMPoliciesCollectionApi::handleParsingException( + const std::exception& ex) const noexcept { + try { + throw; + } catch (nlohmann::detail::exception& e) { + return std::make_pair(Pistache::Http::Code::Bad_Request, e.what()); + // } catch (org::openapitools::server::helpers::ValidationException &e) { + // return std::make_pair(Pistache::Http::Code::Bad_Request, + // e.what()); + } catch (std::exception& e) { + return std::make_pair( + Pistache::Http::Code::Internal_Server_Error, e.what()); + } } -std::pair<Pistache::Http::Code, std::string> SMPoliciesCollectionApi::handleOperationException(const std::exception& ex) const noexcept -{ - return std::make_pair(Pistache::Http::Code::Internal_Server_Error, ex.what()); +std::pair<Pistache::Http::Code, std::string> +SMPoliciesCollectionApi::handleOperationException( + const std::exception& ex) const noexcept { + return std::make_pair(Pistache::Http::Code::Internal_Server_Error, ex.what()); } -void SMPoliciesCollectionApi::create_sm_policy_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { - try { - - +void SMPoliciesCollectionApi::create_sm_policy_handler( + const Pistache::Rest::Request& request, + Pistache::Http::ResponseWriter response) { + try { // Getting the body param - + SmPolicyContextData smPolicyContextData; - - try { - nlohmann::json::parse(request.body()).get_to(smPolicyContextData); - smPolicyContextData.validate(); - } catch (std::exception &e) { - const std::pair<Pistache::Http::Code, std::string> errorInfo = this->handleParsingException(e); - response.send(errorInfo.first, errorInfo.second); - return; - } try { - this->create_sm_policy(smPolicyContextData, response); - } catch (Pistache::Http::HttpError &e) { - response.send(static_cast<Pistache::Http::Code>(e.code()), e.what()); - return; - } catch (std::exception &e) { - const std::pair<Pistache::Http::Code, std::string> errorInfo = this->handleOperationException(e); - response.send(errorInfo.first, errorInfo.second); - return; + nlohmann::json::parse(request.body()).get_to(smPolicyContextData); + smPolicyContextData.validate(); + } catch (std::exception& e) { + const std::pair<Pistache::Http::Code, std::string> errorInfo = + this->handleParsingException(e); + response.send(errorInfo.first, errorInfo.second); + return; } - } catch (std::exception &e) { - response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + try { + this->create_sm_policy(smPolicyContextData, response); + } catch (Pistache::Http::HttpError& e) { + response.send(static_cast<Pistache::Http::Code>(e.code()), e.what()); + return; + } catch (std::exception& e) { + const std::pair<Pistache::Http::Code, std::string> errorInfo = + this->handleOperationException(e); + response.send(errorInfo.first, errorInfo.second); + return; } + } catch (std::exception& e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } } -void SMPoliciesCollectionApi::sm_policies_collection_api_default_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { - response.send(Pistache::Http::Code::Not_Found, "The requested method does not exist"); +void SMPoliciesCollectionApi::sm_policies_collection_api_default_handler( + const Pistache::Rest::Request&, Pistache::Http::ResponseWriter response) { + response.send( + Pistache::Http::Code::Not_Found, "The requested method does not exist"); } -} // namespace api -} // namespace pcf -} // namespace oai - +} // namespace api +} // namespace pcf +} // namespace oai diff --git a/src/api-server/api/SMPoliciesCollectionApi.h b/src/api-server/api/SMPoliciesCollectionApi.h index 5854eb9..787ca62 100755 --- a/src/api-server/api/SMPoliciesCollectionApi.h +++ b/src/api-server/api/SMPoliciesCollectionApi.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * SMPoliciesCollectionApi.h * - * + * */ #ifndef SMPoliciesCollectionApi_H_ #define SMPoliciesCollectionApi_H_ - #include <pistache/http.h> #include <pistache/router.h> #include <pistache/http_headers.h> @@ -39,51 +39,59 @@ namespace api { using namespace oai::pcf::helpers; using namespace oai::pcf::model; - -class SMPoliciesCollectionApi { -public: - explicit SMPoliciesCollectionApi(const std::shared_ptr<Pistache::Rest::Router>& rtr); - virtual ~SMPoliciesCollectionApi() = default; - void init(); - - static const std::string base; - -private: - void setupRoutes(); - - void create_sm_policy_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); - void sm_policies_collection_api_default_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); - - const std::shared_ptr<Pistache::Rest::Router> router; - - /// <summary> - /// Helper function to handle unexpected Exceptions during Parameter parsing and validation. - /// May be overridden to return custom error formats. This is called inside a catch block. - /// Important: When overriding, do not call `throw ex;`, but instead use `throw;`. - /// </summary> - virtual std::pair<Pistache::Http::Code, std::string> handleParsingException(const std::exception& ex) const noexcept; - - /// <summary> - /// Helper function to handle unexpected Exceptions during processing of the request in handler functions. - /// May be overridden to return custom error formats. This is called inside a catch block. - /// Important: When overriding, do not call `throw ex;`, but instead use `throw;`. - /// </summary> - virtual std::pair<Pistache::Http::Code, std::string> handleOperationException(const std::exception& ex) const noexcept; - - /// <summary> - /// Create a new Individual SM Policy - /// </summary> - /// <remarks> - /// - /// </remarks> - /// <param name="smPolicyContextData"></param> - virtual void create_sm_policy(const oai::pcf::model::SmPolicyContextData &smPolicyContextData, Pistache::Http::ResponseWriter &response) = 0; - +class SMPoliciesCollectionApi { + public: + explicit SMPoliciesCollectionApi( + const std::shared_ptr<Pistache::Rest::Router>& rtr); + virtual ~SMPoliciesCollectionApi() = default; + void init(); + + static const std::string base; + + private: + void setupRoutes(); + + void create_sm_policy_handler( + const Pistache::Rest::Request& request, + Pistache::Http::ResponseWriter response); + void sm_policies_collection_api_default_handler( + const Pistache::Rest::Request& request, + Pistache::Http::ResponseWriter response); + + const std::shared_ptr<Pistache::Rest::Router> router; + + /// <summary> + /// Helper function to handle unexpected Exceptions during Parameter parsing + /// and validation. May be overridden to return custom error formats. This is + /// called inside a catch block. Important: When overriding, do not call + /// `throw ex;`, but instead use `throw;`. + /// </summary> + virtual std::pair<Pistache::Http::Code, std::string> handleParsingException( + const std::exception& ex) const noexcept; + + /// <summary> + /// Helper function to handle unexpected Exceptions during processing of the + /// request in handler functions. May be overridden to return custom error + /// formats. This is called inside a catch block. Important: When overriding, + /// do not call `throw ex;`, but instead use `throw;`. + /// </summary> + virtual std::pair<Pistache::Http::Code, std::string> handleOperationException( + const std::exception& ex) const noexcept; + + /// <summary> + /// Create a new Individual SM Policy + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <param name="smPolicyContextData"></param> + virtual void create_sm_policy( + const oai::pcf::model::SmPolicyContextData& smPolicyContextData, + Pistache::Http::ResponseWriter& response) = 0; }; -} // namespace api -} // namespace pcf -} // namespace oai +} // namespace api +} // namespace pcf +} // namespace oai #endif /* SMPoliciesCollectionApi_H_ */ - diff --git a/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.cpp b/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.cpp index 9ae453e..9abf2da 100755 --- a/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.cpp +++ b/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.cpp @@ -1,14 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "IndividualSMPolicyDocumentApiImpl.h" @@ -18,23 +19,26 @@ namespace api { using namespace oai::pcf::model; -IndividualSMPolicyDocumentApiImpl::IndividualSMPolicyDocumentApiImpl(const std::shared_ptr<Pistache::Rest::Router>& rtr) - : IndividualSMPolicyDocumentApi(rtr) -{ -} - -void IndividualSMPolicyDocumentApiImpl::delete_sm_policy(const std::string &smPolicyId, const SmPolicyDeleteData &smPolicyDeleteData, Pistache::Http::ResponseWriter &response) { - response.send(Pistache::Http::Code::Ok, "Do some magic\n"); -} -void IndividualSMPolicyDocumentApiImpl::get_sm_policy(const std::string &smPolicyId, Pistache::Http::ResponseWriter &response) { - response.send(Pistache::Http::Code::Ok, "Do some magic\n"); -} -void IndividualSMPolicyDocumentApiImpl::update_sm_policy(const std::string &smPolicyId, const SmPolicyUpdateContextData &smPolicyUpdateContextData, Pistache::Http::ResponseWriter &response) { - response.send(Pistache::Http::Code::Ok, "Do some magic\n"); -} - +IndividualSMPolicyDocumentApiImpl::IndividualSMPolicyDocumentApiImpl( + const std::shared_ptr<Pistache::Rest::Router>& rtr) + : IndividualSMPolicyDocumentApi(rtr) {} +void IndividualSMPolicyDocumentApiImpl::delete_sm_policy( + const std::string& smPolicyId, const SmPolicyDeleteData& smPolicyDeleteData, + Pistache::Http::ResponseWriter& response) { + response.send(Pistache::Http::Code::Ok, "Do some magic\n"); } +void IndividualSMPolicyDocumentApiImpl::get_sm_policy( + const std::string& smPolicyId, Pistache::Http::ResponseWriter& response) { + response.send(Pistache::Http::Code::Ok, "Do some magic\n"); } +void IndividualSMPolicyDocumentApiImpl::update_sm_policy( + const std::string& smPolicyId, + const SmPolicyUpdateContextData& smPolicyUpdateContextData, + Pistache::Http::ResponseWriter& response) { + response.send(Pistache::Http::Code::Ok, "Do some magic\n"); } +} // namespace api +} // namespace pcf +} // namespace oai diff --git a/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.h b/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.h index b5e5787..7b3e76d 100755 --- a/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.h +++ b/src/api-server/impl/IndividualSMPolicyDocumentApiImpl.h @@ -1,25 +1,25 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* -* IndividualSMPolicyDocumentApiImpl.h -* -* -*/ + * IndividualSMPolicyDocumentApiImpl.h + * + * + */ #ifndef INDIVIDUAL_SM_POLICY_DOCUMENT_API_IMPL_H_ #define INDIVIDUAL_SM_POLICY_DOCUMENT_API_IMPL_H_ - #include <pistache/endpoint.h> #include <pistache/http.h> #include <pistache/router.h> @@ -28,7 +28,6 @@ #include <IndividualSMPolicyDocumentApi.h> - #include "ProblemDetails.h" #include "SmPolicyControl.h" #include "SmPolicyDecision.h" @@ -45,16 +44,23 @@ namespace api { using namespace oai::pcf::model; using namespace pcf; - -class IndividualSMPolicyDocumentApiImpl : public oai::pcf::api::IndividualSMPolicyDocumentApi { -public: - explicit IndividualSMPolicyDocumentApiImpl(const std::shared_ptr<Pistache::Rest::Router>& rtr); - ~IndividualSMPolicyDocumentApiImpl() override = default; - - void delete_sm_policy(const std::string &smPolicyId, const SmPolicyDeleteData &smPolicyDeleteData, Pistache::Http::ResponseWriter &response); - void get_sm_policy(const std::string &smPolicyId, Pistache::Http::ResponseWriter &response); - void update_sm_policy(const std::string &smPolicyId, const SmPolicyUpdateContextData &smPolicyUpdateContextData, Pistache::Http::ResponseWriter &response); - +class IndividualSMPolicyDocumentApiImpl + : public oai::pcf::api::IndividualSMPolicyDocumentApi { + public: + explicit IndividualSMPolicyDocumentApiImpl( + const std::shared_ptr<Pistache::Rest::Router>& rtr); + ~IndividualSMPolicyDocumentApiImpl() override = default; + + void delete_sm_policy( + const std::string& smPolicyId, + const SmPolicyDeleteData& smPolicyDeleteData, + Pistache::Http::ResponseWriter& response); + void get_sm_policy( + const std::string& smPolicyId, Pistache::Http::ResponseWriter& response); + void update_sm_policy( + const std::string& smPolicyId, + const SmPolicyUpdateContextData& smPolicyUpdateContextData, + Pistache::Http::ResponseWriter& response); }; } // namespace api diff --git a/src/api-server/impl/SMPoliciesCollectionApiImpl.cpp b/src/api-server/impl/SMPoliciesCollectionApiImpl.cpp index da29dec..44aac87 100755 --- a/src/api-server/impl/SMPoliciesCollectionApiImpl.cpp +++ b/src/api-server/impl/SMPoliciesCollectionApiImpl.cpp @@ -1,14 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "SMPoliciesCollectionApiImpl.h" @@ -19,17 +20,16 @@ namespace api { using namespace oai::pcf::helpers; using namespace oai::pcf::model; -SMPoliciesCollectionApiImpl::SMPoliciesCollectionApiImpl(const std::shared_ptr<Pistache::Rest::Router>& rtr) - : SMPoliciesCollectionApi(rtr) -{ -} - -void SMPoliciesCollectionApiImpl::create_sm_policy(const SmPolicyContextData &smPolicyContextData, Pistache::Http::ResponseWriter &response) { - response.send(Pistache::Http::Code::Ok, "Do some magic\n"); -} +SMPoliciesCollectionApiImpl::SMPoliciesCollectionApiImpl( + const std::shared_ptr<Pistache::Rest::Router>& rtr) + : SMPoliciesCollectionApi(rtr) {} - -} -} +void SMPoliciesCollectionApiImpl::create_sm_policy( + const SmPolicyContextData& smPolicyContextData, + Pistache::Http::ResponseWriter& response) { + response.send(Pistache::Http::Code::Ok, "Do some magic\n"); } +} // namespace api +} // namespace pcf +} // namespace oai diff --git a/src/api-server/impl/SMPoliciesCollectionApiImpl.h b/src/api-server/impl/SMPoliciesCollectionApiImpl.h index d200e29..c698c5b 100755 --- a/src/api-server/impl/SMPoliciesCollectionApiImpl.h +++ b/src/api-server/impl/SMPoliciesCollectionApiImpl.h @@ -1,25 +1,25 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* -* SMPoliciesCollectionApiImpl.h -* -* -*/ + * SMPoliciesCollectionApiImpl.h + * + * + */ #ifndef SM_POLICIES_COLLECTION_API_IMPL_H_ #define SM_POLICIES_COLLECTION_API_IMPL_H_ - #include <pistache/endpoint.h> #include <pistache/http.h> #include <pistache/router.h> @@ -28,7 +28,6 @@ #include <SMPoliciesCollectionApi.h> - #include "ProblemDetails.h" #include "SmPolicyContextData.h" #include "SmPolicyDecision.h" @@ -43,14 +42,16 @@ namespace api { using namespace oai::pcf::model; using namespace pcf; +class SMPoliciesCollectionApiImpl + : public oai::pcf::api::SMPoliciesCollectionApi { + public: + explicit SMPoliciesCollectionApiImpl( + const std::shared_ptr<Pistache::Rest::Router>& rtr); + ~SMPoliciesCollectionApiImpl() override = default; -class SMPoliciesCollectionApiImpl : public oai::pcf::api::SMPoliciesCollectionApi { -public: - explicit SMPoliciesCollectionApiImpl(const std::shared_ptr<Pistache::Rest::Router>& rtr); - ~SMPoliciesCollectionApiImpl() override = default; - - void create_sm_policy(const SmPolicyContextData &smPolicyContextData, Pistache::Http::ResponseWriter &response); - + void create_sm_policy( + const SmPolicyContextData& smPolicyContextData, + Pistache::Http::ResponseWriter& response); }; } // namespace api diff --git a/src/api-server/model/AccNetChId.cpp b/src/api-server/model/AccNetChId.cpp index 7dfe22e..4fe5c78 100755 --- a/src/api-server/model/AccNetChId.cpp +++ b/src/api-server/model/AccNetChId.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,175 +20,140 @@ 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()); - } +AccNetChId::AccNetChId() { + m_AccNetChaIdValue = 0; + m_RefPccRuleIdsIsSet = false; + m_SessionChScope = false; + m_SessionChScopeIsSet = false; } -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; - - - - /* AccNetChaIdValue */ { - const int32_t& value = m_AccNetChaIdValue; - const std::string currentValuePath = _pathPrefix + ".accNetChaIdValue"; - - - if (value < 0) - { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - if (value > 4294967295) - { - success = false; - msg << currentValuePath << ": must be less than or equal to 4294967295;"; - } +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; + + /* AccNetChaIdValue */ { + const int32_t& value = m_AccNetChaIdValue; + const std::string currentValuePath = _pathPrefix + ".accNetChaIdValue"; + + if (value < 0) { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0;"; } - - 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++; - } - } + if (value > 4294967295) { + success = false; + msg << currentValuePath << ": must be less than or equal to 4294967295;"; + } + } + + 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;"; } - - 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; - } - -} - -int32_t AccNetChId::getAccNetChaIdValue() const -{ - return m_AccNetChaIdValue; -} -void AccNetChId::setAccNetChaIdValue(int32_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; + { // 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; + } +} + +int32_t AccNetChId::getAccNetChaIdValue() const { + return m_AccNetChaIdValue; +} +void AccNetChId::setAccNetChaIdValue(int32_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 diff --git a/src/api-server/model/AccNetChId.h b/src/api-server/model/AccNetChId.h index fa42102..791e00e 100755 --- a/src/api-server/model/AccNetChId.h +++ b/src/api-server/model/AccNetChId.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,68 +28,69 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class AccNetChId -{ -public: - AccNetChId(); - virtual ~AccNetChId() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const AccNetChId& rhs) const; - bool operator!=(const AccNetChId& rhs) const; + ///////////////////////////////////////////// + /// AccNetChId members - ///////////////////////////////////////////// - /// AccNetChId members + /// <summary> + /// + /// </summary> + int32_t getAccNetChaIdValue() const; + void setAccNetChaIdValue(int32_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(); - /// <summary> - /// - /// </summary> - int32_t getAccNetChaIdValue() const; - void setAccNetChaIdValue(int32_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); - friend void to_json(nlohmann::json& j, const AccNetChId& o); - friend void from_json(const nlohmann::json& j, AccNetChId& o); -protected: - int32_t m_AccNetChaIdValue; + protected: + int32_t m_AccNetChaIdValue; - std::vector<std::string> m_RefPccRuleIds; - bool m_RefPccRuleIdsIsSet; - bool m_SessionChScope; - bool m_SessionChScopeIsSet; - + std::vector<std::string> m_RefPccRuleIds; + bool m_RefPccRuleIdsIsSet; + bool m_SessionChScope; + bool m_SessionChScopeIsSet; }; } // namespace model diff --git a/src/api-server/model/AccNetChargingAddress.cpp b/src/api-server/model/AccNetChargingAddress.cpp index 0eba204..339d78b 100755 --- a/src/api-server/model/AccNetChargingAddress.cpp +++ b/src/api-server/model/AccNetChargingAddress.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,125 +20,99 @@ namespace oai { namespace pcf { namespace model { -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; +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 diff --git a/src/api-server/model/AccNetChargingAddress.h b/src/api-server/model/AccNetChargingAddress.h index 0443678..5d26d4f 100755 --- a/src/api-server/model/AccNetChargingAddress.h +++ b/src/api-server/model/AccNetChargingAddress.h @@ -1,14 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 * @@ -18,7 +19,6 @@ #ifndef AccNetChargingAddress_H_ #define AccNetChargingAddress_H_ - #include <string> #include "Ipv6Addr.h" #include <nlohmann/json.hpp> @@ -30,59 +30,58 @@ namespace model { /// <summary> /// Describes the network entity within the access network performing charging /// </summary> -class AccNetChargingAddress -{ -public: - AccNetChargingAddress(); - virtual ~AccNetChargingAddress() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const AccNetChargingAddress& rhs) const; - bool operator!=(const AccNetChargingAddress& rhs) const; + ///////////////////////////////////////////// + /// AccNetChargingAddress members - ///////////////////////////////////////////// - /// AccNetChargingAddress members + /// <summary> + /// + /// </summary> + std::string getAnChargIpv4Addr() const; + void setAnChargIpv4Addr(std::string const& value); + bool anChargIpv4AddrIsSet() const; + void unsetAnChargIpv4Addr(); + /// <summary> + /// + /// </summary> + Ipv6Addr getAnChargIpv6Addr() const; + void setAnChargIpv6Addr(Ipv6Addr const& value); + bool anChargIpv6AddrIsSet() const; + void unsetAnChargIpv6Addr(); - /// <summary> - /// - /// </summary> - std::string getAnChargIpv4Addr() const; - void setAnChargIpv4Addr(std::string const& value); - bool anChargIpv4AddrIsSet() const; - void unsetAnChargIpv4Addr(); - /// <summary> - /// - /// </summary> - Ipv6Addr getAnChargIpv6Addr() const; - void setAnChargIpv6Addr(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); - 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; - Ipv6Addr m_AnChargIpv6Addr; - bool m_AnChargIpv6AddrIsSet; - + protected: + std::string m_AnChargIpv4Addr; + bool m_AnChargIpv4AddrIsSet; + Ipv6Addr m_AnChargIpv6Addr; + bool m_AnChargIpv6AddrIsSet; }; } // namespace model diff --git a/src/api-server/model/AccessTokenErr.cpp b/src/api-server/model/AccessTokenErr.cpp index 9c5a119..6d54466 100755 --- a/src/api-server/model/AccessTokenErr.cpp +++ b/src/api-server/model/AccessTokenErr.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "AccessTokenErr.h" #include "Helpers.h" @@ -20,131 +20,106 @@ namespace oai { namespace pcf { namespace model { -AccessTokenErr::AccessTokenErr() -{ - m_Error = ""; - m_Error_description = ""; - m_Error_descriptionIsSet = false; - m_Error_uri = ""; - m_Error_uriIsSet = false; - -} - -void AccessTokenErr::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool AccessTokenErr::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool AccessTokenErr::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "AccessTokenErr" : pathPrefix; - - - return success; -} - -bool AccessTokenErr::operator==(const AccessTokenErr& rhs) const -{ - return - - - (getError() == rhs.getError()) - && - - - ((!errorDescriptionIsSet() && !rhs.errorDescriptionIsSet()) || (errorDescriptionIsSet() && rhs.errorDescriptionIsSet() && getErrorDescription() == rhs.getErrorDescription())) && - - - ((!errorUriIsSet() && !rhs.errorUriIsSet()) || (errorUriIsSet() && rhs.errorUriIsSet() && getErrorUri() == rhs.getErrorUri())) - - ; -} - -bool AccessTokenErr::operator!=(const AccessTokenErr& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const AccessTokenErr& o) -{ - j = nlohmann::json(); - j["error"] = o.m_Error; - if(o.errorDescriptionIsSet()) - j["error_description"] = o.m_Error_description; - if(o.errorUriIsSet()) - j["error_uri"] = o.m_Error_uri; - -} - -void from_json(const nlohmann::json& j, AccessTokenErr& o) -{ - j.at("error").get_to(o.m_Error); - if(j.find("error_description") != j.end()) - { - j.at("error_description").get_to(o.m_Error_description); - o.m_Error_descriptionIsSet = true; - } - if(j.find("error_uri") != j.end()) - { - j.at("error_uri").get_to(o.m_Error_uri); - o.m_Error_uriIsSet = true; - } - -} - -std::string AccessTokenErr::getError() const -{ - return m_Error; -} -void AccessTokenErr::setError(std::string const& value) -{ - m_Error = value; -} -std::string AccessTokenErr::getErrorDescription() const -{ - return m_Error_description; -} -void AccessTokenErr::setErrorDescription(std::string const& value) -{ - m_Error_description = value; - m_Error_descriptionIsSet = true; -} -bool AccessTokenErr::errorDescriptionIsSet() const -{ - return m_Error_descriptionIsSet; -} -void AccessTokenErr::unsetError_description() -{ - m_Error_descriptionIsSet = false; -} -std::string AccessTokenErr::getErrorUri() const -{ - return m_Error_uri; -} -void AccessTokenErr::setErrorUri(std::string const& value) -{ - m_Error_uri = value; - m_Error_uriIsSet = true; -} -bool AccessTokenErr::errorUriIsSet() const -{ - return m_Error_uriIsSet; -} -void AccessTokenErr::unsetError_uri() -{ - m_Error_uriIsSet = false; +AccessTokenErr::AccessTokenErr() { + m_Error = ""; + m_Error_description = ""; + m_Error_descriptionIsSet = false; + m_Error_uri = ""; + m_Error_uriIsSet = false; +} + +void AccessTokenErr::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool AccessTokenErr::validate(std::stringstream& msg) const { + return validate(msg, ""); +} + +bool AccessTokenErr::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "AccessTokenErr" : pathPrefix; + + return success; +} + +bool AccessTokenErr::operator==(const AccessTokenErr& rhs) const { + return + + (getError() == rhs.getError()) && + + ((!errorDescriptionIsSet() && !rhs.errorDescriptionIsSet()) || + (errorDescriptionIsSet() && rhs.errorDescriptionIsSet() && + getErrorDescription() == rhs.getErrorDescription())) && + + ((!errorUriIsSet() && !rhs.errorUriIsSet()) || + (errorUriIsSet() && rhs.errorUriIsSet() && + getErrorUri() == rhs.getErrorUri())) + + ; +} + +bool AccessTokenErr::operator!=(const AccessTokenErr& rhs) const { + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const AccessTokenErr& o) { + j = nlohmann::json(); + j["error"] = o.m_Error; + if (o.errorDescriptionIsSet()) j["error_description"] = o.m_Error_description; + if (o.errorUriIsSet()) j["error_uri"] = o.m_Error_uri; +} + +void from_json(const nlohmann::json& j, AccessTokenErr& o) { + j.at("error").get_to(o.m_Error); + if (j.find("error_description") != j.end()) { + j.at("error_description").get_to(o.m_Error_description); + o.m_Error_descriptionIsSet = true; + } + if (j.find("error_uri") != j.end()) { + j.at("error_uri").get_to(o.m_Error_uri); + o.m_Error_uriIsSet = true; + } } +std::string AccessTokenErr::getError() const { + return m_Error; +} +void AccessTokenErr::setError(std::string const& value) { + m_Error = value; +} +std::string AccessTokenErr::getErrorDescription() const { + return m_Error_description; +} +void AccessTokenErr::setErrorDescription(std::string const& value) { + m_Error_description = value; + m_Error_descriptionIsSet = true; +} +bool AccessTokenErr::errorDescriptionIsSet() const { + return m_Error_descriptionIsSet; +} +void AccessTokenErr::unsetError_description() { + m_Error_descriptionIsSet = false; +} +std::string AccessTokenErr::getErrorUri() const { + return m_Error_uri; +} +void AccessTokenErr::setErrorUri(std::string const& value) { + m_Error_uri = value; + m_Error_uriIsSet = true; +} +bool AccessTokenErr::errorUriIsSet() const { + return m_Error_uriIsSet; +} +void AccessTokenErr::unsetError_uri() { + m_Error_uriIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/AccessTokenErr.h b/src/api-server/model/AccessTokenErr.h index 70a9c97..54be97f 100755 --- a/src/api-server/model/AccessTokenErr.h +++ b/src/api-server/model/AccessTokenErr.h @@ -1,14 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * AccessTokenErr.h * @@ -18,7 +19,6 @@ #ifndef AccessTokenErr_H_ #define AccessTokenErr_H_ - #include <string> #include <nlohmann/json.hpp> @@ -29,66 +29,65 @@ namespace model { /// <summary> /// Error returned in the access token response message /// </summary> -class AccessTokenErr -{ -public: - AccessTokenErr(); - virtual ~AccessTokenErr() = default; +class AccessTokenErr { + public: + AccessTokenErr(); + virtual ~AccessTokenErr() = default; + /// <summary> + /// Validate the current data in the model. Throws a ValidationException on + /// failure. + /// </summary> + void validate() const; - /// <summary> - /// Validate the current data in the model. 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> - /// 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; - /// <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 AccessTokenErr& rhs) const; + bool operator!=(const AccessTokenErr& rhs) const; - bool operator==(const AccessTokenErr& rhs) const; - bool operator!=(const AccessTokenErr& rhs) const; + ///////////////////////////////////////////// + /// AccessTokenErr members - ///////////////////////////////////////////// - /// AccessTokenErr members + /// <summary> + /// + /// </summary> + std::string getError() const; + void setError(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getErrorDescription() const; + void setErrorDescription(std::string const& value); + bool errorDescriptionIsSet() const; + void unsetError_description(); + /// <summary> + /// + /// </summary> + std::string getErrorUri() const; + void setErrorUri(std::string const& value); + bool errorUriIsSet() const; + void unsetError_uri(); - /// <summary> - /// - /// </summary> - std::string getError() const; - void setError(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getErrorDescription() const; - void setErrorDescription(std::string const& value); - bool errorDescriptionIsSet() const; - void unsetError_description(); - /// <summary> - /// - /// </summary> - std::string getErrorUri() const; - void setErrorUri(std::string const& value); - bool errorUriIsSet() const; - void unsetError_uri(); + friend void to_json(nlohmann::json& j, const AccessTokenErr& o); + friend void from_json(const nlohmann::json& j, AccessTokenErr& o); - friend void to_json(nlohmann::json& j, const AccessTokenErr& o); - friend void from_json(const nlohmann::json& j, AccessTokenErr& o); -protected: - std::string m_Error; + protected: + std::string m_Error; - std::string m_Error_description; - bool m_Error_descriptionIsSet; - std::string m_Error_uri; - bool m_Error_uriIsSet; - + std::string m_Error_description; + bool m_Error_descriptionIsSet; + std::string m_Error_uri; + bool m_Error_uriIsSet; }; } // namespace model diff --git a/src/api-server/model/AccessTokenReq.cpp b/src/api-server/model/AccessTokenReq.cpp index 6d9ad77..f6b4a0d 100755 --- a/src/api-server/model/AccessTokenReq.cpp +++ b/src/api-server/model/AccessTokenReq.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "AccessTokenReq.h" #include "Helpers.h" @@ -20,608 +20,510 @@ namespace oai { namespace pcf { namespace model { -AccessTokenReq::AccessTokenReq() -{ - m_Grant_type = ""; - m_NfInstanceId = ""; - m_NfTypeIsSet = false; - m_TargetNfTypeIsSet = false; - m_Scope = ""; - m_TargetNfInstanceId = ""; - m_TargetNfInstanceIdIsSet = false; - m_RequesterPlmnIsSet = false; - m_RequesterPlmnListIsSet = false; - m_RequesterSnssaiListIsSet = false; - m_RequesterFqdn = ""; - m_RequesterFqdnIsSet = false; - m_RequesterSnpnListIsSet = false; - m_TargetPlmnIsSet = false; - m_TargetSnssaiListIsSet = false; - m_TargetNsiListIsSet = false; - m_TargetNfSetId = ""; - m_TargetNfSetIdIsSet = false; - m_TargetNfServiceSetId = ""; - m_TargetNfServiceSetIdIsSet = false; - -} - -void AccessTokenReq::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +AccessTokenReq::AccessTokenReq() { + m_Grant_type = ""; + m_NfInstanceId = ""; + m_NfTypeIsSet = false; + m_TargetNfTypeIsSet = false; + m_Scope = ""; + m_TargetNfInstanceId = ""; + m_TargetNfInstanceIdIsSet = false; + m_RequesterPlmnIsSet = false; + m_RequesterPlmnListIsSet = false; + m_RequesterSnssaiListIsSet = false; + m_RequesterFqdn = ""; + m_RequesterFqdnIsSet = false; + m_RequesterSnpnListIsSet = false; + m_TargetPlmnIsSet = false; + m_TargetSnssaiListIsSet = false; + m_TargetNsiListIsSet = false; + m_TargetNfSetId = ""; + m_TargetNfSetIdIsSet = false; + m_TargetNfServiceSetId = ""; + m_TargetNfServiceSetIdIsSet = false; +} + +void AccessTokenReq::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool AccessTokenReq::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool AccessTokenReq::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool AccessTokenReq::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "AccessTokenReq" : pathPrefix; +bool AccessTokenReq::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "AccessTokenReq" : pathPrefix; + + /* Scope */ { + const std::string& value = m_Scope; + const std::string currentValuePath = _pathPrefix + ".scope"; + } + + if (requesterPlmnListIsSet()) { + const std::vector<PlmnId>& value = m_RequesterPlmnList; + const std::string currentValuePath = _pathPrefix + ".requesterPlmnList"; + + if (value.size() < 2) { + success = false; + msg << currentValuePath << ": must have at least 2 elements;"; + } + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const PlmnId& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + + success = + value.validate(msg, currentValuePath + ".requesterPlmnList") && + success; + + i++; + } + } + } + + if (requesterSnssaiListIsSet()) { + const std::vector<Snssai>& value = m_RequesterSnssaiList; + const std::string currentValuePath = _pathPrefix + ".requesterSnssaiList"; + + 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 Snssai& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; - - - /* Scope */ { - const std::string& value = m_Scope; - const std::string currentValuePath = _pathPrefix + ".scope"; - - + success = + value.validate(msg, currentValuePath + ".requesterSnssaiList") && + success; + i++; + } } - - if (requesterPlmnListIsSet()) - { - const std::vector<PlmnId>& value = m_RequesterPlmnList; - const std::string currentValuePath = _pathPrefix + ".requesterPlmnList"; - - - if (value.size() < 2) - { - success = false; - msg << currentValuePath << ": must have at least 2 elements;"; - } - { // Recursive validation of array elements - const std::string oldValuePath = currentValuePath; - int i = 0; - for (const PlmnId& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".requesterPlmnList") && success; - - i++; - } - } + } + + if (requesterSnpnListIsSet()) { + const std::vector<PlmnIdNid>& value = m_RequesterSnpnList; + const std::string currentValuePath = _pathPrefix + ".requesterSnpnList"; + if (value.size() < 1) { + success = false; + msg << currentValuePath << ": must have at least 1 elements;"; } - - if (requesterSnssaiListIsSet()) - { - const std::vector<Snssai>& value = m_RequesterSnssaiList; - const std::string currentValuePath = _pathPrefix + ".requesterSnssaiList"; - - - 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 Snssai& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".requesterSnssaiList") && success; - - i++; - } - } + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const PlmnIdNid& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + success = + value.validate(msg, currentValuePath + ".requesterSnpnList") && + success; + + i++; + } } - - if (requesterSnpnListIsSet()) - { - const std::vector<PlmnIdNid>& value = m_RequesterSnpnList; - const std::string currentValuePath = _pathPrefix + ".requesterSnpnList"; - - - 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 PlmnIdNid& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".requesterSnpnList") && success; - - i++; - } - } + } + + if (targetSnssaiListIsSet()) { + const std::vector<Snssai>& value = m_TargetSnssaiList; + const std::string currentValuePath = _pathPrefix + ".targetSnssaiList"; + if (value.size() < 1) { + success = false; + msg << currentValuePath << ": must have at least 1 elements;"; } - - if (targetSnssaiListIsSet()) - { - const std::vector<Snssai>& value = m_TargetSnssaiList; - const std::string currentValuePath = _pathPrefix + ".targetSnssaiList"; - - - 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 Snssai& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".targetSnssaiList") && success; - - i++; - } - } + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const Snssai& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + success = value.validate(msg, currentValuePath + ".targetSnssaiList") && + success; + + i++; + } } - - if (targetNsiListIsSet()) - { - const std::vector<std::string>& value = m_TargetNsiList; - const std::string currentValuePath = _pathPrefix + ".targetNsiList"; - - - 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 (targetNsiListIsSet()) { + const std::vector<std::string>& value = m_TargetNsiList; + const std::string currentValuePath = _pathPrefix + ".targetNsiList"; + if (value.size() < 1) { + success = false; + msg << currentValuePath << ": must have at least 1 elements;"; } - - return success; -} - -bool AccessTokenReq::operator==(const AccessTokenReq& rhs) const -{ - return - - - (getGrantType() == rhs.getGrantType()) - && - - (getNfInstanceId() == rhs.getNfInstanceId()) - && - - - ((!nfTypeIsSet() && !rhs.nfTypeIsSet()) || (nfTypeIsSet() && rhs.nfTypeIsSet() && getNfType() == rhs.getNfType())) && - - - ((!targetNfTypeIsSet() && !rhs.targetNfTypeIsSet()) || (targetNfTypeIsSet() && rhs.targetNfTypeIsSet() && getTargetNfType() == rhs.getTargetNfType())) && - - (getScope() == rhs.getScope()) - && - - - ((!targetNfInstanceIdIsSet() && !rhs.targetNfInstanceIdIsSet()) || (targetNfInstanceIdIsSet() && rhs.targetNfInstanceIdIsSet() && getTargetNfInstanceId() == rhs.getTargetNfInstanceId())) && - - - ((!requesterPlmnIsSet() && !rhs.requesterPlmnIsSet()) || (requesterPlmnIsSet() && rhs.requesterPlmnIsSet() && getRequesterPlmn() == rhs.getRequesterPlmn())) && - - - ((!requesterPlmnListIsSet() && !rhs.requesterPlmnListIsSet()) || (requesterPlmnListIsSet() && rhs.requesterPlmnListIsSet() && getRequesterPlmnList() == rhs.getRequesterPlmnList())) && - - - ((!requesterSnssaiListIsSet() && !rhs.requesterSnssaiListIsSet()) || (requesterSnssaiListIsSet() && rhs.requesterSnssaiListIsSet() && getRequesterSnssaiList() == rhs.getRequesterSnssaiList())) && - - - ((!requesterFqdnIsSet() && !rhs.requesterFqdnIsSet()) || (requesterFqdnIsSet() && rhs.requesterFqdnIsSet() && getRequesterFqdn() == rhs.getRequesterFqdn())) && - - - ((!requesterSnpnListIsSet() && !rhs.requesterSnpnListIsSet()) || (requesterSnpnListIsSet() && rhs.requesterSnpnListIsSet() && getRequesterSnpnList() == rhs.getRequesterSnpnList())) && - - - ((!targetPlmnIsSet() && !rhs.targetPlmnIsSet()) || (targetPlmnIsSet() && rhs.targetPlmnIsSet() && getTargetPlmn() == rhs.getTargetPlmn())) && - - - ((!targetSnssaiListIsSet() && !rhs.targetSnssaiListIsSet()) || (targetSnssaiListIsSet() && rhs.targetSnssaiListIsSet() && getTargetSnssaiList() == rhs.getTargetSnssaiList())) && - - - ((!targetNsiListIsSet() && !rhs.targetNsiListIsSet()) || (targetNsiListIsSet() && rhs.targetNsiListIsSet() && getTargetNsiList() == rhs.getTargetNsiList())) && - - - ((!targetNfSetIdIsSet() && !rhs.targetNfSetIdIsSet()) || (targetNfSetIdIsSet() && rhs.targetNfSetIdIsSet() && getTargetNfSetId() == rhs.getTargetNfSetId())) && - - - ((!targetNfServiceSetIdIsSet() && !rhs.targetNfServiceSetIdIsSet()) || (targetNfServiceSetIdIsSet() && rhs.targetNfServiceSetIdIsSet() && getTargetNfServiceSetId() == rhs.getTargetNfServiceSetId())) - - ; -} - -bool AccessTokenReq::operator!=(const AccessTokenReq& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const AccessTokenReq& o) -{ - j = nlohmann::json(); - j["grant_type"] = o.m_Grant_type; - j["nfInstanceId"] = o.m_NfInstanceId; - if(o.nfTypeIsSet()) - j["nfType"] = o.m_NfType; - if(o.targetNfTypeIsSet()) - j["targetNfType"] = o.m_TargetNfType; - j["scope"] = o.m_Scope; - if(o.targetNfInstanceIdIsSet()) - j["targetNfInstanceId"] = o.m_TargetNfInstanceId; - if(o.requesterPlmnIsSet()) - j["requesterPlmn"] = o.m_RequesterPlmn; - if(o.requesterPlmnListIsSet() || !o.m_RequesterPlmnList.empty()) - j["requesterPlmnList"] = o.m_RequesterPlmnList; - if(o.requesterSnssaiListIsSet() || !o.m_RequesterSnssaiList.empty()) - j["requesterSnssaiList"] = o.m_RequesterSnssaiList; - if(o.requesterFqdnIsSet()) - j["requesterFqdn"] = o.m_RequesterFqdn; - if(o.requesterSnpnListIsSet() || !o.m_RequesterSnpnList.empty()) - j["requesterSnpnList"] = o.m_RequesterSnpnList; - if(o.targetPlmnIsSet()) - j["targetPlmn"] = o.m_TargetPlmn; - if(o.targetSnssaiListIsSet() || !o.m_TargetSnssaiList.empty()) - j["targetSnssaiList"] = o.m_TargetSnssaiList; - if(o.targetNsiListIsSet() || !o.m_TargetNsiList.empty()) - j["targetNsiList"] = o.m_TargetNsiList; - if(o.targetNfSetIdIsSet()) - j["targetNfSetId"] = o.m_TargetNfSetId; - if(o.targetNfServiceSetIdIsSet()) - j["targetNfServiceSetId"] = o.m_TargetNfServiceSetId; - -} - -void from_json(const nlohmann::json& j, AccessTokenReq& o) -{ - j.at("grant_type").get_to(o.m_Grant_type); - j.at("nfInstanceId").get_to(o.m_NfInstanceId); - if(j.find("nfType") != j.end()) - { - j.at("nfType").get_to(o.m_NfType); - o.m_NfTypeIsSet = true; - } - if(j.find("targetNfType") != j.end()) - { - j.at("targetNfType").get_to(o.m_TargetNfType); - o.m_TargetNfTypeIsSet = true; - } - j.at("scope").get_to(o.m_Scope); - if(j.find("targetNfInstanceId") != j.end()) - { - j.at("targetNfInstanceId").get_to(o.m_TargetNfInstanceId); - o.m_TargetNfInstanceIdIsSet = true; - } - if(j.find("requesterPlmn") != j.end()) - { - j.at("requesterPlmn").get_to(o.m_RequesterPlmn); - o.m_RequesterPlmnIsSet = true; - } - if(j.find("requesterPlmnList") != j.end()) - { - j.at("requesterPlmnList").get_to(o.m_RequesterPlmnList); - o.m_RequesterPlmnListIsSet = true; - } - if(j.find("requesterSnssaiList") != j.end()) - { - j.at("requesterSnssaiList").get_to(o.m_RequesterSnssaiList); - o.m_RequesterSnssaiListIsSet = true; - } - if(j.find("requesterFqdn") != j.end()) - { - j.at("requesterFqdn").get_to(o.m_RequesterFqdn); - o.m_RequesterFqdnIsSet = true; - } - if(j.find("requesterSnpnList") != j.end()) - { - j.at("requesterSnpnList").get_to(o.m_RequesterSnpnList); - o.m_RequesterSnpnListIsSet = true; - } - if(j.find("targetPlmn") != j.end()) - { - j.at("targetPlmn").get_to(o.m_TargetPlmn); - o.m_TargetPlmnIsSet = true; - } - if(j.find("targetSnssaiList") != j.end()) - { - j.at("targetSnssaiList").get_to(o.m_TargetSnssaiList); - o.m_TargetSnssaiListIsSet = true; - } - if(j.find("targetNsiList") != j.end()) - { - j.at("targetNsiList").get_to(o.m_TargetNsiList); - o.m_TargetNsiListIsSet = true; - } - if(j.find("targetNfSetId") != j.end()) - { - j.at("targetNfSetId").get_to(o.m_TargetNfSetId); - o.m_TargetNfSetIdIsSet = true; - } - if(j.find("targetNfServiceSetId") != j.end()) - { - j.at("targetNfServiceSetId").get_to(o.m_TargetNfServiceSetId); - o.m_TargetNfServiceSetIdIsSet = true; - } - -} - -std::string AccessTokenReq::getGrantType() const -{ - return m_Grant_type; -} -void AccessTokenReq::setGrantType(std::string const& value) -{ - m_Grant_type = value; -} -std::string AccessTokenReq::getNfInstanceId() const -{ - return m_NfInstanceId; -} -void AccessTokenReq::setNfInstanceId(std::string const& value) -{ - m_NfInstanceId = value; -} -NFType AccessTokenReq::getNfType() const -{ - return m_NfType; -} -void AccessTokenReq::setNfType(NFType const& value) -{ - m_NfType = value; - m_NfTypeIsSet = true; -} -bool AccessTokenReq::nfTypeIsSet() const -{ - return m_NfTypeIsSet; -} -void AccessTokenReq::unsetNfType() -{ - m_NfTypeIsSet = false; -} -NFType AccessTokenReq::getTargetNfType() const -{ - return m_TargetNfType; -} -void AccessTokenReq::setTargetNfType(NFType const& value) -{ - m_TargetNfType = value; - m_TargetNfTypeIsSet = true; -} -bool AccessTokenReq::targetNfTypeIsSet() const -{ - return m_TargetNfTypeIsSet; -} -void AccessTokenReq::unsetTargetNfType() -{ - m_TargetNfTypeIsSet = false; -} -std::string AccessTokenReq::getScope() const -{ - return m_Scope; -} -void AccessTokenReq::setScope(std::string const& value) -{ - m_Scope = value; -} -std::string AccessTokenReq::getTargetNfInstanceId() const -{ - return m_TargetNfInstanceId; -} -void AccessTokenReq::setTargetNfInstanceId(std::string const& value) -{ - m_TargetNfInstanceId = value; - m_TargetNfInstanceIdIsSet = true; -} -bool AccessTokenReq::targetNfInstanceIdIsSet() const -{ - return m_TargetNfInstanceIdIsSet; -} -void AccessTokenReq::unsetTargetNfInstanceId() -{ - m_TargetNfInstanceIdIsSet = false; -} -PlmnId AccessTokenReq::getRequesterPlmn() const -{ - return m_RequesterPlmn; -} -void AccessTokenReq::setRequesterPlmn(PlmnId const& value) -{ - m_RequesterPlmn = value; - m_RequesterPlmnIsSet = true; -} -bool AccessTokenReq::requesterPlmnIsSet() const -{ - return m_RequesterPlmnIsSet; -} -void AccessTokenReq::unsetRequesterPlmn() -{ - m_RequesterPlmnIsSet = false; -} -std::vector<PlmnId> AccessTokenReq::getRequesterPlmnList() const -{ - return m_RequesterPlmnList; -} -void AccessTokenReq::setRequesterPlmnList(std::vector<PlmnId> const& value) -{ - m_RequesterPlmnList = value; - m_RequesterPlmnListIsSet = true; -} -bool AccessTokenReq::requesterPlmnListIsSet() const -{ - return m_RequesterPlmnListIsSet; -} -void AccessTokenReq::unsetRequesterPlmnList() -{ - m_RequesterPlmnListIsSet = false; -} -std::vector<Snssai> AccessTokenReq::getRequesterSnssaiList() const -{ - return m_RequesterSnssaiList; -} -void AccessTokenReq::setRequesterSnssaiList(std::vector<Snssai> const& value) -{ - m_RequesterSnssaiList = value; - m_RequesterSnssaiListIsSet = true; -} -bool AccessTokenReq::requesterSnssaiListIsSet() const -{ - return m_RequesterSnssaiListIsSet; -} -void AccessTokenReq::unsetRequesterSnssaiList() -{ - m_RequesterSnssaiListIsSet = false; -} -std::string AccessTokenReq::getRequesterFqdn() const -{ - return m_RequesterFqdn; -} -void AccessTokenReq::setRequesterFqdn(std::string const& value) -{ - m_RequesterFqdn = value; - m_RequesterFqdnIsSet = true; -} -bool AccessTokenReq::requesterFqdnIsSet() const -{ - return m_RequesterFqdnIsSet; -} -void AccessTokenReq::unsetRequesterFqdn() -{ - m_RequesterFqdnIsSet = false; -} -std::vector<PlmnIdNid> AccessTokenReq::getRequesterSnpnList() const -{ - return m_RequesterSnpnList; -} -void AccessTokenReq::setRequesterSnpnList(std::vector<PlmnIdNid> const& value) -{ - m_RequesterSnpnList = value; - m_RequesterSnpnListIsSet = true; -} -bool AccessTokenReq::requesterSnpnListIsSet() const -{ - return m_RequesterSnpnListIsSet; -} -void AccessTokenReq::unsetRequesterSnpnList() -{ - m_RequesterSnpnListIsSet = false; -} -PlmnId AccessTokenReq::getTargetPlmn() const -{ - return m_TargetPlmn; -} -void AccessTokenReq::setTargetPlmn(PlmnId const& value) -{ - m_TargetPlmn = value; - m_TargetPlmnIsSet = true; -} -bool AccessTokenReq::targetPlmnIsSet() const -{ - return m_TargetPlmnIsSet; -} -void AccessTokenReq::unsetTargetPlmn() -{ - m_TargetPlmnIsSet = false; -} -std::vector<Snssai> AccessTokenReq::getTargetSnssaiList() const -{ - return m_TargetSnssaiList; -} -void AccessTokenReq::setTargetSnssaiList(std::vector<Snssai> const& value) -{ - m_TargetSnssaiList = value; - m_TargetSnssaiListIsSet = true; -} -bool AccessTokenReq::targetSnssaiListIsSet() const -{ - return m_TargetSnssaiListIsSet; -} -void AccessTokenReq::unsetTargetSnssaiList() -{ - m_TargetSnssaiListIsSet = false; -} -std::vector<std::string> AccessTokenReq::getTargetNsiList() const -{ - return m_TargetNsiList; -} -void AccessTokenReq::setTargetNsiList(std::vector<std::string> const& value) -{ - m_TargetNsiList = value; - m_TargetNsiListIsSet = true; -} -bool AccessTokenReq::targetNsiListIsSet() const -{ - return m_TargetNsiListIsSet; -} -void AccessTokenReq::unsetTargetNsiList() -{ - m_TargetNsiListIsSet = false; -} -std::string AccessTokenReq::getTargetNfSetId() const -{ - return m_TargetNfSetId; -} -void AccessTokenReq::setTargetNfSetId(std::string const& value) -{ - m_TargetNfSetId = value; - m_TargetNfSetIdIsSet = true; + { // 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 AccessTokenReq::targetNfSetIdIsSet() const -{ - return m_TargetNfSetIdIsSet; + +bool AccessTokenReq::operator==(const AccessTokenReq& rhs) const { + return + + (getGrantType() == rhs.getGrantType()) && + + (getNfInstanceId() == rhs.getNfInstanceId()) && + + ((!nfTypeIsSet() && !rhs.nfTypeIsSet()) || + (nfTypeIsSet() && rhs.nfTypeIsSet() && + getNfType() == rhs.getNfType())) && + + ((!targetNfTypeIsSet() && !rhs.targetNfTypeIsSet()) || + (targetNfTypeIsSet() && rhs.targetNfTypeIsSet() && + getTargetNfType() == rhs.getTargetNfType())) && + + (getScope() == rhs.getScope()) && + + ((!targetNfInstanceIdIsSet() && !rhs.targetNfInstanceIdIsSet()) || + (targetNfInstanceIdIsSet() && rhs.targetNfInstanceIdIsSet() && + getTargetNfInstanceId() == rhs.getTargetNfInstanceId())) && + + ((!requesterPlmnIsSet() && !rhs.requesterPlmnIsSet()) || + (requesterPlmnIsSet() && rhs.requesterPlmnIsSet() && + getRequesterPlmn() == rhs.getRequesterPlmn())) && + + ((!requesterPlmnListIsSet() && !rhs.requesterPlmnListIsSet()) || + (requesterPlmnListIsSet() && rhs.requesterPlmnListIsSet() && + getRequesterPlmnList() == rhs.getRequesterPlmnList())) && + + ((!requesterSnssaiListIsSet() && !rhs.requesterSnssaiListIsSet()) || + (requesterSnssaiListIsSet() && rhs.requesterSnssaiListIsSet() && + getRequesterSnssaiList() == rhs.getRequesterSnssaiList())) && + + ((!requesterFqdnIsSet() && !rhs.requesterFqdnIsSet()) || + (requesterFqdnIsSet() && rhs.requesterFqdnIsSet() && + getRequesterFqdn() == rhs.getRequesterFqdn())) && + + ((!requesterSnpnListIsSet() && !rhs.requesterSnpnListIsSet()) || + (requesterSnpnListIsSet() && rhs.requesterSnpnListIsSet() && + getRequesterSnpnList() == rhs.getRequesterSnpnList())) && + + ((!targetPlmnIsSet() && !rhs.targetPlmnIsSet()) || + (targetPlmnIsSet() && rhs.targetPlmnIsSet() && + getTargetPlmn() == rhs.getTargetPlmn())) && + + ((!targetSnssaiListIsSet() && !rhs.targetSnssaiListIsSet()) || + (targetSnssaiListIsSet() && rhs.targetSnssaiListIsSet() && + getTargetSnssaiList() == rhs.getTargetSnssaiList())) && + + ((!targetNsiListIsSet() && !rhs.targetNsiListIsSet()) || + (targetNsiListIsSet() && rhs.targetNsiListIsSet() && + getTargetNsiList() == rhs.getTargetNsiList())) && + + ((!targetNfSetIdIsSet() && !rhs.targetNfSetIdIsSet()) || + (targetNfSetIdIsSet() && rhs.targetNfSetIdIsSet() && + getTargetNfSetId() == rhs.getTargetNfSetId())) && + + ((!targetNfServiceSetIdIsSet() && !rhs.targetNfServiceSetIdIsSet()) || + (targetNfServiceSetIdIsSet() && rhs.targetNfServiceSetIdIsSet() && + getTargetNfServiceSetId() == rhs.getTargetNfServiceSetId())) + + ; } -void AccessTokenReq::unsetTargetNfSetId() -{ - m_TargetNfSetIdIsSet = false; + +bool AccessTokenReq::operator!=(const AccessTokenReq& rhs) const { + return !(*this == rhs); } -std::string AccessTokenReq::getTargetNfServiceSetId() const -{ - return m_TargetNfServiceSetId; + +void to_json(nlohmann::json& j, const AccessTokenReq& o) { + j = nlohmann::json(); + j["grant_type"] = o.m_Grant_type; + j["nfInstanceId"] = o.m_NfInstanceId; + if (o.nfTypeIsSet()) j["nfType"] = o.m_NfType; + if (o.targetNfTypeIsSet()) j["targetNfType"] = o.m_TargetNfType; + j["scope"] = o.m_Scope; + if (o.targetNfInstanceIdIsSet()) + j["targetNfInstanceId"] = o.m_TargetNfInstanceId; + if (o.requesterPlmnIsSet()) j["requesterPlmn"] = o.m_RequesterPlmn; + if (o.requesterPlmnListIsSet() || !o.m_RequesterPlmnList.empty()) + j["requesterPlmnList"] = o.m_RequesterPlmnList; + if (o.requesterSnssaiListIsSet() || !o.m_RequesterSnssaiList.empty()) + j["requesterSnssaiList"] = o.m_RequesterSnssaiList; + if (o.requesterFqdnIsSet()) j["requesterFqdn"] = o.m_RequesterFqdn; + if (o.requesterSnpnListIsSet() || !o.m_RequesterSnpnList.empty()) + j["requesterSnpnList"] = o.m_RequesterSnpnList; + if (o.targetPlmnIsSet()) j["targetPlmn"] = o.m_TargetPlmn; + if (o.targetSnssaiListIsSet() || !o.m_TargetSnssaiList.empty()) + j["targetSnssaiList"] = o.m_TargetSnssaiList; + if (o.targetNsiListIsSet() || !o.m_TargetNsiList.empty()) + j["targetNsiList"] = o.m_TargetNsiList; + if (o.targetNfSetIdIsSet()) j["targetNfSetId"] = o.m_TargetNfSetId; + if (o.targetNfServiceSetIdIsSet()) + j["targetNfServiceSetId"] = o.m_TargetNfServiceSetId; } -void AccessTokenReq::setTargetNfServiceSetId(std::string const& value) -{ - m_TargetNfServiceSetId = value; - m_TargetNfServiceSetIdIsSet = true; + +void from_json(const nlohmann::json& j, AccessTokenReq& o) { + j.at("grant_type").get_to(o.m_Grant_type); + j.at("nfInstanceId").get_to(o.m_NfInstanceId); + if (j.find("nfType") != j.end()) { + j.at("nfType").get_to(o.m_NfType); + o.m_NfTypeIsSet = true; + } + if (j.find("targetNfType") != j.end()) { + j.at("targetNfType").get_to(o.m_TargetNfType); + o.m_TargetNfTypeIsSet = true; + } + j.at("scope").get_to(o.m_Scope); + if (j.find("targetNfInstanceId") != j.end()) { + j.at("targetNfInstanceId").get_to(o.m_TargetNfInstanceId); + o.m_TargetNfInstanceIdIsSet = true; + } + if (j.find("requesterPlmn") != j.end()) { + j.at("requesterPlmn").get_to(o.m_RequesterPlmn); + o.m_RequesterPlmnIsSet = true; + } + if (j.find("requesterPlmnList") != j.end()) { + j.at("requesterPlmnList").get_to(o.m_RequesterPlmnList); + o.m_RequesterPlmnListIsSet = true; + } + if (j.find("requesterSnssaiList") != j.end()) { + j.at("requesterSnssaiList").get_to(o.m_RequesterSnssaiList); + o.m_RequesterSnssaiListIsSet = true; + } + if (j.find("requesterFqdn") != j.end()) { + j.at("requesterFqdn").get_to(o.m_RequesterFqdn); + o.m_RequesterFqdnIsSet = true; + } + if (j.find("requesterSnpnList") != j.end()) { + j.at("requesterSnpnList").get_to(o.m_RequesterSnpnList); + o.m_RequesterSnpnListIsSet = true; + } + if (j.find("targetPlmn") != j.end()) { + j.at("targetPlmn").get_to(o.m_TargetPlmn); + o.m_TargetPlmnIsSet = true; + } + if (j.find("targetSnssaiList") != j.end()) { + j.at("targetSnssaiList").get_to(o.m_TargetSnssaiList); + o.m_TargetSnssaiListIsSet = true; + } + if (j.find("targetNsiList") != j.end()) { + j.at("targetNsiList").get_to(o.m_TargetNsiList); + o.m_TargetNsiListIsSet = true; + } + if (j.find("targetNfSetId") != j.end()) { + j.at("targetNfSetId").get_to(o.m_TargetNfSetId); + o.m_TargetNfSetIdIsSet = true; + } + if (j.find("targetNfServiceSetId") != j.end()) { + j.at("targetNfServiceSetId").get_to(o.m_TargetNfServiceSetId); + o.m_TargetNfServiceSetIdIsSet = true; + } } -bool AccessTokenReq::targetNfServiceSetIdIsSet() const -{ - return m_TargetNfServiceSetIdIsSet; + +std::string AccessTokenReq::getGrantType() const { + return m_Grant_type; } -void AccessTokenReq::unsetTargetNfServiceSetId() -{ - m_TargetNfServiceSetIdIsSet = false; +void AccessTokenReq::setGrantType(std::string const& value) { + m_Grant_type = value; +} +std::string AccessTokenReq::getNfInstanceId() const { + return m_NfInstanceId; +} +void AccessTokenReq::setNfInstanceId(std::string const& value) { + m_NfInstanceId = value; +} +NFType AccessTokenReq::getNfType() const { + return m_NfType; +} +void AccessTokenReq::setNfType(NFType const& value) { + m_NfType = value; + m_NfTypeIsSet = true; +} +bool AccessTokenReq::nfTypeIsSet() const { + return m_NfTypeIsSet; +} +void AccessTokenReq::unsetNfType() { + m_NfTypeIsSet = false; +} +NFType AccessTokenReq::getTargetNfType() const { + return m_TargetNfType; +} +void AccessTokenReq::setTargetNfType(NFType const& value) { + m_TargetNfType = value; + m_TargetNfTypeIsSet = true; +} +bool AccessTokenReq::targetNfTypeIsSet() const { + return m_TargetNfTypeIsSet; +} +void AccessTokenReq::unsetTargetNfType() { + m_TargetNfTypeIsSet = false; +} +std::string AccessTokenReq::getScope() const { + return m_Scope; +} +void AccessTokenReq::setScope(std::string const& value) { + m_Scope = value; +} +std::string AccessTokenReq::getTargetNfInstanceId() const { + return m_TargetNfInstanceId; +} +void AccessTokenReq::setTargetNfInstanceId(std::string const& value) { + m_TargetNfInstanceId = value; + m_TargetNfInstanceIdIsSet = true; +} +bool AccessTokenReq::targetNfInstanceIdIsSet() const { + return m_TargetNfInstanceIdIsSet; +} +void AccessTokenReq::unsetTargetNfInstanceId() { + m_TargetNfInstanceIdIsSet = false; +} +PlmnId AccessTokenReq::getRequesterPlmn() const { + return m_RequesterPlmn; +} +void AccessTokenReq::setRequesterPlmn(PlmnId const& value) { + m_RequesterPlmn = value; + m_RequesterPlmnIsSet = true; +} +bool AccessTokenReq::requesterPlmnIsSet() const { + return m_RequesterPlmnIsSet; +} +void AccessTokenReq::unsetRequesterPlmn() { + m_RequesterPlmnIsSet = false; +} +std::vector<PlmnId> AccessTokenReq::getRequesterPlmnList() const { + return m_RequesterPlmnList; +} +void AccessTokenReq::setRequesterPlmnList(std::vector<PlmnId> const& value) { + m_RequesterPlmnList = value; + m_RequesterPlmnListIsSet = true; +} +bool AccessTokenReq::requesterPlmnListIsSet() const { + return m_RequesterPlmnListIsSet; +} +void AccessTokenReq::unsetRequesterPlmnList() { + m_RequesterPlmnListIsSet = false; +} +std::vector<Snssai> AccessTokenReq::getRequesterSnssaiList() const { + return m_RequesterSnssaiList; +} +void AccessTokenReq::setRequesterSnssaiList(std::vector<Snssai> const& value) { + m_RequesterSnssaiList = value; + m_RequesterSnssaiListIsSet = true; +} +bool AccessTokenReq::requesterSnssaiListIsSet() const { + return m_RequesterSnssaiListIsSet; +} +void AccessTokenReq::unsetRequesterSnssaiList() { + m_RequesterSnssaiListIsSet = false; +} +std::string AccessTokenReq::getRequesterFqdn() const { + return m_RequesterFqdn; +} +void AccessTokenReq::setRequesterFqdn(std::string const& value) { + m_RequesterFqdn = value; + m_RequesterFqdnIsSet = true; +} +bool AccessTokenReq::requesterFqdnIsSet() const { + return m_RequesterFqdnIsSet; +} +void AccessTokenReq::unsetRequesterFqdn() { + m_RequesterFqdnIsSet = false; +} +std::vector<PlmnIdNid> AccessTokenReq::getRequesterSnpnList() const { + return m_RequesterSnpnList; +} +void AccessTokenReq::setRequesterSnpnList(std::vector<PlmnIdNid> const& value) { + m_RequesterSnpnList = value; + m_RequesterSnpnListIsSet = true; +} +bool AccessTokenReq::requesterSnpnListIsSet() const { + return m_RequesterSnpnListIsSet; +} +void AccessTokenReq::unsetRequesterSnpnList() { + m_RequesterSnpnListIsSet = false; +} +PlmnId AccessTokenReq::getTargetPlmn() const { + return m_TargetPlmn; +} +void AccessTokenReq::setTargetPlmn(PlmnId const& value) { + m_TargetPlmn = value; + m_TargetPlmnIsSet = true; +} +bool AccessTokenReq::targetPlmnIsSet() const { + return m_TargetPlmnIsSet; +} +void AccessTokenReq::unsetTargetPlmn() { + m_TargetPlmnIsSet = false; +} +std::vector<Snssai> AccessTokenReq::getTargetSnssaiList() const { + return m_TargetSnssaiList; +} +void AccessTokenReq::setTargetSnssaiList(std::vector<Snssai> const& value) { + m_TargetSnssaiList = value; + m_TargetSnssaiListIsSet = true; +} +bool AccessTokenReq::targetSnssaiListIsSet() const { + return m_TargetSnssaiListIsSet; +} +void AccessTokenReq::unsetTargetSnssaiList() { + m_TargetSnssaiListIsSet = false; +} +std::vector<std::string> AccessTokenReq::getTargetNsiList() const { + return m_TargetNsiList; +} +void AccessTokenReq::setTargetNsiList(std::vector<std::string> const& value) { + m_TargetNsiList = value; + m_TargetNsiListIsSet = true; +} +bool AccessTokenReq::targetNsiListIsSet() const { + return m_TargetNsiListIsSet; +} +void AccessTokenReq::unsetTargetNsiList() { + m_TargetNsiListIsSet = false; +} +std::string AccessTokenReq::getTargetNfSetId() const { + return m_TargetNfSetId; +} +void AccessTokenReq::setTargetNfSetId(std::string const& value) { + m_TargetNfSetId = value; + m_TargetNfSetIdIsSet = true; +} +bool AccessTokenReq::targetNfSetIdIsSet() const { + return m_TargetNfSetIdIsSet; +} +void AccessTokenReq::unsetTargetNfSetId() { + m_TargetNfSetIdIsSet = false; +} +std::string AccessTokenReq::getTargetNfServiceSetId() const { + return m_TargetNfServiceSetId; +} +void AccessTokenReq::setTargetNfServiceSetId(std::string const& value) { + m_TargetNfServiceSetId = value; + m_TargetNfServiceSetIdIsSet = true; +} +bool AccessTokenReq::targetNfServiceSetIdIsSet() const { + return m_TargetNfServiceSetIdIsSet; +} +void AccessTokenReq::unsetTargetNfServiceSetId() { + m_TargetNfServiceSetIdIsSet = false; } - } // namespace model } // namespace pcf diff --git a/src/api-server/model/AccessTokenReq.h b/src/api-server/model/AccessTokenReq.h index ad7bf61..427d9f1 100755 --- a/src/api-server/model/AccessTokenReq.h +++ b/src/api-server/model/AccessTokenReq.h @@ -1,14 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * AccessTokenReq.h * @@ -18,7 +19,6 @@ #ifndef AccessTokenReq_H_ #define AccessTokenReq_H_ - #include "NFType.h" #include "PlmnIdNid.h" #include <string> @@ -34,179 +34,178 @@ namespace model { /// <summary> /// Contains information related to the access token request /// </summary> -class AccessTokenReq -{ -public: - AccessTokenReq(); - virtual ~AccessTokenReq() = default; - - - /// <summary> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() const; - - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; - - /// <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 AccessTokenReq& rhs) const; - bool operator!=(const AccessTokenReq& rhs) const; - - ///////////////////////////////////////////// - /// AccessTokenReq members - - /// <summary> - /// - /// </summary> - std::string getGrantType() const; - void setGrantType(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getNfInstanceId() const; - void setNfInstanceId(std::string const& value); - /// <summary> - /// - /// </summary> - NFType getNfType() const; - void setNfType(NFType const& value); - bool nfTypeIsSet() const; - void unsetNfType(); - /// <summary> - /// - /// </summary> - NFType getTargetNfType() const; - void setTargetNfType(NFType const& value); - bool targetNfTypeIsSet() const; - void unsetTargetNfType(); - /// <summary> - /// - /// </summary> - std::string getScope() const; - void setScope(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getTargetNfInstanceId() const; - void setTargetNfInstanceId(std::string const& value); - bool targetNfInstanceIdIsSet() const; - void unsetTargetNfInstanceId(); - /// <summary> - /// - /// </summary> - PlmnId getRequesterPlmn() const; - void setRequesterPlmn(PlmnId const& value); - bool requesterPlmnIsSet() const; - void unsetRequesterPlmn(); - /// <summary> - /// - /// </summary> - std::vector<PlmnId> getRequesterPlmnList() const; - void setRequesterPlmnList(std::vector<PlmnId> const& value); - bool requesterPlmnListIsSet() const; - void unsetRequesterPlmnList(); - /// <summary> - /// - /// </summary> - std::vector<Snssai> getRequesterSnssaiList() const; - void setRequesterSnssaiList(std::vector<Snssai> const& value); - bool requesterSnssaiListIsSet() const; - void unsetRequesterSnssaiList(); - /// <summary> - /// Fully Qualified Domain Name - /// </summary> - std::string getRequesterFqdn() const; - void setRequesterFqdn(std::string const& value); - bool requesterFqdnIsSet() const; - void unsetRequesterFqdn(); - /// <summary> - /// - /// </summary> - std::vector<PlmnIdNid> getRequesterSnpnList() const; - void setRequesterSnpnList(std::vector<PlmnIdNid> const& value); - bool requesterSnpnListIsSet() const; - void unsetRequesterSnpnList(); - /// <summary> - /// - /// </summary> - PlmnId getTargetPlmn() const; - void setTargetPlmn(PlmnId const& value); - bool targetPlmnIsSet() const; - void unsetTargetPlmn(); - /// <summary> - /// - /// </summary> - std::vector<Snssai> getTargetSnssaiList() const; - void setTargetSnssaiList(std::vector<Snssai> const& value); - bool targetSnssaiListIsSet() const; - void unsetTargetSnssaiList(); - /// <summary> - /// - /// </summary> - std::vector<std::string> getTargetNsiList() const; - void setTargetNsiList(std::vector<std::string> const& value); - bool targetNsiListIsSet() const; - void unsetTargetNsiList(); - /// <summary> - /// - /// </summary> - std::string getTargetNfSetId() const; - void setTargetNfSetId(std::string const& value); - bool targetNfSetIdIsSet() const; - void unsetTargetNfSetId(); - /// <summary> - /// - /// </summary> - std::string getTargetNfServiceSetId() const; - void setTargetNfServiceSetId(std::string const& value); - bool targetNfServiceSetIdIsSet() const; - void unsetTargetNfServiceSetId(); - - friend void to_json(nlohmann::json& j, const AccessTokenReq& o); - friend void from_json(const nlohmann::json& j, AccessTokenReq& o); -protected: - std::string m_Grant_type; - - std::string m_NfInstanceId; - - NFType m_NfType; - bool m_NfTypeIsSet; - NFType m_TargetNfType; - bool m_TargetNfTypeIsSet; - std::string m_Scope; - - std::string m_TargetNfInstanceId; - bool m_TargetNfInstanceIdIsSet; - PlmnId m_RequesterPlmn; - bool m_RequesterPlmnIsSet; - std::vector<PlmnId> m_RequesterPlmnList; - bool m_RequesterPlmnListIsSet; - std::vector<Snssai> m_RequesterSnssaiList; - bool m_RequesterSnssaiListIsSet; - std::string m_RequesterFqdn; - bool m_RequesterFqdnIsSet; - std::vector<PlmnIdNid> m_RequesterSnpnList; - bool m_RequesterSnpnListIsSet; - PlmnId m_TargetPlmn; - bool m_TargetPlmnIsSet; - std::vector<Snssai> m_TargetSnssaiList; - bool m_TargetSnssaiListIsSet; - std::vector<std::string> m_TargetNsiList; - bool m_TargetNsiListIsSet; - std::string m_TargetNfSetId; - bool m_TargetNfSetIdIsSet; - std::string m_TargetNfServiceSetId; - bool m_TargetNfServiceSetIdIsSet; - +class AccessTokenReq { + public: + AccessTokenReq(); + virtual ~AccessTokenReq() = default; + + /// <summary> + /// Validate the current data in the model. Throws a ValidationException on + /// failure. + /// </summary> + void validate() const; + + /// <summary> + /// Validate the current data in the model. Returns false on error and writes + /// an error message into the given stringstream. + /// </summary> + bool validate(std::stringstream& msg) const; + + /// <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 AccessTokenReq& rhs) const; + bool operator!=(const AccessTokenReq& rhs) const; + + ///////////////////////////////////////////// + /// AccessTokenReq members + + /// <summary> + /// + /// </summary> + std::string getGrantType() const; + void setGrantType(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getNfInstanceId() const; + void setNfInstanceId(std::string const& value); + /// <summary> + /// + /// </summary> + NFType getNfType() const; + void setNfType(NFType const& value); + bool nfTypeIsSet() const; + void unsetNfType(); + /// <summary> + /// + /// </summary> + NFType getTargetNfType() const; + void setTargetNfType(NFType const& value); + bool targetNfTypeIsSet() const; + void unsetTargetNfType(); + /// <summary> + /// + /// </summary> + std::string getScope() const; + void setScope(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getTargetNfInstanceId() const; + void setTargetNfInstanceId(std::string const& value); + bool targetNfInstanceIdIsSet() const; + void unsetTargetNfInstanceId(); + /// <summary> + /// + /// </summary> + PlmnId getRequesterPlmn() const; + void setRequesterPlmn(PlmnId const& value); + bool requesterPlmnIsSet() const; + void unsetRequesterPlmn(); + /// <summary> + /// + /// </summary> + std::vector<PlmnId> getRequesterPlmnList() const; + void setRequesterPlmnList(std::vector<PlmnId> const& value); + bool requesterPlmnListIsSet() const; + void unsetRequesterPlmnList(); + /// <summary> + /// + /// </summary> + std::vector<Snssai> getRequesterSnssaiList() const; + void setRequesterSnssaiList(std::vector<Snssai> const& value); + bool requesterSnssaiListIsSet() const; + void unsetRequesterSnssaiList(); + /// <summary> + /// Fully Qualified Domain Name + /// </summary> + std::string getRequesterFqdn() const; + void setRequesterFqdn(std::string const& value); + bool requesterFqdnIsSet() const; + void unsetRequesterFqdn(); + /// <summary> + /// + /// </summary> + std::vector<PlmnIdNid> getRequesterSnpnList() const; + void setRequesterSnpnList(std::vector<PlmnIdNid> const& value); + bool requesterSnpnListIsSet() const; + void unsetRequesterSnpnList(); + /// <summary> + /// + /// </summary> + PlmnId getTargetPlmn() const; + void setTargetPlmn(PlmnId const& value); + bool targetPlmnIsSet() const; + void unsetTargetPlmn(); + /// <summary> + /// + /// </summary> + std::vector<Snssai> getTargetSnssaiList() const; + void setTargetSnssaiList(std::vector<Snssai> const& value); + bool targetSnssaiListIsSet() const; + void unsetTargetSnssaiList(); + /// <summary> + /// + /// </summary> + std::vector<std::string> getTargetNsiList() const; + void setTargetNsiList(std::vector<std::string> const& value); + bool targetNsiListIsSet() const; + void unsetTargetNsiList(); + /// <summary> + /// + /// </summary> + std::string getTargetNfSetId() const; + void setTargetNfSetId(std::string const& value); + bool targetNfSetIdIsSet() const; + void unsetTargetNfSetId(); + /// <summary> + /// + /// </summary> + std::string getTargetNfServiceSetId() const; + void setTargetNfServiceSetId(std::string const& value); + bool targetNfServiceSetIdIsSet() const; + void unsetTargetNfServiceSetId(); + + friend void to_json(nlohmann::json& j, const AccessTokenReq& o); + friend void from_json(const nlohmann::json& j, AccessTokenReq& o); + + protected: + std::string m_Grant_type; + + std::string m_NfInstanceId; + + NFType m_NfType; + bool m_NfTypeIsSet; + NFType m_TargetNfType; + bool m_TargetNfTypeIsSet; + std::string m_Scope; + + std::string m_TargetNfInstanceId; + bool m_TargetNfInstanceIdIsSet; + PlmnId m_RequesterPlmn; + bool m_RequesterPlmnIsSet; + std::vector<PlmnId> m_RequesterPlmnList; + bool m_RequesterPlmnListIsSet; + std::vector<Snssai> m_RequesterSnssaiList; + bool m_RequesterSnssaiListIsSet; + std::string m_RequesterFqdn; + bool m_RequesterFqdnIsSet; + std::vector<PlmnIdNid> m_RequesterSnpnList; + bool m_RequesterSnpnListIsSet; + PlmnId m_TargetPlmn; + bool m_TargetPlmnIsSet; + std::vector<Snssai> m_TargetSnssaiList; + bool m_TargetSnssaiListIsSet; + std::vector<std::string> m_TargetNsiList; + bool m_TargetNsiListIsSet; + std::string m_TargetNfSetId; + bool m_TargetNfSetIdIsSet; + std::string m_TargetNfServiceSetId; + bool m_TargetNfServiceSetIdIsSet; }; } // namespace model diff --git a/src/api-server/model/AccessType.cpp b/src/api-server/model/AccessType.cpp index cf35678..dcddb0a 100755 --- a/src/api-server/model/AccessType.cpp +++ b/src/api-server/model/AccessType.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "AccessType.h" #include "Helpers.h" @@ -20,97 +20,80 @@ namespace oai { namespace pcf { namespace model { -AccessType::AccessType() -{ - -} +AccessType::AccessType() {} -void AccessType::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void AccessType::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool AccessType::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool AccessType::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool AccessType::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "AccessType" : pathPrefix; +bool AccessType::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "AccessType" : pathPrefix; - - if (m_value == AccessType::eAccessType::INVALID_VALUE_OPENAPI_GENERATED) - { - success = false; - msg << _pathPrefix << ": has no value;"; - } + if (m_value == AccessType::eAccessType::INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + return success; } -bool AccessType::operator==(const AccessType& rhs) const -{ - return - getValue() == rhs.getValue() - - ; -} +bool AccessType::operator==(const AccessType& rhs) const { + return getValue() == rhs.getValue() -bool AccessType::operator!=(const AccessType& rhs) const -{ - return !(*this == rhs); + ; } -void to_json(nlohmann::json& j, const AccessType& o) -{ - j = nlohmann::json(); - - switch (o.getValue()) - { - case AccessType::eAccessType::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case AccessType::eAccessType::_3GPP_ACCESS: - j = "3GPP_ACCESS"; - break; - case AccessType::eAccessType::NON_3GPP_ACCESS: - j = "NON_3GPP_ACCESS"; - break; - } +bool AccessType::operator!=(const AccessType& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, AccessType& o) -{ - - auto s = j.get<std::string>(); - if (s == "3GPP_ACCESS") { - o.setValue(AccessType::eAccessType::_3GPP_ACCESS); - } - else if (s == "NON_3GPP_ACCESS") { - o.setValue(AccessType::eAccessType::NON_3GPP_ACCESS); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " AccessType::eAccessType"; - throw std::invalid_argument(ss.str()); - } +void to_json(nlohmann::json& j, const AccessType& o) { + j = nlohmann::json(); + + switch (o.getValue()) { + case AccessType::eAccessType::INVALID_VALUE_OPENAPI_GENERATED: + j = "INVALID_VALUE_OPENAPI_GENERATED"; + break; + case AccessType::eAccessType::_3GPP_ACCESS: + j = "3GPP_ACCESS"; + break; + case AccessType::eAccessType::NON_3GPP_ACCESS: + j = "NON_3GPP_ACCESS"; + break; + } +} +void from_json(const nlohmann::json& j, AccessType& o) { + auto s = j.get<std::string>(); + if (s == "3GPP_ACCESS") { + o.setValue(AccessType::eAccessType::_3GPP_ACCESS); + } else if (s == "NON_3GPP_ACCESS") { + o.setValue(AccessType::eAccessType::NON_3GPP_ACCESS); + } else { + std::stringstream ss; + ss << "Unexpected value " << s << " in json" + << " cannot be converted to enum of type" + << " AccessType::eAccessType"; + throw std::invalid_argument(ss.str()); + } } -AccessType::eAccessType AccessType::getValue() const -{ - return m_value; +AccessType::eAccessType AccessType::getValue() const { + return m_value; } -void AccessType::setValue(AccessType::eAccessType value) -{ - m_value = value; +void AccessType::setValue(AccessType::eAccessType value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/AccessType.h b/src/api-server/model/AccessType.h index 9e5e809..2a520d9 100755 --- a/src/api-server/model/AccessType.h +++ b/src/api-server/model/AccessType.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * AccessType.h * - * + * */ #ifndef AccessType_H_ #define AccessType_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,53 +26,55 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class AccessType -{ -public: - AccessType(); - virtual ~AccessType() = default; +class AccessType { + public: + AccessType(); + virtual ~AccessType() = default; - enum class eAccessType { + enum class eAccessType { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - _3GPP_ACCESS, + _3GPP_ACCESS, NON_3GPP_ACCESS - }; + }; + + /// <summary> + /// Validate the current data in the model. Throws a ValidationException on + /// failure. + /// </summary> + void validate() const; + + /// <summary> + /// Validate the current data in the model. Returns false on error and writes + /// an error message into the given stringstream. + /// </summary> + bool validate(std::stringstream& msg) const; - /// <summary> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const AccessType& rhs) const; + bool operator!=(const AccessType& rhs) const; - /// <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; + ///////////////////////////////////////////// + /// AccessType members - bool operator==(const AccessType& rhs) const; - bool operator!=(const AccessType& rhs) const; + AccessType::eAccessType getValue() const; + void setValue(AccessType::eAccessType value); - ///////////////////////////////////////////// - /// AccessType members + friend void to_json(nlohmann::json& j, const AccessType& o); + friend void from_json(const nlohmann::json& j, AccessType& o); - AccessType::eAccessType getValue() const; - void setValue(AccessType::eAccessType value); - - friend void to_json(nlohmann::json& j, const AccessType& o); - friend void from_json(const nlohmann::json& j, AccessType& o); -protected: - AccessType::eAccessType m_value = AccessType::eAccessType::INVALID_VALUE_OPENAPI_GENERATED; + protected: + AccessType::eAccessType m_value = + AccessType::eAccessType::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/AccuUsageReport.cpp b/src/api-server/model/AccuUsageReport.cpp index 5697baf..0f621a5 100755 --- a/src/api-server/model/AccuUsageReport.cpp +++ b/src/api-server/model/AccuUsageReport.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,389 +20,312 @@ 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()); - } +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 { + 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; +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 (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 (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 (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 (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 (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;"; - } + } + 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; + } + + return success; } -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::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); } -bool AccuUsageReport::nextVolUsageDownlinkIsSet() const -{ - return m_NextVolUsageDownlinkIsSet; + +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 AccuUsageReport::unsetNextVolUsageDownlink() -{ - m_NextVolUsageDownlinkIsSet = false; + +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; + } } -int32_t AccuUsageReport::getNextTimeUsage() const -{ - return m_NextTimeUsage; + +std::string AccuUsageReport::getRefUmIds() const { + return m_RefUmIds; } -void AccuUsageReport::setNextTimeUsage(int32_t const value) -{ - m_NextTimeUsage = value; - m_NextTimeUsageIsSet = true; +void AccuUsageReport::setRefUmIds(std::string const& value) { + m_RefUmIds = value; } -bool AccuUsageReport::nextTimeUsageIsSet() const -{ - return m_NextTimeUsageIsSet; +int64_t AccuUsageReport::getVolUsage() const { + return m_VolUsage; } -void AccuUsageReport::unsetNextTimeUsage() -{ - m_NextTimeUsageIsSet = false; +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 diff --git a/src/api-server/model/AccuUsageReport.h b/src/api-server/model/AccuUsageReport.h index 5ba6a39..7a04d80 100755 --- a/src/api-server/model/AccuUsageReport.h +++ b/src/api-server/model/AccuUsageReport.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,122 +27,122 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class AccuUsageReport -{ -public: - AccuUsageReport(); - virtual ~AccuUsageReport() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const AccuUsageReport& rhs) const; - bool operator!=(const AccuUsageReport& rhs) const; + ///////////////////////////////////////////// + /// AccuUsageReport members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; + 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; - + 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 diff --git a/src/api-server/model/AdditionalAccessInfo.cpp b/src/api-server/model/AdditionalAccessInfo.cpp index 7603642..13864f0 100755 --- a/src/api-server/model/AdditionalAccessInfo.cpp +++ b/src/api-server/model/AdditionalAccessInfo.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,101 +20,81 @@ namespace oai { namespace pcf { namespace model { -AdditionalAccessInfo::AdditionalAccessInfo() -{ - m_RatTypeIsSet = false; - +AdditionalAccessInfo::AdditionalAccessInfo() { + m_RatTypeIsSet = false; } -void AdditionalAccessInfo::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +bool AdditionalAccessInfo::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "AdditionalAccessInfo" : pathPrefix; - - return success; + 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 + + (getAccessType() == rhs.getAccessType()) && + + ((!ratTypeIsSet() && !rhs.ratTypeIsSet()) || + (ratTypeIsSet() && rhs.ratTypeIsSet() && + getRatType() == rhs.getRatType())) + + ; } -bool AdditionalAccessInfo::operator!=(const AdditionalAccessInfo& rhs) const -{ - return !(*this == rhs); +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 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; - } - +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; +AccessType AdditionalAccessInfo::getAccessType() const { + return m_AccessType; } -void AdditionalAccessInfo::setAccessType(AccessType const& value) -{ - m_AccessType = value; +void AdditionalAccessInfo::setAccessType(AccessType const& value) { + m_AccessType = value; } -RatType AdditionalAccessInfo::getRatType() const -{ - return m_RatType; +RatType AdditionalAccessInfo::getRatType() const { + return m_RatType; } -void AdditionalAccessInfo::setRatType(RatType const& value) -{ - m_RatType = value; - m_RatTypeIsSet = true; +void AdditionalAccessInfo::setRatType(RatType const& value) { + m_RatType = value; + m_RatTypeIsSet = true; } -bool AdditionalAccessInfo::ratTypeIsSet() const -{ - return m_RatTypeIsSet; +bool AdditionalAccessInfo::ratTypeIsSet() const { + return m_RatTypeIsSet; } -void AdditionalAccessInfo::unsetRatType() -{ - m_RatTypeIsSet = false; +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 index b9d8880..f6c9742 100755 --- a/src/api-server/model/AdditionalAccessInfo.h +++ b/src/api-server/model/AdditionalAccessInfo.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,59 +28,58 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class AdditionalAccessInfo -{ -public: - AdditionalAccessInfo(); - virtual ~AdditionalAccessInfo() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const AdditionalAccessInfo& rhs) const; - bool operator!=(const AdditionalAccessInfo& rhs) const; + ///////////////////////////////////////////// + /// AdditionalAccessInfo members - ///////////////////////////////////////////// - /// AdditionalAccessInfo members + /// <summary> + /// + /// </summary> + AccessType getAccessType() const; + void setAccessType(AccessType const& value); + /// <summary> + /// + /// </summary> + RatType getRatType() const; + void setRatType(RatType const& value); + bool ratTypeIsSet() const; + void unsetRatType(); - /// <summary> - /// - /// </summary> - AccessType getAccessType() const; - void setAccessType(AccessType const& value); - /// <summary> - /// - /// </summary> - RatType getRatType() const; - void setRatType(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); - friend void to_json(nlohmann::json& j, const AdditionalAccessInfo& o); - friend void from_json(const nlohmann::json& j, AdditionalAccessInfo& o); -protected: - AccessType m_AccessType; + protected: + AccessType m_AccessType; - RatType m_RatType; - bool m_RatTypeIsSet; - + RatType m_RatType; + bool m_RatTypeIsSet; }; } // namespace model diff --git a/src/api-server/model/AfSigProtocol.cpp b/src/api-server/model/AfSigProtocol.cpp index 458c55c..60b9ee0 100755 --- a/src/api-server/model/AfSigProtocol.cpp +++ b/src/api-server/model/AfSigProtocol.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,59 +20,46 @@ namespace oai { namespace pcf { namespace model { -AfSigProtocol::AfSigProtocol() -{ - -} +AfSigProtocol::AfSigProtocol() {} -void AfSigProtocol::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +bool AfSigProtocol::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "AfSigProtocol" : pathPrefix; - - return success; + return success; } // bool AfSigProtocol::operator==(const AfSigProtocol& rhs) const // { // return - + // getValue() == rhs.getValue() // ; // } -bool AfSigProtocol::operator!=(const AfSigProtocol& rhs) const -{ - return !(*this == rhs); +bool AfSigProtocol::operator!=(const AfSigProtocol& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const AfSigProtocol& o) -{ - j = nlohmann::json(); - +void to_json(nlohmann::json& j, const AfSigProtocol& o) { + j = nlohmann::json(); } -void from_json(const nlohmann::json& j, AfSigProtocol& o) -{ - -} - - +void from_json(const nlohmann::json& j, AfSigProtocol& o) {} } // namespace model } // namespace pcf diff --git a/src/api-server/model/AfSigProtocol.h b/src/api-server/model/AfSigProtocol.h index c096cfa..a0457c4 100755 --- a/src/api-server/model/AfSigProtocol.h +++ b/src/api-server/model/AfSigProtocol.h @@ -1,24 +1,26 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -28,43 +30,43 @@ 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. +/// 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; - +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. 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> + /// 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; + /// <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; + bool operator==(const AfSigProtocol& rhs) const; + bool operator!=(const AfSigProtocol& rhs) const; - ///////////////////////////////////////////// - /// AfSigProtocol members + ///////////////////////////////////////////// + /// AfSigProtocol members + friend void to_json(nlohmann::json& j, const AfSigProtocol& o); + friend void from_json(const nlohmann::json& j, AfSigProtocol& o); - friend void to_json(nlohmann::json& j, const AfSigProtocol& o); - friend void from_json(const nlohmann::json& j, AfSigProtocol& o); -protected: - + protected: }; } // namespace model diff --git a/src/api-server/model/AfSigProtocol_anyOf.cpp b/src/api-server/model/AfSigProtocol_anyOf.cpp index 7b1a2ef..8c2d8ce 100755 --- a/src/api-server/model/AfSigProtocol_anyOf.cpp +++ b/src/api-server/model/AfSigProtocol_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,97 +20,84 @@ namespace oai { namespace pcf { namespace model { -AfSigProtocol_anyOf::AfSigProtocol_anyOf() -{ - -} +AfSigProtocol_anyOf::AfSigProtocol_anyOf() {} -void AfSigProtocol_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == AfSigProtocol_anyOf::eAfSigProtocol_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool AfSigProtocol_anyOf::operator!=(const AfSigProtocol_anyOf& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, AfSigProtocol_anyOf& o) -{ - - 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 { - 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()); - } +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; + } +} +void from_json(const nlohmann::json& j, AfSigProtocol_anyOf& o) { + 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 { + 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; +AfSigProtocol_anyOf::eAfSigProtocol_anyOf AfSigProtocol_anyOf::getValue() + const { + return m_value; } -void AfSigProtocol_anyOf::setValue(AfSigProtocol_anyOf::eAfSigProtocol_anyOf value) -{ - m_value = value; +void AfSigProtocol_anyOf::setValue( + AfSigProtocol_anyOf::eAfSigProtocol_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/AfSigProtocol_anyOf.h b/src/api-server/model/AfSigProtocol_anyOf.h index bdc8b3b..7d9e0bf 100755 --- a/src/api-server/model/AfSigProtocol_anyOf.h +++ b/src/api-server/model/AfSigProtocol_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,53 +26,55 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class AfSigProtocol_anyOf -{ -public: - AfSigProtocol_anyOf(); - virtual ~AfSigProtocol_anyOf() = default; +class AfSigProtocol_anyOf { + public: + AfSigProtocol_anyOf(); + virtual ~AfSigProtocol_anyOf() = default; - enum class eAfSigProtocol_anyOf { + enum class eAfSigProtocol_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - NO_INFORMATION, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const AfSigProtocol_anyOf& rhs) const; + bool operator!=(const AfSigProtocol_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// AfSigProtocol_anyOf members - bool operator==(const AfSigProtocol_anyOf& rhs) const; - bool operator!=(const AfSigProtocol_anyOf& rhs) const; + AfSigProtocol_anyOf::eAfSigProtocol_anyOf getValue() const; + void setValue(AfSigProtocol_anyOf::eAfSigProtocol_anyOf value); - ///////////////////////////////////////////// - /// AfSigProtocol_anyOf members + friend void to_json(nlohmann::json& j, const AfSigProtocol_anyOf& o); + friend void from_json(const nlohmann::json& j, AfSigProtocol_anyOf& o); - 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; + protected: + AfSigProtocol_anyOf::eAfSigProtocol_anyOf m_value = AfSigProtocol_anyOf:: + eAfSigProtocol_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/Ambr.cpp b/src/api-server/model/Ambr.cpp index 4c728f5..80ccaa4 100755 --- a/src/api-server/model/Ambr.cpp +++ b/src/api-server/model/Ambr.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "Ambr.h" #include "Helpers.h" @@ -20,106 +20,79 @@ namespace oai { namespace pcf { namespace model { -Ambr::Ambr() -{ - m_Uplink = ""; - m_Downlink = ""; - +Ambr::Ambr() { + m_Uplink = ""; + m_Downlink = ""; } -void Ambr::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void Ambr::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool Ambr::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool Ambr::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool Ambr::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "Ambr" : pathPrefix; - - - - /* Uplink */ { - const std::string& value = m_Uplink; - const std::string currentValuePath = _pathPrefix + ".uplink"; - - - - } - - - /* Downlink */ { - const std::string& value = m_Downlink; - const std::string currentValuePath = _pathPrefix + ".downlink"; - - - - } - - return success; +bool Ambr::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "Ambr" : pathPrefix; + + /* Uplink */ { + const std::string& value = m_Uplink; + const std::string currentValuePath = _pathPrefix + ".uplink"; + } + + /* Downlink */ { + const std::string& value = m_Downlink; + const std::string currentValuePath = _pathPrefix + ".downlink"; + } + + return success; } -bool Ambr::operator==(const Ambr& rhs) const -{ - return - - - (getUplink() == rhs.getUplink()) - && - - (getDownlink() == rhs.getDownlink()) - - - ; +bool Ambr::operator==(const Ambr& rhs) const { + return + + (getUplink() == rhs.getUplink()) && + + (getDownlink() == rhs.getDownlink()) + + ; } -bool Ambr::operator!=(const Ambr& rhs) const -{ - return !(*this == rhs); +bool Ambr::operator!=(const Ambr& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const Ambr& o) -{ - j = nlohmann::json(); - j["uplink"] = o.m_Uplink; - j["downlink"] = o.m_Downlink; - +void to_json(nlohmann::json& j, const Ambr& o) { + j = nlohmann::json(); + j["uplink"] = o.m_Uplink; + j["downlink"] = o.m_Downlink; } -void from_json(const nlohmann::json& j, Ambr& o) -{ - j.at("uplink").get_to(o.m_Uplink); - j.at("downlink").get_to(o.m_Downlink); - +void from_json(const nlohmann::json& j, Ambr& o) { + j.at("uplink").get_to(o.m_Uplink); + j.at("downlink").get_to(o.m_Downlink); } -std::string Ambr::getUplink() const -{ - return m_Uplink; +std::string Ambr::getUplink() const { + return m_Uplink; } -void Ambr::setUplink(std::string const& value) -{ - m_Uplink = value; +void Ambr::setUplink(std::string const& value) { + m_Uplink = value; } -std::string Ambr::getDownlink() const -{ - return m_Downlink; +std::string Ambr::getDownlink() const { + return m_Downlink; } -void Ambr::setDownlink(std::string const& value) -{ - m_Downlink = value; +void Ambr::setDownlink(std::string const& value) { + m_Downlink = value; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/Ambr.h b/src/api-server/model/Ambr.h index f1b7b79..bba39e5 100755 --- a/src/api-server/model/Ambr.h +++ b/src/api-server/model/Ambr.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * Ambr.h * - * + * */ #ifndef Ambr_H_ #define Ambr_H_ - #include <string> #include <nlohmann/json.hpp> @@ -27,57 +27,55 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class Ambr -{ -public: - Ambr(); - virtual ~Ambr() = 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 Ambr& rhs) const; - bool operator!=(const Ambr& rhs) const; - - ///////////////////////////////////////////// - /// Ambr members - - /// <summary> - /// - /// </summary> - std::string getUplink() const; - void setUplink(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getDownlink() const; - void setDownlink(std::string const& value); - - friend void to_json(nlohmann::json& j, const Ambr& o); - friend void from_json(const nlohmann::json& j, Ambr& o); -protected: - std::string m_Uplink; - - std::string m_Downlink; - - +class Ambr { + public: + Ambr(); + virtual ~Ambr() = 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 Ambr& rhs) const; + bool operator!=(const Ambr& rhs) const; + + ///////////////////////////////////////////// + /// Ambr members + + /// <summary> + /// + /// </summary> + std::string getUplink() const; + void setUplink(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getDownlink() const; + void setDownlink(std::string const& value); + + friend void to_json(nlohmann::json& j, const Ambr& o); + friend void from_json(const nlohmann::json& j, Ambr& o); + + protected: + std::string m_Uplink; + + std::string m_Downlink; }; } // namespace model diff --git a/src/api-server/model/AnGwAddress.cpp b/src/api-server/model/AnGwAddress.cpp index df89fc0..61c5305 100755 --- a/src/api-server/model/AnGwAddress.cpp +++ b/src/api-server/model/AnGwAddress.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,125 +20,99 @@ namespace oai { namespace pcf { namespace model { -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; +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 diff --git a/src/api-server/model/AnGwAddress.h b/src/api-server/model/AnGwAddress.h index 46cd70f..4baf216 100755 --- a/src/api-server/model/AnGwAddress.h +++ b/src/api-server/model/AnGwAddress.h @@ -1,14 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 * @@ -18,7 +19,6 @@ #ifndef AnGwAddress_H_ #define AnGwAddress_H_ - #include <string> #include "Ipv6Addr.h" #include <nlohmann/json.hpp> @@ -30,59 +30,58 @@ namespace model { /// <summary> /// describes the address of the access network gateway control node /// </summary> -class AnGwAddress -{ -public: - AnGwAddress(); - virtual ~AnGwAddress() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const AnGwAddress& rhs) const; - bool operator!=(const AnGwAddress& rhs) const; + ///////////////////////////////////////////// + /// AnGwAddress members - ///////////////////////////////////////////// - /// AnGwAddress members + /// <summary> + /// + /// </summary> + std::string getAnGwIpv4Addr() const; + void setAnGwIpv4Addr(std::string const& value); + bool anGwIpv4AddrIsSet() const; + void unsetAnGwIpv4Addr(); + /// <summary> + /// + /// </summary> + Ipv6Addr getAnGwIpv6Addr() const; + void setAnGwIpv6Addr(Ipv6Addr const& value); + bool anGwIpv6AddrIsSet() const; + void unsetAnGwIpv6Addr(); - /// <summary> - /// - /// </summary> - std::string getAnGwIpv4Addr() const; - void setAnGwIpv4Addr(std::string const& value); - bool anGwIpv4AddrIsSet() const; - void unsetAnGwIpv4Addr(); - /// <summary> - /// - /// </summary> - Ipv6Addr getAnGwIpv6Addr() const; - void setAnGwIpv6Addr(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); - 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; - Ipv6Addr m_AnGwIpv6Addr; - bool m_AnGwIpv6AddrIsSet; - + protected: + std::string m_AnGwIpv4Addr; + bool m_AnGwIpv4AddrIsSet; + Ipv6Addr m_AnGwIpv6Addr; + bool m_AnGwIpv6AddrIsSet; }; } // namespace model diff --git a/src/api-server/model/AppDetectionInfo.cpp b/src/api-server/model/AppDetectionInfo.cpp index 2160221..0a06c6d 100755 --- a/src/api-server/model/AppDetectionInfo.cpp +++ b/src/api-server/model/AppDetectionInfo.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,156 +20,130 @@ 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()); - } +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++; - } - } +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; + } + + 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 diff --git a/src/api-server/model/AppDetectionInfo.h b/src/api-server/model/AppDetectionInfo.h index ee25f72..c73ea5f 100755 --- a/src/api-server/model/AppDetectionInfo.h +++ b/src/api-server/model/AppDetectionInfo.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -29,68 +29,70 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class AppDetectionInfo -{ -public: - AppDetectionInfo(); - virtual ~AppDetectionInfo() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const AppDetectionInfo& rhs) const; - bool operator!=(const AppDetectionInfo& rhs) const; + ///////////////////////////////////////////// + /// AppDetectionInfo members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; + protected: + std::string m_AppId; - std::string m_InstanceId; - bool m_InstanceIdIsSet; - std::vector<FlowInformation> m_SdfDescriptions; - bool m_SdfDescriptionsIsSet; - + std::string m_InstanceId; + bool m_InstanceIdIsSet; + std::vector<FlowInformation> m_SdfDescriptions; + bool m_SdfDescriptionsIsSet; }; } // namespace model diff --git a/src/api-server/model/Arp.cpp b/src/api-server/model/Arp.cpp index fe4e6b7..bd4aef2 100755 --- a/src/api-server/model/Arp.cpp +++ b/src/api-server/model/Arp.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "Arp.h" #include "Helpers.h" @@ -20,119 +20,92 @@ namespace oai { namespace pcf { namespace model { -Arp::Arp() -{ - m_PriorityLevel = 0; - +Arp::Arp() { + m_PriorityLevel = 0; } -void Arp::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void Arp::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool Arp::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool Arp::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool Arp::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "Arp" : pathPrefix; - - - - /* 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 > 15) - { - success = false; - msg << currentValuePath << ": must be less than or equal to 15;"; - } +bool Arp::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "Arp" : pathPrefix; + + /* 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;"; } - - return success; + if (value > 15) { + success = false; + msg << currentValuePath << ": must be less than or equal to 15;"; + } + } + + return success; } -bool Arp::operator==(const Arp& rhs) const -{ - return - - - (getPriorityLevel() == rhs.getPriorityLevel()) - && - - (getPreemptCap() == rhs.getPreemptCap()) - && - - (getPreemptVuln() == rhs.getPreemptVuln()) - - - ; +bool Arp::operator==(const Arp& rhs) const { + return + + (getPriorityLevel() == rhs.getPriorityLevel()) && + + (getPreemptCap() == rhs.getPreemptCap()) && + + (getPreemptVuln() == rhs.getPreemptVuln()) + + ; } -bool Arp::operator!=(const Arp& rhs) const -{ - return !(*this == rhs); +bool Arp::operator!=(const Arp& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const Arp& o) -{ - j = nlohmann::json(); - j["priorityLevel"] = o.m_PriorityLevel; - j["preemptCap"] = o.m_PreemptCap; - j["preemptVuln"] = o.m_PreemptVuln; - +void to_json(nlohmann::json& j, const Arp& o) { + j = nlohmann::json(); + j["priorityLevel"] = o.m_PriorityLevel; + j["preemptCap"] = o.m_PreemptCap; + j["preemptVuln"] = o.m_PreemptVuln; } -void from_json(const nlohmann::json& j, Arp& o) -{ - j.at("priorityLevel").get_to(o.m_PriorityLevel); - j.at("preemptCap").get_to(o.m_PreemptCap); - j.at("preemptVuln").get_to(o.m_PreemptVuln); - +void from_json(const nlohmann::json& j, Arp& o) { + j.at("priorityLevel").get_to(o.m_PriorityLevel); + j.at("preemptCap").get_to(o.m_PreemptCap); + j.at("preemptVuln").get_to(o.m_PreemptVuln); } -int32_t Arp::getPriorityLevel() const -{ - return m_PriorityLevel; +int32_t Arp::getPriorityLevel() const { + return m_PriorityLevel; } -void Arp::setPriorityLevel(int32_t const value) -{ - m_PriorityLevel = value; +void Arp::setPriorityLevel(int32_t const value) { + m_PriorityLevel = value; } -PreemptionCapability Arp::getPreemptCap() const -{ - return m_PreemptCap; +PreemptionCapability Arp::getPreemptCap() const { + return m_PreemptCap; } -void Arp::setPreemptCap(PreemptionCapability const& value) -{ - m_PreemptCap = value; +void Arp::setPreemptCap(PreemptionCapability const& value) { + m_PreemptCap = value; } -PreemptionVulnerability Arp::getPreemptVuln() const -{ - return m_PreemptVuln; +PreemptionVulnerability Arp::getPreemptVuln() const { + return m_PreemptVuln; } -void Arp::setPreemptVuln(PreemptionVulnerability const& value) -{ - m_PreemptVuln = value; +void Arp::setPreemptVuln(PreemptionVulnerability const& value) { + m_PreemptVuln = value; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/Arp.h b/src/api-server/model/Arp.h index 807ed9f..f9d9b4d 100755 --- a/src/api-server/model/Arp.h +++ b/src/api-server/model/Arp.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * Arp.h * - * + * */ #ifndef Arp_H_ #define Arp_H_ - #include "PreemptionCapability.h" #include "PreemptionVulnerability.h" #include <nlohmann/json.hpp> @@ -28,64 +28,62 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class Arp -{ -public: - Arp(); - virtual ~Arp() = 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 Arp& rhs) const; - bool operator!=(const Arp& rhs) const; - - ///////////////////////////////////////////// - /// Arp members - - /// <summary> - /// nullable true shall not be used for this attribute - /// </summary> - int32_t getPriorityLevel() const; - void setPriorityLevel(int32_t const value); - /// <summary> - /// - /// </summary> - PreemptionCapability getPreemptCap() const; - void setPreemptCap(PreemptionCapability const& value); - /// <summary> - /// - /// </summary> - PreemptionVulnerability getPreemptVuln() const; - void setPreemptVuln(PreemptionVulnerability const& value); - - friend void to_json(nlohmann::json& j, const Arp& o); - friend void from_json(const nlohmann::json& j, Arp& o); -protected: - int32_t m_PriorityLevel; - - PreemptionCapability m_PreemptCap; - - PreemptionVulnerability m_PreemptVuln; - - +class Arp { + public: + Arp(); + virtual ~Arp() = 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 Arp& rhs) const; + bool operator!=(const Arp& rhs) const; + + ///////////////////////////////////////////// + /// Arp members + + /// <summary> + /// nullable true shall not be used for this attribute + /// </summary> + int32_t getPriorityLevel() const; + void setPriorityLevel(int32_t const value); + /// <summary> + /// + /// </summary> + PreemptionCapability getPreemptCap() const; + void setPreemptCap(PreemptionCapability const& value); + /// <summary> + /// + /// </summary> + PreemptionVulnerability getPreemptVuln() const; + void setPreemptVuln(PreemptionVulnerability const& value); + + friend void to_json(nlohmann::json& j, const Arp& o); + friend void from_json(const nlohmann::json& j, Arp& o); + + protected: + int32_t m_PriorityLevel; + + PreemptionCapability m_PreemptCap; + + PreemptionVulnerability m_PreemptVuln; }; } // namespace model diff --git a/src/api-server/model/AtsssCapability.cpp b/src/api-server/model/AtsssCapability.cpp index c728fe7..c39eb46 100755 --- a/src/api-server/model/AtsssCapability.cpp +++ b/src/api-server/model/AtsssCapability.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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.h" #include "Helpers.h" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -AtsssCapability::AtsssCapability() -{ - -} +AtsssCapability::AtsssCapability() {} -void AtsssCapability::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void AtsssCapability::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool AtsssCapability::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool AtsssCapability::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool AtsssCapability::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "AtsssCapability" : pathPrefix; - - - if (!m_value.validate(msg)) - { - success = false; - } - return success; +bool AtsssCapability::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "AtsssCapability" : pathPrefix; + + if (!m_value.validate(msg)) { + success = false; + } + return success; } -bool AtsssCapability::operator==(const AtsssCapability& rhs) const -{ - return - - getValue() == rhs.getValue() - ; +bool AtsssCapability::operator==(const AtsssCapability& rhs) const { + return + + getValue() == rhs.getValue(); } -bool AtsssCapability::operator!=(const AtsssCapability& rhs) const -{ - return !(*this == rhs); +bool AtsssCapability::operator!=(const AtsssCapability& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const AtsssCapability& o) -{ - j = nlohmann::json(); - to_json(j, o.m_value); +void to_json(nlohmann::json& j, const AtsssCapability& o) { + j = nlohmann::json(); + to_json(j, o.m_value); } -void from_json(const nlohmann::json& j, AtsssCapability& o) -{ - from_json(j, o.m_value); +void from_json(const nlohmann::json& j, AtsssCapability& o) { + from_json(j, o.m_value); } -AtsssCapability_anyOf AtsssCapability::getValue() const -{ - return m_value; +AtsssCapability_anyOf AtsssCapability::getValue() const { + return m_value; } -void AtsssCapability::setValue(AtsssCapability_anyOf value) -{ - m_value = value; +void AtsssCapability::setValue(AtsssCapability_anyOf value) { + m_value = value; } -AtsssCapability_anyOf::eAtsssCapability_anyOf AtsssCapability::getEnumValue() const -{ - return m_value.getValue(); +AtsssCapability_anyOf::eAtsssCapability_anyOf AtsssCapability::getEnumValue() + const { + return m_value.getValue(); } -void AtsssCapability::setEnumValue(AtsssCapability_anyOf::eAtsssCapability_anyOf value) -{ - m_value.setValue(value); +void AtsssCapability::setEnumValue( + AtsssCapability_anyOf::eAtsssCapability_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/AtsssCapability.h b/src/api-server/model/AtsssCapability.h index c6a2e9d..c747d5f 100755 --- a/src/api-server/model/AtsssCapability.h +++ b/src/api-server/model/AtsssCapability.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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.h * - * + * */ #ifndef AtsssCapability_H_ #define AtsssCapability_H_ - #include "AtsssCapability_anyOf.h" #include <nlohmann/json.hpp> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class AtsssCapability -{ -public: - AtsssCapability(); - virtual ~AtsssCapability() = default; - +class AtsssCapability { + public: + AtsssCapability(); + virtual ~AtsssCapability() = 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. 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> + /// 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; + /// <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& rhs) const; - bool operator!=(const AtsssCapability& rhs) const; + bool operator==(const AtsssCapability& rhs) const; + bool operator!=(const AtsssCapability& rhs) const; - ///////////////////////////////////////////// - /// AtsssCapability members + ///////////////////////////////////////////// + /// AtsssCapability members + AtsssCapability_anyOf getValue() const; + void setValue(AtsssCapability_anyOf value); + AtsssCapability_anyOf::eAtsssCapability_anyOf getEnumValue() const; + void setEnumValue(AtsssCapability_anyOf::eAtsssCapability_anyOf value); + friend void to_json(nlohmann::json& j, const AtsssCapability& o); + friend void from_json(const nlohmann::json& j, AtsssCapability& o); + friend void to_json(nlohmann::json& j, const AtsssCapability_anyOf& o); + friend void from_json(const nlohmann::json& j, AtsssCapability_anyOf& o); - AtsssCapability_anyOf getValue() const; - void setValue(AtsssCapability_anyOf value); - AtsssCapability_anyOf::eAtsssCapability_anyOf getEnumValue() const; - void setEnumValue(AtsssCapability_anyOf::eAtsssCapability_anyOf value); - friend void to_json(nlohmann::json& j, const AtsssCapability& o); - friend void from_json(const nlohmann::json& j, AtsssCapability& o); - 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 m_value; + protected: + AtsssCapability_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/AtsssCapability_anyOf.cpp b/src/api-server/model/AtsssCapability_anyOf.cpp index a0472f3..1dd03d1 100755 --- a/src/api-server/model/AtsssCapability_anyOf.cpp +++ b/src/api-server/model/AtsssCapability_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,109 +20,98 @@ namespace oai { namespace pcf { namespace model { -AtsssCapability_anyOf::AtsssCapability_anyOf() -{ - -} +AtsssCapability_anyOf::AtsssCapability_anyOf() {} -void AtsssCapability_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == AtsssCapability_anyOf::eAtsssCapability_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool AtsssCapability_anyOf::operator!=(const AtsssCapability_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +AtsssCapability_anyOf::eAtsssCapability_anyOf AtsssCapability_anyOf::getValue() + const { + return m_value; } -void AtsssCapability_anyOf::setValue(AtsssCapability_anyOf::eAtsssCapability_anyOf value) -{ - m_value = value; +void AtsssCapability_anyOf::setValue( + AtsssCapability_anyOf::eAtsssCapability_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/AtsssCapability_anyOf.h b/src/api-server/model/AtsssCapability_anyOf.h index 652eca8..e951125 100755 --- a/src/api-server/model/AtsssCapability_anyOf.h +++ b/src/api-server/model/AtsssCapability_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,55 +26,58 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class AtsssCapability_anyOf -{ -public: - AtsssCapability_anyOf(); - virtual ~AtsssCapability_anyOf() = default; +class AtsssCapability_anyOf { + public: + AtsssCapability_anyOf(); + virtual ~AtsssCapability_anyOf() = default; - enum class eAtsssCapability_anyOf { + 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_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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const AtsssCapability_anyOf& rhs) const; + bool operator!=(const AtsssCapability_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// AtsssCapability_anyOf members - bool operator==(const AtsssCapability_anyOf& rhs) const; - bool operator!=(const AtsssCapability_anyOf& rhs) const; + AtsssCapability_anyOf::eAtsssCapability_anyOf getValue() const; + void setValue(AtsssCapability_anyOf::eAtsssCapability_anyOf value); - ///////////////////////////////////////////// - /// AtsssCapability_anyOf members + friend void to_json(nlohmann::json& j, const AtsssCapability_anyOf& o); + friend void from_json(const nlohmann::json& j, AtsssCapability_anyOf& o); - 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; + protected: + AtsssCapability_anyOf::eAtsssCapability_anyOf m_value = + AtsssCapability_anyOf::eAtsssCapability_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/AuthorizedDefaultQos.cpp b/src/api-server/model/AuthorizedDefaultQos.cpp index d75b4a0..aa905f5 100755 --- a/src/api-server/model/AuthorizedDefaultQos.cpp +++ b/src/api-server/model/AuthorizedDefaultQos.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,508 +20,396 @@ namespace oai { namespace pcf { namespace model { -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()); - } +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; } -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;"; - } +void AuthorizedDefaultQos::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} - } - - 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;"; - } +bool AuthorizedDefaultQos::validate(std::stringstream& msg) const { + return validate(msg, ""); +} - } - - 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;"; - } +bool AuthorizedDefaultQos::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "AuthorizedDefaultQos" : pathPrefix; - } - - 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 (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 (maxbrUlIsSet()) - { - const std::string& value = m_MaxbrUl; - const std::string currentValuePath = _pathPrefix + ".maxbrUl"; - - - + if (value > 255) { + success = false; + msg << currentValuePath << ": must be less than or equal to 255;"; } - - if (maxbrDlIsSet()) - { - const std::string& value = m_MaxbrDl; - const std::string currentValuePath = _pathPrefix + ".maxbrDl"; - - + } + 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 (gbrUlIsSet()) - { - const std::string& value = m_GbrUl; - const std::string currentValuePath = _pathPrefix + ".gbrUl"; - - + } + 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 (gbrDlIsSet()) - { - const std::string& value = m_GbrDl; - const std::string currentValuePath = _pathPrefix + ".gbrDl"; - - + } + + 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 (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;"; - } + 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; + } + + 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())) + + ; } -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::operator!=(const AuthorizedDefaultQos& rhs) const { + return !(*this == rhs); } -bool AuthorizedDefaultQos::qncIsSet() const -{ - return m_QncIsSet; + +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 AuthorizedDefaultQos::unsetQnc() -{ - m_QncIsSet = false; + +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::getExtMaxDataBurstVol() const -{ - return m_ExtMaxDataBurstVol; + +int32_t AuthorizedDefaultQos::getR5qi() const { + return m_r_5qi; } -void AuthorizedDefaultQos::setExtMaxDataBurstVol(int32_t const value) -{ - m_ExtMaxDataBurstVol = value; - m_ExtMaxDataBurstVolIsSet = true; +void AuthorizedDefaultQos::setR5qi(int32_t const value) { + m_r_5qi = value; + m_r_5qiIsSet = true; } -bool AuthorizedDefaultQos::extMaxDataBurstVolIsSet() const -{ - return m_ExtMaxDataBurstVolIsSet; +bool AuthorizedDefaultQos::r5qiIsSet() const { + return m_r_5qiIsSet; } -void AuthorizedDefaultQos::unsetExtMaxDataBurstVol() -{ - m_ExtMaxDataBurstVolIsSet = false; +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 diff --git a/src/api-server/model/AuthorizedDefaultQos.h b/src/api-server/model/AuthorizedDefaultQos.h index da2e877..307a530 100755 --- a/src/api-server/model/AuthorizedDefaultQos.h +++ b/src/api-server/model/AuthorizedDefaultQos.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,142 +28,143 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class AuthorizedDefaultQos -{ -public: - AuthorizedDefaultQos(); - virtual ~AuthorizedDefaultQos() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const AuthorizedDefaultQos& rhs) const; - bool operator!=(const AuthorizedDefaultQos& rhs) const; + ///////////////////////////////////////////// + /// AuthorizedDefaultQos members - ///////////////////////////////////////////// - /// AuthorizedDefaultQos members + /// <summary> + /// + /// </summary> + int32_t getR5qi() const; + void setR5qi(int32_t const value); + bool r5qiIsSet() const; + void unsetr_5qi(); + /// <summary> + /// + /// </summary> + Arp getArp() const; + void setArp(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(); - /// <summary> - /// - /// </summary> - int32_t getR5qi() const; - void setR5qi(int32_t const value); - bool r5qiIsSet() const; - void unsetr_5qi(); - /// <summary> - /// - /// </summary> - Arp getArp() const; - void setArp(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); - 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; - 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; - + protected: + int32_t m_r_5qi; + bool m_r_5qiIsSet; + 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 diff --git a/src/api-server/model/CellGlobalId.cpp b/src/api-server/model/CellGlobalId.cpp index 3ef52ad..90f7c33 100755 --- a/src/api-server/model/CellGlobalId.cpp +++ b/src/api-server/model/CellGlobalId.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "CellGlobalId.h" #include "Helpers.h" @@ -20,119 +20,90 @@ namespace oai { namespace pcf { namespace model { -CellGlobalId::CellGlobalId() -{ - m_Lac = ""; - m_CellId = ""; - +CellGlobalId::CellGlobalId() { + m_Lac = ""; + m_CellId = ""; } -void CellGlobalId::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void CellGlobalId::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool CellGlobalId::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool CellGlobalId::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool CellGlobalId::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "CellGlobalId" : pathPrefix; - - - - /* Lac */ { - const std::string& value = m_Lac; - const std::string currentValuePath = _pathPrefix + ".lac"; - - - - } - - - /* CellId */ { - const std::string& value = m_CellId; - const std::string currentValuePath = _pathPrefix + ".cellId"; - - - - } - - return success; +bool CellGlobalId::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "CellGlobalId" : pathPrefix; + + /* Lac */ { + const std::string& value = m_Lac; + const std::string currentValuePath = _pathPrefix + ".lac"; + } + + /* CellId */ { + const std::string& value = m_CellId; + const std::string currentValuePath = _pathPrefix + ".cellId"; + } + + return success; } -bool CellGlobalId::operator==(const CellGlobalId& rhs) const -{ - return - - - (getPlmnId() == rhs.getPlmnId()) - && - - (getLac() == rhs.getLac()) - && - - (getCellId() == rhs.getCellId()) - - - ; +bool CellGlobalId::operator==(const CellGlobalId& rhs) const { + return + + (getPlmnId() == rhs.getPlmnId()) && + + (getLac() == rhs.getLac()) && + + (getCellId() == rhs.getCellId()) + + ; } -bool CellGlobalId::operator!=(const CellGlobalId& rhs) const -{ - return !(*this == rhs); +bool CellGlobalId::operator!=(const CellGlobalId& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const CellGlobalId& o) -{ - j = nlohmann::json(); - j["plmnId"] = o.m_PlmnId; - j["lac"] = o.m_Lac; - j["cellId"] = o.m_CellId; - +void to_json(nlohmann::json& j, const CellGlobalId& o) { + j = nlohmann::json(); + j["plmnId"] = o.m_PlmnId; + j["lac"] = o.m_Lac; + j["cellId"] = o.m_CellId; } -void from_json(const nlohmann::json& j, CellGlobalId& o) -{ - j.at("plmnId").get_to(o.m_PlmnId); - j.at("lac").get_to(o.m_Lac); - j.at("cellId").get_to(o.m_CellId); - +void from_json(const nlohmann::json& j, CellGlobalId& o) { + j.at("plmnId").get_to(o.m_PlmnId); + j.at("lac").get_to(o.m_Lac); + j.at("cellId").get_to(o.m_CellId); } -PlmnId CellGlobalId::getPlmnId() const -{ - return m_PlmnId; +PlmnId CellGlobalId::getPlmnId() const { + return m_PlmnId; } -void CellGlobalId::setPlmnId(PlmnId const& value) -{ - m_PlmnId = value; +void CellGlobalId::setPlmnId(PlmnId const& value) { + m_PlmnId = value; } -std::string CellGlobalId::getLac() const -{ - return m_Lac; +std::string CellGlobalId::getLac() const { + return m_Lac; } -void CellGlobalId::setLac(std::string const& value) -{ - m_Lac = value; +void CellGlobalId::setLac(std::string const& value) { + m_Lac = value; } -std::string CellGlobalId::getCellId() const -{ - return m_CellId; +std::string CellGlobalId::getCellId() const { + return m_CellId; } -void CellGlobalId::setCellId(std::string const& value) -{ - m_CellId = value; +void CellGlobalId::setCellId(std::string const& value) { + m_CellId = value; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/CellGlobalId.h b/src/api-server/model/CellGlobalId.h index 5a56044..bb26831 100755 --- a/src/api-server/model/CellGlobalId.h +++ b/src/api-server/model/CellGlobalId.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * CellGlobalId.h * - * + * */ #ifndef CellGlobalId_H_ #define CellGlobalId_H_ - #include <string> #include "PlmnId.h" #include <nlohmann/json.hpp> @@ -28,64 +28,62 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class CellGlobalId -{ -public: - CellGlobalId(); - virtual ~CellGlobalId() = 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 CellGlobalId& rhs) const; - bool operator!=(const CellGlobalId& rhs) const; - - ///////////////////////////////////////////// - /// CellGlobalId members - - /// <summary> - /// - /// </summary> - PlmnId getPlmnId() const; - void setPlmnId(PlmnId const& value); - /// <summary> - /// - /// </summary> - std::string getLac() const; - void setLac(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getCellId() const; - void setCellId(std::string const& value); - - friend void to_json(nlohmann::json& j, const CellGlobalId& o); - friend void from_json(const nlohmann::json& j, CellGlobalId& o); -protected: - PlmnId m_PlmnId; - - std::string m_Lac; - - std::string m_CellId; - - +class CellGlobalId { + public: + CellGlobalId(); + virtual ~CellGlobalId() = 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 CellGlobalId& rhs) const; + bool operator!=(const CellGlobalId& rhs) const; + + ///////////////////////////////////////////// + /// CellGlobalId members + + /// <summary> + /// + /// </summary> + PlmnId getPlmnId() const; + void setPlmnId(PlmnId const& value); + /// <summary> + /// + /// </summary> + std::string getLac() const; + void setLac(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getCellId() const; + void setCellId(std::string const& value); + + friend void to_json(nlohmann::json& j, const CellGlobalId& o); + friend void from_json(const nlohmann::json& j, CellGlobalId& o); + + protected: + PlmnId m_PlmnId; + + std::string m_Lac; + + std::string m_CellId; }; } // namespace model diff --git a/src/api-server/model/ChargingData.cpp b/src/api-server/model/ChargingData.cpp index cdc9a76..59511a1 100755 --- a/src/api-server/model/ChargingData.cpp +++ b/src/api-server/model/ChargingData.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,447 +20,362 @@ 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()); - } +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 -{ - 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; - - - if (ratingGroupIsSet()) - { - const int32_t& value = m_RatingGroup; - const std::string currentValuePath = _pathPrefix + ".ratingGroup"; - - - if (value < 0) - { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - if (value > 4294967295) - { - success = false; - msg << currentValuePath << ": must be less than or equal to 4294967295;"; - } +bool ChargingData::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "ChargingData" : pathPrefix; + + if (ratingGroupIsSet()) { + const int32_t& value = m_RatingGroup; + const std::string currentValuePath = _pathPrefix + ".ratingGroup"; + if (value < 0) { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0;"; + } + if (value > 4294967295) { + success = false; + msg << currentValuePath << ": must be less than or equal to 4294967295;"; } - - if (serviceIdIsSet()) - { - const int32_t& value = m_ServiceId; - const std::string currentValuePath = _pathPrefix + ".serviceId"; - - - if (value < 0) - { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - if (value > 4294967295) - { - success = false; - msg << currentValuePath << ": must be less than or equal to 4294967295;"; - } + } + if (serviceIdIsSet()) { + const int32_t& value = m_ServiceId; + const std::string currentValuePath = _pathPrefix + ".serviceId"; + + if (value < 0) { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0;"; + } + if (value > 4294967295) { + success = false; + msg << currentValuePath << ": must be less than or equal to 4294967295;"; } - - if (afChargingIdentifierIsSet()) - { - const int32_t& value = m_AfChargingIdentifier; - const std::string currentValuePath = _pathPrefix + ".afChargingIdentifier"; - - - if (value < 0) - { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - if (value > 4294967295) - { - success = false; - msg << currentValuePath << ": must be less than or equal to 4294967295;"; - } + } + if (afChargingIdentifierIsSet()) { + const int32_t& value = m_AfChargingIdentifier; + const std::string currentValuePath = _pathPrefix + ".afChargingIdentifier"; + + if (value < 0) { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0;"; + } + if (value > 4294967295) { + success = false; + msg << currentValuePath << ": must be less than or equal to 4294967295;"; } - - 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; -} -int32_t ChargingData::getRatingGroup() const -{ - return m_RatingGroup; -} -void ChargingData::setRatingGroup(int32_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; -} -int32_t ChargingData::getServiceId() const -{ - return m_ServiceId; -} -void ChargingData::setServiceId(int32_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; -} -int32_t ChargingData::getAfChargingIdentifier() const -{ - return m_AfChargingIdentifier; -} -void ChargingData::setAfChargingIdentifier(int32_t const value) -{ - m_AfChargingIdentifier = value; - m_AfChargingIdentifierIsSet = true; + } + + 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::afChargingIdentifierIsSet() const -{ - return m_AfChargingIdentifierIsSet; + +bool ChargingData::operator!=(const ChargingData& rhs) const { + return !(*this == rhs); } -void ChargingData::unsetAfChargingIdentifier() -{ - m_AfChargingIdentifierIsSet = false; + +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; } -std::string ChargingData::getAfChargId() const -{ - return 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; + } } -void ChargingData::setAfChargId(std::string const& value) -{ - m_AfChargId = value; - m_AfChargIdIsSet = true; + +std::string ChargingData::getChgId() const { + return m_ChgId; } -bool ChargingData::afChargIdIsSet() const -{ - return m_AfChargIdIsSet; +void ChargingData::setChgId(std::string const& value) { + m_ChgId = value; } -void ChargingData::unsetAfChargId() -{ - m_AfChargIdIsSet = false; +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; +} +int32_t ChargingData::getRatingGroup() const { + return m_RatingGroup; +} +void ChargingData::setRatingGroup(int32_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; +} +int32_t ChargingData::getServiceId() const { + return m_ServiceId; +} +void ChargingData::setServiceId(int32_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; +} +int32_t ChargingData::getAfChargingIdentifier() const { + return m_AfChargingIdentifier; +} +void ChargingData::setAfChargingIdentifier(int32_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 diff --git a/src/api-server/model/ChargingData.h b/src/api-server/model/ChargingData.h index 2830dad..004d719 100755 --- a/src/api-server/model/ChargingData.h +++ b/src/api-server/model/ChargingData.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -29,149 +29,150 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class ChargingData -{ -public: - ChargingData(); - virtual ~ChargingData() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const ChargingData& rhs) const; - bool operator!=(const ChargingData& rhs) const; + ///////////////////////////////////////////// + /// ChargingData members - ///////////////////////////////////////////// - /// 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> + int32_t getRatingGroup() const; + void setRatingGroup(int32_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> + int32_t getServiceId() const; + void setServiceId(int32_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> + int32_t getAfChargingIdentifier() const; + void setAfChargingIdentifier(int32_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(); - /// <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> - int32_t getRatingGroup() const; - void setRatingGroup(int32_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> - int32_t getServiceId() const; - void setServiceId(int32_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> - int32_t getAfChargingIdentifier() const; - void setAfChargingIdentifier(int32_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); - 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; + 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; - int32_t m_RatingGroup; - bool m_RatingGroupIsSet; - ReportingLevel m_ReportingLevel; - bool m_ReportingLevelIsSet; - int32_t m_ServiceId; - bool m_ServiceIdIsSet; - std::string m_SponsorId; - bool m_SponsorIdIsSet; - std::string m_AppSvcProvId; - bool m_AppSvcProvIdIsSet; - int32_t m_AfChargingIdentifier; - bool m_AfChargingIdentifierIsSet; - std::string m_AfChargId; - bool m_AfChargIdIsSet; - + MeteringMethod m_MeteringMethod; + bool m_MeteringMethodIsSet; + bool m_Offline; + bool m_OfflineIsSet; + bool m_Online; + bool m_OnlineIsSet; + bool m_SdfHandl; + bool m_SdfHandlIsSet; + int32_t m_RatingGroup; + bool m_RatingGroupIsSet; + ReportingLevel m_ReportingLevel; + bool m_ReportingLevelIsSet; + int32_t m_ServiceId; + bool m_ServiceIdIsSet; + std::string m_SponsorId; + bool m_SponsorIdIsSet; + std::string m_AppSvcProvId; + bool m_AppSvcProvIdIsSet; + int32_t m_AfChargingIdentifier; + bool m_AfChargingIdentifierIsSet; + std::string m_AfChargId; + bool m_AfChargIdIsSet; }; } // namespace model diff --git a/src/api-server/model/ChargingInformation.cpp b/src/api-server/model/ChargingInformation.cpp index b83d8e6..f774a7c 100755 --- a/src/api-server/model/ChargingInformation.cpp +++ b/src/api-server/model/ChargingInformation.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,203 +20,168 @@ 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; +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 diff --git a/src/api-server/model/ChargingInformation.h b/src/api-server/model/ChargingInformation.h index 01216f9..7e21fd7 100755 --- a/src/api-server/model/ChargingInformation.h +++ b/src/api-server/model/ChargingInformation.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,93 +27,92 @@ 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; - +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 diff --git a/src/api-server/model/ConditionData.cpp b/src/api-server/model/ConditionData.cpp index 6384f82..1d31455 100755 --- a/src/api-server/model/ConditionData.cpp +++ b/src/api-server/model/ConditionData.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,187 +20,152 @@ namespace oai { namespace pcf { namespace model { -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; +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 diff --git a/src/api-server/model/ConditionData.h b/src/api-server/model/ConditionData.h index c3ba483..e8a8121 100755 --- a/src/api-server/model/ConditionData.h +++ b/src/api-server/model/ConditionData.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -29,86 +29,85 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class ConditionData -{ -public: - ConditionData(); - virtual ~ConditionData() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const ConditionData& rhs) const; - bool operator!=(const ConditionData& rhs) const; + ///////////////////////////////////////////// + /// ConditionData members - ///////////////////////////////////////////// - /// 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> + AccessType getAccessType() const; + void setAccessType(AccessType const& value); + bool accessTypeIsSet() const; + void unsetAccessType(); + /// <summary> + /// + /// </summary> + RatType getRatType() const; + void setRatType(RatType const& value); + bool ratTypeIsSet() const; + void unsetRatType(); - /// <summary> - /// 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> - AccessType getAccessType() const; - void setAccessType(AccessType const& value); - bool accessTypeIsSet() const; - void unsetAccessType(); - /// <summary> - /// - /// </summary> - RatType getRatType() const; - void setRatType(RatType const& value); - bool ratTypeIsSet() const; - void unsetRatType(); + friend void to_json(nlohmann::json& j, const ConditionData& o); + friend void from_json(const nlohmann::json& j, ConditionData& o); - 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; + protected: + std::string m_CondId; - std::string m_ActivationTime; - bool m_ActivationTimeIsSet; - std::string m_DeactivationTime; - bool m_DeactivationTimeIsSet; - AccessType m_AccessType; - bool m_AccessTypeIsSet; - RatType m_RatType; - bool m_RatTypeIsSet; - + std::string m_ActivationTime; + bool m_ActivationTimeIsSet; + std::string m_DeactivationTime; + bool m_DeactivationTimeIsSet; + AccessType m_AccessType; + bool m_AccessTypeIsSet; + RatType m_RatType; + bool m_RatTypeIsSet; }; } // namespace model diff --git a/src/api-server/model/CreditManagementStatus.cpp b/src/api-server/model/CreditManagementStatus.cpp index 6d02d62..e80a882 100755 --- a/src/api-server/model/CreditManagementStatus.cpp +++ b/src/api-server/model/CreditManagementStatus.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,69 @@ namespace oai { namespace pcf { namespace model { -CreditManagementStatus::CreditManagementStatus() -{ - -} +CreditManagementStatus::CreditManagementStatus() {} -void CreditManagementStatus::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool CreditManagementStatus::operator!=(const CreditManagementStatus& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, CreditManagementStatus& o) { + from_json(j, o.m_value); } -CreditManagementStatus_anyOf CreditManagementStatus::getValue() const -{ - return m_value; +CreditManagementStatus_anyOf CreditManagementStatus::getValue() const { + return m_value; } -void CreditManagementStatus::setValue(CreditManagementStatus_anyOf value) -{ - m_value = value; +void CreditManagementStatus::setValue(CreditManagementStatus_anyOf value) { + m_value = value; } -CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf CreditManagementStatus::getEnumValue() const -{ - return m_value.getValue(); +CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf +CreditManagementStatus::getEnumValue() const { + return m_value.getValue(); } -void CreditManagementStatus::setEnumValue(CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf value) -{ - m_value.setValue(value); +void CreditManagementStatus::setEnumValue( + CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/CreditManagementStatus.h b/src/api-server/model/CreditManagementStatus.h index 945823a..6a44ea6 100755 --- a/src/api-server/model/CreditManagementStatus.h +++ b/src/api-server/model/CreditManagementStatus.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,49 +27,51 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class CreditManagementStatus -{ -public: - CreditManagementStatus(); - virtual ~CreditManagementStatus() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const CreditManagementStatus& rhs) const; + bool operator!=(const CreditManagementStatus& rhs) const; - ///////////////////////////////////////////// - /// CreditManagementStatus members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + CreditManagementStatus_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/CreditManagementStatus_anyOf.cpp b/src/api-server/model/CreditManagementStatus_anyOf.cpp index 78caed6..1d117fd 100755 --- a/src/api-server/model/CreditManagementStatus_anyOf.cpp +++ b/src/api-server/model/CreditManagementStatus_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,115 +20,111 @@ namespace oai { namespace pcf { namespace model { -CreditManagementStatus_anyOf::CreditManagementStatus_anyOf() -{ - -} +CreditManagementStatus_anyOf::CreditManagementStatus_anyOf() {} -void CreditManagementStatus_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool CreditManagementStatus_anyOf::operator!=( + const CreditManagementStatus_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf +CreditManagementStatus_anyOf::getValue() const { + return m_value; } -void CreditManagementStatus_anyOf::setValue(CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf value) -{ - m_value = value; +void CreditManagementStatus_anyOf::setValue( + CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/CreditManagementStatus_anyOf.h b/src/api-server/model/CreditManagementStatus_anyOf.h index d8de70b..f4dd300 100755 --- a/src/api-server/model/CreditManagementStatus_anyOf.h +++ b/src/api-server/model/CreditManagementStatus_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,56 +26,61 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class CreditManagementStatus_anyOf -{ -public: - CreditManagementStatus_anyOf(); - virtual ~CreditManagementStatus_anyOf() = default; +class CreditManagementStatus_anyOf { + public: + CreditManagementStatus_anyOf(); + virtual ~CreditManagementStatus_anyOf() = default; - enum class eCreditManagementStatus_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const CreditManagementStatus_anyOf& rhs) const; + bool operator!=(const CreditManagementStatus_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// CreditManagementStatus_anyOf members - bool operator==(const CreditManagementStatus_anyOf& rhs) const; - bool operator!=(const CreditManagementStatus_anyOf& rhs) const; + CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf getValue() const; + void setValue( + CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf value); - ///////////////////////////////////////////// - /// CreditManagementStatus_anyOf members + friend void to_json(nlohmann::json& j, const CreditManagementStatus_anyOf& o); + friend void from_json( + const nlohmann::json& j, CreditManagementStatus_anyOf& o); - 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; + protected: + CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf m_value = + CreditManagementStatus_anyOf::eCreditManagementStatus_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/DnaiChangeType.cpp b/src/api-server/model/DnaiChangeType.cpp index 5fda807..6f66775 100755 --- a/src/api-server/model/DnaiChangeType.cpp +++ b/src/api-server/model/DnaiChangeType.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "DnaiChangeType.h" #include "Helpers.h" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -DnaiChangeType::DnaiChangeType() -{ - -} +DnaiChangeType::DnaiChangeType() {} -void DnaiChangeType::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void DnaiChangeType::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool DnaiChangeType::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool DnaiChangeType::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool DnaiChangeType::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "DnaiChangeType" : pathPrefix; - - - if (!m_value.validate(msg)) - { - success = false; - } - return success; +bool DnaiChangeType::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "DnaiChangeType" : pathPrefix; + + if (!m_value.validate(msg)) { + success = false; + } + return success; } -bool DnaiChangeType::operator==(const DnaiChangeType& rhs) const -{ - return - - getValue() == rhs.getValue() - ; +bool DnaiChangeType::operator==(const DnaiChangeType& rhs) const { + return + + getValue() == rhs.getValue(); } -bool DnaiChangeType::operator!=(const DnaiChangeType& rhs) const -{ - return !(*this == rhs); +bool DnaiChangeType::operator!=(const DnaiChangeType& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const DnaiChangeType& o) -{ - j = nlohmann::json(); - to_json(j, o.m_value); +void to_json(nlohmann::json& j, const DnaiChangeType& o) { + j = nlohmann::json(); + to_json(j, o.m_value); } -void from_json(const nlohmann::json& j, DnaiChangeType& o) -{ - from_json(j, o.m_value); +void from_json(const nlohmann::json& j, DnaiChangeType& o) { + from_json(j, o.m_value); } -DnaiChangeType_anyOf DnaiChangeType::getValue() const -{ - return m_value; +DnaiChangeType_anyOf DnaiChangeType::getValue() const { + return m_value; } -void DnaiChangeType::setValue(DnaiChangeType_anyOf value) -{ - m_value = value; +void DnaiChangeType::setValue(DnaiChangeType_anyOf value) { + m_value = value; } -DnaiChangeType_anyOf::eDnaiChangeType_anyOf DnaiChangeType::getEnumValue() const -{ - return m_value.getValue(); +DnaiChangeType_anyOf::eDnaiChangeType_anyOf DnaiChangeType::getEnumValue() + const { + return m_value.getValue(); } -void DnaiChangeType::setEnumValue(DnaiChangeType_anyOf::eDnaiChangeType_anyOf value) -{ - m_value.setValue(value); +void DnaiChangeType::setEnumValue( + DnaiChangeType_anyOf::eDnaiChangeType_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/DnaiChangeType.h b/src/api-server/model/DnaiChangeType.h index e71c81c..2f284ec 100755 --- a/src/api-server/model/DnaiChangeType.h +++ b/src/api-server/model/DnaiChangeType.h @@ -1,24 +1,27 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * DnaiChangeType.h * - * Possible values are - EARLY: Early notification of UP path reconfiguration. - EARLY_LATE: Early and late notification of UP path reconfiguration. This value shall only be present in the subscription to the DNAI change event. - LATE: Late notification of UP path reconfiguration. + * Possible values are - EARLY: Early notification of UP path reconfiguration. - + * EARLY_LATE: Early and late notification of UP path reconfiguration. This + * value shall only be present in the subscription to the DNAI change event. - + * LATE: Late notification of UP path reconfiguration. */ #ifndef DnaiChangeType_H_ #define DnaiChangeType_H_ - #include "DnaiChangeType_anyOf.h" #include <nlohmann/json.hpp> @@ -27,49 +30,51 @@ namespace pcf { namespace model { /// <summary> -/// Possible values are - EARLY: Early notification of UP path reconfiguration. - EARLY_LATE: Early and late notification of UP path reconfiguration. This value shall only be present in the subscription to the DNAI change event. - LATE: Late notification of UP path reconfiguration. +/// Possible values are - EARLY: Early notification of UP path reconfiguration. +/// - EARLY_LATE: Early and late notification of UP path reconfiguration. This +/// value shall only be present in the subscription to the DNAI change event. - +/// LATE: Late notification of UP path reconfiguration. /// </summary> -class DnaiChangeType -{ -public: - DnaiChangeType(); - virtual ~DnaiChangeType() = default; - +class DnaiChangeType { + public: + DnaiChangeType(); + virtual ~DnaiChangeType() = 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. 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> + /// 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; + /// <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 DnaiChangeType& rhs) const; - bool operator!=(const DnaiChangeType& rhs) const; + bool operator==(const DnaiChangeType& rhs) const; + bool operator!=(const DnaiChangeType& rhs) const; - ///////////////////////////////////////////// - /// DnaiChangeType members + ///////////////////////////////////////////// + /// DnaiChangeType members + DnaiChangeType_anyOf getValue() const; + void setValue(DnaiChangeType_anyOf value); + DnaiChangeType_anyOf::eDnaiChangeType_anyOf getEnumValue() const; + void setEnumValue(DnaiChangeType_anyOf::eDnaiChangeType_anyOf value); + friend void to_json(nlohmann::json& j, const DnaiChangeType& o); + friend void from_json(const nlohmann::json& j, DnaiChangeType& o); + friend void to_json(nlohmann::json& j, const DnaiChangeType_anyOf& o); + friend void from_json(const nlohmann::json& j, DnaiChangeType_anyOf& o); - DnaiChangeType_anyOf getValue() const; - void setValue(DnaiChangeType_anyOf value); - DnaiChangeType_anyOf::eDnaiChangeType_anyOf getEnumValue() const; - void setEnumValue(DnaiChangeType_anyOf::eDnaiChangeType_anyOf value); - friend void to_json(nlohmann::json& j, const DnaiChangeType& o); - friend void from_json(const nlohmann::json& j, DnaiChangeType& o); - friend void to_json(nlohmann::json& j, const DnaiChangeType_anyOf& o); - friend void from_json(const nlohmann::json& j, DnaiChangeType_anyOf& o); -protected: - DnaiChangeType_anyOf m_value; + protected: + DnaiChangeType_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/DnaiChangeType_anyOf.cpp b/src/api-server/model/DnaiChangeType_anyOf.cpp index e4e20af..4b5fc81 100755 --- a/src/api-server/model/DnaiChangeType_anyOf.cpp +++ b/src/api-server/model/DnaiChangeType_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "DnaiChangeType_anyOf.h" #include "Helpers.h" @@ -20,103 +20,89 @@ namespace oai { namespace pcf { namespace model { -DnaiChangeType_anyOf::DnaiChangeType_anyOf() -{ - -} +DnaiChangeType_anyOf::DnaiChangeType_anyOf() {} -void DnaiChangeType_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void DnaiChangeType_anyOf::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool DnaiChangeType_anyOf::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool DnaiChangeType_anyOf::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool DnaiChangeType_anyOf::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "DnaiChangeType_anyOf" : pathPrefix; +bool DnaiChangeType_anyOf::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "DnaiChangeType_anyOf" : pathPrefix; - - if (m_value == DnaiChangeType_anyOf::eDnaiChangeType_anyOf::INVALID_VALUE_OPENAPI_GENERATED) - { - success = false; - msg << _pathPrefix << ": has no value;"; - } + if (m_value == DnaiChangeType_anyOf::eDnaiChangeType_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + return success; } -bool DnaiChangeType_anyOf::operator==(const DnaiChangeType_anyOf& rhs) const -{ - return - getValue() == rhs.getValue() - - ; -} +bool DnaiChangeType_anyOf::operator==(const DnaiChangeType_anyOf& rhs) const { + return getValue() == rhs.getValue() -bool DnaiChangeType_anyOf::operator!=(const DnaiChangeType_anyOf& rhs) const -{ - return !(*this == rhs); + ; } -void to_json(nlohmann::json& j, const DnaiChangeType_anyOf& o) -{ - j = nlohmann::json(); - - switch (o.getValue()) - { - case DnaiChangeType_anyOf::eDnaiChangeType_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case DnaiChangeType_anyOf::eDnaiChangeType_anyOf::EARLY: - j = "EARLY"; - break; - case DnaiChangeType_anyOf::eDnaiChangeType_anyOf::EARLY_LATE: - j = "EARLY_LATE"; - break; - case DnaiChangeType_anyOf::eDnaiChangeType_anyOf::LATE: - j = "LATE"; - break; - } +bool DnaiChangeType_anyOf::operator!=(const DnaiChangeType_anyOf& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, DnaiChangeType_anyOf& o) -{ - - auto s = j.get<std::string>(); - if (s == "EARLY") { - o.setValue(DnaiChangeType_anyOf::eDnaiChangeType_anyOf::EARLY); - } - else if (s == "EARLY_LATE") { - o.setValue(DnaiChangeType_anyOf::eDnaiChangeType_anyOf::EARLY_LATE); - } - else if (s == "LATE") { - o.setValue(DnaiChangeType_anyOf::eDnaiChangeType_anyOf::LATE); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " DnaiChangeType_anyOf::eDnaiChangeType_anyOf"; - throw std::invalid_argument(ss.str()); - } +void to_json(nlohmann::json& j, const DnaiChangeType_anyOf& o) { + j = nlohmann::json(); + + switch (o.getValue()) { + case DnaiChangeType_anyOf::eDnaiChangeType_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED: + j = "INVALID_VALUE_OPENAPI_GENERATED"; + break; + case DnaiChangeType_anyOf::eDnaiChangeType_anyOf::EARLY: + j = "EARLY"; + break; + case DnaiChangeType_anyOf::eDnaiChangeType_anyOf::EARLY_LATE: + j = "EARLY_LATE"; + break; + case DnaiChangeType_anyOf::eDnaiChangeType_anyOf::LATE: + j = "LATE"; + break; + } +} +void from_json(const nlohmann::json& j, DnaiChangeType_anyOf& o) { + auto s = j.get<std::string>(); + if (s == "EARLY") { + o.setValue(DnaiChangeType_anyOf::eDnaiChangeType_anyOf::EARLY); + } else if (s == "EARLY_LATE") { + o.setValue(DnaiChangeType_anyOf::eDnaiChangeType_anyOf::EARLY_LATE); + } else if (s == "LATE") { + o.setValue(DnaiChangeType_anyOf::eDnaiChangeType_anyOf::LATE); + } else { + std::stringstream ss; + ss << "Unexpected value " << s << " in json" + << " cannot be converted to enum of type" + << " DnaiChangeType_anyOf::eDnaiChangeType_anyOf"; + throw std::invalid_argument(ss.str()); + } } -DnaiChangeType_anyOf::eDnaiChangeType_anyOf DnaiChangeType_anyOf::getValue() const -{ - return m_value; +DnaiChangeType_anyOf::eDnaiChangeType_anyOf DnaiChangeType_anyOf::getValue() + const { + return m_value; } -void DnaiChangeType_anyOf::setValue(DnaiChangeType_anyOf::eDnaiChangeType_anyOf value) -{ - m_value = value; +void DnaiChangeType_anyOf::setValue( + DnaiChangeType_anyOf::eDnaiChangeType_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/DnaiChangeType_anyOf.h b/src/api-server/model/DnaiChangeType_anyOf.h index 761a509..014fbaf 100755 --- a/src/api-server/model/DnaiChangeType_anyOf.h +++ b/src/api-server/model/DnaiChangeType_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * DnaiChangeType_anyOf.h * - * + * */ #ifndef DnaiChangeType_anyOf_H_ #define DnaiChangeType_anyOf_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,54 +26,56 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class DnaiChangeType_anyOf -{ -public: - DnaiChangeType_anyOf(); - virtual ~DnaiChangeType_anyOf() = default; +class DnaiChangeType_anyOf { + public: + DnaiChangeType_anyOf(); + virtual ~DnaiChangeType_anyOf() = default; - enum class eDnaiChangeType_anyOf { + enum class eDnaiChangeType_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - EARLY, - EARLY_LATE, + EARLY, + EARLY_LATE, LATE - }; + }; + + /// <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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const DnaiChangeType_anyOf& rhs) const; + bool operator!=(const DnaiChangeType_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// DnaiChangeType_anyOf members - bool operator==(const DnaiChangeType_anyOf& rhs) const; - bool operator!=(const DnaiChangeType_anyOf& rhs) const; + DnaiChangeType_anyOf::eDnaiChangeType_anyOf getValue() const; + void setValue(DnaiChangeType_anyOf::eDnaiChangeType_anyOf value); - ///////////////////////////////////////////// - /// DnaiChangeType_anyOf members + friend void to_json(nlohmann::json& j, const DnaiChangeType_anyOf& o); + friend void from_json(const nlohmann::json& j, DnaiChangeType_anyOf& o); - DnaiChangeType_anyOf::eDnaiChangeType_anyOf getValue() const; - void setValue(DnaiChangeType_anyOf::eDnaiChangeType_anyOf value); - - friend void to_json(nlohmann::json& j, const DnaiChangeType_anyOf& o); - friend void from_json(const nlohmann::json& j, DnaiChangeType_anyOf& o); -protected: - DnaiChangeType_anyOf::eDnaiChangeType_anyOf m_value = DnaiChangeType_anyOf::eDnaiChangeType_anyOf::INVALID_VALUE_OPENAPI_GENERATED; + protected: + DnaiChangeType_anyOf::eDnaiChangeType_anyOf m_value = DnaiChangeType_anyOf:: + eDnaiChangeType_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/DnnSelectionMode.cpp b/src/api-server/model/DnnSelectionMode.cpp index 4aa64f3..cc62d19 100755 --- a/src/api-server/model/DnnSelectionMode.cpp +++ b/src/api-server/model/DnnSelectionMode.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -DnnSelectionMode::DnnSelectionMode() -{ - -} +DnnSelectionMode::DnnSelectionMode() {} -void DnnSelectionMode::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool DnnSelectionMode::operator!=(const DnnSelectionMode& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, DnnSelectionMode& o) { + from_json(j, o.m_value); } -DnnSelectionMode_anyOf DnnSelectionMode::getValue() const -{ - return m_value; +DnnSelectionMode_anyOf DnnSelectionMode::getValue() const { + return m_value; } -void DnnSelectionMode::setValue(DnnSelectionMode_anyOf value) -{ - m_value = value; +void DnnSelectionMode::setValue(DnnSelectionMode_anyOf value) { + m_value = value; } -DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf DnnSelectionMode::getEnumValue() const -{ - return m_value.getValue(); +DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf DnnSelectionMode::getEnumValue() + const { + return m_value.getValue(); } -void DnnSelectionMode::setEnumValue(DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf value) -{ - m_value.setValue(value); +void DnnSelectionMode::setEnumValue( + DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/DnnSelectionMode.h b/src/api-server/model/DnnSelectionMode.h index a621e02..a66c01f 100755 --- a/src/api-server/model/DnnSelectionMode.h +++ b/src/api-server/model/DnnSelectionMode.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 + * 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> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// Possible values are - VERIFIED - UE_DNN_NOT_VERIFIED - NW_DNN_NOT_VERIFIED +/// Possible values are - VERIFIED - UE_DNN_NOT_VERIFIED - NW_DNN_NOT_VERIFIED /// </summary> -class DnnSelectionMode -{ -public: - DnnSelectionMode(); - virtual ~DnnSelectionMode() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const DnnSelectionMode& rhs) const; + bool operator!=(const DnnSelectionMode& rhs) const; - ///////////////////////////////////////////// - /// DnnSelectionMode members + ///////////////////////////////////////////// + /// DnnSelectionMode members + DnnSelectionMode_anyOf getValue() const; + void setValue(DnnSelectionMode_anyOf value); + DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf getEnumValue() const; + void setEnumValue(DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf value); + friend void to_json(nlohmann::json& j, const DnnSelectionMode& o); + friend void 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); - 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; + protected: + DnnSelectionMode_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/DnnSelectionMode_anyOf.cpp b/src/api-server/model/DnnSelectionMode_anyOf.cpp index 1d5ea6f..56c5df0 100755 --- a/src/api-server/model/DnnSelectionMode_anyOf.cpp +++ b/src/api-server/model/DnnSelectionMode_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,103 +20,93 @@ namespace oai { namespace pcf { namespace model { -DnnSelectionMode_anyOf::DnnSelectionMode_anyOf() -{ - -} +DnnSelectionMode_anyOf::DnnSelectionMode_anyOf() {} -void DnnSelectionMode_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool DnnSelectionMode_anyOf::operator!=( + const DnnSelectionMode_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf +DnnSelectionMode_anyOf::getValue() const { + return m_value; } -void DnnSelectionMode_anyOf::setValue(DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf value) -{ - m_value = value; +void DnnSelectionMode_anyOf::setValue( + DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/DnnSelectionMode_anyOf.h b/src/api-server/model/DnnSelectionMode_anyOf.h index 75aceba..0ad2116 100755 --- a/src/api-server/model/DnnSelectionMode_anyOf.h +++ b/src/api-server/model/DnnSelectionMode_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,54 +26,57 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class DnnSelectionMode_anyOf -{ -public: - DnnSelectionMode_anyOf(); - virtual ~DnnSelectionMode_anyOf() = default; +class DnnSelectionMode_anyOf { + public: + DnnSelectionMode_anyOf(); + virtual ~DnnSelectionMode_anyOf() = default; - enum class eDnnSelectionMode_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const DnnSelectionMode_anyOf& rhs) const; + bool operator!=(const DnnSelectionMode_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// DnnSelectionMode_anyOf members - bool operator==(const DnnSelectionMode_anyOf& rhs) const; - bool operator!=(const DnnSelectionMode_anyOf& rhs) const; + DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf getValue() const; + void setValue(DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf value); - ///////////////////////////////////////////// - /// DnnSelectionMode_anyOf members + friend void to_json(nlohmann::json& j, const DnnSelectionMode_anyOf& o); + friend void from_json(const nlohmann::json& j, DnnSelectionMode_anyOf& o); - 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; + protected: + DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf m_value = + DnnSelectionMode_anyOf::eDnnSelectionMode_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/Ecgi.cpp b/src/api-server/model/Ecgi.cpp index 27fb682..5aa1c1a 100755 --- a/src/api-server/model/Ecgi.cpp +++ b/src/api-server/model/Ecgi.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "Ecgi.h" #include "Helpers.h" @@ -20,133 +20,100 @@ namespace oai { namespace pcf { namespace model { -Ecgi::Ecgi() -{ - m_EutraCellId = ""; - m_Nid = ""; - m_NidIsSet = false; - -} - -void Ecgi::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool Ecgi::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool Ecgi::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "Ecgi" : pathPrefix; - - - - /* EutraCellId */ { - const std::string& value = m_EutraCellId; - const std::string currentValuePath = _pathPrefix + ".eutraCellId"; - - - - } - - if (nidIsSet()) - { - const std::string& value = m_Nid; - const std::string currentValuePath = _pathPrefix + ".nid"; - - - - } - - return success; -} - -bool Ecgi::operator==(const Ecgi& rhs) const -{ - return - - - (getPlmnId() == rhs.getPlmnId()) - && - - (getEutraCellId() == rhs.getEutraCellId()) - && - - - ((!nidIsSet() && !rhs.nidIsSet()) || (nidIsSet() && rhs.nidIsSet() && getNid() == rhs.getNid())) - - ; -} - -bool Ecgi::operator!=(const Ecgi& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const Ecgi& o) -{ - j = nlohmann::json(); - j["plmnId"] = o.m_PlmnId; - j["eutraCellId"] = o.m_EutraCellId; - if(o.nidIsSet()) - j["nid"] = o.m_Nid; - -} - -void from_json(const nlohmann::json& j, Ecgi& o) -{ - j.at("plmnId").get_to(o.m_PlmnId); - j.at("eutraCellId").get_to(o.m_EutraCellId); - if(j.find("nid") != j.end()) - { - j.at("nid").get_to(o.m_Nid); - o.m_NidIsSet = true; - } - -} - -PlmnId Ecgi::getPlmnId() const -{ - return m_PlmnId; -} -void Ecgi::setPlmnId(PlmnId const& value) -{ - m_PlmnId = value; -} -std::string Ecgi::getEutraCellId() const -{ - return m_EutraCellId; -} -void Ecgi::setEutraCellId(std::string const& value) -{ - m_EutraCellId = value; -} -std::string Ecgi::getNid() const -{ - return m_Nid; -} -void Ecgi::setNid(std::string const& value) -{ - m_Nid = value; - m_NidIsSet = true; -} -bool Ecgi::nidIsSet() const -{ - return m_NidIsSet; -} -void Ecgi::unsetNid() -{ - m_NidIsSet = false; +Ecgi::Ecgi() { + m_EutraCellId = ""; + m_Nid = ""; + m_NidIsSet = false; +} + +void Ecgi::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool Ecgi::validate(std::stringstream& msg) const { + return validate(msg, ""); +} + +bool Ecgi::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "Ecgi" : pathPrefix; + + /* EutraCellId */ { + const std::string& value = m_EutraCellId; + const std::string currentValuePath = _pathPrefix + ".eutraCellId"; + } + + if (nidIsSet()) { + const std::string& value = m_Nid; + const std::string currentValuePath = _pathPrefix + ".nid"; + } + + return success; +} + +bool Ecgi::operator==(const Ecgi& rhs) const { + return + + (getPlmnId() == rhs.getPlmnId()) && + + (getEutraCellId() == rhs.getEutraCellId()) && + + ((!nidIsSet() && !rhs.nidIsSet()) || + (nidIsSet() && rhs.nidIsSet() && getNid() == rhs.getNid())) + + ; +} + +bool Ecgi::operator!=(const Ecgi& rhs) const { + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const Ecgi& o) { + j = nlohmann::json(); + j["plmnId"] = o.m_PlmnId; + j["eutraCellId"] = o.m_EutraCellId; + if (o.nidIsSet()) j["nid"] = o.m_Nid; +} + +void from_json(const nlohmann::json& j, Ecgi& o) { + j.at("plmnId").get_to(o.m_PlmnId); + j.at("eutraCellId").get_to(o.m_EutraCellId); + if (j.find("nid") != j.end()) { + j.at("nid").get_to(o.m_Nid); + o.m_NidIsSet = true; + } } +PlmnId Ecgi::getPlmnId() const { + return m_PlmnId; +} +void Ecgi::setPlmnId(PlmnId const& value) { + m_PlmnId = value; +} +std::string Ecgi::getEutraCellId() const { + return m_EutraCellId; +} +void Ecgi::setEutraCellId(std::string const& value) { + m_EutraCellId = value; +} +std::string Ecgi::getNid() const { + return m_Nid; +} +void Ecgi::setNid(std::string const& value) { + m_Nid = value; + m_NidIsSet = true; +} +bool Ecgi::nidIsSet() const { + return m_NidIsSet; +} +void Ecgi::unsetNid() { + m_NidIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/Ecgi.h b/src/api-server/model/Ecgi.h index f6e6d4d..d82a46a 100755 --- a/src/api-server/model/Ecgi.h +++ b/src/api-server/model/Ecgi.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * Ecgi.h * - * + * */ #ifndef Ecgi_H_ #define Ecgi_H_ - #include <string> #include "PlmnId.h" #include <nlohmann/json.hpp> @@ -28,66 +28,65 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class Ecgi -{ -public: - Ecgi(); - virtual ~Ecgi() = 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 Ecgi& rhs) const; - bool operator!=(const Ecgi& rhs) const; - - ///////////////////////////////////////////// - /// Ecgi members - - /// <summary> - /// - /// </summary> - PlmnId getPlmnId() const; - void setPlmnId(PlmnId const& value); - /// <summary> - /// - /// </summary> - std::string getEutraCellId() const; - void setEutraCellId(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getNid() const; - void setNid(std::string const& value); - bool nidIsSet() const; - void unsetNid(); - - friend void to_json(nlohmann::json& j, const Ecgi& o); - friend void from_json(const nlohmann::json& j, Ecgi& o); -protected: - PlmnId m_PlmnId; - - std::string m_EutraCellId; - - std::string m_Nid; - bool m_NidIsSet; - +class Ecgi { + public: + Ecgi(); + virtual ~Ecgi() = 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 Ecgi& rhs) const; + bool operator!=(const Ecgi& rhs) const; + + ///////////////////////////////////////////// + /// Ecgi members + + /// <summary> + /// + /// </summary> + PlmnId getPlmnId() const; + void setPlmnId(PlmnId const& value); + /// <summary> + /// + /// </summary> + std::string getEutraCellId() const; + void setEutraCellId(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getNid() const; + void setNid(std::string const& value); + bool nidIsSet() const; + void unsetNid(); + + friend void to_json(nlohmann::json& j, const Ecgi& o); + friend void from_json(const nlohmann::json& j, Ecgi& o); + + protected: + PlmnId m_PlmnId; + + std::string m_EutraCellId; + + std::string m_Nid; + bool m_NidIsSet; }; } // namespace model diff --git a/src/api-server/model/ErrorReport.cpp b/src/api-server/model/ErrorReport.cpp index d2cd07b..b7fdbdf 100755 --- a/src/api-server/model/ErrorReport.cpp +++ b/src/api-server/model/ErrorReport.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,195 +20,164 @@ namespace oai { namespace pcf { namespace model { -ErrorReport::ErrorReport() -{ - m_ErrorIsSet = false; - m_RuleReportsIsSet = false; - m_SessRuleReportsIsSet = false; - +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()); - } +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++; - } - } +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;"; } - - 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++; - } - } + { // 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;"; } - - 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; + { // 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 diff --git a/src/api-server/model/ErrorReport.h b/src/api-server/model/ErrorReport.h index a08286e..9380eb7 100755 --- a/src/api-server/model/ErrorReport.h +++ b/src/api-server/model/ErrorReport.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -30,70 +30,69 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class ErrorReport -{ -public: - ErrorReport(); - virtual ~ErrorReport() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const ErrorReport& rhs) const; - bool operator!=(const ErrorReport& rhs) const; + ///////////////////////////////////////////// + /// ErrorReport members - ///////////////////////////////////////////// - /// ErrorReport members + /// <summary> + /// + /// </summary> + ProblemDetails getError() const; + void setError(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(); - /// <summary> - /// - /// </summary> - ProblemDetails getError() const; - void setError(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); - friend void to_json(nlohmann::json& j, const ErrorReport& o); - friend void from_json(const nlohmann::json& j, ErrorReport& o); -protected: - ProblemDetails m_Error; - bool m_ErrorIsSet; - std::vector<RuleReport> m_RuleReports; - bool m_RuleReportsIsSet; - std::vector<SessionRuleReport> m_SessRuleReports; - bool m_SessRuleReportsIsSet; - + protected: + ProblemDetails m_Error; + bool m_ErrorIsSet; + std::vector<RuleReport> m_RuleReports; + bool m_RuleReportsIsSet; + std::vector<SessionRuleReport> m_SessRuleReports; + bool m_SessRuleReportsIsSet; }; } // namespace model diff --git a/src/api-server/model/EthFlowDescription.cpp b/src/api-server/model/EthFlowDescription.cpp index dc0c7f9..2d77ee5 100755 --- a/src/api-server/model/EthFlowDescription.cpp +++ b/src/api-server/model/EthFlowDescription.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,341 +20,266 @@ 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; - +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()); - } +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 { + 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; +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 (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 (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 (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 (srcMacAddrEndIsSet()) - { - const std::string& value = m_SrcMacAddrEnd; - const std::string currentValuePath = _pathPrefix + ".srcMacAddrEnd"; - - - + if (value.size() > 2) { + success = false; + msg << currentValuePath << ": must have at most 2 elements;"; } - - if (destMacAddrEndIsSet()) - { - const std::string& value = m_DestMacAddrEnd; - const std::string currentValuePath = _pathPrefix + ".destMacAddrEnd"; - - + { // 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 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())) - - ; + 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 !(*this == rhs); +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())) + + ; } -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; - +bool EthFlowDescription::operator!=(const EthFlowDescription& rhs) const { + return !(*this == rhs); } -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; - } - +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; } -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; +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 diff --git a/src/api-server/model/EthFlowDescription.h b/src/api-server/model/EthFlowDescription.h index 3790d19..b65c49e 100755 --- a/src/api-server/model/EthFlowDescription.h +++ b/src/api-server/model/EthFlowDescription.h @@ -1,14 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 * @@ -18,7 +19,6 @@ #ifndef EthFlowDescription_H_ #define EthFlowDescription_H_ - #include "FlowDirection.h" #include <string> #include <vector> @@ -31,111 +31,110 @@ namespace model { /// <summary> /// Identifies an Ethernet flow /// </summary> -class EthFlowDescription -{ -public: - EthFlowDescription(); - virtual ~EthFlowDescription() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const EthFlowDescription& rhs) const; - bool operator!=(const EthFlowDescription& rhs) const; + ///////////////////////////////////////////// + /// EthFlowDescription members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; + 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; - + 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 diff --git a/src/api-server/model/EutraLocation.cpp b/src/api-server/model/EutraLocation.cpp index 5e3fa18..37ce08d 100755 --- a/src/api-server/model/EutraLocation.cpp +++ b/src/api-server/model/EutraLocation.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "EutraLocation.h" #include "Helpers.h" @@ -20,352 +20,290 @@ namespace oai { namespace pcf { namespace model { -EutraLocation::EutraLocation() -{ - m_IgnoreTai = false; - m_IgnoreTaiIsSet = false; - m_IgnoreEcgi = false; - m_IgnoreEcgiIsSet = false; - m_AgeOfLocationInformation = 0; - m_AgeOfLocationInformationIsSet = false; - m_UeLocationTimestamp = ""; - m_UeLocationTimestampIsSet = false; - m_GeographicalInformation = ""; - m_GeographicalInformationIsSet = false; - m_GeodeticInformation = ""; - m_GeodeticInformationIsSet = false; - m_GlobalNgenbIdIsSet = false; - m_GlobalENbIdIsSet = false; - +EutraLocation::EutraLocation() { + m_IgnoreTai = false; + m_IgnoreTaiIsSet = false; + m_IgnoreEcgi = false; + m_IgnoreEcgiIsSet = false; + m_AgeOfLocationInformation = 0; + m_AgeOfLocationInformationIsSet = false; + m_UeLocationTimestamp = ""; + m_UeLocationTimestampIsSet = false; + m_GeographicalInformation = ""; + m_GeographicalInformationIsSet = false; + m_GeodeticInformation = ""; + m_GeodeticInformationIsSet = false; + m_GlobalNgenbIdIsSet = false; + m_GlobalENbIdIsSet = false; } -void EutraLocation::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void EutraLocation::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool EutraLocation::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool EutraLocation::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool EutraLocation::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "EutraLocation" : pathPrefix; +bool EutraLocation::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "EutraLocation" : pathPrefix; - - if (ageOfLocationInformationIsSet()) - { - const int32_t& value = m_AgeOfLocationInformation; - const std::string currentValuePath = _pathPrefix + ".ageOfLocationInformation"; - - - if (value < 0) - { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - if (value > 32767) - { - success = false; - msg << currentValuePath << ": must be less than or equal to 32767;"; - } + if (ageOfLocationInformationIsSet()) { + const int32_t& value = m_AgeOfLocationInformation; + const std::string currentValuePath = + _pathPrefix + ".ageOfLocationInformation"; + if (value < 0) { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0;"; } - - if (geographicalInformationIsSet()) - { - const std::string& value = m_GeographicalInformation; - const std::string currentValuePath = _pathPrefix + ".geographicalInformation"; - - - + if (value > 32767) { + success = false; + msg << currentValuePath << ": must be less than or equal to 32767;"; } - - if (geodeticInformationIsSet()) - { - const std::string& value = m_GeodeticInformation; - const std::string currentValuePath = _pathPrefix + ".geodeticInformation"; - - + } - } - - return success; -} + if (geographicalInformationIsSet()) { + const std::string& value = m_GeographicalInformation; + const std::string currentValuePath = + _pathPrefix + ".geographicalInformation"; + } + + if (geodeticInformationIsSet()) { + const std::string& value = m_GeodeticInformation; + const std::string currentValuePath = _pathPrefix + ".geodeticInformation"; + } -bool EutraLocation::operator==(const EutraLocation& rhs) const -{ - return - - - (getTai() == rhs.getTai()) - && - - - ((!ignoreTaiIsSet() && !rhs.ignoreTaiIsSet()) || (ignoreTaiIsSet() && rhs.ignoreTaiIsSet() && isIgnoreTai() == rhs.isIgnoreTai())) && - - (getEcgi() == rhs.getEcgi()) - && - - - ((!ignoreEcgiIsSet() && !rhs.ignoreEcgiIsSet()) || (ignoreEcgiIsSet() && rhs.ignoreEcgiIsSet() && isIgnoreEcgi() == rhs.isIgnoreEcgi())) && - - - ((!ageOfLocationInformationIsSet() && !rhs.ageOfLocationInformationIsSet()) || (ageOfLocationInformationIsSet() && rhs.ageOfLocationInformationIsSet() && getAgeOfLocationInformation() == rhs.getAgeOfLocationInformation())) && - - - ((!ueLocationTimestampIsSet() && !rhs.ueLocationTimestampIsSet()) || (ueLocationTimestampIsSet() && rhs.ueLocationTimestampIsSet() && getUeLocationTimestamp() == rhs.getUeLocationTimestamp())) && - - - ((!geographicalInformationIsSet() && !rhs.geographicalInformationIsSet()) || (geographicalInformationIsSet() && rhs.geographicalInformationIsSet() && getGeographicalInformation() == rhs.getGeographicalInformation())) && - - - ((!geodeticInformationIsSet() && !rhs.geodeticInformationIsSet()) || (geodeticInformationIsSet() && rhs.geodeticInformationIsSet() && getGeodeticInformation() == rhs.getGeodeticInformation())) && - - - ((!globalNgenbIdIsSet() && !rhs.globalNgenbIdIsSet()) || (globalNgenbIdIsSet() && rhs.globalNgenbIdIsSet() && getGlobalNgenbId() == rhs.getGlobalNgenbId())) && - - - ((!globalENbIdIsSet() && !rhs.globalENbIdIsSet()) || (globalENbIdIsSet() && rhs.globalENbIdIsSet() && getGlobalENbId() == rhs.getGlobalENbId())) - - ; + return success; } -bool EutraLocation::operator!=(const EutraLocation& rhs) const -{ - return !(*this == rhs); +bool EutraLocation::operator==(const EutraLocation& rhs) const { + return + + (getTai() == rhs.getTai()) && + + ((!ignoreTaiIsSet() && !rhs.ignoreTaiIsSet()) || + (ignoreTaiIsSet() && rhs.ignoreTaiIsSet() && + isIgnoreTai() == rhs.isIgnoreTai())) && + + (getEcgi() == rhs.getEcgi()) && + + ((!ignoreEcgiIsSet() && !rhs.ignoreEcgiIsSet()) || + (ignoreEcgiIsSet() && rhs.ignoreEcgiIsSet() && + isIgnoreEcgi() == rhs.isIgnoreEcgi())) && + + ((!ageOfLocationInformationIsSet() && + !rhs.ageOfLocationInformationIsSet()) || + (ageOfLocationInformationIsSet() && + rhs.ageOfLocationInformationIsSet() && + getAgeOfLocationInformation() == rhs.getAgeOfLocationInformation())) && + + ((!ueLocationTimestampIsSet() && !rhs.ueLocationTimestampIsSet()) || + (ueLocationTimestampIsSet() && rhs.ueLocationTimestampIsSet() && + getUeLocationTimestamp() == rhs.getUeLocationTimestamp())) && + + ((!geographicalInformationIsSet() && + !rhs.geographicalInformationIsSet()) || + (geographicalInformationIsSet() && rhs.geographicalInformationIsSet() && + getGeographicalInformation() == rhs.getGeographicalInformation())) && + + ((!geodeticInformationIsSet() && !rhs.geodeticInformationIsSet()) || + (geodeticInformationIsSet() && rhs.geodeticInformationIsSet() && + getGeodeticInformation() == rhs.getGeodeticInformation())) && + + ((!globalNgenbIdIsSet() && !rhs.globalNgenbIdIsSet()) || + (globalNgenbIdIsSet() && rhs.globalNgenbIdIsSet() && + getGlobalNgenbId() == rhs.getGlobalNgenbId())) && + + ((!globalENbIdIsSet() && !rhs.globalENbIdIsSet()) || + (globalENbIdIsSet() && rhs.globalENbIdIsSet() && + getGlobalENbId() == rhs.getGlobalENbId())) + + ; } -void to_json(nlohmann::json& j, const EutraLocation& o) -{ - j = nlohmann::json(); - j["tai"] = o.m_Tai; - if(o.ignoreTaiIsSet()) - j["ignoreTai"] = o.m_IgnoreTai; - j["ecgi"] = o.m_Ecgi; - if(o.ignoreEcgiIsSet()) - j["ignoreEcgi"] = o.m_IgnoreEcgi; - if(o.ageOfLocationInformationIsSet()) - j["ageOfLocationInformation"] = o.m_AgeOfLocationInformation; - if(o.ueLocationTimestampIsSet()) - j["ueLocationTimestamp"] = o.m_UeLocationTimestamp; - if(o.geographicalInformationIsSet()) - j["geographicalInformation"] = o.m_GeographicalInformation; - if(o.geodeticInformationIsSet()) - j["geodeticInformation"] = o.m_GeodeticInformation; - if(o.globalNgenbIdIsSet()) - j["globalNgenbId"] = o.m_GlobalNgenbId; - if(o.globalENbIdIsSet()) - j["globalENbId"] = o.m_GlobalENbId; - +bool EutraLocation::operator!=(const EutraLocation& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, EutraLocation& o) -{ - j.at("tai").get_to(o.m_Tai); - if(j.find("ignoreTai") != j.end()) - { - j.at("ignoreTai").get_to(o.m_IgnoreTai); - o.m_IgnoreTaiIsSet = true; - } - j.at("ecgi").get_to(o.m_Ecgi); - if(j.find("ignoreEcgi") != j.end()) - { - j.at("ignoreEcgi").get_to(o.m_IgnoreEcgi); - o.m_IgnoreEcgiIsSet = true; - } - if(j.find("ageOfLocationInformation") != j.end()) - { - j.at("ageOfLocationInformation").get_to(o.m_AgeOfLocationInformation); - o.m_AgeOfLocationInformationIsSet = true; - } - if(j.find("ueLocationTimestamp") != j.end()) - { - j.at("ueLocationTimestamp").get_to(o.m_UeLocationTimestamp); - o.m_UeLocationTimestampIsSet = true; - } - if(j.find("geographicalInformation") != j.end()) - { - j.at("geographicalInformation").get_to(o.m_GeographicalInformation); - o.m_GeographicalInformationIsSet = true; - } - if(j.find("geodeticInformation") != j.end()) - { - j.at("geodeticInformation").get_to(o.m_GeodeticInformation); - o.m_GeodeticInformationIsSet = true; - } - if(j.find("globalNgenbId") != j.end()) - { - j.at("globalNgenbId").get_to(o.m_GlobalNgenbId); - o.m_GlobalNgenbIdIsSet = true; - } - if(j.find("globalENbId") != j.end()) - { - j.at("globalENbId").get_to(o.m_GlobalENbId); - o.m_GlobalENbIdIsSet = true; - } - +void to_json(nlohmann::json& j, const EutraLocation& o) { + j = nlohmann::json(); + j["tai"] = o.m_Tai; + if (o.ignoreTaiIsSet()) j["ignoreTai"] = o.m_IgnoreTai; + j["ecgi"] = o.m_Ecgi; + if (o.ignoreEcgiIsSet()) j["ignoreEcgi"] = o.m_IgnoreEcgi; + if (o.ageOfLocationInformationIsSet()) + j["ageOfLocationInformation"] = o.m_AgeOfLocationInformation; + if (o.ueLocationTimestampIsSet()) + j["ueLocationTimestamp"] = o.m_UeLocationTimestamp; + if (o.geographicalInformationIsSet()) + j["geographicalInformation"] = o.m_GeographicalInformation; + if (o.geodeticInformationIsSet()) + j["geodeticInformation"] = o.m_GeodeticInformation; + if (o.globalNgenbIdIsSet()) j["globalNgenbId"] = o.m_GlobalNgenbId; + if (o.globalENbIdIsSet()) j["globalENbId"] = o.m_GlobalENbId; } -Tai EutraLocation::getTai() const -{ - return m_Tai; -} -void EutraLocation::setTai(Tai const& value) -{ - m_Tai = value; -} -bool EutraLocation::isIgnoreTai() const -{ - return m_IgnoreTai; -} -void EutraLocation::setIgnoreTai(bool const value) -{ - m_IgnoreTai = value; - m_IgnoreTaiIsSet = true; -} -bool EutraLocation::ignoreTaiIsSet() const -{ - return m_IgnoreTaiIsSet; -} -void EutraLocation::unsetIgnoreTai() -{ - m_IgnoreTaiIsSet = false; -} -Ecgi EutraLocation::getEcgi() const -{ - return m_Ecgi; -} -void EutraLocation::setEcgi(Ecgi const& value) -{ - m_Ecgi = value; -} -bool EutraLocation::isIgnoreEcgi() const -{ - return m_IgnoreEcgi; -} -void EutraLocation::setIgnoreEcgi(bool const value) -{ - m_IgnoreEcgi = value; - m_IgnoreEcgiIsSet = true; -} -bool EutraLocation::ignoreEcgiIsSet() const -{ - return m_IgnoreEcgiIsSet; -} -void EutraLocation::unsetIgnoreEcgi() -{ - m_IgnoreEcgiIsSet = false; -} -int32_t EutraLocation::getAgeOfLocationInformation() const -{ - return m_AgeOfLocationInformation; -} -void EutraLocation::setAgeOfLocationInformation(int32_t const value) -{ - m_AgeOfLocationInformation = value; - m_AgeOfLocationInformationIsSet = true; -} -bool EutraLocation::ageOfLocationInformationIsSet() const -{ - return m_AgeOfLocationInformationIsSet; -} -void EutraLocation::unsetAgeOfLocationInformation() -{ - m_AgeOfLocationInformationIsSet = false; -} -std::string EutraLocation::getUeLocationTimestamp() const -{ - return m_UeLocationTimestamp; -} -void EutraLocation::setUeLocationTimestamp(std::string const& value) -{ - m_UeLocationTimestamp = value; - m_UeLocationTimestampIsSet = true; -} -bool EutraLocation::ueLocationTimestampIsSet() const -{ - return m_UeLocationTimestampIsSet; -} -void EutraLocation::unsetUeLocationTimestamp() -{ - m_UeLocationTimestampIsSet = false; -} -std::string EutraLocation::getGeographicalInformation() const -{ - return m_GeographicalInformation; -} -void EutraLocation::setGeographicalInformation(std::string const& value) -{ - m_GeographicalInformation = value; - m_GeographicalInformationIsSet = true; -} -bool EutraLocation::geographicalInformationIsSet() const -{ - return m_GeographicalInformationIsSet; -} -void EutraLocation::unsetGeographicalInformation() -{ - m_GeographicalInformationIsSet = false; -} -std::string EutraLocation::getGeodeticInformation() const -{ - return m_GeodeticInformation; -} -void EutraLocation::setGeodeticInformation(std::string const& value) -{ - m_GeodeticInformation = value; - m_GeodeticInformationIsSet = true; -} -bool EutraLocation::geodeticInformationIsSet() const -{ - return m_GeodeticInformationIsSet; -} -void EutraLocation::unsetGeodeticInformation() -{ - m_GeodeticInformationIsSet = false; -} -GlobalRanNodeId EutraLocation::getGlobalNgenbId() const -{ - return m_GlobalNgenbId; -} -void EutraLocation::setGlobalNgenbId(GlobalRanNodeId const& value) -{ - m_GlobalNgenbId = value; - m_GlobalNgenbIdIsSet = true; -} -bool EutraLocation::globalNgenbIdIsSet() const -{ - return m_GlobalNgenbIdIsSet; -} -void EutraLocation::unsetGlobalNgenbId() -{ - m_GlobalNgenbIdIsSet = false; -} -GlobalRanNodeId EutraLocation::getGlobalENbId() const -{ - return m_GlobalENbId; -} -void EutraLocation::setGlobalENbId(GlobalRanNodeId const& value) -{ - m_GlobalENbId = value; - m_GlobalENbIdIsSet = true; -} -bool EutraLocation::globalENbIdIsSet() const -{ - return m_GlobalENbIdIsSet; -} -void EutraLocation::unsetGlobalENbId() -{ - m_GlobalENbIdIsSet = false; +void from_json(const nlohmann::json& j, EutraLocation& o) { + j.at("tai").get_to(o.m_Tai); + if (j.find("ignoreTai") != j.end()) { + j.at("ignoreTai").get_to(o.m_IgnoreTai); + o.m_IgnoreTaiIsSet = true; + } + j.at("ecgi").get_to(o.m_Ecgi); + if (j.find("ignoreEcgi") != j.end()) { + j.at("ignoreEcgi").get_to(o.m_IgnoreEcgi); + o.m_IgnoreEcgiIsSet = true; + } + if (j.find("ageOfLocationInformation") != j.end()) { + j.at("ageOfLocationInformation").get_to(o.m_AgeOfLocationInformation); + o.m_AgeOfLocationInformationIsSet = true; + } + if (j.find("ueLocationTimestamp") != j.end()) { + j.at("ueLocationTimestamp").get_to(o.m_UeLocationTimestamp); + o.m_UeLocationTimestampIsSet = true; + } + if (j.find("geographicalInformation") != j.end()) { + j.at("geographicalInformation").get_to(o.m_GeographicalInformation); + o.m_GeographicalInformationIsSet = true; + } + if (j.find("geodeticInformation") != j.end()) { + j.at("geodeticInformation").get_to(o.m_GeodeticInformation); + o.m_GeodeticInformationIsSet = true; + } + if (j.find("globalNgenbId") != j.end()) { + j.at("globalNgenbId").get_to(o.m_GlobalNgenbId); + o.m_GlobalNgenbIdIsSet = true; + } + if (j.find("globalENbId") != j.end()) { + j.at("globalENbId").get_to(o.m_GlobalENbId); + o.m_GlobalENbIdIsSet = true; + } } +Tai EutraLocation::getTai() const { + return m_Tai; +} +void EutraLocation::setTai(Tai const& value) { + m_Tai = value; +} +bool EutraLocation::isIgnoreTai() const { + return m_IgnoreTai; +} +void EutraLocation::setIgnoreTai(bool const value) { + m_IgnoreTai = value; + m_IgnoreTaiIsSet = true; +} +bool EutraLocation::ignoreTaiIsSet() const { + return m_IgnoreTaiIsSet; +} +void EutraLocation::unsetIgnoreTai() { + m_IgnoreTaiIsSet = false; +} +Ecgi EutraLocation::getEcgi() const { + return m_Ecgi; +} +void EutraLocation::setEcgi(Ecgi const& value) { + m_Ecgi = value; +} +bool EutraLocation::isIgnoreEcgi() const { + return m_IgnoreEcgi; +} +void EutraLocation::setIgnoreEcgi(bool const value) { + m_IgnoreEcgi = value; + m_IgnoreEcgiIsSet = true; +} +bool EutraLocation::ignoreEcgiIsSet() const { + return m_IgnoreEcgiIsSet; +} +void EutraLocation::unsetIgnoreEcgi() { + m_IgnoreEcgiIsSet = false; +} +int32_t EutraLocation::getAgeOfLocationInformation() const { + return m_AgeOfLocationInformation; +} +void EutraLocation::setAgeOfLocationInformation(int32_t const value) { + m_AgeOfLocationInformation = value; + m_AgeOfLocationInformationIsSet = true; +} +bool EutraLocation::ageOfLocationInformationIsSet() const { + return m_AgeOfLocationInformationIsSet; +} +void EutraLocation::unsetAgeOfLocationInformation() { + m_AgeOfLocationInformationIsSet = false; +} +std::string EutraLocation::getUeLocationTimestamp() const { + return m_UeLocationTimestamp; +} +void EutraLocation::setUeLocationTimestamp(std::string const& value) { + m_UeLocationTimestamp = value; + m_UeLocationTimestampIsSet = true; +} +bool EutraLocation::ueLocationTimestampIsSet() const { + return m_UeLocationTimestampIsSet; +} +void EutraLocation::unsetUeLocationTimestamp() { + m_UeLocationTimestampIsSet = false; +} +std::string EutraLocation::getGeographicalInformation() const { + return m_GeographicalInformation; +} +void EutraLocation::setGeographicalInformation(std::string const& value) { + m_GeographicalInformation = value; + m_GeographicalInformationIsSet = true; +} +bool EutraLocation::geographicalInformationIsSet() const { + return m_GeographicalInformationIsSet; +} +void EutraLocation::unsetGeographicalInformation() { + m_GeographicalInformationIsSet = false; +} +std::string EutraLocation::getGeodeticInformation() const { + return m_GeodeticInformation; +} +void EutraLocation::setGeodeticInformation(std::string const& value) { + m_GeodeticInformation = value; + m_GeodeticInformationIsSet = true; +} +bool EutraLocation::geodeticInformationIsSet() const { + return m_GeodeticInformationIsSet; +} +void EutraLocation::unsetGeodeticInformation() { + m_GeodeticInformationIsSet = false; +} +GlobalRanNodeId EutraLocation::getGlobalNgenbId() const { + return m_GlobalNgenbId; +} +void EutraLocation::setGlobalNgenbId(GlobalRanNodeId const& value) { + m_GlobalNgenbId = value; + m_GlobalNgenbIdIsSet = true; +} +bool EutraLocation::globalNgenbIdIsSet() const { + return m_GlobalNgenbIdIsSet; +} +void EutraLocation::unsetGlobalNgenbId() { + m_GlobalNgenbIdIsSet = false; +} +GlobalRanNodeId EutraLocation::getGlobalENbId() const { + return m_GlobalENbId; +} +void EutraLocation::setGlobalENbId(GlobalRanNodeId const& value) { + m_GlobalENbId = value; + m_GlobalENbIdIsSet = true; +} +bool EutraLocation::globalENbIdIsSet() const { + return m_GlobalENbIdIsSet; +} +void EutraLocation::unsetGlobalENbId() { + m_GlobalENbIdIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/EutraLocation.h b/src/api-server/model/EutraLocation.h index a975069..f0dfdaf 100755 --- a/src/api-server/model/EutraLocation.h +++ b/src/api-server/model/EutraLocation.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * EutraLocation.h * - * + * */ #ifndef EutraLocation_H_ #define EutraLocation_H_ - #include "Ecgi.h" #include "Tai.h" #include <string> @@ -30,129 +30,128 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class EutraLocation -{ -public: - EutraLocation(); - virtual ~EutraLocation() = 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 EutraLocation& rhs) const; - bool operator!=(const EutraLocation& rhs) const; - - ///////////////////////////////////////////// - /// EutraLocation members - - /// <summary> - /// - /// </summary> - Tai getTai() const; - void setTai(Tai const& value); - /// <summary> - /// - /// </summary> - bool isIgnoreTai() const; - void setIgnoreTai(bool const value); - bool ignoreTaiIsSet() const; - void unsetIgnoreTai(); - /// <summary> - /// - /// </summary> - Ecgi getEcgi() const; - void setEcgi(Ecgi const& value); - /// <summary> - /// - /// </summary> - bool isIgnoreEcgi() const; - void setIgnoreEcgi(bool const value); - bool ignoreEcgiIsSet() const; - void unsetIgnoreEcgi(); - /// <summary> - /// - /// </summary> - int32_t getAgeOfLocationInformation() const; - void setAgeOfLocationInformation(int32_t const value); - bool ageOfLocationInformationIsSet() const; - void unsetAgeOfLocationInformation(); - /// <summary> - /// - /// </summary> - std::string getUeLocationTimestamp() const; - void setUeLocationTimestamp(std::string const& value); - bool ueLocationTimestampIsSet() const; - void unsetUeLocationTimestamp(); - /// <summary> - /// - /// </summary> - std::string getGeographicalInformation() const; - void setGeographicalInformation(std::string const& value); - bool geographicalInformationIsSet() const; - void unsetGeographicalInformation(); - /// <summary> - /// - /// </summary> - std::string getGeodeticInformation() const; - void setGeodeticInformation(std::string const& value); - bool geodeticInformationIsSet() const; - void unsetGeodeticInformation(); - /// <summary> - /// - /// </summary> - GlobalRanNodeId getGlobalNgenbId() const; - void setGlobalNgenbId(GlobalRanNodeId const& value); - bool globalNgenbIdIsSet() const; - void unsetGlobalNgenbId(); - /// <summary> - /// - /// </summary> - GlobalRanNodeId getGlobalENbId() const; - void setGlobalENbId(GlobalRanNodeId const& value); - bool globalENbIdIsSet() const; - void unsetGlobalENbId(); - - friend void to_json(nlohmann::json& j, const EutraLocation& o); - friend void from_json(const nlohmann::json& j, EutraLocation& o); -protected: - Tai m_Tai; - - bool m_IgnoreTai; - bool m_IgnoreTaiIsSet; - Ecgi m_Ecgi; - - bool m_IgnoreEcgi; - bool m_IgnoreEcgiIsSet; - int32_t m_AgeOfLocationInformation; - bool m_AgeOfLocationInformationIsSet; - std::string m_UeLocationTimestamp; - bool m_UeLocationTimestampIsSet; - std::string m_GeographicalInformation; - bool m_GeographicalInformationIsSet; - std::string m_GeodeticInformation; - bool m_GeodeticInformationIsSet; - GlobalRanNodeId m_GlobalNgenbId; - bool m_GlobalNgenbIdIsSet; - GlobalRanNodeId m_GlobalENbId; - bool m_GlobalENbIdIsSet; - +class EutraLocation { + public: + EutraLocation(); + virtual ~EutraLocation() = 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 EutraLocation& rhs) const; + bool operator!=(const EutraLocation& rhs) const; + + ///////////////////////////////////////////// + /// EutraLocation members + + /// <summary> + /// + /// </summary> + Tai getTai() const; + void setTai(Tai const& value); + /// <summary> + /// + /// </summary> + bool isIgnoreTai() const; + void setIgnoreTai(bool const value); + bool ignoreTaiIsSet() const; + void unsetIgnoreTai(); + /// <summary> + /// + /// </summary> + Ecgi getEcgi() const; + void setEcgi(Ecgi const& value); + /// <summary> + /// + /// </summary> + bool isIgnoreEcgi() const; + void setIgnoreEcgi(bool const value); + bool ignoreEcgiIsSet() const; + void unsetIgnoreEcgi(); + /// <summary> + /// + /// </summary> + int32_t getAgeOfLocationInformation() const; + void setAgeOfLocationInformation(int32_t const value); + bool ageOfLocationInformationIsSet() const; + void unsetAgeOfLocationInformation(); + /// <summary> + /// + /// </summary> + std::string getUeLocationTimestamp() const; + void setUeLocationTimestamp(std::string const& value); + bool ueLocationTimestampIsSet() const; + void unsetUeLocationTimestamp(); + /// <summary> + /// + /// </summary> + std::string getGeographicalInformation() const; + void setGeographicalInformation(std::string const& value); + bool geographicalInformationIsSet() const; + void unsetGeographicalInformation(); + /// <summary> + /// + /// </summary> + std::string getGeodeticInformation() const; + void setGeodeticInformation(std::string const& value); + bool geodeticInformationIsSet() const; + void unsetGeodeticInformation(); + /// <summary> + /// + /// </summary> + GlobalRanNodeId getGlobalNgenbId() const; + void setGlobalNgenbId(GlobalRanNodeId const& value); + bool globalNgenbIdIsSet() const; + void unsetGlobalNgenbId(); + /// <summary> + /// + /// </summary> + GlobalRanNodeId getGlobalENbId() const; + void setGlobalENbId(GlobalRanNodeId const& value); + bool globalENbIdIsSet() const; + void unsetGlobalENbId(); + + friend void to_json(nlohmann::json& j, const EutraLocation& o); + friend void from_json(const nlohmann::json& j, EutraLocation& o); + + protected: + Tai m_Tai; + + bool m_IgnoreTai; + bool m_IgnoreTaiIsSet; + Ecgi m_Ecgi; + + bool m_IgnoreEcgi; + bool m_IgnoreEcgiIsSet; + int32_t m_AgeOfLocationInformation; + bool m_AgeOfLocationInformationIsSet; + std::string m_UeLocationTimestamp; + bool m_UeLocationTimestampIsSet; + std::string m_GeographicalInformation; + bool m_GeographicalInformationIsSet; + std::string m_GeodeticInformation; + bool m_GeodeticInformationIsSet; + GlobalRanNodeId m_GlobalNgenbId; + bool m_GlobalNgenbIdIsSet; + GlobalRanNodeId m_GlobalENbId; + bool m_GlobalENbIdIsSet; }; } // namespace model diff --git a/src/api-server/model/FailureCause.cpp b/src/api-server/model/FailureCause.cpp index 5d75fb3..bdadcf5 100755 --- a/src/api-server/model/FailureCause.cpp +++ b/src/api-server/model/FailureCause.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,65 @@ namespace oai { namespace pcf { namespace model { -FailureCause::FailureCause() -{ - -} +FailureCause::FailureCause() {} -void FailureCause::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool FailureCause::operator!=(const FailureCause& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, FailureCause& o) { + from_json(j, o.m_value); } -FailureCause_anyOf FailureCause::getValue() const -{ - return m_value; +FailureCause_anyOf FailureCause::getValue() const { + return m_value; } -void FailureCause::setValue(FailureCause_anyOf value) -{ - m_value = value; +void FailureCause::setValue(FailureCause_anyOf value) { + m_value = value; } -FailureCause_anyOf::eFailureCause_anyOf FailureCause::getEnumValue() const -{ - return m_value.getValue(); +FailureCause_anyOf::eFailureCause_anyOf FailureCause::getEnumValue() const { + return m_value.getValue(); } -void FailureCause::setEnumValue(FailureCause_anyOf::eFailureCause_anyOf value) -{ - m_value.setValue(value); +void FailureCause::setEnumValue(FailureCause_anyOf::eFailureCause_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/FailureCause.h b/src/api-server/model/FailureCause.h index a348cae..e3a07df 100755 --- a/src/api-server/model/FailureCause.h +++ b/src/api-server/model/FailureCause.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class FailureCause -{ -public: - FailureCause(); - virtual ~FailureCause() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const FailureCause& rhs) const; + bool operator!=(const FailureCause& rhs) const; - ///////////////////////////////////////////// - /// FailureCause members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + FailureCause_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/FailureCause_anyOf.cpp b/src/api-server/model/FailureCause_anyOf.cpp index cbac7ad..ab075f6 100755 --- a/src/api-server/model/FailureCause_anyOf.cpp +++ b/src/api-server/model/FailureCause_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,109 +20,93 @@ namespace oai { namespace pcf { namespace model { -FailureCause_anyOf::FailureCause_anyOf() -{ - -} +FailureCause_anyOf::FailureCause_anyOf() {} -void FailureCause_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == FailureCause_anyOf::eFailureCause_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool FailureCause_anyOf::operator!=(const FailureCause_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +FailureCause_anyOf::eFailureCause_anyOf FailureCause_anyOf::getValue() const { + return m_value; } -void FailureCause_anyOf::setValue(FailureCause_anyOf::eFailureCause_anyOf value) -{ - m_value = value; +void FailureCause_anyOf::setValue( + FailureCause_anyOf::eFailureCause_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/FailureCause_anyOf.h b/src/api-server/model/FailureCause_anyOf.h index 6b45b52..26f6c60 100755 --- a/src/api-server/model/FailureCause_anyOf.h +++ b/src/api-server/model/FailureCause_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,55 +26,57 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class FailureCause_anyOf -{ -public: - FailureCause_anyOf(); - virtual ~FailureCause_anyOf() = default; +class FailureCause_anyOf { + public: + FailureCause_anyOf(); + virtual ~FailureCause_anyOf() = default; - enum class eFailureCause_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const FailureCause_anyOf& rhs) const; + bool operator!=(const FailureCause_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// FailureCause_anyOf members - bool operator==(const FailureCause_anyOf& rhs) const; - bool operator!=(const FailureCause_anyOf& rhs) const; + FailureCause_anyOf::eFailureCause_anyOf getValue() const; + void setValue(FailureCause_anyOf::eFailureCause_anyOf value); - ///////////////////////////////////////////// - /// FailureCause_anyOf members + friend void to_json(nlohmann::json& j, const FailureCause_anyOf& o); + friend void from_json(const nlohmann::json& j, FailureCause_anyOf& o); - 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; + protected: + FailureCause_anyOf::eFailureCause_anyOf m_value = + FailureCause_anyOf::eFailureCause_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/FailureCode.cpp b/src/api-server/model/FailureCode.cpp index a017c3e..bd0c0d4 100755 --- a/src/api-server/model/FailureCode.cpp +++ b/src/api-server/model/FailureCode.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,65 @@ namespace oai { namespace pcf { namespace model { -FailureCode::FailureCode() -{ - -} +FailureCode::FailureCode() {} -void FailureCode::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool FailureCode::operator!=(const FailureCode& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, FailureCode& o) { + from_json(j, o.m_value); } -FailureCode_anyOf FailureCode::getValue() const -{ - return m_value; +FailureCode_anyOf FailureCode::getValue() const { + return m_value; } -void FailureCode::setValue(FailureCode_anyOf value) -{ - m_value = value; +void FailureCode::setValue(FailureCode_anyOf value) { + m_value = value; } -FailureCode_anyOf::eFailureCode_anyOf FailureCode::getEnumValue() const -{ - return m_value.getValue(); +FailureCode_anyOf::eFailureCode_anyOf FailureCode::getEnumValue() const { + return m_value.getValue(); } -void FailureCode::setEnumValue(FailureCode_anyOf::eFailureCode_anyOf value) -{ - m_value.setValue(value); +void FailureCode::setEnumValue(FailureCode_anyOf::eFailureCode_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/FailureCode.h b/src/api-server/model/FailureCode.h index eaa25eb..8bbdcee 100755 --- a/src/api-server/model/FailureCode.h +++ b/src/api-server/model/FailureCode.h @@ -1,24 +1,82 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -27,49 +85,108 @@ 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. +/// 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; - +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. 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> + /// 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; + /// <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; + bool operator==(const FailureCode& rhs) const; + bool operator!=(const FailureCode& rhs) const; - ///////////////////////////////////////////// - /// FailureCode members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + FailureCode_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/FailureCode_anyOf.cpp b/src/api-server/model/FailureCode_anyOf.cpp index 0aaa630..2094323 100755 --- a/src/api-server/model/FailureCode_anyOf.cpp +++ b/src/api-server/model/FailureCode_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,211 +20,176 @@ namespace oai { namespace pcf { namespace model { -FailureCode_anyOf::FailureCode_anyOf() -{ - -} +FailureCode_anyOf::FailureCode_anyOf() {} -void FailureCode_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == + FailureCode_anyOf::eFailureCode_anyOf::INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool FailureCode_anyOf::operator!=(const FailureCode_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +FailureCode_anyOf::eFailureCode_anyOf FailureCode_anyOf::getValue() const { + return m_value; } -void FailureCode_anyOf::setValue(FailureCode_anyOf::eFailureCode_anyOf value) -{ - m_value = value; +void FailureCode_anyOf::setValue(FailureCode_anyOf::eFailureCode_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/FailureCode_anyOf.h b/src/api-server/model/FailureCode_anyOf.h index 51deefa..f52ec68 100755 --- a/src/api-server/model/FailureCode_anyOf.h +++ b/src/api-server/model/FailureCode_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,72 +26,74 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class FailureCode_anyOf -{ -public: - FailureCode_anyOf(); - virtual ~FailureCode_anyOf() = default; +class FailureCode_anyOf { + public: + FailureCode_anyOf(); + virtual ~FailureCode_anyOf() = default; - enum class eFailureCode_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const FailureCode_anyOf& rhs) const; + bool operator!=(const FailureCode_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// FailureCode_anyOf members - bool operator==(const FailureCode_anyOf& rhs) const; - bool operator!=(const FailureCode_anyOf& rhs) const; + FailureCode_anyOf::eFailureCode_anyOf getValue() const; + void setValue(FailureCode_anyOf::eFailureCode_anyOf value); - ///////////////////////////////////////////// - /// FailureCode_anyOf members + friend void to_json(nlohmann::json& j, const FailureCode_anyOf& o); + friend void from_json(const nlohmann::json& j, FailureCode_anyOf& o); - 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; + protected: + FailureCode_anyOf::eFailureCode_anyOf m_value = + FailureCode_anyOf::eFailureCode_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/FinalUnitAction.cpp b/src/api-server/model/FinalUnitAction.cpp index 5d6dd11..fe905a4 100755 --- a/src/api-server/model/FinalUnitAction.cpp +++ b/src/api-server/model/FinalUnitAction.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -FinalUnitAction::FinalUnitAction() -{ - -} +FinalUnitAction::FinalUnitAction() {} -void FinalUnitAction::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool FinalUnitAction::operator!=(const FinalUnitAction& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, FinalUnitAction& o) { + from_json(j, o.m_value); } -FinalUnitAction_anyOf FinalUnitAction::getValue() const -{ - return m_value; +FinalUnitAction_anyOf FinalUnitAction::getValue() const { + return m_value; } -void FinalUnitAction::setValue(FinalUnitAction_anyOf value) -{ - m_value = value; +void FinalUnitAction::setValue(FinalUnitAction_anyOf value) { + m_value = value; } -FinalUnitAction_anyOf::eFinalUnitAction_anyOf FinalUnitAction::getEnumValue() const -{ - return m_value.getValue(); +FinalUnitAction_anyOf::eFinalUnitAction_anyOf FinalUnitAction::getEnumValue() + const { + return m_value.getValue(); } -void FinalUnitAction::setEnumValue(FinalUnitAction_anyOf::eFinalUnitAction_anyOf value) -{ - m_value.setValue(value); +void FinalUnitAction::setEnumValue( + FinalUnitAction_anyOf::eFinalUnitAction_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/FinalUnitAction.h b/src/api-server/model/FinalUnitAction.h index 3f5128a..3acaa6d 100755 --- a/src/api-server/model/FinalUnitAction.h +++ b/src/api-server/model/FinalUnitAction.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class FinalUnitAction -{ -public: - FinalUnitAction(); - virtual ~FinalUnitAction() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const FinalUnitAction& rhs) const; + bool operator!=(const FinalUnitAction& rhs) const; - ///////////////////////////////////////////// - /// FinalUnitAction members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + FinalUnitAction_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/FinalUnitAction_anyOf.cpp b/src/api-server/model/FinalUnitAction_anyOf.cpp index e9e60ff..e876dd5 100755 --- a/src/api-server/model/FinalUnitAction_anyOf.cpp +++ b/src/api-server/model/FinalUnitAction_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,103 +20,89 @@ namespace oai { namespace pcf { namespace model { -FinalUnitAction_anyOf::FinalUnitAction_anyOf() -{ - -} +FinalUnitAction_anyOf::FinalUnitAction_anyOf() {} -void FinalUnitAction_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == FinalUnitAction_anyOf::eFinalUnitAction_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool FinalUnitAction_anyOf::operator!=(const FinalUnitAction_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +FinalUnitAction_anyOf::eFinalUnitAction_anyOf FinalUnitAction_anyOf::getValue() + const { + return m_value; } -void FinalUnitAction_anyOf::setValue(FinalUnitAction_anyOf::eFinalUnitAction_anyOf value) -{ - m_value = value; +void FinalUnitAction_anyOf::setValue( + FinalUnitAction_anyOf::eFinalUnitAction_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/FinalUnitAction_anyOf.h b/src/api-server/model/FinalUnitAction_anyOf.h index cfb14bf..a35d751 100755 --- a/src/api-server/model/FinalUnitAction_anyOf.h +++ b/src/api-server/model/FinalUnitAction_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,54 +26,57 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class FinalUnitAction_anyOf -{ -public: - FinalUnitAction_anyOf(); - virtual ~FinalUnitAction_anyOf() = default; +class FinalUnitAction_anyOf { + public: + FinalUnitAction_anyOf(); + virtual ~FinalUnitAction_anyOf() = default; - enum class eFinalUnitAction_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const FinalUnitAction_anyOf& rhs) const; + bool operator!=(const FinalUnitAction_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// FinalUnitAction_anyOf members - bool operator==(const FinalUnitAction_anyOf& rhs) const; - bool operator!=(const FinalUnitAction_anyOf& rhs) const; + FinalUnitAction_anyOf::eFinalUnitAction_anyOf getValue() const; + void setValue(FinalUnitAction_anyOf::eFinalUnitAction_anyOf value); - ///////////////////////////////////////////// - /// FinalUnitAction_anyOf members + friend void to_json(nlohmann::json& j, const FinalUnitAction_anyOf& o); + friend void from_json(const nlohmann::json& j, FinalUnitAction_anyOf& o); - 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; + protected: + FinalUnitAction_anyOf::eFinalUnitAction_anyOf m_value = + FinalUnitAction_anyOf::eFinalUnitAction_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/FlowDirection.cpp b/src/api-server/model/FlowDirection.cpp index a91b019..e167894 100755 --- a/src/api-server/model/FlowDirection.cpp +++ b/src/api-server/model/FlowDirection.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,66 @@ namespace oai { namespace pcf { namespace model { -FlowDirection::FlowDirection() -{ - -} +FlowDirection::FlowDirection() {} -void FlowDirection::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool FlowDirection::operator!=(const FlowDirection& rhs) const -{ - return !(*this == rhs); +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); +void to_json(nlohmann::json& j, const FlowDirection& o) { + j = nlohmann::json(); + to_json(j, o.m_value); } -void from_json(const nlohmann::json& j, FlowDirection& o) -{ - from_json(j, o.m_value); +void from_json(const nlohmann::json& j, FlowDirection& o) { + from_json(j, o.m_value); } -FlowDirection_anyOf FlowDirection::getValue() const -{ - return m_value; +FlowDirection_anyOf FlowDirection::getValue() const { + return m_value; } -void FlowDirection::setValue(FlowDirection_anyOf value) -{ - m_value = value; +void FlowDirection::setValue(FlowDirection_anyOf value) { + m_value = value; } -FlowDirection_anyOf::eFlowDirection_anyOf FlowDirection::getEnumValue() const -{ - return m_value.getValue(); +FlowDirection_anyOf::eFlowDirection_anyOf FlowDirection::getEnumValue() const { + return m_value.getValue(); } -void FlowDirection::setEnumValue(FlowDirection_anyOf::eFlowDirection_anyOf value) -{ - m_value.setValue(value); +void FlowDirection::setEnumValue( + FlowDirection_anyOf::eFlowDirection_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/FlowDirection.h b/src/api-server/model/FlowDirection.h index c4a8fc4..df4f9cb 100755 --- a/src/api-server/model/FlowDirection.h +++ b/src/api-server/model/FlowDirection.h @@ -1,24 +1,33 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -27,49 +36,57 @@ 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. +/// 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; - +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. 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> + /// 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; + /// <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; + bool operator==(const FlowDirection& rhs) const; + bool operator!=(const FlowDirection& rhs) const; - ///////////////////////////////////////////// - /// FlowDirection members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + FlowDirection_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/FlowDirectionRm.cpp b/src/api-server/model/FlowDirectionRm.cpp index b51e3aa..585307e 100755 --- a/src/api-server/model/FlowDirectionRm.cpp +++ b/src/api-server/model/FlowDirectionRm.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,59 +20,46 @@ namespace oai { namespace pcf { namespace model { -FlowDirectionRm::FlowDirectionRm() -{ - -} +FlowDirectionRm::FlowDirectionRm() {} -void FlowDirectionRm::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +bool FlowDirectionRm::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "FlowDirectionRm" : pathPrefix; - - return success; + return success; } // bool FlowDirectionRm::operator==(const FlowDirectionRm& rhs) const // { // return - + // getValue() == rhs.getValue() // ; // } -bool FlowDirectionRm::operator!=(const FlowDirectionRm& rhs) const -{ - return !(*this == rhs); +bool FlowDirectionRm::operator!=(const FlowDirectionRm& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const FlowDirectionRm& o) -{ - j = nlohmann::json(); - +void to_json(nlohmann::json& j, const FlowDirectionRm& o) { + j = nlohmann::json(); } -void from_json(const nlohmann::json& j, FlowDirectionRm& o) -{ - -} - - +void from_json(const nlohmann::json& j, FlowDirectionRm& o) {} } // namespace model } // namespace pcf diff --git a/src/api-server/model/FlowDirectionRm.h b/src/api-server/model/FlowDirectionRm.h index d454f45..f504953 100755 --- a/src/api-server/model/FlowDirectionRm.h +++ b/src/api-server/model/FlowDirectionRm.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,43 +28,41 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class FlowDirectionRm -{ -public: - FlowDirectionRm(); - virtual ~FlowDirectionRm() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const FlowDirectionRm& rhs) const; + bool operator!=(const FlowDirectionRm& rhs) const; - ///////////////////////////////////////////// - /// FlowDirectionRm members + ///////////////////////////////////////////// + /// FlowDirectionRm members + friend void to_json(nlohmann::json& j, const FlowDirectionRm& o); + friend void from_json(const nlohmann::json& j, FlowDirectionRm& o); - friend void to_json(nlohmann::json& j, const FlowDirectionRm& o); - friend void from_json(const nlohmann::json& j, FlowDirectionRm& o); -protected: - + protected: }; } // namespace model diff --git a/src/api-server/model/FlowDirection_anyOf.cpp b/src/api-server/model/FlowDirection_anyOf.cpp index a1f598a..d8dbe76 100755 --- a/src/api-server/model/FlowDirection_anyOf.cpp +++ b/src/api-server/model/FlowDirection_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,109 +20,94 @@ namespace oai { namespace pcf { namespace model { -FlowDirection_anyOf::FlowDirection_anyOf() -{ - -} +FlowDirection_anyOf::FlowDirection_anyOf() {} -void FlowDirection_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == FlowDirection_anyOf::eFlowDirection_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool FlowDirection_anyOf::operator!=(const FlowDirection_anyOf& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, FlowDirection_anyOf& o) -{ - - 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 { - 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()); - } +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; + } +} +void from_json(const nlohmann::json& j, FlowDirection_anyOf& o) { + 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 { + 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; +FlowDirection_anyOf::eFlowDirection_anyOf FlowDirection_anyOf::getValue() + const { + return m_value; } -void FlowDirection_anyOf::setValue(FlowDirection_anyOf::eFlowDirection_anyOf value) -{ - m_value = value; +void FlowDirection_anyOf::setValue( + FlowDirection_anyOf::eFlowDirection_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/FlowDirection_anyOf.h b/src/api-server/model/FlowDirection_anyOf.h index 9ff9a80..236676c 100755 --- a/src/api-server/model/FlowDirection_anyOf.h +++ b/src/api-server/model/FlowDirection_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,55 +26,57 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class FlowDirection_anyOf -{ -public: - FlowDirection_anyOf(); - virtual ~FlowDirection_anyOf() = default; +class FlowDirection_anyOf { + public: + FlowDirection_anyOf(); + virtual ~FlowDirection_anyOf() = default; - enum class eFlowDirection_anyOf { + enum class eFlowDirection_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - DOWNLINK, - UPLINK, - BIDIRECTIONAL, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const FlowDirection_anyOf& rhs) const; + bool operator!=(const FlowDirection_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// FlowDirection_anyOf members - bool operator==(const FlowDirection_anyOf& rhs) const; - bool operator!=(const FlowDirection_anyOf& rhs) const; + FlowDirection_anyOf::eFlowDirection_anyOf getValue() const; + void setValue(FlowDirection_anyOf::eFlowDirection_anyOf value); - ///////////////////////////////////////////// - /// FlowDirection_anyOf members + friend void to_json(nlohmann::json& j, const FlowDirection_anyOf& o); + friend void from_json(const nlohmann::json& j, FlowDirection_anyOf& o); - 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; + protected: + FlowDirection_anyOf::eFlowDirection_anyOf m_value = FlowDirection_anyOf:: + eFlowDirection_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/FlowInformation.cpp b/src/api-server/model/FlowInformation.cpp index e0a7253..47e2736 100755 --- a/src/api-server/model/FlowInformation.cpp +++ b/src/api-server/model/FlowInformation.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,289 +20,238 @@ 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; - +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()); - } +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 { + 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; +bool FlowInformation::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "FlowInformation" : pathPrefix; - - return success; + 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 + + ((!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())) && -bool FlowInformation::operator!=(const FlowInformation& rhs) const -{ - return !(*this == rhs); + ((!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())) + + ; } -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; - +bool FlowInformation::operator!=(const FlowInformation& rhs) const { + return !(*this == rhs); } -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; - } - +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; } -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; +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 diff --git a/src/api-server/model/FlowInformation.h b/src/api-server/model/FlowInformation.h index 55458f3..4cf3ca7 100755 --- a/src/api-server/model/FlowInformation.h +++ b/src/api-server/model/FlowInformation.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -29,115 +29,116 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class FlowInformation -{ -public: - FlowInformation(); - virtual ~FlowInformation() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const FlowInformation& rhs) const; - bool operator!=(const FlowInformation& rhs) const; + ///////////////////////////////////////////// + /// FlowInformation members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; - + 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 diff --git a/src/api-server/model/FlowStatus.cpp b/src/api-server/model/FlowStatus.cpp index eeb963f..1d03a29 100755 --- a/src/api-server/model/FlowStatus.cpp +++ b/src/api-server/model/FlowStatus.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,65 @@ namespace oai { namespace pcf { namespace model { -FlowStatus::FlowStatus() -{ - -} +FlowStatus::FlowStatus() {} -void FlowStatus::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool FlowStatus::operator!=(const FlowStatus& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, FlowStatus& o) { + from_json(j, o.m_value); } -FlowStatus_anyOf FlowStatus::getValue() const -{ - return m_value; +FlowStatus_anyOf FlowStatus::getValue() const { + return m_value; } -void FlowStatus::setValue(FlowStatus_anyOf value) -{ - m_value = value; +void FlowStatus::setValue(FlowStatus_anyOf value) { + m_value = value; } -FlowStatus_anyOf::eFlowStatus_anyOf FlowStatus::getEnumValue() const -{ - return m_value.getValue(); +FlowStatus_anyOf::eFlowStatus_anyOf FlowStatus::getEnumValue() const { + return m_value.getValue(); } -void FlowStatus::setEnumValue(FlowStatus_anyOf::eFlowStatus_anyOf value) -{ - m_value.setValue(value); +void FlowStatus::setEnumValue(FlowStatus_anyOf::eFlowStatus_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/FlowStatus.h b/src/api-server/model/FlowStatus.h index 18af6e5..bcfbdd4 100755 --- a/src/api-server/model/FlowStatus.h +++ b/src/api-server/model/FlowStatus.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class FlowStatus -{ -public: - FlowStatus(); - virtual ~FlowStatus() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const FlowStatus& rhs) const; + bool operator!=(const FlowStatus& rhs) const; - ///////////////////////////////////////////// - /// FlowStatus members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + FlowStatus_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/FlowStatus_anyOf.cpp b/src/api-server/model/FlowStatus_anyOf.cpp index 86b8b78..4503725 100755 --- a/src/api-server/model/FlowStatus_anyOf.cpp +++ b/src/api-server/model/FlowStatus_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,115 +20,96 @@ namespace oai { namespace pcf { namespace model { -FlowStatus_anyOf::FlowStatus_anyOf() -{ - -} +FlowStatus_anyOf::FlowStatus_anyOf() {} -void FlowStatus_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == + FlowStatus_anyOf::eFlowStatus_anyOf::INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool FlowStatus_anyOf::operator!=(const FlowStatus_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +FlowStatus_anyOf::eFlowStatus_anyOf FlowStatus_anyOf::getValue() const { + return m_value; } -void FlowStatus_anyOf::setValue(FlowStatus_anyOf::eFlowStatus_anyOf value) -{ - m_value = value; +void FlowStatus_anyOf::setValue(FlowStatus_anyOf::eFlowStatus_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/FlowStatus_anyOf.h b/src/api-server/model/FlowStatus_anyOf.h index 98f632d..373f7af 100755 --- a/src/api-server/model/FlowStatus_anyOf.h +++ b/src/api-server/model/FlowStatus_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,56 +26,58 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class FlowStatus_anyOf -{ -public: - FlowStatus_anyOf(); - virtual ~FlowStatus_anyOf() = default; +class FlowStatus_anyOf { + public: + FlowStatus_anyOf(); + virtual ~FlowStatus_anyOf() = default; - enum class eFlowStatus_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const FlowStatus_anyOf& rhs) const; + bool operator!=(const FlowStatus_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// FlowStatus_anyOf members - bool operator==(const FlowStatus_anyOf& rhs) const; - bool operator!=(const FlowStatus_anyOf& rhs) const; + FlowStatus_anyOf::eFlowStatus_anyOf getValue() const; + void setValue(FlowStatus_anyOf::eFlowStatus_anyOf value); - ///////////////////////////////////////////// - /// FlowStatus_anyOf members + friend void to_json(nlohmann::json& j, const FlowStatus_anyOf& o); + friend void from_json(const nlohmann::json& j, FlowStatus_anyOf& o); - 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; + protected: + FlowStatus_anyOf::eFlowStatus_anyOf m_value = + FlowStatus_anyOf::eFlowStatus_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/GNbId.cpp b/src/api-server/model/GNbId.cpp index 8630a3c..6211799 100755 --- a/src/api-server/model/GNbId.cpp +++ b/src/api-server/model/GNbId.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "GNbId.h" #include "Helpers.h" @@ -20,116 +20,88 @@ namespace oai { namespace pcf { namespace model { -GNbId::GNbId() -{ - m_BitLength = 0; - m_GNBValue = ""; - +GNbId::GNbId() { + m_BitLength = 0; + m_GNBValue = ""; } -void GNbId::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void GNbId::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool GNbId::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool GNbId::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool GNbId::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "GNbId" : pathPrefix; - - - - /* BitLength */ { - const int32_t& value = m_BitLength; - const std::string currentValuePath = _pathPrefix + ".bitLength"; - - - if (value < 22) - { - success = false; - msg << currentValuePath << ": must be greater than or equal to 22;"; - } - if (value > 32) - { - success = false; - msg << currentValuePath << ": must be less than or equal to 32;"; - } +bool GNbId::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "GNbId" : pathPrefix; - } - - - /* GNBValue */ { - const std::string& value = m_GNBValue; - const std::string currentValuePath = _pathPrefix + ".gNBValue"; - - + /* BitLength */ { + const int32_t& value = m_BitLength; + const std::string currentValuePath = _pathPrefix + ".bitLength"; + if (value < 22) { + success = false; + msg << currentValuePath << ": must be greater than or equal to 22;"; } - - return success; + if (value > 32) { + success = false; + msg << currentValuePath << ": must be less than or equal to 32;"; + } + } + + /* GNBValue */ { + const std::string& value = m_GNBValue; + const std::string currentValuePath = _pathPrefix + ".gNBValue"; + } + + return success; } -bool GNbId::operator==(const GNbId& rhs) const -{ - return - - - (getBitLength() == rhs.getBitLength()) - && - - (getGNBValue() == rhs.getGNBValue()) - - - ; +bool GNbId::operator==(const GNbId& rhs) const { + return + + (getBitLength() == rhs.getBitLength()) && + + (getGNBValue() == rhs.getGNBValue()) + + ; } -bool GNbId::operator!=(const GNbId& rhs) const -{ - return !(*this == rhs); +bool GNbId::operator!=(const GNbId& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const GNbId& o) -{ - j = nlohmann::json(); - j["bitLength"] = o.m_BitLength; - j["gNBValue"] = o.m_GNBValue; - +void to_json(nlohmann::json& j, const GNbId& o) { + j = nlohmann::json(); + j["bitLength"] = o.m_BitLength; + j["gNBValue"] = o.m_GNBValue; } -void from_json(const nlohmann::json& j, GNbId& o) -{ - j.at("bitLength").get_to(o.m_BitLength); - j.at("gNBValue").get_to(o.m_GNBValue); - +void from_json(const nlohmann::json& j, GNbId& o) { + j.at("bitLength").get_to(o.m_BitLength); + j.at("gNBValue").get_to(o.m_GNBValue); } -int32_t GNbId::getBitLength() const -{ - return m_BitLength; +int32_t GNbId::getBitLength() const { + return m_BitLength; } -void GNbId::setBitLength(int32_t const value) -{ - m_BitLength = value; +void GNbId::setBitLength(int32_t const value) { + m_BitLength = value; } -std::string GNbId::getGNBValue() const -{ - return m_GNBValue; +std::string GNbId::getGNBValue() const { + return m_GNBValue; } -void GNbId::setGNBValue(std::string const& value) -{ - m_GNBValue = value; +void GNbId::setGNBValue(std::string const& value) { + m_GNBValue = value; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/GNbId.h b/src/api-server/model/GNbId.h index f3463e9..d96ecce 100755 --- a/src/api-server/model/GNbId.h +++ b/src/api-server/model/GNbId.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * GNbId.h * - * + * */ #ifndef GNbId_H_ #define GNbId_H_ - #include <string> #include <nlohmann/json.hpp> @@ -27,57 +27,55 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class GNbId -{ -public: - GNbId(); - virtual ~GNbId() = 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 GNbId& rhs) const; - bool operator!=(const GNbId& rhs) const; - - ///////////////////////////////////////////// - /// GNbId members - - /// <summary> - /// - /// </summary> - int32_t getBitLength() const; - void setBitLength(int32_t const value); - /// <summary> - /// - /// </summary> - std::string getGNBValue() const; - void setGNBValue(std::string const& value); - - friend void to_json(nlohmann::json& j, const GNbId& o); - friend void from_json(const nlohmann::json& j, GNbId& o); -protected: - int32_t m_BitLength; - - std::string m_GNBValue; - - +class GNbId { + public: + GNbId(); + virtual ~GNbId() = 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 GNbId& rhs) const; + bool operator!=(const GNbId& rhs) const; + + ///////////////////////////////////////////// + /// GNbId members + + /// <summary> + /// + /// </summary> + int32_t getBitLength() const; + void setBitLength(int32_t const value); + /// <summary> + /// + /// </summary> + std::string getGNBValue() const; + void setGNBValue(std::string const& value); + + friend void to_json(nlohmann::json& j, const GNbId& o); + friend void from_json(const nlohmann::json& j, GNbId& o); + + protected: + int32_t m_BitLength; + + std::string m_GNBValue; }; } // namespace model diff --git a/src/api-server/model/GeraLocation.cpp b/src/api-server/model/GeraLocation.cpp index 812ca37..358d380 100755 --- a/src/api-server/model/GeraLocation.cpp +++ b/src/api-server/model/GeraLocation.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "GeraLocation.h" #include "Helpers.h" @@ -20,411 +20,336 @@ namespace oai { namespace pcf { namespace model { -GeraLocation::GeraLocation() -{ - m_LocationNumber = ""; - m_LocationNumberIsSet = false; - m_CgiIsSet = false; - m_RaiIsSet = false; - m_SaiIsSet = false; - m_LaiIsSet = false; - m_VlrNumber = ""; - m_VlrNumberIsSet = false; - m_MscNumber = ""; - m_MscNumberIsSet = false; - m_AgeOfLocationInformation = 0; - m_AgeOfLocationInformationIsSet = false; - m_UeLocationTimestamp = ""; - m_UeLocationTimestampIsSet = false; - m_GeographicalInformation = ""; - m_GeographicalInformationIsSet = false; - m_GeodeticInformation = ""; - m_GeodeticInformationIsSet = false; - +GeraLocation::GeraLocation() { + m_LocationNumber = ""; + m_LocationNumberIsSet = false; + m_CgiIsSet = false; + m_RaiIsSet = false; + m_SaiIsSet = false; + m_LaiIsSet = false; + m_VlrNumber = ""; + m_VlrNumberIsSet = false; + m_MscNumber = ""; + m_MscNumberIsSet = false; + m_AgeOfLocationInformation = 0; + m_AgeOfLocationInformationIsSet = false; + m_UeLocationTimestamp = ""; + m_UeLocationTimestampIsSet = false; + m_GeographicalInformation = ""; + m_GeographicalInformationIsSet = false; + m_GeodeticInformation = ""; + m_GeodeticInformationIsSet = false; } -void GeraLocation::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void GeraLocation::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool GeraLocation::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool GeraLocation::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool GeraLocation::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "GeraLocation" : pathPrefix; +bool GeraLocation::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "GeraLocation" : pathPrefix; - - if (ageOfLocationInformationIsSet()) - { - const int32_t& value = m_AgeOfLocationInformation; - const std::string currentValuePath = _pathPrefix + ".ageOfLocationInformation"; - - - if (value < 0) - { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - if (value > 32767) - { - success = false; - msg << currentValuePath << ": must be less than or equal to 32767;"; - } + if (ageOfLocationInformationIsSet()) { + const int32_t& value = m_AgeOfLocationInformation; + const std::string currentValuePath = + _pathPrefix + ".ageOfLocationInformation"; + if (value < 0) { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0;"; } - - if (geographicalInformationIsSet()) - { - const std::string& value = m_GeographicalInformation; - const std::string currentValuePath = _pathPrefix + ".geographicalInformation"; - - - + if (value > 32767) { + success = false; + msg << currentValuePath << ": must be less than or equal to 32767;"; } - - if (geodeticInformationIsSet()) - { - const std::string& value = m_GeodeticInformation; - const std::string currentValuePath = _pathPrefix + ".geodeticInformation"; - - + } - } - - return success; -} + if (geographicalInformationIsSet()) { + const std::string& value = m_GeographicalInformation; + const std::string currentValuePath = + _pathPrefix + ".geographicalInformation"; + } + + if (geodeticInformationIsSet()) { + const std::string& value = m_GeodeticInformation; + const std::string currentValuePath = _pathPrefix + ".geodeticInformation"; + } -bool GeraLocation::operator==(const GeraLocation& rhs) const -{ - return - - - - ((!locationNumberIsSet() && !rhs.locationNumberIsSet()) || (locationNumberIsSet() && rhs.locationNumberIsSet() && getLocationNumber() == rhs.getLocationNumber())) && - - - ((!cgiIsSet() && !rhs.cgiIsSet()) || (cgiIsSet() && rhs.cgiIsSet() && getCgi() == rhs.getCgi())) && - - - ((!raiIsSet() && !rhs.raiIsSet()) || (raiIsSet() && rhs.raiIsSet() && getRai() == rhs.getRai())) && - - - ((!saiIsSet() && !rhs.saiIsSet()) || (saiIsSet() && rhs.saiIsSet() && getSai() == rhs.getSai())) && - - - ((!laiIsSet() && !rhs.laiIsSet()) || (laiIsSet() && rhs.laiIsSet() && getLai() == rhs.getLai())) && - - - ((!vlrNumberIsSet() && !rhs.vlrNumberIsSet()) || (vlrNumberIsSet() && rhs.vlrNumberIsSet() && getVlrNumber() == rhs.getVlrNumber())) && - - - ((!mscNumberIsSet() && !rhs.mscNumberIsSet()) || (mscNumberIsSet() && rhs.mscNumberIsSet() && getMscNumber() == rhs.getMscNumber())) && - - - ((!ageOfLocationInformationIsSet() && !rhs.ageOfLocationInformationIsSet()) || (ageOfLocationInformationIsSet() && rhs.ageOfLocationInformationIsSet() && getAgeOfLocationInformation() == rhs.getAgeOfLocationInformation())) && - - - ((!ueLocationTimestampIsSet() && !rhs.ueLocationTimestampIsSet()) || (ueLocationTimestampIsSet() && rhs.ueLocationTimestampIsSet() && getUeLocationTimestamp() == rhs.getUeLocationTimestamp())) && - - - ((!geographicalInformationIsSet() && !rhs.geographicalInformationIsSet()) || (geographicalInformationIsSet() && rhs.geographicalInformationIsSet() && getGeographicalInformation() == rhs.getGeographicalInformation())) && - - - ((!geodeticInformationIsSet() && !rhs.geodeticInformationIsSet()) || (geodeticInformationIsSet() && rhs.geodeticInformationIsSet() && getGeodeticInformation() == rhs.getGeodeticInformation())) - - ; + return success; } -bool GeraLocation::operator!=(const GeraLocation& rhs) const -{ - return !(*this == rhs); +bool GeraLocation::operator==(const GeraLocation& rhs) const { + return + + ((!locationNumberIsSet() && !rhs.locationNumberIsSet()) || + (locationNumberIsSet() && rhs.locationNumberIsSet() && + getLocationNumber() == rhs.getLocationNumber())) && + + ((!cgiIsSet() && !rhs.cgiIsSet()) || + (cgiIsSet() && rhs.cgiIsSet() && getCgi() == rhs.getCgi())) && + + ((!raiIsSet() && !rhs.raiIsSet()) || + (raiIsSet() && rhs.raiIsSet() && getRai() == rhs.getRai())) && + + ((!saiIsSet() && !rhs.saiIsSet()) || + (saiIsSet() && rhs.saiIsSet() && getSai() == rhs.getSai())) && + + ((!laiIsSet() && !rhs.laiIsSet()) || + (laiIsSet() && rhs.laiIsSet() && getLai() == rhs.getLai())) && + + ((!vlrNumberIsSet() && !rhs.vlrNumberIsSet()) || + (vlrNumberIsSet() && rhs.vlrNumberIsSet() && + getVlrNumber() == rhs.getVlrNumber())) && + + ((!mscNumberIsSet() && !rhs.mscNumberIsSet()) || + (mscNumberIsSet() && rhs.mscNumberIsSet() && + getMscNumber() == rhs.getMscNumber())) && + + ((!ageOfLocationInformationIsSet() && + !rhs.ageOfLocationInformationIsSet()) || + (ageOfLocationInformationIsSet() && + rhs.ageOfLocationInformationIsSet() && + getAgeOfLocationInformation() == rhs.getAgeOfLocationInformation())) && + + ((!ueLocationTimestampIsSet() && !rhs.ueLocationTimestampIsSet()) || + (ueLocationTimestampIsSet() && rhs.ueLocationTimestampIsSet() && + getUeLocationTimestamp() == rhs.getUeLocationTimestamp())) && + + ((!geographicalInformationIsSet() && + !rhs.geographicalInformationIsSet()) || + (geographicalInformationIsSet() && rhs.geographicalInformationIsSet() && + getGeographicalInformation() == rhs.getGeographicalInformation())) && + + ((!geodeticInformationIsSet() && !rhs.geodeticInformationIsSet()) || + (geodeticInformationIsSet() && rhs.geodeticInformationIsSet() && + getGeodeticInformation() == rhs.getGeodeticInformation())) + + ; } -void to_json(nlohmann::json& j, const GeraLocation& o) -{ - j = nlohmann::json(); - if(o.locationNumberIsSet()) - j["locationNumber"] = o.m_LocationNumber; - if(o.cgiIsSet()) - j["cgi"] = o.m_Cgi; - if(o.raiIsSet()) - j["rai"] = o.m_Rai; - if(o.saiIsSet()) - j["sai"] = o.m_Sai; - if(o.laiIsSet()) - j["lai"] = o.m_Lai; - if(o.vlrNumberIsSet()) - j["vlrNumber"] = o.m_VlrNumber; - if(o.mscNumberIsSet()) - j["mscNumber"] = o.m_MscNumber; - if(o.ageOfLocationInformationIsSet()) - j["ageOfLocationInformation"] = o.m_AgeOfLocationInformation; - if(o.ueLocationTimestampIsSet()) - j["ueLocationTimestamp"] = o.m_UeLocationTimestamp; - if(o.geographicalInformationIsSet()) - j["geographicalInformation"] = o.m_GeographicalInformation; - if(o.geodeticInformationIsSet()) - j["geodeticInformation"] = o.m_GeodeticInformation; - +bool GeraLocation::operator!=(const GeraLocation& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, GeraLocation& o) -{ - if(j.find("locationNumber") != j.end()) - { - j.at("locationNumber").get_to(o.m_LocationNumber); - o.m_LocationNumberIsSet = true; - } - if(j.find("cgi") != j.end()) - { - j.at("cgi").get_to(o.m_Cgi); - o.m_CgiIsSet = true; - } - if(j.find("rai") != j.end()) - { - j.at("rai").get_to(o.m_Rai); - o.m_RaiIsSet = true; - } - if(j.find("sai") != j.end()) - { - j.at("sai").get_to(o.m_Sai); - o.m_SaiIsSet = true; - } - if(j.find("lai") != j.end()) - { - j.at("lai").get_to(o.m_Lai); - o.m_LaiIsSet = true; - } - if(j.find("vlrNumber") != j.end()) - { - j.at("vlrNumber").get_to(o.m_VlrNumber); - o.m_VlrNumberIsSet = true; - } - if(j.find("mscNumber") != j.end()) - { - j.at("mscNumber").get_to(o.m_MscNumber); - o.m_MscNumberIsSet = true; - } - if(j.find("ageOfLocationInformation") != j.end()) - { - j.at("ageOfLocationInformation").get_to(o.m_AgeOfLocationInformation); - o.m_AgeOfLocationInformationIsSet = true; - } - if(j.find("ueLocationTimestamp") != j.end()) - { - j.at("ueLocationTimestamp").get_to(o.m_UeLocationTimestamp); - o.m_UeLocationTimestampIsSet = true; - } - if(j.find("geographicalInformation") != j.end()) - { - j.at("geographicalInformation").get_to(o.m_GeographicalInformation); - o.m_GeographicalInformationIsSet = true; - } - if(j.find("geodeticInformation") != j.end()) - { - j.at("geodeticInformation").get_to(o.m_GeodeticInformation); - o.m_GeodeticInformationIsSet = true; - } - +void to_json(nlohmann::json& j, const GeraLocation& o) { + j = nlohmann::json(); + if (o.locationNumberIsSet()) j["locationNumber"] = o.m_LocationNumber; + if (o.cgiIsSet()) j["cgi"] = o.m_Cgi; + if (o.raiIsSet()) j["rai"] = o.m_Rai; + if (o.saiIsSet()) j["sai"] = o.m_Sai; + if (o.laiIsSet()) j["lai"] = o.m_Lai; + if (o.vlrNumberIsSet()) j["vlrNumber"] = o.m_VlrNumber; + if (o.mscNumberIsSet()) j["mscNumber"] = o.m_MscNumber; + if (o.ageOfLocationInformationIsSet()) + j["ageOfLocationInformation"] = o.m_AgeOfLocationInformation; + if (o.ueLocationTimestampIsSet()) + j["ueLocationTimestamp"] = o.m_UeLocationTimestamp; + if (o.geographicalInformationIsSet()) + j["geographicalInformation"] = o.m_GeographicalInformation; + if (o.geodeticInformationIsSet()) + j["geodeticInformation"] = o.m_GeodeticInformation; } -std::string GeraLocation::getLocationNumber() const -{ - return m_LocationNumber; -} -void GeraLocation::setLocationNumber(std::string const& value) -{ - m_LocationNumber = value; - m_LocationNumberIsSet = true; -} -bool GeraLocation::locationNumberIsSet() const -{ - return m_LocationNumberIsSet; -} -void GeraLocation::unsetLocationNumber() -{ - m_LocationNumberIsSet = false; -} -CellGlobalId GeraLocation::getCgi() const -{ - return m_Cgi; -} -void GeraLocation::setCgi(CellGlobalId const& value) -{ - m_Cgi = value; - m_CgiIsSet = true; -} -bool GeraLocation::cgiIsSet() const -{ - return m_CgiIsSet; -} -void GeraLocation::unsetCgi() -{ - m_CgiIsSet = false; -} -RoutingAreaId GeraLocation::getRai() const -{ - return m_Rai; -} -void GeraLocation::setRai(RoutingAreaId const& value) -{ - m_Rai = value; - m_RaiIsSet = true; -} -bool GeraLocation::raiIsSet() const -{ - return m_RaiIsSet; -} -void GeraLocation::unsetRai() -{ - m_RaiIsSet = false; -} -ServiceAreaId GeraLocation::getSai() const -{ - return m_Sai; -} -void GeraLocation::setSai(ServiceAreaId const& value) -{ - m_Sai = value; - m_SaiIsSet = true; -} -bool GeraLocation::saiIsSet() const -{ - return m_SaiIsSet; -} -void GeraLocation::unsetSai() -{ - m_SaiIsSet = false; -} -LocationAreaId GeraLocation::getLai() const -{ - return m_Lai; -} -void GeraLocation::setLai(LocationAreaId const& value) -{ - m_Lai = value; - m_LaiIsSet = true; -} -bool GeraLocation::laiIsSet() const -{ - return m_LaiIsSet; -} -void GeraLocation::unsetLai() -{ - m_LaiIsSet = false; -} -std::string GeraLocation::getVlrNumber() const -{ - return m_VlrNumber; -} -void GeraLocation::setVlrNumber(std::string const& value) -{ - m_VlrNumber = value; - m_VlrNumberIsSet = true; -} -bool GeraLocation::vlrNumberIsSet() const -{ - return m_VlrNumberIsSet; -} -void GeraLocation::unsetVlrNumber() -{ - m_VlrNumberIsSet = false; -} -std::string GeraLocation::getMscNumber() const -{ - return m_MscNumber; -} -void GeraLocation::setMscNumber(std::string const& value) -{ - m_MscNumber = value; - m_MscNumberIsSet = true; -} -bool GeraLocation::mscNumberIsSet() const -{ - return m_MscNumberIsSet; -} -void GeraLocation::unsetMscNumber() -{ - m_MscNumberIsSet = false; -} -int32_t GeraLocation::getAgeOfLocationInformation() const -{ - return m_AgeOfLocationInformation; -} -void GeraLocation::setAgeOfLocationInformation(int32_t const value) -{ - m_AgeOfLocationInformation = value; - m_AgeOfLocationInformationIsSet = true; -} -bool GeraLocation::ageOfLocationInformationIsSet() const -{ - return m_AgeOfLocationInformationIsSet; -} -void GeraLocation::unsetAgeOfLocationInformation() -{ - m_AgeOfLocationInformationIsSet = false; -} -std::string GeraLocation::getUeLocationTimestamp() const -{ - return m_UeLocationTimestamp; -} -void GeraLocation::setUeLocationTimestamp(std::string const& value) -{ - m_UeLocationTimestamp = value; - m_UeLocationTimestampIsSet = true; -} -bool GeraLocation::ueLocationTimestampIsSet() const -{ - return m_UeLocationTimestampIsSet; -} -void GeraLocation::unsetUeLocationTimestamp() -{ - m_UeLocationTimestampIsSet = false; -} -std::string GeraLocation::getGeographicalInformation() const -{ - return m_GeographicalInformation; -} -void GeraLocation::setGeographicalInformation(std::string const& value) -{ - m_GeographicalInformation = value; - m_GeographicalInformationIsSet = true; -} -bool GeraLocation::geographicalInformationIsSet() const -{ - return m_GeographicalInformationIsSet; -} -void GeraLocation::unsetGeographicalInformation() -{ - m_GeographicalInformationIsSet = false; -} -std::string GeraLocation::getGeodeticInformation() const -{ - return m_GeodeticInformation; -} -void GeraLocation::setGeodeticInformation(std::string const& value) -{ - m_GeodeticInformation = value; - m_GeodeticInformationIsSet = true; -} -bool GeraLocation::geodeticInformationIsSet() const -{ - return m_GeodeticInformationIsSet; -} -void GeraLocation::unsetGeodeticInformation() -{ - m_GeodeticInformationIsSet = false; +void from_json(const nlohmann::json& j, GeraLocation& o) { + if (j.find("locationNumber") != j.end()) { + j.at("locationNumber").get_to(o.m_LocationNumber); + o.m_LocationNumberIsSet = true; + } + if (j.find("cgi") != j.end()) { + j.at("cgi").get_to(o.m_Cgi); + o.m_CgiIsSet = true; + } + if (j.find("rai") != j.end()) { + j.at("rai").get_to(o.m_Rai); + o.m_RaiIsSet = true; + } + if (j.find("sai") != j.end()) { + j.at("sai").get_to(o.m_Sai); + o.m_SaiIsSet = true; + } + if (j.find("lai") != j.end()) { + j.at("lai").get_to(o.m_Lai); + o.m_LaiIsSet = true; + } + if (j.find("vlrNumber") != j.end()) { + j.at("vlrNumber").get_to(o.m_VlrNumber); + o.m_VlrNumberIsSet = true; + } + if (j.find("mscNumber") != j.end()) { + j.at("mscNumber").get_to(o.m_MscNumber); + o.m_MscNumberIsSet = true; + } + if (j.find("ageOfLocationInformation") != j.end()) { + j.at("ageOfLocationInformation").get_to(o.m_AgeOfLocationInformation); + o.m_AgeOfLocationInformationIsSet = true; + } + if (j.find("ueLocationTimestamp") != j.end()) { + j.at("ueLocationTimestamp").get_to(o.m_UeLocationTimestamp); + o.m_UeLocationTimestampIsSet = true; + } + if (j.find("geographicalInformation") != j.end()) { + j.at("geographicalInformation").get_to(o.m_GeographicalInformation); + o.m_GeographicalInformationIsSet = true; + } + if (j.find("geodeticInformation") != j.end()) { + j.at("geodeticInformation").get_to(o.m_GeodeticInformation); + o.m_GeodeticInformationIsSet = true; + } } +std::string GeraLocation::getLocationNumber() const { + return m_LocationNumber; +} +void GeraLocation::setLocationNumber(std::string const& value) { + m_LocationNumber = value; + m_LocationNumberIsSet = true; +} +bool GeraLocation::locationNumberIsSet() const { + return m_LocationNumberIsSet; +} +void GeraLocation::unsetLocationNumber() { + m_LocationNumberIsSet = false; +} +CellGlobalId GeraLocation::getCgi() const { + return m_Cgi; +} +void GeraLocation::setCgi(CellGlobalId const& value) { + m_Cgi = value; + m_CgiIsSet = true; +} +bool GeraLocation::cgiIsSet() const { + return m_CgiIsSet; +} +void GeraLocation::unsetCgi() { + m_CgiIsSet = false; +} +RoutingAreaId GeraLocation::getRai() const { + return m_Rai; +} +void GeraLocation::setRai(RoutingAreaId const& value) { + m_Rai = value; + m_RaiIsSet = true; +} +bool GeraLocation::raiIsSet() const { + return m_RaiIsSet; +} +void GeraLocation::unsetRai() { + m_RaiIsSet = false; +} +ServiceAreaId GeraLocation::getSai() const { + return m_Sai; +} +void GeraLocation::setSai(ServiceAreaId const& value) { + m_Sai = value; + m_SaiIsSet = true; +} +bool GeraLocation::saiIsSet() const { + return m_SaiIsSet; +} +void GeraLocation::unsetSai() { + m_SaiIsSet = false; +} +LocationAreaId GeraLocation::getLai() const { + return m_Lai; +} +void GeraLocation::setLai(LocationAreaId const& value) { + m_Lai = value; + m_LaiIsSet = true; +} +bool GeraLocation::laiIsSet() const { + return m_LaiIsSet; +} +void GeraLocation::unsetLai() { + m_LaiIsSet = false; +} +std::string GeraLocation::getVlrNumber() const { + return m_VlrNumber; +} +void GeraLocation::setVlrNumber(std::string const& value) { + m_VlrNumber = value; + m_VlrNumberIsSet = true; +} +bool GeraLocation::vlrNumberIsSet() const { + return m_VlrNumberIsSet; +} +void GeraLocation::unsetVlrNumber() { + m_VlrNumberIsSet = false; +} +std::string GeraLocation::getMscNumber() const { + return m_MscNumber; +} +void GeraLocation::setMscNumber(std::string const& value) { + m_MscNumber = value; + m_MscNumberIsSet = true; +} +bool GeraLocation::mscNumberIsSet() const { + return m_MscNumberIsSet; +} +void GeraLocation::unsetMscNumber() { + m_MscNumberIsSet = false; +} +int32_t GeraLocation::getAgeOfLocationInformation() const { + return m_AgeOfLocationInformation; +} +void GeraLocation::setAgeOfLocationInformation(int32_t const value) { + m_AgeOfLocationInformation = value; + m_AgeOfLocationInformationIsSet = true; +} +bool GeraLocation::ageOfLocationInformationIsSet() const { + return m_AgeOfLocationInformationIsSet; +} +void GeraLocation::unsetAgeOfLocationInformation() { + m_AgeOfLocationInformationIsSet = false; +} +std::string GeraLocation::getUeLocationTimestamp() const { + return m_UeLocationTimestamp; +} +void GeraLocation::setUeLocationTimestamp(std::string const& value) { + m_UeLocationTimestamp = value; + m_UeLocationTimestampIsSet = true; +} +bool GeraLocation::ueLocationTimestampIsSet() const { + return m_UeLocationTimestampIsSet; +} +void GeraLocation::unsetUeLocationTimestamp() { + m_UeLocationTimestampIsSet = false; +} +std::string GeraLocation::getGeographicalInformation() const { + return m_GeographicalInformation; +} +void GeraLocation::setGeographicalInformation(std::string const& value) { + m_GeographicalInformation = value; + m_GeographicalInformationIsSet = true; +} +bool GeraLocation::geographicalInformationIsSet() const { + return m_GeographicalInformationIsSet; +} +void GeraLocation::unsetGeographicalInformation() { + m_GeographicalInformationIsSet = false; +} +std::string GeraLocation::getGeodeticInformation() const { + return m_GeodeticInformation; +} +void GeraLocation::setGeodeticInformation(std::string const& value) { + m_GeodeticInformation = value; + m_GeodeticInformationIsSet = true; +} +bool GeraLocation::geodeticInformationIsSet() const { + return m_GeodeticInformationIsSet; +} +void GeraLocation::unsetGeodeticInformation() { + m_GeodeticInformationIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/GeraLocation.h b/src/api-server/model/GeraLocation.h index f2f1fe9..df6cae4 100755 --- a/src/api-server/model/GeraLocation.h +++ b/src/api-server/model/GeraLocation.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * GeraLocation.h * - * + * */ #ifndef GeraLocation_H_ #define GeraLocation_H_ - #include "CellGlobalId.h" #include <string> #include "RoutingAreaId.h" @@ -31,142 +31,141 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class GeraLocation -{ -public: - GeraLocation(); - virtual ~GeraLocation() = default; +class GeraLocation { + public: + GeraLocation(); + virtual ~GeraLocation() = 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. 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> - /// 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; - /// <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 GeraLocation& rhs) const; + bool operator!=(const GeraLocation& rhs) const; - bool operator==(const GeraLocation& rhs) const; - bool operator!=(const GeraLocation& rhs) const; + ///////////////////////////////////////////// + /// GeraLocation members - ///////////////////////////////////////////// - /// GeraLocation members + /// <summary> + /// + /// </summary> + std::string getLocationNumber() const; + void setLocationNumber(std::string const& value); + bool locationNumberIsSet() const; + void unsetLocationNumber(); + /// <summary> + /// + /// </summary> + CellGlobalId getCgi() const; + void setCgi(CellGlobalId const& value); + bool cgiIsSet() const; + void unsetCgi(); + /// <summary> + /// + /// </summary> + RoutingAreaId getRai() const; + void setRai(RoutingAreaId const& value); + bool raiIsSet() const; + void unsetRai(); + /// <summary> + /// + /// </summary> + ServiceAreaId getSai() const; + void setSai(ServiceAreaId const& value); + bool saiIsSet() const; + void unsetSai(); + /// <summary> + /// + /// </summary> + LocationAreaId getLai() const; + void setLai(LocationAreaId const& value); + bool laiIsSet() const; + void unsetLai(); + /// <summary> + /// + /// </summary> + std::string getVlrNumber() const; + void setVlrNumber(std::string const& value); + bool vlrNumberIsSet() const; + void unsetVlrNumber(); + /// <summary> + /// + /// </summary> + std::string getMscNumber() const; + void setMscNumber(std::string const& value); + bool mscNumberIsSet() const; + void unsetMscNumber(); + /// <summary> + /// + /// </summary> + int32_t getAgeOfLocationInformation() const; + void setAgeOfLocationInformation(int32_t const value); + bool ageOfLocationInformationIsSet() const; + void unsetAgeOfLocationInformation(); + /// <summary> + /// + /// </summary> + std::string getUeLocationTimestamp() const; + void setUeLocationTimestamp(std::string const& value); + bool ueLocationTimestampIsSet() const; + void unsetUeLocationTimestamp(); + /// <summary> + /// + /// </summary> + std::string getGeographicalInformation() const; + void setGeographicalInformation(std::string const& value); + bool geographicalInformationIsSet() const; + void unsetGeographicalInformation(); + /// <summary> + /// + /// </summary> + std::string getGeodeticInformation() const; + void setGeodeticInformation(std::string const& value); + bool geodeticInformationIsSet() const; + void unsetGeodeticInformation(); - /// <summary> - /// - /// </summary> - std::string getLocationNumber() const; - void setLocationNumber(std::string const& value); - bool locationNumberIsSet() const; - void unsetLocationNumber(); - /// <summary> - /// - /// </summary> - CellGlobalId getCgi() const; - void setCgi(CellGlobalId const& value); - bool cgiIsSet() const; - void unsetCgi(); - /// <summary> - /// - /// </summary> - RoutingAreaId getRai() const; - void setRai(RoutingAreaId const& value); - bool raiIsSet() const; - void unsetRai(); - /// <summary> - /// - /// </summary> - ServiceAreaId getSai() const; - void setSai(ServiceAreaId const& value); - bool saiIsSet() const; - void unsetSai(); - /// <summary> - /// - /// </summary> - LocationAreaId getLai() const; - void setLai(LocationAreaId const& value); - bool laiIsSet() const; - void unsetLai(); - /// <summary> - /// - /// </summary> - std::string getVlrNumber() const; - void setVlrNumber(std::string const& value); - bool vlrNumberIsSet() const; - void unsetVlrNumber(); - /// <summary> - /// - /// </summary> - std::string getMscNumber() const; - void setMscNumber(std::string const& value); - bool mscNumberIsSet() const; - void unsetMscNumber(); - /// <summary> - /// - /// </summary> - int32_t getAgeOfLocationInformation() const; - void setAgeOfLocationInformation(int32_t const value); - bool ageOfLocationInformationIsSet() const; - void unsetAgeOfLocationInformation(); - /// <summary> - /// - /// </summary> - std::string getUeLocationTimestamp() const; - void setUeLocationTimestamp(std::string const& value); - bool ueLocationTimestampIsSet() const; - void unsetUeLocationTimestamp(); - /// <summary> - /// - /// </summary> - std::string getGeographicalInformation() const; - void setGeographicalInformation(std::string const& value); - bool geographicalInformationIsSet() const; - void unsetGeographicalInformation(); - /// <summary> - /// - /// </summary> - std::string getGeodeticInformation() const; - void setGeodeticInformation(std::string const& value); - bool geodeticInformationIsSet() const; - void unsetGeodeticInformation(); + friend void to_json(nlohmann::json& j, const GeraLocation& o); + friend void from_json(const nlohmann::json& j, GeraLocation& o); - friend void to_json(nlohmann::json& j, const GeraLocation& o); - friend void from_json(const nlohmann::json& j, GeraLocation& o); -protected: - std::string m_LocationNumber; - bool m_LocationNumberIsSet; - CellGlobalId m_Cgi; - bool m_CgiIsSet; - RoutingAreaId m_Rai; - bool m_RaiIsSet; - ServiceAreaId m_Sai; - bool m_SaiIsSet; - LocationAreaId m_Lai; - bool m_LaiIsSet; - std::string m_VlrNumber; - bool m_VlrNumberIsSet; - std::string m_MscNumber; - bool m_MscNumberIsSet; - int32_t m_AgeOfLocationInformation; - bool m_AgeOfLocationInformationIsSet; - std::string m_UeLocationTimestamp; - bool m_UeLocationTimestampIsSet; - std::string m_GeographicalInformation; - bool m_GeographicalInformationIsSet; - std::string m_GeodeticInformation; - bool m_GeodeticInformationIsSet; - + protected: + std::string m_LocationNumber; + bool m_LocationNumberIsSet; + CellGlobalId m_Cgi; + bool m_CgiIsSet; + RoutingAreaId m_Rai; + bool m_RaiIsSet; + ServiceAreaId m_Sai; + bool m_SaiIsSet; + LocationAreaId m_Lai; + bool m_LaiIsSet; + std::string m_VlrNumber; + bool m_VlrNumberIsSet; + std::string m_MscNumber; + bool m_MscNumberIsSet; + int32_t m_AgeOfLocationInformation; + bool m_AgeOfLocationInformationIsSet; + std::string m_UeLocationTimestamp; + bool m_UeLocationTimestampIsSet; + std::string m_GeographicalInformation; + bool m_GeographicalInformationIsSet; + std::string m_GeodeticInformation; + bool m_GeodeticInformationIsSet; }; } // namespace model diff --git a/src/api-server/model/GlobalRanNodeId.cpp b/src/api-server/model/GlobalRanNodeId.cpp index 2d9685c..832ce0c 100755 --- a/src/api-server/model/GlobalRanNodeId.cpp +++ b/src/api-server/model/GlobalRanNodeId.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "GlobalRanNodeId.h" #include "Helpers.h" @@ -20,328 +20,251 @@ namespace oai { namespace pcf { namespace model { -GlobalRanNodeId::GlobalRanNodeId() -{ - m_N3IwfId = ""; - m_N3IwfIdIsSet = false; - m_GNbIdIsSet = false; - m_NgeNbId = ""; - m_NgeNbIdIsSet = false; - m_WagfId = ""; - m_WagfIdIsSet = false; - m_TngfId = ""; - m_TngfIdIsSet = false; - m_Nid = ""; - m_NidIsSet = false; - m_ENbId = ""; - m_ENbIdIsSet = false; - +GlobalRanNodeId::GlobalRanNodeId() { + m_N3IwfId = ""; + m_N3IwfIdIsSet = false; + m_GNbIdIsSet = false; + m_NgeNbId = ""; + m_NgeNbIdIsSet = false; + m_WagfId = ""; + m_WagfIdIsSet = false; + m_TngfId = ""; + m_TngfIdIsSet = false; + m_Nid = ""; + m_NidIsSet = false; + m_ENbId = ""; + m_ENbIdIsSet = false; } -void GlobalRanNodeId::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void GlobalRanNodeId::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool GlobalRanNodeId::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool GlobalRanNodeId::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool GlobalRanNodeId::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "GlobalRanNodeId" : pathPrefix; +bool GlobalRanNodeId::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "GlobalRanNodeId" : pathPrefix; - - if (n3IwfIdIsSet()) - { - const std::string& value = m_N3IwfId; - const std::string currentValuePath = _pathPrefix + ".n3IwfId"; - - + if (n3IwfIdIsSet()) { + const std::string& value = m_N3IwfId; + const std::string currentValuePath = _pathPrefix + ".n3IwfId"; + } - } - - if (ngeNbIdIsSet()) - { - const std::string& value = m_NgeNbId; - const std::string currentValuePath = _pathPrefix + ".ngeNbId"; - - + if (ngeNbIdIsSet()) { + const std::string& value = m_NgeNbId; + const std::string currentValuePath = _pathPrefix + ".ngeNbId"; + } - } - - if (wagfIdIsSet()) - { - const std::string& value = m_WagfId; - const std::string currentValuePath = _pathPrefix + ".wagfId"; - - + if (wagfIdIsSet()) { + const std::string& value = m_WagfId; + const std::string currentValuePath = _pathPrefix + ".wagfId"; + } - } - - if (tngfIdIsSet()) - { - const std::string& value = m_TngfId; - const std::string currentValuePath = _pathPrefix + ".tngfId"; - - + if (tngfIdIsSet()) { + const std::string& value = m_TngfId; + const std::string currentValuePath = _pathPrefix + ".tngfId"; + } - } - - if (nidIsSet()) - { - const std::string& value = m_Nid; - const std::string currentValuePath = _pathPrefix + ".nid"; - - + if (nidIsSet()) { + const std::string& value = m_Nid; + const std::string currentValuePath = _pathPrefix + ".nid"; + } - } - - if (eNbIdIsSet()) - { - const std::string& value = m_ENbId; - const std::string currentValuePath = _pathPrefix + ".eNbId"; - - + if (eNbIdIsSet()) { + const std::string& value = m_ENbId; + const std::string currentValuePath = _pathPrefix + ".eNbId"; + } - } - - return success; + return success; } -bool GlobalRanNodeId::operator==(const GlobalRanNodeId& rhs) const -{ - return - - - (getPlmnId() == rhs.getPlmnId()) - && - - - ((!n3IwfIdIsSet() && !rhs.n3IwfIdIsSet()) || (n3IwfIdIsSet() && rhs.n3IwfIdIsSet() && getN3IwfId() == rhs.getN3IwfId())) && - - - ((!gNbIdIsSet() && !rhs.gNbIdIsSet()) || (gNbIdIsSet() && rhs.gNbIdIsSet() && getGNbId() == rhs.getGNbId())) && - - - ((!ngeNbIdIsSet() && !rhs.ngeNbIdIsSet()) || (ngeNbIdIsSet() && rhs.ngeNbIdIsSet() && getNgeNbId() == rhs.getNgeNbId())) && - - - ((!wagfIdIsSet() && !rhs.wagfIdIsSet()) || (wagfIdIsSet() && rhs.wagfIdIsSet() && getWagfId() == rhs.getWagfId())) && - - - ((!tngfIdIsSet() && !rhs.tngfIdIsSet()) || (tngfIdIsSet() && rhs.tngfIdIsSet() && getTngfId() == rhs.getTngfId())) && - - - ((!nidIsSet() && !rhs.nidIsSet()) || (nidIsSet() && rhs.nidIsSet() && getNid() == rhs.getNid())) && - - - ((!eNbIdIsSet() && !rhs.eNbIdIsSet()) || (eNbIdIsSet() && rhs.eNbIdIsSet() && getENbId() == rhs.getENbId())) - - ; -} +bool GlobalRanNodeId::operator==(const GlobalRanNodeId& rhs) const { + return + + (getPlmnId() == rhs.getPlmnId()) && + + ((!n3IwfIdIsSet() && !rhs.n3IwfIdIsSet()) || + (n3IwfIdIsSet() && rhs.n3IwfIdIsSet() && + getN3IwfId() == rhs.getN3IwfId())) && + + ((!gNbIdIsSet() && !rhs.gNbIdIsSet()) || + (gNbIdIsSet() && rhs.gNbIdIsSet() && getGNbId() == rhs.getGNbId())) && + + ((!ngeNbIdIsSet() && !rhs.ngeNbIdIsSet()) || + (ngeNbIdIsSet() && rhs.ngeNbIdIsSet() && + getNgeNbId() == rhs.getNgeNbId())) && + + ((!wagfIdIsSet() && !rhs.wagfIdIsSet()) || + (wagfIdIsSet() && rhs.wagfIdIsSet() && + getWagfId() == rhs.getWagfId())) && + + ((!tngfIdIsSet() && !rhs.tngfIdIsSet()) || + (tngfIdIsSet() && rhs.tngfIdIsSet() && + getTngfId() == rhs.getTngfId())) && + + ((!nidIsSet() && !rhs.nidIsSet()) || + (nidIsSet() && rhs.nidIsSet() && getNid() == rhs.getNid())) && + + ((!eNbIdIsSet() && !rhs.eNbIdIsSet()) || + (eNbIdIsSet() && rhs.eNbIdIsSet() && getENbId() == rhs.getENbId())) -bool GlobalRanNodeId::operator!=(const GlobalRanNodeId& rhs) const -{ - return !(*this == rhs); + ; } -void to_json(nlohmann::json& j, const GlobalRanNodeId& o) -{ - j = nlohmann::json(); - j["plmnId"] = o.m_PlmnId; - if(o.n3IwfIdIsSet()) - j["n3IwfId"] = o.m_N3IwfId; - if(o.gNbIdIsSet()) - j["gNbId"] = o.m_GNbId; - if(o.ngeNbIdIsSet()) - j["ngeNbId"] = o.m_NgeNbId; - if(o.wagfIdIsSet()) - j["wagfId"] = o.m_WagfId; - if(o.tngfIdIsSet()) - j["tngfId"] = o.m_TngfId; - if(o.nidIsSet()) - j["nid"] = o.m_Nid; - if(o.eNbIdIsSet()) - j["eNbId"] = o.m_ENbId; - +bool GlobalRanNodeId::operator!=(const GlobalRanNodeId& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, GlobalRanNodeId& o) -{ - j.at("plmnId").get_to(o.m_PlmnId); - if(j.find("n3IwfId") != j.end()) - { - j.at("n3IwfId").get_to(o.m_N3IwfId); - o.m_N3IwfIdIsSet = true; - } - if(j.find("gNbId") != j.end()) - { - j.at("gNbId").get_to(o.m_GNbId); - o.m_GNbIdIsSet = true; - } - if(j.find("ngeNbId") != j.end()) - { - j.at("ngeNbId").get_to(o.m_NgeNbId); - o.m_NgeNbIdIsSet = true; - } - if(j.find("wagfId") != j.end()) - { - j.at("wagfId").get_to(o.m_WagfId); - o.m_WagfIdIsSet = true; - } - if(j.find("tngfId") != j.end()) - { - j.at("tngfId").get_to(o.m_TngfId); - o.m_TngfIdIsSet = true; - } - if(j.find("nid") != j.end()) - { - j.at("nid").get_to(o.m_Nid); - o.m_NidIsSet = true; - } - if(j.find("eNbId") != j.end()) - { - j.at("eNbId").get_to(o.m_ENbId); - o.m_ENbIdIsSet = true; - } - +void to_json(nlohmann::json& j, const GlobalRanNodeId& o) { + j = nlohmann::json(); + j["plmnId"] = o.m_PlmnId; + if (o.n3IwfIdIsSet()) j["n3IwfId"] = o.m_N3IwfId; + if (o.gNbIdIsSet()) j["gNbId"] = o.m_GNbId; + if (o.ngeNbIdIsSet()) j["ngeNbId"] = o.m_NgeNbId; + if (o.wagfIdIsSet()) j["wagfId"] = o.m_WagfId; + if (o.tngfIdIsSet()) j["tngfId"] = o.m_TngfId; + if (o.nidIsSet()) j["nid"] = o.m_Nid; + if (o.eNbIdIsSet()) j["eNbId"] = o.m_ENbId; } -PlmnId GlobalRanNodeId::getPlmnId() const -{ - return m_PlmnId; -} -void GlobalRanNodeId::setPlmnId(PlmnId const& value) -{ - m_PlmnId = value; -} -std::string GlobalRanNodeId::getN3IwfId() const -{ - return m_N3IwfId; -} -void GlobalRanNodeId::setN3IwfId(std::string const& value) -{ - m_N3IwfId = value; - m_N3IwfIdIsSet = true; -} -bool GlobalRanNodeId::n3IwfIdIsSet() const -{ - return m_N3IwfIdIsSet; -} -void GlobalRanNodeId::unsetN3IwfId() -{ - m_N3IwfIdIsSet = false; -} -GNbId GlobalRanNodeId::getGNbId() const -{ - return m_GNbId; -} -void GlobalRanNodeId::setGNbId(GNbId const& value) -{ - m_GNbId = value; - m_GNbIdIsSet = true; -} -bool GlobalRanNodeId::gNbIdIsSet() const -{ - return m_GNbIdIsSet; -} -void GlobalRanNodeId::unsetGNbId() -{ - m_GNbIdIsSet = false; -} -std::string GlobalRanNodeId::getNgeNbId() const -{ - return m_NgeNbId; -} -void GlobalRanNodeId::setNgeNbId(std::string const& value) -{ - m_NgeNbId = value; - m_NgeNbIdIsSet = true; -} -bool GlobalRanNodeId::ngeNbIdIsSet() const -{ - return m_NgeNbIdIsSet; -} -void GlobalRanNodeId::unsetNgeNbId() -{ - m_NgeNbIdIsSet = false; -} -std::string GlobalRanNodeId::getWagfId() const -{ - return m_WagfId; -} -void GlobalRanNodeId::setWagfId(std::string const& value) -{ - m_WagfId = value; - m_WagfIdIsSet = true; -} -bool GlobalRanNodeId::wagfIdIsSet() const -{ - return m_WagfIdIsSet; -} -void GlobalRanNodeId::unsetWagfId() -{ - m_WagfIdIsSet = false; -} -std::string GlobalRanNodeId::getTngfId() const -{ - return m_TngfId; -} -void GlobalRanNodeId::setTngfId(std::string const& value) -{ - m_TngfId = value; - m_TngfIdIsSet = true; -} -bool GlobalRanNodeId::tngfIdIsSet() const -{ - return m_TngfIdIsSet; -} -void GlobalRanNodeId::unsetTngfId() -{ - m_TngfIdIsSet = false; -} -std::string GlobalRanNodeId::getNid() const -{ - return m_Nid; -} -void GlobalRanNodeId::setNid(std::string const& value) -{ - m_Nid = value; - m_NidIsSet = true; -} -bool GlobalRanNodeId::nidIsSet() const -{ - return m_NidIsSet; -} -void GlobalRanNodeId::unsetNid() -{ - m_NidIsSet = false; -} -std::string GlobalRanNodeId::getENbId() const -{ - return m_ENbId; -} -void GlobalRanNodeId::setENbId(std::string const& value) -{ - m_ENbId = value; - m_ENbIdIsSet = true; -} -bool GlobalRanNodeId::eNbIdIsSet() const -{ - return m_ENbIdIsSet; -} -void GlobalRanNodeId::unsetENbId() -{ - m_ENbIdIsSet = false; +void from_json(const nlohmann::json& j, GlobalRanNodeId& o) { + j.at("plmnId").get_to(o.m_PlmnId); + if (j.find("n3IwfId") != j.end()) { + j.at("n3IwfId").get_to(o.m_N3IwfId); + o.m_N3IwfIdIsSet = true; + } + if (j.find("gNbId") != j.end()) { + j.at("gNbId").get_to(o.m_GNbId); + o.m_GNbIdIsSet = true; + } + if (j.find("ngeNbId") != j.end()) { + j.at("ngeNbId").get_to(o.m_NgeNbId); + o.m_NgeNbIdIsSet = true; + } + if (j.find("wagfId") != j.end()) { + j.at("wagfId").get_to(o.m_WagfId); + o.m_WagfIdIsSet = true; + } + if (j.find("tngfId") != j.end()) { + j.at("tngfId").get_to(o.m_TngfId); + o.m_TngfIdIsSet = true; + } + if (j.find("nid") != j.end()) { + j.at("nid").get_to(o.m_Nid); + o.m_NidIsSet = true; + } + if (j.find("eNbId") != j.end()) { + j.at("eNbId").get_to(o.m_ENbId); + o.m_ENbIdIsSet = true; + } } +PlmnId GlobalRanNodeId::getPlmnId() const { + return m_PlmnId; +} +void GlobalRanNodeId::setPlmnId(PlmnId const& value) { + m_PlmnId = value; +} +std::string GlobalRanNodeId::getN3IwfId() const { + return m_N3IwfId; +} +void GlobalRanNodeId::setN3IwfId(std::string const& value) { + m_N3IwfId = value; + m_N3IwfIdIsSet = true; +} +bool GlobalRanNodeId::n3IwfIdIsSet() const { + return m_N3IwfIdIsSet; +} +void GlobalRanNodeId::unsetN3IwfId() { + m_N3IwfIdIsSet = false; +} +GNbId GlobalRanNodeId::getGNbId() const { + return m_GNbId; +} +void GlobalRanNodeId::setGNbId(GNbId const& value) { + m_GNbId = value; + m_GNbIdIsSet = true; +} +bool GlobalRanNodeId::gNbIdIsSet() const { + return m_GNbIdIsSet; +} +void GlobalRanNodeId::unsetGNbId() { + m_GNbIdIsSet = false; +} +std::string GlobalRanNodeId::getNgeNbId() const { + return m_NgeNbId; +} +void GlobalRanNodeId::setNgeNbId(std::string const& value) { + m_NgeNbId = value; + m_NgeNbIdIsSet = true; +} +bool GlobalRanNodeId::ngeNbIdIsSet() const { + return m_NgeNbIdIsSet; +} +void GlobalRanNodeId::unsetNgeNbId() { + m_NgeNbIdIsSet = false; +} +std::string GlobalRanNodeId::getWagfId() const { + return m_WagfId; +} +void GlobalRanNodeId::setWagfId(std::string const& value) { + m_WagfId = value; + m_WagfIdIsSet = true; +} +bool GlobalRanNodeId::wagfIdIsSet() const { + return m_WagfIdIsSet; +} +void GlobalRanNodeId::unsetWagfId() { + m_WagfIdIsSet = false; +} +std::string GlobalRanNodeId::getTngfId() const { + return m_TngfId; +} +void GlobalRanNodeId::setTngfId(std::string const& value) { + m_TngfId = value; + m_TngfIdIsSet = true; +} +bool GlobalRanNodeId::tngfIdIsSet() const { + return m_TngfIdIsSet; +} +void GlobalRanNodeId::unsetTngfId() { + m_TngfIdIsSet = false; +} +std::string GlobalRanNodeId::getNid() const { + return m_Nid; +} +void GlobalRanNodeId::setNid(std::string const& value) { + m_Nid = value; + m_NidIsSet = true; +} +bool GlobalRanNodeId::nidIsSet() const { + return m_NidIsSet; +} +void GlobalRanNodeId::unsetNid() { + m_NidIsSet = false; +} +std::string GlobalRanNodeId::getENbId() const { + return m_ENbId; +} +void GlobalRanNodeId::setENbId(std::string const& value) { + m_ENbId = value; + m_ENbIdIsSet = true; +} +bool GlobalRanNodeId::eNbIdIsSet() const { + return m_ENbIdIsSet; +} +void GlobalRanNodeId::unsetENbId() { + m_ENbIdIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/GlobalRanNodeId.h b/src/api-server/model/GlobalRanNodeId.h index 81cef41..b0275f4 100755 --- a/src/api-server/model/GlobalRanNodeId.h +++ b/src/api-server/model/GlobalRanNodeId.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * GlobalRanNodeId.h * - * + * */ #ifndef GlobalRanNodeId_H_ #define GlobalRanNodeId_H_ - #include <string> #include "GNbId.h" #include "PlmnId.h" @@ -29,113 +29,112 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class GlobalRanNodeId -{ -public: - GlobalRanNodeId(); - virtual ~GlobalRanNodeId() = default; +class GlobalRanNodeId { + public: + GlobalRanNodeId(); + virtual ~GlobalRanNodeId() = 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. 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> - /// 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; - /// <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 GlobalRanNodeId& rhs) const; + bool operator!=(const GlobalRanNodeId& rhs) const; - bool operator==(const GlobalRanNodeId& rhs) const; - bool operator!=(const GlobalRanNodeId& rhs) const; + ///////////////////////////////////////////// + /// GlobalRanNodeId members - ///////////////////////////////////////////// - /// GlobalRanNodeId members + /// <summary> + /// + /// </summary> + PlmnId getPlmnId() const; + void setPlmnId(PlmnId const& value); + /// <summary> + /// + /// </summary> + std::string getN3IwfId() const; + void setN3IwfId(std::string const& value); + bool n3IwfIdIsSet() const; + void unsetN3IwfId(); + /// <summary> + /// + /// </summary> + GNbId getGNbId() const; + void setGNbId(GNbId const& value); + bool gNbIdIsSet() const; + void unsetGNbId(); + /// <summary> + /// + /// </summary> + std::string getNgeNbId() const; + void setNgeNbId(std::string const& value); + bool ngeNbIdIsSet() const; + void unsetNgeNbId(); + /// <summary> + /// + /// </summary> + std::string getWagfId() const; + void setWagfId(std::string const& value); + bool wagfIdIsSet() const; + void unsetWagfId(); + /// <summary> + /// + /// </summary> + std::string getTngfId() const; + void setTngfId(std::string const& value); + bool tngfIdIsSet() const; + void unsetTngfId(); + /// <summary> + /// + /// </summary> + std::string getNid() const; + void setNid(std::string const& value); + bool nidIsSet() const; + void unsetNid(); + /// <summary> + /// + /// </summary> + std::string getENbId() const; + void setENbId(std::string const& value); + bool eNbIdIsSet() const; + void unsetENbId(); - /// <summary> - /// - /// </summary> - PlmnId getPlmnId() const; - void setPlmnId(PlmnId const& value); - /// <summary> - /// - /// </summary> - std::string getN3IwfId() const; - void setN3IwfId(std::string const& value); - bool n3IwfIdIsSet() const; - void unsetN3IwfId(); - /// <summary> - /// - /// </summary> - GNbId getGNbId() const; - void setGNbId(GNbId const& value); - bool gNbIdIsSet() const; - void unsetGNbId(); - /// <summary> - /// - /// </summary> - std::string getNgeNbId() const; - void setNgeNbId(std::string const& value); - bool ngeNbIdIsSet() const; - void unsetNgeNbId(); - /// <summary> - /// - /// </summary> - std::string getWagfId() const; - void setWagfId(std::string const& value); - bool wagfIdIsSet() const; - void unsetWagfId(); - /// <summary> - /// - /// </summary> - std::string getTngfId() const; - void setTngfId(std::string const& value); - bool tngfIdIsSet() const; - void unsetTngfId(); - /// <summary> - /// - /// </summary> - std::string getNid() const; - void setNid(std::string const& value); - bool nidIsSet() const; - void unsetNid(); - /// <summary> - /// - /// </summary> - std::string getENbId() const; - void setENbId(std::string const& value); - bool eNbIdIsSet() const; - void unsetENbId(); + friend void to_json(nlohmann::json& j, const GlobalRanNodeId& o); + friend void from_json(const nlohmann::json& j, GlobalRanNodeId& o); - friend void to_json(nlohmann::json& j, const GlobalRanNodeId& o); - friend void from_json(const nlohmann::json& j, GlobalRanNodeId& o); -protected: - PlmnId m_PlmnId; + protected: + PlmnId m_PlmnId; - std::string m_N3IwfId; - bool m_N3IwfIdIsSet; - GNbId m_GNbId; - bool m_GNbIdIsSet; - std::string m_NgeNbId; - bool m_NgeNbIdIsSet; - std::string m_WagfId; - bool m_WagfIdIsSet; - std::string m_TngfId; - bool m_TngfIdIsSet; - std::string m_Nid; - bool m_NidIsSet; - std::string m_ENbId; - bool m_ENbIdIsSet; - + std::string m_N3IwfId; + bool m_N3IwfIdIsSet; + GNbId m_GNbId; + bool m_GNbIdIsSet; + std::string m_NgeNbId; + bool m_NgeNbIdIsSet; + std::string m_WagfId; + bool m_WagfIdIsSet; + std::string m_TngfId; + bool m_TngfIdIsSet; + std::string m_Nid; + bool m_NidIsSet; + std::string m_ENbId; + bool m_ENbIdIsSet; }; } // namespace model diff --git a/src/api-server/model/Guami.cpp b/src/api-server/model/Guami.cpp index f9079d7..642bd70 100755 --- a/src/api-server/model/Guami.cpp +++ b/src/api-server/model/Guami.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "Guami.h" #include "Helpers.h" @@ -20,96 +20,73 @@ namespace oai { namespace pcf { namespace model { -Guami::Guami() -{ - m_AmfId = ""; - +Guami::Guami() { + m_AmfId = ""; } -void Guami::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void Guami::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool Guami::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool Guami::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool Guami::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "Guami" : pathPrefix; - - - - /* AmfId */ { - const std::string& value = m_AmfId; - const std::string currentValuePath = _pathPrefix + ".amfId"; - - - - } - - return success; +bool Guami::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "Guami" : pathPrefix; + + /* AmfId */ { + const std::string& value = m_AmfId; + const std::string currentValuePath = _pathPrefix + ".amfId"; + } + + return success; } -bool Guami::operator==(const Guami& rhs) const -{ - return - - - (getPlmnId() == rhs.getPlmnId()) - && - - (getAmfId() == rhs.getAmfId()) - - - ; +bool Guami::operator==(const Guami& rhs) const { + return + + (getPlmnId() == rhs.getPlmnId()) && + + (getAmfId() == rhs.getAmfId()) + + ; } -bool Guami::operator!=(const Guami& rhs) const -{ - return !(*this == rhs); +bool Guami::operator!=(const Guami& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const Guami& o) -{ - j = nlohmann::json(); - j["plmnId"] = o.m_PlmnId; - j["amfId"] = o.m_AmfId; - +void to_json(nlohmann::json& j, const Guami& o) { + j = nlohmann::json(); + j["plmnId"] = o.m_PlmnId; + j["amfId"] = o.m_AmfId; } -void from_json(const nlohmann::json& j, Guami& o) -{ - j.at("plmnId").get_to(o.m_PlmnId); - j.at("amfId").get_to(o.m_AmfId); - +void from_json(const nlohmann::json& j, Guami& o) { + j.at("plmnId").get_to(o.m_PlmnId); + j.at("amfId").get_to(o.m_AmfId); } -PlmnIdNid Guami::getPlmnId() const -{ - return m_PlmnId; +PlmnIdNid Guami::getPlmnId() const { + return m_PlmnId; } -void Guami::setPlmnId(PlmnIdNid const& value) -{ - m_PlmnId = value; +void Guami::setPlmnId(PlmnIdNid const& value) { + m_PlmnId = value; } -std::string Guami::getAmfId() const -{ - return m_AmfId; +std::string Guami::getAmfId() const { + return m_AmfId; } -void Guami::setAmfId(std::string const& value) -{ - m_AmfId = value; +void Guami::setAmfId(std::string const& value) { + m_AmfId = value; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/Guami.h b/src/api-server/model/Guami.h index be40e2c..067df42 100755 --- a/src/api-server/model/Guami.h +++ b/src/api-server/model/Guami.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * Guami.h * - * + * */ #ifndef Guami_H_ #define Guami_H_ - #include "PlmnIdNid.h" #include <string> #include <nlohmann/json.hpp> @@ -28,57 +28,55 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class Guami -{ -public: - Guami(); - virtual ~Guami() = 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 Guami& rhs) const; - bool operator!=(const Guami& rhs) const; - - ///////////////////////////////////////////// - /// Guami members - - /// <summary> - /// - /// </summary> - PlmnIdNid getPlmnId() const; - void setPlmnId(PlmnIdNid const& value); - /// <summary> - /// - /// </summary> - std::string getAmfId() const; - void setAmfId(std::string const& value); - - friend void to_json(nlohmann::json& j, const Guami& o); - friend void from_json(const nlohmann::json& j, Guami& o); -protected: - PlmnIdNid m_PlmnId; - - std::string m_AmfId; - - +class Guami { + public: + Guami(); + virtual ~Guami() = 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 Guami& rhs) const; + bool operator!=(const Guami& rhs) const; + + ///////////////////////////////////////////// + /// Guami members + + /// <summary> + /// + /// </summary> + PlmnIdNid getPlmnId() const; + void setPlmnId(PlmnIdNid const& value); + /// <summary> + /// + /// </summary> + std::string getAmfId() const; + void setAmfId(std::string const& value); + + friend void to_json(nlohmann::json& j, const Guami& o); + friend void from_json(const nlohmann::json& j, Guami& o); + + protected: + PlmnIdNid m_PlmnId; + + std::string m_AmfId; }; } // namespace model diff --git a/src/api-server/model/Helpers.cpp b/src/api-server/model/Helpers.cpp index 1c19b12..64620ee 100755 --- a/src/api-server/model/Helpers.cpp +++ b/src/api-server/model/Helpers.cpp @@ -1,14 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "Helpers.h" #include <regex> @@ -18,128 +19,125 @@ namespace helpers { const std::regex regexRfc3339_date(R"(^(\d{4})\-(\d{2})\-(\d{2})$)"); const std::regex regexRfc3339_date_time( - R"(^(\d{4})\-(\d{2})\-(\d{2})[Tt](\d{2}):(\d{2}):(\d{2})(\.\d+)?([Zz]|([\+\-])(\d{2}):(\d{2}))$)" -); + R"(^(\d{4})\-(\d{2})\-(\d{2})[Tt](\d{2}):(\d{2}):(\d{2})(\.\d+)?([Zz]|([\+\-])(\d{2}):(\d{2}))$)"); +namespace { +// Determine if given year is a leap year +// See RFC 3339, Appendix C https://tools.ietf.org/html/rfc3339#appendix-C +bool isLeapYear(const uint16_t year) { + return (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)); +} -namespace -{ - // Determine if given year is a leap year - // See RFC 3339, Appendix C https://tools.ietf.org/html/rfc3339#appendix-C - bool isLeapYear(const uint16_t year) { - return (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)); - } - - bool validateDateValues(const uint16_t year, const uint16_t month, const uint16_t day) { - return !( - (month == 0 || month > 12) - || (day == 0) - || (month == 2 && day > (28 + (isLeapYear(year) ? 1 : 0))) - || (month <= 7 && day > (30 + month % 2)) - || (month >= 8 && day > (31 - month % 2)) - ); - } +bool validateDateValues( + const uint16_t year, const uint16_t month, const uint16_t day) { + return !( + (month == 0 || month > 12) || (day == 0) || + (month == 2 && day > (28 + (isLeapYear(year) ? 1 : 0))) || + (month <= 7 && day > (30 + month % 2)) || + (month >= 8 && day > (31 - month % 2))); +} - bool validateTimeValues(const uint16_t hours, const uint16_t minutes, const uint16_t seconds) { - return (hours <= 23) && (minutes <= 59) && (seconds <= 60); - } +bool validateTimeValues( + const uint16_t hours, const uint16_t minutes, const uint16_t seconds) { + return (hours <= 23) && (minutes <= 59) && (seconds <= 60); } +} // namespace bool validateRfc3339_date(const std::string& str) { - std::smatch match; - const bool found = std::regex_search(str, match, regexRfc3339_date); - return found && validateDateValues(std::stoi(match[1]), std::stoi(match[2]), std::stoi(match[3])); + std::smatch match; + const bool found = std::regex_search(str, match, regexRfc3339_date); + return found && + validateDateValues( + std::stoi(match[1]), std::stoi(match[2]), std::stoi(match[3])); } bool validateRfc3339_date_time(const std::string& str) { - std::smatch match; - const bool found = std::regex_search(str, match, regexRfc3339_date_time); - return found - && validateDateValues(std::stoi(match[1]), std::stoi(match[2]), std::stoi(match[3])) - && validateTimeValues(std::stoi(match[4]), std::stoi(match[5]), std::stoi(match[6])); -} - -std::string toStringValue(const std::string &value){ - return std::string(value); + std::smatch match; + const bool found = std::regex_search(str, match, regexRfc3339_date_time); + return found && + validateDateValues( + std::stoi(match[1]), std::stoi(match[2]), std::stoi(match[3])) && + validateTimeValues( + std::stoi(match[4]), std::stoi(match[5]), std::stoi(match[6])); } -std::string toStringValue(const int32_t value){ - return std::to_string(value); +std::string toStringValue(const std::string& value) { + return std::string(value); } -std::string toStringValue(const int64_t value){ - return std::to_string(value); +std::string toStringValue(const int32_t value) { + return std::to_string(value); } -std::string toStringValue(const bool value){ - return value ? std::string("true") : std::string("false"); +std::string toStringValue(const int64_t value) { + return std::to_string(value); } -std::string toStringValue(const float value){ - return std::to_string(value); +std::string toStringValue(const bool value) { + return value ? std::string("true") : std::string("false"); } -std::string toStringValue(const double value){ - return std::to_string(value); +std::string toStringValue(const float value) { + return std::to_string(value); } -bool fromStringValue(const std::string &inStr, std::string &value){ - value = std::string(inStr); - return true; +std::string toStringValue(const double value) { + return std::to_string(value); } -bool fromStringValue(const std::string &inStr, int32_t &value){ - try { - value = std::stoi( inStr ); - } - catch (const std::invalid_argument&) { - return false; - } - return true; +bool fromStringValue(const std::string& inStr, std::string& value) { + value = std::string(inStr); + return true; } -bool fromStringValue(const std::string &inStr, int64_t &value){ - try { - value = std::stol( inStr ); - } - catch (const std::invalid_argument&) { - return false; - } - return true; +bool fromStringValue(const std::string& inStr, int32_t& value) { + try { + value = std::stoi(inStr); + } catch (const std::invalid_argument&) { + return false; + } + return true; } -bool fromStringValue(const std::string &inStr, bool &value){ - if (inStr == "true") { - value = true; - return true; - } - if (inStr == "false") { - value = false; - return true; - } +bool fromStringValue(const std::string& inStr, int64_t& value) { + try { + value = std::stol(inStr); + } catch (const std::invalid_argument&) { return false; + } + return true; } -bool fromStringValue(const std::string &inStr, float &value){ - try { - value = std::stof( inStr ); - } - catch (const std::invalid_argument&) { - return false; - } +bool fromStringValue(const std::string& inStr, bool& value) { + if (inStr == "true") { + value = true; + return true; + } + if (inStr == "false") { + value = false; return true; + } + return false; } -bool fromStringValue(const std::string &inStr, double &value){ - try { - value = std::stod( inStr ); - } - catch (const std::invalid_argument&) { - return false; - } - return true; +bool fromStringValue(const std::string& inStr, float& value) { + try { + value = std::stof(inStr); + } catch (const std::invalid_argument&) { + return false; + } + return true; +} + +bool fromStringValue(const std::string& inStr, double& value) { + try { + value = std::stod(inStr); + } catch (const std::invalid_argument&) { + return false; + } + return true; } -} // namespace helpers -} // namespace pcf -} // namespace oai \ No newline at end of file +} // namespace helpers +} // namespace pcf +} // namespace oai \ No newline at end of file diff --git a/src/api-server/model/Helpers.h b/src/api-server/model/Helpers.h index 6936383..cba20ca 100755 --- a/src/api-server/model/Helpers.h +++ b/src/api-server/model/Helpers.h @@ -1,14 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * Helpers.h * @@ -28,113 +29,108 @@ namespace oai { namespace pcf { namespace helpers { +class ValidationException : public std::runtime_error { + public: + explicit ValidationException(const std::string& what) + : std::runtime_error(what) {} + ~ValidationException() override = default; +}; - class ValidationException : public std::runtime_error - { - public: - explicit ValidationException(const std::string& what) - : std::runtime_error(what) - { } - ~ValidationException() override = default; - }; +/// <summary> +/// Validate a string against the full-date definition of RFC 3339, section 5.6. +/// </summary> +bool validateRfc3339_date(const std::string& str); - /// <summary> - /// Validate a string against the full-date definition of RFC 3339, section 5.6. - /// </summary> - bool validateRfc3339_date(const std::string& str); +/// <summary> +/// Validate a string against the date-time definition of RFC 3339, section 5.6. +/// </summary> +bool validateRfc3339_date_time(const std::string& str); - /// <summary> - /// Validate a string against the date-time definition of RFC 3339, section 5.6. - /// </summary> - bool validateRfc3339_date_time(const std::string& str); +namespace sfinae_helpers { +struct NoType {}; +template<typename T1, typename T2> +NoType operator==(const T1&, const T2&); - namespace sfinae_helpers - { - struct NoType {}; - template <typename T1, typename T2> NoType operator==(const T1&, const T2&); +template<typename T1, typename T2> +class EqualsOperatorAvailable { + public: + enum { + value = !std::is_same< + decltype(std::declval<T1>() == std::declval<T2>()), NoType>::value + }; +}; +} // namespace sfinae_helpers - template <typename T1, typename T2> class EqualsOperatorAvailable - { - public: - enum - { - value = !std::is_same< decltype(std::declval<T1>() == std::declval<T2>()), NoType >::value - }; - }; - } // namespace sfinae_helpers - - - /// <summary> - /// Determine if the given vector<T> only has unique elements. T must provide the == operator. - /// </summary> - template <typename T> - bool hasOnlyUniqueItems(const std::vector<T>& vec) - { - static_assert(sfinae_helpers::EqualsOperatorAvailable<T, T>::value, - "hasOnlyUniqueItems<T> cannot be called, passed template type does not provide == operator."); - if (vec.size() <= 1) - { - return true; - } - // Compare every element of vec to every other element of vec. - // This isn't an elegant way to do this, since it's O(n^2), - // but it's the best solution working only with the == operator. - // This could be greatly improved if our models provided a valid hash - // and/or the < operator - for (size_t i = 0; i < vec.size() - 1; i++) - { - for (size_t j = i + 1; j < vec.size(); j++) - { - if (vec[i] == vec[j]) - { - return false; - } - } - } - return true; +/// <summary> +/// Determine if the given vector<T> only has unique elements. T must provide +/// the == operator. +/// </summary> +template<typename T> +bool hasOnlyUniqueItems(const std::vector<T>& vec) { + static_assert( + sfinae_helpers::EqualsOperatorAvailable<T, T>::value, + "hasOnlyUniqueItems<T> cannot be called, passed template type does not " + "provide == operator."); + if (vec.size() <= 1) { + return true; + } + // Compare every element of vec to every other element of vec. + // This isn't an elegant way to do this, since it's O(n^2), + // but it's the best solution working only with the == operator. + // This could be greatly improved if our models provided a valid hash + // and/or the < operator + for (size_t i = 0; i < vec.size() - 1; i++) { + for (size_t j = i + 1; j < vec.size(); j++) { + if (vec[i] == vec[j]) { + return false; + } } + } + return true; +} - std::string toStringValue(const std::string &value); - std::string toStringValue(const int32_t value); - std::string toStringValue(const int64_t value); - std::string toStringValue(const bool value); - std::string toStringValue(const float value); - std::string toStringValue(const double value); +std::string toStringValue(const std::string& value); +std::string toStringValue(const int32_t value); +std::string toStringValue(const int64_t value); +std::string toStringValue(const bool value); +std::string toStringValue(const float value); +std::string toStringValue(const double value); - bool fromStringValue(const std::string &inStr, std::string &value); - bool fromStringValue(const std::string &inStr, int32_t &value); - bool fromStringValue(const std::string &inStr, int64_t &value); - bool fromStringValue(const std::string &inStr, bool &value); - bool fromStringValue(const std::string &inStr, float &value); - bool fromStringValue(const std::string &inStr, double &value); - template<typename T> - bool fromStringValue(const std::vector<std::string> &inStr, std::vector<T> &value){ - try{ - for(auto & item : inStr){ - T itemValue; - if(fromStringValue(item, itemValue)){ - value.push_back(itemValue); - } - } - } - catch(...){ - return false; - } - return value.size() > 0; - } - template<typename T> - bool fromStringValue(const std::string &inStr, std::vector<T> &value, char separator = ','){ - std::vector<std::string> inStrings; - std::istringstream f(inStr); - std::string s; - while (std::getline(f, s, separator)) { - inStrings.push_back(s); - } - return fromStringValue(inStrings, value); +bool fromStringValue(const std::string& inStr, std::string& value); +bool fromStringValue(const std::string& inStr, int32_t& value); +bool fromStringValue(const std::string& inStr, int64_t& value); +bool fromStringValue(const std::string& inStr, bool& value); +bool fromStringValue(const std::string& inStr, float& value); +bool fromStringValue(const std::string& inStr, double& value); +template<typename T> +bool fromStringValue( + const std::vector<std::string>& inStr, std::vector<T>& value) { + try { + for (auto& item : inStr) { + T itemValue; + if (fromStringValue(item, itemValue)) { + value.push_back(itemValue); + } } + } catch (...) { + return false; + } + return value.size() > 0; +} +template<typename T> +bool fromStringValue( + const std::string& inStr, std::vector<T>& value, char separator = ',') { + std::vector<std::string> inStrings; + std::istringstream f(inStr); + std::string s; + while (std::getline(f, s, separator)) { + inStrings.push_back(s); + } + return fromStringValue(inStrings, value); +} -} // namespace helpers -} // namespace pcf -} // namespace oai +} // namespace helpers +} // namespace pcf +} // namespace oai -#endif // Helpers_H_ +#endif // Helpers_H_ diff --git a/src/api-server/model/HfcNodeId.cpp b/src/api-server/model/HfcNodeId.cpp index 58b0c16..5ae7d84 100755 --- a/src/api-server/model/HfcNodeId.cpp +++ b/src/api-server/model/HfcNodeId.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "HfcNodeId.h" #include "Helpers.h" @@ -20,88 +20,68 @@ namespace oai { namespace pcf { namespace model { -HfcNodeId::HfcNodeId() -{ - m_HfcNId = ""; - +HfcNodeId::HfcNodeId() { + m_HfcNId = ""; } -void HfcNodeId::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void HfcNodeId::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool HfcNodeId::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool HfcNodeId::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool HfcNodeId::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "HfcNodeId" : pathPrefix; - - - - /* HfcNId */ { - const std::string& value = m_HfcNId; - const std::string currentValuePath = _pathPrefix + ".hfcNId"; - - - if (value.length() > 6) - { - success = false; - msg << currentValuePath << ": must be at most 6 characters long;"; - } +bool HfcNodeId::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "HfcNodeId" : pathPrefix; + /* HfcNId */ { + const std::string& value = m_HfcNId; + const std::string currentValuePath = _pathPrefix + ".hfcNId"; + + if (value.length() > 6) { + success = false; + msg << currentValuePath << ": must be at most 6 characters long;"; } - - return success; + } + + return success; } -bool HfcNodeId::operator==(const HfcNodeId& rhs) const -{ - return - - - (getHfcNId() == rhs.getHfcNId()) - - - ; +bool HfcNodeId::operator==(const HfcNodeId& rhs) const { + return + + (getHfcNId() == rhs.getHfcNId()) + + ; } -bool HfcNodeId::operator!=(const HfcNodeId& rhs) const -{ - return !(*this == rhs); +bool HfcNodeId::operator!=(const HfcNodeId& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const HfcNodeId& o) -{ - j = nlohmann::json(); - j["hfcNId"] = o.m_HfcNId; - +void to_json(nlohmann::json& j, const HfcNodeId& o) { + j = nlohmann::json(); + j["hfcNId"] = o.m_HfcNId; } -void from_json(const nlohmann::json& j, HfcNodeId& o) -{ - j.at("hfcNId").get_to(o.m_HfcNId); - +void from_json(const nlohmann::json& j, HfcNodeId& o) { + j.at("hfcNId").get_to(o.m_HfcNId); } -std::string HfcNodeId::getHfcNId() const -{ - return m_HfcNId; +std::string HfcNodeId::getHfcNId() const { + return m_HfcNId; } -void HfcNodeId::setHfcNId(std::string const& value) -{ - m_HfcNId = value; +void HfcNodeId::setHfcNId(std::string const& value) { + m_HfcNId = value; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/HfcNodeId.h b/src/api-server/model/HfcNodeId.h index 8681e4d..bda576c 100755 --- a/src/api-server/model/HfcNodeId.h +++ b/src/api-server/model/HfcNodeId.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * HfcNodeId.h * - * + * */ #ifndef HfcNodeId_H_ #define HfcNodeId_H_ - #include <string> #include <nlohmann/json.hpp> @@ -27,50 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class HfcNodeId -{ -public: - HfcNodeId(); - virtual ~HfcNodeId() = default; - +class HfcNodeId { + public: + HfcNodeId(); + virtual ~HfcNodeId() = 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. 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> + /// 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; + /// <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 HfcNodeId& rhs) const; - bool operator!=(const HfcNodeId& rhs) const; + bool operator==(const HfcNodeId& rhs) const; + bool operator!=(const HfcNodeId& rhs) const; - ///////////////////////////////////////////// - /// HfcNodeId members + ///////////////////////////////////////////// + /// HfcNodeId members - /// <summary> - /// - /// </summary> - std::string getHfcNId() const; - void setHfcNId(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getHfcNId() const; + void setHfcNId(std::string const& value); - friend void to_json(nlohmann::json& j, const HfcNodeId& o); - friend void from_json(const nlohmann::json& j, HfcNodeId& o); -protected: - std::string m_HfcNId; + friend void to_json(nlohmann::json& j, const HfcNodeId& o); + friend void from_json(const nlohmann::json& j, HfcNodeId& o); - + protected: + std::string m_HfcNId; }; } // namespace model diff --git a/src/api-server/model/InvalidParam.cpp b/src/api-server/model/InvalidParam.cpp index bae7291..9d06335 100755 --- a/src/api-server/model/InvalidParam.cpp +++ b/src/api-server/model/InvalidParam.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "InvalidParam.h" #include "Helpers.h" @@ -20,103 +20,82 @@ namespace oai { namespace pcf { namespace model { -InvalidParam::InvalidParam() -{ - m_Param = ""; - m_Reason = ""; - m_ReasonIsSet = false; - +InvalidParam::InvalidParam() { + m_Param = ""; + m_Reason = ""; + m_ReasonIsSet = false; } -void InvalidParam::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void InvalidParam::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool InvalidParam::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool InvalidParam::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool InvalidParam::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "InvalidParam" : pathPrefix; +bool InvalidParam::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "InvalidParam" : pathPrefix; - - return success; + return success; } -bool InvalidParam::operator==(const InvalidParam& rhs) const -{ - return - - - (getParam() == rhs.getParam()) - && - - - ((!reasonIsSet() && !rhs.reasonIsSet()) || (reasonIsSet() && rhs.reasonIsSet() && getReason() == rhs.getReason())) - - ; +bool InvalidParam::operator==(const InvalidParam& rhs) const { + return + + (getParam() == rhs.getParam()) && + + ((!reasonIsSet() && !rhs.reasonIsSet()) || + (reasonIsSet() && rhs.reasonIsSet() && getReason() == rhs.getReason())) + + ; } -bool InvalidParam::operator!=(const InvalidParam& rhs) const -{ - return !(*this == rhs); +bool InvalidParam::operator!=(const InvalidParam& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const InvalidParam& o) -{ - j = nlohmann::json(); - j["param"] = o.m_Param; - if(o.reasonIsSet()) - j["reason"] = o.m_Reason; - +void to_json(nlohmann::json& j, const InvalidParam& o) { + j = nlohmann::json(); + j["param"] = o.m_Param; + if (o.reasonIsSet()) j["reason"] = o.m_Reason; } -void from_json(const nlohmann::json& j, InvalidParam& o) -{ - j.at("param").get_to(o.m_Param); - if(j.find("reason") != j.end()) - { - j.at("reason").get_to(o.m_Reason); - o.m_ReasonIsSet = true; - } - +void from_json(const nlohmann::json& j, InvalidParam& o) { + j.at("param").get_to(o.m_Param); + if (j.find("reason") != j.end()) { + j.at("reason").get_to(o.m_Reason); + o.m_ReasonIsSet = true; + } } -std::string InvalidParam::getParam() const -{ - return m_Param; +std::string InvalidParam::getParam() const { + return m_Param; } -void InvalidParam::setParam(std::string const& value) -{ - m_Param = value; +void InvalidParam::setParam(std::string const& value) { + m_Param = value; } -std::string InvalidParam::getReason() const -{ - return m_Reason; +std::string InvalidParam::getReason() const { + return m_Reason; } -void InvalidParam::setReason(std::string const& value) -{ - m_Reason = value; - m_ReasonIsSet = true; +void InvalidParam::setReason(std::string const& value) { + m_Reason = value; + m_ReasonIsSet = true; } -bool InvalidParam::reasonIsSet() const -{ - return m_ReasonIsSet; +bool InvalidParam::reasonIsSet() const { + return m_ReasonIsSet; } -void InvalidParam::unsetReason() -{ - m_ReasonIsSet = false; +void InvalidParam::unsetReason() { + m_ReasonIsSet = false; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/InvalidParam.h b/src/api-server/model/InvalidParam.h index 752674c..e0fea57 100755 --- a/src/api-server/model/InvalidParam.h +++ b/src/api-server/model/InvalidParam.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * InvalidParam.h * - * + * */ #ifndef InvalidParam_H_ #define InvalidParam_H_ - #include <string> #include <nlohmann/json.hpp> @@ -27,59 +27,58 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class InvalidParam -{ -public: - InvalidParam(); - virtual ~InvalidParam() = default; +class InvalidParam { + public: + InvalidParam(); + virtual ~InvalidParam() = 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. 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> - /// 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; - /// <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 InvalidParam& rhs) const; + bool operator!=(const InvalidParam& rhs) const; - bool operator==(const InvalidParam& rhs) const; - bool operator!=(const InvalidParam& rhs) const; + ///////////////////////////////////////////// + /// InvalidParam members - ///////////////////////////////////////////// - /// InvalidParam members + /// <summary> + /// + /// </summary> + std::string getParam() const; + void setParam(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getReason() const; + void setReason(std::string const& value); + bool reasonIsSet() const; + void unsetReason(); - /// <summary> - /// - /// </summary> - std::string getParam() const; - void setParam(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getReason() const; - void setReason(std::string const& value); - bool reasonIsSet() const; - void unsetReason(); + friend void to_json(nlohmann::json& j, const InvalidParam& o); + friend void from_json(const nlohmann::json& j, InvalidParam& o); - friend void to_json(nlohmann::json& j, const InvalidParam& o); - friend void from_json(const nlohmann::json& j, InvalidParam& o); -protected: - std::string m_Param; + protected: + std::string m_Param; - std::string m_Reason; - bool m_ReasonIsSet; - + std::string m_Reason; + bool m_ReasonIsSet; }; } // namespace model diff --git a/src/api-server/model/IpMulticastAddressInfo.cpp b/src/api-server/model/IpMulticastAddressInfo.cpp index 5f95708..279cd73 100755 --- a/src/api-server/model/IpMulticastAddressInfo.cpp +++ b/src/api-server/model/IpMulticastAddressInfo.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,191 +20,153 @@ namespace oai { namespace pcf { namespace model { -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; +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 diff --git a/src/api-server/model/IpMulticastAddressInfo.h b/src/api-server/model/IpMulticastAddressInfo.h index 69d5b98..4984e1d 100755 --- a/src/api-server/model/IpMulticastAddressInfo.h +++ b/src/api-server/model/IpMulticastAddressInfo.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,79 +28,78 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class IpMulticastAddressInfo -{ -public: - IpMulticastAddressInfo(); - virtual ~IpMulticastAddressInfo() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const IpMulticastAddressInfo& rhs) const; - bool operator!=(const IpMulticastAddressInfo& rhs) const; + ///////////////////////////////////////////// + /// IpMulticastAddressInfo members - ///////////////////////////////////////////// - /// 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> + Ipv6Addr getSrcIpv6Addr() const; + void setSrcIpv6Addr(Ipv6Addr const& value); + bool srcIpv6AddrIsSet() const; + void unsetSrcIpv6Addr(); + /// <summary> + /// + /// </summary> + Ipv6Addr getIpv6MulAddr() const; + void setIpv6MulAddr(Ipv6Addr const& value); + bool ipv6MulAddrIsSet() const; + void unsetIpv6MulAddr(); - /// <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> - Ipv6Addr getSrcIpv6Addr() const; - void setSrcIpv6Addr(Ipv6Addr const& value); - bool srcIpv6AddrIsSet() const; - void unsetSrcIpv6Addr(); - /// <summary> - /// - /// </summary> - Ipv6Addr getIpv6MulAddr() const; - void setIpv6MulAddr(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); - 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; - Ipv6Addr m_SrcIpv6Addr; - bool m_SrcIpv6AddrIsSet; - Ipv6Addr m_Ipv6MulAddr; - bool m_Ipv6MulAddrIsSet; - + protected: + std::string m_SrcIpv4Addr; + bool m_SrcIpv4AddrIsSet; + std::string m_Ipv4MulAddr; + bool m_Ipv4MulAddrIsSet; + Ipv6Addr m_SrcIpv6Addr; + bool m_SrcIpv6AddrIsSet; + Ipv6Addr m_Ipv6MulAddr; + bool m_Ipv6MulAddrIsSet; }; } // namespace model diff --git a/src/api-server/model/Ipv6Addr.cpp b/src/api-server/model/Ipv6Addr.cpp index 1938b10..412369d 100755 --- a/src/api-server/model/Ipv6Addr.cpp +++ b/src/api-server/model/Ipv6Addr.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "Ipv6Addr.h" #include "Helpers.h" @@ -20,59 +20,45 @@ namespace oai { namespace pcf { namespace model { -Ipv6Addr::Ipv6Addr() -{ - -} +Ipv6Addr::Ipv6Addr() {} -void Ipv6Addr::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void Ipv6Addr::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool Ipv6Addr::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool Ipv6Addr::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool Ipv6Addr::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "Ipv6Addr" : pathPrefix; +bool Ipv6Addr::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "Ipv6Addr" : pathPrefix; - - return success; + return success; } // bool Ipv6Addr::operator==(const Ipv6Addr& rhs) const // { // return - + // getValue() == rhs.getValue() // ; // } -bool Ipv6Addr::operator!=(const Ipv6Addr& rhs) const -{ - return !(*this == rhs); +bool Ipv6Addr::operator!=(const Ipv6Addr& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const Ipv6Addr& o) -{ - j = nlohmann::json(); - +void to_json(nlohmann::json& j, const Ipv6Addr& o) { + j = nlohmann::json(); } -void from_json(const nlohmann::json& j, Ipv6Addr& o) -{ - -} - - +void from_json(const nlohmann::json& j, Ipv6Addr& o) {} } // namespace model } // namespace pcf diff --git a/src/api-server/model/Ipv6Addr.h b/src/api-server/model/Ipv6Addr.h index 5864a34..ec1f4c0 100755 --- a/src/api-server/model/Ipv6Addr.h +++ b/src/api-server/model/Ipv6Addr.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * Ipv6Addr.h * - * + * */ #ifndef Ipv6Addr_H_ #define Ipv6Addr_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,43 +26,41 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class Ipv6Addr -{ -public: - Ipv6Addr(); - virtual ~Ipv6Addr() = default; - +class Ipv6Addr { + public: + Ipv6Addr(); + virtual ~Ipv6Addr() = 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. 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> + /// 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; + /// <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 Ipv6Addr& rhs) const; - bool operator!=(const Ipv6Addr& rhs) const; + bool operator==(const Ipv6Addr& rhs) const; + bool operator!=(const Ipv6Addr& rhs) const; - ///////////////////////////////////////////// - /// Ipv6Addr members + ///////////////////////////////////////////// + /// Ipv6Addr members + friend void to_json(nlohmann::json& j, const Ipv6Addr& o); + friend void from_json(const nlohmann::json& j, Ipv6Addr& o); - friend void to_json(nlohmann::json& j, const Ipv6Addr& o); - friend void from_json(const nlohmann::json& j, Ipv6Addr& o); -protected: - + protected: }; } // namespace model diff --git a/src/api-server/model/Ipv6Prefix.cpp b/src/api-server/model/Ipv6Prefix.cpp index 8f61b71..07943a4 100755 --- a/src/api-server/model/Ipv6Prefix.cpp +++ b/src/api-server/model/Ipv6Prefix.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "Ipv6Prefix.h" #include "Helpers.h" @@ -20,59 +20,46 @@ namespace oai { namespace pcf { namespace model { -Ipv6Prefix::Ipv6Prefix() -{ - -} +Ipv6Prefix::Ipv6Prefix() {} -void Ipv6Prefix::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void Ipv6Prefix::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool Ipv6Prefix::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool Ipv6Prefix::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool Ipv6Prefix::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "Ipv6Prefix" : pathPrefix; +bool Ipv6Prefix::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "Ipv6Prefix" : pathPrefix; - - return success; + return success; } // bool Ipv6Prefix::operator==(const Ipv6Prefix& rhs) const // { // return - + // getValue() == rhs.getValue() // ; // } -bool Ipv6Prefix::operator!=(const Ipv6Prefix& rhs) const -{ - return !(*this == rhs); +bool Ipv6Prefix::operator!=(const Ipv6Prefix& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const Ipv6Prefix& o) -{ - j = nlohmann::json(); - +void to_json(nlohmann::json& j, const Ipv6Prefix& o) { + j = nlohmann::json(); } -void from_json(const nlohmann::json& j, Ipv6Prefix& o) -{ - -} - - +void from_json(const nlohmann::json& j, Ipv6Prefix& o) {} } // namespace model } // namespace pcf diff --git a/src/api-server/model/Ipv6Prefix.h b/src/api-server/model/Ipv6Prefix.h index acc87dc..d27124f 100755 --- a/src/api-server/model/Ipv6Prefix.h +++ b/src/api-server/model/Ipv6Prefix.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * Ipv6Prefix.h * - * + * */ #ifndef Ipv6Prefix_H_ #define Ipv6Prefix_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,43 +26,41 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class Ipv6Prefix -{ -public: - Ipv6Prefix(); - virtual ~Ipv6Prefix() = default; - +class Ipv6Prefix { + public: + Ipv6Prefix(); + virtual ~Ipv6Prefix() = 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. 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> + /// 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; + /// <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 Ipv6Prefix& rhs) const; - bool operator!=(const Ipv6Prefix& rhs) const; + bool operator==(const Ipv6Prefix& rhs) const; + bool operator!=(const Ipv6Prefix& rhs) const; - ///////////////////////////////////////////// - /// Ipv6Prefix members + ///////////////////////////////////////////// + /// Ipv6Prefix members + friend void to_json(nlohmann::json& j, const Ipv6Prefix& o); + friend void from_json(const nlohmann::json& j, Ipv6Prefix& o); - friend void to_json(nlohmann::json& j, const Ipv6Prefix& o); - friend void from_json(const nlohmann::json& j, Ipv6Prefix& o); -protected: - + protected: }; } // namespace model diff --git a/src/api-server/model/LineType.cpp b/src/api-server/model/LineType.cpp index 7274ba8..4e5e137 100755 --- a/src/api-server/model/LineType.cpp +++ b/src/api-server/model/LineType.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "LineType.h" #include "Helpers.h" @@ -20,80 +20,64 @@ namespace oai { namespace pcf { namespace model { -LineType::LineType() -{ - -} +LineType::LineType() {} -void LineType::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void LineType::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool LineType::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool LineType::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool LineType::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "LineType" : pathPrefix; - - - if (!m_value.validate(msg)) - { - success = false; - } - return success; +bool LineType::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "LineType" : pathPrefix; + + if (!m_value.validate(msg)) { + success = false; + } + return success; } -bool LineType::operator==(const LineType& rhs) const -{ - return - - getValue() == rhs.getValue() - ; +bool LineType::operator==(const LineType& rhs) const { + return + + getValue() == rhs.getValue(); } -bool LineType::operator!=(const LineType& rhs) const -{ - return !(*this == rhs); +bool LineType::operator!=(const LineType& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const LineType& o) -{ - j = nlohmann::json(); - to_json(j, o.m_value); +void to_json(nlohmann::json& j, const LineType& o) { + j = nlohmann::json(); + to_json(j, o.m_value); } -void from_json(const nlohmann::json& j, LineType& o) -{ - from_json(j, o.m_value); +void from_json(const nlohmann::json& j, LineType& o) { + from_json(j, o.m_value); } -LineType_anyOf LineType::getValue() const -{ - return m_value; +LineType_anyOf LineType::getValue() const { + return m_value; } -void LineType::setValue(LineType_anyOf value) -{ - m_value = value; +void LineType::setValue(LineType_anyOf value) { + m_value = value; } -LineType_anyOf::eLineType_anyOf LineType::getEnumValue() const -{ - return m_value.getValue(); +LineType_anyOf::eLineType_anyOf LineType::getEnumValue() const { + return m_value.getValue(); } -void LineType::setEnumValue(LineType_anyOf::eLineType_anyOf value) -{ - m_value.setValue(value); +void LineType::setEnumValue(LineType_anyOf::eLineType_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/LineType.h b/src/api-server/model/LineType.h index b988180..3129fa0 100755 --- a/src/api-server/model/LineType.h +++ b/src/api-server/model/LineType.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * LineType.h * - * Possible values are - DSL: Identifies a DSL line - PON: Identifies a PON line + * Possible values are - DSL: Identifies a DSL line - PON: Identifies a PON line */ #ifndef LineType_H_ #define LineType_H_ - #include "LineType_anyOf.h" #include <nlohmann/json.hpp> @@ -27,49 +27,49 @@ namespace pcf { namespace model { /// <summary> -/// Possible values are - DSL: Identifies a DSL line - PON: Identifies a PON line +/// Possible values are - DSL: Identifies a DSL line - PON: Identifies a PON +/// line /// </summary> -class LineType -{ -public: - LineType(); - virtual ~LineType() = default; - +class LineType { + public: + LineType(); + virtual ~LineType() = 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. 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> + /// 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; + /// <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 LineType& rhs) const; - bool operator!=(const LineType& rhs) const; + bool operator==(const LineType& rhs) const; + bool operator!=(const LineType& rhs) const; - ///////////////////////////////////////////// - /// LineType members + ///////////////////////////////////////////// + /// LineType members + LineType_anyOf getValue() const; + void setValue(LineType_anyOf value); + LineType_anyOf::eLineType_anyOf getEnumValue() const; + void setEnumValue(LineType_anyOf::eLineType_anyOf value); + friend void to_json(nlohmann::json& j, const LineType& o); + friend void from_json(const nlohmann::json& j, LineType& o); + friend void to_json(nlohmann::json& j, const LineType_anyOf& o); + friend void from_json(const nlohmann::json& j, LineType_anyOf& o); - LineType_anyOf getValue() const; - void setValue(LineType_anyOf value); - LineType_anyOf::eLineType_anyOf getEnumValue() const; - void setEnumValue(LineType_anyOf::eLineType_anyOf value); - friend void to_json(nlohmann::json& j, const LineType& o); - friend void from_json(const nlohmann::json& j, LineType& o); - friend void to_json(nlohmann::json& j, const LineType_anyOf& o); - friend void from_json(const nlohmann::json& j, LineType_anyOf& o); -protected: - LineType_anyOf m_value; + protected: + LineType_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/LineType_anyOf.cpp b/src/api-server/model/LineType_anyOf.cpp index ad15224..328d82d 100755 --- a/src/api-server/model/LineType_anyOf.cpp +++ b/src/api-server/model/LineType_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "LineType_anyOf.h" #include "Helpers.h" @@ -20,97 +20,81 @@ namespace oai { namespace pcf { namespace model { -LineType_anyOf::LineType_anyOf() -{ - -} +LineType_anyOf::LineType_anyOf() {} -void LineType_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void LineType_anyOf::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool LineType_anyOf::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool LineType_anyOf::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool LineType_anyOf::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "LineType_anyOf" : pathPrefix; +bool LineType_anyOf::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "LineType_anyOf" : pathPrefix; - - if (m_value == LineType_anyOf::eLineType_anyOf::INVALID_VALUE_OPENAPI_GENERATED) - { - success = false; - msg << _pathPrefix << ": has no value;"; - } + if (m_value == + LineType_anyOf::eLineType_anyOf::INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + return success; } -bool LineType_anyOf::operator==(const LineType_anyOf& rhs) const -{ - return - getValue() == rhs.getValue() - - ; -} +bool LineType_anyOf::operator==(const LineType_anyOf& rhs) const { + return getValue() == rhs.getValue() -bool LineType_anyOf::operator!=(const LineType_anyOf& rhs) const -{ - return !(*this == rhs); + ; } -void to_json(nlohmann::json& j, const LineType_anyOf& o) -{ - j = nlohmann::json(); - - switch (o.getValue()) - { - case LineType_anyOf::eLineType_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case LineType_anyOf::eLineType_anyOf::DSL: - j = "DSL"; - break; - case LineType_anyOf::eLineType_anyOf::PON: - j = "PON"; - break; - } +bool LineType_anyOf::operator!=(const LineType_anyOf& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, LineType_anyOf& o) -{ - - auto s = j.get<std::string>(); - if (s == "DSL") { - o.setValue(LineType_anyOf::eLineType_anyOf::DSL); - } - else if (s == "PON") { - o.setValue(LineType_anyOf::eLineType_anyOf::PON); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " LineType_anyOf::eLineType_anyOf"; - throw std::invalid_argument(ss.str()); - } +void to_json(nlohmann::json& j, const LineType_anyOf& o) { + j = nlohmann::json(); + + switch (o.getValue()) { + case LineType_anyOf::eLineType_anyOf::INVALID_VALUE_OPENAPI_GENERATED: + j = "INVALID_VALUE_OPENAPI_GENERATED"; + break; + case LineType_anyOf::eLineType_anyOf::DSL: + j = "DSL"; + break; + case LineType_anyOf::eLineType_anyOf::PON: + j = "PON"; + break; + } +} +void from_json(const nlohmann::json& j, LineType_anyOf& o) { + auto s = j.get<std::string>(); + if (s == "DSL") { + o.setValue(LineType_anyOf::eLineType_anyOf::DSL); + } else if (s == "PON") { + o.setValue(LineType_anyOf::eLineType_anyOf::PON); + } else { + std::stringstream ss; + ss << "Unexpected value " << s << " in json" + << " cannot be converted to enum of type" + << " LineType_anyOf::eLineType_anyOf"; + throw std::invalid_argument(ss.str()); + } } -LineType_anyOf::eLineType_anyOf LineType_anyOf::getValue() const -{ - return m_value; +LineType_anyOf::eLineType_anyOf LineType_anyOf::getValue() const { + return m_value; } -void LineType_anyOf::setValue(LineType_anyOf::eLineType_anyOf value) -{ - m_value = value; +void LineType_anyOf::setValue(LineType_anyOf::eLineType_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/LineType_anyOf.h b/src/api-server/model/LineType_anyOf.h index 19c9a97..e62a9b1 100755 --- a/src/api-server/model/LineType_anyOf.h +++ b/src/api-server/model/LineType_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * LineType_anyOf.h * - * + * */ #ifndef LineType_anyOf_H_ #define LineType_anyOf_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,53 +26,55 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class LineType_anyOf -{ -public: - LineType_anyOf(); - virtual ~LineType_anyOf() = default; +class LineType_anyOf { + public: + LineType_anyOf(); + virtual ~LineType_anyOf() = default; - enum class eLineType_anyOf { + enum class eLineType_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - DSL, + DSL, PON - }; + }; + + /// <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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const LineType_anyOf& rhs) const; + bool operator!=(const LineType_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// LineType_anyOf members - bool operator==(const LineType_anyOf& rhs) const; - bool operator!=(const LineType_anyOf& rhs) const; + LineType_anyOf::eLineType_anyOf getValue() const; + void setValue(LineType_anyOf::eLineType_anyOf value); - ///////////////////////////////////////////// - /// LineType_anyOf members + friend void to_json(nlohmann::json& j, const LineType_anyOf& o); + friend void from_json(const nlohmann::json& j, LineType_anyOf& o); - LineType_anyOf::eLineType_anyOf getValue() const; - void setValue(LineType_anyOf::eLineType_anyOf value); - - friend void to_json(nlohmann::json& j, const LineType_anyOf& o); - friend void from_json(const nlohmann::json& j, LineType_anyOf& o); -protected: - LineType_anyOf::eLineType_anyOf m_value = LineType_anyOf::eLineType_anyOf::INVALID_VALUE_OPENAPI_GENERATED; + protected: + LineType_anyOf::eLineType_anyOf m_value = + LineType_anyOf::eLineType_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/LocationAreaId.cpp b/src/api-server/model/LocationAreaId.cpp index 3b6d0d3..69dac9e 100755 --- a/src/api-server/model/LocationAreaId.cpp +++ b/src/api-server/model/LocationAreaId.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "LocationAreaId.h" #include "Helpers.h" @@ -20,96 +20,74 @@ namespace oai { namespace pcf { namespace model { -LocationAreaId::LocationAreaId() -{ - m_Lac = ""; - +LocationAreaId::LocationAreaId() { + m_Lac = ""; } -void LocationAreaId::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void LocationAreaId::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool LocationAreaId::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool LocationAreaId::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool LocationAreaId::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "LocationAreaId" : pathPrefix; - - - - /* Lac */ { - const std::string& value = m_Lac; - const std::string currentValuePath = _pathPrefix + ".lac"; - - - - } - - return success; +bool LocationAreaId::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "LocationAreaId" : pathPrefix; + + /* Lac */ { + const std::string& value = m_Lac; + const std::string currentValuePath = _pathPrefix + ".lac"; + } + + return success; } -bool LocationAreaId::operator==(const LocationAreaId& rhs) const -{ - return - - - (getPlmnId() == rhs.getPlmnId()) - && - - (getLac() == rhs.getLac()) - - - ; +bool LocationAreaId::operator==(const LocationAreaId& rhs) const { + return + + (getPlmnId() == rhs.getPlmnId()) && + + (getLac() == rhs.getLac()) + + ; } -bool LocationAreaId::operator!=(const LocationAreaId& rhs) const -{ - return !(*this == rhs); +bool LocationAreaId::operator!=(const LocationAreaId& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const LocationAreaId& o) -{ - j = nlohmann::json(); - j["plmnId"] = o.m_PlmnId; - j["lac"] = o.m_Lac; - +void to_json(nlohmann::json& j, const LocationAreaId& o) { + j = nlohmann::json(); + j["plmnId"] = o.m_PlmnId; + j["lac"] = o.m_Lac; } -void from_json(const nlohmann::json& j, LocationAreaId& o) -{ - j.at("plmnId").get_to(o.m_PlmnId); - j.at("lac").get_to(o.m_Lac); - +void from_json(const nlohmann::json& j, LocationAreaId& o) { + j.at("plmnId").get_to(o.m_PlmnId); + j.at("lac").get_to(o.m_Lac); } -PlmnId LocationAreaId::getPlmnId() const -{ - return m_PlmnId; +PlmnId LocationAreaId::getPlmnId() const { + return m_PlmnId; } -void LocationAreaId::setPlmnId(PlmnId const& value) -{ - m_PlmnId = value; +void LocationAreaId::setPlmnId(PlmnId const& value) { + m_PlmnId = value; } -std::string LocationAreaId::getLac() const -{ - return m_Lac; +std::string LocationAreaId::getLac() const { + return m_Lac; } -void LocationAreaId::setLac(std::string const& value) -{ - m_Lac = value; +void LocationAreaId::setLac(std::string const& value) { + m_Lac = value; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/LocationAreaId.h b/src/api-server/model/LocationAreaId.h index 679eaee..1f1ad98 100755 --- a/src/api-server/model/LocationAreaId.h +++ b/src/api-server/model/LocationAreaId.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * LocationAreaId.h * - * + * */ #ifndef LocationAreaId_H_ #define LocationAreaId_H_ - #include <string> #include "PlmnId.h" #include <nlohmann/json.hpp> @@ -28,57 +28,55 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class LocationAreaId -{ -public: - LocationAreaId(); - virtual ~LocationAreaId() = 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 LocationAreaId& rhs) const; - bool operator!=(const LocationAreaId& rhs) const; - - ///////////////////////////////////////////// - /// LocationAreaId members - - /// <summary> - /// - /// </summary> - PlmnId getPlmnId() const; - void setPlmnId(PlmnId const& value); - /// <summary> - /// - /// </summary> - std::string getLac() const; - void setLac(std::string const& value); - - friend void to_json(nlohmann::json& j, const LocationAreaId& o); - friend void from_json(const nlohmann::json& j, LocationAreaId& o); -protected: - PlmnId m_PlmnId; - - std::string m_Lac; - - +class LocationAreaId { + public: + LocationAreaId(); + virtual ~LocationAreaId() = 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 LocationAreaId& rhs) const; + bool operator!=(const LocationAreaId& rhs) const; + + ///////////////////////////////////////////// + /// LocationAreaId members + + /// <summary> + /// + /// </summary> + PlmnId getPlmnId() const; + void setPlmnId(PlmnId const& value); + /// <summary> + /// + /// </summary> + std::string getLac() const; + void setLac(std::string const& value); + + friend void to_json(nlohmann::json& j, const LocationAreaId& o); + friend void from_json(const nlohmann::json& j, LocationAreaId& o); + + protected: + PlmnId m_PlmnId; + + std::string m_Lac; }; } // namespace model diff --git a/src/api-server/model/MaPduIndication.cpp b/src/api-server/model/MaPduIndication.cpp index a3254a9..3107040 100755 --- a/src/api-server/model/MaPduIndication.cpp +++ b/src/api-server/model/MaPduIndication.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -MaPduIndication::MaPduIndication() -{ - -} +MaPduIndication::MaPduIndication() {} -void MaPduIndication::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool MaPduIndication::operator!=(const MaPduIndication& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, MaPduIndication& o) { + from_json(j, o.m_value); } -MaPduIndication_anyOf MaPduIndication::getValue() const -{ - return m_value; +MaPduIndication_anyOf MaPduIndication::getValue() const { + return m_value; } -void MaPduIndication::setValue(MaPduIndication_anyOf value) -{ - m_value = value; +void MaPduIndication::setValue(MaPduIndication_anyOf value) { + m_value = value; } -MaPduIndication_anyOf::eMaPduIndication_anyOf MaPduIndication::getEnumValue() const -{ - return m_value.getValue(); +MaPduIndication_anyOf::eMaPduIndication_anyOf MaPduIndication::getEnumValue() + const { + return m_value.getValue(); } -void MaPduIndication::setEnumValue(MaPduIndication_anyOf::eMaPduIndication_anyOf value) -{ - m_value.setValue(value); +void MaPduIndication::setEnumValue( + MaPduIndication_anyOf::eMaPduIndication_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/MaPduIndication.h b/src/api-server/model/MaPduIndication.h index 3e8f265..b127743 100755 --- a/src/api-server/model/MaPduIndication.h +++ b/src/api-server/model/MaPduIndication.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class MaPduIndication -{ -public: - MaPduIndication(); - virtual ~MaPduIndication() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const MaPduIndication& rhs) const; + bool operator!=(const MaPduIndication& rhs) const; - ///////////////////////////////////////////// - /// MaPduIndication members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + MaPduIndication_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/MaPduIndication_anyOf.cpp b/src/api-server/model/MaPduIndication_anyOf.cpp index fceec8a..942259e 100755 --- a/src/api-server/model/MaPduIndication_anyOf.cpp +++ b/src/api-server/model/MaPduIndication_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,97 +20,86 @@ namespace oai { namespace pcf { namespace model { -MaPduIndication_anyOf::MaPduIndication_anyOf() -{ - -} +MaPduIndication_anyOf::MaPduIndication_anyOf() {} -void MaPduIndication_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == MaPduIndication_anyOf::eMaPduIndication_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool MaPduIndication_anyOf::operator!=(const MaPduIndication_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +MaPduIndication_anyOf::eMaPduIndication_anyOf MaPduIndication_anyOf::getValue() + const { + return m_value; } -void MaPduIndication_anyOf::setValue(MaPduIndication_anyOf::eMaPduIndication_anyOf value) -{ - m_value = value; +void MaPduIndication_anyOf::setValue( + MaPduIndication_anyOf::eMaPduIndication_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/MaPduIndication_anyOf.h b/src/api-server/model/MaPduIndication_anyOf.h index b425031..3158979 100755 --- a/src/api-server/model/MaPduIndication_anyOf.h +++ b/src/api-server/model/MaPduIndication_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,53 +26,56 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class MaPduIndication_anyOf -{ -public: - MaPduIndication_anyOf(); - virtual ~MaPduIndication_anyOf() = default; +class MaPduIndication_anyOf { + public: + MaPduIndication_anyOf(); + virtual ~MaPduIndication_anyOf() = default; - enum class eMaPduIndication_anyOf { + enum class eMaPduIndication_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - REQUEST, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const MaPduIndication_anyOf& rhs) const; + bool operator!=(const MaPduIndication_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// MaPduIndication_anyOf members - bool operator==(const MaPduIndication_anyOf& rhs) const; - bool operator!=(const MaPduIndication_anyOf& rhs) const; + MaPduIndication_anyOf::eMaPduIndication_anyOf getValue() const; + void setValue(MaPduIndication_anyOf::eMaPduIndication_anyOf value); - ///////////////////////////////////////////// - /// MaPduIndication_anyOf members + friend void to_json(nlohmann::json& j, const MaPduIndication_anyOf& o); + friend void from_json(const nlohmann::json& j, MaPduIndication_anyOf& o); - 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; + protected: + MaPduIndication_anyOf::eMaPduIndication_anyOf m_value = + MaPduIndication_anyOf::eMaPduIndication_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/MeteringMethod.cpp b/src/api-server/model/MeteringMethod.cpp index 8f04e77..6de57dd 100755 --- a/src/api-server/model/MeteringMethod.cpp +++ b/src/api-server/model/MeteringMethod.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,59 +20,46 @@ namespace oai { namespace pcf { namespace model { -MeteringMethod::MeteringMethod() -{ - -} +MeteringMethod::MeteringMethod() {} -void MeteringMethod::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +bool MeteringMethod::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "MeteringMethod" : pathPrefix; - - return success; + return success; } // bool MeteringMethod::operator==(const MeteringMethod& rhs) const // { // return - + // getValue() == rhs.getValue() // ; // } -bool MeteringMethod::operator!=(const MeteringMethod& rhs) const -{ - return !(*this == rhs); +bool MeteringMethod::operator!=(const MeteringMethod& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const MeteringMethod& o) -{ - j = nlohmann::json(); - +void to_json(nlohmann::json& j, const MeteringMethod& o) { + j = nlohmann::json(); } -void from_json(const nlohmann::json& j, MeteringMethod& o) -{ - -} - - +void from_json(const nlohmann::json& j, MeteringMethod& o) {} } // namespace model } // namespace pcf diff --git a/src/api-server/model/MeteringMethod.h b/src/api-server/model/MeteringMethod.h index b48296b..038d95b 100755 --- a/src/api-server/model/MeteringMethod.h +++ b/src/api-server/model/MeteringMethod.h @@ -1,24 +1,29 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -28,43 +33,46 @@ 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. +/// 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; - +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. 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> + /// 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; + /// <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; + bool operator==(const MeteringMethod& rhs) const; + bool operator!=(const MeteringMethod& rhs) const; - ///////////////////////////////////////////// - /// MeteringMethod members + ///////////////////////////////////////////// + /// MeteringMethod members + friend void to_json(nlohmann::json& j, const MeteringMethod& o); + friend void from_json(const nlohmann::json& j, MeteringMethod& o); - friend void to_json(nlohmann::json& j, const MeteringMethod& o); - friend void from_json(const nlohmann::json& j, MeteringMethod& o); -protected: - + protected: }; } // namespace model diff --git a/src/api-server/model/MeteringMethod_anyOf.cpp b/src/api-server/model/MeteringMethod_anyOf.cpp index 5ed1c60..369d6eb 100755 --- a/src/api-server/model/MeteringMethod_anyOf.cpp +++ b/src/api-server/model/MeteringMethod_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,109 +20,94 @@ namespace oai { namespace pcf { namespace model { -MeteringMethod_anyOf::MeteringMethod_anyOf() -{ - -} +MeteringMethod_anyOf::MeteringMethod_anyOf() {} -void MeteringMethod_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == MeteringMethod_anyOf::eMeteringMethod_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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::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; - } +bool MeteringMethod_anyOf::operator!=(const MeteringMethod_anyOf& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, MeteringMethod_anyOf& o) -{ - - 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 { - 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()); - } +void to_json(nlohmann::json& j, const MeteringMethod_anyOf& o) { + j = nlohmann::json(); + + switch (o.getValue()) { + 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) { + 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 { + 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; +MeteringMethod_anyOf::eMeteringMethod_anyOf MeteringMethod_anyOf::getValue() + const { + return m_value; } -void MeteringMethod_anyOf::setValue(MeteringMethod_anyOf::eMeteringMethod_anyOf value) -{ - m_value = value; +void MeteringMethod_anyOf::setValue( + MeteringMethod_anyOf::eMeteringMethod_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/MeteringMethod_anyOf.h b/src/api-server/model/MeteringMethod_anyOf.h index 46afae4..9f7ab9f 100755 --- a/src/api-server/model/MeteringMethod_anyOf.h +++ b/src/api-server/model/MeteringMethod_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,55 +26,57 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class MeteringMethod_anyOf -{ -public: - MeteringMethod_anyOf(); - virtual ~MeteringMethod_anyOf() = default; +class MeteringMethod_anyOf { + public: + MeteringMethod_anyOf(); + virtual ~MeteringMethod_anyOf() = default; - enum class eMeteringMethod_anyOf { + enum class eMeteringMethod_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - DURATION, - VOLUME, - DURATION_VOLUME, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const MeteringMethod_anyOf& rhs) const; + bool operator!=(const MeteringMethod_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// MeteringMethod_anyOf members - bool operator==(const MeteringMethod_anyOf& rhs) const; - bool operator!=(const MeteringMethod_anyOf& rhs) const; + MeteringMethod_anyOf::eMeteringMethod_anyOf getValue() const; + void setValue(MeteringMethod_anyOf::eMeteringMethod_anyOf value); - ///////////////////////////////////////////// - /// MeteringMethod_anyOf members + friend void to_json(nlohmann::json& j, const MeteringMethod_anyOf& o); + friend void from_json(const nlohmann::json& j, MeteringMethod_anyOf& o); - 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; + protected: + MeteringMethod_anyOf::eMeteringMethod_anyOf m_value = MeteringMethod_anyOf:: + eMeteringMethod_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/MulticastAccessControl.cpp b/src/api-server/model/MulticastAccessControl.cpp index dcab632..9ad5362 100755 --- a/src/api-server/model/MulticastAccessControl.cpp +++ b/src/api-server/model/MulticastAccessControl.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,69 @@ namespace oai { namespace pcf { namespace model { -MulticastAccessControl::MulticastAccessControl() -{ - -} +MulticastAccessControl::MulticastAccessControl() {} -void MulticastAccessControl::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool MulticastAccessControl::operator!=(const MulticastAccessControl& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, MulticastAccessControl& o) { + from_json(j, o.m_value); } -MulticastAccessControl_anyOf MulticastAccessControl::getValue() const -{ - return m_value; +MulticastAccessControl_anyOf MulticastAccessControl::getValue() const { + return m_value; } -void MulticastAccessControl::setValue(MulticastAccessControl_anyOf value) -{ - m_value = value; +void MulticastAccessControl::setValue(MulticastAccessControl_anyOf value) { + m_value = value; } -MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf MulticastAccessControl::getEnumValue() const -{ - return m_value.getValue(); +MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf +MulticastAccessControl::getEnumValue() const { + return m_value.getValue(); } -void MulticastAccessControl::setEnumValue(MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf value) -{ - m_value.setValue(value); +void MulticastAccessControl::setEnumValue( + MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/MulticastAccessControl.h b/src/api-server/model/MulticastAccessControl.h index 826bd10..88092e4 100755 --- a/src/api-server/model/MulticastAccessControl.h +++ b/src/api-server/model/MulticastAccessControl.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,49 +27,51 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class MulticastAccessControl -{ -public: - MulticastAccessControl(); - virtual ~MulticastAccessControl() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const MulticastAccessControl& rhs) const; + bool operator!=(const MulticastAccessControl& rhs) const; - ///////////////////////////////////////////// - /// MulticastAccessControl members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + MulticastAccessControl_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/MulticastAccessControl_anyOf.cpp b/src/api-server/model/MulticastAccessControl_anyOf.cpp index ac54772..16b5cef 100755 --- a/src/api-server/model/MulticastAccessControl_anyOf.cpp +++ b/src/api-server/model/MulticastAccessControl_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,97 +20,89 @@ namespace oai { namespace pcf { namespace model { -MulticastAccessControl_anyOf::MulticastAccessControl_anyOf() -{ - -} +MulticastAccessControl_anyOf::MulticastAccessControl_anyOf() {} -void MulticastAccessControl_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool MulticastAccessControl_anyOf::operator!=( + const MulticastAccessControl_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf +MulticastAccessControl_anyOf::getValue() const { + return m_value; } -void MulticastAccessControl_anyOf::setValue(MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf value) -{ - m_value = value; +void MulticastAccessControl_anyOf::setValue( + MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/MulticastAccessControl_anyOf.h b/src/api-server/model/MulticastAccessControl_anyOf.h index 2119c0d..424b3d9 100755 --- a/src/api-server/model/MulticastAccessControl_anyOf.h +++ b/src/api-server/model/MulticastAccessControl_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,53 +26,58 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class MulticastAccessControl_anyOf -{ -public: - MulticastAccessControl_anyOf(); - virtual ~MulticastAccessControl_anyOf() = default; +class MulticastAccessControl_anyOf { + public: + MulticastAccessControl_anyOf(); + virtual ~MulticastAccessControl_anyOf() = default; - enum class eMulticastAccessControl_anyOf { + enum class eMulticastAccessControl_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - ALLOWED, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const MulticastAccessControl_anyOf& rhs) const; + bool operator!=(const MulticastAccessControl_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// MulticastAccessControl_anyOf members - bool operator==(const MulticastAccessControl_anyOf& rhs) const; - bool operator!=(const MulticastAccessControl_anyOf& rhs) const; + MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf getValue() const; + void setValue( + MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf value); - ///////////////////////////////////////////// - /// MulticastAccessControl_anyOf members + friend void to_json(nlohmann::json& j, const MulticastAccessControl_anyOf& o); + friend void from_json( + const nlohmann::json& j, MulticastAccessControl_anyOf& o); - 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; + protected: + MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf m_value = + MulticastAccessControl_anyOf::eMulticastAccessControl_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/N3gaLocation.cpp b/src/api-server/model/N3gaLocation.cpp index 29e300c..cb20e4f 100755 --- a/src/api-server/model/N3gaLocation.cpp +++ b/src/api-server/model/N3gaLocation.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "N3gaLocation.h" #include "Helpers.h" @@ -20,431 +20,345 @@ namespace oai { namespace pcf { namespace model { -N3gaLocation::N3gaLocation() -{ - m_N3gppTaiIsSet = false; - m_N3IwfId = ""; - m_N3IwfIdIsSet = false; - m_UeIpv4Addr = ""; - m_UeIpv4AddrIsSet = false; - m_UeIpv6AddrIsSet = false; - m_PortNumber = 0; - m_PortNumberIsSet = false; - m_TnapIdIsSet = false; - m_ProtocolIsSet = false; - m_TwapIdIsSet = false; - m_HfcNodeIdIsSet = false; - m_GliIsSet = false; - m_W5gbanLineTypeIsSet = false; - m_Gci = ""; - m_GciIsSet = false; - +N3gaLocation::N3gaLocation() { + m_N3gppTaiIsSet = false; + m_N3IwfId = ""; + m_N3IwfIdIsSet = false; + m_UeIpv4Addr = ""; + m_UeIpv4AddrIsSet = false; + m_UeIpv6AddrIsSet = false; + m_PortNumber = 0; + m_PortNumberIsSet = false; + m_TnapIdIsSet = false; + m_ProtocolIsSet = false; + m_TwapIdIsSet = false; + m_HfcNodeIdIsSet = false; + m_GliIsSet = false; + m_W5gbanLineTypeIsSet = false; + m_Gci = ""; + m_GciIsSet = false; } -void N3gaLocation::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void N3gaLocation::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool N3gaLocation::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool N3gaLocation::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool N3gaLocation::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "N3gaLocation" : pathPrefix; +bool N3gaLocation::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "N3gaLocation" : pathPrefix; - - if (n3IwfIdIsSet()) - { - const std::string& value = m_N3IwfId; - const std::string currentValuePath = _pathPrefix + ".n3IwfId"; - - + if (n3IwfIdIsSet()) { + const std::string& value = m_N3IwfId; + const std::string currentValuePath = _pathPrefix + ".n3IwfId"; + } - } - - if (ueIpv4AddrIsSet()) - { - const std::string& value = m_UeIpv4Addr; - const std::string currentValuePath = _pathPrefix + ".ueIpv4Addr"; - - + if (ueIpv4AddrIsSet()) { + const std::string& value = m_UeIpv4Addr; + const std::string currentValuePath = _pathPrefix + ".ueIpv4Addr"; + } - } - - 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;"; - } + 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 N3gaLocation::operator==(const N3gaLocation& rhs) const -{ - return - - - - ((!n3gppTaiIsSet() && !rhs.n3gppTaiIsSet()) || (n3gppTaiIsSet() && rhs.n3gppTaiIsSet() && getN3gppTai() == rhs.getN3gppTai())) && - - - ((!n3IwfIdIsSet() && !rhs.n3IwfIdIsSet()) || (n3IwfIdIsSet() && rhs.n3IwfIdIsSet() && getN3IwfId() == rhs.getN3IwfId())) && - - - ((!ueIpv4AddrIsSet() && !rhs.ueIpv4AddrIsSet()) || (ueIpv4AddrIsSet() && rhs.ueIpv4AddrIsSet() && getUeIpv4Addr() == rhs.getUeIpv4Addr())) && - - - ((!ueIpv6AddrIsSet() && !rhs.ueIpv6AddrIsSet()) || (ueIpv6AddrIsSet() && rhs.ueIpv6AddrIsSet() && getUeIpv6Addr() == rhs.getUeIpv6Addr())) && - - - ((!portNumberIsSet() && !rhs.portNumberIsSet()) || (portNumberIsSet() && rhs.portNumberIsSet() && getPortNumber() == rhs.getPortNumber())) && - - - ((!tnapIdIsSet() && !rhs.tnapIdIsSet()) || (tnapIdIsSet() && rhs.tnapIdIsSet() && getTnapId() == rhs.getTnapId())) && - - - ((!protocolIsSet() && !rhs.protocolIsSet()) || (protocolIsSet() && rhs.protocolIsSet() && getProtocol() == rhs.getProtocol())) && - - - ((!twapIdIsSet() && !rhs.twapIdIsSet()) || (twapIdIsSet() && rhs.twapIdIsSet() && getTwapId() == rhs.getTwapId())) && - - - ((!hfcNodeIdIsSet() && !rhs.hfcNodeIdIsSet()) || (hfcNodeIdIsSet() && rhs.hfcNodeIdIsSet() && getHfcNodeId() == rhs.getHfcNodeId())) && - - - ((!gliIsSet() && !rhs.gliIsSet()) || (gliIsSet() && rhs.gliIsSet() && getGli() == rhs.getGli())) && - - - ((!w5gbanLineTypeIsSet() && !rhs.w5gbanLineTypeIsSet()) || (w5gbanLineTypeIsSet() && rhs.w5gbanLineTypeIsSet() && getW5gbanLineType() == rhs.getW5gbanLineType())) && - - - ((!gciIsSet() && !rhs.gciIsSet()) || (gciIsSet() && rhs.gciIsSet() && getGci() == rhs.getGci())) - - ; + return success; } -bool N3gaLocation::operator!=(const N3gaLocation& rhs) const -{ - return !(*this == rhs); +bool N3gaLocation::operator==(const N3gaLocation& rhs) const { + return + + ((!n3gppTaiIsSet() && !rhs.n3gppTaiIsSet()) || + (n3gppTaiIsSet() && rhs.n3gppTaiIsSet() && + getN3gppTai() == rhs.getN3gppTai())) && + + ((!n3IwfIdIsSet() && !rhs.n3IwfIdIsSet()) || + (n3IwfIdIsSet() && rhs.n3IwfIdIsSet() && + getN3IwfId() == rhs.getN3IwfId())) && + + ((!ueIpv4AddrIsSet() && !rhs.ueIpv4AddrIsSet()) || + (ueIpv4AddrIsSet() && rhs.ueIpv4AddrIsSet() && + getUeIpv4Addr() == rhs.getUeIpv4Addr())) && + + ((!ueIpv6AddrIsSet() && !rhs.ueIpv6AddrIsSet()) || + (ueIpv6AddrIsSet() && rhs.ueIpv6AddrIsSet() && + getUeIpv6Addr() == rhs.getUeIpv6Addr())) && + + ((!portNumberIsSet() && !rhs.portNumberIsSet()) || + (portNumberIsSet() && rhs.portNumberIsSet() && + getPortNumber() == rhs.getPortNumber())) && + + ((!tnapIdIsSet() && !rhs.tnapIdIsSet()) || + (tnapIdIsSet() && rhs.tnapIdIsSet() && + getTnapId() == rhs.getTnapId())) && + + ((!protocolIsSet() && !rhs.protocolIsSet()) || + (protocolIsSet() && rhs.protocolIsSet() && + getProtocol() == rhs.getProtocol())) && + + ((!twapIdIsSet() && !rhs.twapIdIsSet()) || + (twapIdIsSet() && rhs.twapIdIsSet() && + getTwapId() == rhs.getTwapId())) && + + ((!hfcNodeIdIsSet() && !rhs.hfcNodeIdIsSet()) || + (hfcNodeIdIsSet() && rhs.hfcNodeIdIsSet() && + getHfcNodeId() == rhs.getHfcNodeId())) && + + ((!gliIsSet() && !rhs.gliIsSet()) || + (gliIsSet() && rhs.gliIsSet() && getGli() == rhs.getGli())) && + + ((!w5gbanLineTypeIsSet() && !rhs.w5gbanLineTypeIsSet()) || + (w5gbanLineTypeIsSet() && rhs.w5gbanLineTypeIsSet() && + getW5gbanLineType() == rhs.getW5gbanLineType())) && + + ((!gciIsSet() && !rhs.gciIsSet()) || + (gciIsSet() && rhs.gciIsSet() && getGci() == rhs.getGci())) + + ; } -void to_json(nlohmann::json& j, const N3gaLocation& o) -{ - j = nlohmann::json(); - if(o.n3gppTaiIsSet()) - j["n3gppTai"] = o.m_N3gppTai; - if(o.n3IwfIdIsSet()) - j["n3IwfId"] = o.m_N3IwfId; - if(o.ueIpv4AddrIsSet()) - j["ueIpv4Addr"] = o.m_UeIpv4Addr; - if(o.ueIpv6AddrIsSet()) - j["ueIpv6Addr"] = o.m_UeIpv6Addr; - if(o.portNumberIsSet()) - j["portNumber"] = o.m_PortNumber; - if(o.tnapIdIsSet()) - j["tnapId"] = o.m_TnapId; - if(o.protocolIsSet()) - j["protocol"] = o.m_Protocol; - if(o.twapIdIsSet()) - j["twapId"] = o.m_TwapId; - if(o.hfcNodeIdIsSet()) - j["hfcNodeId"] = o.m_HfcNodeId; - if(o.gliIsSet()) - j["gli"] = o.m_Gli; - if(o.w5gbanLineTypeIsSet()) - j["w5gbanLineType"] = o.m_W5gbanLineType; - if(o.gciIsSet()) - j["gci"] = o.m_Gci; - +bool N3gaLocation::operator!=(const N3gaLocation& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, N3gaLocation& o) -{ - if(j.find("n3gppTai") != j.end()) - { - j.at("n3gppTai").get_to(o.m_N3gppTai); - o.m_N3gppTaiIsSet = true; - } - if(j.find("n3IwfId") != j.end()) - { - j.at("n3IwfId").get_to(o.m_N3IwfId); - o.m_N3IwfIdIsSet = true; - } - if(j.find("ueIpv4Addr") != j.end()) - { - j.at("ueIpv4Addr").get_to(o.m_UeIpv4Addr); - o.m_UeIpv4AddrIsSet = true; - } - if(j.find("ueIpv6Addr") != j.end()) - { - j.at("ueIpv6Addr").get_to(o.m_UeIpv6Addr); - o.m_UeIpv6AddrIsSet = true; - } - if(j.find("portNumber") != j.end()) - { - j.at("portNumber").get_to(o.m_PortNumber); - o.m_PortNumberIsSet = true; - } - if(j.find("tnapId") != j.end()) - { - j.at("tnapId").get_to(o.m_TnapId); - o.m_TnapIdIsSet = true; - } - if(j.find("protocol") != j.end()) - { - j.at("protocol").get_to(o.m_Protocol); - o.m_ProtocolIsSet = true; - } - if(j.find("twapId") != j.end()) - { - j.at("twapId").get_to(o.m_TwapId); - o.m_TwapIdIsSet = true; - } - if(j.find("hfcNodeId") != j.end()) - { - j.at("hfcNodeId").get_to(o.m_HfcNodeId); - o.m_HfcNodeIdIsSet = true; - } - if(j.find("gli") != j.end()) - { - j.at("gli").get_to(o.m_Gli); - o.m_GliIsSet = true; - } - if(j.find("w5gbanLineType") != j.end()) - { - j.at("w5gbanLineType").get_to(o.m_W5gbanLineType); - o.m_W5gbanLineTypeIsSet = true; - } - if(j.find("gci") != j.end()) - { - j.at("gci").get_to(o.m_Gci); - o.m_GciIsSet = true; - } - +void to_json(nlohmann::json& j, const N3gaLocation& o) { + j = nlohmann::json(); + if (o.n3gppTaiIsSet()) j["n3gppTai"] = o.m_N3gppTai; + if (o.n3IwfIdIsSet()) j["n3IwfId"] = o.m_N3IwfId; + if (o.ueIpv4AddrIsSet()) j["ueIpv4Addr"] = o.m_UeIpv4Addr; + if (o.ueIpv6AddrIsSet()) j["ueIpv6Addr"] = o.m_UeIpv6Addr; + if (o.portNumberIsSet()) j["portNumber"] = o.m_PortNumber; + if (o.tnapIdIsSet()) j["tnapId"] = o.m_TnapId; + if (o.protocolIsSet()) j["protocol"] = o.m_Protocol; + if (o.twapIdIsSet()) j["twapId"] = o.m_TwapId; + if (o.hfcNodeIdIsSet()) j["hfcNodeId"] = o.m_HfcNodeId; + if (o.gliIsSet()) j["gli"] = o.m_Gli; + if (o.w5gbanLineTypeIsSet()) j["w5gbanLineType"] = o.m_W5gbanLineType; + if (o.gciIsSet()) j["gci"] = o.m_Gci; } -Tai N3gaLocation::getN3gppTai() const -{ - return m_N3gppTai; -} -void N3gaLocation::setN3gppTai(Tai const& value) -{ - m_N3gppTai = value; - m_N3gppTaiIsSet = true; -} -bool N3gaLocation::n3gppTaiIsSet() const -{ - return m_N3gppTaiIsSet; -} -void N3gaLocation::unsetN3gppTai() -{ - m_N3gppTaiIsSet = false; -} -std::string N3gaLocation::getN3IwfId() const -{ - return m_N3IwfId; -} -void N3gaLocation::setN3IwfId(std::string const& value) -{ - m_N3IwfId = value; - m_N3IwfIdIsSet = true; -} -bool N3gaLocation::n3IwfIdIsSet() const -{ - return m_N3IwfIdIsSet; -} -void N3gaLocation::unsetN3IwfId() -{ - m_N3IwfIdIsSet = false; -} -std::string N3gaLocation::getUeIpv4Addr() const -{ - return m_UeIpv4Addr; -} -void N3gaLocation::setUeIpv4Addr(std::string const& value) -{ - m_UeIpv4Addr = value; - m_UeIpv4AddrIsSet = true; -} -bool N3gaLocation::ueIpv4AddrIsSet() const -{ - return m_UeIpv4AddrIsSet; -} -void N3gaLocation::unsetUeIpv4Addr() -{ - m_UeIpv4AddrIsSet = false; -} -Ipv6Addr N3gaLocation::getUeIpv6Addr() const -{ - return m_UeIpv6Addr; -} -void N3gaLocation::setUeIpv6Addr(Ipv6Addr const& value) -{ - m_UeIpv6Addr = value; - m_UeIpv6AddrIsSet = true; -} -bool N3gaLocation::ueIpv6AddrIsSet() const -{ - return m_UeIpv6AddrIsSet; -} -void N3gaLocation::unsetUeIpv6Addr() -{ - m_UeIpv6AddrIsSet = false; -} -int32_t N3gaLocation::getPortNumber() const -{ - return m_PortNumber; -} -void N3gaLocation::setPortNumber(int32_t const value) -{ - m_PortNumber = value; - m_PortNumberIsSet = true; -} -bool N3gaLocation::portNumberIsSet() const -{ - return m_PortNumberIsSet; -} -void N3gaLocation::unsetPortNumber() -{ - m_PortNumberIsSet = false; -} -TnapId N3gaLocation::getTnapId() const -{ - return m_TnapId; -} -void N3gaLocation::setTnapId(TnapId const& value) -{ - m_TnapId = value; - m_TnapIdIsSet = true; -} -bool N3gaLocation::tnapIdIsSet() const -{ - return m_TnapIdIsSet; -} -void N3gaLocation::unsetTnapId() -{ - m_TnapIdIsSet = false; -} -TransportProtocol N3gaLocation::getProtocol() const -{ - return m_Protocol; -} -void N3gaLocation::setProtocol(TransportProtocol const& value) -{ - m_Protocol = value; - m_ProtocolIsSet = true; -} -bool N3gaLocation::protocolIsSet() const -{ - return m_ProtocolIsSet; -} -void N3gaLocation::unsetProtocol() -{ - m_ProtocolIsSet = false; -} -TwapId N3gaLocation::getTwapId() const -{ - return m_TwapId; -} -void N3gaLocation::setTwapId(TwapId const& value) -{ - m_TwapId = value; - m_TwapIdIsSet = true; -} -bool N3gaLocation::twapIdIsSet() const -{ - return m_TwapIdIsSet; -} -void N3gaLocation::unsetTwapId() -{ - m_TwapIdIsSet = false; -} -HfcNodeId N3gaLocation::getHfcNodeId() const -{ - return m_HfcNodeId; -} -void N3gaLocation::setHfcNodeId(HfcNodeId const& value) -{ - m_HfcNodeId = value; - m_HfcNodeIdIsSet = true; -} -bool N3gaLocation::hfcNodeIdIsSet() const -{ - return m_HfcNodeIdIsSet; -} -void N3gaLocation::unsetHfcNodeId() -{ - m_HfcNodeIdIsSet = false; -} -std::string N3gaLocation::getGli() const -{ - return m_Gli; -} -void N3gaLocation::setGli(std::string const& value) -{ - m_Gli = value; - m_GliIsSet = true; -} -bool N3gaLocation::gliIsSet() const -{ - return m_GliIsSet; -} -void N3gaLocation::unsetGli() -{ - m_GliIsSet = false; -} -LineType N3gaLocation::getW5gbanLineType() const -{ - return m_W5gbanLineType; -} -void N3gaLocation::setW5gbanLineType(LineType const& value) -{ - m_W5gbanLineType = value; - m_W5gbanLineTypeIsSet = true; -} -bool N3gaLocation::w5gbanLineTypeIsSet() const -{ - return m_W5gbanLineTypeIsSet; -} -void N3gaLocation::unsetW5gbanLineType() -{ - m_W5gbanLineTypeIsSet = false; -} -std::string N3gaLocation::getGci() const -{ - return m_Gci; -} -void N3gaLocation::setGci(std::string const& value) -{ - m_Gci = value; - m_GciIsSet = true; -} -bool N3gaLocation::gciIsSet() const -{ - return m_GciIsSet; -} -void N3gaLocation::unsetGci() -{ - m_GciIsSet = false; +void from_json(const nlohmann::json& j, N3gaLocation& o) { + if (j.find("n3gppTai") != j.end()) { + j.at("n3gppTai").get_to(o.m_N3gppTai); + o.m_N3gppTaiIsSet = true; + } + if (j.find("n3IwfId") != j.end()) { + j.at("n3IwfId").get_to(o.m_N3IwfId); + o.m_N3IwfIdIsSet = true; + } + if (j.find("ueIpv4Addr") != j.end()) { + j.at("ueIpv4Addr").get_to(o.m_UeIpv4Addr); + o.m_UeIpv4AddrIsSet = true; + } + if (j.find("ueIpv6Addr") != j.end()) { + j.at("ueIpv6Addr").get_to(o.m_UeIpv6Addr); + o.m_UeIpv6AddrIsSet = true; + } + if (j.find("portNumber") != j.end()) { + j.at("portNumber").get_to(o.m_PortNumber); + o.m_PortNumberIsSet = true; + } + if (j.find("tnapId") != j.end()) { + j.at("tnapId").get_to(o.m_TnapId); + o.m_TnapIdIsSet = true; + } + if (j.find("protocol") != j.end()) { + j.at("protocol").get_to(o.m_Protocol); + o.m_ProtocolIsSet = true; + } + if (j.find("twapId") != j.end()) { + j.at("twapId").get_to(o.m_TwapId); + o.m_TwapIdIsSet = true; + } + if (j.find("hfcNodeId") != j.end()) { + j.at("hfcNodeId").get_to(o.m_HfcNodeId); + o.m_HfcNodeIdIsSet = true; + } + if (j.find("gli") != j.end()) { + j.at("gli").get_to(o.m_Gli); + o.m_GliIsSet = true; + } + if (j.find("w5gbanLineType") != j.end()) { + j.at("w5gbanLineType").get_to(o.m_W5gbanLineType); + o.m_W5gbanLineTypeIsSet = true; + } + if (j.find("gci") != j.end()) { + j.at("gci").get_to(o.m_Gci); + o.m_GciIsSet = true; + } } +Tai N3gaLocation::getN3gppTai() const { + return m_N3gppTai; +} +void N3gaLocation::setN3gppTai(Tai const& value) { + m_N3gppTai = value; + m_N3gppTaiIsSet = true; +} +bool N3gaLocation::n3gppTaiIsSet() const { + return m_N3gppTaiIsSet; +} +void N3gaLocation::unsetN3gppTai() { + m_N3gppTaiIsSet = false; +} +std::string N3gaLocation::getN3IwfId() const { + return m_N3IwfId; +} +void N3gaLocation::setN3IwfId(std::string const& value) { + m_N3IwfId = value; + m_N3IwfIdIsSet = true; +} +bool N3gaLocation::n3IwfIdIsSet() const { + return m_N3IwfIdIsSet; +} +void N3gaLocation::unsetN3IwfId() { + m_N3IwfIdIsSet = false; +} +std::string N3gaLocation::getUeIpv4Addr() const { + return m_UeIpv4Addr; +} +void N3gaLocation::setUeIpv4Addr(std::string const& value) { + m_UeIpv4Addr = value; + m_UeIpv4AddrIsSet = true; +} +bool N3gaLocation::ueIpv4AddrIsSet() const { + return m_UeIpv4AddrIsSet; +} +void N3gaLocation::unsetUeIpv4Addr() { + m_UeIpv4AddrIsSet = false; +} +Ipv6Addr N3gaLocation::getUeIpv6Addr() const { + return m_UeIpv6Addr; +} +void N3gaLocation::setUeIpv6Addr(Ipv6Addr const& value) { + m_UeIpv6Addr = value; + m_UeIpv6AddrIsSet = true; +} +bool N3gaLocation::ueIpv6AddrIsSet() const { + return m_UeIpv6AddrIsSet; +} +void N3gaLocation::unsetUeIpv6Addr() { + m_UeIpv6AddrIsSet = false; +} +int32_t N3gaLocation::getPortNumber() const { + return m_PortNumber; +} +void N3gaLocation::setPortNumber(int32_t const value) { + m_PortNumber = value; + m_PortNumberIsSet = true; +} +bool N3gaLocation::portNumberIsSet() const { + return m_PortNumberIsSet; +} +void N3gaLocation::unsetPortNumber() { + m_PortNumberIsSet = false; +} +TnapId N3gaLocation::getTnapId() const { + return m_TnapId; +} +void N3gaLocation::setTnapId(TnapId const& value) { + m_TnapId = value; + m_TnapIdIsSet = true; +} +bool N3gaLocation::tnapIdIsSet() const { + return m_TnapIdIsSet; +} +void N3gaLocation::unsetTnapId() { + m_TnapIdIsSet = false; +} +TransportProtocol N3gaLocation::getProtocol() const { + return m_Protocol; +} +void N3gaLocation::setProtocol(TransportProtocol const& value) { + m_Protocol = value; + m_ProtocolIsSet = true; +} +bool N3gaLocation::protocolIsSet() const { + return m_ProtocolIsSet; +} +void N3gaLocation::unsetProtocol() { + m_ProtocolIsSet = false; +} +TwapId N3gaLocation::getTwapId() const { + return m_TwapId; +} +void N3gaLocation::setTwapId(TwapId const& value) { + m_TwapId = value; + m_TwapIdIsSet = true; +} +bool N3gaLocation::twapIdIsSet() const { + return m_TwapIdIsSet; +} +void N3gaLocation::unsetTwapId() { + m_TwapIdIsSet = false; +} +HfcNodeId N3gaLocation::getHfcNodeId() const { + return m_HfcNodeId; +} +void N3gaLocation::setHfcNodeId(HfcNodeId const& value) { + m_HfcNodeId = value; + m_HfcNodeIdIsSet = true; +} +bool N3gaLocation::hfcNodeIdIsSet() const { + return m_HfcNodeIdIsSet; +} +void N3gaLocation::unsetHfcNodeId() { + m_HfcNodeIdIsSet = false; +} +std::string N3gaLocation::getGli() const { + return m_Gli; +} +void N3gaLocation::setGli(std::string const& value) { + m_Gli = value; + m_GliIsSet = true; +} +bool N3gaLocation::gliIsSet() const { + return m_GliIsSet; +} +void N3gaLocation::unsetGli() { + m_GliIsSet = false; +} +LineType N3gaLocation::getW5gbanLineType() const { + return m_W5gbanLineType; +} +void N3gaLocation::setW5gbanLineType(LineType const& value) { + m_W5gbanLineType = value; + m_W5gbanLineTypeIsSet = true; +} +bool N3gaLocation::w5gbanLineTypeIsSet() const { + return m_W5gbanLineTypeIsSet; +} +void N3gaLocation::unsetW5gbanLineType() { + m_W5gbanLineTypeIsSet = false; +} +std::string N3gaLocation::getGci() const { + return m_Gci; +} +void N3gaLocation::setGci(std::string const& value) { + m_Gci = value; + m_GciIsSet = true; +} +bool N3gaLocation::gciIsSet() const { + return m_GciIsSet; +} +void N3gaLocation::unsetGci() { + m_GciIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/N3gaLocation.h b/src/api-server/model/N3gaLocation.h index 9f45e0c..de8d57e 100755 --- a/src/api-server/model/N3gaLocation.h +++ b/src/api-server/model/N3gaLocation.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * N3gaLocation.h * - * + * */ #ifndef N3gaLocation_H_ #define N3gaLocation_H_ - #include "Tai.h" #include "TransportProtocol.h" #include <string> @@ -34,151 +34,150 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class N3gaLocation -{ -public: - N3gaLocation(); - virtual ~N3gaLocation() = default; +class N3gaLocation { + public: + N3gaLocation(); + virtual ~N3gaLocation() = 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. 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> - /// 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; - /// <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 N3gaLocation& rhs) const; + bool operator!=(const N3gaLocation& rhs) const; - bool operator==(const N3gaLocation& rhs) const; - bool operator!=(const N3gaLocation& rhs) const; + ///////////////////////////////////////////// + /// N3gaLocation members - ///////////////////////////////////////////// - /// N3gaLocation members + /// <summary> + /// + /// </summary> + Tai getN3gppTai() const; + void setN3gppTai(Tai const& value); + bool n3gppTaiIsSet() const; + void unsetN3gppTai(); + /// <summary> + /// + /// </summary> + std::string getN3IwfId() const; + void setN3IwfId(std::string const& value); + bool n3IwfIdIsSet() const; + void unsetN3IwfId(); + /// <summary> + /// + /// </summary> + std::string getUeIpv4Addr() const; + void setUeIpv4Addr(std::string const& value); + bool ueIpv4AddrIsSet() const; + void unsetUeIpv4Addr(); + /// <summary> + /// + /// </summary> + Ipv6Addr getUeIpv6Addr() const; + void setUeIpv6Addr(Ipv6Addr const& value); + bool ueIpv6AddrIsSet() const; + void unsetUeIpv6Addr(); + /// <summary> + /// + /// </summary> + int32_t getPortNumber() const; + void setPortNumber(int32_t const value); + bool portNumberIsSet() const; + void unsetPortNumber(); + /// <summary> + /// + /// </summary> + TnapId getTnapId() const; + void setTnapId(TnapId const& value); + bool tnapIdIsSet() const; + void unsetTnapId(); + /// <summary> + /// + /// </summary> + TransportProtocol getProtocol() const; + void setProtocol(TransportProtocol const& value); + bool protocolIsSet() const; + void unsetProtocol(); + /// <summary> + /// + /// </summary> + TwapId getTwapId() const; + void setTwapId(TwapId const& value); + bool twapIdIsSet() const; + void unsetTwapId(); + /// <summary> + /// + /// </summary> + HfcNodeId getHfcNodeId() const; + void setHfcNodeId(HfcNodeId const& value); + bool hfcNodeIdIsSet() const; + void unsetHfcNodeId(); + /// <summary> + /// + /// </summary> + std::string getGli() const; + void setGli(std::string const& value); + bool gliIsSet() const; + void unsetGli(); + /// <summary> + /// + /// </summary> + LineType getW5gbanLineType() const; + void setW5gbanLineType(LineType const& value); + bool w5gbanLineTypeIsSet() const; + void unsetW5gbanLineType(); + /// <summary> + /// + /// </summary> + std::string getGci() const; + void setGci(std::string const& value); + bool gciIsSet() const; + void unsetGci(); - /// <summary> - /// - /// </summary> - Tai getN3gppTai() const; - void setN3gppTai(Tai const& value); - bool n3gppTaiIsSet() const; - void unsetN3gppTai(); - /// <summary> - /// - /// </summary> - std::string getN3IwfId() const; - void setN3IwfId(std::string const& value); - bool n3IwfIdIsSet() const; - void unsetN3IwfId(); - /// <summary> - /// - /// </summary> - std::string getUeIpv4Addr() const; - void setUeIpv4Addr(std::string const& value); - bool ueIpv4AddrIsSet() const; - void unsetUeIpv4Addr(); - /// <summary> - /// - /// </summary> - Ipv6Addr getUeIpv6Addr() const; - void setUeIpv6Addr(Ipv6Addr const& value); - bool ueIpv6AddrIsSet() const; - void unsetUeIpv6Addr(); - /// <summary> - /// - /// </summary> - int32_t getPortNumber() const; - void setPortNumber(int32_t const value); - bool portNumberIsSet() const; - void unsetPortNumber(); - /// <summary> - /// - /// </summary> - TnapId getTnapId() const; - void setTnapId(TnapId const& value); - bool tnapIdIsSet() const; - void unsetTnapId(); - /// <summary> - /// - /// </summary> - TransportProtocol getProtocol() const; - void setProtocol(TransportProtocol const& value); - bool protocolIsSet() const; - void unsetProtocol(); - /// <summary> - /// - /// </summary> - TwapId getTwapId() const; - void setTwapId(TwapId const& value); - bool twapIdIsSet() const; - void unsetTwapId(); - /// <summary> - /// - /// </summary> - HfcNodeId getHfcNodeId() const; - void setHfcNodeId(HfcNodeId const& value); - bool hfcNodeIdIsSet() const; - void unsetHfcNodeId(); - /// <summary> - /// - /// </summary> - std::string getGli() const; - void setGli(std::string const& value); - bool gliIsSet() const; - void unsetGli(); - /// <summary> - /// - /// </summary> - LineType getW5gbanLineType() const; - void setW5gbanLineType(LineType const& value); - bool w5gbanLineTypeIsSet() const; - void unsetW5gbanLineType(); - /// <summary> - /// - /// </summary> - std::string getGci() const; - void setGci(std::string const& value); - bool gciIsSet() const; - void unsetGci(); + friend void to_json(nlohmann::json& j, const N3gaLocation& o); + friend void from_json(const nlohmann::json& j, N3gaLocation& o); - friend void to_json(nlohmann::json& j, const N3gaLocation& o); - friend void from_json(const nlohmann::json& j, N3gaLocation& o); -protected: - Tai m_N3gppTai; - bool m_N3gppTaiIsSet; - std::string m_N3IwfId; - bool m_N3IwfIdIsSet; - std::string m_UeIpv4Addr; - bool m_UeIpv4AddrIsSet; - Ipv6Addr m_UeIpv6Addr; - bool m_UeIpv6AddrIsSet; - int32_t m_PortNumber; - bool m_PortNumberIsSet; - TnapId m_TnapId; - bool m_TnapIdIsSet; - TransportProtocol m_Protocol; - bool m_ProtocolIsSet; - TwapId m_TwapId; - bool m_TwapIdIsSet; - HfcNodeId m_HfcNodeId; - bool m_HfcNodeIdIsSet; - std::string m_Gli; - bool m_GliIsSet; - LineType m_W5gbanLineType; - bool m_W5gbanLineTypeIsSet; - std::string m_Gci; - bool m_GciIsSet; - + protected: + Tai m_N3gppTai; + bool m_N3gppTaiIsSet; + std::string m_N3IwfId; + bool m_N3IwfIdIsSet; + std::string m_UeIpv4Addr; + bool m_UeIpv4AddrIsSet; + Ipv6Addr m_UeIpv6Addr; + bool m_UeIpv6AddrIsSet; + int32_t m_PortNumber; + bool m_PortNumberIsSet; + TnapId m_TnapId; + bool m_TnapIdIsSet; + TransportProtocol m_Protocol; + bool m_ProtocolIsSet; + TwapId m_TwapId; + bool m_TwapIdIsSet; + HfcNodeId m_HfcNodeId; + bool m_HfcNodeIdIsSet; + std::string m_Gli; + bool m_GliIsSet; + LineType m_W5gbanLineType; + bool m_W5gbanLineTypeIsSet; + std::string m_Gci; + bool m_GciIsSet; }; } // namespace model diff --git a/src/api-server/model/NFType.cpp b/src/api-server/model/NFType.cpp index 6d9b7d4..ee36409 100755 --- a/src/api-server/model/NFType.cpp +++ b/src/api-server/model/NFType.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,64 @@ namespace oai { namespace pcf { namespace model { -NFType::NFType() -{ - -} +NFType::NFType() {} -void NFType::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool NFType::operator!=(const NFType& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, NFType& o) { + from_json(j, o.m_value); } -NFType_anyOf NFType::getValue() const -{ - return m_value; +NFType_anyOf NFType::getValue() const { + return m_value; } -void NFType::setValue(NFType_anyOf value) -{ - m_value = value; +void NFType::setValue(NFType_anyOf value) { + m_value = value; } -NFType_anyOf::eNFType_anyOf NFType::getEnumValue() const -{ - return m_value.getValue(); +NFType_anyOf::eNFType_anyOf NFType::getEnumValue() const { + return m_value.getValue(); } -void NFType::setEnumValue(NFType_anyOf::eNFType_anyOf value) -{ - m_value.setValue(value); +void NFType::setEnumValue(NFType_anyOf::eNFType_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/NFType.h b/src/api-server/model/NFType.h index 2095024..bfe78cb 100755 --- a/src/api-server/model/NFType.h +++ b/src/api-server/model/NFType.h @@ -1,14 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 * @@ -18,7 +19,6 @@ #ifndef NFType_H_ #define NFType_H_ - #include "NFType_anyOf.h" #include <nlohmann/json.hpp> @@ -29,47 +29,46 @@ namespace model { /// <summary> /// NF types known to NRF /// </summary> -class NFType -{ -public: - NFType(); - virtual ~NFType() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const NFType& rhs) const; + bool operator!=(const NFType& rhs) const; - ///////////////////////////////////////////// - /// NFType members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + NFType_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/NFType_anyOf.cpp b/src/api-server/model/NFType_anyOf.cpp index 52330f3..5c193fc 100755 --- a/src/api-server/model/NFType_anyOf.cpp +++ b/src/api-server/model/NFType_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,307 +20,255 @@ namespace oai { namespace pcf { namespace model { -NFType_anyOf::NFType_anyOf() -{ - -} +NFType_anyOf::NFType_anyOf() {} -void NFType_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == NFType_anyOf::eNFType_anyOf::INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool NFType_anyOf::operator!=(const NFType_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +NFType_anyOf::eNFType_anyOf NFType_anyOf::getValue() const { + return m_value; } -void NFType_anyOf::setValue(NFType_anyOf::eNFType_anyOf value) -{ - m_value = value; +void NFType_anyOf::setValue(NFType_anyOf::eNFType_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/NFType_anyOf.h b/src/api-server/model/NFType_anyOf.h index 314e44e..a94a3c0 100755 --- a/src/api-server/model/NFType_anyOf.h +++ b/src/api-server/model/NFType_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,88 +26,90 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class NFType_anyOf -{ -public: - NFType_anyOf(); - virtual ~NFType_anyOf() = default; +class NFType_anyOf { + public: + NFType_anyOf(); + virtual ~NFType_anyOf() = default; - enum class eNFType_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const NFType_anyOf& rhs) const; + bool operator!=(const NFType_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// NFType_anyOf members - bool operator==(const NFType_anyOf& rhs) const; - bool operator!=(const NFType_anyOf& rhs) const; + NFType_anyOf::eNFType_anyOf getValue() const; + void setValue(NFType_anyOf::eNFType_anyOf value); - ///////////////////////////////////////////// - /// NFType_anyOf members + friend void to_json(nlohmann::json& j, const NFType_anyOf& o); + friend void from_json(const nlohmann::json& j, NFType_anyOf& o); - 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; + protected: + NFType_anyOf::eNFType_anyOf m_value = + NFType_anyOf::eNFType_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/Ncgi.cpp b/src/api-server/model/Ncgi.cpp index 46aeb48..33420ca 100755 --- a/src/api-server/model/Ncgi.cpp +++ b/src/api-server/model/Ncgi.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "Ncgi.h" #include "Helpers.h" @@ -20,133 +20,100 @@ namespace oai { namespace pcf { namespace model { -Ncgi::Ncgi() -{ - m_NrCellId = ""; - m_Nid = ""; - m_NidIsSet = false; - -} - -void Ncgi::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool Ncgi::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool Ncgi::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "Ncgi" : pathPrefix; - - - - /* NrCellId */ { - const std::string& value = m_NrCellId; - const std::string currentValuePath = _pathPrefix + ".nrCellId"; - - - - } - - if (nidIsSet()) - { - const std::string& value = m_Nid; - const std::string currentValuePath = _pathPrefix + ".nid"; - - - - } - - return success; -} - -bool Ncgi::operator==(const Ncgi& rhs) const -{ - return - - - (getPlmnId() == rhs.getPlmnId()) - && - - (getNrCellId() == rhs.getNrCellId()) - && - - - ((!nidIsSet() && !rhs.nidIsSet()) || (nidIsSet() && rhs.nidIsSet() && getNid() == rhs.getNid())) - - ; -} - -bool Ncgi::operator!=(const Ncgi& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const Ncgi& o) -{ - j = nlohmann::json(); - j["plmnId"] = o.m_PlmnId; - j["nrCellId"] = o.m_NrCellId; - if(o.nidIsSet()) - j["nid"] = o.m_Nid; - -} - -void from_json(const nlohmann::json& j, Ncgi& o) -{ - j.at("plmnId").get_to(o.m_PlmnId); - j.at("nrCellId").get_to(o.m_NrCellId); - if(j.find("nid") != j.end()) - { - j.at("nid").get_to(o.m_Nid); - o.m_NidIsSet = true; - } - -} - -PlmnId Ncgi::getPlmnId() const -{ - return m_PlmnId; -} -void Ncgi::setPlmnId(PlmnId const& value) -{ - m_PlmnId = value; -} -std::string Ncgi::getNrCellId() const -{ - return m_NrCellId; -} -void Ncgi::setNrCellId(std::string const& value) -{ - m_NrCellId = value; -} -std::string Ncgi::getNid() const -{ - return m_Nid; -} -void Ncgi::setNid(std::string const& value) -{ - m_Nid = value; - m_NidIsSet = true; -} -bool Ncgi::nidIsSet() const -{ - return m_NidIsSet; -} -void Ncgi::unsetNid() -{ - m_NidIsSet = false; +Ncgi::Ncgi() { + m_NrCellId = ""; + m_Nid = ""; + m_NidIsSet = false; +} + +void Ncgi::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool Ncgi::validate(std::stringstream& msg) const { + return validate(msg, ""); +} + +bool Ncgi::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "Ncgi" : pathPrefix; + + /* NrCellId */ { + const std::string& value = m_NrCellId; + const std::string currentValuePath = _pathPrefix + ".nrCellId"; + } + + if (nidIsSet()) { + const std::string& value = m_Nid; + const std::string currentValuePath = _pathPrefix + ".nid"; + } + + return success; +} + +bool Ncgi::operator==(const Ncgi& rhs) const { + return + + (getPlmnId() == rhs.getPlmnId()) && + + (getNrCellId() == rhs.getNrCellId()) && + + ((!nidIsSet() && !rhs.nidIsSet()) || + (nidIsSet() && rhs.nidIsSet() && getNid() == rhs.getNid())) + + ; +} + +bool Ncgi::operator!=(const Ncgi& rhs) const { + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const Ncgi& o) { + j = nlohmann::json(); + j["plmnId"] = o.m_PlmnId; + j["nrCellId"] = o.m_NrCellId; + if (o.nidIsSet()) j["nid"] = o.m_Nid; +} + +void from_json(const nlohmann::json& j, Ncgi& o) { + j.at("plmnId").get_to(o.m_PlmnId); + j.at("nrCellId").get_to(o.m_NrCellId); + if (j.find("nid") != j.end()) { + j.at("nid").get_to(o.m_Nid); + o.m_NidIsSet = true; + } } +PlmnId Ncgi::getPlmnId() const { + return m_PlmnId; +} +void Ncgi::setPlmnId(PlmnId const& value) { + m_PlmnId = value; +} +std::string Ncgi::getNrCellId() const { + return m_NrCellId; +} +void Ncgi::setNrCellId(std::string const& value) { + m_NrCellId = value; +} +std::string Ncgi::getNid() const { + return m_Nid; +} +void Ncgi::setNid(std::string const& value) { + m_Nid = value; + m_NidIsSet = true; +} +bool Ncgi::nidIsSet() const { + return m_NidIsSet; +} +void Ncgi::unsetNid() { + m_NidIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/Ncgi.h b/src/api-server/model/Ncgi.h index 37ad838..263eef0 100755 --- a/src/api-server/model/Ncgi.h +++ b/src/api-server/model/Ncgi.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * Ncgi.h * - * + * */ #ifndef Ncgi_H_ #define Ncgi_H_ - #include <string> #include "PlmnId.h" #include <nlohmann/json.hpp> @@ -28,66 +28,65 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class Ncgi -{ -public: - Ncgi(); - virtual ~Ncgi() = 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 Ncgi& rhs) const; - bool operator!=(const Ncgi& rhs) const; - - ///////////////////////////////////////////// - /// Ncgi members - - /// <summary> - /// - /// </summary> - PlmnId getPlmnId() const; - void setPlmnId(PlmnId const& value); - /// <summary> - /// - /// </summary> - std::string getNrCellId() const; - void setNrCellId(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getNid() const; - void setNid(std::string const& value); - bool nidIsSet() const; - void unsetNid(); - - friend void to_json(nlohmann::json& j, const Ncgi& o); - friend void from_json(const nlohmann::json& j, Ncgi& o); -protected: - PlmnId m_PlmnId; - - std::string m_NrCellId; - - std::string m_Nid; - bool m_NidIsSet; - +class Ncgi { + public: + Ncgi(); + virtual ~Ncgi() = 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 Ncgi& rhs) const; + bool operator!=(const Ncgi& rhs) const; + + ///////////////////////////////////////////// + /// Ncgi members + + /// <summary> + /// + /// </summary> + PlmnId getPlmnId() const; + void setPlmnId(PlmnId const& value); + /// <summary> + /// + /// </summary> + std::string getNrCellId() const; + void setNrCellId(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getNid() const; + void setNid(std::string const& value); + bool nidIsSet() const; + void unsetNid(); + + friend void to_json(nlohmann::json& j, const Ncgi& o); + friend void from_json(const nlohmann::json& j, Ncgi& o); + + protected: + PlmnId m_PlmnId; + + std::string m_NrCellId; + + std::string m_Nid; + bool m_NidIsSet; }; } // namespace model diff --git a/src/api-server/model/NgApCause.cpp b/src/api-server/model/NgApCause.cpp index 259a844..a27faa7 100755 --- a/src/api-server/model/NgApCause.cpp +++ b/src/api-server/model/NgApCause.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "NgApCause.h" #include "Helpers.h" @@ -20,116 +20,89 @@ namespace oai { namespace pcf { namespace model { -NgApCause::NgApCause() -{ - m_Group = 0; - m_Value = 0; - +NgApCause::NgApCause() { + m_Group = 0; + m_Value = 0; } -void NgApCause::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void NgApCause::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool NgApCause::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool NgApCause::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool NgApCause::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "NgApCause" : pathPrefix; - - - - /* Group */ { - const int32_t& value = m_Group; - const std::string currentValuePath = _pathPrefix + ".group"; - - - if (value < 0) - { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } +bool NgApCause::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "NgApCause" : pathPrefix; + + /* Group */ { + const int32_t& value = m_Group; + const std::string currentValuePath = _pathPrefix + ".group"; + if (value < 0) { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0;"; } - - - /* Value */ { - const int32_t& value = m_Value; - const std::string currentValuePath = _pathPrefix + ".value"; - - - if (value < 0) - { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } + } + /* Value */ { + const int32_t& value = m_Value; + const std::string currentValuePath = _pathPrefix + ".value"; + + if (value < 0) { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0;"; } - - return success; + } + + return success; } -bool NgApCause::operator==(const NgApCause& rhs) const -{ - return - - - (getGroup() == rhs.getGroup()) - && - - (getValue() == rhs.getValue()) - - - ; +bool NgApCause::operator==(const NgApCause& rhs) const { + return + + (getGroup() == rhs.getGroup()) && + + (getValue() == rhs.getValue()) + + ; } -bool NgApCause::operator!=(const NgApCause& rhs) const -{ - return !(*this == rhs); +bool NgApCause::operator!=(const NgApCause& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const NgApCause& o) -{ - j = nlohmann::json(); - j["group"] = o.m_Group; - j["value"] = o.m_Value; - +void to_json(nlohmann::json& j, const NgApCause& o) { + j = nlohmann::json(); + j["group"] = o.m_Group; + j["value"] = o.m_Value; } -void from_json(const nlohmann::json& j, NgApCause& o) -{ - j.at("group").get_to(o.m_Group); - j.at("value").get_to(o.m_Value); - +void from_json(const nlohmann::json& j, NgApCause& o) { + j.at("group").get_to(o.m_Group); + j.at("value").get_to(o.m_Value); } -int32_t NgApCause::getGroup() const -{ - return m_Group; +int32_t NgApCause::getGroup() const { + return m_Group; } -void NgApCause::setGroup(int32_t const value) -{ - m_Group = value; +void NgApCause::setGroup(int32_t const value) { + m_Group = value; } -int32_t NgApCause::getValue() const -{ - return m_Value; +int32_t NgApCause::getValue() const { + return m_Value; } -void NgApCause::setValue(int32_t const value) -{ - m_Value = value; +void NgApCause::setValue(int32_t const value) { + m_Value = value; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/NgApCause.h b/src/api-server/model/NgApCause.h index 83dec0b..ca1cb35 100755 --- a/src/api-server/model/NgApCause.h +++ b/src/api-server/model/NgApCause.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * NgApCause.h * - * + * */ #ifndef NgApCause_H_ #define NgApCause_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,57 +26,55 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class NgApCause -{ -public: - NgApCause(); - virtual ~NgApCause() = 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 NgApCause& rhs) const; - bool operator!=(const NgApCause& rhs) const; - - ///////////////////////////////////////////// - /// NgApCause members - - /// <summary> - /// - /// </summary> - int32_t getGroup() const; - void setGroup(int32_t const value); - /// <summary> - /// - /// </summary> - int32_t getValue() const; - void setValue(int32_t const value); - - friend void to_json(nlohmann::json& j, const NgApCause& o); - friend void from_json(const nlohmann::json& j, NgApCause& o); -protected: - int32_t m_Group; - - int32_t m_Value; - - +class NgApCause { + public: + NgApCause(); + virtual ~NgApCause() = 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 NgApCause& rhs) const; + bool operator!=(const NgApCause& rhs) const; + + ///////////////////////////////////////////// + /// NgApCause members + + /// <summary> + /// + /// </summary> + int32_t getGroup() const; + void setGroup(int32_t const value); + /// <summary> + /// + /// </summary> + int32_t getValue() const; + void setValue(int32_t const value); + + friend void to_json(nlohmann::json& j, const NgApCause& o); + friend void from_json(const nlohmann::json& j, NgApCause& o); + + protected: + int32_t m_Group; + + int32_t m_Value; }; } // namespace model diff --git a/src/api-server/model/NrLocation.cpp b/src/api-server/model/NrLocation.cpp index 81c1c4b..641fe90 100755 --- a/src/api-server/model/NrLocation.cpp +++ b/src/api-server/model/NrLocation.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "NrLocation.h" #include "Helpers.h" @@ -20,266 +20,219 @@ namespace oai { namespace pcf { namespace model { -NrLocation::NrLocation() -{ - m_AgeOfLocationInformation = 0; - m_AgeOfLocationInformationIsSet = false; - m_UeLocationTimestamp = ""; - m_UeLocationTimestampIsSet = false; - m_GeographicalInformation = ""; - m_GeographicalInformationIsSet = false; - m_GeodeticInformation = ""; - m_GeodeticInformationIsSet = false; - m_GlobalGnbIdIsSet = false; - +NrLocation::NrLocation() { + m_AgeOfLocationInformation = 0; + m_AgeOfLocationInformationIsSet = false; + m_UeLocationTimestamp = ""; + m_UeLocationTimestampIsSet = false; + m_GeographicalInformation = ""; + m_GeographicalInformationIsSet = false; + m_GeodeticInformation = ""; + m_GeodeticInformationIsSet = false; + m_GlobalGnbIdIsSet = false; } -void NrLocation::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void NrLocation::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool NrLocation::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool NrLocation::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool NrLocation::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "NrLocation" : pathPrefix; +bool NrLocation::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "NrLocation" : pathPrefix; - - if (ageOfLocationInformationIsSet()) - { - const int32_t& value = m_AgeOfLocationInformation; - const std::string currentValuePath = _pathPrefix + ".ageOfLocationInformation"; - - - if (value < 0) - { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - if (value > 32767) - { - success = false; - msg << currentValuePath << ": must be less than or equal to 32767;"; - } + if (ageOfLocationInformationIsSet()) { + const int32_t& value = m_AgeOfLocationInformation; + const std::string currentValuePath = + _pathPrefix + ".ageOfLocationInformation"; + if (value < 0) { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0;"; } - - if (geographicalInformationIsSet()) - { - const std::string& value = m_GeographicalInformation; - const std::string currentValuePath = _pathPrefix + ".geographicalInformation"; - - - - } - - if (geodeticInformationIsSet()) - { - const std::string& value = m_GeodeticInformation; - const std::string currentValuePath = _pathPrefix + ".geodeticInformation"; - - - + if (value > 32767) { + success = false; + msg << currentValuePath << ": must be less than or equal to 32767;"; } - - return success; + } + + if (geographicalInformationIsSet()) { + const std::string& value = m_GeographicalInformation; + const std::string currentValuePath = + _pathPrefix + ".geographicalInformation"; + } + + if (geodeticInformationIsSet()) { + const std::string& value = m_GeodeticInformation; + const std::string currentValuePath = _pathPrefix + ".geodeticInformation"; + } + + return success; } -bool NrLocation::operator==(const NrLocation& rhs) const -{ - return - - - (getTai() == rhs.getTai()) - && - - (getNcgi() == rhs.getNcgi()) - && - - - ((!ageOfLocationInformationIsSet() && !rhs.ageOfLocationInformationIsSet()) || (ageOfLocationInformationIsSet() && rhs.ageOfLocationInformationIsSet() && getAgeOfLocationInformation() == rhs.getAgeOfLocationInformation())) && - - - ((!ueLocationTimestampIsSet() && !rhs.ueLocationTimestampIsSet()) || (ueLocationTimestampIsSet() && rhs.ueLocationTimestampIsSet() && getUeLocationTimestamp() == rhs.getUeLocationTimestamp())) && - - - ((!geographicalInformationIsSet() && !rhs.geographicalInformationIsSet()) || (geographicalInformationIsSet() && rhs.geographicalInformationIsSet() && getGeographicalInformation() == rhs.getGeographicalInformation())) && - - - ((!geodeticInformationIsSet() && !rhs.geodeticInformationIsSet()) || (geodeticInformationIsSet() && rhs.geodeticInformationIsSet() && getGeodeticInformation() == rhs.getGeodeticInformation())) && - - - ((!globalGnbIdIsSet() && !rhs.globalGnbIdIsSet()) || (globalGnbIdIsSet() && rhs.globalGnbIdIsSet() && getGlobalGnbId() == rhs.getGlobalGnbId())) - - ; -} +bool NrLocation::operator==(const NrLocation& rhs) const { + return + + (getTai() == rhs.getTai()) && + + (getNcgi() == rhs.getNcgi()) && + + ((!ageOfLocationInformationIsSet() && + !rhs.ageOfLocationInformationIsSet()) || + (ageOfLocationInformationIsSet() && + rhs.ageOfLocationInformationIsSet() && + getAgeOfLocationInformation() == rhs.getAgeOfLocationInformation())) && + + ((!ueLocationTimestampIsSet() && !rhs.ueLocationTimestampIsSet()) || + (ueLocationTimestampIsSet() && rhs.ueLocationTimestampIsSet() && + getUeLocationTimestamp() == rhs.getUeLocationTimestamp())) && -bool NrLocation::operator!=(const NrLocation& rhs) const -{ - return !(*this == rhs); + ((!geographicalInformationIsSet() && + !rhs.geographicalInformationIsSet()) || + (geographicalInformationIsSet() && rhs.geographicalInformationIsSet() && + getGeographicalInformation() == rhs.getGeographicalInformation())) && + + ((!geodeticInformationIsSet() && !rhs.geodeticInformationIsSet()) || + (geodeticInformationIsSet() && rhs.geodeticInformationIsSet() && + getGeodeticInformation() == rhs.getGeodeticInformation())) && + + ((!globalGnbIdIsSet() && !rhs.globalGnbIdIsSet()) || + (globalGnbIdIsSet() && rhs.globalGnbIdIsSet() && + getGlobalGnbId() == rhs.getGlobalGnbId())) + + ; } -void to_json(nlohmann::json& j, const NrLocation& o) -{ - j = nlohmann::json(); - j["tai"] = o.m_Tai; - j["ncgi"] = o.m_Ncgi; - if(o.ageOfLocationInformationIsSet()) - j["ageOfLocationInformation"] = o.m_AgeOfLocationInformation; - if(o.ueLocationTimestampIsSet()) - j["ueLocationTimestamp"] = o.m_UeLocationTimestamp; - if(o.geographicalInformationIsSet()) - j["geographicalInformation"] = o.m_GeographicalInformation; - if(o.geodeticInformationIsSet()) - j["geodeticInformation"] = o.m_GeodeticInformation; - if(o.globalGnbIdIsSet()) - j["globalGnbId"] = o.m_GlobalGnbId; - +bool NrLocation::operator!=(const NrLocation& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, NrLocation& o) -{ - j.at("tai").get_to(o.m_Tai); - j.at("ncgi").get_to(o.m_Ncgi); - if(j.find("ageOfLocationInformation") != j.end()) - { - j.at("ageOfLocationInformation").get_to(o.m_AgeOfLocationInformation); - o.m_AgeOfLocationInformationIsSet = true; - } - if(j.find("ueLocationTimestamp") != j.end()) - { - j.at("ueLocationTimestamp").get_to(o.m_UeLocationTimestamp); - o.m_UeLocationTimestampIsSet = true; - } - if(j.find("geographicalInformation") != j.end()) - { - j.at("geographicalInformation").get_to(o.m_GeographicalInformation); - o.m_GeographicalInformationIsSet = true; - } - if(j.find("geodeticInformation") != j.end()) - { - j.at("geodeticInformation").get_to(o.m_GeodeticInformation); - o.m_GeodeticInformationIsSet = true; - } - if(j.find("globalGnbId") != j.end()) - { - j.at("globalGnbId").get_to(o.m_GlobalGnbId); - o.m_GlobalGnbIdIsSet = true; - } - +void to_json(nlohmann::json& j, const NrLocation& o) { + j = nlohmann::json(); + j["tai"] = o.m_Tai; + j["ncgi"] = o.m_Ncgi; + if (o.ageOfLocationInformationIsSet()) + j["ageOfLocationInformation"] = o.m_AgeOfLocationInformation; + if (o.ueLocationTimestampIsSet()) + j["ueLocationTimestamp"] = o.m_UeLocationTimestamp; + if (o.geographicalInformationIsSet()) + j["geographicalInformation"] = o.m_GeographicalInformation; + if (o.geodeticInformationIsSet()) + j["geodeticInformation"] = o.m_GeodeticInformation; + if (o.globalGnbIdIsSet()) j["globalGnbId"] = o.m_GlobalGnbId; } -Tai NrLocation::getTai() const -{ - return m_Tai; -} -void NrLocation::setTai(Tai const& value) -{ - m_Tai = value; -} -Ncgi NrLocation::getNcgi() const -{ - return m_Ncgi; -} -void NrLocation::setNcgi(Ncgi const& value) -{ - m_Ncgi = value; -} -int32_t NrLocation::getAgeOfLocationInformation() const -{ - return m_AgeOfLocationInformation; -} -void NrLocation::setAgeOfLocationInformation(int32_t const value) -{ - m_AgeOfLocationInformation = value; - m_AgeOfLocationInformationIsSet = true; -} -bool NrLocation::ageOfLocationInformationIsSet() const -{ - return m_AgeOfLocationInformationIsSet; -} -void NrLocation::unsetAgeOfLocationInformation() -{ - m_AgeOfLocationInformationIsSet = false; -} -std::string NrLocation::getUeLocationTimestamp() const -{ - return m_UeLocationTimestamp; -} -void NrLocation::setUeLocationTimestamp(std::string const& value) -{ - m_UeLocationTimestamp = value; - m_UeLocationTimestampIsSet = true; -} -bool NrLocation::ueLocationTimestampIsSet() const -{ - return m_UeLocationTimestampIsSet; -} -void NrLocation::unsetUeLocationTimestamp() -{ - m_UeLocationTimestampIsSet = false; -} -std::string NrLocation::getGeographicalInformation() const -{ - return m_GeographicalInformation; -} -void NrLocation::setGeographicalInformation(std::string const& value) -{ - m_GeographicalInformation = value; - m_GeographicalInformationIsSet = true; -} -bool NrLocation::geographicalInformationIsSet() const -{ - return m_GeographicalInformationIsSet; -} -void NrLocation::unsetGeographicalInformation() -{ - m_GeographicalInformationIsSet = false; -} -std::string NrLocation::getGeodeticInformation() const -{ - return m_GeodeticInformation; -} -void NrLocation::setGeodeticInformation(std::string const& value) -{ - m_GeodeticInformation = value; - m_GeodeticInformationIsSet = true; -} -bool NrLocation::geodeticInformationIsSet() const -{ - return m_GeodeticInformationIsSet; -} -void NrLocation::unsetGeodeticInformation() -{ - m_GeodeticInformationIsSet = false; -} -GlobalRanNodeId NrLocation::getGlobalGnbId() const -{ - return m_GlobalGnbId; -} -void NrLocation::setGlobalGnbId(GlobalRanNodeId const& value) -{ - m_GlobalGnbId = value; - m_GlobalGnbIdIsSet = true; -} -bool NrLocation::globalGnbIdIsSet() const -{ - return m_GlobalGnbIdIsSet; -} -void NrLocation::unsetGlobalGnbId() -{ - m_GlobalGnbIdIsSet = false; +void from_json(const nlohmann::json& j, NrLocation& o) { + j.at("tai").get_to(o.m_Tai); + j.at("ncgi").get_to(o.m_Ncgi); + if (j.find("ageOfLocationInformation") != j.end()) { + j.at("ageOfLocationInformation").get_to(o.m_AgeOfLocationInformation); + o.m_AgeOfLocationInformationIsSet = true; + } + if (j.find("ueLocationTimestamp") != j.end()) { + j.at("ueLocationTimestamp").get_to(o.m_UeLocationTimestamp); + o.m_UeLocationTimestampIsSet = true; + } + if (j.find("geographicalInformation") != j.end()) { + j.at("geographicalInformation").get_to(o.m_GeographicalInformation); + o.m_GeographicalInformationIsSet = true; + } + if (j.find("geodeticInformation") != j.end()) { + j.at("geodeticInformation").get_to(o.m_GeodeticInformation); + o.m_GeodeticInformationIsSet = true; + } + if (j.find("globalGnbId") != j.end()) { + j.at("globalGnbId").get_to(o.m_GlobalGnbId); + o.m_GlobalGnbIdIsSet = true; + } } +Tai NrLocation::getTai() const { + return m_Tai; +} +void NrLocation::setTai(Tai const& value) { + m_Tai = value; +} +Ncgi NrLocation::getNcgi() const { + return m_Ncgi; +} +void NrLocation::setNcgi(Ncgi const& value) { + m_Ncgi = value; +} +int32_t NrLocation::getAgeOfLocationInformation() const { + return m_AgeOfLocationInformation; +} +void NrLocation::setAgeOfLocationInformation(int32_t const value) { + m_AgeOfLocationInformation = value; + m_AgeOfLocationInformationIsSet = true; +} +bool NrLocation::ageOfLocationInformationIsSet() const { + return m_AgeOfLocationInformationIsSet; +} +void NrLocation::unsetAgeOfLocationInformation() { + m_AgeOfLocationInformationIsSet = false; +} +std::string NrLocation::getUeLocationTimestamp() const { + return m_UeLocationTimestamp; +} +void NrLocation::setUeLocationTimestamp(std::string const& value) { + m_UeLocationTimestamp = value; + m_UeLocationTimestampIsSet = true; +} +bool NrLocation::ueLocationTimestampIsSet() const { + return m_UeLocationTimestampIsSet; +} +void NrLocation::unsetUeLocationTimestamp() { + m_UeLocationTimestampIsSet = false; +} +std::string NrLocation::getGeographicalInformation() const { + return m_GeographicalInformation; +} +void NrLocation::setGeographicalInformation(std::string const& value) { + m_GeographicalInformation = value; + m_GeographicalInformationIsSet = true; +} +bool NrLocation::geographicalInformationIsSet() const { + return m_GeographicalInformationIsSet; +} +void NrLocation::unsetGeographicalInformation() { + m_GeographicalInformationIsSet = false; +} +std::string NrLocation::getGeodeticInformation() const { + return m_GeodeticInformation; +} +void NrLocation::setGeodeticInformation(std::string const& value) { + m_GeodeticInformation = value; + m_GeodeticInformationIsSet = true; +} +bool NrLocation::geodeticInformationIsSet() const { + return m_GeodeticInformationIsSet; +} +void NrLocation::unsetGeodeticInformation() { + m_GeodeticInformationIsSet = false; +} +GlobalRanNodeId NrLocation::getGlobalGnbId() const { + return m_GlobalGnbId; +} +void NrLocation::setGlobalGnbId(GlobalRanNodeId const& value) { + m_GlobalGnbId = value; + m_GlobalGnbIdIsSet = true; +} +bool NrLocation::globalGnbIdIsSet() const { + return m_GlobalGnbIdIsSet; +} +void NrLocation::unsetGlobalGnbId() { + m_GlobalGnbIdIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/NrLocation.h b/src/api-server/model/NrLocation.h index b8d038f..1f93c6f 100755 --- a/src/api-server/model/NrLocation.h +++ b/src/api-server/model/NrLocation.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * NrLocation.h * - * + * */ #ifndef NrLocation_H_ #define NrLocation_H_ - #include "Ncgi.h" #include "Tai.h" #include <string> @@ -30,102 +30,101 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class NrLocation -{ -public: - NrLocation(); - virtual ~NrLocation() = 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 NrLocation& rhs) const; - bool operator!=(const NrLocation& rhs) const; - - ///////////////////////////////////////////// - /// NrLocation members - - /// <summary> - /// - /// </summary> - Tai getTai() const; - void setTai(Tai const& value); - /// <summary> - /// - /// </summary> - Ncgi getNcgi() const; - void setNcgi(Ncgi const& value); - /// <summary> - /// - /// </summary> - int32_t getAgeOfLocationInformation() const; - void setAgeOfLocationInformation(int32_t const value); - bool ageOfLocationInformationIsSet() const; - void unsetAgeOfLocationInformation(); - /// <summary> - /// - /// </summary> - std::string getUeLocationTimestamp() const; - void setUeLocationTimestamp(std::string const& value); - bool ueLocationTimestampIsSet() const; - void unsetUeLocationTimestamp(); - /// <summary> - /// - /// </summary> - std::string getGeographicalInformation() const; - void setGeographicalInformation(std::string const& value); - bool geographicalInformationIsSet() const; - void unsetGeographicalInformation(); - /// <summary> - /// - /// </summary> - std::string getGeodeticInformation() const; - void setGeodeticInformation(std::string const& value); - bool geodeticInformationIsSet() const; - void unsetGeodeticInformation(); - /// <summary> - /// - /// </summary> - GlobalRanNodeId getGlobalGnbId() const; - void setGlobalGnbId(GlobalRanNodeId const& value); - bool globalGnbIdIsSet() const; - void unsetGlobalGnbId(); - - friend void to_json(nlohmann::json& j, const NrLocation& o); - friend void from_json(const nlohmann::json& j, NrLocation& o); -protected: - Tai m_Tai; - - Ncgi m_Ncgi; - - int32_t m_AgeOfLocationInformation; - bool m_AgeOfLocationInformationIsSet; - std::string m_UeLocationTimestamp; - bool m_UeLocationTimestampIsSet; - std::string m_GeographicalInformation; - bool m_GeographicalInformationIsSet; - std::string m_GeodeticInformation; - bool m_GeodeticInformationIsSet; - GlobalRanNodeId m_GlobalGnbId; - bool m_GlobalGnbIdIsSet; - +class NrLocation { + public: + NrLocation(); + virtual ~NrLocation() = 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 NrLocation& rhs) const; + bool operator!=(const NrLocation& rhs) const; + + ///////////////////////////////////////////// + /// NrLocation members + + /// <summary> + /// + /// </summary> + Tai getTai() const; + void setTai(Tai const& value); + /// <summary> + /// + /// </summary> + Ncgi getNcgi() const; + void setNcgi(Ncgi const& value); + /// <summary> + /// + /// </summary> + int32_t getAgeOfLocationInformation() const; + void setAgeOfLocationInformation(int32_t const value); + bool ageOfLocationInformationIsSet() const; + void unsetAgeOfLocationInformation(); + /// <summary> + /// + /// </summary> + std::string getUeLocationTimestamp() const; + void setUeLocationTimestamp(std::string const& value); + bool ueLocationTimestampIsSet() const; + void unsetUeLocationTimestamp(); + /// <summary> + /// + /// </summary> + std::string getGeographicalInformation() const; + void setGeographicalInformation(std::string const& value); + bool geographicalInformationIsSet() const; + void unsetGeographicalInformation(); + /// <summary> + /// + /// </summary> + std::string getGeodeticInformation() const; + void setGeodeticInformation(std::string const& value); + bool geodeticInformationIsSet() const; + void unsetGeodeticInformation(); + /// <summary> + /// + /// </summary> + GlobalRanNodeId getGlobalGnbId() const; + void setGlobalGnbId(GlobalRanNodeId const& value); + bool globalGnbIdIsSet() const; + void unsetGlobalGnbId(); + + friend void to_json(nlohmann::json& j, const NrLocation& o); + friend void from_json(const nlohmann::json& j, NrLocation& o); + + protected: + Tai m_Tai; + + Ncgi m_Ncgi; + + int32_t m_AgeOfLocationInformation; + bool m_AgeOfLocationInformationIsSet; + std::string m_UeLocationTimestamp; + bool m_UeLocationTimestampIsSet; + std::string m_GeographicalInformation; + bool m_GeographicalInformationIsSet; + std::string m_GeodeticInformation; + bool m_GeodeticInformationIsSet; + GlobalRanNodeId m_GlobalGnbId; + bool m_GlobalGnbIdIsSet; }; } // namespace model diff --git a/src/api-server/model/NullValue.cpp b/src/api-server/model/NullValue.cpp index 6afc38d..1f84c6e 100755 --- a/src/api-server/model/NullValue.cpp +++ b/src/api-server/model/NullValue.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ #include "NullValue.h" #include "Helpers.h" @@ -20,91 +20,74 @@ namespace oai { namespace pcf { namespace model { -NullValue::NullValue() -{ - -} +NullValue::NullValue() {} -void NullValue::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void NullValue::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool NullValue::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool NullValue::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool NullValue::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "NullValue" : pathPrefix; +bool NullValue::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "NullValue" : pathPrefix; - - if (m_value == NullValue::eNullValue::INVALID_VALUE_OPENAPI_GENERATED) - { - success = false; - msg << _pathPrefix << ": has no value;"; - } + if (m_value == NullValue::eNullValue::INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + return success; } -bool NullValue::operator==(const NullValue& rhs) const -{ - return - getValue() == rhs.getValue() - - ; -} +bool NullValue::operator==(const NullValue& rhs) const { + return getValue() == rhs.getValue() -bool NullValue::operator!=(const NullValue& rhs) const -{ - return !(*this == rhs); + ; } -void to_json(nlohmann::json& j, const NullValue& o) -{ - j = nlohmann::json(); - - switch (o.getValue()) - { - case NullValue::eNullValue::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case NullValue::eNullValue::NONE: - j = "null"; - break; - } +bool NullValue::operator!=(const NullValue& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, NullValue& o) -{ - - auto s = j.get<std::string>(); - if (s == "null") { - o.setValue(NullValue::eNullValue::NONE); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " NullValue::eNullValue"; - throw std::invalid_argument(ss.str()); - } +void to_json(nlohmann::json& j, const NullValue& o) { + j = nlohmann::json(); + + switch (o.getValue()) { + case NullValue::eNullValue::INVALID_VALUE_OPENAPI_GENERATED: + j = "INVALID_VALUE_OPENAPI_GENERATED"; + break; + case NullValue::eNullValue::NONE: + j = "null"; + break; + } +} +void from_json(const nlohmann::json& j, NullValue& o) { + auto s = j.get<std::string>(); + if (s == "null") { + o.setValue(NullValue::eNullValue::NONE); + } else { + std::stringstream ss; + ss << "Unexpected value " << s << " in json" + << " cannot be converted to enum of type" + << " NullValue::eNullValue"; + throw std::invalid_argument(ss.str()); + } } -NullValue::eNullValue NullValue::getValue() const -{ - return m_value; +NullValue::eNullValue NullValue::getValue() const { + return m_value; } -void NullValue::setValue(NullValue::eNullValue value) -{ - m_value = value; +void NullValue::setValue(NullValue::eNullValue value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/NullValue.h b/src/api-server/model/NullValue.h index d031915..3ba66f4 100755 --- a/src/api-server/model/NullValue.h +++ b/src/api-server/model/NullValue.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * NullValue.h * - * + * */ #ifndef NullValue_H_ #define NullValue_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,52 +26,54 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class NullValue -{ -public: - NullValue(); - virtual ~NullValue() = default; +class NullValue { + public: + NullValue(); + virtual ~NullValue() = default; - enum class eNullValue { + enum class eNullValue { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, NONE - }; + }; + + /// <summary> + /// Validate the current data in the model. Throws a ValidationException on + /// failure. + /// </summary> + void validate() const; + + /// <summary> + /// Validate the current data in the model. Returns false on error and writes + /// an error message into the given stringstream. + /// </summary> + bool validate(std::stringstream& msg) const; - /// <summary> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const NullValue& rhs) const; + bool operator!=(const NullValue& rhs) 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; + ///////////////////////////////////////////// + /// NullValue members - bool operator==(const NullValue& rhs) const; - bool operator!=(const NullValue& rhs) const; + NullValue::eNullValue getValue() const; + void setValue(NullValue::eNullValue value); - ///////////////////////////////////////////// - /// NullValue members + friend void to_json(nlohmann::json& j, const NullValue& o); + friend void from_json(const nlohmann::json& j, NullValue& o); - NullValue::eNullValue getValue() const; - void setValue(NullValue::eNullValue value); - - friend void to_json(nlohmann::json& j, const NullValue& o); - friend void from_json(const nlohmann::json& j, NullValue& o); -protected: - NullValue::eNullValue m_value = NullValue::eNullValue::INVALID_VALUE_OPENAPI_GENERATED; + protected: + NullValue::eNullValue m_value = + NullValue::eNullValue::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/PacketFilterInfo.cpp b/src/api-server/model/PacketFilterInfo.cpp index b0eaa15..82adb9d 100755 --- a/src/api-server/model/PacketFilterInfo.cpp +++ b/src/api-server/model/PacketFilterInfo.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,232 +20,189 @@ 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; +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::flowDirectionIsSet() const -{ - return m_FlowDirectionIsSet; + +bool PacketFilterInfo::operator!=(const PacketFilterInfo& rhs) const { + return !(*this == rhs); } -void PacketFilterInfo::unsetFlowDirection() -{ - m_FlowDirectionIsSet = false; + +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 diff --git a/src/api-server/model/PacketFilterInfo.h b/src/api-server/model/PacketFilterInfo.h index aecdcc6..0a42b61 100755 --- a/src/api-server/model/PacketFilterInfo.h +++ b/src/api-server/model/PacketFilterInfo.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,97 +28,98 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PacketFilterInfo -{ -public: - PacketFilterInfo(); - virtual ~PacketFilterInfo() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const PacketFilterInfo& rhs) const; - bool operator!=(const PacketFilterInfo& rhs) const; + ///////////////////////////////////////////// + /// PacketFilterInfo members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; - + 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 diff --git a/src/api-server/model/PartialSuccessReport.cpp b/src/api-server/model/PartialSuccessReport.cpp index 0b935f0..8b694c4 100755 --- a/src/api-server/model/PartialSuccessReport.cpp +++ b/src/api-server/model/PartialSuccessReport.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,208 +20,177 @@ namespace oai { namespace pcf { namespace model { -PartialSuccessReport::PartialSuccessReport() -{ - m_RuleReportsIsSet = false; - m_SessRuleReportsIsSet = false; - m_UeCampingRepIsSet = false; - +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()); - } +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++; - } - } +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;"; } - - 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++; - } - } + { // 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;"; } - - 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; + { // 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 diff --git a/src/api-server/model/PartialSuccessReport.h b/src/api-server/model/PartialSuccessReport.h index ba12d98..874f770 100755 --- a/src/api-server/model/PartialSuccessReport.h +++ b/src/api-server/model/PartialSuccessReport.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -31,77 +31,78 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PartialSuccessReport -{ -public: - PartialSuccessReport(); - virtual ~PartialSuccessReport() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const PartialSuccessReport& rhs) const; - bool operator!=(const PartialSuccessReport& rhs) const; + ///////////////////////////////////////////// + /// PartialSuccessReport members - ///////////////////////////////////////////// - /// 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(); - /// <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); - friend void to_json(nlohmann::json& j, const PartialSuccessReport& o); - friend void from_json(const nlohmann::json& j, PartialSuccessReport& o); -protected: - FailureCause m_FailureCause; + 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; - + std::vector<RuleReport> m_RuleReports; + bool m_RuleReportsIsSet; + std::vector<SessionRuleReport> m_SessRuleReports; + bool m_SessRuleReportsIsSet; + UeCampingRep m_UeCampingRep; + bool m_UeCampingRepIsSet; }; } // namespace model diff --git a/src/api-server/model/PatchItem.cpp b/src/api-server/model/PatchItem.cpp index 116c6ea..936e9a4 100644 --- a/src/api-server/model/PatchItem.cpp +++ b/src/api-server/model/PatchItem.cpp @@ -39,7 +39,7 @@ using namespace std; namespace oai { namespace pcf { namespace model { - + PatchItem::PatchItem() { m_Path = ""; m_From = ""; diff --git a/src/api-server/model/PccRule.cpp b/src/api-server/model/PccRule.cpp index 4f31cdf..85b1123 100755 --- a/src/api-server/model/PccRule.cpp +++ b/src/api-server/model/PccRule.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,866 +20,706 @@ 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()); - } +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; } -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++; - } - } +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 (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 (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 (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 (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;"; } - - 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++; - } - } + { // 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 (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;"; } - - 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++; - } - } + { // 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;"; } - - 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++; - } - } + { // 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 (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;"; } - - 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++; - } - } + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const std::string& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + i++; + } } - - return success; -} - -bool PccRule::operator==(const PccRule& rhs) const -{ - return - - - - ((!flowInfosIsSet() && !rhs.flowInfosIsSet()) || (flowInfosIsSet() && rhs.flowInfosIsSet() && getFlowInfos() == rhs.getFlowInfos())) && - - - ((!appIdIsSet() && !rhs.appIdIsSet()) || (appIdIsSet() && rhs.appIdIsSet() && getAppId() == rhs.getAppId())) && - - - ((!contVerIsSet() && !rhs.contVerIsSet()) || (contVerIsSet() && rhs.contVerIsSet() && getContVer() == rhs.getContVer())) && - - (getPccRuleId() == rhs.getPccRuleId()) - && - - - ((!precedenceIsSet() && !rhs.precedenceIsSet()) || (precedenceIsSet() && rhs.precedenceIsSet() && getPrecedence() == rhs.getPrecedence())) && - - - ((!afSigProtocolIsSet() && !rhs.afSigProtocolIsSet()) || (afSigProtocolIsSet() && rhs.afSigProtocolIsSet() && getAfSigProtocol() == rhs.getAfSigProtocol())) && - - - ((!appRelocIsSet() && !rhs.appRelocIsSet()) || (appRelocIsSet() && rhs.appRelocIsSet() && isAppReloc() == rhs.isAppReloc())) && - - - ((!refQosDataIsSet() && !rhs.refQosDataIsSet()) || (refQosDataIsSet() && rhs.refQosDataIsSet() && getRefQosData() == rhs.getRefQosData())) && - - - ((!refAltQosParamsIsSet() && !rhs.refAltQosParamsIsSet()) || (refAltQosParamsIsSet() && rhs.refAltQosParamsIsSet() && getRefAltQosParams() == rhs.getRefAltQosParams())) && - - - ((!refTcDataIsSet() && !rhs.refTcDataIsSet()) || (refTcDataIsSet() && rhs.refTcDataIsSet() && getRefTcData() == rhs.getRefTcData())) && - - - ((!refChgDataIsSet() && !rhs.refChgDataIsSet()) || (refChgDataIsSet() && rhs.refChgDataIsSet() && getRefChgData() == rhs.getRefChgData())) && - - - ((!refChgN3gDataIsSet() && !rhs.refChgN3gDataIsSet()) || (refChgN3gDataIsSet() && rhs.refChgN3gDataIsSet() && getRefChgN3gData() == rhs.getRefChgN3gData())) && - - - ((!refUmDataIsSet() && !rhs.refUmDataIsSet()) || (refUmDataIsSet() && rhs.refUmDataIsSet() && getRefUmData() == rhs.getRefUmData())) && - - - ((!refUmN3gDataIsSet() && !rhs.refUmN3gDataIsSet()) || (refUmN3gDataIsSet() && rhs.refUmN3gDataIsSet() && getRefUmN3gData() == rhs.getRefUmN3gData())) && - - - ((!refCondDataIsSet() && !rhs.refCondDataIsSet()) || (refCondDataIsSet() && rhs.refCondDataIsSet() && getRefCondData() == rhs.getRefCondData())) && - - - ((!refQosMonIsSet() && !rhs.refQosMonIsSet()) || (refQosMonIsSet() && rhs.refQosMonIsSet() && getRefQosMon() == rhs.getRefQosMon())) && - - - ((!addrPreserIndIsSet() && !rhs.addrPreserIndIsSet()) || (addrPreserIndIsSet() && rhs.addrPreserIndIsSet() && isAddrPreserInd() == rhs.isAddrPreserInd())) && - - - ((!tscaiInputDlIsSet() && !rhs.tscaiInputDlIsSet()) || (tscaiInputDlIsSet() && rhs.tscaiInputDlIsSet() && getTscaiInputDl() == rhs.getTscaiInputDl())) && - - - ((!tscaiInputUlIsSet() && !rhs.tscaiInputUlIsSet()) || (tscaiInputUlIsSet() && rhs.tscaiInputUlIsSet() && getTscaiInputUl() == rhs.getTscaiInputUl())) - - ; -} - -bool PccRule::operator!=(const PccRule& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const PccRule& o) -{ - j = nlohmann::json(); - if(o.flowInfosIsSet() || !o.m_FlowInfos.empty()) - j["flowInfos"] = o.m_FlowInfos; - if(o.appIdIsSet()) - j["appId"] = o.m_AppId; - if(o.contVerIsSet()) - j["contVer"] = o.m_ContVer; - j["pccRuleId"] = o.m_PccRuleId; - if(o.precedenceIsSet()) - j["precedence"] = o.m_Precedence; - if(o.afSigProtocolIsSet()) - j["afSigProtocol"] = o.m_AfSigProtocol; - if(o.appRelocIsSet()) - j["appReloc"] = o.m_AppReloc; - if(o.refQosDataIsSet() || !o.m_RefQosData.empty()) - j["refQosData"] = o.m_RefQosData; - if(o.refAltQosParamsIsSet() || !o.m_RefAltQosParams.empty()) - j["refAltQosParams"] = o.m_RefAltQosParams; - if(o.refTcDataIsSet() || !o.m_RefTcData.empty()) - j["refTcData"] = o.m_RefTcData; - if(o.refChgDataIsSet() || !o.m_RefChgData.empty()) - j["refChgData"] = o.m_RefChgData; - if(o.refChgN3gDataIsSet() || !o.m_RefChgN3gData.empty()) - j["refChgN3gData"] = o.m_RefChgN3gData; - if(o.refUmDataIsSet() || !o.m_RefUmData.empty()) - j["refUmData"] = o.m_RefUmData; - if(o.refUmN3gDataIsSet() || !o.m_RefUmN3gData.empty()) - j["refUmN3gData"] = o.m_RefUmN3gData; - if(o.refCondDataIsSet()) - j["refCondData"] = o.m_RefCondData; - if(o.refQosMonIsSet() || !o.m_RefQosMon.empty()) - j["refQosMon"] = o.m_RefQosMon; - if(o.addrPreserIndIsSet()) - j["addrPreserInd"] = o.m_AddrPreserInd; - if(o.tscaiInputDlIsSet()) - j["tscaiInputDl"] = o.m_TscaiInputDl; - if(o.tscaiInputUlIsSet()) - j["tscaiInputUl"] = o.m_TscaiInputUl; - -} - -void from_json(const nlohmann::json& j, PccRule& o) -{ - if(j.find("flowInfos") != j.end()) - { - j.at("flowInfos").get_to(o.m_FlowInfos); - o.m_FlowInfosIsSet = true; - } - if(j.find("appId") != j.end()) - { - j.at("appId").get_to(o.m_AppId); - o.m_AppIdIsSet = true; - } - if(j.find("contVer") != j.end()) - { - j.at("contVer").get_to(o.m_ContVer); - o.m_ContVerIsSet = true; - } - j.at("pccRuleId").get_to(o.m_PccRuleId); - if(j.find("precedence") != j.end()) - { - j.at("precedence").get_to(o.m_Precedence); - o.m_PrecedenceIsSet = true; - } - if(j.find("afSigProtocol") != j.end()) - { - j.at("afSigProtocol").get_to(o.m_AfSigProtocol); - o.m_AfSigProtocolIsSet = true; - } - if(j.find("appReloc") != j.end()) - { - j.at("appReloc").get_to(o.m_AppReloc); - o.m_AppRelocIsSet = true; - } - if(j.find("refQosData") != j.end()) - { - j.at("refQosData").get_to(o.m_RefQosData); - o.m_RefQosDataIsSet = true; - } - if(j.find("refAltQosParams") != j.end()) - { - j.at("refAltQosParams").get_to(o.m_RefAltQosParams); - o.m_RefAltQosParamsIsSet = true; - } - if(j.find("refTcData") != j.end()) - { - j.at("refTcData").get_to(o.m_RefTcData); - o.m_RefTcDataIsSet = true; - } - if(j.find("refChgData") != j.end()) - { - j.at("refChgData").get_to(o.m_RefChgData); - o.m_RefChgDataIsSet = true; - } - if(j.find("refChgN3gData") != j.end()) - { - j.at("refChgN3gData").get_to(o.m_RefChgN3gData); - o.m_RefChgN3gDataIsSet = true; - } - if(j.find("refUmData") != j.end()) - { - j.at("refUmData").get_to(o.m_RefUmData); - o.m_RefUmDataIsSet = true; - } - if(j.find("refUmN3gData") != j.end()) - { - j.at("refUmN3gData").get_to(o.m_RefUmN3gData); - o.m_RefUmN3gDataIsSet = true; - } - if(j.find("refCondData") != j.end()) - { - j.at("refCondData").get_to(o.m_RefCondData); - o.m_RefCondDataIsSet = true; - } - if(j.find("refQosMon") != j.end()) - { - j.at("refQosMon").get_to(o.m_RefQosMon); - o.m_RefQosMonIsSet = true; - } - if(j.find("addrPreserInd") != j.end()) - { - j.at("addrPreserInd").get_to(o.m_AddrPreserInd); - o.m_AddrPreserIndIsSet = true; - } - if(j.find("tscaiInputDl") != j.end()) - { - j.at("tscaiInputDl").get_to(o.m_TscaiInputDl); - o.m_TscaiInputDlIsSet = true; - } - if(j.find("tscaiInputUl") != j.end()) - { - j.at("tscaiInputUl").get_to(o.m_TscaiInputUl); - o.m_TscaiInputUlIsSet = true; - } - -} - -std::vector<FlowInformation> PccRule::getFlowInfos() const -{ - return m_FlowInfos; -} -void PccRule::setFlowInfos(std::vector<FlowInformation> const& value) -{ - m_FlowInfos = value; - m_FlowInfosIsSet = true; -} -bool PccRule::flowInfosIsSet() const -{ - return m_FlowInfosIsSet; -} -void PccRule::unsetFlowInfos() -{ - m_FlowInfosIsSet = false; -} -std::string PccRule::getAppId() const -{ - return m_AppId; -} -void PccRule::setAppId(std::string const& value) -{ - m_AppId = value; - m_AppIdIsSet = true; -} -bool PccRule::appIdIsSet() const -{ - return m_AppIdIsSet; -} -void PccRule::unsetAppId() -{ - m_AppIdIsSet = false; -} -int32_t PccRule::getContVer() const -{ - return m_ContVer; -} -void PccRule::setContVer(int32_t const value) -{ - m_ContVer = value; - m_ContVerIsSet = true; -} -bool PccRule::contVerIsSet() const -{ - return m_ContVerIsSet; -} -void PccRule::unsetContVer() -{ - m_ContVerIsSet = false; -} -std::string PccRule::getPccRuleId() const -{ - return m_PccRuleId; -} -void PccRule::setPccRuleId(std::string const& value) -{ - m_PccRuleId = value; -} -int32_t PccRule::getPrecedence() const -{ - return m_Precedence; -} -void PccRule::setPrecedence(int32_t const value) -{ - m_Precedence = value; - m_PrecedenceIsSet = true; -} -bool PccRule::precedenceIsSet() const -{ - return m_PrecedenceIsSet; -} -void PccRule::unsetPrecedence() -{ - m_PrecedenceIsSet = false; -} -AfSigProtocol PccRule::getAfSigProtocol() const -{ - return m_AfSigProtocol; -} -void PccRule::setAfSigProtocol(AfSigProtocol const& value) -{ - m_AfSigProtocol = value; - m_AfSigProtocolIsSet = true; -} -bool PccRule::afSigProtocolIsSet() const -{ - return m_AfSigProtocolIsSet; -} -void PccRule::unsetAfSigProtocol() -{ - m_AfSigProtocolIsSet = false; -} -bool PccRule::isAppReloc() const -{ - return m_AppReloc; -} -void PccRule::setAppReloc(bool const value) -{ - m_AppReloc = value; - m_AppRelocIsSet = true; -} -bool PccRule::appRelocIsSet() const -{ - return m_AppRelocIsSet; -} -void PccRule::unsetAppReloc() -{ - m_AppRelocIsSet = false; -} -std::vector<std::string> PccRule::getRefQosData() const -{ - return m_RefQosData; -} -void PccRule::setRefQosData(std::vector<std::string> const& value) -{ - m_RefQosData = value; - m_RefQosDataIsSet = true; -} -bool PccRule::refQosDataIsSet() const -{ - return m_RefQosDataIsSet; -} -void PccRule::unsetRefQosData() -{ - m_RefQosDataIsSet = false; -} -std::vector<std::string> PccRule::getRefAltQosParams() const -{ - return m_RefAltQosParams; -} -void PccRule::setRefAltQosParams(std::vector<std::string> const& value) -{ - m_RefAltQosParams = value; - m_RefAltQosParamsIsSet = true; -} -bool PccRule::refAltQosParamsIsSet() const -{ - return m_RefAltQosParamsIsSet; -} -void PccRule::unsetRefAltQosParams() -{ - m_RefAltQosParamsIsSet = false; -} -std::vector<std::string> PccRule::getRefTcData() const -{ - return m_RefTcData; -} -void PccRule::setRefTcData(std::vector<std::string> const& value) -{ - m_RefTcData = value; - m_RefTcDataIsSet = true; -} -bool PccRule::refTcDataIsSet() const -{ - return m_RefTcDataIsSet; -} -void PccRule::unsetRefTcData() -{ - m_RefTcDataIsSet = false; -} -std::vector<std::string> PccRule::getRefChgData() const -{ - return m_RefChgData; -} -void PccRule::setRefChgData(std::vector<std::string> const& value) -{ - m_RefChgData = value; - m_RefChgDataIsSet = true; -} -bool PccRule::refChgDataIsSet() const -{ - return m_RefChgDataIsSet; -} -void PccRule::unsetRefChgData() -{ - m_RefChgDataIsSet = false; -} -std::vector<std::string> PccRule::getRefChgN3gData() const -{ - return m_RefChgN3gData; -} -void PccRule::setRefChgN3gData(std::vector<std::string> const& value) -{ - m_RefChgN3gData = value; - m_RefChgN3gDataIsSet = true; -} -bool PccRule::refChgN3gDataIsSet() const -{ - return m_RefChgN3gDataIsSet; -} -void PccRule::unsetRefChgN3gData() -{ - m_RefChgN3gDataIsSet = false; -} -std::vector<std::string> PccRule::getRefUmData() const -{ - return m_RefUmData; -} -void PccRule::setRefUmData(std::vector<std::string> const& value) -{ - m_RefUmData = value; - m_RefUmDataIsSet = true; -} -bool PccRule::refUmDataIsSet() const -{ - return m_RefUmDataIsSet; -} -void PccRule::unsetRefUmData() -{ - m_RefUmDataIsSet = false; -} -std::vector<std::string> PccRule::getRefUmN3gData() const -{ - return m_RefUmN3gData; -} -void PccRule::setRefUmN3gData(std::vector<std::string> const& value) -{ - m_RefUmN3gData = value; - m_RefUmN3gDataIsSet = true; -} -bool PccRule::refUmN3gDataIsSet() const -{ - return m_RefUmN3gDataIsSet; -} -void PccRule::unsetRefUmN3gData() -{ - m_RefUmN3gDataIsSet = false; -} -std::string PccRule::getRefCondData() const -{ - return m_RefCondData; -} -void PccRule::setRefCondData(std::string const& value) -{ - m_RefCondData = value; - m_RefCondDataIsSet = true; -} -bool PccRule::refCondDataIsSet() const -{ - return m_RefCondDataIsSet; -} -void PccRule::unsetRefCondData() -{ - m_RefCondDataIsSet = false; -} -std::vector<std::string> PccRule::getRefQosMon() const -{ - return m_RefQosMon; -} -void PccRule::setRefQosMon(std::vector<std::string> const& value) -{ - m_RefQosMon = value; - m_RefQosMonIsSet = true; -} -bool PccRule::refQosMonIsSet() const -{ - return m_RefQosMonIsSet; -} -void PccRule::unsetRefQosMon() -{ - m_RefQosMonIsSet = false; -} -bool PccRule::isAddrPreserInd() const -{ - return m_AddrPreserInd; -} -void PccRule::setAddrPreserInd(bool const value) -{ - m_AddrPreserInd = value; - m_AddrPreserIndIsSet = true; -} -bool PccRule::addrPreserIndIsSet() const -{ - return m_AddrPreserIndIsSet; -} -void PccRule::unsetAddrPreserInd() -{ - m_AddrPreserIndIsSet = false; -} -TscaiInputContainer PccRule::getTscaiInputDl() const -{ - return m_TscaiInputDl; -} -void PccRule::setTscaiInputDl(TscaiInputContainer const& value) -{ - m_TscaiInputDl = value; - m_TscaiInputDlIsSet = true; + } + + 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::tscaiInputDlIsSet() const -{ - return m_TscaiInputDlIsSet; + +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 PccRule::unsetTscaiInputDl() -{ - m_TscaiInputDlIsSet = false; + +void from_json(const nlohmann::json& j, PccRule& o) { + if (j.find("flowInfos") != j.end()) { + j.at("flowInfos").get_to(o.m_FlowInfos); + o.m_FlowInfosIsSet = true; + } + if (j.find("appId") != j.end()) { + j.at("appId").get_to(o.m_AppId); + o.m_AppIdIsSet = true; + } + if (j.find("contVer") != j.end()) { + j.at("contVer").get_to(o.m_ContVer); + o.m_ContVerIsSet = true; + } + j.at("pccRuleId").get_to(o.m_PccRuleId); + if (j.find("precedence") != j.end()) { + j.at("precedence").get_to(o.m_Precedence); + o.m_PrecedenceIsSet = true; + } + if (j.find("afSigProtocol") != j.end()) { + j.at("afSigProtocol").get_to(o.m_AfSigProtocol); + o.m_AfSigProtocolIsSet = true; + } + if (j.find("appReloc") != j.end()) { + j.at("appReloc").get_to(o.m_AppReloc); + o.m_AppRelocIsSet = true; + } + if (j.find("refQosData") != j.end()) { + j.at("refQosData").get_to(o.m_RefQosData); + o.m_RefQosDataIsSet = true; + } + if (j.find("refAltQosParams") != j.end()) { + j.at("refAltQosParams").get_to(o.m_RefAltQosParams); + o.m_RefAltQosParamsIsSet = true; + } + if (j.find("refTcData") != j.end()) { + j.at("refTcData").get_to(o.m_RefTcData); + o.m_RefTcDataIsSet = true; + } + if (j.find("refChgData") != j.end()) { + j.at("refChgData").get_to(o.m_RefChgData); + o.m_RefChgDataIsSet = true; + } + if (j.find("refChgN3gData") != j.end()) { + j.at("refChgN3gData").get_to(o.m_RefChgN3gData); + o.m_RefChgN3gDataIsSet = true; + } + if (j.find("refUmData") != j.end()) { + j.at("refUmData").get_to(o.m_RefUmData); + o.m_RefUmDataIsSet = true; + } + if (j.find("refUmN3gData") != j.end()) { + j.at("refUmN3gData").get_to(o.m_RefUmN3gData); + o.m_RefUmN3gDataIsSet = true; + } + if (j.find("refCondData") != j.end()) { + j.at("refCondData").get_to(o.m_RefCondData); + o.m_RefCondDataIsSet = true; + } + if (j.find("refQosMon") != j.end()) { + j.at("refQosMon").get_to(o.m_RefQosMon); + o.m_RefQosMonIsSet = true; + } + if (j.find("addrPreserInd") != j.end()) { + j.at("addrPreserInd").get_to(o.m_AddrPreserInd); + o.m_AddrPreserIndIsSet = true; + } + if (j.find("tscaiInputDl") != j.end()) { + j.at("tscaiInputDl").get_to(o.m_TscaiInputDl); + o.m_TscaiInputDlIsSet = true; + } + if (j.find("tscaiInputUl") != j.end()) { + j.at("tscaiInputUl").get_to(o.m_TscaiInputUl); + o.m_TscaiInputUlIsSet = true; + } } -TscaiInputContainer PccRule::getTscaiInputUl() const -{ - return m_TscaiInputUl; + +std::vector<FlowInformation> PccRule::getFlowInfos() const { + return m_FlowInfos; } -void PccRule::setTscaiInputUl(TscaiInputContainer const& value) -{ - m_TscaiInputUl = value; - m_TscaiInputUlIsSet = true; +void PccRule::setFlowInfos(std::vector<FlowInformation> const& value) { + m_FlowInfos = value; + m_FlowInfosIsSet = true; } -bool PccRule::tscaiInputUlIsSet() const -{ - return m_TscaiInputUlIsSet; +bool PccRule::flowInfosIsSet() const { + return m_FlowInfosIsSet; } -void PccRule::unsetTscaiInputUl() -{ - m_TscaiInputUlIsSet = false; +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 diff --git a/src/api-server/model/PccRule.h b/src/api-server/model/PccRule.h index 9ae8022..7ce47cd 100755 --- a/src/api-server/model/PccRule.h +++ b/src/api-server/model/PccRule.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -31,212 +31,222 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PccRule -{ -public: - PccRule(); - virtual ~PccRule() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const PccRule& rhs) const; - bool operator!=(const PccRule& rhs) const; + ///////////////////////////////////////////// + /// PccRule members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; + 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; - + 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 diff --git a/src/api-server/model/PduSessionRelCause.cpp b/src/api-server/model/PduSessionRelCause.cpp index 5d713ac..c9caa8d 100755 --- a/src/api-server/model/PduSessionRelCause.cpp +++ b/src/api-server/model/PduSessionRelCause.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -PduSessionRelCause::PduSessionRelCause() -{ - -} +PduSessionRelCause::PduSessionRelCause() {} -void PduSessionRelCause::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool PduSessionRelCause::operator!=(const PduSessionRelCause& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, PduSessionRelCause& o) { + from_json(j, o.m_value); } -PduSessionRelCause_anyOf PduSessionRelCause::getValue() const -{ - return m_value; +PduSessionRelCause_anyOf PduSessionRelCause::getValue() const { + return m_value; } -void PduSessionRelCause::setValue(PduSessionRelCause_anyOf value) -{ - m_value = value; +void PduSessionRelCause::setValue(PduSessionRelCause_anyOf value) { + m_value = value; } -PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf PduSessionRelCause::getEnumValue() const -{ - return m_value.getValue(); +PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf +PduSessionRelCause::getEnumValue() const { + return m_value.getValue(); } -void PduSessionRelCause::setEnumValue(PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf value) -{ - m_value.setValue(value); +void PduSessionRelCause::setEnumValue( + PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/PduSessionRelCause.h b/src/api-server/model/PduSessionRelCause.h index 5d2d7bd..b104d35 100755 --- a/src/api-server/model/PduSessionRelCause.h +++ b/src/api-server/model/PduSessionRelCause.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PduSessionRelCause -{ -public: - PduSessionRelCause(); - virtual ~PduSessionRelCause() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const PduSessionRelCause& rhs) const; + bool operator!=(const PduSessionRelCause& rhs) const; - ///////////////////////////////////////////// - /// PduSessionRelCause members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + PduSessionRelCause_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/PduSessionRelCause_anyOf.cpp b/src/api-server/model/PduSessionRelCause_anyOf.cpp index 232bdc3..4216d36 100755 --- a/src/api-server/model/PduSessionRelCause_anyOf.cpp +++ b/src/api-server/model/PduSessionRelCause_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,91 +20,82 @@ namespace oai { namespace pcf { namespace model { -PduSessionRelCause_anyOf::PduSessionRelCause_anyOf() -{ - -} +PduSessionRelCause_anyOf::PduSessionRelCause_anyOf() {} -void PduSessionRelCause_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool PduSessionRelCause_anyOf::operator!=( + const PduSessionRelCause_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf +PduSessionRelCause_anyOf::getValue() const { + return m_value; } -void PduSessionRelCause_anyOf::setValue(PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf value) -{ - m_value = value; +void PduSessionRelCause_anyOf::setValue( + PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/PduSessionRelCause_anyOf.h b/src/api-server/model/PduSessionRelCause_anyOf.h index 785c112..281c95a 100755 --- a/src/api-server/model/PduSessionRelCause_anyOf.h +++ b/src/api-server/model/PduSessionRelCause_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,52 +26,55 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PduSessionRelCause_anyOf -{ -public: - PduSessionRelCause_anyOf(); - virtual ~PduSessionRelCause_anyOf() = default; +class PduSessionRelCause_anyOf { + public: + PduSessionRelCause_anyOf(); + virtual ~PduSessionRelCause_anyOf() = default; - enum class ePduSessionRelCause_anyOf { + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const PduSessionRelCause_anyOf& rhs) const; + bool operator!=(const PduSessionRelCause_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// PduSessionRelCause_anyOf members - bool operator==(const PduSessionRelCause_anyOf& rhs) const; - bool operator!=(const PduSessionRelCause_anyOf& rhs) const; + PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf getValue() const; + void setValue(PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf value); - ///////////////////////////////////////////// - /// PduSessionRelCause_anyOf members + friend void to_json(nlohmann::json& j, const PduSessionRelCause_anyOf& o); + friend void from_json(const nlohmann::json& j, PduSessionRelCause_anyOf& o); - 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; + protected: + PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf m_value = + PduSessionRelCause_anyOf::ePduSessionRelCause_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/PduSessionType.cpp b/src/api-server/model/PduSessionType.cpp index 5a0a076..1d7b9cc 100755 --- a/src/api-server/model/PduSessionType.cpp +++ b/src/api-server/model/PduSessionType.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ #include "PduSessionType.h" #include "Helpers.h" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -PduSessionType::PduSessionType() -{ - -} +PduSessionType::PduSessionType() {} -void PduSessionType::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void PduSessionType::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool PduSessionType::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool PduSessionType::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool PduSessionType::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "PduSessionType" : pathPrefix; - - - if (!m_value.validate(msg)) - { - success = false; - } - return success; +bool PduSessionType::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "PduSessionType" : pathPrefix; + + if (!m_value.validate(msg)) { + success = false; + } + return success; } -bool PduSessionType::operator==(const PduSessionType& rhs) const -{ - return - - getValue() == rhs.getValue() - ; +bool PduSessionType::operator==(const PduSessionType& rhs) const { + return + + getValue() == rhs.getValue(); } -bool PduSessionType::operator!=(const PduSessionType& rhs) const -{ - return !(*this == rhs); +bool PduSessionType::operator!=(const PduSessionType& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const PduSessionType& o) -{ - j = nlohmann::json(); - to_json(j, o.m_value); +void to_json(nlohmann::json& j, const PduSessionType& o) { + j = nlohmann::json(); + to_json(j, o.m_value); } -void from_json(const nlohmann::json& j, PduSessionType& o) -{ - from_json(j, o.m_value); +void from_json(const nlohmann::json& j, PduSessionType& o) { + from_json(j, o.m_value); } -PduSessionType_anyOf PduSessionType::getValue() const -{ - return m_value; +PduSessionType_anyOf PduSessionType::getValue() const { + return m_value; } -void PduSessionType::setValue(PduSessionType_anyOf value) -{ - m_value = value; +void PduSessionType::setValue(PduSessionType_anyOf value) { + m_value = value; } -PduSessionType_anyOf::ePduSessionType_anyOf PduSessionType::getEnumValue() const -{ - return m_value.getValue(); +PduSessionType_anyOf::ePduSessionType_anyOf PduSessionType::getEnumValue() + const { + return m_value.getValue(); } -void PduSessionType::setEnumValue(PduSessionType_anyOf::ePduSessionType_anyOf value) -{ - m_value.setValue(value); +void PduSessionType::setEnumValue( + PduSessionType_anyOf::ePduSessionType_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/PduSessionType.h b/src/api-server/model/PduSessionType.h index 1128f7e..c261328 100755 --- a/src/api-server/model/PduSessionType.h +++ b/src/api-server/model/PduSessionType.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * PduSessionType.h * - * + * */ #ifndef PduSessionType_H_ #define PduSessionType_H_ - #include "PduSessionType_anyOf.h" #include <nlohmann/json.hpp> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PduSessionType -{ -public: - PduSessionType(); - virtual ~PduSessionType() = default; - +class PduSessionType { + public: + PduSessionType(); + virtual ~PduSessionType() = 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. 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> + /// 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; + /// <summary> + /// Helper overload for validate. Used when one model stores another model and + /// calls it's validate. Not meant to be called outside that case. + /// </summary> + bool validate(std::stringstream& msg, const std::string& pathPrefix) const; - bool operator==(const PduSessionType& rhs) const; - bool operator!=(const PduSessionType& rhs) const; + bool operator==(const PduSessionType& rhs) const; + bool operator!=(const PduSessionType& rhs) const; - ///////////////////////////////////////////// - /// PduSessionType members + ///////////////////////////////////////////// + /// PduSessionType members + PduSessionType_anyOf getValue() const; + void setValue(PduSessionType_anyOf value); + PduSessionType_anyOf::ePduSessionType_anyOf getEnumValue() const; + void setEnumValue(PduSessionType_anyOf::ePduSessionType_anyOf value); + friend void to_json(nlohmann::json& j, const PduSessionType& o); + friend void from_json(const nlohmann::json& j, PduSessionType& o); + friend void to_json(nlohmann::json& j, const PduSessionType_anyOf& o); + friend void from_json(const nlohmann::json& j, PduSessionType_anyOf& o); - PduSessionType_anyOf getValue() const; - void setValue(PduSessionType_anyOf value); - PduSessionType_anyOf::ePduSessionType_anyOf getEnumValue() const; - void setEnumValue(PduSessionType_anyOf::ePduSessionType_anyOf value); - friend void to_json(nlohmann::json& j, const PduSessionType& o); - friend void from_json(const nlohmann::json& j, PduSessionType& o); - friend void to_json(nlohmann::json& j, const PduSessionType_anyOf& o); - friend void from_json(const nlohmann::json& j, PduSessionType_anyOf& o); -protected: - PduSessionType_anyOf m_value; + protected: + PduSessionType_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/PduSessionType_anyOf.cpp b/src/api-server/model/PduSessionType_anyOf.cpp index fc7cc38..1a40cbb 100755 --- a/src/api-server/model/PduSessionType_anyOf.cpp +++ b/src/api-server/model/PduSessionType_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ #include "PduSessionType_anyOf.h" #include "Helpers.h" @@ -20,115 +20,99 @@ namespace oai { namespace pcf { namespace model { -PduSessionType_anyOf::PduSessionType_anyOf() -{ - -} +PduSessionType_anyOf::PduSessionType_anyOf() {} -void PduSessionType_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void PduSessionType_anyOf::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool PduSessionType_anyOf::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool PduSessionType_anyOf::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool PduSessionType_anyOf::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "PduSessionType_anyOf" : pathPrefix; +bool PduSessionType_anyOf::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "PduSessionType_anyOf" : pathPrefix; - - if (m_value == PduSessionType_anyOf::ePduSessionType_anyOf::INVALID_VALUE_OPENAPI_GENERATED) - { - success = false; - msg << _pathPrefix << ": has no value;"; - } + if (m_value == PduSessionType_anyOf::ePduSessionType_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + return success; } -bool PduSessionType_anyOf::operator==(const PduSessionType_anyOf& rhs) const -{ - return - getValue() == rhs.getValue() - - ; -} +bool PduSessionType_anyOf::operator==(const PduSessionType_anyOf& rhs) const { + return getValue() == rhs.getValue() -bool PduSessionType_anyOf::operator!=(const PduSessionType_anyOf& rhs) const -{ - return !(*this == rhs); + ; } -void to_json(nlohmann::json& j, const PduSessionType_anyOf& o) -{ - j = nlohmann::json(); - - switch (o.getValue()) - { - case PduSessionType_anyOf::ePduSessionType_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case PduSessionType_anyOf::ePduSessionType_anyOf::IPV4: - j = "IPV4"; - break; - case PduSessionType_anyOf::ePduSessionType_anyOf::IPV6: - j = "IPV6"; - break; - case PduSessionType_anyOf::ePduSessionType_anyOf::IPV4V6: - j = "IPV4V6"; - break; - case PduSessionType_anyOf::ePduSessionType_anyOf::UNSTRUCTURED: - j = "UNSTRUCTURED"; - break; - case PduSessionType_anyOf::ePduSessionType_anyOf::ETHERNET: - j = "ETHERNET"; - break; - } +bool PduSessionType_anyOf::operator!=(const PduSessionType_anyOf& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, PduSessionType_anyOf& o) -{ - - auto s = j.get<std::string>(); - if (s == "IPV4") { - o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::IPV4); - } - else if (s == "IPV6") { - o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::IPV6); - } - else if (s == "IPV4V6") { - o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::IPV4V6); - } - else if (s == "UNSTRUCTURED") { - o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::UNSTRUCTURED); - } - else if (s == "ETHERNET") { - o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::ETHERNET); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " PduSessionType_anyOf::ePduSessionType_anyOf"; - throw std::invalid_argument(ss.str()); - } +void to_json(nlohmann::json& j, const PduSessionType_anyOf& o) { + j = nlohmann::json(); + + switch (o.getValue()) { + case PduSessionType_anyOf::ePduSessionType_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED: + j = "INVALID_VALUE_OPENAPI_GENERATED"; + break; + case PduSessionType_anyOf::ePduSessionType_anyOf::IPV4: + j = "IPV4"; + break; + case PduSessionType_anyOf::ePduSessionType_anyOf::IPV6: + j = "IPV6"; + break; + case PduSessionType_anyOf::ePduSessionType_anyOf::IPV4V6: + j = "IPV4V6"; + break; + case PduSessionType_anyOf::ePduSessionType_anyOf::UNSTRUCTURED: + j = "UNSTRUCTURED"; + break; + case PduSessionType_anyOf::ePduSessionType_anyOf::ETHERNET: + j = "ETHERNET"; + break; + } +} +void from_json(const nlohmann::json& j, PduSessionType_anyOf& o) { + auto s = j.get<std::string>(); + if (s == "IPV4") { + o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::IPV4); + } else if (s == "IPV6") { + o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::IPV6); + } else if (s == "IPV4V6") { + o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::IPV4V6); + } else if (s == "UNSTRUCTURED") { + o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::UNSTRUCTURED); + } else if (s == "ETHERNET") { + o.setValue(PduSessionType_anyOf::ePduSessionType_anyOf::ETHERNET); + } else { + std::stringstream ss; + ss << "Unexpected value " << s << " in json" + << " cannot be converted to enum of type" + << " PduSessionType_anyOf::ePduSessionType_anyOf"; + throw std::invalid_argument(ss.str()); + } } -PduSessionType_anyOf::ePduSessionType_anyOf PduSessionType_anyOf::getValue() const -{ - return m_value; +PduSessionType_anyOf::ePduSessionType_anyOf PduSessionType_anyOf::getValue() + const { + return m_value; } -void PduSessionType_anyOf::setValue(PduSessionType_anyOf::ePduSessionType_anyOf value) -{ - m_value = value; +void PduSessionType_anyOf::setValue( + PduSessionType_anyOf::ePduSessionType_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/PduSessionType_anyOf.h b/src/api-server/model/PduSessionType_anyOf.h index 6e7cad8..815eb4a 100755 --- a/src/api-server/model/PduSessionType_anyOf.h +++ b/src/api-server/model/PduSessionType_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * PduSessionType_anyOf.h * - * + * */ #ifndef PduSessionType_anyOf_H_ #define PduSessionType_anyOf_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,56 +26,58 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PduSessionType_anyOf -{ -public: - PduSessionType_anyOf(); - virtual ~PduSessionType_anyOf() = default; +class PduSessionType_anyOf { + public: + PduSessionType_anyOf(); + virtual ~PduSessionType_anyOf() = default; - enum class ePduSessionType_anyOf { + enum class ePduSessionType_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - IPV4, - IPV6, - IPV4V6, - UNSTRUCTURED, + IPV4, + IPV6, + IPV4V6, + UNSTRUCTURED, ETHERNET - }; + }; + + /// <summary> + /// Validate the current data in the model. Throws a ValidationException on + /// failure. + /// </summary> + void validate() const; + + /// <summary> + /// Validate the current data in the model. Returns false on error and writes + /// an error message into the given stringstream. + /// </summary> + bool validate(std::stringstream& msg) const; - /// <summary> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const PduSessionType_anyOf& rhs) const; + bool operator!=(const PduSessionType_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// PduSessionType_anyOf members - bool operator==(const PduSessionType_anyOf& rhs) const; - bool operator!=(const PduSessionType_anyOf& rhs) const; + PduSessionType_anyOf::ePduSessionType_anyOf getValue() const; + void setValue(PduSessionType_anyOf::ePduSessionType_anyOf value); - ///////////////////////////////////////////// - /// PduSessionType_anyOf members + friend void to_json(nlohmann::json& j, const PduSessionType_anyOf& o); + friend void from_json(const nlohmann::json& j, PduSessionType_anyOf& o); - PduSessionType_anyOf::ePduSessionType_anyOf getValue() const; - void setValue(PduSessionType_anyOf::ePduSessionType_anyOf value); - - friend void to_json(nlohmann::json& j, const PduSessionType_anyOf& o); - friend void from_json(const nlohmann::json& j, PduSessionType_anyOf& o); -protected: - PduSessionType_anyOf::ePduSessionType_anyOf m_value = PduSessionType_anyOf::ePduSessionType_anyOf::INVALID_VALUE_OPENAPI_GENERATED; + protected: + PduSessionType_anyOf::ePduSessionType_anyOf m_value = PduSessionType_anyOf:: + ePduSessionType_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/PlmnId.cpp b/src/api-server/model/PlmnId.cpp index f5bf5c2..74c52bb 100755 --- a/src/api-server/model/PlmnId.cpp +++ b/src/api-server/model/PlmnId.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "PlmnId.h" #include "Helpers.h" @@ -20,106 +20,79 @@ namespace oai { namespace pcf { namespace model { -PlmnId::PlmnId() -{ - m_Mcc = ""; - m_Mnc = ""; - +PlmnId::PlmnId() { + m_Mcc = ""; + m_Mnc = ""; } -void PlmnId::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void PlmnId::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool PlmnId::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool PlmnId::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool PlmnId::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "PlmnId" : pathPrefix; - - - - /* Mcc */ { - const std::string& value = m_Mcc; - const std::string currentValuePath = _pathPrefix + ".mcc"; - - - - } - - - /* Mnc */ { - const std::string& value = m_Mnc; - const std::string currentValuePath = _pathPrefix + ".mnc"; - - - - } - - return success; +bool PlmnId::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "PlmnId" : pathPrefix; + + /* Mcc */ { + const std::string& value = m_Mcc; + const std::string currentValuePath = _pathPrefix + ".mcc"; + } + + /* Mnc */ { + const std::string& value = m_Mnc; + const std::string currentValuePath = _pathPrefix + ".mnc"; + } + + return success; } -bool PlmnId::operator==(const PlmnId& rhs) const -{ - return - - - (getMcc() == rhs.getMcc()) - && - - (getMnc() == rhs.getMnc()) - - - ; +bool PlmnId::operator==(const PlmnId& rhs) const { + return + + (getMcc() == rhs.getMcc()) && + + (getMnc() == rhs.getMnc()) + + ; } -bool PlmnId::operator!=(const PlmnId& rhs) const -{ - return !(*this == rhs); +bool PlmnId::operator!=(const PlmnId& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const PlmnId& o) -{ - j = nlohmann::json(); - j["mcc"] = o.m_Mcc; - j["mnc"] = o.m_Mnc; - +void to_json(nlohmann::json& j, const PlmnId& o) { + j = nlohmann::json(); + j["mcc"] = o.m_Mcc; + j["mnc"] = o.m_Mnc; } -void from_json(const nlohmann::json& j, PlmnId& o) -{ - j.at("mcc").get_to(o.m_Mcc); - j.at("mnc").get_to(o.m_Mnc); - +void from_json(const nlohmann::json& j, PlmnId& o) { + j.at("mcc").get_to(o.m_Mcc); + j.at("mnc").get_to(o.m_Mnc); } -std::string PlmnId::getMcc() const -{ - return m_Mcc; +std::string PlmnId::getMcc() const { + return m_Mcc; } -void PlmnId::setMcc(std::string const& value) -{ - m_Mcc = value; +void PlmnId::setMcc(std::string const& value) { + m_Mcc = value; } -std::string PlmnId::getMnc() const -{ - return m_Mnc; +std::string PlmnId::getMnc() const { + return m_Mnc; } -void PlmnId::setMnc(std::string const& value) -{ - m_Mnc = value; +void PlmnId::setMnc(std::string const& value) { + m_Mnc = value; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/PlmnId.h b/src/api-server/model/PlmnId.h index 630745a..8167b44 100755 --- a/src/api-server/model/PlmnId.h +++ b/src/api-server/model/PlmnId.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * PlmnId.h * - * + * */ #ifndef PlmnId_H_ #define PlmnId_H_ - #include <string> #include <nlohmann/json.hpp> @@ -27,57 +27,55 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PlmnId -{ -public: - PlmnId(); - virtual ~PlmnId() = 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 PlmnId& rhs) const; - bool operator!=(const PlmnId& rhs) const; - - ///////////////////////////////////////////// - /// PlmnId members - - /// <summary> - /// - /// </summary> - std::string getMcc() const; - void setMcc(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getMnc() const; - void setMnc(std::string const& value); - - friend void to_json(nlohmann::json& j, const PlmnId& o); - friend void from_json(const nlohmann::json& j, PlmnId& o); -protected: - std::string m_Mcc; - - std::string m_Mnc; - - +class PlmnId { + public: + PlmnId(); + virtual ~PlmnId() = 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 PlmnId& rhs) const; + bool operator!=(const PlmnId& rhs) const; + + ///////////////////////////////////////////// + /// PlmnId members + + /// <summary> + /// + /// </summary> + std::string getMcc() const; + void setMcc(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getMnc() const; + void setMnc(std::string const& value); + + friend void to_json(nlohmann::json& j, const PlmnId& o); + friend void from_json(const nlohmann::json& j, PlmnId& o); + + protected: + std::string m_Mcc; + + std::string m_Mnc; }; } // namespace model diff --git a/src/api-server/model/PlmnIdNid.cpp b/src/api-server/model/PlmnIdNid.cpp index af87d7e..7cdc9e4 100755 --- a/src/api-server/model/PlmnIdNid.cpp +++ b/src/api-server/model/PlmnIdNid.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ #include "PlmnIdNid.h" #include "Helpers.h" @@ -20,143 +20,106 @@ namespace oai { namespace pcf { namespace model { -PlmnIdNid::PlmnIdNid() -{ - m_Mcc = ""; - m_Mnc = ""; - m_Nid = ""; - m_NidIsSet = false; - -} - -void PlmnIdNid::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool PlmnIdNid::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool PlmnIdNid::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "PlmnIdNid" : pathPrefix; - - - - /* Mcc */ { - const std::string& value = m_Mcc; - const std::string currentValuePath = _pathPrefix + ".mcc"; - - - - } - - - /* Mnc */ { - const std::string& value = m_Mnc; - const std::string currentValuePath = _pathPrefix + ".mnc"; - - - - } - - if (nidIsSet()) - { - const std::string& value = m_Nid; - const std::string currentValuePath = _pathPrefix + ".nid"; - - - - } - - return success; -} - -bool PlmnIdNid::operator==(const PlmnIdNid& rhs) const -{ - return - - - (getMcc() == rhs.getMcc()) - && - - (getMnc() == rhs.getMnc()) - && - - - ((!nidIsSet() && !rhs.nidIsSet()) || (nidIsSet() && rhs.nidIsSet() && getNid() == rhs.getNid())) - - ; -} - -bool PlmnIdNid::operator!=(const PlmnIdNid& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const PlmnIdNid& o) -{ - j = nlohmann::json(); - j["mcc"] = o.m_Mcc; - j["mnc"] = o.m_Mnc; - if(o.nidIsSet()) - j["nid"] = o.m_Nid; - -} - -void from_json(const nlohmann::json& j, PlmnIdNid& o) -{ - j.at("mcc").get_to(o.m_Mcc); - j.at("mnc").get_to(o.m_Mnc); - if(j.find("nid") != j.end()) - { - j.at("nid").get_to(o.m_Nid); - o.m_NidIsSet = true; - } - -} - -std::string PlmnIdNid::getMcc() const -{ - return m_Mcc; -} -void PlmnIdNid::setMcc(std::string const& value) -{ - m_Mcc = value; -} -std::string PlmnIdNid::getMnc() const -{ - return m_Mnc; -} -void PlmnIdNid::setMnc(std::string const& value) -{ - m_Mnc = value; -} -std::string PlmnIdNid::getNid() const -{ - return m_Nid; -} -void PlmnIdNid::setNid(std::string const& value) -{ - m_Nid = value; - m_NidIsSet = true; -} -bool PlmnIdNid::nidIsSet() const -{ - return m_NidIsSet; -} -void PlmnIdNid::unsetNid() -{ - m_NidIsSet = false; +PlmnIdNid::PlmnIdNid() { + m_Mcc = ""; + m_Mnc = ""; + m_Nid = ""; + m_NidIsSet = false; +} + +void PlmnIdNid::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool PlmnIdNid::validate(std::stringstream& msg) const { + return validate(msg, ""); +} + +bool PlmnIdNid::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "PlmnIdNid" : pathPrefix; + + /* Mcc */ { + const std::string& value = m_Mcc; + const std::string currentValuePath = _pathPrefix + ".mcc"; + } + + /* Mnc */ { + const std::string& value = m_Mnc; + const std::string currentValuePath = _pathPrefix + ".mnc"; + } + + if (nidIsSet()) { + const std::string& value = m_Nid; + const std::string currentValuePath = _pathPrefix + ".nid"; + } + + return success; } +bool PlmnIdNid::operator==(const PlmnIdNid& rhs) const { + return + + (getMcc() == rhs.getMcc()) && + + (getMnc() == rhs.getMnc()) && + + ((!nidIsSet() && !rhs.nidIsSet()) || + (nidIsSet() && rhs.nidIsSet() && getNid() == rhs.getNid())) + + ; +} + +bool PlmnIdNid::operator!=(const PlmnIdNid& rhs) const { + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const PlmnIdNid& o) { + j = nlohmann::json(); + j["mcc"] = o.m_Mcc; + j["mnc"] = o.m_Mnc; + if (o.nidIsSet()) j["nid"] = o.m_Nid; +} + +void from_json(const nlohmann::json& j, PlmnIdNid& o) { + j.at("mcc").get_to(o.m_Mcc); + j.at("mnc").get_to(o.m_Mnc); + if (j.find("nid") != j.end()) { + j.at("nid").get_to(o.m_Nid); + o.m_NidIsSet = true; + } +} + +std::string PlmnIdNid::getMcc() const { + return m_Mcc; +} +void PlmnIdNid::setMcc(std::string const& value) { + m_Mcc = value; +} +std::string PlmnIdNid::getMnc() const { + return m_Mnc; +} +void PlmnIdNid::setMnc(std::string const& value) { + m_Mnc = value; +} +std::string PlmnIdNid::getNid() const { + return m_Nid; +} +void PlmnIdNid::setNid(std::string const& value) { + m_Nid = value; + m_NidIsSet = true; +} +bool PlmnIdNid::nidIsSet() const { + return m_NidIsSet; +} +void PlmnIdNid::unsetNid() { + m_NidIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/PlmnIdNid.h b/src/api-server/model/PlmnIdNid.h index 4e4f766..0520d59 100755 --- a/src/api-server/model/PlmnIdNid.h +++ b/src/api-server/model/PlmnIdNid.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * PlmnIdNid.h * - * + * */ #ifndef PlmnIdNid_H_ #define PlmnIdNid_H_ - #include <string> #include <nlohmann/json.hpp> @@ -27,66 +27,65 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PlmnIdNid -{ -public: - PlmnIdNid(); - virtual ~PlmnIdNid() = default; - - - /// <summary> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() const; - - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; - - /// <summary> - /// Helper overload for validate. Used when one model stores another model and calls it's validate. - /// Not meant to be called outside that case. - /// </summary> - bool validate(std::stringstream& msg, const std::string& pathPrefix) const; - - bool operator==(const PlmnIdNid& rhs) const; - bool operator!=(const PlmnIdNid& rhs) const; - - ///////////////////////////////////////////// - /// PlmnIdNid members - - /// <summary> - /// - /// </summary> - std::string getMcc() const; - void setMcc(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getMnc() const; - void setMnc(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getNid() const; - void setNid(std::string const& value); - bool nidIsSet() const; - void unsetNid(); - - friend void to_json(nlohmann::json& j, const PlmnIdNid& o); - friend void from_json(const nlohmann::json& j, PlmnIdNid& o); -protected: - std::string m_Mcc; - - std::string m_Mnc; - - std::string m_Nid; - bool m_NidIsSet; - +class PlmnIdNid { + public: + PlmnIdNid(); + virtual ~PlmnIdNid() = default; + + /// <summary> + /// Validate the current data in the model. Throws a ValidationException on + /// failure. + /// </summary> + void validate() const; + + /// <summary> + /// Validate the current data in the model. Returns false on error and writes + /// an error message into the given stringstream. + /// </summary> + bool validate(std::stringstream& msg) const; + + /// <summary> + /// Helper overload for validate. Used when one model stores another model and + /// calls it's validate. Not meant to be called outside that case. + /// </summary> + bool validate(std::stringstream& msg, const std::string& pathPrefix) const; + + bool operator==(const PlmnIdNid& rhs) const; + bool operator!=(const PlmnIdNid& rhs) const; + + ///////////////////////////////////////////// + /// PlmnIdNid members + + /// <summary> + /// + /// </summary> + std::string getMcc() const; + void setMcc(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getMnc() const; + void setMnc(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getNid() const; + void setNid(std::string const& value); + bool nidIsSet() const; + void unsetNid(); + + friend void to_json(nlohmann::json& j, const PlmnIdNid& o); + friend void from_json(const nlohmann::json& j, PlmnIdNid& o); + + protected: + std::string m_Mcc; + + std::string m_Mnc; + + std::string m_Nid; + bool m_NidIsSet; }; } // namespace model diff --git a/src/api-server/model/PolicyControlRequestTrigger.cpp b/src/api-server/model/PolicyControlRequestTrigger.cpp index 6346e67..d62a7ee 100755 --- a/src/api-server/model/PolicyControlRequestTrigger.cpp +++ b/src/api-server/model/PolicyControlRequestTrigger.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,72 @@ namespace oai { namespace pcf { namespace model { -PolicyControlRequestTrigger::PolicyControlRequestTrigger() -{ - -} +PolicyControlRequestTrigger::PolicyControlRequestTrigger() {} -void PolicyControlRequestTrigger::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool PolicyControlRequestTrigger::operator!=(const PolicyControlRequestTrigger& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, PolicyControlRequestTrigger& o) { + from_json(j, o.m_value); } -PolicyControlRequestTrigger_anyOf PolicyControlRequestTrigger::getValue() const -{ - return m_value; +PolicyControlRequestTrigger_anyOf PolicyControlRequestTrigger::getValue() + const { + return m_value; } -void PolicyControlRequestTrigger::setValue(PolicyControlRequestTrigger_anyOf value) -{ - m_value = value; +void PolicyControlRequestTrigger::setValue( + PolicyControlRequestTrigger_anyOf value) { + m_value = value; } -PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf PolicyControlRequestTrigger::getEnumValue() const -{ - return m_value.getValue(); +PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf +PolicyControlRequestTrigger::getEnumValue() const { + return m_value.getValue(); } -void PolicyControlRequestTrigger::setEnumValue(PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf value) -{ - m_value.setValue(value); +void PolicyControlRequestTrigger::setEnumValue( + PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf + value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/PolicyControlRequestTrigger.h b/src/api-server/model/PolicyControlRequestTrigger.h index eca6dd7..4cf23a4 100755 --- a/src/api-server/model/PolicyControlRequestTrigger.h +++ b/src/api-server/model/PolicyControlRequestTrigger.h @@ -1,24 +1,60 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -27,49 +63,90 @@ 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. +/// 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; - +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. 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> + /// 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; + /// <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; + bool operator==(const PolicyControlRequestTrigger& rhs) const; + bool operator!=(const PolicyControlRequestTrigger& rhs) const; - ///////////////////////////////////////////// - /// PolicyControlRequestTrigger members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + PolicyControlRequestTrigger_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/PolicyControlRequestTrigger_anyOf.cpp b/src/api-server/model/PolicyControlRequestTrigger_anyOf.cpp index 90957a9..3b32be6 100755 --- a/src/api-server/model/PolicyControlRequestTrigger_anyOf.cpp +++ b/src/api-server/model/PolicyControlRequestTrigger_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,307 +20,338 @@ namespace oai { namespace pcf { namespace model { -PolicyControlRequestTrigger_anyOf::PolicyControlRequestTrigger_anyOf() -{ - -} +PolicyControlRequestTrigger_anyOf::PolicyControlRequestTrigger_anyOf() {} -void PolicyControlRequestTrigger_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == + PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool PolicyControlRequestTrigger_anyOf::operator!=( + const PolicyControlRequestTrigger_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf +PolicyControlRequestTrigger_anyOf::getValue() const { + return m_value; } -void PolicyControlRequestTrigger_anyOf::setValue(PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf value) -{ - m_value = value; +void PolicyControlRequestTrigger_anyOf::setValue( + PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf + value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/PolicyControlRequestTrigger_anyOf.h b/src/api-server/model/PolicyControlRequestTrigger_anyOf.h index c725308..d2698cb 100755 --- a/src/api-server/model/PolicyControlRequestTrigger_anyOf.h +++ b/src/api-server/model/PolicyControlRequestTrigger_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,88 +26,96 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PolicyControlRequestTrigger_anyOf -{ -public: - PolicyControlRequestTrigger_anyOf(); - virtual ~PolicyControlRequestTrigger_anyOf() = default; +class PolicyControlRequestTrigger_anyOf { + public: + PolicyControlRequestTrigger_anyOf(); + virtual ~PolicyControlRequestTrigger_anyOf() = default; - enum class ePolicyControlRequestTrigger_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const PolicyControlRequestTrigger_anyOf& rhs) const; + bool operator!=(const PolicyControlRequestTrigger_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// PolicyControlRequestTrigger_anyOf members - bool operator==(const PolicyControlRequestTrigger_anyOf& rhs) const; - bool operator!=(const PolicyControlRequestTrigger_anyOf& rhs) const; + PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf + getValue() const; + void setValue( + PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf + value); - ///////////////////////////////////////////// - /// PolicyControlRequestTrigger_anyOf members + friend void to_json( + nlohmann::json& j, const PolicyControlRequestTrigger_anyOf& o); + friend void from_json( + const nlohmann::json& j, PolicyControlRequestTrigger_anyOf& o); - 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; + protected: + PolicyControlRequestTrigger_anyOf::ePolicyControlRequestTrigger_anyOf + m_value = PolicyControlRequestTrigger_anyOf:: + ePolicyControlRequestTrigger_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/PortManagementContainer.cpp b/src/api-server/model/PortManagementContainer.cpp index 0f6da8d..6d63470 100755 --- a/src/api-server/model/PortManagementContainer.cpp +++ b/src/api-server/model/PortManagementContainer.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,86 +20,70 @@ namespace oai { namespace pcf { namespace model { -PortManagementContainer::PortManagementContainer() -{ - -} +PortManagementContainer::PortManagementContainer() {} -void PortManagementContainer::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +bool PortManagementContainer::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "PortManagementContainer" : pathPrefix; - - return success; + return success; } -bool PortManagementContainer::operator==(const PortManagementContainer& rhs) const -{ - return - - - (getPortManCont() == rhs.getPortManCont()) - && - - (getPortIdentifier() == rhs.getPortIdentifier()) - - - ; +bool PortManagementContainer::operator==( + const PortManagementContainer& rhs) const { + return + + (getPortManCont() == rhs.getPortManCont()) && + + (getPortIdentifier() == rhs.getPortIdentifier()) + + ; } -bool PortManagementContainer::operator!=(const PortManagementContainer& rhs) const -{ - return !(*this == rhs); +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 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); - +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; +std::string PortManagementContainer::getPortManCont() const { + return m_PortManCont; } -void PortManagementContainer::setPortManCont(std::string const& value) -{ - m_PortManCont = value; +void PortManagementContainer::setPortManCont(std::string const& value) { + m_PortManCont = value; } -TsnPortIdentifier PortManagementContainer::getPortIdentifier() const -{ - return m_PortIdentifier; +TsnPortIdentifier PortManagementContainer::getPortIdentifier() const { + return m_PortIdentifier; } -void PortManagementContainer::setPortIdentifier(TsnPortIdentifier const& value) -{ - m_PortIdentifier = value; +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 index a2debb6..172fe1e 100755 --- a/src/api-server/model/PortManagementContainer.h +++ b/src/api-server/model/PortManagementContainer.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,57 +28,55 @@ 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; - - +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 diff --git a/src/api-server/model/PreemptionCapability.cpp b/src/api-server/model/PreemptionCapability.cpp index 8c03a80..781e66f 100755 --- a/src/api-server/model/PreemptionCapability.cpp +++ b/src/api-server/model/PreemptionCapability.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "PreemptionCapability.h" #include "Helpers.h" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -PreemptionCapability::PreemptionCapability() -{ - -} +PreemptionCapability::PreemptionCapability() {} -void PreemptionCapability::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void PreemptionCapability::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool PreemptionCapability::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool PreemptionCapability::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool PreemptionCapability::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "PreemptionCapability" : pathPrefix; - - - if (!m_value.validate(msg)) - { - success = false; - } - return success; +bool PreemptionCapability::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "PreemptionCapability" : pathPrefix; + + if (!m_value.validate(msg)) { + success = false; + } + return success; } -bool PreemptionCapability::operator==(const PreemptionCapability& rhs) const -{ - return - - getValue() == rhs.getValue() - ; +bool PreemptionCapability::operator==(const PreemptionCapability& rhs) const { + return + + getValue() == rhs.getValue(); } -bool PreemptionCapability::operator!=(const PreemptionCapability& rhs) const -{ - return !(*this == rhs); +bool PreemptionCapability::operator!=(const PreemptionCapability& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const PreemptionCapability& o) -{ - j = nlohmann::json(); - to_json(j, o.m_value); +void to_json(nlohmann::json& j, const PreemptionCapability& o) { + j = nlohmann::json(); + to_json(j, o.m_value); } -void from_json(const nlohmann::json& j, PreemptionCapability& o) -{ - from_json(j, o.m_value); +void from_json(const nlohmann::json& j, PreemptionCapability& o) { + from_json(j, o.m_value); } -PreemptionCapability_anyOf PreemptionCapability::getValue() const -{ - return m_value; +PreemptionCapability_anyOf PreemptionCapability::getValue() const { + return m_value; } -void PreemptionCapability::setValue(PreemptionCapability_anyOf value) -{ - m_value = value; +void PreemptionCapability::setValue(PreemptionCapability_anyOf value) { + m_value = value; } -PreemptionCapability_anyOf::ePreemptionCapability_anyOf PreemptionCapability::getEnumValue() const -{ - return m_value.getValue(); +PreemptionCapability_anyOf::ePreemptionCapability_anyOf +PreemptionCapability::getEnumValue() const { + return m_value.getValue(); } -void PreemptionCapability::setEnumValue(PreemptionCapability_anyOf::ePreemptionCapability_anyOf value) -{ - m_value.setValue(value); +void PreemptionCapability::setEnumValue( + PreemptionCapability_anyOf::ePreemptionCapability_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/PreemptionCapability.h b/src/api-server/model/PreemptionCapability.h index 47f03e1..381da54 100755 --- a/src/api-server/model/PreemptionCapability.h +++ b/src/api-server/model/PreemptionCapability.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * PreemptionCapability.h * - * + * */ #ifndef PreemptionCapability_H_ #define PreemptionCapability_H_ - #include "PreemptionCapability_anyOf.h" #include <nlohmann/json.hpp> @@ -27,49 +27,49 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PreemptionCapability -{ -public: - PreemptionCapability(); - virtual ~PreemptionCapability() = default; - +class PreemptionCapability { + public: + PreemptionCapability(); + virtual ~PreemptionCapability() = 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. 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> + /// 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; + /// <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 PreemptionCapability& rhs) const; - bool operator!=(const PreemptionCapability& rhs) const; + bool operator==(const PreemptionCapability& rhs) const; + bool operator!=(const PreemptionCapability& rhs) const; - ///////////////////////////////////////////// - /// PreemptionCapability members + ///////////////////////////////////////////// + /// PreemptionCapability members + PreemptionCapability_anyOf getValue() const; + void setValue(PreemptionCapability_anyOf value); + PreemptionCapability_anyOf::ePreemptionCapability_anyOf getEnumValue() const; + void setEnumValue( + PreemptionCapability_anyOf::ePreemptionCapability_anyOf value); + friend void to_json(nlohmann::json& j, const PreemptionCapability& o); + friend void from_json(const nlohmann::json& j, PreemptionCapability& o); + friend void to_json(nlohmann::json& j, const PreemptionCapability_anyOf& o); + friend void from_json(const nlohmann::json& j, PreemptionCapability_anyOf& o); - PreemptionCapability_anyOf getValue() const; - void setValue(PreemptionCapability_anyOf value); - PreemptionCapability_anyOf::ePreemptionCapability_anyOf getEnumValue() const; - void setEnumValue(PreemptionCapability_anyOf::ePreemptionCapability_anyOf value); - friend void to_json(nlohmann::json& j, const PreemptionCapability& o); - friend void from_json(const nlohmann::json& j, PreemptionCapability& o); - friend void to_json(nlohmann::json& j, const PreemptionCapability_anyOf& o); - friend void from_json(const nlohmann::json& j, PreemptionCapability_anyOf& o); -protected: - PreemptionCapability_anyOf m_value; + protected: + PreemptionCapability_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/PreemptionCapability_anyOf.cpp b/src/api-server/model/PreemptionCapability_anyOf.cpp index 146cf1e..11b0464 100755 --- a/src/api-server/model/PreemptionCapability_anyOf.cpp +++ b/src/api-server/model/PreemptionCapability_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "PreemptionCapability_anyOf.h" #include "Helpers.h" @@ -20,97 +20,88 @@ namespace oai { namespace pcf { namespace model { -PreemptionCapability_anyOf::PreemptionCapability_anyOf() -{ - -} +PreemptionCapability_anyOf::PreemptionCapability_anyOf() {} -void PreemptionCapability_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void PreemptionCapability_anyOf::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool PreemptionCapability_anyOf::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool PreemptionCapability_anyOf::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool PreemptionCapability_anyOf::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "PreemptionCapability_anyOf" : pathPrefix; +bool PreemptionCapability_anyOf::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "PreemptionCapability_anyOf" : pathPrefix; - - if (m_value == PreemptionCapability_anyOf::ePreemptionCapability_anyOf::INVALID_VALUE_OPENAPI_GENERATED) - { - success = false; - msg << _pathPrefix << ": has no value;"; - } + if (m_value == PreemptionCapability_anyOf::ePreemptionCapability_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + return success; } -bool PreemptionCapability_anyOf::operator==(const PreemptionCapability_anyOf& rhs) const -{ - return - getValue() == rhs.getValue() - - ; -} +bool PreemptionCapability_anyOf::operator==( + const PreemptionCapability_anyOf& rhs) const { + return getValue() == rhs.getValue() -bool PreemptionCapability_anyOf::operator!=(const PreemptionCapability_anyOf& rhs) const -{ - return !(*this == rhs); + ; } -void to_json(nlohmann::json& j, const PreemptionCapability_anyOf& o) -{ - j = nlohmann::json(); - - switch (o.getValue()) - { - case PreemptionCapability_anyOf::ePreemptionCapability_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case PreemptionCapability_anyOf::ePreemptionCapability_anyOf::NOT_PREEMPT: - j = "NOT_PREEMPT"; - break; - case PreemptionCapability_anyOf::ePreemptionCapability_anyOf::MAY_PREEMPT: - j = "MAY_PREEMPT"; - break; - } +bool PreemptionCapability_anyOf::operator!=( + const PreemptionCapability_anyOf& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, PreemptionCapability_anyOf& o) -{ - - auto s = j.get<std::string>(); - if (s == "NOT_PREEMPT") { - o.setValue(PreemptionCapability_anyOf::ePreemptionCapability_anyOf::NOT_PREEMPT); - } - else if (s == "MAY_PREEMPT") { - o.setValue(PreemptionCapability_anyOf::ePreemptionCapability_anyOf::MAY_PREEMPT); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " PreemptionCapability_anyOf::ePreemptionCapability_anyOf"; - throw std::invalid_argument(ss.str()); - } +void to_json(nlohmann::json& j, const PreemptionCapability_anyOf& o) { + j = nlohmann::json(); + + switch (o.getValue()) { + case PreemptionCapability_anyOf::ePreemptionCapability_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED: + j = "INVALID_VALUE_OPENAPI_GENERATED"; + break; + case PreemptionCapability_anyOf::ePreemptionCapability_anyOf::NOT_PREEMPT: + j = "NOT_PREEMPT"; + break; + case PreemptionCapability_anyOf::ePreemptionCapability_anyOf::MAY_PREEMPT: + j = "MAY_PREEMPT"; + break; + } +} +void from_json(const nlohmann::json& j, PreemptionCapability_anyOf& o) { + auto s = j.get<std::string>(); + if (s == "NOT_PREEMPT") { + o.setValue( + PreemptionCapability_anyOf::ePreemptionCapability_anyOf::NOT_PREEMPT); + } else if (s == "MAY_PREEMPT") { + o.setValue( + PreemptionCapability_anyOf::ePreemptionCapability_anyOf::MAY_PREEMPT); + } else { + std::stringstream ss; + ss << "Unexpected value " << s << " in json" + << " cannot be converted to enum of type" + << " PreemptionCapability_anyOf::ePreemptionCapability_anyOf"; + throw std::invalid_argument(ss.str()); + } } -PreemptionCapability_anyOf::ePreemptionCapability_anyOf PreemptionCapability_anyOf::getValue() const -{ - return m_value; +PreemptionCapability_anyOf::ePreemptionCapability_anyOf +PreemptionCapability_anyOf::getValue() const { + return m_value; } -void PreemptionCapability_anyOf::setValue(PreemptionCapability_anyOf::ePreemptionCapability_anyOf value) -{ - m_value = value; +void PreemptionCapability_anyOf::setValue( + PreemptionCapability_anyOf::ePreemptionCapability_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/PreemptionCapability_anyOf.h b/src/api-server/model/PreemptionCapability_anyOf.h index cd08cf6..856b2d9 100755 --- a/src/api-server/model/PreemptionCapability_anyOf.h +++ b/src/api-server/model/PreemptionCapability_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * PreemptionCapability_anyOf.h * - * + * */ #ifndef PreemptionCapability_anyOf_H_ #define PreemptionCapability_anyOf_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,53 +26,56 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PreemptionCapability_anyOf -{ -public: - PreemptionCapability_anyOf(); - virtual ~PreemptionCapability_anyOf() = default; +class PreemptionCapability_anyOf { + public: + PreemptionCapability_anyOf(); + virtual ~PreemptionCapability_anyOf() = default; - enum class ePreemptionCapability_anyOf { + enum class ePreemptionCapability_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - NOT_PREEMPT, + NOT_PREEMPT, MAY_PREEMPT - }; + }; + + /// <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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const PreemptionCapability_anyOf& rhs) const; + bool operator!=(const PreemptionCapability_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// PreemptionCapability_anyOf members - bool operator==(const PreemptionCapability_anyOf& rhs) const; - bool operator!=(const PreemptionCapability_anyOf& rhs) const; + PreemptionCapability_anyOf::ePreemptionCapability_anyOf getValue() const; + void setValue(PreemptionCapability_anyOf::ePreemptionCapability_anyOf value); - ///////////////////////////////////////////// - /// PreemptionCapability_anyOf members + friend void to_json(nlohmann::json& j, const PreemptionCapability_anyOf& o); + friend void from_json(const nlohmann::json& j, PreemptionCapability_anyOf& o); - PreemptionCapability_anyOf::ePreemptionCapability_anyOf getValue() const; - void setValue(PreemptionCapability_anyOf::ePreemptionCapability_anyOf value); - - friend void to_json(nlohmann::json& j, const PreemptionCapability_anyOf& o); - friend void from_json(const nlohmann::json& j, PreemptionCapability_anyOf& o); -protected: - PreemptionCapability_anyOf::ePreemptionCapability_anyOf m_value = PreemptionCapability_anyOf::ePreemptionCapability_anyOf::INVALID_VALUE_OPENAPI_GENERATED; + protected: + PreemptionCapability_anyOf::ePreemptionCapability_anyOf m_value = + PreemptionCapability_anyOf::ePreemptionCapability_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/PreemptionVulnerability.cpp b/src/api-server/model/PreemptionVulnerability.cpp index 718ae8d..19ba529 100755 --- a/src/api-server/model/PreemptionVulnerability.cpp +++ b/src/api-server/model/PreemptionVulnerability.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "PreemptionVulnerability.h" #include "Helpers.h" @@ -20,80 +20,69 @@ namespace oai { namespace pcf { namespace model { -PreemptionVulnerability::PreemptionVulnerability() -{ - -} +PreemptionVulnerability::PreemptionVulnerability() {} -void PreemptionVulnerability::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void PreemptionVulnerability::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool PreemptionVulnerability::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool PreemptionVulnerability::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool PreemptionVulnerability::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "PreemptionVulnerability" : pathPrefix; - - - if (!m_value.validate(msg)) - { - success = false; - } - return success; +bool PreemptionVulnerability::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "PreemptionVulnerability" : pathPrefix; + + if (!m_value.validate(msg)) { + success = false; + } + return success; } -bool PreemptionVulnerability::operator==(const PreemptionVulnerability& rhs) const -{ - return - - getValue() == rhs.getValue() - ; +bool PreemptionVulnerability::operator==( + const PreemptionVulnerability& rhs) const { + return + + getValue() == rhs.getValue(); } -bool PreemptionVulnerability::operator!=(const PreemptionVulnerability& rhs) const -{ - return !(*this == rhs); +bool PreemptionVulnerability::operator!=( + const PreemptionVulnerability& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const PreemptionVulnerability& o) -{ - j = nlohmann::json(); - to_json(j, o.m_value); +void to_json(nlohmann::json& j, const PreemptionVulnerability& o) { + j = nlohmann::json(); + to_json(j, o.m_value); } -void from_json(const nlohmann::json& j, PreemptionVulnerability& o) -{ - from_json(j, o.m_value); +void from_json(const nlohmann::json& j, PreemptionVulnerability& o) { + from_json(j, o.m_value); } -PreemptionVulnerability_anyOf PreemptionVulnerability::getValue() const -{ - return m_value; +PreemptionVulnerability_anyOf PreemptionVulnerability::getValue() const { + return m_value; } -void PreemptionVulnerability::setValue(PreemptionVulnerability_anyOf value) -{ - m_value = value; +void PreemptionVulnerability::setValue(PreemptionVulnerability_anyOf value) { + m_value = value; } -PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf PreemptionVulnerability::getEnumValue() const -{ - return m_value.getValue(); +PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf +PreemptionVulnerability::getEnumValue() const { + return m_value.getValue(); } -void PreemptionVulnerability::setEnumValue(PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf value) -{ - m_value.setValue(value); +void PreemptionVulnerability::setEnumValue( + PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/PreemptionVulnerability.h b/src/api-server/model/PreemptionVulnerability.h index 32e8e72..f97a689 100755 --- a/src/api-server/model/PreemptionVulnerability.h +++ b/src/api-server/model/PreemptionVulnerability.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * PreemptionVulnerability.h * - * + * */ #ifndef PreemptionVulnerability_H_ #define PreemptionVulnerability_H_ - #include "PreemptionVulnerability_anyOf.h" #include <nlohmann/json.hpp> @@ -27,49 +27,52 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PreemptionVulnerability -{ -public: - PreemptionVulnerability(); - virtual ~PreemptionVulnerability() = default; - +class PreemptionVulnerability { + public: + PreemptionVulnerability(); + virtual ~PreemptionVulnerability() = 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. 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> + /// 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; + /// <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 PreemptionVulnerability& rhs) const; - bool operator!=(const PreemptionVulnerability& rhs) const; + bool operator==(const PreemptionVulnerability& rhs) const; + bool operator!=(const PreemptionVulnerability& rhs) const; - ///////////////////////////////////////////// - /// PreemptionVulnerability members + ///////////////////////////////////////////// + /// PreemptionVulnerability members + PreemptionVulnerability_anyOf getValue() const; + void setValue(PreemptionVulnerability_anyOf value); + PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf getEnumValue() + const; + void setEnumValue( + PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf value); + friend void to_json(nlohmann::json& j, const PreemptionVulnerability& o); + friend void from_json(const nlohmann::json& j, PreemptionVulnerability& o); + friend void to_json( + nlohmann::json& j, const PreemptionVulnerability_anyOf& o); + friend void from_json( + const nlohmann::json& j, PreemptionVulnerability_anyOf& o); - PreemptionVulnerability_anyOf getValue() const; - void setValue(PreemptionVulnerability_anyOf value); - PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf getEnumValue() const; - void setEnumValue(PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf value); - friend void to_json(nlohmann::json& j, const PreemptionVulnerability& o); - friend void from_json(const nlohmann::json& j, PreemptionVulnerability& o); - friend void to_json(nlohmann::json& j, const PreemptionVulnerability_anyOf& o); - friend void from_json(const nlohmann::json& j, PreemptionVulnerability_anyOf& o); -protected: - PreemptionVulnerability_anyOf m_value; + protected: + PreemptionVulnerability_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/PreemptionVulnerability_anyOf.cpp b/src/api-server/model/PreemptionVulnerability_anyOf.cpp index 1290d48..726b556 100755 --- a/src/api-server/model/PreemptionVulnerability_anyOf.cpp +++ b/src/api-server/model/PreemptionVulnerability_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "PreemptionVulnerability_anyOf.h" #include "Helpers.h" @@ -20,97 +20,90 @@ namespace oai { namespace pcf { namespace model { -PreemptionVulnerability_anyOf::PreemptionVulnerability_anyOf() -{ - -} +PreemptionVulnerability_anyOf::PreemptionVulnerability_anyOf() {} -void PreemptionVulnerability_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void PreemptionVulnerability_anyOf::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool PreemptionVulnerability_anyOf::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool PreemptionVulnerability_anyOf::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool PreemptionVulnerability_anyOf::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "PreemptionVulnerability_anyOf" : pathPrefix; +bool PreemptionVulnerability_anyOf::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "PreemptionVulnerability_anyOf" : pathPrefix; - - if (m_value == PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf::INVALID_VALUE_OPENAPI_GENERATED) - { - success = false; - msg << _pathPrefix << ": has no value;"; - } + if (m_value == PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + return success; } -bool PreemptionVulnerability_anyOf::operator==(const PreemptionVulnerability_anyOf& rhs) const -{ - return - getValue() == rhs.getValue() - - ; -} +bool PreemptionVulnerability_anyOf::operator==( + const PreemptionVulnerability_anyOf& rhs) const { + return getValue() == rhs.getValue() -bool PreemptionVulnerability_anyOf::operator!=(const PreemptionVulnerability_anyOf& rhs) const -{ - return !(*this == rhs); + ; } -void to_json(nlohmann::json& j, const PreemptionVulnerability_anyOf& o) -{ - j = nlohmann::json(); - - switch (o.getValue()) - { - case PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf::NOT_PREEMPTABLE: - j = "NOT_PREEMPTABLE"; - break; - case PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf::PREEMPTABLE: - j = "PREEMPTABLE"; - break; - } +bool PreemptionVulnerability_anyOf::operator!=( + const PreemptionVulnerability_anyOf& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, PreemptionVulnerability_anyOf& o) -{ - - auto s = j.get<std::string>(); - if (s == "NOT_PREEMPTABLE") { - o.setValue(PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf::NOT_PREEMPTABLE); - } - else if (s == "PREEMPTABLE") { - o.setValue(PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf::PREEMPTABLE); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf"; - throw std::invalid_argument(ss.str()); - } +void to_json(nlohmann::json& j, const PreemptionVulnerability_anyOf& o) { + j = nlohmann::json(); + + switch (o.getValue()) { + case PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED: + j = "INVALID_VALUE_OPENAPI_GENERATED"; + break; + case PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf:: + NOT_PREEMPTABLE: + j = "NOT_PREEMPTABLE"; + break; + case PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf:: + PREEMPTABLE: + j = "PREEMPTABLE"; + break; + } +} +void from_json(const nlohmann::json& j, PreemptionVulnerability_anyOf& o) { + auto s = j.get<std::string>(); + if (s == "NOT_PREEMPTABLE") { + o.setValue(PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf:: + NOT_PREEMPTABLE); + } else if (s == "PREEMPTABLE") { + o.setValue(PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf:: + PREEMPTABLE); + } else { + std::stringstream ss; + ss << "Unexpected value " << s << " in json" + << " cannot be converted to enum of type" + << " PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf"; + throw std::invalid_argument(ss.str()); + } } -PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf PreemptionVulnerability_anyOf::getValue() const -{ - return m_value; +PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf +PreemptionVulnerability_anyOf::getValue() const { + return m_value; } -void PreemptionVulnerability_anyOf::setValue(PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf value) -{ - m_value = value; +void PreemptionVulnerability_anyOf::setValue( + PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/PreemptionVulnerability_anyOf.h b/src/api-server/model/PreemptionVulnerability_anyOf.h index c9abc22..3d08a45 100755 --- a/src/api-server/model/PreemptionVulnerability_anyOf.h +++ b/src/api-server/model/PreemptionVulnerability_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * PreemptionVulnerability_anyOf.h * - * + * */ #ifndef PreemptionVulnerability_anyOf_H_ #define PreemptionVulnerability_anyOf_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,53 +26,60 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PreemptionVulnerability_anyOf -{ -public: - PreemptionVulnerability_anyOf(); - virtual ~PreemptionVulnerability_anyOf() = default; +class PreemptionVulnerability_anyOf { + public: + PreemptionVulnerability_anyOf(); + virtual ~PreemptionVulnerability_anyOf() = default; - enum class ePreemptionVulnerability_anyOf { + enum class ePreemptionVulnerability_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - NOT_PREEMPTABLE, + NOT_PREEMPTABLE, PREEMPTABLE - }; + }; + + /// <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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const PreemptionVulnerability_anyOf& rhs) const; + bool operator!=(const PreemptionVulnerability_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// PreemptionVulnerability_anyOf members - bool operator==(const PreemptionVulnerability_anyOf& rhs) const; - bool operator!=(const PreemptionVulnerability_anyOf& rhs) const; + PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf getValue() + const; + void setValue( + PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf value); - ///////////////////////////////////////////// - /// PreemptionVulnerability_anyOf members + friend void to_json( + nlohmann::json& j, const PreemptionVulnerability_anyOf& o); + friend void from_json( + const nlohmann::json& j, PreemptionVulnerability_anyOf& o); - PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf getValue() const; - void setValue(PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf value); - - friend void to_json(nlohmann::json& j, const PreemptionVulnerability_anyOf& o); - friend void from_json(const nlohmann::json& j, PreemptionVulnerability_anyOf& o); -protected: - PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf m_value = PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf::INVALID_VALUE_OPENAPI_GENERATED; + protected: + PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf m_value = + PreemptionVulnerability_anyOf::ePreemptionVulnerability_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/PresenceInfo.cpp b/src/api-server/model/PresenceInfo.cpp index 9b11bef..fb0cbf0 100755 --- a/src/api-server/model/PresenceInfo.cpp +++ b/src/api-server/model/PresenceInfo.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "PresenceInfo.h" #include "Helpers.h" @@ -20,415 +20,353 @@ namespace oai { namespace pcf { namespace model { -PresenceInfo::PresenceInfo() -{ - m_PraId = ""; - m_PraIdIsSet = false; - m_AdditionalPraId = ""; - m_AdditionalPraIdIsSet = false; - m_PresenceStateIsSet = false; - m_TrackingAreaListIsSet = false; - m_EcgiListIsSet = false; - m_NcgiListIsSet = false; - m_GlobalRanNodeIdListIsSet = false; - m_GlobaleNbIdListIsSet = false; - -} - -void PresenceInfo::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +PresenceInfo::PresenceInfo() { + m_PraId = ""; + m_PraIdIsSet = false; + m_AdditionalPraId = ""; + m_AdditionalPraIdIsSet = false; + m_PresenceStateIsSet = false; + m_TrackingAreaListIsSet = false; + m_EcgiListIsSet = false; + m_NcgiListIsSet = false; + m_GlobalRanNodeIdListIsSet = false; + m_GlobaleNbIdListIsSet = false; } -bool PresenceInfo::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool PresenceInfo::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "PresenceInfo" : pathPrefix; - - - if (trackingAreaListIsSet()) - { - const std::vector<Tai>& value = m_TrackingAreaList; - const std::string currentValuePath = _pathPrefix + ".trackingAreaList"; - - - 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 Tai& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".trackingAreaList") && success; - - i++; - } - } +void PresenceInfo::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool PresenceInfo::validate(std::stringstream& msg) const { + return validate(msg, ""); +} + +bool PresenceInfo::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "PresenceInfo" : pathPrefix; + + if (trackingAreaListIsSet()) { + const std::vector<Tai>& value = m_TrackingAreaList; + const std::string currentValuePath = _pathPrefix + ".trackingAreaList"; + + 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 Tai& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + + success = value.validate(msg, currentValuePath + ".trackingAreaList") && + success; + + i++; + } + } + } + + if (ecgiListIsSet()) { + const std::vector<Ecgi>& value = m_EcgiList; + const std::string currentValuePath = _pathPrefix + ".ecgiList"; + + 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 Ecgi& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + + success = + value.validate(msg, currentValuePath + ".ecgiList") && success; + + i++; + } + } + } + + if (ncgiListIsSet()) { + const std::vector<Ncgi>& value = m_NcgiList; + const std::string currentValuePath = _pathPrefix + ".ncgiList"; + if (value.size() < 1) { + success = false; + msg << currentValuePath << ": must have at least 1 elements;"; } - - if (ecgiListIsSet()) - { - const std::vector<Ecgi>& value = m_EcgiList; - const std::string currentValuePath = _pathPrefix + ".ecgiList"; - - - 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 Ecgi& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".ecgiList") && success; - - i++; - } - } + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const Ncgi& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + + success = + value.validate(msg, currentValuePath + ".ncgiList") && success; + i++; + } } - - if (ncgiListIsSet()) - { - const std::vector<Ncgi>& value = m_NcgiList; - const std::string currentValuePath = _pathPrefix + ".ncgiList"; - - - 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 Ncgi& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".ncgiList") && success; - - i++; - } - } + } + + if (globalRanNodeIdListIsSet()) { + const std::vector<GlobalRanNodeId>& value = m_GlobalRanNodeIdList; + const std::string currentValuePath = _pathPrefix + ".globalRanNodeIdList"; + if (value.size() < 1) { + success = false; + msg << currentValuePath << ": must have at least 1 elements;"; } - - if (globalRanNodeIdListIsSet()) - { - const std::vector<GlobalRanNodeId>& value = m_GlobalRanNodeIdList; - const std::string currentValuePath = _pathPrefix + ".globalRanNodeIdList"; - - - 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 GlobalRanNodeId& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".globalRanNodeIdList") && success; - - i++; - } - } + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const GlobalRanNodeId& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + success = + value.validate(msg, currentValuePath + ".globalRanNodeIdList") && + success; + + i++; + } } - - if (globaleNbIdListIsSet()) - { - const std::vector<GlobalRanNodeId>& value = m_GlobaleNbIdList; - const std::string currentValuePath = _pathPrefix + ".globaleNbIdList"; - - - 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 GlobalRanNodeId& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".globaleNbIdList") && success; - - i++; - } - } + } + + if (globaleNbIdListIsSet()) { + const std::vector<GlobalRanNodeId>& value = m_GlobaleNbIdList; + const std::string currentValuePath = _pathPrefix + ".globaleNbIdList"; + if (value.size() < 1) { + success = false; + msg << currentValuePath << ": must have at least 1 elements;"; } - - return success; -} - -bool PresenceInfo::operator==(const PresenceInfo& rhs) const -{ - return - - - - ((!praIdIsSet() && !rhs.praIdIsSet()) || (praIdIsSet() && rhs.praIdIsSet() && getPraId() == rhs.getPraId())) && - - - ((!additionalPraIdIsSet() && !rhs.additionalPraIdIsSet()) || (additionalPraIdIsSet() && rhs.additionalPraIdIsSet() && getAdditionalPraId() == rhs.getAdditionalPraId())) && - - - ((!presenceStateIsSet() && !rhs.presenceStateIsSet()) || (presenceStateIsSet() && rhs.presenceStateIsSet() && getPresenceState() == rhs.getPresenceState())) && - - - ((!trackingAreaListIsSet() && !rhs.trackingAreaListIsSet()) || (trackingAreaListIsSet() && rhs.trackingAreaListIsSet() && getTrackingAreaList() == rhs.getTrackingAreaList())) && - - - ((!ecgiListIsSet() && !rhs.ecgiListIsSet()) || (ecgiListIsSet() && rhs.ecgiListIsSet() && getEcgiList() == rhs.getEcgiList())) && - - - ((!ncgiListIsSet() && !rhs.ncgiListIsSet()) || (ncgiListIsSet() && rhs.ncgiListIsSet() && getNcgiList() == rhs.getNcgiList())) && - - - ((!globalRanNodeIdListIsSet() && !rhs.globalRanNodeIdListIsSet()) || (globalRanNodeIdListIsSet() && rhs.globalRanNodeIdListIsSet() && getGlobalRanNodeIdList() == rhs.getGlobalRanNodeIdList())) && - - - ((!globaleNbIdListIsSet() && !rhs.globaleNbIdListIsSet()) || (globaleNbIdListIsSet() && rhs.globaleNbIdListIsSet() && getGlobaleNbIdList() == rhs.getGlobaleNbIdList())) - - ; -} - -bool PresenceInfo::operator!=(const PresenceInfo& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const PresenceInfo& o) -{ - j = nlohmann::json(); - if(o.praIdIsSet()) - j["praId"] = o.m_PraId; - if(o.additionalPraIdIsSet()) - j["additionalPraId"] = o.m_AdditionalPraId; - if(o.presenceStateIsSet()) - j["presenceState"] = o.m_PresenceState; - if(o.trackingAreaListIsSet() || !o.m_TrackingAreaList.empty()) - j["trackingAreaList"] = o.m_TrackingAreaList; - if(o.ecgiListIsSet() || !o.m_EcgiList.empty()) - j["ecgiList"] = o.m_EcgiList; - if(o.ncgiListIsSet() || !o.m_NcgiList.empty()) - j["ncgiList"] = o.m_NcgiList; - if(o.globalRanNodeIdListIsSet() || !o.m_GlobalRanNodeIdList.empty()) - j["globalRanNodeIdList"] = o.m_GlobalRanNodeIdList; - if(o.globaleNbIdListIsSet() || !o.m_GlobaleNbIdList.empty()) - j["globaleNbIdList"] = o.m_GlobaleNbIdList; - -} - -void from_json(const nlohmann::json& j, PresenceInfo& o) -{ - if(j.find("praId") != j.end()) - { - j.at("praId").get_to(o.m_PraId); - o.m_PraIdIsSet = true; - } - if(j.find("additionalPraId") != j.end()) - { - j.at("additionalPraId").get_to(o.m_AdditionalPraId); - o.m_AdditionalPraIdIsSet = true; - } - if(j.find("presenceState") != j.end()) - { - j.at("presenceState").get_to(o.m_PresenceState); - o.m_PresenceStateIsSet = true; - } - if(j.find("trackingAreaList") != j.end()) - { - j.at("trackingAreaList").get_to(o.m_TrackingAreaList); - o.m_TrackingAreaListIsSet = true; - } - if(j.find("ecgiList") != j.end()) - { - j.at("ecgiList").get_to(o.m_EcgiList); - o.m_EcgiListIsSet = true; - } - if(j.find("ncgiList") != j.end()) - { - j.at("ncgiList").get_to(o.m_NcgiList); - o.m_NcgiListIsSet = true; - } - if(j.find("globalRanNodeIdList") != j.end()) - { - j.at("globalRanNodeIdList").get_to(o.m_GlobalRanNodeIdList); - o.m_GlobalRanNodeIdListIsSet = true; - } - if(j.find("globaleNbIdList") != j.end()) - { - j.at("globaleNbIdList").get_to(o.m_GlobaleNbIdList); - o.m_GlobaleNbIdListIsSet = true; - } - -} - -std::string PresenceInfo::getPraId() const -{ - return m_PraId; -} -void PresenceInfo::setPraId(std::string const& value) -{ - m_PraId = value; - m_PraIdIsSet = true; -} -bool PresenceInfo::praIdIsSet() const -{ - return m_PraIdIsSet; -} -void PresenceInfo::unsetPraId() -{ - m_PraIdIsSet = false; -} -std::string PresenceInfo::getAdditionalPraId() const -{ - return m_AdditionalPraId; -} -void PresenceInfo::setAdditionalPraId(std::string const& value) -{ - m_AdditionalPraId = value; - m_AdditionalPraIdIsSet = true; -} -bool PresenceInfo::additionalPraIdIsSet() const -{ - return m_AdditionalPraIdIsSet; -} -void PresenceInfo::unsetAdditionalPraId() -{ - m_AdditionalPraIdIsSet = false; -} -PresenceState PresenceInfo::getPresenceState() const -{ - return m_PresenceState; -} -void PresenceInfo::setPresenceState(PresenceState const& value) -{ - m_PresenceState = value; - m_PresenceStateIsSet = true; -} -bool PresenceInfo::presenceStateIsSet() const -{ - return m_PresenceStateIsSet; -} -void PresenceInfo::unsetPresenceState() -{ - m_PresenceStateIsSet = false; -} -std::vector<Tai> PresenceInfo::getTrackingAreaList() const -{ - return m_TrackingAreaList; -} -void PresenceInfo::setTrackingAreaList(std::vector<Tai> const& value) -{ - m_TrackingAreaList = value; - m_TrackingAreaListIsSet = true; -} -bool PresenceInfo::trackingAreaListIsSet() const -{ - return m_TrackingAreaListIsSet; -} -void PresenceInfo::unsetTrackingAreaList() -{ - m_TrackingAreaListIsSet = false; -} -std::vector<Ecgi> PresenceInfo::getEcgiList() const -{ - return m_EcgiList; -} -void PresenceInfo::setEcgiList(std::vector<Ecgi> const& value) -{ - m_EcgiList = value; - m_EcgiListIsSet = true; -} -bool PresenceInfo::ecgiListIsSet() const -{ - return m_EcgiListIsSet; -} -void PresenceInfo::unsetEcgiList() -{ - m_EcgiListIsSet = false; -} -std::vector<Ncgi> PresenceInfo::getNcgiList() const -{ - return m_NcgiList; -} -void PresenceInfo::setNcgiList(std::vector<Ncgi> const& value) -{ - m_NcgiList = value; - m_NcgiListIsSet = true; -} -bool PresenceInfo::ncgiListIsSet() const -{ - return m_NcgiListIsSet; + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const GlobalRanNodeId& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + + success = value.validate(msg, currentValuePath + ".globaleNbIdList") && + success; + + i++; + } + } + } + + return success; } -void PresenceInfo::unsetNcgiList() -{ - m_NcgiListIsSet = false; -} -std::vector<GlobalRanNodeId> PresenceInfo::getGlobalRanNodeIdList() const -{ - return m_GlobalRanNodeIdList; -} -void PresenceInfo::setGlobalRanNodeIdList(std::vector<GlobalRanNodeId> const& value) -{ - m_GlobalRanNodeIdList = value; - m_GlobalRanNodeIdListIsSet = true; + +bool PresenceInfo::operator==(const PresenceInfo& rhs) const { + return + + ((!praIdIsSet() && !rhs.praIdIsSet()) || + (praIdIsSet() && rhs.praIdIsSet() && getPraId() == rhs.getPraId())) && + + ((!additionalPraIdIsSet() && !rhs.additionalPraIdIsSet()) || + (additionalPraIdIsSet() && rhs.additionalPraIdIsSet() && + getAdditionalPraId() == rhs.getAdditionalPraId())) && + + ((!presenceStateIsSet() && !rhs.presenceStateIsSet()) || + (presenceStateIsSet() && rhs.presenceStateIsSet() && + getPresenceState() == rhs.getPresenceState())) && + + ((!trackingAreaListIsSet() && !rhs.trackingAreaListIsSet()) || + (trackingAreaListIsSet() && rhs.trackingAreaListIsSet() && + getTrackingAreaList() == rhs.getTrackingAreaList())) && + + ((!ecgiListIsSet() && !rhs.ecgiListIsSet()) || + (ecgiListIsSet() && rhs.ecgiListIsSet() && + getEcgiList() == rhs.getEcgiList())) && + + ((!ncgiListIsSet() && !rhs.ncgiListIsSet()) || + (ncgiListIsSet() && rhs.ncgiListIsSet() && + getNcgiList() == rhs.getNcgiList())) && + + ((!globalRanNodeIdListIsSet() && !rhs.globalRanNodeIdListIsSet()) || + (globalRanNodeIdListIsSet() && rhs.globalRanNodeIdListIsSet() && + getGlobalRanNodeIdList() == rhs.getGlobalRanNodeIdList())) && + + ((!globaleNbIdListIsSet() && !rhs.globaleNbIdListIsSet()) || + (globaleNbIdListIsSet() && rhs.globaleNbIdListIsSet() && + getGlobaleNbIdList() == rhs.getGlobaleNbIdList())) + + ; } -bool PresenceInfo::globalRanNodeIdListIsSet() const -{ - return m_GlobalRanNodeIdListIsSet; + +bool PresenceInfo::operator!=(const PresenceInfo& rhs) const { + return !(*this == rhs); } -void PresenceInfo::unsetGlobalRanNodeIdList() -{ - m_GlobalRanNodeIdListIsSet = false; + +void to_json(nlohmann::json& j, const PresenceInfo& o) { + j = nlohmann::json(); + if (o.praIdIsSet()) j["praId"] = o.m_PraId; + if (o.additionalPraIdIsSet()) j["additionalPraId"] = o.m_AdditionalPraId; + if (o.presenceStateIsSet()) j["presenceState"] = o.m_PresenceState; + if (o.trackingAreaListIsSet() || !o.m_TrackingAreaList.empty()) + j["trackingAreaList"] = o.m_TrackingAreaList; + if (o.ecgiListIsSet() || !o.m_EcgiList.empty()) j["ecgiList"] = o.m_EcgiList; + if (o.ncgiListIsSet() || !o.m_NcgiList.empty()) j["ncgiList"] = o.m_NcgiList; + if (o.globalRanNodeIdListIsSet() || !o.m_GlobalRanNodeIdList.empty()) + j["globalRanNodeIdList"] = o.m_GlobalRanNodeIdList; + if (o.globaleNbIdListIsSet() || !o.m_GlobaleNbIdList.empty()) + j["globaleNbIdList"] = o.m_GlobaleNbIdList; } -std::vector<GlobalRanNodeId> PresenceInfo::getGlobaleNbIdList() const -{ - return m_GlobaleNbIdList; + +void from_json(const nlohmann::json& j, PresenceInfo& o) { + if (j.find("praId") != j.end()) { + j.at("praId").get_to(o.m_PraId); + o.m_PraIdIsSet = true; + } + if (j.find("additionalPraId") != j.end()) { + j.at("additionalPraId").get_to(o.m_AdditionalPraId); + o.m_AdditionalPraIdIsSet = true; + } + if (j.find("presenceState") != j.end()) { + j.at("presenceState").get_to(o.m_PresenceState); + o.m_PresenceStateIsSet = true; + } + if (j.find("trackingAreaList") != j.end()) { + j.at("trackingAreaList").get_to(o.m_TrackingAreaList); + o.m_TrackingAreaListIsSet = true; + } + if (j.find("ecgiList") != j.end()) { + j.at("ecgiList").get_to(o.m_EcgiList); + o.m_EcgiListIsSet = true; + } + if (j.find("ncgiList") != j.end()) { + j.at("ncgiList").get_to(o.m_NcgiList); + o.m_NcgiListIsSet = true; + } + if (j.find("globalRanNodeIdList") != j.end()) { + j.at("globalRanNodeIdList").get_to(o.m_GlobalRanNodeIdList); + o.m_GlobalRanNodeIdListIsSet = true; + } + if (j.find("globaleNbIdList") != j.end()) { + j.at("globaleNbIdList").get_to(o.m_GlobaleNbIdList); + o.m_GlobaleNbIdListIsSet = true; + } } -void PresenceInfo::setGlobaleNbIdList(std::vector<GlobalRanNodeId> const& value) -{ - m_GlobaleNbIdList = value; - m_GlobaleNbIdListIsSet = true; + +std::string PresenceInfo::getPraId() const { + return m_PraId; } -bool PresenceInfo::globaleNbIdListIsSet() const -{ - return m_GlobaleNbIdListIsSet; +void PresenceInfo::setPraId(std::string const& value) { + m_PraId = value; + m_PraIdIsSet = true; } -void PresenceInfo::unsetGlobaleNbIdList() -{ - m_GlobaleNbIdListIsSet = false; +bool PresenceInfo::praIdIsSet() const { + return m_PraIdIsSet; +} +void PresenceInfo::unsetPraId() { + m_PraIdIsSet = false; +} +std::string PresenceInfo::getAdditionalPraId() const { + return m_AdditionalPraId; +} +void PresenceInfo::setAdditionalPraId(std::string const& value) { + m_AdditionalPraId = value; + m_AdditionalPraIdIsSet = true; +} +bool PresenceInfo::additionalPraIdIsSet() const { + return m_AdditionalPraIdIsSet; +} +void PresenceInfo::unsetAdditionalPraId() { + m_AdditionalPraIdIsSet = false; +} +PresenceState PresenceInfo::getPresenceState() const { + return m_PresenceState; +} +void PresenceInfo::setPresenceState(PresenceState const& value) { + m_PresenceState = value; + m_PresenceStateIsSet = true; +} +bool PresenceInfo::presenceStateIsSet() const { + return m_PresenceStateIsSet; +} +void PresenceInfo::unsetPresenceState() { + m_PresenceStateIsSet = false; +} +std::vector<Tai> PresenceInfo::getTrackingAreaList() const { + return m_TrackingAreaList; +} +void PresenceInfo::setTrackingAreaList(std::vector<Tai> const& value) { + m_TrackingAreaList = value; + m_TrackingAreaListIsSet = true; +} +bool PresenceInfo::trackingAreaListIsSet() const { + return m_TrackingAreaListIsSet; +} +void PresenceInfo::unsetTrackingAreaList() { + m_TrackingAreaListIsSet = false; +} +std::vector<Ecgi> PresenceInfo::getEcgiList() const { + return m_EcgiList; +} +void PresenceInfo::setEcgiList(std::vector<Ecgi> const& value) { + m_EcgiList = value; + m_EcgiListIsSet = true; +} +bool PresenceInfo::ecgiListIsSet() const { + return m_EcgiListIsSet; +} +void PresenceInfo::unsetEcgiList() { + m_EcgiListIsSet = false; +} +std::vector<Ncgi> PresenceInfo::getNcgiList() const { + return m_NcgiList; +} +void PresenceInfo::setNcgiList(std::vector<Ncgi> const& value) { + m_NcgiList = value; + m_NcgiListIsSet = true; +} +bool PresenceInfo::ncgiListIsSet() const { + return m_NcgiListIsSet; +} +void PresenceInfo::unsetNcgiList() { + m_NcgiListIsSet = false; +} +std::vector<GlobalRanNodeId> PresenceInfo::getGlobalRanNodeIdList() const { + return m_GlobalRanNodeIdList; +} +void PresenceInfo::setGlobalRanNodeIdList( + std::vector<GlobalRanNodeId> const& value) { + m_GlobalRanNodeIdList = value; + m_GlobalRanNodeIdListIsSet = true; +} +bool PresenceInfo::globalRanNodeIdListIsSet() const { + return m_GlobalRanNodeIdListIsSet; +} +void PresenceInfo::unsetGlobalRanNodeIdList() { + m_GlobalRanNodeIdListIsSet = false; +} +std::vector<GlobalRanNodeId> PresenceInfo::getGlobaleNbIdList() const { + return m_GlobaleNbIdList; +} +void PresenceInfo::setGlobaleNbIdList( + std::vector<GlobalRanNodeId> const& value) { + m_GlobaleNbIdList = value; + m_GlobaleNbIdListIsSet = true; +} +bool PresenceInfo::globaleNbIdListIsSet() const { + return m_GlobaleNbIdListIsSet; +} +void PresenceInfo::unsetGlobaleNbIdList() { + m_GlobaleNbIdListIsSet = false; } - } // namespace model } // namespace pcf diff --git a/src/api-server/model/PresenceInfo.h b/src/api-server/model/PresenceInfo.h index 5b4ad7e..b6d2d99 100755 --- a/src/api-server/model/PresenceInfo.h +++ b/src/api-server/model/PresenceInfo.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * PresenceInfo.h * - * + * */ #ifndef PresenceInfo_H_ #define PresenceInfo_H_ - #include "Ecgi.h" #include "Ncgi.h" #include "Tai.h" @@ -33,115 +33,114 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PresenceInfo -{ -public: - PresenceInfo(); - virtual ~PresenceInfo() = default; +class PresenceInfo { + public: + PresenceInfo(); + virtual ~PresenceInfo() = 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. 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> - /// 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; - /// <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 PresenceInfo& rhs) const; + bool operator!=(const PresenceInfo& rhs) const; - bool operator==(const PresenceInfo& rhs) const; - bool operator!=(const PresenceInfo& rhs) const; + ///////////////////////////////////////////// + /// PresenceInfo members - ///////////////////////////////////////////// - /// PresenceInfo members + /// <summary> + /// + /// </summary> + std::string getPraId() const; + void setPraId(std::string const& value); + bool praIdIsSet() const; + void unsetPraId(); + /// <summary> + /// + /// </summary> + std::string getAdditionalPraId() const; + void setAdditionalPraId(std::string const& value); + bool additionalPraIdIsSet() const; + void unsetAdditionalPraId(); + /// <summary> + /// + /// </summary> + PresenceState getPresenceState() const; + void setPresenceState(PresenceState const& value); + bool presenceStateIsSet() const; + void unsetPresenceState(); + /// <summary> + /// + /// </summary> + std::vector<Tai> getTrackingAreaList() const; + void setTrackingAreaList(std::vector<Tai> const& value); + bool trackingAreaListIsSet() const; + void unsetTrackingAreaList(); + /// <summary> + /// + /// </summary> + std::vector<Ecgi> getEcgiList() const; + void setEcgiList(std::vector<Ecgi> const& value); + bool ecgiListIsSet() const; + void unsetEcgiList(); + /// <summary> + /// + /// </summary> + std::vector<Ncgi> getNcgiList() const; + void setNcgiList(std::vector<Ncgi> const& value); + bool ncgiListIsSet() const; + void unsetNcgiList(); + /// <summary> + /// + /// </summary> + std::vector<GlobalRanNodeId> getGlobalRanNodeIdList() const; + void setGlobalRanNodeIdList(std::vector<GlobalRanNodeId> const& value); + bool globalRanNodeIdListIsSet() const; + void unsetGlobalRanNodeIdList(); + /// <summary> + /// + /// </summary> + std::vector<GlobalRanNodeId> getGlobaleNbIdList() const; + void setGlobaleNbIdList(std::vector<GlobalRanNodeId> const& value); + bool globaleNbIdListIsSet() const; + void unsetGlobaleNbIdList(); - /// <summary> - /// - /// </summary> - std::string getPraId() const; - void setPraId(std::string const& value); - bool praIdIsSet() const; - void unsetPraId(); - /// <summary> - /// - /// </summary> - std::string getAdditionalPraId() const; - void setAdditionalPraId(std::string const& value); - bool additionalPraIdIsSet() const; - void unsetAdditionalPraId(); - /// <summary> - /// - /// </summary> - PresenceState getPresenceState() const; - void setPresenceState(PresenceState const& value); - bool presenceStateIsSet() const; - void unsetPresenceState(); - /// <summary> - /// - /// </summary> - std::vector<Tai> getTrackingAreaList() const; - void setTrackingAreaList(std::vector<Tai> const& value); - bool trackingAreaListIsSet() const; - void unsetTrackingAreaList(); - /// <summary> - /// - /// </summary> - std::vector<Ecgi> getEcgiList() const; - void setEcgiList(std::vector<Ecgi> const& value); - bool ecgiListIsSet() const; - void unsetEcgiList(); - /// <summary> - /// - /// </summary> - std::vector<Ncgi> getNcgiList() const; - void setNcgiList(std::vector<Ncgi> const& value); - bool ncgiListIsSet() const; - void unsetNcgiList(); - /// <summary> - /// - /// </summary> - std::vector<GlobalRanNodeId> getGlobalRanNodeIdList() const; - void setGlobalRanNodeIdList(std::vector<GlobalRanNodeId> const& value); - bool globalRanNodeIdListIsSet() const; - void unsetGlobalRanNodeIdList(); - /// <summary> - /// - /// </summary> - std::vector<GlobalRanNodeId> getGlobaleNbIdList() const; - void setGlobaleNbIdList(std::vector<GlobalRanNodeId> const& value); - bool globaleNbIdListIsSet() const; - void unsetGlobaleNbIdList(); + friend void to_json(nlohmann::json& j, const PresenceInfo& o); + friend void from_json(const nlohmann::json& j, PresenceInfo& o); - friend void to_json(nlohmann::json& j, const PresenceInfo& o); - friend void from_json(const nlohmann::json& j, PresenceInfo& o); -protected: - std::string m_PraId; - bool m_PraIdIsSet; - std::string m_AdditionalPraId; - bool m_AdditionalPraIdIsSet; - PresenceState m_PresenceState; - bool m_PresenceStateIsSet; - std::vector<Tai> m_TrackingAreaList; - bool m_TrackingAreaListIsSet; - std::vector<Ecgi> m_EcgiList; - bool m_EcgiListIsSet; - std::vector<Ncgi> m_NcgiList; - bool m_NcgiListIsSet; - std::vector<GlobalRanNodeId> m_GlobalRanNodeIdList; - bool m_GlobalRanNodeIdListIsSet; - std::vector<GlobalRanNodeId> m_GlobaleNbIdList; - bool m_GlobaleNbIdListIsSet; - + protected: + std::string m_PraId; + bool m_PraIdIsSet; + std::string m_AdditionalPraId; + bool m_AdditionalPraIdIsSet; + PresenceState m_PresenceState; + bool m_PresenceStateIsSet; + std::vector<Tai> m_TrackingAreaList; + bool m_TrackingAreaListIsSet; + std::vector<Ecgi> m_EcgiList; + bool m_EcgiListIsSet; + std::vector<Ncgi> m_NcgiList; + bool m_NcgiListIsSet; + std::vector<GlobalRanNodeId> m_GlobalRanNodeIdList; + bool m_GlobalRanNodeIdListIsSet; + std::vector<GlobalRanNodeId> m_GlobaleNbIdList; + bool m_GlobaleNbIdListIsSet; }; } // namespace model diff --git a/src/api-server/model/PresenceInfoRm.cpp b/src/api-server/model/PresenceInfoRm.cpp index b411da1..9031192 100755 --- a/src/api-server/model/PresenceInfoRm.cpp +++ b/src/api-server/model/PresenceInfoRm.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "PresenceInfoRm.h" #include "Helpers.h" @@ -20,410 +20,349 @@ namespace oai { namespace pcf { namespace model { -PresenceInfoRm::PresenceInfoRm() -{ - m_PraId = ""; - m_PraIdIsSet = false; - m_AdditionalPraId = ""; - m_AdditionalPraIdIsSet = false; - m_PresenceStateIsSet = false; - m_TrackingAreaListIsSet = false; - m_EcgiListIsSet = false; - m_NcgiListIsSet = false; - m_GlobalRanNodeIdListIsSet = false; - m_GlobaleNbIdListIsSet = false; - -} - -void PresenceInfoRm::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +PresenceInfoRm::PresenceInfoRm() { + m_PraId = ""; + m_PraIdIsSet = false; + m_AdditionalPraId = ""; + m_AdditionalPraIdIsSet = false; + m_PresenceStateIsSet = false; + m_TrackingAreaListIsSet = false; + m_EcgiListIsSet = false; + m_NcgiListIsSet = false; + m_GlobalRanNodeIdListIsSet = false; + m_GlobaleNbIdListIsSet = false; } -bool PresenceInfoRm::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool PresenceInfoRm::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "PresenceInfoRm" : pathPrefix; - - - if (trackingAreaListIsSet()) - { - const std::vector<Tai>& value = m_TrackingAreaList; - const std::string currentValuePath = _pathPrefix + ".trackingAreaList"; - - - if (value.size() < 0) - { - success = false; - msg << currentValuePath << ": must have at least 0 elements;"; - } - { // Recursive validation of array elements - const std::string oldValuePath = currentValuePath; - int i = 0; - for (const Tai& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".trackingAreaList") && success; - - i++; - } - } +void PresenceInfoRm::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool PresenceInfoRm::validate(std::stringstream& msg) const { + return validate(msg, ""); +} + +bool PresenceInfoRm::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "PresenceInfoRm" : pathPrefix; + + if (trackingAreaListIsSet()) { + const std::vector<Tai>& value = m_TrackingAreaList; + const std::string currentValuePath = _pathPrefix + ".trackingAreaList"; + + if (value.size() < 0) { + success = false; + msg << currentValuePath << ": must have at least 0 elements;"; + } + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const Tai& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + + success = value.validate(msg, currentValuePath + ".trackingAreaList") && + success; + i++; + } } - - if (ecgiListIsSet()) - { - const std::vector<Ecgi>& value = m_EcgiList; - const std::string currentValuePath = _pathPrefix + ".ecgiList"; - - - if (value.size() < 0) - { - success = false; - msg << currentValuePath << ": must have at least 0 elements;"; - } - { // Recursive validation of array elements - const std::string oldValuePath = currentValuePath; - int i = 0; - for (const Ecgi& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".ecgiList") && success; - - i++; - } - } + } + + if (ecgiListIsSet()) { + const std::vector<Ecgi>& value = m_EcgiList; + const std::string currentValuePath = _pathPrefix + ".ecgiList"; + if (value.size() < 0) { + success = false; + msg << currentValuePath << ": must have at least 0 elements;"; } - - if (ncgiListIsSet()) - { - const std::vector<Ncgi>& value = m_NcgiList; - const std::string currentValuePath = _pathPrefix + ".ncgiList"; - - - if (value.size() < 0) - { - success = false; - msg << currentValuePath << ": must have at least 0 elements;"; - } - { // Recursive validation of array elements - const std::string oldValuePath = currentValuePath; - int i = 0; - for (const Ncgi& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".ncgiList") && success; - - i++; - } - } + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const Ecgi& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + + success = + value.validate(msg, currentValuePath + ".ecgiList") && success; + i++; + } } - - if (globalRanNodeIdListIsSet()) - { - const std::vector<GlobalRanNodeId>& value = m_GlobalRanNodeIdList; - const std::string currentValuePath = _pathPrefix + ".globalRanNodeIdList"; - - - { // Recursive validation of array elements - const std::string oldValuePath = currentValuePath; - int i = 0; - for (const GlobalRanNodeId& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".globalRanNodeIdList") && success; - - i++; - } - } + } + if (ncgiListIsSet()) { + const std::vector<Ncgi>& value = m_NcgiList; + const std::string currentValuePath = _pathPrefix + ".ncgiList"; + + if (value.size() < 0) { + success = false; + msg << currentValuePath << ": must have at least 0 elements;"; } - - if (globaleNbIdListIsSet()) - { - const std::vector<GlobalRanNodeId>& value = m_GlobaleNbIdList; - const std::string currentValuePath = _pathPrefix + ".globaleNbIdList"; - - - 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 GlobalRanNodeId& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".globaleNbIdList") && success; - - i++; - } - } + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const Ncgi& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + + success = + value.validate(msg, currentValuePath + ".ncgiList") && success; + i++; + } } - - return success; -} - -bool PresenceInfoRm::operator==(const PresenceInfoRm& rhs) const -{ - return - - - - ((!praIdIsSet() && !rhs.praIdIsSet()) || (praIdIsSet() && rhs.praIdIsSet() && getPraId() == rhs.getPraId())) && - - - ((!additionalPraIdIsSet() && !rhs.additionalPraIdIsSet()) || (additionalPraIdIsSet() && rhs.additionalPraIdIsSet() && getAdditionalPraId() == rhs.getAdditionalPraId())) && - - - ((!presenceStateIsSet() && !rhs.presenceStateIsSet()) || (presenceStateIsSet() && rhs.presenceStateIsSet() && getPresenceState() == rhs.getPresenceState())) && - - - ((!trackingAreaListIsSet() && !rhs.trackingAreaListIsSet()) || (trackingAreaListIsSet() && rhs.trackingAreaListIsSet() && getTrackingAreaList() == rhs.getTrackingAreaList())) && - - - ((!ecgiListIsSet() && !rhs.ecgiListIsSet()) || (ecgiListIsSet() && rhs.ecgiListIsSet() && getEcgiList() == rhs.getEcgiList())) && - - - ((!ncgiListIsSet() && !rhs.ncgiListIsSet()) || (ncgiListIsSet() && rhs.ncgiListIsSet() && getNcgiList() == rhs.getNcgiList())) && - - - ((!globalRanNodeIdListIsSet() && !rhs.globalRanNodeIdListIsSet()) || (globalRanNodeIdListIsSet() && rhs.globalRanNodeIdListIsSet() && getGlobalRanNodeIdList() == rhs.getGlobalRanNodeIdList())) && - - - ((!globaleNbIdListIsSet() && !rhs.globaleNbIdListIsSet()) || (globaleNbIdListIsSet() && rhs.globaleNbIdListIsSet() && getGlobaleNbIdList() == rhs.getGlobaleNbIdList())) - - ; -} - -bool PresenceInfoRm::operator!=(const PresenceInfoRm& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const PresenceInfoRm& o) -{ - j = nlohmann::json(); - if(o.praIdIsSet()) - j["praId"] = o.m_PraId; - if(o.additionalPraIdIsSet()) - j["additionalPraId"] = o.m_AdditionalPraId; - if(o.presenceStateIsSet()) - j["presenceState"] = o.m_PresenceState; - if(o.trackingAreaListIsSet() || !o.m_TrackingAreaList.empty()) - j["trackingAreaList"] = o.m_TrackingAreaList; - if(o.ecgiListIsSet() || !o.m_EcgiList.empty()) - j["ecgiList"] = o.m_EcgiList; - if(o.ncgiListIsSet() || !o.m_NcgiList.empty()) - j["ncgiList"] = o.m_NcgiList; - if(o.globalRanNodeIdListIsSet() || !o.m_GlobalRanNodeIdList.empty()) - j["globalRanNodeIdList"] = o.m_GlobalRanNodeIdList; - if(o.globaleNbIdListIsSet() || !o.m_GlobaleNbIdList.empty()) - j["globaleNbIdList"] = o.m_GlobaleNbIdList; - -} - -void from_json(const nlohmann::json& j, PresenceInfoRm& o) -{ - if(j.find("praId") != j.end()) - { - j.at("praId").get_to(o.m_PraId); - o.m_PraIdIsSet = true; - } - if(j.find("additionalPraId") != j.end()) - { - j.at("additionalPraId").get_to(o.m_AdditionalPraId); - o.m_AdditionalPraIdIsSet = true; - } - if(j.find("presenceState") != j.end()) - { - j.at("presenceState").get_to(o.m_PresenceState); - o.m_PresenceStateIsSet = true; - } - if(j.find("trackingAreaList") != j.end()) - { - j.at("trackingAreaList").get_to(o.m_TrackingAreaList); - o.m_TrackingAreaListIsSet = true; - } - if(j.find("ecgiList") != j.end()) - { - j.at("ecgiList").get_to(o.m_EcgiList); - o.m_EcgiListIsSet = true; - } - if(j.find("ncgiList") != j.end()) - { - j.at("ncgiList").get_to(o.m_NcgiList); - o.m_NcgiListIsSet = true; - } - if(j.find("globalRanNodeIdList") != j.end()) - { - j.at("globalRanNodeIdList").get_to(o.m_GlobalRanNodeIdList); - o.m_GlobalRanNodeIdListIsSet = true; - } - if(j.find("globaleNbIdList") != j.end()) - { - j.at("globaleNbIdList").get_to(o.m_GlobaleNbIdList); - o.m_GlobaleNbIdListIsSet = true; - } - -} - -std::string PresenceInfoRm::getPraId() const -{ - return m_PraId; -} -void PresenceInfoRm::setPraId(std::string const& value) -{ - m_PraId = value; - m_PraIdIsSet = true; -} -bool PresenceInfoRm::praIdIsSet() const -{ - return m_PraIdIsSet; -} -void PresenceInfoRm::unsetPraId() -{ - m_PraIdIsSet = false; -} -std::string PresenceInfoRm::getAdditionalPraId() const -{ - return m_AdditionalPraId; -} -void PresenceInfoRm::setAdditionalPraId(std::string const& value) -{ - m_AdditionalPraId = value; - m_AdditionalPraIdIsSet = true; -} -bool PresenceInfoRm::additionalPraIdIsSet() const -{ - return m_AdditionalPraIdIsSet; -} -void PresenceInfoRm::unsetAdditionalPraId() -{ - m_AdditionalPraIdIsSet = false; -} -PresenceState PresenceInfoRm::getPresenceState() const -{ - return m_PresenceState; -} -void PresenceInfoRm::setPresenceState(PresenceState const& value) -{ - m_PresenceState = value; - m_PresenceStateIsSet = true; -} -bool PresenceInfoRm::presenceStateIsSet() const -{ - return m_PresenceStateIsSet; -} -void PresenceInfoRm::unsetPresenceState() -{ - m_PresenceStateIsSet = false; -} -std::vector<Tai> PresenceInfoRm::getTrackingAreaList() const -{ - return m_TrackingAreaList; -} -void PresenceInfoRm::setTrackingAreaList(std::vector<Tai> const& value) -{ - m_TrackingAreaList = value; - m_TrackingAreaListIsSet = true; -} -bool PresenceInfoRm::trackingAreaListIsSet() const -{ - return m_TrackingAreaListIsSet; -} -void PresenceInfoRm::unsetTrackingAreaList() -{ - m_TrackingAreaListIsSet = false; -} -std::vector<Ecgi> PresenceInfoRm::getEcgiList() const -{ - return m_EcgiList; -} -void PresenceInfoRm::setEcgiList(std::vector<Ecgi> const& value) -{ - m_EcgiList = value; - m_EcgiListIsSet = true; -} -bool PresenceInfoRm::ecgiListIsSet() const -{ - return m_EcgiListIsSet; -} -void PresenceInfoRm::unsetEcgiList() -{ - m_EcgiListIsSet = false; -} -std::vector<Ncgi> PresenceInfoRm::getNcgiList() const -{ - return m_NcgiList; -} -void PresenceInfoRm::setNcgiList(std::vector<Ncgi> const& value) -{ - m_NcgiList = value; - m_NcgiListIsSet = true; -} -bool PresenceInfoRm::ncgiListIsSet() const -{ - return m_NcgiListIsSet; + } + + if (globalRanNodeIdListIsSet()) { + const std::vector<GlobalRanNodeId>& value = m_GlobalRanNodeIdList; + const std::string currentValuePath = _pathPrefix + ".globalRanNodeIdList"; + + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const GlobalRanNodeId& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + + success = + value.validate(msg, currentValuePath + ".globalRanNodeIdList") && + success; + + i++; + } + } + } + + if (globaleNbIdListIsSet()) { + const std::vector<GlobalRanNodeId>& value = m_GlobaleNbIdList; + const std::string currentValuePath = _pathPrefix + ".globaleNbIdList"; + + 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 GlobalRanNodeId& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + + success = value.validate(msg, currentValuePath + ".globaleNbIdList") && + success; + + i++; + } + } + } + + return success; +} + +bool PresenceInfoRm::operator==(const PresenceInfoRm& rhs) const { + return + + ((!praIdIsSet() && !rhs.praIdIsSet()) || + (praIdIsSet() && rhs.praIdIsSet() && getPraId() == rhs.getPraId())) && + + ((!additionalPraIdIsSet() && !rhs.additionalPraIdIsSet()) || + (additionalPraIdIsSet() && rhs.additionalPraIdIsSet() && + getAdditionalPraId() == rhs.getAdditionalPraId())) && + + ((!presenceStateIsSet() && !rhs.presenceStateIsSet()) || + (presenceStateIsSet() && rhs.presenceStateIsSet() && + getPresenceState() == rhs.getPresenceState())) && + + ((!trackingAreaListIsSet() && !rhs.trackingAreaListIsSet()) || + (trackingAreaListIsSet() && rhs.trackingAreaListIsSet() && + getTrackingAreaList() == rhs.getTrackingAreaList())) && + + ((!ecgiListIsSet() && !rhs.ecgiListIsSet()) || + (ecgiListIsSet() && rhs.ecgiListIsSet() && + getEcgiList() == rhs.getEcgiList())) && + + ((!ncgiListIsSet() && !rhs.ncgiListIsSet()) || + (ncgiListIsSet() && rhs.ncgiListIsSet() && + getNcgiList() == rhs.getNcgiList())) && + + ((!globalRanNodeIdListIsSet() && !rhs.globalRanNodeIdListIsSet()) || + (globalRanNodeIdListIsSet() && rhs.globalRanNodeIdListIsSet() && + getGlobalRanNodeIdList() == rhs.getGlobalRanNodeIdList())) && + + ((!globaleNbIdListIsSet() && !rhs.globaleNbIdListIsSet()) || + (globaleNbIdListIsSet() && rhs.globaleNbIdListIsSet() && + getGlobaleNbIdList() == rhs.getGlobaleNbIdList())) + + ; } -void PresenceInfoRm::unsetNcgiList() -{ - m_NcgiListIsSet = false; -} -std::vector<GlobalRanNodeId> PresenceInfoRm::getGlobalRanNodeIdList() const -{ - return m_GlobalRanNodeIdList; -} -void PresenceInfoRm::setGlobalRanNodeIdList(std::vector<GlobalRanNodeId> const& value) -{ - m_GlobalRanNodeIdList = value; - m_GlobalRanNodeIdListIsSet = true; + +bool PresenceInfoRm::operator!=(const PresenceInfoRm& rhs) const { + return !(*this == rhs); } -bool PresenceInfoRm::globalRanNodeIdListIsSet() const -{ - return m_GlobalRanNodeIdListIsSet; + +void to_json(nlohmann::json& j, const PresenceInfoRm& o) { + j = nlohmann::json(); + if (o.praIdIsSet()) j["praId"] = o.m_PraId; + if (o.additionalPraIdIsSet()) j["additionalPraId"] = o.m_AdditionalPraId; + if (o.presenceStateIsSet()) j["presenceState"] = o.m_PresenceState; + if (o.trackingAreaListIsSet() || !o.m_TrackingAreaList.empty()) + j["trackingAreaList"] = o.m_TrackingAreaList; + if (o.ecgiListIsSet() || !o.m_EcgiList.empty()) j["ecgiList"] = o.m_EcgiList; + if (o.ncgiListIsSet() || !o.m_NcgiList.empty()) j["ncgiList"] = o.m_NcgiList; + if (o.globalRanNodeIdListIsSet() || !o.m_GlobalRanNodeIdList.empty()) + j["globalRanNodeIdList"] = o.m_GlobalRanNodeIdList; + if (o.globaleNbIdListIsSet() || !o.m_GlobaleNbIdList.empty()) + j["globaleNbIdList"] = o.m_GlobaleNbIdList; } -void PresenceInfoRm::unsetGlobalRanNodeIdList() -{ - m_GlobalRanNodeIdListIsSet = false; + +void from_json(const nlohmann::json& j, PresenceInfoRm& o) { + if (j.find("praId") != j.end()) { + j.at("praId").get_to(o.m_PraId); + o.m_PraIdIsSet = true; + } + if (j.find("additionalPraId") != j.end()) { + j.at("additionalPraId").get_to(o.m_AdditionalPraId); + o.m_AdditionalPraIdIsSet = true; + } + if (j.find("presenceState") != j.end()) { + j.at("presenceState").get_to(o.m_PresenceState); + o.m_PresenceStateIsSet = true; + } + if (j.find("trackingAreaList") != j.end()) { + j.at("trackingAreaList").get_to(o.m_TrackingAreaList); + o.m_TrackingAreaListIsSet = true; + } + if (j.find("ecgiList") != j.end()) { + j.at("ecgiList").get_to(o.m_EcgiList); + o.m_EcgiListIsSet = true; + } + if (j.find("ncgiList") != j.end()) { + j.at("ncgiList").get_to(o.m_NcgiList); + o.m_NcgiListIsSet = true; + } + if (j.find("globalRanNodeIdList") != j.end()) { + j.at("globalRanNodeIdList").get_to(o.m_GlobalRanNodeIdList); + o.m_GlobalRanNodeIdListIsSet = true; + } + if (j.find("globaleNbIdList") != j.end()) { + j.at("globaleNbIdList").get_to(o.m_GlobaleNbIdList); + o.m_GlobaleNbIdListIsSet = true; + } } -std::vector<GlobalRanNodeId> PresenceInfoRm::getGlobaleNbIdList() const -{ - return m_GlobaleNbIdList; + +std::string PresenceInfoRm::getPraId() const { + return m_PraId; } -void PresenceInfoRm::setGlobaleNbIdList(std::vector<GlobalRanNodeId> const& value) -{ - m_GlobaleNbIdList = value; - m_GlobaleNbIdListIsSet = true; +void PresenceInfoRm::setPraId(std::string const& value) { + m_PraId = value; + m_PraIdIsSet = true; } -bool PresenceInfoRm::globaleNbIdListIsSet() const -{ - return m_GlobaleNbIdListIsSet; +bool PresenceInfoRm::praIdIsSet() const { + return m_PraIdIsSet; } -void PresenceInfoRm::unsetGlobaleNbIdList() -{ - m_GlobaleNbIdListIsSet = false; +void PresenceInfoRm::unsetPraId() { + m_PraIdIsSet = false; +} +std::string PresenceInfoRm::getAdditionalPraId() const { + return m_AdditionalPraId; +} +void PresenceInfoRm::setAdditionalPraId(std::string const& value) { + m_AdditionalPraId = value; + m_AdditionalPraIdIsSet = true; +} +bool PresenceInfoRm::additionalPraIdIsSet() const { + return m_AdditionalPraIdIsSet; +} +void PresenceInfoRm::unsetAdditionalPraId() { + m_AdditionalPraIdIsSet = false; +} +PresenceState PresenceInfoRm::getPresenceState() const { + return m_PresenceState; +} +void PresenceInfoRm::setPresenceState(PresenceState const& value) { + m_PresenceState = value; + m_PresenceStateIsSet = true; +} +bool PresenceInfoRm::presenceStateIsSet() const { + return m_PresenceStateIsSet; +} +void PresenceInfoRm::unsetPresenceState() { + m_PresenceStateIsSet = false; +} +std::vector<Tai> PresenceInfoRm::getTrackingAreaList() const { + return m_TrackingAreaList; +} +void PresenceInfoRm::setTrackingAreaList(std::vector<Tai> const& value) { + m_TrackingAreaList = value; + m_TrackingAreaListIsSet = true; +} +bool PresenceInfoRm::trackingAreaListIsSet() const { + return m_TrackingAreaListIsSet; +} +void PresenceInfoRm::unsetTrackingAreaList() { + m_TrackingAreaListIsSet = false; +} +std::vector<Ecgi> PresenceInfoRm::getEcgiList() const { + return m_EcgiList; +} +void PresenceInfoRm::setEcgiList(std::vector<Ecgi> const& value) { + m_EcgiList = value; + m_EcgiListIsSet = true; +} +bool PresenceInfoRm::ecgiListIsSet() const { + return m_EcgiListIsSet; +} +void PresenceInfoRm::unsetEcgiList() { + m_EcgiListIsSet = false; +} +std::vector<Ncgi> PresenceInfoRm::getNcgiList() const { + return m_NcgiList; +} +void PresenceInfoRm::setNcgiList(std::vector<Ncgi> const& value) { + m_NcgiList = value; + m_NcgiListIsSet = true; +} +bool PresenceInfoRm::ncgiListIsSet() const { + return m_NcgiListIsSet; +} +void PresenceInfoRm::unsetNcgiList() { + m_NcgiListIsSet = false; +} +std::vector<GlobalRanNodeId> PresenceInfoRm::getGlobalRanNodeIdList() const { + return m_GlobalRanNodeIdList; +} +void PresenceInfoRm::setGlobalRanNodeIdList( + std::vector<GlobalRanNodeId> const& value) { + m_GlobalRanNodeIdList = value; + m_GlobalRanNodeIdListIsSet = true; +} +bool PresenceInfoRm::globalRanNodeIdListIsSet() const { + return m_GlobalRanNodeIdListIsSet; +} +void PresenceInfoRm::unsetGlobalRanNodeIdList() { + m_GlobalRanNodeIdListIsSet = false; +} +std::vector<GlobalRanNodeId> PresenceInfoRm::getGlobaleNbIdList() const { + return m_GlobaleNbIdList; +} +void PresenceInfoRm::setGlobaleNbIdList( + std::vector<GlobalRanNodeId> const& value) { + m_GlobaleNbIdList = value; + m_GlobaleNbIdListIsSet = true; +} +bool PresenceInfoRm::globaleNbIdListIsSet() const { + return m_GlobaleNbIdListIsSet; +} +void PresenceInfoRm::unsetGlobaleNbIdList() { + m_GlobaleNbIdListIsSet = false; } - } // namespace model } // namespace pcf diff --git a/src/api-server/model/PresenceInfoRm.h b/src/api-server/model/PresenceInfoRm.h index a8c7deb..1c95eb4 100755 --- a/src/api-server/model/PresenceInfoRm.h +++ b/src/api-server/model/PresenceInfoRm.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * PresenceInfoRm.h * - * + * */ #ifndef PresenceInfoRm_H_ #define PresenceInfoRm_H_ - #include "Ecgi.h" #include "Ncgi.h" #include "Tai.h" @@ -33,115 +33,114 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PresenceInfoRm -{ -public: - PresenceInfoRm(); - virtual ~PresenceInfoRm() = default; +class PresenceInfoRm { + public: + PresenceInfoRm(); + virtual ~PresenceInfoRm() = 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. 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> - /// 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; - /// <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 PresenceInfoRm& rhs) const; + bool operator!=(const PresenceInfoRm& rhs) const; - bool operator==(const PresenceInfoRm& rhs) const; - bool operator!=(const PresenceInfoRm& rhs) const; + ///////////////////////////////////////////// + /// PresenceInfoRm members - ///////////////////////////////////////////// - /// PresenceInfoRm members + /// <summary> + /// + /// </summary> + std::string getPraId() const; + void setPraId(std::string const& value); + bool praIdIsSet() const; + void unsetPraId(); + /// <summary> + /// + /// </summary> + std::string getAdditionalPraId() const; + void setAdditionalPraId(std::string const& value); + bool additionalPraIdIsSet() const; + void unsetAdditionalPraId(); + /// <summary> + /// + /// </summary> + PresenceState getPresenceState() const; + void setPresenceState(PresenceState const& value); + bool presenceStateIsSet() const; + void unsetPresenceState(); + /// <summary> + /// + /// </summary> + std::vector<Tai> getTrackingAreaList() const; + void setTrackingAreaList(std::vector<Tai> const& value); + bool trackingAreaListIsSet() const; + void unsetTrackingAreaList(); + /// <summary> + /// + /// </summary> + std::vector<Ecgi> getEcgiList() const; + void setEcgiList(std::vector<Ecgi> const& value); + bool ecgiListIsSet() const; + void unsetEcgiList(); + /// <summary> + /// + /// </summary> + std::vector<Ncgi> getNcgiList() const; + void setNcgiList(std::vector<Ncgi> const& value); + bool ncgiListIsSet() const; + void unsetNcgiList(); + /// <summary> + /// + /// </summary> + std::vector<GlobalRanNodeId> getGlobalRanNodeIdList() const; + void setGlobalRanNodeIdList(std::vector<GlobalRanNodeId> const& value); + bool globalRanNodeIdListIsSet() const; + void unsetGlobalRanNodeIdList(); + /// <summary> + /// + /// </summary> + std::vector<GlobalRanNodeId> getGlobaleNbIdList() const; + void setGlobaleNbIdList(std::vector<GlobalRanNodeId> const& value); + bool globaleNbIdListIsSet() const; + void unsetGlobaleNbIdList(); - /// <summary> - /// - /// </summary> - std::string getPraId() const; - void setPraId(std::string const& value); - bool praIdIsSet() const; - void unsetPraId(); - /// <summary> - /// - /// </summary> - std::string getAdditionalPraId() const; - void setAdditionalPraId(std::string const& value); - bool additionalPraIdIsSet() const; - void unsetAdditionalPraId(); - /// <summary> - /// - /// </summary> - PresenceState getPresenceState() const; - void setPresenceState(PresenceState const& value); - bool presenceStateIsSet() const; - void unsetPresenceState(); - /// <summary> - /// - /// </summary> - std::vector<Tai> getTrackingAreaList() const; - void setTrackingAreaList(std::vector<Tai> const& value); - bool trackingAreaListIsSet() const; - void unsetTrackingAreaList(); - /// <summary> - /// - /// </summary> - std::vector<Ecgi> getEcgiList() const; - void setEcgiList(std::vector<Ecgi> const& value); - bool ecgiListIsSet() const; - void unsetEcgiList(); - /// <summary> - /// - /// </summary> - std::vector<Ncgi> getNcgiList() const; - void setNcgiList(std::vector<Ncgi> const& value); - bool ncgiListIsSet() const; - void unsetNcgiList(); - /// <summary> - /// - /// </summary> - std::vector<GlobalRanNodeId> getGlobalRanNodeIdList() const; - void setGlobalRanNodeIdList(std::vector<GlobalRanNodeId> const& value); - bool globalRanNodeIdListIsSet() const; - void unsetGlobalRanNodeIdList(); - /// <summary> - /// - /// </summary> - std::vector<GlobalRanNodeId> getGlobaleNbIdList() const; - void setGlobaleNbIdList(std::vector<GlobalRanNodeId> const& value); - bool globaleNbIdListIsSet() const; - void unsetGlobaleNbIdList(); + friend void to_json(nlohmann::json& j, const PresenceInfoRm& o); + friend void from_json(const nlohmann::json& j, PresenceInfoRm& o); - friend void to_json(nlohmann::json& j, const PresenceInfoRm& o); - friend void from_json(const nlohmann::json& j, PresenceInfoRm& o); -protected: - std::string m_PraId; - bool m_PraIdIsSet; - std::string m_AdditionalPraId; - bool m_AdditionalPraIdIsSet; - PresenceState m_PresenceState; - bool m_PresenceStateIsSet; - std::vector<Tai> m_TrackingAreaList; - bool m_TrackingAreaListIsSet; - std::vector<Ecgi> m_EcgiList; - bool m_EcgiListIsSet; - std::vector<Ncgi> m_NcgiList; - bool m_NcgiListIsSet; - std::vector<GlobalRanNodeId> m_GlobalRanNodeIdList; - bool m_GlobalRanNodeIdListIsSet; - std::vector<GlobalRanNodeId> m_GlobaleNbIdList; - bool m_GlobaleNbIdListIsSet; - + protected: + std::string m_PraId; + bool m_PraIdIsSet; + std::string m_AdditionalPraId; + bool m_AdditionalPraIdIsSet; + PresenceState m_PresenceState; + bool m_PresenceStateIsSet; + std::vector<Tai> m_TrackingAreaList; + bool m_TrackingAreaListIsSet; + std::vector<Ecgi> m_EcgiList; + bool m_EcgiListIsSet; + std::vector<Ncgi> m_NcgiList; + bool m_NcgiListIsSet; + std::vector<GlobalRanNodeId> m_GlobalRanNodeIdList; + bool m_GlobalRanNodeIdListIsSet; + std::vector<GlobalRanNodeId> m_GlobaleNbIdList; + bool m_GlobaleNbIdListIsSet; }; } // namespace model diff --git a/src/api-server/model/PresenceState.cpp b/src/api-server/model/PresenceState.cpp old mode 100755 new mode 100644 index 1afd54e..22ab04b --- a/src/api-server/model/PresenceState.cpp +++ b/src/api-server/model/PresenceState.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "PresenceState.h" #include "Helpers.h" @@ -20,80 +20,66 @@ namespace oai { namespace pcf { namespace model { -PresenceState::PresenceState() -{ - -} +PresenceState::PresenceState() {} -void PresenceState::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void PresenceState::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool PresenceState::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool PresenceState::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool PresenceState::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "PresenceState" : pathPrefix; - - - if (!m_value.validate(msg)) - { - success = false; - } - return success; +bool PresenceState::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "PresenceState" : pathPrefix; + + if (!m_value.validate(msg)) { + success = false; + } + return success; } -bool PresenceState::operator==(const PresenceState& rhs) const -{ - return - - getValue() == rhs.getValue() - ; +bool PresenceState::operator==(const PresenceState& rhs) const { + return + + getValue() == rhs.getValue(); } -bool PresenceState::operator!=(const PresenceState& rhs) const -{ - return !(*this == rhs); +bool PresenceState::operator!=(const PresenceState& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const PresenceState& o) -{ - j = nlohmann::json(); - to_json(j, o.m_value); +void to_json(nlohmann::json& j, const PresenceState& o) { + j = nlohmann::json(); + to_json(j, o.m_value); } -void from_json(const nlohmann::json& j, PresenceState& o) -{ - from_json(j, o.m_value); +void from_json(const nlohmann::json& j, PresenceState& o) { + from_json(j, o.m_value); } -PresenceState_anyOf PresenceState::getValue() const -{ - return m_value; +PresenceState_anyOf PresenceState::getValue() const { + return m_value; } -void PresenceState::setValue(PresenceState_anyOf value) -{ - m_value = value; +void PresenceState::setValue(PresenceState_anyOf value) { + m_value = value; } -PresenceState_anyOf::ePresenceState_anyOf PresenceState::getEnumValue() const -{ - return m_value.getValue(); +PresenceState_anyOf::ePresenceState_anyOf PresenceState::getEnumValue() const { + return m_value.getValue(); } -void PresenceState::setEnumValue(PresenceState_anyOf::ePresenceState_anyOf value) -{ - m_value.setValue(value); +void PresenceState::setEnumValue( + PresenceState_anyOf::ePresenceState_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/PresenceState.h b/src/api-server/model/PresenceState.h old mode 100755 new mode 100644 index 80badd8..da12625 --- a/src/api-server/model/PresenceState.h +++ b/src/api-server/model/PresenceState.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * PresenceState.h * - * + * */ #ifndef PresenceState_H_ #define PresenceState_H_ - #include "PresenceState_anyOf.h" #include <nlohmann/json.hpp> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PresenceState -{ -public: - PresenceState(); - virtual ~PresenceState() = default; - +class PresenceState { + public: + PresenceState(); + virtual ~PresenceState() = 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. 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> + /// 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; + /// <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 PresenceState& rhs) const; - bool operator!=(const PresenceState& rhs) const; + bool operator==(const PresenceState& rhs) const; + bool operator!=(const PresenceState& rhs) const; - ///////////////////////////////////////////// - /// PresenceState members + ///////////////////////////////////////////// + /// PresenceState members + PresenceState_anyOf getValue() const; + void setValue(PresenceState_anyOf value); + PresenceState_anyOf::ePresenceState_anyOf getEnumValue() const; + void setEnumValue(PresenceState_anyOf::ePresenceState_anyOf value); + friend void to_json(nlohmann::json& j, const PresenceState& o); + friend void from_json(const nlohmann::json& j, PresenceState& o); + friend void to_json(nlohmann::json& j, const PresenceState_anyOf& o); + friend void from_json(const nlohmann::json& j, PresenceState_anyOf& o); - PresenceState_anyOf getValue() const; - void setValue(PresenceState_anyOf value); - PresenceState_anyOf::ePresenceState_anyOf getEnumValue() const; - void setEnumValue(PresenceState_anyOf::ePresenceState_anyOf value); - friend void to_json(nlohmann::json& j, const PresenceState& o); - friend void from_json(const nlohmann::json& j, PresenceState& o); - friend void to_json(nlohmann::json& j, const PresenceState_anyOf& o); - friend void from_json(const nlohmann::json& j, PresenceState_anyOf& o); -protected: - PresenceState_anyOf m_value; + protected: + PresenceState_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/PresenceState_anyOf.cpp b/src/api-server/model/PresenceState_anyOf.cpp index 0b74491..51254e2 100755 --- a/src/api-server/model/PresenceState_anyOf.cpp +++ b/src/api-server/model/PresenceState_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "PresenceState_anyOf.h" #include "Helpers.h" @@ -20,109 +20,94 @@ namespace oai { namespace pcf { namespace model { -PresenceState_anyOf::PresenceState_anyOf() -{ - -} +PresenceState_anyOf::PresenceState_anyOf() {} -void PresenceState_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void PresenceState_anyOf::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool PresenceState_anyOf::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool PresenceState_anyOf::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool PresenceState_anyOf::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "PresenceState_anyOf" : pathPrefix; +bool PresenceState_anyOf::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "PresenceState_anyOf" : pathPrefix; - - if (m_value == PresenceState_anyOf::ePresenceState_anyOf::INVALID_VALUE_OPENAPI_GENERATED) - { - success = false; - msg << _pathPrefix << ": has no value;"; - } + if (m_value == PresenceState_anyOf::ePresenceState_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + return success; } -bool PresenceState_anyOf::operator==(const PresenceState_anyOf& rhs) const -{ - return - getValue() == rhs.getValue() - - ; -} +bool PresenceState_anyOf::operator==(const PresenceState_anyOf& rhs) const { + return getValue() == rhs.getValue() -bool PresenceState_anyOf::operator!=(const PresenceState_anyOf& rhs) const -{ - return !(*this == rhs); + ; } -void to_json(nlohmann::json& j, const PresenceState_anyOf& o) -{ - j = nlohmann::json(); - - switch (o.getValue()) - { - case PresenceState_anyOf::ePresenceState_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case PresenceState_anyOf::ePresenceState_anyOf::IN_AREA: - j = "IN_AREA"; - break; - case PresenceState_anyOf::ePresenceState_anyOf::OUT_OF_AREA: - j = "OUT_OF_AREA"; - break; - case PresenceState_anyOf::ePresenceState_anyOf::UNKNOWN: - j = "UNKNOWN"; - break; - case PresenceState_anyOf::ePresenceState_anyOf::INACTIVE: - j = "INACTIVE"; - break; - } +bool PresenceState_anyOf::operator!=(const PresenceState_anyOf& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, PresenceState_anyOf& o) -{ - - auto s = j.get<std::string>(); - if (s == "IN_AREA") { - o.setValue(PresenceState_anyOf::ePresenceState_anyOf::IN_AREA); - } - else if (s == "OUT_OF_AREA") { - o.setValue(PresenceState_anyOf::ePresenceState_anyOf::OUT_OF_AREA); - } - else if (s == "UNKNOWN") { - o.setValue(PresenceState_anyOf::ePresenceState_anyOf::UNKNOWN); - } - else if (s == "INACTIVE") { - o.setValue(PresenceState_anyOf::ePresenceState_anyOf::INACTIVE); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " PresenceState_anyOf::ePresenceState_anyOf"; - throw std::invalid_argument(ss.str()); - } +void to_json(nlohmann::json& j, const PresenceState_anyOf& o) { + j = nlohmann::json(); + + switch (o.getValue()) { + case PresenceState_anyOf::ePresenceState_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED: + j = "INVALID_VALUE_OPENAPI_GENERATED"; + break; + case PresenceState_anyOf::ePresenceState_anyOf::IN_AREA: + j = "IN_AREA"; + break; + case PresenceState_anyOf::ePresenceState_anyOf::OUT_OF_AREA: + j = "OUT_OF_AREA"; + break; + case PresenceState_anyOf::ePresenceState_anyOf::UNKNOWN: + j = "UNKNOWN"; + break; + case PresenceState_anyOf::ePresenceState_anyOf::INACTIVE: + j = "INACTIVE"; + break; + } +} +void from_json(const nlohmann::json& j, PresenceState_anyOf& o) { + auto s = j.get<std::string>(); + if (s == "IN_AREA") { + o.setValue(PresenceState_anyOf::ePresenceState_anyOf::IN_AREA); + } else if (s == "OUT_OF_AREA") { + o.setValue(PresenceState_anyOf::ePresenceState_anyOf::OUT_OF_AREA); + } else if (s == "UNKNOWN") { + o.setValue(PresenceState_anyOf::ePresenceState_anyOf::UNKNOWN); + } else if (s == "INACTIVE") { + o.setValue(PresenceState_anyOf::ePresenceState_anyOf::INACTIVE); + } else { + std::stringstream ss; + ss << "Unexpected value " << s << " in json" + << " cannot be converted to enum of type" + << " PresenceState_anyOf::ePresenceState_anyOf"; + throw std::invalid_argument(ss.str()); + } } -PresenceState_anyOf::ePresenceState_anyOf PresenceState_anyOf::getValue() const -{ - return m_value; +PresenceState_anyOf::ePresenceState_anyOf PresenceState_anyOf::getValue() + const { + return m_value; } -void PresenceState_anyOf::setValue(PresenceState_anyOf::ePresenceState_anyOf value) -{ - m_value = value; +void PresenceState_anyOf::setValue( + PresenceState_anyOf::ePresenceState_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/PresenceState_anyOf.h b/src/api-server/model/PresenceState_anyOf.h index 06a9578..22ecddc 100755 --- a/src/api-server/model/PresenceState_anyOf.h +++ b/src/api-server/model/PresenceState_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * PresenceState_anyOf.h * - * + * */ #ifndef PresenceState_anyOf_H_ #define PresenceState_anyOf_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,55 +26,57 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class PresenceState_anyOf -{ -public: - PresenceState_anyOf(); - virtual ~PresenceState_anyOf() = default; +class PresenceState_anyOf { + public: + PresenceState_anyOf(); + virtual ~PresenceState_anyOf() = default; - enum class ePresenceState_anyOf { + enum class ePresenceState_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - IN_AREA, - OUT_OF_AREA, - UNKNOWN, + IN_AREA, + OUT_OF_AREA, + UNKNOWN, 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const PresenceState_anyOf& rhs) const; + bool operator!=(const PresenceState_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// PresenceState_anyOf members - bool operator==(const PresenceState_anyOf& rhs) const; - bool operator!=(const PresenceState_anyOf& rhs) const; + PresenceState_anyOf::ePresenceState_anyOf getValue() const; + void setValue(PresenceState_anyOf::ePresenceState_anyOf value); - ///////////////////////////////////////////// - /// PresenceState_anyOf members + friend void to_json(nlohmann::json& j, const PresenceState_anyOf& o); + friend void from_json(const nlohmann::json& j, PresenceState_anyOf& o); - PresenceState_anyOf::ePresenceState_anyOf getValue() const; - void setValue(PresenceState_anyOf::ePresenceState_anyOf value); - - friend void to_json(nlohmann::json& j, const PresenceState_anyOf& o); - friend void from_json(const nlohmann::json& j, PresenceState_anyOf& o); -protected: - PresenceState_anyOf::ePresenceState_anyOf m_value = PresenceState_anyOf::ePresenceState_anyOf::INVALID_VALUE_OPENAPI_GENERATED; + protected: + PresenceState_anyOf::ePresenceState_anyOf m_value = PresenceState_anyOf:: + ePresenceState_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/ProblemDetails.cpp b/src/api-server/model/ProblemDetails.cpp old mode 100755 new mode 100644 index 1423e4f..6f3416e --- a/src/api-server/model/ProblemDetails.cpp +++ b/src/api-server/model/ProblemDetails.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "ProblemDetails.h" #include "Helpers.h" @@ -20,410 +20,335 @@ namespace oai { namespace pcf { namespace model { -ProblemDetails::ProblemDetails() -{ - m_Type = ""; - m_TypeIsSet = false; - m_Title = ""; - m_TitleIsSet = false; - m_Status = 0; - m_StatusIsSet = false; - m_Detail = ""; - m_DetailIsSet = false; - m_Instance = ""; - m_InstanceIsSet = false; - m_Cause = ""; - m_CauseIsSet = false; - m_InvalidParamsIsSet = false; - m_SupportedFeatures = ""; - m_SupportedFeaturesIsSet = false; - m_AccessTokenErrorIsSet = false; - m_AccessTokenRequestIsSet = false; - m_NrfId = ""; - m_NrfIdIsSet = false; - +ProblemDetails::ProblemDetails() { + m_Type = ""; + m_TypeIsSet = false; + m_Title = ""; + m_TitleIsSet = false; + m_Status = 0; + m_StatusIsSet = false; + m_Detail = ""; + m_DetailIsSet = false; + m_Instance = ""; + m_InstanceIsSet = false; + m_Cause = ""; + m_CauseIsSet = false; + m_InvalidParamsIsSet = false; + m_SupportedFeatures = ""; + m_SupportedFeaturesIsSet = false; + m_AccessTokenErrorIsSet = false; + m_AccessTokenRequestIsSet = false; + m_NrfId = ""; + m_NrfIdIsSet = false; } -void ProblemDetails::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void ProblemDetails::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool ProblemDetails::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool ProblemDetails::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool ProblemDetails::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "ProblemDetails" : pathPrefix; +bool ProblemDetails::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "ProblemDetails" : pathPrefix; - - if (invalidParamsIsSet()) - { - const std::vector<InvalidParam>& value = m_InvalidParams; - const std::string currentValuePath = _pathPrefix + ".invalidParams"; - - - 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 InvalidParam& value : value) - { - const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; - - success = value.validate(msg, currentValuePath + ".invalidParams") && success; - - i++; - } - } + if (invalidParamsIsSet()) { + const std::vector<InvalidParam>& value = m_InvalidParams; + const std::string currentValuePath = _pathPrefix + ".invalidParams"; + if (value.size() < 1) { + success = false; + msg << currentValuePath << ": must have at least 1 elements;"; } - - if (supportedFeaturesIsSet()) - { - const std::string& value = m_SupportedFeatures; - const std::string currentValuePath = _pathPrefix + ".supportedFeatures"; - - + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const InvalidParam& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + success = + value.validate(msg, currentValuePath + ".invalidParams") && success; + + i++; + } } - - return success; -} + } -bool ProblemDetails::operator==(const ProblemDetails& rhs) const -{ - return - - - - ((!typeIsSet() && !rhs.typeIsSet()) || (typeIsSet() && rhs.typeIsSet() && getType() == rhs.getType())) && - - - ((!titleIsSet() && !rhs.titleIsSet()) || (titleIsSet() && rhs.titleIsSet() && getTitle() == rhs.getTitle())) && - - - ((!statusIsSet() && !rhs.statusIsSet()) || (statusIsSet() && rhs.statusIsSet() && getStatus() == rhs.getStatus())) && - - - ((!detailIsSet() && !rhs.detailIsSet()) || (detailIsSet() && rhs.detailIsSet() && getDetail() == rhs.getDetail())) && - - - ((!instanceIsSet() && !rhs.instanceIsSet()) || (instanceIsSet() && rhs.instanceIsSet() && getInstance() == rhs.getInstance())) && - - - ((!causeIsSet() && !rhs.causeIsSet()) || (causeIsSet() && rhs.causeIsSet() && getCause() == rhs.getCause())) && - - - ((!invalidParamsIsSet() && !rhs.invalidParamsIsSet()) || (invalidParamsIsSet() && rhs.invalidParamsIsSet() && getInvalidParams() == rhs.getInvalidParams())) && - - - ((!supportedFeaturesIsSet() && !rhs.supportedFeaturesIsSet()) || (supportedFeaturesIsSet() && rhs.supportedFeaturesIsSet() && getSupportedFeatures() == rhs.getSupportedFeatures())) && - - - ((!accessTokenErrorIsSet() && !rhs.accessTokenErrorIsSet()) || (accessTokenErrorIsSet() && rhs.accessTokenErrorIsSet() && getAccessTokenError() == rhs.getAccessTokenError())) && - - - ((!accessTokenRequestIsSet() && !rhs.accessTokenRequestIsSet()) || (accessTokenRequestIsSet() && rhs.accessTokenRequestIsSet() && getAccessTokenRequest() == rhs.getAccessTokenRequest())) && - - - ((!nrfIdIsSet() && !rhs.nrfIdIsSet()) || (nrfIdIsSet() && rhs.nrfIdIsSet() && getNrfId() == rhs.getNrfId())) - - ; + if (supportedFeaturesIsSet()) { + const std::string& value = m_SupportedFeatures; + const std::string currentValuePath = _pathPrefix + ".supportedFeatures"; + } + + return success; } -bool ProblemDetails::operator!=(const ProblemDetails& rhs) const -{ - return !(*this == rhs); +bool ProblemDetails::operator==(const ProblemDetails& rhs) const { + return + + ((!typeIsSet() && !rhs.typeIsSet()) || + (typeIsSet() && rhs.typeIsSet() && getType() == rhs.getType())) && + + ((!titleIsSet() && !rhs.titleIsSet()) || + (titleIsSet() && rhs.titleIsSet() && getTitle() == rhs.getTitle())) && + + ((!statusIsSet() && !rhs.statusIsSet()) || + (statusIsSet() && rhs.statusIsSet() && + getStatus() == rhs.getStatus())) && + + ((!detailIsSet() && !rhs.detailIsSet()) || + (detailIsSet() && rhs.detailIsSet() && + getDetail() == rhs.getDetail())) && + + ((!instanceIsSet() && !rhs.instanceIsSet()) || + (instanceIsSet() && rhs.instanceIsSet() && + getInstance() == rhs.getInstance())) && + + ((!causeIsSet() && !rhs.causeIsSet()) || + (causeIsSet() && rhs.causeIsSet() && getCause() == rhs.getCause())) && + + ((!invalidParamsIsSet() && !rhs.invalidParamsIsSet()) || + (invalidParamsIsSet() && rhs.invalidParamsIsSet() && + getInvalidParams() == rhs.getInvalidParams())) && + + ((!supportedFeaturesIsSet() && !rhs.supportedFeaturesIsSet()) || + (supportedFeaturesIsSet() && rhs.supportedFeaturesIsSet() && + getSupportedFeatures() == rhs.getSupportedFeatures())) && + + ((!accessTokenErrorIsSet() && !rhs.accessTokenErrorIsSet()) || + (accessTokenErrorIsSet() && rhs.accessTokenErrorIsSet() && + getAccessTokenError() == rhs.getAccessTokenError())) && + + ((!accessTokenRequestIsSet() && !rhs.accessTokenRequestIsSet()) || + (accessTokenRequestIsSet() && rhs.accessTokenRequestIsSet() && + getAccessTokenRequest() == rhs.getAccessTokenRequest())) && + + ((!nrfIdIsSet() && !rhs.nrfIdIsSet()) || + (nrfIdIsSet() && rhs.nrfIdIsSet() && getNrfId() == rhs.getNrfId())) + + ; } -void to_json(nlohmann::json& j, const ProblemDetails& o) -{ - j = nlohmann::json(); - if(o.typeIsSet()) - j["type"] = o.m_Type; - if(o.titleIsSet()) - j["title"] = o.m_Title; - if(o.statusIsSet()) - j["status"] = o.m_Status; - if(o.detailIsSet()) - j["detail"] = o.m_Detail; - if(o.instanceIsSet()) - j["instance"] = o.m_Instance; - if(o.causeIsSet()) - j["cause"] = o.m_Cause; - if(o.invalidParamsIsSet() || !o.m_InvalidParams.empty()) - j["invalidParams"] = o.m_InvalidParams; - if(o.supportedFeaturesIsSet()) - j["supportedFeatures"] = o.m_SupportedFeatures; - if(o.accessTokenErrorIsSet()) - j["accessTokenError"] = o.m_AccessTokenError; - if(o.accessTokenRequestIsSet()) - j["accessTokenRequest"] = o.m_AccessTokenRequest; - if(o.nrfIdIsSet()) - j["nrfId"] = o.m_NrfId; - +bool ProblemDetails::operator!=(const ProblemDetails& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, ProblemDetails& o) -{ - if(j.find("type") != j.end()) - { - j.at("type").get_to(o.m_Type); - o.m_TypeIsSet = true; - } - if(j.find("title") != j.end()) - { - j.at("title").get_to(o.m_Title); - o.m_TitleIsSet = true; - } - if(j.find("status") != j.end()) - { - j.at("status").get_to(o.m_Status); - o.m_StatusIsSet = true; - } - if(j.find("detail") != j.end()) - { - j.at("detail").get_to(o.m_Detail); - o.m_DetailIsSet = true; - } - if(j.find("instance") != j.end()) - { - j.at("instance").get_to(o.m_Instance); - o.m_InstanceIsSet = true; - } - if(j.find("cause") != j.end()) - { - j.at("cause").get_to(o.m_Cause); - o.m_CauseIsSet = true; - } - if(j.find("invalidParams") != j.end()) - { - j.at("invalidParams").get_to(o.m_InvalidParams); - o.m_InvalidParamsIsSet = true; - } - if(j.find("supportedFeatures") != j.end()) - { - j.at("supportedFeatures").get_to(o.m_SupportedFeatures); - o.m_SupportedFeaturesIsSet = true; - } - if(j.find("accessTokenError") != j.end()) - { - j.at("accessTokenError").get_to(o.m_AccessTokenError); - o.m_AccessTokenErrorIsSet = true; - } - if(j.find("accessTokenRequest") != j.end()) - { - j.at("accessTokenRequest").get_to(o.m_AccessTokenRequest); - o.m_AccessTokenRequestIsSet = true; - } - if(j.find("nrfId") != j.end()) - { - j.at("nrfId").get_to(o.m_NrfId); - o.m_NrfIdIsSet = true; - } - +void to_json(nlohmann::json& j, const ProblemDetails& o) { + j = nlohmann::json(); + if (o.typeIsSet()) j["type"] = o.m_Type; + if (o.titleIsSet()) j["title"] = o.m_Title; + if (o.statusIsSet()) j["status"] = o.m_Status; + if (o.detailIsSet()) j["detail"] = o.m_Detail; + if (o.instanceIsSet()) j["instance"] = o.m_Instance; + if (o.causeIsSet()) j["cause"] = o.m_Cause; + if (o.invalidParamsIsSet() || !o.m_InvalidParams.empty()) + j["invalidParams"] = o.m_InvalidParams; + if (o.supportedFeaturesIsSet()) + j["supportedFeatures"] = o.m_SupportedFeatures; + if (o.accessTokenErrorIsSet()) j["accessTokenError"] = o.m_AccessTokenError; + if (o.accessTokenRequestIsSet()) + j["accessTokenRequest"] = o.m_AccessTokenRequest; + if (o.nrfIdIsSet()) j["nrfId"] = o.m_NrfId; } -std::string ProblemDetails::getType() const -{ - return m_Type; -} -void ProblemDetails::setType(std::string const& value) -{ - m_Type = value; - m_TypeIsSet = true; -} -bool ProblemDetails::typeIsSet() const -{ - return m_TypeIsSet; -} -void ProblemDetails::unsetType() -{ - m_TypeIsSet = false; -} -std::string ProblemDetails::getTitle() const -{ - return m_Title; -} -void ProblemDetails::setTitle(std::string const& value) -{ - m_Title = value; - m_TitleIsSet = true; -} -bool ProblemDetails::titleIsSet() const -{ - return m_TitleIsSet; -} -void ProblemDetails::unsetTitle() -{ - m_TitleIsSet = false; -} -int32_t ProblemDetails::getStatus() const -{ - return m_Status; -} -void ProblemDetails::setStatus(int32_t const value) -{ - m_Status = value; - m_StatusIsSet = true; -} -bool ProblemDetails::statusIsSet() const -{ - return m_StatusIsSet; -} -void ProblemDetails::unsetStatus() -{ - m_StatusIsSet = false; -} -std::string ProblemDetails::getDetail() const -{ - return m_Detail; -} -void ProblemDetails::setDetail(std::string const& value) -{ - m_Detail = value; - m_DetailIsSet = true; -} -bool ProblemDetails::detailIsSet() const -{ - return m_DetailIsSet; -} -void ProblemDetails::unsetDetail() -{ - m_DetailIsSet = false; -} -std::string ProblemDetails::getInstance() const -{ - return m_Instance; -} -void ProblemDetails::setInstance(std::string const& value) -{ - m_Instance = value; - m_InstanceIsSet = true; -} -bool ProblemDetails::instanceIsSet() const -{ - return m_InstanceIsSet; -} -void ProblemDetails::unsetInstance() -{ - m_InstanceIsSet = false; -} -std::string ProblemDetails::getCause() const -{ - return m_Cause; -} -void ProblemDetails::setCause(std::string const& value) -{ - m_Cause = value; - m_CauseIsSet = true; -} -bool ProblemDetails::causeIsSet() const -{ - return m_CauseIsSet; -} -void ProblemDetails::unsetCause() -{ - m_CauseIsSet = false; -} -std::vector<InvalidParam> ProblemDetails::getInvalidParams() const -{ - return m_InvalidParams; -} -void ProblemDetails::setInvalidParams(std::vector<InvalidParam> const& value) -{ - m_InvalidParams = value; - m_InvalidParamsIsSet = true; -} -bool ProblemDetails::invalidParamsIsSet() const -{ - return m_InvalidParamsIsSet; -} -void ProblemDetails::unsetInvalidParams() -{ - m_InvalidParamsIsSet = false; -} -std::string ProblemDetails::getSupportedFeatures() const -{ - return m_SupportedFeatures; -} -void ProblemDetails::setSupportedFeatures(std::string const& value) -{ - m_SupportedFeatures = value; - m_SupportedFeaturesIsSet = true; -} -bool ProblemDetails::supportedFeaturesIsSet() const -{ - return m_SupportedFeaturesIsSet; -} -void ProblemDetails::unsetSupportedFeatures() -{ - m_SupportedFeaturesIsSet = false; -} -AccessTokenErr ProblemDetails::getAccessTokenError() const -{ - return m_AccessTokenError; -} -void ProblemDetails::setAccessTokenError(AccessTokenErr const& value) -{ - m_AccessTokenError = value; - m_AccessTokenErrorIsSet = true; -} -bool ProblemDetails::accessTokenErrorIsSet() const -{ - return m_AccessTokenErrorIsSet; -} -void ProblemDetails::unsetAccessTokenError() -{ - m_AccessTokenErrorIsSet = false; -} -AccessTokenReq ProblemDetails::getAccessTokenRequest() const -{ - return m_AccessTokenRequest; -} -void ProblemDetails::setAccessTokenRequest(AccessTokenReq const& value) -{ - m_AccessTokenRequest = value; - m_AccessTokenRequestIsSet = true; -} -bool ProblemDetails::accessTokenRequestIsSet() const -{ - return m_AccessTokenRequestIsSet; -} -void ProblemDetails::unsetAccessTokenRequest() -{ - m_AccessTokenRequestIsSet = false; -} -std::string ProblemDetails::getNrfId() const -{ - return m_NrfId; -} -void ProblemDetails::setNrfId(std::string const& value) -{ - m_NrfId = value; - m_NrfIdIsSet = true; -} -bool ProblemDetails::nrfIdIsSet() const -{ - return m_NrfIdIsSet; -} -void ProblemDetails::unsetNrfId() -{ - m_NrfIdIsSet = false; +void from_json(const nlohmann::json& j, ProblemDetails& o) { + if (j.find("type") != j.end()) { + j.at("type").get_to(o.m_Type); + o.m_TypeIsSet = true; + } + if (j.find("title") != j.end()) { + j.at("title").get_to(o.m_Title); + o.m_TitleIsSet = true; + } + if (j.find("status") != j.end()) { + j.at("status").get_to(o.m_Status); + o.m_StatusIsSet = true; + } + if (j.find("detail") != j.end()) { + j.at("detail").get_to(o.m_Detail); + o.m_DetailIsSet = true; + } + if (j.find("instance") != j.end()) { + j.at("instance").get_to(o.m_Instance); + o.m_InstanceIsSet = true; + } + if (j.find("cause") != j.end()) { + j.at("cause").get_to(o.m_Cause); + o.m_CauseIsSet = true; + } + if (j.find("invalidParams") != j.end()) { + j.at("invalidParams").get_to(o.m_InvalidParams); + o.m_InvalidParamsIsSet = true; + } + if (j.find("supportedFeatures") != j.end()) { + j.at("supportedFeatures").get_to(o.m_SupportedFeatures); + o.m_SupportedFeaturesIsSet = true; + } + if (j.find("accessTokenError") != j.end()) { + j.at("accessTokenError").get_to(o.m_AccessTokenError); + o.m_AccessTokenErrorIsSet = true; + } + if (j.find("accessTokenRequest") != j.end()) { + j.at("accessTokenRequest").get_to(o.m_AccessTokenRequest); + o.m_AccessTokenRequestIsSet = true; + } + if (j.find("nrfId") != j.end()) { + j.at("nrfId").get_to(o.m_NrfId); + o.m_NrfIdIsSet = true; + } } +std::string ProblemDetails::getType() const { + return m_Type; +} +void ProblemDetails::setType(std::string const& value) { + m_Type = value; + m_TypeIsSet = true; +} +bool ProblemDetails::typeIsSet() const { + return m_TypeIsSet; +} +void ProblemDetails::unsetType() { + m_TypeIsSet = false; +} +std::string ProblemDetails::getTitle() const { + return m_Title; +} +void ProblemDetails::setTitle(std::string const& value) { + m_Title = value; + m_TitleIsSet = true; +} +bool ProblemDetails::titleIsSet() const { + return m_TitleIsSet; +} +void ProblemDetails::unsetTitle() { + m_TitleIsSet = false; +} +int32_t ProblemDetails::getStatus() const { + return m_Status; +} +void ProblemDetails::setStatus(int32_t const value) { + m_Status = value; + m_StatusIsSet = true; +} +bool ProblemDetails::statusIsSet() const { + return m_StatusIsSet; +} +void ProblemDetails::unsetStatus() { + m_StatusIsSet = false; +} +std::string ProblemDetails::getDetail() const { + return m_Detail; +} +void ProblemDetails::setDetail(std::string const& value) { + m_Detail = value; + m_DetailIsSet = true; +} +bool ProblemDetails::detailIsSet() const { + return m_DetailIsSet; +} +void ProblemDetails::unsetDetail() { + m_DetailIsSet = false; +} +std::string ProblemDetails::getInstance() const { + return m_Instance; +} +void ProblemDetails::setInstance(std::string const& value) { + m_Instance = value; + m_InstanceIsSet = true; +} +bool ProblemDetails::instanceIsSet() const { + return m_InstanceIsSet; +} +void ProblemDetails::unsetInstance() { + m_InstanceIsSet = false; +} +std::string ProblemDetails::getCause() const { + return m_Cause; +} +void ProblemDetails::setCause(std::string const& value) { + m_Cause = value; + m_CauseIsSet = true; +} +bool ProblemDetails::causeIsSet() const { + return m_CauseIsSet; +} +void ProblemDetails::unsetCause() { + m_CauseIsSet = false; +} +std::vector<InvalidParam> ProblemDetails::getInvalidParams() const { + return m_InvalidParams; +} +void ProblemDetails::setInvalidParams(std::vector<InvalidParam> const& value) { + m_InvalidParams = value; + m_InvalidParamsIsSet = true; +} +bool ProblemDetails::invalidParamsIsSet() const { + return m_InvalidParamsIsSet; +} +void ProblemDetails::unsetInvalidParams() { + m_InvalidParamsIsSet = false; +} +std::string ProblemDetails::getSupportedFeatures() const { + return m_SupportedFeatures; +} +void ProblemDetails::setSupportedFeatures(std::string const& value) { + m_SupportedFeatures = value; + m_SupportedFeaturesIsSet = true; +} +bool ProblemDetails::supportedFeaturesIsSet() const { + return m_SupportedFeaturesIsSet; +} +void ProblemDetails::unsetSupportedFeatures() { + m_SupportedFeaturesIsSet = false; +} +AccessTokenErr ProblemDetails::getAccessTokenError() const { + return m_AccessTokenError; +} +void ProblemDetails::setAccessTokenError(AccessTokenErr const& value) { + m_AccessTokenError = value; + m_AccessTokenErrorIsSet = true; +} +bool ProblemDetails::accessTokenErrorIsSet() const { + return m_AccessTokenErrorIsSet; +} +void ProblemDetails::unsetAccessTokenError() { + m_AccessTokenErrorIsSet = false; +} +AccessTokenReq ProblemDetails::getAccessTokenRequest() const { + return m_AccessTokenRequest; +} +void ProblemDetails::setAccessTokenRequest(AccessTokenReq const& value) { + m_AccessTokenRequest = value; + m_AccessTokenRequestIsSet = true; +} +bool ProblemDetails::accessTokenRequestIsSet() const { + return m_AccessTokenRequestIsSet; +} +void ProblemDetails::unsetAccessTokenRequest() { + m_AccessTokenRequestIsSet = false; +} +std::string ProblemDetails::getNrfId() const { + return m_NrfId; +} +void ProblemDetails::setNrfId(std::string const& value) { + m_NrfId = value; + m_NrfIdIsSet = true; +} +bool ProblemDetails::nrfIdIsSet() const { + return m_NrfIdIsSet; +} +void ProblemDetails::unsetNrfId() { + m_NrfIdIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/ProblemDetails.h b/src/api-server/model/ProblemDetails.h old mode 100755 new mode 100644 index 6ed331c..f050704 --- a/src/api-server/model/ProblemDetails.h +++ b/src/api-server/model/ProblemDetails.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * ProblemDetails.h * - * + * */ #ifndef ProblemDetails_H_ #define ProblemDetails_H_ - #include <string> #include "InvalidParam.h" #include "AccessTokenErr.h" @@ -31,142 +31,141 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class ProblemDetails -{ -public: - ProblemDetails(); - virtual ~ProblemDetails() = default; +class ProblemDetails { + public: + ProblemDetails(); + virtual ~ProblemDetails() = 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. 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> - /// 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; - /// <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 ProblemDetails& rhs) const; + bool operator!=(const ProblemDetails& rhs) const; - bool operator==(const ProblemDetails& rhs) const; - bool operator!=(const ProblemDetails& rhs) const; + ///////////////////////////////////////////// + /// ProblemDetails members - ///////////////////////////////////////////// - /// ProblemDetails members + /// <summary> + /// + /// </summary> + std::string getType() const; + void setType(std::string const& value); + bool typeIsSet() const; + void unsetType(); + /// <summary> + /// + /// </summary> + std::string getTitle() const; + void setTitle(std::string const& value); + bool titleIsSet() const; + void unsetTitle(); + /// <summary> + /// + /// </summary> + int32_t getStatus() const; + void setStatus(int32_t const value); + bool statusIsSet() const; + void unsetStatus(); + /// <summary> + /// + /// </summary> + std::string getDetail() const; + void setDetail(std::string const& value); + bool detailIsSet() const; + void unsetDetail(); + /// <summary> + /// + /// </summary> + std::string getInstance() const; + void setInstance(std::string const& value); + bool instanceIsSet() const; + void unsetInstance(); + /// <summary> + /// + /// </summary> + std::string getCause() const; + void setCause(std::string const& value); + bool causeIsSet() const; + void unsetCause(); + /// <summary> + /// + /// </summary> + std::vector<InvalidParam> getInvalidParams() const; + void setInvalidParams(std::vector<InvalidParam> const& value); + bool invalidParamsIsSet() const; + void unsetInvalidParams(); + /// <summary> + /// + /// </summary> + std::string getSupportedFeatures() const; + void setSupportedFeatures(std::string const& value); + bool supportedFeaturesIsSet() const; + void unsetSupportedFeatures(); + /// <summary> + /// + /// </summary> + AccessTokenErr getAccessTokenError() const; + void setAccessTokenError(AccessTokenErr const& value); + bool accessTokenErrorIsSet() const; + void unsetAccessTokenError(); + /// <summary> + /// + /// </summary> + AccessTokenReq getAccessTokenRequest() const; + void setAccessTokenRequest(AccessTokenReq const& value); + bool accessTokenRequestIsSet() const; + void unsetAccessTokenRequest(); + /// <summary> + /// + /// </summary> + std::string getNrfId() const; + void setNrfId(std::string const& value); + bool nrfIdIsSet() const; + void unsetNrfId(); - /// <summary> - /// - /// </summary> - std::string getType() const; - void setType(std::string const& value); - bool typeIsSet() const; - void unsetType(); - /// <summary> - /// - /// </summary> - std::string getTitle() const; - void setTitle(std::string const& value); - bool titleIsSet() const; - void unsetTitle(); - /// <summary> - /// - /// </summary> - int32_t getStatus() const; - void setStatus(int32_t const value); - bool statusIsSet() const; - void unsetStatus(); - /// <summary> - /// - /// </summary> - std::string getDetail() const; - void setDetail(std::string const& value); - bool detailIsSet() const; - void unsetDetail(); - /// <summary> - /// - /// </summary> - std::string getInstance() const; - void setInstance(std::string const& value); - bool instanceIsSet() const; - void unsetInstance(); - /// <summary> - /// - /// </summary> - std::string getCause() const; - void setCause(std::string const& value); - bool causeIsSet() const; - void unsetCause(); - /// <summary> - /// - /// </summary> - std::vector<InvalidParam> getInvalidParams() const; - void setInvalidParams(std::vector<InvalidParam> const& value); - bool invalidParamsIsSet() const; - void unsetInvalidParams(); - /// <summary> - /// - /// </summary> - std::string getSupportedFeatures() const; - void setSupportedFeatures(std::string const& value); - bool supportedFeaturesIsSet() const; - void unsetSupportedFeatures(); - /// <summary> - /// - /// </summary> - AccessTokenErr getAccessTokenError() const; - void setAccessTokenError(AccessTokenErr const& value); - bool accessTokenErrorIsSet() const; - void unsetAccessTokenError(); - /// <summary> - /// - /// </summary> - AccessTokenReq getAccessTokenRequest() const; - void setAccessTokenRequest(AccessTokenReq const& value); - bool accessTokenRequestIsSet() const; - void unsetAccessTokenRequest(); - /// <summary> - /// - /// </summary> - std::string getNrfId() const; - void setNrfId(std::string const& value); - bool nrfIdIsSet() const; - void unsetNrfId(); + friend void to_json(nlohmann::json& j, const ProblemDetails& o); + friend void from_json(const nlohmann::json& j, ProblemDetails& o); - friend void to_json(nlohmann::json& j, const ProblemDetails& o); - friend void from_json(const nlohmann::json& j, ProblemDetails& o); -protected: - std::string m_Type; - bool m_TypeIsSet; - std::string m_Title; - bool m_TitleIsSet; - int32_t m_Status; - bool m_StatusIsSet; - std::string m_Detail; - bool m_DetailIsSet; - std::string m_Instance; - bool m_InstanceIsSet; - std::string m_Cause; - bool m_CauseIsSet; - std::vector<InvalidParam> m_InvalidParams; - bool m_InvalidParamsIsSet; - std::string m_SupportedFeatures; - bool m_SupportedFeaturesIsSet; - AccessTokenErr m_AccessTokenError; - bool m_AccessTokenErrorIsSet; - AccessTokenReq m_AccessTokenRequest; - bool m_AccessTokenRequestIsSet; - std::string m_NrfId; - bool m_NrfIdIsSet; - + protected: + std::string m_Type; + bool m_TypeIsSet; + std::string m_Title; + bool m_TitleIsSet; + int32_t m_Status; + bool m_StatusIsSet; + std::string m_Detail; + bool m_DetailIsSet; + std::string m_Instance; + bool m_InstanceIsSet; + std::string m_Cause; + bool m_CauseIsSet; + std::vector<InvalidParam> m_InvalidParams; + bool m_InvalidParamsIsSet; + std::string m_SupportedFeatures; + bool m_SupportedFeaturesIsSet; + AccessTokenErr m_AccessTokenError; + bool m_AccessTokenErrorIsSet; + AccessTokenReq m_AccessTokenRequest; + bool m_AccessTokenRequestIsSet; + std::string m_NrfId; + bool m_NrfIdIsSet; }; } // namespace model diff --git a/src/api-server/model/QosCharacteristics.cpp b/src/api-server/model/QosCharacteristics.cpp old mode 100755 new mode 100644 index 47ab379..2e5b632 --- a/src/api-server/model/QosCharacteristics.cpp +++ b/src/api-server/model/QosCharacteristics.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,334 +20,260 @@ namespace oai { namespace pcf { namespace model { -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; - +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()); - } +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 { + 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;"; - } +bool QosCharacteristics::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "QosCharacteristics" : pathPrefix; - } - - - /* 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;"; - } + /* 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;"; } - - - /* 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;"; - } + } + /* 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;"; } - - - /* PacketErrorRate */ { - const std::string& value = m_PacketErrorRate; - const std::string currentValuePath = _pathPrefix + ".packetErrorRate"; - - + } + + /* 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;"; } - - 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;"; - } + } + /* 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 (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;"; - } + } + + 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;"; } - - return success; + 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 + + (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); +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 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; - } - +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; +int32_t QosCharacteristics::getR5qi() const { + return m_r_5qi; } -void QosCharacteristics::setR5qi(int32_t const value) -{ - m_r_5qi = value; +void QosCharacteristics::setR5qi(int32_t const value) { + m_r_5qi = value; } -QosResourceType QosCharacteristics::getResourceType() const -{ - return m_ResourceType; +QosResourceType QosCharacteristics::getResourceType() const { + return m_ResourceType; } -void QosCharacteristics::setResourceType(QosResourceType const& value) -{ - m_ResourceType = value; +void QosCharacteristics::setResourceType(QosResourceType const& value) { + m_ResourceType = value; } -int32_t QosCharacteristics::getPriorityLevel() const -{ - return m_PriorityLevel; +int32_t QosCharacteristics::getPriorityLevel() const { + return m_PriorityLevel; } -void QosCharacteristics::setPriorityLevel(int32_t const value) -{ - m_PriorityLevel = value; +void QosCharacteristics::setPriorityLevel(int32_t const value) { + m_PriorityLevel = value; } -int32_t QosCharacteristics::getPacketDelayBudget() const -{ - return m_PacketDelayBudget; +int32_t QosCharacteristics::getPacketDelayBudget() const { + return m_PacketDelayBudget; } -void QosCharacteristics::setPacketDelayBudget(int32_t const value) -{ - m_PacketDelayBudget = value; +void QosCharacteristics::setPacketDelayBudget(int32_t const value) { + m_PacketDelayBudget = value; } -std::string QosCharacteristics::getPacketErrorRate() const -{ - return m_PacketErrorRate; +std::string QosCharacteristics::getPacketErrorRate() const { + return m_PacketErrorRate; } -void QosCharacteristics::setPacketErrorRate(std::string const& value) -{ - m_PacketErrorRate = value; +void QosCharacteristics::setPacketErrorRate(std::string const& value) { + m_PacketErrorRate = value; } -int32_t QosCharacteristics::getAveragingWindow() const -{ - return m_AveragingWindow; +int32_t QosCharacteristics::getAveragingWindow() const { + return m_AveragingWindow; } -void QosCharacteristics::setAveragingWindow(int32_t const value) -{ - m_AveragingWindow = value; - m_AveragingWindowIsSet = true; +void QosCharacteristics::setAveragingWindow(int32_t const value) { + m_AveragingWindow = value; + m_AveragingWindowIsSet = true; } -bool QosCharacteristics::averagingWindowIsSet() const -{ - return m_AveragingWindowIsSet; +bool QosCharacteristics::averagingWindowIsSet() const { + return m_AveragingWindowIsSet; } -void QosCharacteristics::unsetAveragingWindow() -{ - m_AveragingWindowIsSet = false; +void QosCharacteristics::unsetAveragingWindow() { + m_AveragingWindowIsSet = false; } -int32_t QosCharacteristics::getMaxDataBurstVol() const -{ - return m_MaxDataBurstVol; +int32_t QosCharacteristics::getMaxDataBurstVol() const { + return m_MaxDataBurstVol; } -void QosCharacteristics::setMaxDataBurstVol(int32_t const value) -{ - m_MaxDataBurstVol = value; - m_MaxDataBurstVolIsSet = true; +void QosCharacteristics::setMaxDataBurstVol(int32_t const value) { + m_MaxDataBurstVol = value; + m_MaxDataBurstVolIsSet = true; } -bool QosCharacteristics::maxDataBurstVolIsSet() const -{ - return m_MaxDataBurstVolIsSet; +bool QosCharacteristics::maxDataBurstVolIsSet() const { + return m_MaxDataBurstVolIsSet; } -void QosCharacteristics::unsetMaxDataBurstVol() -{ - m_MaxDataBurstVolIsSet = false; +void QosCharacteristics::unsetMaxDataBurstVol() { + m_MaxDataBurstVolIsSet = false; } -int32_t QosCharacteristics::getExtMaxDataBurstVol() const -{ - return m_ExtMaxDataBurstVol; +int32_t QosCharacteristics::getExtMaxDataBurstVol() const { + return m_ExtMaxDataBurstVol; } -void QosCharacteristics::setExtMaxDataBurstVol(int32_t const value) -{ - m_ExtMaxDataBurstVol = value; - m_ExtMaxDataBurstVolIsSet = true; +void QosCharacteristics::setExtMaxDataBurstVol(int32_t const value) { + m_ExtMaxDataBurstVol = value; + m_ExtMaxDataBurstVolIsSet = true; } -bool QosCharacteristics::extMaxDataBurstVolIsSet() const -{ - return m_ExtMaxDataBurstVolIsSet; +bool QosCharacteristics::extMaxDataBurstVolIsSet() const { + return m_ExtMaxDataBurstVolIsSet; } -void QosCharacteristics::unsetExtMaxDataBurstVol() -{ - m_ExtMaxDataBurstVolIsSet = false; +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 old mode 100755 new mode 100644 index 9f0ad51..8e63a54 --- a/src/api-server/model/QosCharacteristics.h +++ b/src/api-server/model/QosCharacteristics.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,105 +28,104 @@ 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> - QosResourceType getResourceType() const; - void setResourceType(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; - - 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; - +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> + QosResourceType getResourceType() const; + void setResourceType(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; + + 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 diff --git a/src/api-server/model/QosData.cpp b/src/api-server/model/QosData.cpp old mode 100755 new mode 100644 index 0f87ce6..3fe493b --- a/src/api-server/model/QosData.cpp +++ b/src/api-server/model/QosData.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,734 +20,581 @@ namespace oai { namespace pcf { namespace model { -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 org::openapitools::server::helpers::ValidationException(msg.str()); - } +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; } -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;"; - } +void QosData::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} - } - - if (maxbrUlIsSet()) - { - const std::string& value = m_MaxbrUl; - const std::string currentValuePath = _pathPrefix + ".maxbrUl"; - - +bool QosData::validate(std::stringstream& msg) const { + return validate(msg, ""); +} - } - - if (maxbrDlIsSet()) - { - const std::string& value = m_MaxbrDl; - const std::string currentValuePath = _pathPrefix + ".maxbrDl"; - - +bool QosData::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "QosData" : pathPrefix; - } - - if (gbrUlIsSet()) - { - const std::string& value = m_GbrUl; - const std::string currentValuePath = _pathPrefix + ".gbrUl"; - - + 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 (gbrDlIsSet()) - { - const std::string& value = m_GbrDl; - const std::string currentValuePath = _pathPrefix + ".gbrDl"; - - - + 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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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;"; - } + 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;"; } - - 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) -{ - 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; + if (value > 2000000) { + success = false; + msg << currentValuePath << ": must be less than or equal to 2000000;"; + } + } + + return success; } -bool QosData::defQosFlowIndicationIsSet() const -{ - return m_DefQosFlowIndicationIsSet; + +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())) + + ; } -void QosData::unsetDefQosFlowIndication() -{ - m_DefQosFlowIndicationIsSet = false; + +bool QosData::operator!=(const QosData& rhs) const { + return !(*this == rhs); } -int32_t QosData::getExtMaxDataBurstVol() const -{ - return m_ExtMaxDataBurstVol; + +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 QosData::setExtMaxDataBurstVol(int32_t const value) -{ - m_ExtMaxDataBurstVol = value; - m_ExtMaxDataBurstVolIsSet = true; + +void from_json(const nlohmann::json& j, QosData& o) { + 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; + } } -bool QosData::extMaxDataBurstVolIsSet() const -{ - return m_ExtMaxDataBurstVolIsSet; + +std::string QosData::getQosId() const { + return m_QosId; } -void QosData::unsetExtMaxDataBurstVol() -{ - m_ExtMaxDataBurstVolIsSet = false; +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 diff --git a/src/api-server/model/QosData.h b/src/api-server/model/QosData.h old mode 100755 new mode 100644 index 15674d4..d2ccc9d --- a/src/api-server/model/QosData.h +++ b/src/api-server/model/QosData.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,203 +28,208 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class QosData -{ -public: - QosData(); - virtual ~QosData() = default; +class QosData { + 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. 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> - /// 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; - /// <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; - bool operator==(const QosData& rhs) const; - bool operator!=(const QosData& rhs) const; + ///////////////////////////////////////////// + /// QosData members - ///////////////////////////////////////////// - /// 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> + Arp getArp() const; + void setArp(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(); - /// <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> - Arp getArp() const; - void setArp(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); - 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; + 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; - 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; - + 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; + 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 diff --git a/src/api-server/model/QosFlowUsage.cpp b/src/api-server/model/QosFlowUsage.cpp old mode 100755 new mode 100644 index 733735b..79d0a00 --- a/src/api-server/model/QosFlowUsage.cpp +++ b/src/api-server/model/QosFlowUsage.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,65 @@ namespace oai { namespace pcf { namespace model { -QosFlowUsage::QosFlowUsage() -{ - -} +QosFlowUsage::QosFlowUsage() {} -void QosFlowUsage::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool QosFlowUsage::operator!=(const QosFlowUsage& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, QosFlowUsage& o) { + from_json(j, o.m_value); } -QosFlowUsage_anyOf QosFlowUsage::getValue() const -{ - return m_value; +QosFlowUsage_anyOf QosFlowUsage::getValue() const { + return m_value; } -void QosFlowUsage::setValue(QosFlowUsage_anyOf value) -{ - m_value = value; +void QosFlowUsage::setValue(QosFlowUsage_anyOf value) { + m_value = value; } -QosFlowUsage_anyOf::eQosFlowUsage_anyOf QosFlowUsage::getEnumValue() const -{ - return m_value.getValue(); +QosFlowUsage_anyOf::eQosFlowUsage_anyOf QosFlowUsage::getEnumValue() const { + return m_value.getValue(); } -void QosFlowUsage::setEnumValue(QosFlowUsage_anyOf::eQosFlowUsage_anyOf value) -{ - m_value.setValue(value); +void QosFlowUsage::setEnumValue(QosFlowUsage_anyOf::eQosFlowUsage_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/QosFlowUsage.h b/src/api-server/model/QosFlowUsage.h old mode 100755 new mode 100644 index 2bcb9c5..a5913d3 --- a/src/api-server/model/QosFlowUsage.h +++ b/src/api-server/model/QosFlowUsage.h @@ -1,24 +1,26 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -27,49 +29,50 @@ 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. +/// 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; - +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. 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> + /// 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; + /// <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; + bool operator==(const QosFlowUsage& rhs) const; + bool operator!=(const QosFlowUsage& rhs) const; - ///////////////////////////////////////////// - /// QosFlowUsage members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + QosFlowUsage_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/QosFlowUsage_anyOf.cpp b/src/api-server/model/QosFlowUsage_anyOf.cpp old mode 100755 new mode 100644 index cabe76b..8d59bb7 --- a/src/api-server/model/QosFlowUsage_anyOf.cpp +++ b/src/api-server/model/QosFlowUsage_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,97 +20,83 @@ namespace oai { namespace pcf { namespace model { -QosFlowUsage_anyOf::QosFlowUsage_anyOf() -{ - -} +QosFlowUsage_anyOf::QosFlowUsage_anyOf() {} -void QosFlowUsage_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == QosFlowUsage_anyOf::eQosFlowUsage_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool QosFlowUsage_anyOf::operator!=(const QosFlowUsage_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +QosFlowUsage_anyOf::eQosFlowUsage_anyOf QosFlowUsage_anyOf::getValue() const { + return m_value; } -void QosFlowUsage_anyOf::setValue(QosFlowUsage_anyOf::eQosFlowUsage_anyOf value) -{ - m_value = value; +void QosFlowUsage_anyOf::setValue( + QosFlowUsage_anyOf::eQosFlowUsage_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/QosFlowUsage_anyOf.h b/src/api-server/model/QosFlowUsage_anyOf.h old mode 100755 new mode 100644 index 57dd907..7838491 --- a/src/api-server/model/QosFlowUsage_anyOf.h +++ b/src/api-server/model/QosFlowUsage_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,53 +26,55 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class QosFlowUsage_anyOf -{ -public: - QosFlowUsage_anyOf(); - virtual ~QosFlowUsage_anyOf() = default; +class QosFlowUsage_anyOf { + public: + QosFlowUsage_anyOf(); + virtual ~QosFlowUsage_anyOf() = default; - enum class eQosFlowUsage_anyOf { + enum class eQosFlowUsage_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - GENERAL, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const QosFlowUsage_anyOf& rhs) const; + bool operator!=(const QosFlowUsage_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// QosFlowUsage_anyOf members - bool operator==(const QosFlowUsage_anyOf& rhs) const; - bool operator!=(const QosFlowUsage_anyOf& rhs) const; + QosFlowUsage_anyOf::eQosFlowUsage_anyOf getValue() const; + void setValue(QosFlowUsage_anyOf::eQosFlowUsage_anyOf value); - ///////////////////////////////////////////// - /// QosFlowUsage_anyOf members + friend void to_json(nlohmann::json& j, const QosFlowUsage_anyOf& o); + friend void from_json(const nlohmann::json& j, QosFlowUsage_anyOf& o); - 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; + protected: + QosFlowUsage_anyOf::eQosFlowUsage_anyOf m_value = + QosFlowUsage_anyOf::eQosFlowUsage_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/QosMonitoringData.cpp b/src/api-server/model/QosMonitoringData.cpp old mode 100755 new mode 100644 index bb1500c..4dc103b --- a/src/api-server/model/QosMonitoringData.cpp +++ b/src/api-server/model/QosMonitoringData.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,389 +20,327 @@ 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()); - } +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; } -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++; - } - } +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 (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++; - } - } + 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++; + } } - - 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; + } + + 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())) + + ; } -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::operator!=(const QosMonitoringData& rhs) const { + return !(*this == rhs); } -bool QosMonitoringData::notifyUriIsSet() const -{ - return m_NotifyUriIsSet; + +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 QosMonitoringData::unsetNotifyUri() -{ - m_NotifyUriIsSet = false; + +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::getNotifyCorreId() const -{ - return m_NotifyCorreId; + +std::string QosMonitoringData::getQmId() const { + return m_QmId; } -void QosMonitoringData::setNotifyCorreId(std::string const& value) -{ - m_NotifyCorreId = value; - m_NotifyCorreIdIsSet = true; +void QosMonitoringData::setQmId(std::string const& value) { + m_QmId = value; } -bool QosMonitoringData::notifyCorreIdIsSet() const -{ - return m_NotifyCorreIdIsSet; +std::vector<RequestedQosMonitoringParameter> +QosMonitoringData::getReqQosMonParams() const { + return m_ReqQosMonParams; } -void QosMonitoringData::unsetNotifyCorreId() -{ - m_NotifyCorreIdIsSet = false; +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 diff --git a/src/api-server/model/QosMonitoringData.h b/src/api-server/model/QosMonitoringData.h old mode 100755 new mode 100644 index aa9bfab..f85f9d4 --- a/src/api-server/model/QosMonitoringData.h +++ b/src/api-server/model/QosMonitoringData.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -30,131 +30,136 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class QosMonitoringData -{ -public: - QosMonitoringData(); - virtual ~QosMonitoringData() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const QosMonitoringData& rhs) const; - bool operator!=(const QosMonitoringData& rhs) const; + ///////////////////////////////////////////// + /// QosMonitoringData members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; + 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; - + 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 diff --git a/src/api-server/model/QosMonitoringReport.cpp b/src/api-server/model/QosMonitoringReport.cpp old mode 100755 new mode 100644 index d8e1722..2c512e7 --- a/src/api-server/model/QosMonitoringReport.cpp +++ b/src/api-server/model/QosMonitoringReport.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,246 +20,196 @@ namespace oai { namespace pcf { namespace model { -QosMonitoringReport::QosMonitoringReport() -{ - m_UlDelaysIsSet = false; - m_DlDelaysIsSet = false; - m_RtDelaysIsSet = false; - +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()); - } +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 { + 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; +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++; - } - } + /* 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;"; } - - 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++; - } - } + { // 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 (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++; - } - } + } + + 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; + } + + 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 + + (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); +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 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; - } - +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; +std::vector<std::string> QosMonitoringReport::getRefPccRuleIds() const { + return m_RefPccRuleIds; } -void QosMonitoringReport::setRefPccRuleIds(std::vector<std::string> const& value) -{ - m_RefPccRuleIds = value; +void QosMonitoringReport::setRefPccRuleIds( + std::vector<std::string> const& value) { + m_RefPccRuleIds = value; } -std::vector<int32_t> QosMonitoringReport::getUlDelays() const -{ - return m_UlDelays; +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; +void QosMonitoringReport::setUlDelays(std::vector<int32_t> const value) { + m_UlDelays = value; + m_UlDelaysIsSet = true; } -bool QosMonitoringReport::ulDelaysIsSet() const -{ - return m_UlDelaysIsSet; +bool QosMonitoringReport::ulDelaysIsSet() const { + return m_UlDelaysIsSet; } -void QosMonitoringReport::unsetUlDelays() -{ - m_UlDelaysIsSet = false; +void QosMonitoringReport::unsetUlDelays() { + m_UlDelaysIsSet = false; } -std::vector<int32_t> QosMonitoringReport::getDlDelays() const -{ - return m_DlDelays; +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; +void QosMonitoringReport::setDlDelays(std::vector<int32_t> const value) { + m_DlDelays = value; + m_DlDelaysIsSet = true; } -bool QosMonitoringReport::dlDelaysIsSet() const -{ - return m_DlDelaysIsSet; +bool QosMonitoringReport::dlDelaysIsSet() const { + return m_DlDelaysIsSet; } -void QosMonitoringReport::unsetDlDelays() -{ - m_DlDelaysIsSet = false; +void QosMonitoringReport::unsetDlDelays() { + m_DlDelaysIsSet = false; } -std::vector<int32_t> QosMonitoringReport::getRtDelays() const -{ - return m_RtDelays; +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; +void QosMonitoringReport::setRtDelays(std::vector<int32_t> const value) { + m_RtDelays = value; + m_RtDelaysIsSet = true; } -bool QosMonitoringReport::rtDelaysIsSet() const -{ - return m_RtDelaysIsSet; +bool QosMonitoringReport::rtDelaysIsSet() const { + return m_RtDelaysIsSet; } -void QosMonitoringReport::unsetRtDelays() -{ - m_RtDelaysIsSet = false; +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 old mode 100755 new mode 100644 index 77c31a4..8b2cb1e --- a/src/api-server/model/QosMonitoringReport.h +++ b/src/api-server/model/QosMonitoringReport.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,77 +28,77 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class QosMonitoringReport -{ -public: - QosMonitoringReport(); - virtual ~QosMonitoringReport() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const QosMonitoringReport& rhs) const; - bool operator!=(const QosMonitoringReport& rhs) const; + ///////////////////////////////////////////// + /// QosMonitoringReport members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; + 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; - + 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 diff --git a/src/api-server/model/QosNotifType.cpp b/src/api-server/model/QosNotifType.cpp old mode 100755 new mode 100644 index 9c2447c..f2aa980 --- a/src/api-server/model/QosNotifType.cpp +++ b/src/api-server/model/QosNotifType.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,65 @@ namespace oai { namespace pcf { namespace model { -QosNotifType::QosNotifType() -{ - -} +QosNotifType::QosNotifType() {} -void QosNotifType::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool QosNotifType::operator!=(const QosNotifType& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, QosNotifType& o) { + from_json(j, o.m_value); } -QosNotifType_anyOf QosNotifType::getValue() const -{ - return m_value; +QosNotifType_anyOf QosNotifType::getValue() const { + return m_value; } -void QosNotifType::setValue(QosNotifType_anyOf value) -{ - m_value = value; +void QosNotifType::setValue(QosNotifType_anyOf value) { + m_value = value; } -QosNotifType_anyOf::eQosNotifType_anyOf QosNotifType::getEnumValue() const -{ - return m_value.getValue(); +QosNotifType_anyOf::eQosNotifType_anyOf QosNotifType::getEnumValue() const { + return m_value.getValue(); } -void QosNotifType::setEnumValue(QosNotifType_anyOf::eQosNotifType_anyOf value) -{ - m_value.setValue(value); +void QosNotifType::setEnumValue(QosNotifType_anyOf::eQosNotifType_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/QosNotifType.h b/src/api-server/model/QosNotifType.h old mode 100755 new mode 100644 index 85147eb..b20df50 --- a/src/api-server/model/QosNotifType.h +++ b/src/api-server/model/QosNotifType.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class QosNotifType -{ -public: - QosNotifType(); - virtual ~QosNotifType() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const QosNotifType& rhs) const; + bool operator!=(const QosNotifType& rhs) const; - ///////////////////////////////////////////// - /// QosNotifType members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + QosNotifType_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/QosNotifType_anyOf.cpp b/src/api-server/model/QosNotifType_anyOf.cpp old mode 100755 new mode 100644 index f7a75e1..f3782c6 --- a/src/api-server/model/QosNotifType_anyOf.cpp +++ b/src/api-server/model/QosNotifType_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,97 +20,83 @@ namespace oai { namespace pcf { namespace model { -QosNotifType_anyOf::QosNotifType_anyOf() -{ - -} +QosNotifType_anyOf::QosNotifType_anyOf() {} -void QosNotifType_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == QosNotifType_anyOf::eQosNotifType_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool QosNotifType_anyOf::operator!=(const QosNotifType_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +QosNotifType_anyOf::eQosNotifType_anyOf QosNotifType_anyOf::getValue() const { + return m_value; } -void QosNotifType_anyOf::setValue(QosNotifType_anyOf::eQosNotifType_anyOf value) -{ - m_value = value; +void QosNotifType_anyOf::setValue( + QosNotifType_anyOf::eQosNotifType_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/QosNotifType_anyOf.h b/src/api-server/model/QosNotifType_anyOf.h old mode 100755 new mode 100644 index 08cd280..e5796a5 --- a/src/api-server/model/QosNotifType_anyOf.h +++ b/src/api-server/model/QosNotifType_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,53 +26,55 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class QosNotifType_anyOf -{ -public: - QosNotifType_anyOf(); - virtual ~QosNotifType_anyOf() = default; +class QosNotifType_anyOf { + public: + QosNotifType_anyOf(); + virtual ~QosNotifType_anyOf() = default; - enum class eQosNotifType_anyOf { + enum class eQosNotifType_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - GUARANTEED, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const QosNotifType_anyOf& rhs) const; + bool operator!=(const QosNotifType_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// QosNotifType_anyOf members - bool operator==(const QosNotifType_anyOf& rhs) const; - bool operator!=(const QosNotifType_anyOf& rhs) const; + QosNotifType_anyOf::eQosNotifType_anyOf getValue() const; + void setValue(QosNotifType_anyOf::eQosNotifType_anyOf value); - ///////////////////////////////////////////// - /// QosNotifType_anyOf members + friend void to_json(nlohmann::json& j, const QosNotifType_anyOf& o); + friend void from_json(const nlohmann::json& j, QosNotifType_anyOf& o); - 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; + protected: + QosNotifType_anyOf::eQosNotifType_anyOf m_value = + QosNotifType_anyOf::eQosNotifType_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/QosNotificationControlInfo.cpp b/src/api-server/model/QosNotificationControlInfo.cpp old mode 100755 new mode 100644 index b4f1c60..37cffaa --- a/src/api-server/model/QosNotificationControlInfo.cpp +++ b/src/api-server/model/QosNotificationControlInfo.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,169 +20,138 @@ 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()); - } +QosNotificationControlInfo::QosNotificationControlInfo() { + m_ContVer = 0; + m_ContVerIsSet = false; + m_AltQosParamId = ""; + m_AltQosParamIdIsSet = false; } -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++; - } - } +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;"; } - - 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; + { // 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 diff --git a/src/api-server/model/QosNotificationControlInfo.h b/src/api-server/model/QosNotificationControlInfo.h old mode 100755 new mode 100644 index 19db599..3d1b769 --- a/src/api-server/model/QosNotificationControlInfo.h +++ b/src/api-server/model/QosNotificationControlInfo.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -29,75 +29,75 @@ 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; - +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 diff --git a/src/api-server/model/QosResourceType.cpp b/src/api-server/model/QosResourceType.cpp old mode 100755 new mode 100644 index c98a289..8471745 --- a/src/api-server/model/QosResourceType.cpp +++ b/src/api-server/model/QosResourceType.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "QosResourceType.h" #include "Helpers.h" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -QosResourceType::QosResourceType() -{ - -} +QosResourceType::QosResourceType() {} -void QosResourceType::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void QosResourceType::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool QosResourceType::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool QosResourceType::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool QosResourceType::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "QosResourceType" : pathPrefix; - - - if (!m_value.validate(msg)) - { - success = false; - } - return success; +bool QosResourceType::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "QosResourceType" : pathPrefix; + + if (!m_value.validate(msg)) { + success = false; + } + return success; } -bool QosResourceType::operator==(const QosResourceType& rhs) const -{ - return - - getValue() == rhs.getValue() - ; +bool QosResourceType::operator==(const QosResourceType& rhs) const { + return + + getValue() == rhs.getValue(); } -bool QosResourceType::operator!=(const QosResourceType& rhs) const -{ - return !(*this == rhs); +bool QosResourceType::operator!=(const QosResourceType& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const QosResourceType& o) -{ - j = nlohmann::json(); - to_json(j, o.m_value); +void to_json(nlohmann::json& j, const QosResourceType& o) { + j = nlohmann::json(); + to_json(j, o.m_value); } -void from_json(const nlohmann::json& j, QosResourceType& o) -{ - from_json(j, o.m_value); +void from_json(const nlohmann::json& j, QosResourceType& o) { + from_json(j, o.m_value); } -QosResourceType_anyOf QosResourceType::getValue() const -{ - return m_value; +QosResourceType_anyOf QosResourceType::getValue() const { + return m_value; } -void QosResourceType::setValue(QosResourceType_anyOf value) -{ - m_value = value; +void QosResourceType::setValue(QosResourceType_anyOf value) { + m_value = value; } -QosResourceType_anyOf::eQosResourceType_anyOf QosResourceType::getEnumValue() const -{ - return m_value.getValue(); +QosResourceType_anyOf::eQosResourceType_anyOf QosResourceType::getEnumValue() + const { + return m_value.getValue(); } -void QosResourceType::setEnumValue(QosResourceType_anyOf::eQosResourceType_anyOf value) -{ - m_value.setValue(value); +void QosResourceType::setEnumValue( + QosResourceType_anyOf::eQosResourceType_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/QosResourceType.h b/src/api-server/model/QosResourceType.h old mode 100755 new mode 100644 index cafbb44..b9a9c2a --- a/src/api-server/model/QosResourceType.h +++ b/src/api-server/model/QosResourceType.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * QosResourceType.h * - * + * */ #ifndef QosResourceType_H_ #define QosResourceType_H_ - #include "QosResourceType_anyOf.h" #include <nlohmann/json.hpp> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class QosResourceType -{ -public: - QosResourceType(); - virtual ~QosResourceType() = default; - +class QosResourceType { + public: + QosResourceType(); + virtual ~QosResourceType() = 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. 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> + /// 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; + /// <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 QosResourceType& rhs) const; - bool operator!=(const QosResourceType& rhs) const; + bool operator==(const QosResourceType& rhs) const; + bool operator!=(const QosResourceType& rhs) const; - ///////////////////////////////////////////// - /// QosResourceType members + ///////////////////////////////////////////// + /// QosResourceType members + QosResourceType_anyOf getValue() const; + void setValue(QosResourceType_anyOf value); + QosResourceType_anyOf::eQosResourceType_anyOf getEnumValue() const; + void setEnumValue(QosResourceType_anyOf::eQosResourceType_anyOf value); + friend void to_json(nlohmann::json& j, const QosResourceType& o); + friend void from_json(const nlohmann::json& j, QosResourceType& o); + friend void to_json(nlohmann::json& j, const QosResourceType_anyOf& o); + friend void from_json(const nlohmann::json& j, QosResourceType_anyOf& o); - QosResourceType_anyOf getValue() const; - void setValue(QosResourceType_anyOf value); - QosResourceType_anyOf::eQosResourceType_anyOf getEnumValue() const; - void setEnumValue(QosResourceType_anyOf::eQosResourceType_anyOf value); - friend void to_json(nlohmann::json& j, const QosResourceType& o); - friend void from_json(const nlohmann::json& j, QosResourceType& o); - friend void to_json(nlohmann::json& j, const QosResourceType_anyOf& o); - friend void from_json(const nlohmann::json& j, QosResourceType_anyOf& o); -protected: - QosResourceType_anyOf m_value; + protected: + QosResourceType_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/QosResourceType_anyOf.cpp b/src/api-server/model/QosResourceType_anyOf.cpp old mode 100755 new mode 100644 index c7af103..56c116d --- a/src/api-server/model/QosResourceType_anyOf.cpp +++ b/src/api-server/model/QosResourceType_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "QosResourceType_anyOf.h" #include "Helpers.h" @@ -20,103 +20,89 @@ namespace oai { namespace pcf { namespace model { -QosResourceType_anyOf::QosResourceType_anyOf() -{ - -} +QosResourceType_anyOf::QosResourceType_anyOf() {} -void QosResourceType_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void QosResourceType_anyOf::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool QosResourceType_anyOf::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool QosResourceType_anyOf::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool QosResourceType_anyOf::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "QosResourceType_anyOf" : pathPrefix; +bool QosResourceType_anyOf::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "QosResourceType_anyOf" : pathPrefix; - - if (m_value == QosResourceType_anyOf::eQosResourceType_anyOf::INVALID_VALUE_OPENAPI_GENERATED) - { - success = false; - msg << _pathPrefix << ": has no value;"; - } + if (m_value == QosResourceType_anyOf::eQosResourceType_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + return success; } -bool QosResourceType_anyOf::operator==(const QosResourceType_anyOf& rhs) const -{ - return - getValue() == rhs.getValue() - - ; -} +bool QosResourceType_anyOf::operator==(const QosResourceType_anyOf& rhs) const { + return getValue() == rhs.getValue() -bool QosResourceType_anyOf::operator!=(const QosResourceType_anyOf& rhs) const -{ - return !(*this == rhs); + ; } -void to_json(nlohmann::json& j, const QosResourceType_anyOf& o) -{ - j = nlohmann::json(); - - switch (o.getValue()) - { - case QosResourceType_anyOf::eQosResourceType_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case QosResourceType_anyOf::eQosResourceType_anyOf::NON_GBR: - j = "NON_GBR"; - break; - case QosResourceType_anyOf::eQosResourceType_anyOf::NON_CRITICAL_GBR: - j = "NON_CRITICAL_GBR"; - break; - case QosResourceType_anyOf::eQosResourceType_anyOf::CRITICAL_GBR: - j = "CRITICAL_GBR"; - break; - } +bool QosResourceType_anyOf::operator!=(const QosResourceType_anyOf& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, QosResourceType_anyOf& o) -{ - - auto s = j.get<std::string>(); - if (s == "NON_GBR") { - o.setValue(QosResourceType_anyOf::eQosResourceType_anyOf::NON_GBR); - } - else if (s == "NON_CRITICAL_GBR") { - o.setValue(QosResourceType_anyOf::eQosResourceType_anyOf::NON_CRITICAL_GBR); - } - else if (s == "CRITICAL_GBR") { - o.setValue(QosResourceType_anyOf::eQosResourceType_anyOf::CRITICAL_GBR); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " QosResourceType_anyOf::eQosResourceType_anyOf"; - throw std::invalid_argument(ss.str()); - } +void to_json(nlohmann::json& j, const QosResourceType_anyOf& o) { + j = nlohmann::json(); + + switch (o.getValue()) { + case QosResourceType_anyOf::eQosResourceType_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED: + j = "INVALID_VALUE_OPENAPI_GENERATED"; + break; + case QosResourceType_anyOf::eQosResourceType_anyOf::NON_GBR: + j = "NON_GBR"; + break; + case QosResourceType_anyOf::eQosResourceType_anyOf::NON_CRITICAL_GBR: + j = "NON_CRITICAL_GBR"; + break; + case QosResourceType_anyOf::eQosResourceType_anyOf::CRITICAL_GBR: + j = "CRITICAL_GBR"; + break; + } +} +void from_json(const nlohmann::json& j, QosResourceType_anyOf& o) { + auto s = j.get<std::string>(); + if (s == "NON_GBR") { + o.setValue(QosResourceType_anyOf::eQosResourceType_anyOf::NON_GBR); + } else if (s == "NON_CRITICAL_GBR") { + o.setValue(QosResourceType_anyOf::eQosResourceType_anyOf::NON_CRITICAL_GBR); + } else if (s == "CRITICAL_GBR") { + o.setValue(QosResourceType_anyOf::eQosResourceType_anyOf::CRITICAL_GBR); + } else { + std::stringstream ss; + ss << "Unexpected value " << s << " in json" + << " cannot be converted to enum of type" + << " QosResourceType_anyOf::eQosResourceType_anyOf"; + throw std::invalid_argument(ss.str()); + } } -QosResourceType_anyOf::eQosResourceType_anyOf QosResourceType_anyOf::getValue() const -{ - return m_value; +QosResourceType_anyOf::eQosResourceType_anyOf QosResourceType_anyOf::getValue() + const { + return m_value; } -void QosResourceType_anyOf::setValue(QosResourceType_anyOf::eQosResourceType_anyOf value) -{ - m_value = value; +void QosResourceType_anyOf::setValue( + QosResourceType_anyOf::eQosResourceType_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/QosResourceType_anyOf.h b/src/api-server/model/QosResourceType_anyOf.h old mode 100755 new mode 100644 index e108fea..4f99746 --- a/src/api-server/model/QosResourceType_anyOf.h +++ b/src/api-server/model/QosResourceType_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * QosResourceType_anyOf.h * - * + * */ #ifndef QosResourceType_anyOf_H_ #define QosResourceType_anyOf_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,54 +26,57 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class QosResourceType_anyOf -{ -public: - QosResourceType_anyOf(); - virtual ~QosResourceType_anyOf() = default; +class QosResourceType_anyOf { + public: + QosResourceType_anyOf(); + virtual ~QosResourceType_anyOf() = default; - enum class eQosResourceType_anyOf { + enum class eQosResourceType_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - NON_GBR, - NON_CRITICAL_GBR, + NON_GBR, + NON_CRITICAL_GBR, CRITICAL_GBR - }; + }; + + /// <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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const QosResourceType_anyOf& rhs) const; + bool operator!=(const QosResourceType_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// QosResourceType_anyOf members - bool operator==(const QosResourceType_anyOf& rhs) const; - bool operator!=(const QosResourceType_anyOf& rhs) const; + QosResourceType_anyOf::eQosResourceType_anyOf getValue() const; + void setValue(QosResourceType_anyOf::eQosResourceType_anyOf value); - ///////////////////////////////////////////// - /// QosResourceType_anyOf members + friend void to_json(nlohmann::json& j, const QosResourceType_anyOf& o); + friend void from_json(const nlohmann::json& j, QosResourceType_anyOf& o); - QosResourceType_anyOf::eQosResourceType_anyOf getValue() const; - void setValue(QosResourceType_anyOf::eQosResourceType_anyOf value); - - friend void to_json(nlohmann::json& j, const QosResourceType_anyOf& o); - friend void from_json(const nlohmann::json& j, QosResourceType_anyOf& o); -protected: - QosResourceType_anyOf::eQosResourceType_anyOf m_value = QosResourceType_anyOf::eQosResourceType_anyOf::INVALID_VALUE_OPENAPI_GENERATED; + protected: + QosResourceType_anyOf::eQosResourceType_anyOf m_value = + QosResourceType_anyOf::eQosResourceType_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/RanNasRelCause.cpp b/src/api-server/model/RanNasRelCause.cpp old mode 100755 new mode 100644 index bd9cf4f..d0ce161 --- a/src/api-server/model/RanNasRelCause.cpp +++ b/src/api-server/model/RanNasRelCause.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,173 +20,138 @@ namespace oai { namespace pcf { namespace model { -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()); - } +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 { + 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; +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 (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;"; - } + } + 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; + } + + 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 diff --git a/src/api-server/model/RanNasRelCause.h b/src/api-server/model/RanNasRelCause.h old mode 100755 new mode 100644 index fef0b7d..ec2d389 --- a/src/api-server/model/RanNasRelCause.h +++ b/src/api-server/model/RanNasRelCause.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,70 +27,69 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RanNasRelCause -{ -public: - RanNasRelCause(); - virtual ~RanNasRelCause() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const RanNasRelCause& rhs) const; - bool operator!=(const RanNasRelCause& rhs) const; + ///////////////////////////////////////////// + /// RanNasRelCause members - ///////////////////////////////////////////// - /// RanNasRelCause members + /// <summary> + /// + /// </summary> + NgApCause getNgApCause() const; + void setNgApCause(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(); - /// <summary> - /// - /// </summary> - NgApCause getNgApCause() const; - void setNgApCause(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); - friend void to_json(nlohmann::json& j, const RanNasRelCause& o); - friend void from_json(const nlohmann::json& j, RanNasRelCause& o); -protected: - NgApCause m_NgApCause; - bool m_NgApCauseIsSet; - int32_t m_r_5gMmCause; - bool m_r_5gMmCauseIsSet; - int32_t m_r_5gSmCause; - bool m_r_5gSmCauseIsSet; - + protected: + 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 diff --git a/src/api-server/model/RatType.cpp b/src/api-server/model/RatType.cpp old mode 100755 new mode 100644 index bac4486..d9eb1c4 --- a/src/api-server/model/RatType.cpp +++ b/src/api-server/model/RatType.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ #include "RatType.h" #include "Helpers.h" @@ -20,80 +20,64 @@ namespace oai { namespace pcf { namespace model { -RatType::RatType() -{ - -} +RatType::RatType() {} -void RatType::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void RatType::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool RatType::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool RatType::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool RatType::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "RatType" : pathPrefix; - - - if (!m_value.validate(msg)) - { - success = false; - } - return success; +bool RatType::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "RatType" : pathPrefix; + + if (!m_value.validate(msg)) { + success = false; + } + return success; } -bool RatType::operator==(const RatType& rhs) const -{ - return - - getValue() == rhs.getValue() - ; +bool RatType::operator==(const RatType& rhs) const { + return + + getValue() == rhs.getValue(); } -bool RatType::operator!=(const RatType& rhs) const -{ - return !(*this == rhs); +bool RatType::operator!=(const RatType& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const RatType& o) -{ - j = nlohmann::json(); - to_json(j, o.m_value); +void to_json(nlohmann::json& j, const RatType& o) { + j = nlohmann::json(); + to_json(j, o.m_value); } -void from_json(const nlohmann::json& j, RatType& o) -{ - from_json(j, o.m_value); +void from_json(const nlohmann::json& j, RatType& o) { + from_json(j, o.m_value); } -RatType_anyOf RatType::getValue() const -{ - return m_value; +RatType_anyOf RatType::getValue() const { + return m_value; } -void RatType::setValue(RatType_anyOf value) -{ - m_value = value; +void RatType::setValue(RatType_anyOf value) { + m_value = value; } -RatType_anyOf::eRatType_anyOf RatType::getEnumValue() const -{ - return m_value.getValue(); +RatType_anyOf::eRatType_anyOf RatType::getEnumValue() const { + return m_value.getValue(); } -void RatType::setEnumValue(RatType_anyOf::eRatType_anyOf value) -{ - m_value.setValue(value); +void RatType::setEnumValue(RatType_anyOf::eRatType_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/RatType.h b/src/api-server/model/RatType.h old mode 100755 new mode 100644 index fd57f99..da18029 --- a/src/api-server/model/RatType.h +++ b/src/api-server/model/RatType.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * RatType.h * - * + * */ #ifndef RatType_H_ #define RatType_H_ - #include "RatType_anyOf.h" #include <nlohmann/json.hpp> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RatType -{ -public: - RatType(); - virtual ~RatType() = default; - +class RatType { + public: + RatType(); + virtual ~RatType() = 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. 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> + /// 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; + /// <summary> + /// Helper overload for validate. Used when one model stores another model and + /// calls it's validate. Not meant to be called outside that case. + /// </summary> + bool validate(std::stringstream& msg, const std::string& pathPrefix) const; - bool operator==(const RatType& rhs) const; - bool operator!=(const RatType& rhs) const; + bool operator==(const RatType& rhs) const; + bool operator!=(const RatType& rhs) const; - ///////////////////////////////////////////// - /// RatType members + ///////////////////////////////////////////// + /// RatType members + RatType_anyOf getValue() const; + void setValue(RatType_anyOf value); + RatType_anyOf::eRatType_anyOf getEnumValue() const; + void setEnumValue(RatType_anyOf::eRatType_anyOf value); + friend void to_json(nlohmann::json& j, const RatType& o); + friend void from_json(const nlohmann::json& j, RatType& o); + friend void to_json(nlohmann::json& j, const RatType_anyOf& o); + friend void from_json(const nlohmann::json& j, RatType_anyOf& o); - RatType_anyOf getValue() const; - void setValue(RatType_anyOf value); - RatType_anyOf::eRatType_anyOf getEnumValue() const; - void setEnumValue(RatType_anyOf::eRatType_anyOf value); - friend void to_json(nlohmann::json& j, const RatType& o); - friend void from_json(const nlohmann::json& j, RatType& o); - friend void to_json(nlohmann::json& j, const RatType_anyOf& o); - friend void from_json(const nlohmann::json& j, RatType_anyOf& o); -protected: - RatType_anyOf m_value; + protected: + RatType_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/RatType_anyOf.cpp b/src/api-server/model/RatType_anyOf.cpp old mode 100755 new mode 100644 index 833ef3f..ba108b1 --- a/src/api-server/model/RatType_anyOf.cpp +++ b/src/api-server/model/RatType_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ #include "RatType_anyOf.h" #include "Helpers.h" @@ -20,175 +20,146 @@ namespace oai { namespace pcf { namespace model { -RatType_anyOf::RatType_anyOf() -{ - -} +RatType_anyOf::RatType_anyOf() {} -void RatType_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void RatType_anyOf::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool RatType_anyOf::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool RatType_anyOf::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool RatType_anyOf::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "RatType_anyOf" : pathPrefix; +bool RatType_anyOf::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "RatType_anyOf" : pathPrefix; - - if (m_value == RatType_anyOf::eRatType_anyOf::INVALID_VALUE_OPENAPI_GENERATED) - { - success = false; - msg << _pathPrefix << ": has no value;"; - } + if (m_value == + RatType_anyOf::eRatType_anyOf::INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + return success; } -bool RatType_anyOf::operator==(const RatType_anyOf& rhs) const -{ - return - getValue() == rhs.getValue() - - ; -} +bool RatType_anyOf::operator==(const RatType_anyOf& rhs) const { + return getValue() == rhs.getValue() -bool RatType_anyOf::operator!=(const RatType_anyOf& rhs) const -{ - return !(*this == rhs); + ; } -void to_json(nlohmann::json& j, const RatType_anyOf& o) -{ - j = nlohmann::json(); - - switch (o.getValue()) - { - case RatType_anyOf::eRatType_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case RatType_anyOf::eRatType_anyOf::NR: - j = "NR"; - break; - case RatType_anyOf::eRatType_anyOf::EUTRA: - j = "EUTRA"; - break; - case RatType_anyOf::eRatType_anyOf::WLAN: - j = "WLAN"; - break; - case RatType_anyOf::eRatType_anyOf::VIRTUAL: - j = "VIRTUAL"; - break; - case RatType_anyOf::eRatType_anyOf::NBIOT: - j = "NBIOT"; - break; - case RatType_anyOf::eRatType_anyOf::WIRELINE: - j = "WIRELINE"; - break; - case RatType_anyOf::eRatType_anyOf::WIRELINE_CABLE: - j = "WIRELINE_CABLE"; - break; - case RatType_anyOf::eRatType_anyOf::WIRELINE_BBF: - j = "WIRELINE_BBF"; - break; - case RatType_anyOf::eRatType_anyOf::LTE_M: - j = "LTE-M"; - break; - case RatType_anyOf::eRatType_anyOf::NR_U: - j = "NR_U"; - break; - case RatType_anyOf::eRatType_anyOf::EUTRA_U: - j = "EUTRA_U"; - break; - case RatType_anyOf::eRatType_anyOf::TRUSTED_N3GA: - j = "TRUSTED_N3GA"; - break; - case RatType_anyOf::eRatType_anyOf::TRUSTED_WLAN: - j = "TRUSTED_WLAN"; - break; - case RatType_anyOf::eRatType_anyOf::UTRA: - j = "UTRA"; - break; - case RatType_anyOf::eRatType_anyOf::GERA: - j = "GERA"; - break; - } +bool RatType_anyOf::operator!=(const RatType_anyOf& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, RatType_anyOf& o) -{ - - auto s = j.get<std::string>(); - if (s == "NR") { - o.setValue(RatType_anyOf::eRatType_anyOf::NR); - } - else if (s == "EUTRA") { - o.setValue(RatType_anyOf::eRatType_anyOf::EUTRA); - } - else if (s == "WLAN") { - o.setValue(RatType_anyOf::eRatType_anyOf::WLAN); - } - else if (s == "VIRTUAL") { - o.setValue(RatType_anyOf::eRatType_anyOf::VIRTUAL); - } - else if (s == "NBIOT") { - o.setValue(RatType_anyOf::eRatType_anyOf::NBIOT); - } - else if (s == "WIRELINE") { - o.setValue(RatType_anyOf::eRatType_anyOf::WIRELINE); - } - else if (s == "WIRELINE_CABLE") { - o.setValue(RatType_anyOf::eRatType_anyOf::WIRELINE_CABLE); - } - else if (s == "WIRELINE_BBF") { - o.setValue(RatType_anyOf::eRatType_anyOf::WIRELINE_BBF); - } - else if (s == "LTE-M") { - o.setValue(RatType_anyOf::eRatType_anyOf::LTE_M); - } - else if (s == "NR_U") { - o.setValue(RatType_anyOf::eRatType_anyOf::NR_U); - } - else if (s == "EUTRA_U") { - o.setValue(RatType_anyOf::eRatType_anyOf::EUTRA_U); - } - else if (s == "TRUSTED_N3GA") { - o.setValue(RatType_anyOf::eRatType_anyOf::TRUSTED_N3GA); - } - else if (s == "TRUSTED_WLAN") { - o.setValue(RatType_anyOf::eRatType_anyOf::TRUSTED_WLAN); - } - else if (s == "UTRA") { - o.setValue(RatType_anyOf::eRatType_anyOf::UTRA); - } - else if (s == "GERA") { - o.setValue(RatType_anyOf::eRatType_anyOf::GERA); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " RatType_anyOf::eRatType_anyOf"; - throw std::invalid_argument(ss.str()); - } +void to_json(nlohmann::json& j, const RatType_anyOf& o) { + j = nlohmann::json(); + + switch (o.getValue()) { + case RatType_anyOf::eRatType_anyOf::INVALID_VALUE_OPENAPI_GENERATED: + j = "INVALID_VALUE_OPENAPI_GENERATED"; + break; + case RatType_anyOf::eRatType_anyOf::NR: + j = "NR"; + break; + case RatType_anyOf::eRatType_anyOf::EUTRA: + j = "EUTRA"; + break; + case RatType_anyOf::eRatType_anyOf::WLAN: + j = "WLAN"; + break; + case RatType_anyOf::eRatType_anyOf::VIRTUAL: + j = "VIRTUAL"; + break; + case RatType_anyOf::eRatType_anyOf::NBIOT: + j = "NBIOT"; + break; + case RatType_anyOf::eRatType_anyOf::WIRELINE: + j = "WIRELINE"; + break; + case RatType_anyOf::eRatType_anyOf::WIRELINE_CABLE: + j = "WIRELINE_CABLE"; + break; + case RatType_anyOf::eRatType_anyOf::WIRELINE_BBF: + j = "WIRELINE_BBF"; + break; + case RatType_anyOf::eRatType_anyOf::LTE_M: + j = "LTE-M"; + break; + case RatType_anyOf::eRatType_anyOf::NR_U: + j = "NR_U"; + break; + case RatType_anyOf::eRatType_anyOf::EUTRA_U: + j = "EUTRA_U"; + break; + case RatType_anyOf::eRatType_anyOf::TRUSTED_N3GA: + j = "TRUSTED_N3GA"; + break; + case RatType_anyOf::eRatType_anyOf::TRUSTED_WLAN: + j = "TRUSTED_WLAN"; + break; + case RatType_anyOf::eRatType_anyOf::UTRA: + j = "UTRA"; + break; + case RatType_anyOf::eRatType_anyOf::GERA: + j = "GERA"; + break; + } +} +void from_json(const nlohmann::json& j, RatType_anyOf& o) { + auto s = j.get<std::string>(); + if (s == "NR") { + o.setValue(RatType_anyOf::eRatType_anyOf::NR); + } else if (s == "EUTRA") { + o.setValue(RatType_anyOf::eRatType_anyOf::EUTRA); + } else if (s == "WLAN") { + o.setValue(RatType_anyOf::eRatType_anyOf::WLAN); + } else if (s == "VIRTUAL") { + o.setValue(RatType_anyOf::eRatType_anyOf::VIRTUAL); + } else if (s == "NBIOT") { + o.setValue(RatType_anyOf::eRatType_anyOf::NBIOT); + } else if (s == "WIRELINE") { + o.setValue(RatType_anyOf::eRatType_anyOf::WIRELINE); + } else if (s == "WIRELINE_CABLE") { + o.setValue(RatType_anyOf::eRatType_anyOf::WIRELINE_CABLE); + } else if (s == "WIRELINE_BBF") { + o.setValue(RatType_anyOf::eRatType_anyOf::WIRELINE_BBF); + } else if (s == "LTE-M") { + o.setValue(RatType_anyOf::eRatType_anyOf::LTE_M); + } else if (s == "NR_U") { + o.setValue(RatType_anyOf::eRatType_anyOf::NR_U); + } else if (s == "EUTRA_U") { + o.setValue(RatType_anyOf::eRatType_anyOf::EUTRA_U); + } else if (s == "TRUSTED_N3GA") { + o.setValue(RatType_anyOf::eRatType_anyOf::TRUSTED_N3GA); + } else if (s == "TRUSTED_WLAN") { + o.setValue(RatType_anyOf::eRatType_anyOf::TRUSTED_WLAN); + } else if (s == "UTRA") { + o.setValue(RatType_anyOf::eRatType_anyOf::UTRA); + } else if (s == "GERA") { + o.setValue(RatType_anyOf::eRatType_anyOf::GERA); + } else { + std::stringstream ss; + ss << "Unexpected value " << s << " in json" + << " cannot be converted to enum of type" + << " RatType_anyOf::eRatType_anyOf"; + throw std::invalid_argument(ss.str()); + } } -RatType_anyOf::eRatType_anyOf RatType_anyOf::getValue() const -{ - return m_value; +RatType_anyOf::eRatType_anyOf RatType_anyOf::getValue() const { + return m_value; } -void RatType_anyOf::setValue(RatType_anyOf::eRatType_anyOf value) -{ - m_value = value; +void RatType_anyOf::setValue(RatType_anyOf::eRatType_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/RatType_anyOf.h b/src/api-server/model/RatType_anyOf.h old mode 100755 new mode 100644 index b20680c..e807600 --- a/src/api-server/model/RatType_anyOf.h +++ b/src/api-server/model/RatType_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * RatType_anyOf.h * - * + * */ #ifndef RatType_anyOf_H_ #define RatType_anyOf_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,66 +26,68 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RatType_anyOf -{ -public: - RatType_anyOf(); - virtual ~RatType_anyOf() = default; +class RatType_anyOf { + public: + RatType_anyOf(); + virtual ~RatType_anyOf() = default; - enum class eRatType_anyOf { + enum class eRatType_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - NR, - EUTRA, - WLAN, - VIRTUAL, - NBIOT, - WIRELINE, - WIRELINE_CABLE, - WIRELINE_BBF, - LTE_M, - NR_U, - EUTRA_U, - TRUSTED_N3GA, - TRUSTED_WLAN, - UTRA, + NR, + EUTRA, + WLAN, + VIRTUAL, + NBIOT, + WIRELINE, + WIRELINE_CABLE, + WIRELINE_BBF, + LTE_M, + NR_U, + EUTRA_U, + TRUSTED_N3GA, + TRUSTED_WLAN, + UTRA, GERA - }; + }; + + /// <summary> + /// Validate the current data in the model. Throws a ValidationException on + /// failure. + /// </summary> + void validate() const; + + /// <summary> + /// Validate the current data in the model. Returns false on error and writes + /// an error message into the given stringstream. + /// </summary> + bool validate(std::stringstream& msg) const; - /// <summary> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const RatType_anyOf& rhs) const; + bool operator!=(const RatType_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// RatType_anyOf members - bool operator==(const RatType_anyOf& rhs) const; - bool operator!=(const RatType_anyOf& rhs) const; + RatType_anyOf::eRatType_anyOf getValue() const; + void setValue(RatType_anyOf::eRatType_anyOf value); - ///////////////////////////////////////////// - /// RatType_anyOf members + friend void to_json(nlohmann::json& j, const RatType_anyOf& o); + friend void from_json(const nlohmann::json& j, RatType_anyOf& o); - RatType_anyOf::eRatType_anyOf getValue() const; - void setValue(RatType_anyOf::eRatType_anyOf value); - - friend void to_json(nlohmann::json& j, const RatType_anyOf& o); - friend void from_json(const nlohmann::json& j, RatType_anyOf& o); -protected: - RatType_anyOf::eRatType_anyOf m_value = RatType_anyOf::eRatType_anyOf::INVALID_VALUE_OPENAPI_GENERATED; + protected: + RatType_anyOf::eRatType_anyOf m_value = + RatType_anyOf::eRatType_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/RedirectAddressType.cpp b/src/api-server/model/RedirectAddressType.cpp old mode 100755 new mode 100644 index e8515b6..c100c63 --- a/src/api-server/model/RedirectAddressType.cpp +++ b/src/api-server/model/RedirectAddressType.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -RedirectAddressType::RedirectAddressType() -{ - -} +RedirectAddressType::RedirectAddressType() {} -void RedirectAddressType::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool RedirectAddressType::operator!=(const RedirectAddressType& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, RedirectAddressType& o) { + from_json(j, o.m_value); } -RedirectAddressType_anyOf RedirectAddressType::getValue() const -{ - return m_value; +RedirectAddressType_anyOf RedirectAddressType::getValue() const { + return m_value; } -void RedirectAddressType::setValue(RedirectAddressType_anyOf value) -{ - m_value = value; +void RedirectAddressType::setValue(RedirectAddressType_anyOf value) { + m_value = value; } -RedirectAddressType_anyOf::eRedirectAddressType_anyOf RedirectAddressType::getEnumValue() const -{ - return m_value.getValue(); +RedirectAddressType_anyOf::eRedirectAddressType_anyOf +RedirectAddressType::getEnumValue() const { + return m_value.getValue(); } -void RedirectAddressType::setEnumValue(RedirectAddressType_anyOf::eRedirectAddressType_anyOf value) -{ - m_value.setValue(value); +void RedirectAddressType::setEnumValue( + RedirectAddressType_anyOf::eRedirectAddressType_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/RedirectAddressType.h b/src/api-server/model/RedirectAddressType.h old mode 100755 new mode 100644 index 3a63484..563f157 --- a/src/api-server/model/RedirectAddressType.h +++ b/src/api-server/model/RedirectAddressType.h @@ -1,24 +1,29 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -27,49 +32,54 @@ 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. +/// 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; - +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. 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> + /// 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; + /// <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; + bool operator==(const RedirectAddressType& rhs) const; + bool operator!=(const RedirectAddressType& rhs) const; - ///////////////////////////////////////////// - /// RedirectAddressType members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + RedirectAddressType_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/RedirectAddressType_anyOf.cpp b/src/api-server/model/RedirectAddressType_anyOf.cpp old mode 100755 new mode 100644 index 236ef7f..1bf6688 --- a/src/api-server/model/RedirectAddressType_anyOf.cpp +++ b/src/api-server/model/RedirectAddressType_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,109 +20,98 @@ namespace oai { namespace pcf { namespace model { -RedirectAddressType_anyOf::RedirectAddressType_anyOf() -{ - -} +RedirectAddressType_anyOf::RedirectAddressType_anyOf() {} -void RedirectAddressType_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == RedirectAddressType_anyOf::eRedirectAddressType_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool RedirectAddressType_anyOf::operator!=( + const RedirectAddressType_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +RedirectAddressType_anyOf::eRedirectAddressType_anyOf +RedirectAddressType_anyOf::getValue() const { + return m_value; } -void RedirectAddressType_anyOf::setValue(RedirectAddressType_anyOf::eRedirectAddressType_anyOf value) -{ - m_value = value; +void RedirectAddressType_anyOf::setValue( + RedirectAddressType_anyOf::eRedirectAddressType_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/RedirectAddressType_anyOf.h b/src/api-server/model/RedirectAddressType_anyOf.h old mode 100755 new mode 100644 index ffe645b..7628118 --- a/src/api-server/model/RedirectAddressType_anyOf.h +++ b/src/api-server/model/RedirectAddressType_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,55 +26,58 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RedirectAddressType_anyOf -{ -public: - RedirectAddressType_anyOf(); - virtual ~RedirectAddressType_anyOf() = default; +class RedirectAddressType_anyOf { + public: + RedirectAddressType_anyOf(); + virtual ~RedirectAddressType_anyOf() = default; - enum class eRedirectAddressType_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const RedirectAddressType_anyOf& rhs) const; + bool operator!=(const RedirectAddressType_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// RedirectAddressType_anyOf members - bool operator==(const RedirectAddressType_anyOf& rhs) const; - bool operator!=(const RedirectAddressType_anyOf& rhs) const; + RedirectAddressType_anyOf::eRedirectAddressType_anyOf getValue() const; + void setValue(RedirectAddressType_anyOf::eRedirectAddressType_anyOf value); - ///////////////////////////////////////////// - /// RedirectAddressType_anyOf members + friend void to_json(nlohmann::json& j, const RedirectAddressType_anyOf& o); + friend void from_json(const nlohmann::json& j, RedirectAddressType_anyOf& o); - 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; + protected: + RedirectAddressType_anyOf::eRedirectAddressType_anyOf m_value = + RedirectAddressType_anyOf::eRedirectAddressType_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/RedirectInformation.cpp b/src/api-server/model/RedirectInformation.cpp old mode 100755 new mode 100644 index 706718a..e54438a --- a/src/api-server/model/RedirectInformation.cpp +++ b/src/api-server/model/RedirectInformation.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,145 +20,121 @@ 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; +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 diff --git a/src/api-server/model/RedirectInformation.h b/src/api-server/model/RedirectInformation.h old mode 100755 new mode 100644 index 4be8304..112f998 --- a/src/api-server/model/RedirectInformation.h +++ b/src/api-server/model/RedirectInformation.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,70 +28,69 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RedirectInformation -{ -public: - RedirectInformation(); - virtual ~RedirectInformation() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const RedirectInformation& rhs) const; - bool operator!=(const RedirectInformation& rhs) const; + ///////////////////////////////////////////// + /// RedirectInformation members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; - + protected: + bool m_RedirectEnabled; + bool m_RedirectEnabledIsSet; + RedirectAddressType m_RedirectAddressType; + bool m_RedirectAddressTypeIsSet; + std::string m_RedirectServerAddress; + bool m_RedirectServerAddressIsSet; }; } // namespace model diff --git a/src/api-server/model/ReportingFrequency.cpp b/src/api-server/model/ReportingFrequency.cpp old mode 100755 new mode 100644 index ac1ce55..ccae458 --- a/src/api-server/model/ReportingFrequency.cpp +++ b/src/api-server/model/ReportingFrequency.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -ReportingFrequency::ReportingFrequency() -{ - -} +ReportingFrequency::ReportingFrequency() {} -void ReportingFrequency::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool ReportingFrequency::operator!=(const ReportingFrequency& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, ReportingFrequency& o) { + from_json(j, o.m_value); } -ReportingFrequency_anyOf ReportingFrequency::getValue() const -{ - return m_value; +ReportingFrequency_anyOf ReportingFrequency::getValue() const { + return m_value; } -void ReportingFrequency::setValue(ReportingFrequency_anyOf value) -{ - m_value = value; +void ReportingFrequency::setValue(ReportingFrequency_anyOf value) { + m_value = value; } -ReportingFrequency_anyOf::eReportingFrequency_anyOf ReportingFrequency::getEnumValue() const -{ - return m_value.getValue(); +ReportingFrequency_anyOf::eReportingFrequency_anyOf +ReportingFrequency::getEnumValue() const { + return m_value.getValue(); } -void ReportingFrequency::setEnumValue(ReportingFrequency_anyOf::eReportingFrequency_anyOf value) -{ - m_value.setValue(value); +void ReportingFrequency::setEnumValue( + ReportingFrequency_anyOf::eReportingFrequency_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/ReportingFrequency.h b/src/api-server/model/ReportingFrequency.h old mode 100755 new mode 100644 index 62a267a..ed289d4 --- a/src/api-server/model/ReportingFrequency.h +++ b/src/api-server/model/ReportingFrequency.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class ReportingFrequency -{ -public: - ReportingFrequency(); - virtual ~ReportingFrequency() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const ReportingFrequency& rhs) const; + bool operator!=(const ReportingFrequency& rhs) const; - ///////////////////////////////////////////// - /// ReportingFrequency members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + ReportingFrequency_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/ReportingFrequency_anyOf.cpp b/src/api-server/model/ReportingFrequency_anyOf.cpp old mode 100755 new mode 100644 index db5d0b1..837ef4d --- a/src/api-server/model/ReportingFrequency_anyOf.cpp +++ b/src/api-server/model/ReportingFrequency_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,103 +20,93 @@ namespace oai { namespace pcf { namespace model { -ReportingFrequency_anyOf::ReportingFrequency_anyOf() -{ - -} +ReportingFrequency_anyOf::ReportingFrequency_anyOf() {} -void ReportingFrequency_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == ReportingFrequency_anyOf::eReportingFrequency_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool ReportingFrequency_anyOf::operator!=( + const ReportingFrequency_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +ReportingFrequency_anyOf::eReportingFrequency_anyOf +ReportingFrequency_anyOf::getValue() const { + return m_value; } -void ReportingFrequency_anyOf::setValue(ReportingFrequency_anyOf::eReportingFrequency_anyOf value) -{ - m_value = value; +void ReportingFrequency_anyOf::setValue( + ReportingFrequency_anyOf::eReportingFrequency_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/ReportingFrequency_anyOf.h b/src/api-server/model/ReportingFrequency_anyOf.h old mode 100755 new mode 100644 index 77dfda6..57f5091 --- a/src/api-server/model/ReportingFrequency_anyOf.h +++ b/src/api-server/model/ReportingFrequency_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,54 +26,57 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class ReportingFrequency_anyOf -{ -public: - ReportingFrequency_anyOf(); - virtual ~ReportingFrequency_anyOf() = default; +class ReportingFrequency_anyOf { + public: + ReportingFrequency_anyOf(); + virtual ~ReportingFrequency_anyOf() = default; - enum class eReportingFrequency_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const ReportingFrequency_anyOf& rhs) const; + bool operator!=(const ReportingFrequency_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// ReportingFrequency_anyOf members - bool operator==(const ReportingFrequency_anyOf& rhs) const; - bool operator!=(const ReportingFrequency_anyOf& rhs) const; + ReportingFrequency_anyOf::eReportingFrequency_anyOf getValue() const; + void setValue(ReportingFrequency_anyOf::eReportingFrequency_anyOf value); - ///////////////////////////////////////////// - /// ReportingFrequency_anyOf members + friend void to_json(nlohmann::json& j, const ReportingFrequency_anyOf& o); + friend void from_json(const nlohmann::json& j, ReportingFrequency_anyOf& o); - 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; + protected: + ReportingFrequency_anyOf::eReportingFrequency_anyOf m_value = + ReportingFrequency_anyOf::eReportingFrequency_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/ReportingLevel.cpp b/src/api-server/model/ReportingLevel.cpp old mode 100755 new mode 100644 index e10ac11..808baff --- a/src/api-server/model/ReportingLevel.cpp +++ b/src/api-server/model/ReportingLevel.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,59 +20,46 @@ namespace oai { namespace pcf { namespace model { -ReportingLevel::ReportingLevel() -{ - -} +ReportingLevel::ReportingLevel() {} -void ReportingLevel::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +bool ReportingLevel::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "ReportingLevel" : pathPrefix; - - return success; + return success; } // bool ReportingLevel::operator==(const ReportingLevel& rhs) const // { // return - + // getValue() == rhs.getValue() // ; // } -bool ReportingLevel::operator!=(const ReportingLevel& rhs) const -{ - return !(*this == rhs); +bool ReportingLevel::operator!=(const ReportingLevel& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const ReportingLevel& o) -{ - j = nlohmann::json(); - +void to_json(nlohmann::json& j, const ReportingLevel& o) { + j = nlohmann::json(); } -void from_json(const nlohmann::json& j, ReportingLevel& o) -{ - -} - - +void from_json(const nlohmann::json& j, ReportingLevel& o) {} } // namespace model } // namespace pcf diff --git a/src/api-server/model/ReportingLevel.h b/src/api-server/model/ReportingLevel.h old mode 100755 new mode 100644 index 131f259..f2a7fde --- a/src/api-server/model/ReportingLevel.h +++ b/src/api-server/model/ReportingLevel.h @@ -1,24 +1,28 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -28,43 +32,45 @@ 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. +/// 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; - +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. 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> + /// 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; + /// <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; + bool operator==(const ReportingLevel& rhs) const; + bool operator!=(const ReportingLevel& rhs) const; - ///////////////////////////////////////////// - /// ReportingLevel members + ///////////////////////////////////////////// + /// ReportingLevel members + friend void to_json(nlohmann::json& j, const ReportingLevel& o); + friend void from_json(const nlohmann::json& j, ReportingLevel& o); - friend void to_json(nlohmann::json& j, const ReportingLevel& o); - friend void from_json(const nlohmann::json& j, ReportingLevel& o); -protected: - + protected: }; } // namespace model diff --git a/src/api-server/model/ReportingLevel_anyOf.cpp b/src/api-server/model/ReportingLevel_anyOf.cpp old mode 100755 new mode 100644 index 7b75bee..c51e173 --- a/src/api-server/model/ReportingLevel_anyOf.cpp +++ b/src/api-server/model/ReportingLevel_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,103 +20,89 @@ namespace oai { namespace pcf { namespace model { -ReportingLevel_anyOf::ReportingLevel_anyOf() -{ - -} +ReportingLevel_anyOf::ReportingLevel_anyOf() {} -void ReportingLevel_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == ReportingLevel_anyOf::eReportingLevel_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool ReportingLevel_anyOf::operator!=(const ReportingLevel_anyOf& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, ReportingLevel_anyOf& o) -{ - - 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 { - 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()); - } +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; + } +} +void from_json(const nlohmann::json& j, ReportingLevel_anyOf& o) { + 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 { + 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; +ReportingLevel_anyOf::eReportingLevel_anyOf ReportingLevel_anyOf::getValue() + const { + return m_value; } -void ReportingLevel_anyOf::setValue(ReportingLevel_anyOf::eReportingLevel_anyOf value) -{ - m_value = value; +void ReportingLevel_anyOf::setValue( + ReportingLevel_anyOf::eReportingLevel_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/ReportingLevel_anyOf.h b/src/api-server/model/ReportingLevel_anyOf.h old mode 100755 new mode 100644 index cac150a..2294cb3 --- a/src/api-server/model/ReportingLevel_anyOf.h +++ b/src/api-server/model/ReportingLevel_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,54 +26,56 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class ReportingLevel_anyOf -{ -public: - ReportingLevel_anyOf(); - virtual ~ReportingLevel_anyOf() = default; +class ReportingLevel_anyOf { + public: + ReportingLevel_anyOf(); + virtual ~ReportingLevel_anyOf() = default; - enum class eReportingLevel_anyOf { + enum class eReportingLevel_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - SER_ID_LEVEL, - RAT_GR_LEVEL, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const ReportingLevel_anyOf& rhs) const; + bool operator!=(const ReportingLevel_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// ReportingLevel_anyOf members - bool operator==(const ReportingLevel_anyOf& rhs) const; - bool operator!=(const ReportingLevel_anyOf& rhs) const; + ReportingLevel_anyOf::eReportingLevel_anyOf getValue() const; + void setValue(ReportingLevel_anyOf::eReportingLevel_anyOf value); - ///////////////////////////////////////////// - /// ReportingLevel_anyOf members + friend void to_json(nlohmann::json& j, const ReportingLevel_anyOf& o); + friend void from_json(const nlohmann::json& j, ReportingLevel_anyOf& o); - 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; + protected: + ReportingLevel_anyOf::eReportingLevel_anyOf m_value = ReportingLevel_anyOf:: + eReportingLevel_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/RequestedQos.cpp b/src/api-server/model/RequestedQos.cpp old mode 100755 new mode 100644 index 0aee52e..630197c --- a/src/api-server/model/RequestedQos.cpp +++ b/src/api-server/model/RequestedQos.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,168 +20,128 @@ 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()); - } +RequestedQos::RequestedQos() { + m_r_5qi = 0; + m_GbrUl = ""; + m_GbrUlIsSet = false; + m_GbrDl = ""; + m_GbrDlIsSet = false; } -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;"; - } +void RequestedQos::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} - } - - if (gbrUlIsSet()) - { - const std::string& value = m_GbrUl; - const std::string currentValuePath = _pathPrefix + ".gbrUl"; - - +bool RequestedQos::validate(std::stringstream& msg) const { + return validate(msg, ""); +} - } - - if (gbrDlIsSet()) - { - const std::string& value = m_GbrDl; - const std::string currentValuePath = _pathPrefix + ".gbrDl"; - - +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;"; } - - 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; + 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 diff --git a/src/api-server/model/RequestedQos.h b/src/api-server/model/RequestedQos.h old mode 100755 new mode 100644 index 0e5001b..12acc28 --- a/src/api-server/model/RequestedQos.h +++ b/src/api-server/model/RequestedQos.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,68 +27,67 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RequestedQos -{ -public: - RequestedQos(); - virtual ~RequestedQos() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const RequestedQos& rhs) const; - bool operator!=(const RequestedQos& rhs) const; + ///////////////////////////////////////////// + /// RequestedQos members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; + protected: + int32_t m_r_5qi; - std::string m_GbrUl; - bool m_GbrUlIsSet; - std::string m_GbrDl; - bool m_GbrDlIsSet; - + std::string m_GbrUl; + bool m_GbrUlIsSet; + std::string m_GbrDl; + bool m_GbrDlIsSet; }; } // namespace model diff --git a/src/api-server/model/RequestedQosMonitoringParameter.cpp b/src/api-server/model/RequestedQosMonitoringParameter.cpp old mode 100755 new mode 100644 index e68171b..9313b4f --- a/src/api-server/model/RequestedQosMonitoringParameter.cpp +++ b/src/api-server/model/RequestedQosMonitoringParameter.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,72 @@ namespace oai { namespace pcf { namespace model { -RequestedQosMonitoringParameter::RequestedQosMonitoringParameter() -{ - -} +RequestedQosMonitoringParameter::RequestedQosMonitoringParameter() {} -void RequestedQosMonitoringParameter::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool RequestedQosMonitoringParameter::operator!=(const RequestedQosMonitoringParameter& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, RequestedQosMonitoringParameter& o) { + from_json(j, o.m_value); } -RequestedQosMonitoringParameter_anyOf RequestedQosMonitoringParameter::getValue() const -{ - return m_value; +RequestedQosMonitoringParameter_anyOf +RequestedQosMonitoringParameter::getValue() const { + return m_value; } -void RequestedQosMonitoringParameter::setValue(RequestedQosMonitoringParameter_anyOf value) -{ - m_value = value; +void RequestedQosMonitoringParameter::setValue( + RequestedQosMonitoringParameter_anyOf value) { + m_value = value; } -RequestedQosMonitoringParameter_anyOf::eRequestedQosMonitoringParameter_anyOf RequestedQosMonitoringParameter::getEnumValue() const -{ - return m_value.getValue(); +RequestedQosMonitoringParameter_anyOf::eRequestedQosMonitoringParameter_anyOf +RequestedQosMonitoringParameter::getEnumValue() const { + return m_value.getValue(); } -void RequestedQosMonitoringParameter::setEnumValue(RequestedQosMonitoringParameter_anyOf::eRequestedQosMonitoringParameter_anyOf value) -{ - m_value.setValue(value); +void RequestedQosMonitoringParameter::setEnumValue( + RequestedQosMonitoringParameter_anyOf:: + eRequestedQosMonitoringParameter_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/RequestedQosMonitoringParameter.h b/src/api-server/model/RequestedQosMonitoringParameter.h old mode 100755 new mode 100644 index 48ac5e1..490cf40 --- a/src/api-server/model/RequestedQosMonitoringParameter.h +++ b/src/api-server/model/RequestedQosMonitoringParameter.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,49 +27,54 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RequestedQosMonitoringParameter -{ -public: - RequestedQosMonitoringParameter(); - virtual ~RequestedQosMonitoringParameter() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const RequestedQosMonitoringParameter& rhs) const; + bool operator!=(const RequestedQosMonitoringParameter& rhs) const; - ///////////////////////////////////////////// - /// RequestedQosMonitoringParameter members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + RequestedQosMonitoringParameter_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/RequestedQosMonitoringParameter_anyOf.cpp b/src/api-server/model/RequestedQosMonitoringParameter_anyOf.cpp old mode 100755 new mode 100644 index e038cbd..2f11ef8 --- a/src/api-server/model/RequestedQosMonitoringParameter_anyOf.cpp +++ b/src/api-server/model/RequestedQosMonitoringParameter_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,103 +20,105 @@ namespace oai { namespace pcf { namespace model { -RequestedQosMonitoringParameter_anyOf::RequestedQosMonitoringParameter_anyOf() -{ - +RequestedQosMonitoringParameter_anyOf::RequestedQosMonitoringParameter_anyOf() { + } -void RequestedQosMonitoringParameter_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == RequestedQosMonitoringParameter_anyOf:: + eRequestedQosMonitoringParameter_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool RequestedQosMonitoringParameter_anyOf::operator!=( + const RequestedQosMonitoringParameter_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +RequestedQosMonitoringParameter_anyOf::eRequestedQosMonitoringParameter_anyOf +RequestedQosMonitoringParameter_anyOf::getValue() const { + return m_value; } -void RequestedQosMonitoringParameter_anyOf::setValue(RequestedQosMonitoringParameter_anyOf::eRequestedQosMonitoringParameter_anyOf value) -{ - m_value = value; +void RequestedQosMonitoringParameter_anyOf::setValue( + RequestedQosMonitoringParameter_anyOf:: + eRequestedQosMonitoringParameter_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/RequestedQosMonitoringParameter_anyOf.h b/src/api-server/model/RequestedQosMonitoringParameter_anyOf.h old mode 100755 new mode 100644 index da2b696..327a890 --- a/src/api-server/model/RequestedQosMonitoringParameter_anyOf.h +++ b/src/api-server/model/RequestedQosMonitoringParameter_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,54 +26,62 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RequestedQosMonitoringParameter_anyOf -{ -public: - RequestedQosMonitoringParameter_anyOf(); - virtual ~RequestedQosMonitoringParameter_anyOf() = default; +class RequestedQosMonitoringParameter_anyOf { + public: + RequestedQosMonitoringParameter_anyOf(); + virtual ~RequestedQosMonitoringParameter_anyOf() = default; - enum class eRequestedQosMonitoringParameter_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const RequestedQosMonitoringParameter_anyOf& rhs) const; + bool operator!=(const RequestedQosMonitoringParameter_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// RequestedQosMonitoringParameter_anyOf members - bool operator==(const RequestedQosMonitoringParameter_anyOf& rhs) const; - bool operator!=(const RequestedQosMonitoringParameter_anyOf& rhs) const; + RequestedQosMonitoringParameter_anyOf::eRequestedQosMonitoringParameter_anyOf + getValue() const; + void setValue(RequestedQosMonitoringParameter_anyOf:: + eRequestedQosMonitoringParameter_anyOf value); - ///////////////////////////////////////////// - /// RequestedQosMonitoringParameter_anyOf members + friend void to_json( + nlohmann::json& j, const RequestedQosMonitoringParameter_anyOf& o); + friend void from_json( + const nlohmann::json& j, RequestedQosMonitoringParameter_anyOf& o); - 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; + protected: + RequestedQosMonitoringParameter_anyOf::eRequestedQosMonitoringParameter_anyOf + m_value = RequestedQosMonitoringParameter_anyOf:: + eRequestedQosMonitoringParameter_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/RequestedRuleData.cpp b/src/api-server/model/RequestedRuleData.cpp old mode 100755 new mode 100644 index 39c13b1..9c81f0e --- a/src/api-server/model/RequestedRuleData.cpp +++ b/src/api-server/model/RequestedRuleData.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,138 +20,111 @@ namespace oai { namespace pcf { namespace model { -RequestedRuleData::RequestedRuleData() -{ - -} +RequestedRuleData::RequestedRuleData() {} -void RequestedRuleData::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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++; - } - } +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;"; } - - - /* 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) + "]"; - + { // 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++; - } - } + i++; + } } - - return success; + } + + return success; } -bool RequestedRuleData::operator==(const RequestedRuleData& rhs) const -{ - return - - - (getRefPccRuleIds() == rhs.getRefPccRuleIds()) - && - - (getReqData() == rhs.getReqData()) - - - ; +bool RequestedRuleData::operator==(const RequestedRuleData& rhs) const { + return + + (getRefPccRuleIds() == rhs.getRefPccRuleIds()) && + + (getReqData() == rhs.getReqData()) + + ; } -bool RequestedRuleData::operator!=(const RequestedRuleData& rhs) const -{ - return !(*this == rhs); +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 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); - +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; +std::vector<std::string> RequestedRuleData::getRefPccRuleIds() const { + return m_RefPccRuleIds; } -void RequestedRuleData::setRefPccRuleIds(std::vector<std::string> const& value) -{ - m_RefPccRuleIds = value; +void RequestedRuleData::setRefPccRuleIds( + std::vector<std::string> const& value) { + m_RefPccRuleIds = value; } -std::vector<RequestedRuleDataType> RequestedRuleData::getReqData() const -{ - return m_ReqData; +std::vector<RequestedRuleDataType> RequestedRuleData::getReqData() const { + return m_ReqData; } -void RequestedRuleData::setReqData(std::vector<RequestedRuleDataType> const& value) -{ - m_ReqData = value; +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 old mode 100755 new mode 100644 index 7073090..fab0878 --- a/src/api-server/model/RequestedRuleData.h +++ b/src/api-server/model/RequestedRuleData.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -29,57 +29,57 @@ 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; - - +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 diff --git a/src/api-server/model/RequestedRuleDataType.cpp b/src/api-server/model/RequestedRuleDataType.cpp old mode 100755 new mode 100644 index 7773d0d..7615f8d --- a/src/api-server/model/RequestedRuleDataType.cpp +++ b/src/api-server/model/RequestedRuleDataType.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -RequestedRuleDataType::RequestedRuleDataType() -{ - -} +RequestedRuleDataType::RequestedRuleDataType() {} -void RequestedRuleDataType::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool RequestedRuleDataType::operator!=(const RequestedRuleDataType& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, RequestedRuleDataType& o) { + from_json(j, o.m_value); } -RequestedRuleDataType_anyOf RequestedRuleDataType::getValue() const -{ - return m_value; +RequestedRuleDataType_anyOf RequestedRuleDataType::getValue() const { + return m_value; } -void RequestedRuleDataType::setValue(RequestedRuleDataType_anyOf value) -{ - m_value = value; +void RequestedRuleDataType::setValue(RequestedRuleDataType_anyOf value) { + m_value = value; } -RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf RequestedRuleDataType::getEnumValue() const -{ - return m_value.getValue(); +RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf +RequestedRuleDataType::getEnumValue() const { + return m_value.getValue(); } -void RequestedRuleDataType::setEnumValue(RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf value) -{ - m_value.setValue(value); +void RequestedRuleDataType::setEnumValue( + RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/RequestedRuleDataType.h b/src/api-server/model/RequestedRuleDataType.h old mode 100755 new mode 100644 index 23c0be5..7b9a4a9 --- a/src/api-server/model/RequestedRuleDataType.h +++ b/src/api-server/model/RequestedRuleDataType.h @@ -1,24 +1,31 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -27,49 +34,58 @@ 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. +/// 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; - +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. 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> + /// 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; + /// <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; + bool operator==(const RequestedRuleDataType& rhs) const; + bool operator!=(const RequestedRuleDataType& rhs) const; - ///////////////////////////////////////////// - /// RequestedRuleDataType members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + RequestedRuleDataType_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/RequestedRuleDataType_anyOf.cpp b/src/api-server/model/RequestedRuleDataType_anyOf.cpp old mode 100755 new mode 100644 index 59573c4..c52afa7 --- a/src/api-server/model/RequestedRuleDataType_anyOf.cpp +++ b/src/api-server/model/RequestedRuleDataType_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,121 +20,116 @@ namespace oai { namespace pcf { namespace model { -RequestedRuleDataType_anyOf::RequestedRuleDataType_anyOf() -{ - -} +RequestedRuleDataType_anyOf::RequestedRuleDataType_anyOf() {} -void RequestedRuleDataType_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool RequestedRuleDataType_anyOf::operator!=( + const RequestedRuleDataType_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf +RequestedRuleDataType_anyOf::getValue() const { + return m_value; } -void RequestedRuleDataType_anyOf::setValue(RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf value) -{ - m_value = value; +void RequestedRuleDataType_anyOf::setValue( + RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/RequestedRuleDataType_anyOf.h b/src/api-server/model/RequestedRuleDataType_anyOf.h old mode 100755 new mode 100644 index c0ea185..35dc462 --- a/src/api-server/model/RequestedRuleDataType_anyOf.h +++ b/src/api-server/model/RequestedRuleDataType_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,57 +26,62 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RequestedRuleDataType_anyOf -{ -public: - RequestedRuleDataType_anyOf(); - virtual ~RequestedRuleDataType_anyOf() = default; +class RequestedRuleDataType_anyOf { + public: + RequestedRuleDataType_anyOf(); + virtual ~RequestedRuleDataType_anyOf() = default; - enum class eRequestedRuleDataType_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const RequestedRuleDataType_anyOf& rhs) const; + bool operator!=(const RequestedRuleDataType_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// RequestedRuleDataType_anyOf members - bool operator==(const RequestedRuleDataType_anyOf& rhs) const; - bool operator!=(const RequestedRuleDataType_anyOf& rhs) const; + RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf getValue() const; + void setValue( + RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf value); - ///////////////////////////////////////////// - /// RequestedRuleDataType_anyOf members + friend void to_json(nlohmann::json& j, const RequestedRuleDataType_anyOf& o); + friend void from_json( + const nlohmann::json& j, RequestedRuleDataType_anyOf& o); - 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; + protected: + RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf m_value = + RequestedRuleDataType_anyOf::eRequestedRuleDataType_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/RequestedUsageData.cpp b/src/api-server/model/RequestedUsageData.cpp old mode 100755 new mode 100644 index abee1a1..f067151 --- a/src/api-server/model/RequestedUsageData.cpp +++ b/src/api-server/model/RequestedUsageData.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,142 +20,114 @@ namespace oai { namespace pcf { namespace model { -RequestedUsageData::RequestedUsageData() -{ - m_RefUmIdsIsSet = false; - m_AllUmIds = false; - m_AllUmIdsIsSet = false; - +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()); - } +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 -{ - 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++; - } - } +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; + } + + 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 diff --git a/src/api-server/model/RequestedUsageData.h b/src/api-server/model/RequestedUsageData.h old mode 100755 new mode 100644 index f5097fa..cce499d --- a/src/api-server/model/RequestedUsageData.h +++ b/src/api-server/model/RequestedUsageData.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,61 +28,65 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RequestedUsageData -{ -public: - RequestedUsageData(); - virtual ~RequestedUsageData() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const RequestedUsageData& rhs) const; - bool operator!=(const RequestedUsageData& rhs) const; + ///////////////////////////////////////////// + /// RequestedUsageData members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; - + protected: + std::vector<std::string> m_RefUmIds; + bool m_RefUmIdsIsSet; + bool m_AllUmIds; + bool m_AllUmIdsIsSet; }; } // namespace model diff --git a/src/api-server/model/RouteInformation.cpp b/src/api-server/model/RouteInformation.cpp old mode 100755 new mode 100644 index 2bdf3ed..0fee61e --- a/src/api-server/model/RouteInformation.cpp +++ b/src/api-server/model/RouteInformation.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "RouteInformation.h" #include "Helpers.h" @@ -20,153 +20,120 @@ namespace oai { namespace pcf { namespace model { -RouteInformation::RouteInformation() -{ - m_Ipv4Addr = ""; - m_Ipv4AddrIsSet = false; - m_Ipv6AddrIsSet = false; - m_PortNumber = 0; - -} - -void RouteInformation::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +RouteInformation::RouteInformation() { + m_Ipv4Addr = ""; + m_Ipv4AddrIsSet = false; + m_Ipv6AddrIsSet = false; + m_PortNumber = 0; } -bool RouteInformation::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +void RouteInformation::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool RouteInformation::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "RouteInformation" : pathPrefix; +bool RouteInformation::validate(std::stringstream& msg) const { + return validate(msg, ""); +} - - if (ipv4AddrIsSet()) - { - const std::string& value = m_Ipv4Addr; - const std::string currentValuePath = _pathPrefix + ".ipv4Addr"; - - +bool RouteInformation::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "RouteInformation" : pathPrefix; - } - - - /* PortNumber */ { - 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;"; - } + if (ipv4AddrIsSet()) { + const std::string& value = m_Ipv4Addr; + const std::string currentValuePath = _pathPrefix + ".ipv4Addr"; + } + /* PortNumber */ { + 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 RouteInformation::operator==(const RouteInformation& rhs) const -{ - return - - - - ((!ipv4AddrIsSet() && !rhs.ipv4AddrIsSet()) || (ipv4AddrIsSet() && rhs.ipv4AddrIsSet() && getIpv4Addr() == rhs.getIpv4Addr())) && - - - ((!ipv6AddrIsSet() && !rhs.ipv6AddrIsSet()) || (ipv6AddrIsSet() && rhs.ipv6AddrIsSet() && getIpv6Addr() == rhs.getIpv6Addr())) && - - (getPortNumber() == rhs.getPortNumber()) - - - ; -} - -bool RouteInformation::operator!=(const RouteInformation& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RouteInformation& o) -{ - j = nlohmann::json(); - if(o.ipv4AddrIsSet()) - j["ipv4Addr"] = o.m_Ipv4Addr; - if(o.ipv6AddrIsSet()) - j["ipv6Addr"] = o.m_Ipv6Addr; - j["portNumber"] = o.m_PortNumber; - -} - -void from_json(const nlohmann::json& j, RouteInformation& o) -{ - if(j.find("ipv4Addr") != j.end()) - { - j.at("ipv4Addr").get_to(o.m_Ipv4Addr); - o.m_Ipv4AddrIsSet = true; - } - if(j.find("ipv6Addr") != j.end()) - { - j.at("ipv6Addr").get_to(o.m_Ipv6Addr); - o.m_Ipv6AddrIsSet = true; - } - j.at("portNumber").get_to(o.m_PortNumber); - -} - -std::string RouteInformation::getIpv4Addr() const -{ - return m_Ipv4Addr; -} -void RouteInformation::setIpv4Addr(std::string const& value) -{ - m_Ipv4Addr = value; - m_Ipv4AddrIsSet = true; -} -bool RouteInformation::ipv4AddrIsSet() const -{ - return m_Ipv4AddrIsSet; -} -void RouteInformation::unsetIpv4Addr() -{ - m_Ipv4AddrIsSet = false; -} -Ipv6Addr RouteInformation::getIpv6Addr() const -{ - return m_Ipv6Addr; -} -void RouteInformation::setIpv6Addr(Ipv6Addr const& value) -{ - m_Ipv6Addr = value; - m_Ipv6AddrIsSet = true; -} -bool RouteInformation::ipv6AddrIsSet() const -{ - return m_Ipv6AddrIsSet; -} -void RouteInformation::unsetIpv6Addr() -{ - m_Ipv6AddrIsSet = false; -} -int32_t RouteInformation::getPortNumber() const -{ - return m_PortNumber; -} -void RouteInformation::setPortNumber(int32_t const value) -{ - m_PortNumber = value; + } + + return success; +} + +bool RouteInformation::operator==(const RouteInformation& rhs) const { + return + + ((!ipv4AddrIsSet() && !rhs.ipv4AddrIsSet()) || + (ipv4AddrIsSet() && rhs.ipv4AddrIsSet() && + getIpv4Addr() == rhs.getIpv4Addr())) && + + ((!ipv6AddrIsSet() && !rhs.ipv6AddrIsSet()) || + (ipv6AddrIsSet() && rhs.ipv6AddrIsSet() && + getIpv6Addr() == rhs.getIpv6Addr())) && + + (getPortNumber() == rhs.getPortNumber()) + + ; +} + +bool RouteInformation::operator!=(const RouteInformation& rhs) const { + return !(*this == rhs); } +void to_json(nlohmann::json& j, const RouteInformation& o) { + j = nlohmann::json(); + if (o.ipv4AddrIsSet()) j["ipv4Addr"] = o.m_Ipv4Addr; + if (o.ipv6AddrIsSet()) j["ipv6Addr"] = o.m_Ipv6Addr; + j["portNumber"] = o.m_PortNumber; +} + +void from_json(const nlohmann::json& j, RouteInformation& o) { + if (j.find("ipv4Addr") != j.end()) { + j.at("ipv4Addr").get_to(o.m_Ipv4Addr); + o.m_Ipv4AddrIsSet = true; + } + if (j.find("ipv6Addr") != j.end()) { + j.at("ipv6Addr").get_to(o.m_Ipv6Addr); + o.m_Ipv6AddrIsSet = true; + } + j.at("portNumber").get_to(o.m_PortNumber); +} + +std::string RouteInformation::getIpv4Addr() const { + return m_Ipv4Addr; +} +void RouteInformation::setIpv4Addr(std::string const& value) { + m_Ipv4Addr = value; + m_Ipv4AddrIsSet = true; +} +bool RouteInformation::ipv4AddrIsSet() const { + return m_Ipv4AddrIsSet; +} +void RouteInformation::unsetIpv4Addr() { + m_Ipv4AddrIsSet = false; +} +Ipv6Addr RouteInformation::getIpv6Addr() const { + return m_Ipv6Addr; +} +void RouteInformation::setIpv6Addr(Ipv6Addr const& value) { + m_Ipv6Addr = value; + m_Ipv6AddrIsSet = true; +} +bool RouteInformation::ipv6AddrIsSet() const { + return m_Ipv6AddrIsSet; +} +void RouteInformation::unsetIpv6Addr() { + m_Ipv6AddrIsSet = false; +} +int32_t RouteInformation::getPortNumber() const { + return m_PortNumber; +} +void RouteInformation::setPortNumber(int32_t const value) { + m_PortNumber = value; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/RouteInformation.h b/src/api-server/model/RouteInformation.h old mode 100755 new mode 100644 index f6b7def..1fcc4e6 --- a/src/api-server/model/RouteInformation.h +++ b/src/api-server/model/RouteInformation.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * RouteInformation.h * - * + * */ #ifndef RouteInformation_H_ #define RouteInformation_H_ - #include <string> #include "Ipv6Addr.h" #include <nlohmann/json.hpp> @@ -28,68 +28,66 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RouteInformation -{ -public: - RouteInformation(); - virtual ~RouteInformation() = default; - +class RouteInformation { + public: + RouteInformation(); + virtual ~RouteInformation() = 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. 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> + /// 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; + /// <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 RouteInformation& rhs) const; - bool operator!=(const RouteInformation& rhs) const; + bool operator==(const RouteInformation& rhs) const; + bool operator!=(const RouteInformation& rhs) const; - ///////////////////////////////////////////// - /// RouteInformation members + ///////////////////////////////////////////// + /// RouteInformation members - /// <summary> - /// - /// </summary> - std::string getIpv4Addr() const; - void setIpv4Addr(std::string const& value); - bool ipv4AddrIsSet() const; - void unsetIpv4Addr(); - /// <summary> - /// - /// </summary> - Ipv6Addr getIpv6Addr() const; - void setIpv6Addr(Ipv6Addr const& value); - bool ipv6AddrIsSet() const; - void unsetIpv6Addr(); - /// <summary> - /// - /// </summary> - int32_t getPortNumber() const; - void setPortNumber(int32_t const value); + /// <summary> + /// + /// </summary> + std::string getIpv4Addr() const; + void setIpv4Addr(std::string const& value); + bool ipv4AddrIsSet() const; + void unsetIpv4Addr(); + /// <summary> + /// + /// </summary> + Ipv6Addr getIpv6Addr() const; + void setIpv6Addr(Ipv6Addr const& value); + bool ipv6AddrIsSet() const; + void unsetIpv6Addr(); + /// <summary> + /// + /// </summary> + int32_t getPortNumber() const; + void setPortNumber(int32_t const value); - friend void to_json(nlohmann::json& j, const RouteInformation& o); - friend void from_json(const nlohmann::json& j, RouteInformation& o); -protected: - std::string m_Ipv4Addr; - bool m_Ipv4AddrIsSet; - Ipv6Addr m_Ipv6Addr; - bool m_Ipv6AddrIsSet; - int32_t m_PortNumber; + friend void to_json(nlohmann::json& j, const RouteInformation& o); + friend void from_json(const nlohmann::json& j, RouteInformation& o); - + protected: + std::string m_Ipv4Addr; + bool m_Ipv4AddrIsSet; + Ipv6Addr m_Ipv6Addr; + bool m_Ipv6AddrIsSet; + int32_t m_PortNumber; }; } // namespace model diff --git a/src/api-server/model/RouteToLocation.cpp b/src/api-server/model/RouteToLocation.cpp old mode 100755 new mode 100644 index bff1c80..eb5cd64 --- a/src/api-server/model/RouteToLocation.cpp +++ b/src/api-server/model/RouteToLocation.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "RouteToLocation.h" #include "Helpers.h" @@ -20,130 +20,105 @@ namespace oai { namespace pcf { namespace model { -RouteToLocation::RouteToLocation() -{ - m_Dnai = ""; - m_RouteInfoIsSet = false; - m_RouteProfId = ""; - m_RouteProfIdIsSet = false; - -} - -void RouteToLocation::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool RouteToLocation::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool RouteToLocation::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "RouteToLocation" : pathPrefix; - - - return success; -} - -bool RouteToLocation::operator==(const RouteToLocation& rhs) const -{ - return - - - (getDnai() == rhs.getDnai()) - && - - - ((!routeInfoIsSet() && !rhs.routeInfoIsSet()) || (routeInfoIsSet() && rhs.routeInfoIsSet() && getRouteInfo() == rhs.getRouteInfo())) && - - - ((!routeProfIdIsSet() && !rhs.routeProfIdIsSet()) || (routeProfIdIsSet() && rhs.routeProfIdIsSet() && getRouteProfId() == rhs.getRouteProfId())) - - ; -} - -bool RouteToLocation::operator!=(const RouteToLocation& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const RouteToLocation& o) -{ - j = nlohmann::json(); - j["dnai"] = o.m_Dnai; - if(o.routeInfoIsSet()) - j["routeInfo"] = o.m_RouteInfo; - if(o.routeProfIdIsSet()) - j["routeProfId"] = o.m_RouteProfId; - -} - -void from_json(const nlohmann::json& j, RouteToLocation& o) -{ - j.at("dnai").get_to(o.m_Dnai); - if(j.find("routeInfo") != j.end()) - { - j.at("routeInfo").get_to(o.m_RouteInfo); - o.m_RouteInfoIsSet = true; - } - if(j.find("routeProfId") != j.end()) - { - j.at("routeProfId").get_to(o.m_RouteProfId); - o.m_RouteProfIdIsSet = true; - } - -} - -std::string RouteToLocation::getDnai() const -{ - return m_Dnai; -} -void RouteToLocation::setDnai(std::string const& value) -{ - m_Dnai = value; -} -RouteInformation RouteToLocation::getRouteInfo() const -{ - return m_RouteInfo; -} -void RouteToLocation::setRouteInfo(RouteInformation const& value) -{ - m_RouteInfo = value; - m_RouteInfoIsSet = true; -} -bool RouteToLocation::routeInfoIsSet() const -{ - return m_RouteInfoIsSet; -} -void RouteToLocation::unsetRouteInfo() -{ - m_RouteInfoIsSet = false; -} -std::string RouteToLocation::getRouteProfId() const -{ - return m_RouteProfId; -} -void RouteToLocation::setRouteProfId(std::string const& value) -{ - m_RouteProfId = value; - m_RouteProfIdIsSet = true; -} -bool RouteToLocation::routeProfIdIsSet() const -{ - return m_RouteProfIdIsSet; -} -void RouteToLocation::unsetRouteProfId() -{ - m_RouteProfIdIsSet = false; +RouteToLocation::RouteToLocation() { + m_Dnai = ""; + m_RouteInfoIsSet = false; + m_RouteProfId = ""; + m_RouteProfIdIsSet = false; +} + +void RouteToLocation::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool RouteToLocation::validate(std::stringstream& msg) const { + return validate(msg, ""); +} + +bool RouteToLocation::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "RouteToLocation" : pathPrefix; + + return success; +} + +bool RouteToLocation::operator==(const RouteToLocation& rhs) const { + return + + (getDnai() == rhs.getDnai()) && + + ((!routeInfoIsSet() && !rhs.routeInfoIsSet()) || + (routeInfoIsSet() && rhs.routeInfoIsSet() && + getRouteInfo() == rhs.getRouteInfo())) && + + ((!routeProfIdIsSet() && !rhs.routeProfIdIsSet()) || + (routeProfIdIsSet() && rhs.routeProfIdIsSet() && + getRouteProfId() == rhs.getRouteProfId())) + + ; +} + +bool RouteToLocation::operator!=(const RouteToLocation& rhs) const { + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const RouteToLocation& o) { + j = nlohmann::json(); + j["dnai"] = o.m_Dnai; + if (o.routeInfoIsSet()) j["routeInfo"] = o.m_RouteInfo; + if (o.routeProfIdIsSet()) j["routeProfId"] = o.m_RouteProfId; +} + +void from_json(const nlohmann::json& j, RouteToLocation& o) { + j.at("dnai").get_to(o.m_Dnai); + if (j.find("routeInfo") != j.end()) { + j.at("routeInfo").get_to(o.m_RouteInfo); + o.m_RouteInfoIsSet = true; + } + if (j.find("routeProfId") != j.end()) { + j.at("routeProfId").get_to(o.m_RouteProfId); + o.m_RouteProfIdIsSet = true; + } } +std::string RouteToLocation::getDnai() const { + return m_Dnai; +} +void RouteToLocation::setDnai(std::string const& value) { + m_Dnai = value; +} +RouteInformation RouteToLocation::getRouteInfo() const { + return m_RouteInfo; +} +void RouteToLocation::setRouteInfo(RouteInformation const& value) { + m_RouteInfo = value; + m_RouteInfoIsSet = true; +} +bool RouteToLocation::routeInfoIsSet() const { + return m_RouteInfoIsSet; +} +void RouteToLocation::unsetRouteInfo() { + m_RouteInfoIsSet = false; +} +std::string RouteToLocation::getRouteProfId() const { + return m_RouteProfId; +} +void RouteToLocation::setRouteProfId(std::string const& value) { + m_RouteProfId = value; + m_RouteProfIdIsSet = true; +} +bool RouteToLocation::routeProfIdIsSet() const { + return m_RouteProfIdIsSet; +} +void RouteToLocation::unsetRouteProfId() { + m_RouteProfIdIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/RouteToLocation.h b/src/api-server/model/RouteToLocation.h old mode 100755 new mode 100644 index 35ef84f..ca0c7b5 --- a/src/api-server/model/RouteToLocation.h +++ b/src/api-server/model/RouteToLocation.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * RouteToLocation.h * - * + * */ #ifndef RouteToLocation_H_ #define RouteToLocation_H_ - #include <string> #include "RouteInformation.h" #include <nlohmann/json.hpp> @@ -28,68 +28,67 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RouteToLocation -{ -public: - RouteToLocation(); - virtual ~RouteToLocation() = default; +class RouteToLocation { + public: + RouteToLocation(); + virtual ~RouteToLocation() = 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. 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> - /// 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; - /// <summary> - /// Helper overload for validate. Used when one model stores another model and calls it's validate. - /// Not meant to be called outside that case. - /// </summary> - bool validate(std::stringstream& msg, const std::string& pathPrefix) const; + bool operator==(const RouteToLocation& rhs) const; + bool operator!=(const RouteToLocation& rhs) const; - bool operator==(const RouteToLocation& rhs) const; - bool operator!=(const RouteToLocation& rhs) const; + ///////////////////////////////////////////// + /// RouteToLocation members - ///////////////////////////////////////////// - /// RouteToLocation members + /// <summary> + /// + /// </summary> + std::string getDnai() const; + void setDnai(std::string const& value); + /// <summary> + /// + /// </summary> + RouteInformation getRouteInfo() const; + void setRouteInfo(RouteInformation const& value); + bool routeInfoIsSet() const; + void unsetRouteInfo(); + /// <summary> + /// + /// </summary> + std::string getRouteProfId() const; + void setRouteProfId(std::string const& value); + bool routeProfIdIsSet() const; + void unsetRouteProfId(); - /// <summary> - /// - /// </summary> - std::string getDnai() const; - void setDnai(std::string const& value); - /// <summary> - /// - /// </summary> - RouteInformation getRouteInfo() const; - void setRouteInfo(RouteInformation const& value); - bool routeInfoIsSet() const; - void unsetRouteInfo(); - /// <summary> - /// - /// </summary> - std::string getRouteProfId() const; - void setRouteProfId(std::string const& value); - bool routeProfIdIsSet() const; - void unsetRouteProfId(); + friend void to_json(nlohmann::json& j, const RouteToLocation& o); + friend void from_json(const nlohmann::json& j, RouteToLocation& o); - friend void to_json(nlohmann::json& j, const RouteToLocation& o); - friend void from_json(const nlohmann::json& j, RouteToLocation& o); -protected: - std::string m_Dnai; + protected: + std::string m_Dnai; - RouteInformation m_RouteInfo; - bool m_RouteInfoIsSet; - std::string m_RouteProfId; - bool m_RouteProfIdIsSet; - + RouteInformation m_RouteInfo; + bool m_RouteInfoIsSet; + std::string m_RouteProfId; + bool m_RouteProfIdIsSet; }; } // namespace model diff --git a/src/api-server/model/RoutingAreaId.cpp b/src/api-server/model/RoutingAreaId.cpp old mode 100755 new mode 100644 index 2421619..23d1b00 --- a/src/api-server/model/RoutingAreaId.cpp +++ b/src/api-server/model/RoutingAreaId.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "RoutingAreaId.h" #include "Helpers.h" @@ -20,119 +20,90 @@ namespace oai { namespace pcf { namespace model { -RoutingAreaId::RoutingAreaId() -{ - m_Lac = ""; - m_Rac = ""; - +RoutingAreaId::RoutingAreaId() { + m_Lac = ""; + m_Rac = ""; } -void RoutingAreaId::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void RoutingAreaId::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool RoutingAreaId::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool RoutingAreaId::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool RoutingAreaId::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "RoutingAreaId" : pathPrefix; - - - - /* Lac */ { - const std::string& value = m_Lac; - const std::string currentValuePath = _pathPrefix + ".lac"; - - - - } - - - /* Rac */ { - const std::string& value = m_Rac; - const std::string currentValuePath = _pathPrefix + ".rac"; - - - - } - - return success; +bool RoutingAreaId::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "RoutingAreaId" : pathPrefix; + + /* Lac */ { + const std::string& value = m_Lac; + const std::string currentValuePath = _pathPrefix + ".lac"; + } + + /* Rac */ { + const std::string& value = m_Rac; + const std::string currentValuePath = _pathPrefix + ".rac"; + } + + return success; } -bool RoutingAreaId::operator==(const RoutingAreaId& rhs) const -{ - return - - - (getPlmnId() == rhs.getPlmnId()) - && - - (getLac() == rhs.getLac()) - && - - (getRac() == rhs.getRac()) - - - ; +bool RoutingAreaId::operator==(const RoutingAreaId& rhs) const { + return + + (getPlmnId() == rhs.getPlmnId()) && + + (getLac() == rhs.getLac()) && + + (getRac() == rhs.getRac()) + + ; } -bool RoutingAreaId::operator!=(const RoutingAreaId& rhs) const -{ - return !(*this == rhs); +bool RoutingAreaId::operator!=(const RoutingAreaId& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const RoutingAreaId& o) -{ - j = nlohmann::json(); - j["plmnId"] = o.m_PlmnId; - j["lac"] = o.m_Lac; - j["rac"] = o.m_Rac; - +void to_json(nlohmann::json& j, const RoutingAreaId& o) { + j = nlohmann::json(); + j["plmnId"] = o.m_PlmnId; + j["lac"] = o.m_Lac; + j["rac"] = o.m_Rac; } -void from_json(const nlohmann::json& j, RoutingAreaId& o) -{ - j.at("plmnId").get_to(o.m_PlmnId); - j.at("lac").get_to(o.m_Lac); - j.at("rac").get_to(o.m_Rac); - +void from_json(const nlohmann::json& j, RoutingAreaId& o) { + j.at("plmnId").get_to(o.m_PlmnId); + j.at("lac").get_to(o.m_Lac); + j.at("rac").get_to(o.m_Rac); } -PlmnId RoutingAreaId::getPlmnId() const -{ - return m_PlmnId; +PlmnId RoutingAreaId::getPlmnId() const { + return m_PlmnId; } -void RoutingAreaId::setPlmnId(PlmnId const& value) -{ - m_PlmnId = value; +void RoutingAreaId::setPlmnId(PlmnId const& value) { + m_PlmnId = value; } -std::string RoutingAreaId::getLac() const -{ - return m_Lac; +std::string RoutingAreaId::getLac() const { + return m_Lac; } -void RoutingAreaId::setLac(std::string const& value) -{ - m_Lac = value; +void RoutingAreaId::setLac(std::string const& value) { + m_Lac = value; } -std::string RoutingAreaId::getRac() const -{ - return m_Rac; +std::string RoutingAreaId::getRac() const { + return m_Rac; } -void RoutingAreaId::setRac(std::string const& value) -{ - m_Rac = value; +void RoutingAreaId::setRac(std::string const& value) { + m_Rac = value; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/RoutingAreaId.h b/src/api-server/model/RoutingAreaId.h old mode 100755 new mode 100644 index 8d761f5..c856cc4 --- a/src/api-server/model/RoutingAreaId.h +++ b/src/api-server/model/RoutingAreaId.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * RoutingAreaId.h * - * + * */ #ifndef RoutingAreaId_H_ #define RoutingAreaId_H_ - #include <string> #include "PlmnId.h" #include <nlohmann/json.hpp> @@ -28,64 +28,62 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RoutingAreaId -{ -public: - RoutingAreaId(); - virtual ~RoutingAreaId() = 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 RoutingAreaId& rhs) const; - bool operator!=(const RoutingAreaId& rhs) const; - - ///////////////////////////////////////////// - /// RoutingAreaId members - - /// <summary> - /// - /// </summary> - PlmnId getPlmnId() const; - void setPlmnId(PlmnId const& value); - /// <summary> - /// - /// </summary> - std::string getLac() const; - void setLac(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getRac() const; - void setRac(std::string const& value); - - friend void to_json(nlohmann::json& j, const RoutingAreaId& o); - friend void from_json(const nlohmann::json& j, RoutingAreaId& o); -protected: - PlmnId m_PlmnId; - - std::string m_Lac; - - std::string m_Rac; - - +class RoutingAreaId { + public: + RoutingAreaId(); + virtual ~RoutingAreaId() = 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 RoutingAreaId& rhs) const; + bool operator!=(const RoutingAreaId& rhs) const; + + ///////////////////////////////////////////// + /// RoutingAreaId members + + /// <summary> + /// + /// </summary> + PlmnId getPlmnId() const; + void setPlmnId(PlmnId const& value); + /// <summary> + /// + /// </summary> + std::string getLac() const; + void setLac(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getRac() const; + void setRac(std::string const& value); + + friend void to_json(nlohmann::json& j, const RoutingAreaId& o); + friend void from_json(const nlohmann::json& j, RoutingAreaId& o); + + protected: + PlmnId m_PlmnId; + + std::string m_Lac; + + std::string m_Rac; }; } // namespace model diff --git a/src/api-server/model/RuleOperation.cpp b/src/api-server/model/RuleOperation.cpp old mode 100755 new mode 100644 index b9a04fd..4e905fe --- a/src/api-server/model/RuleOperation.cpp +++ b/src/api-server/model/RuleOperation.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,66 @@ namespace oai { namespace pcf { namespace model { -RuleOperation::RuleOperation() -{ - -} +RuleOperation::RuleOperation() {} -void RuleOperation::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool RuleOperation::operator!=(const RuleOperation& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, RuleOperation& o) { + from_json(j, o.m_value); } -RuleOperation_anyOf RuleOperation::getValue() const -{ - return m_value; +RuleOperation_anyOf RuleOperation::getValue() const { + return m_value; } -void RuleOperation::setValue(RuleOperation_anyOf value) -{ - m_value = value; +void RuleOperation::setValue(RuleOperation_anyOf value) { + m_value = value; } -RuleOperation_anyOf::eRuleOperation_anyOf RuleOperation::getEnumValue() const -{ - return m_value.getValue(); +RuleOperation_anyOf::eRuleOperation_anyOf RuleOperation::getEnumValue() const { + return m_value.getValue(); } -void RuleOperation::setEnumValue(RuleOperation_anyOf::eRuleOperation_anyOf value) -{ - m_value.setValue(value); +void RuleOperation::setEnumValue( + RuleOperation_anyOf::eRuleOperation_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/RuleOperation.h b/src/api-server/model/RuleOperation.h old mode 100755 new mode 100644 index 1a14d21..ea646aa --- a/src/api-server/model/RuleOperation.h +++ b/src/api-server/model/RuleOperation.h @@ -1,24 +1,33 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -27,49 +36,58 @@ 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. +/// 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; - +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. 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> + /// 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; + /// <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; + bool operator==(const RuleOperation& rhs) const; + bool operator!=(const RuleOperation& rhs) const; - ///////////////////////////////////////////// - /// RuleOperation members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + RuleOperation_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/RuleOperation_anyOf.cpp b/src/api-server/model/RuleOperation_anyOf.cpp old mode 100755 new mode 100644 index 0bad743..b2c2bb5 --- a/src/api-server/model/RuleOperation_anyOf.cpp +++ b/src/api-server/model/RuleOperation_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,121 +20,112 @@ namespace oai { namespace pcf { namespace model { -RuleOperation_anyOf::RuleOperation_anyOf() -{ - -} +RuleOperation_anyOf::RuleOperation_anyOf() {} -void RuleOperation_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == RuleOperation_anyOf::eRuleOperation_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool RuleOperation_anyOf::operator!=(const RuleOperation_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +RuleOperation_anyOf::eRuleOperation_anyOf RuleOperation_anyOf::getValue() + const { + return m_value; } -void RuleOperation_anyOf::setValue(RuleOperation_anyOf::eRuleOperation_anyOf value) -{ - m_value = value; +void RuleOperation_anyOf::setValue( + RuleOperation_anyOf::eRuleOperation_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/RuleOperation_anyOf.h b/src/api-server/model/RuleOperation_anyOf.h old mode 100755 new mode 100644 index 677bd31..c9af126 --- a/src/api-server/model/RuleOperation_anyOf.h +++ b/src/api-server/model/RuleOperation_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,57 +26,59 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RuleOperation_anyOf -{ -public: - RuleOperation_anyOf(); - virtual ~RuleOperation_anyOf() = default; +class RuleOperation_anyOf { + public: + RuleOperation_anyOf(); + virtual ~RuleOperation_anyOf() = default; - enum class eRuleOperation_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const RuleOperation_anyOf& rhs) const; + bool operator!=(const RuleOperation_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// RuleOperation_anyOf members - bool operator==(const RuleOperation_anyOf& rhs) const; - bool operator!=(const RuleOperation_anyOf& rhs) const; + RuleOperation_anyOf::eRuleOperation_anyOf getValue() const; + void setValue(RuleOperation_anyOf::eRuleOperation_anyOf value); - ///////////////////////////////////////////// - /// RuleOperation_anyOf members + friend void to_json(nlohmann::json& j, const RuleOperation_anyOf& o); + friend void from_json(const nlohmann::json& j, RuleOperation_anyOf& o); - 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; + protected: + RuleOperation_anyOf::eRuleOperation_anyOf m_value = RuleOperation_anyOf:: + eRuleOperation_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/RuleReport.cpp b/src/api-server/model/RuleReport.cpp old mode 100755 new mode 100644 index 465adf6..db152af --- a/src/api-server/model/RuleReport.cpp +++ b/src/api-server/model/RuleReport.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,276 +20,224 @@ namespace oai { namespace pcf { namespace model { -RuleReport::RuleReport() -{ - m_ContVersIsSet = false; - m_FailureCodeIsSet = false; - m_FinUnitActIsSet = false; - m_RanNasRelCausesIsSet = false; - +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()); - } +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 { + 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; +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++; - } - } + /* 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;"; } - - 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++; - } - } + { // 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;"; } - - 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++; - } - } + { // 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;"; } - - return success; + { // 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 + + (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); +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 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; - } - +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; +std::vector<std::string> RuleReport::getPccRuleIds() const { + return m_PccRuleIds; } -void RuleReport::setPccRuleIds(std::vector<std::string> const& value) -{ - m_PccRuleIds = value; +void RuleReport::setPccRuleIds(std::vector<std::string> const& value) { + m_PccRuleIds = value; } -RuleStatus RuleReport::getRuleStatus() const -{ - return m_RuleStatus; +RuleStatus RuleReport::getRuleStatus() const { + return m_RuleStatus; } -void RuleReport::setRuleStatus(RuleStatus const& value) -{ - m_RuleStatus = value; +void RuleReport::setRuleStatus(RuleStatus const& value) { + m_RuleStatus = value; } -std::vector<int32_t> RuleReport::getContVers() const -{ - return m_ContVers; +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; +void RuleReport::setContVers(std::vector<int32_t> const value) { + m_ContVers = value; + m_ContVersIsSet = true; } -bool RuleReport::contVersIsSet() const -{ - return m_ContVersIsSet; +bool RuleReport::contVersIsSet() const { + return m_ContVersIsSet; } -void RuleReport::unsetContVers() -{ - m_ContVersIsSet = false; +void RuleReport::unsetContVers() { + m_ContVersIsSet = false; } -FailureCode RuleReport::getFailureCode() const -{ - return m_FailureCode; +FailureCode RuleReport::getFailureCode() const { + return m_FailureCode; } -void RuleReport::setFailureCode(FailureCode const& value) -{ - m_FailureCode = value; - m_FailureCodeIsSet = true; +void RuleReport::setFailureCode(FailureCode const& value) { + m_FailureCode = value; + m_FailureCodeIsSet = true; } -bool RuleReport::failureCodeIsSet() const -{ - return m_FailureCodeIsSet; +bool RuleReport::failureCodeIsSet() const { + return m_FailureCodeIsSet; } -void RuleReport::unsetFailureCode() -{ - m_FailureCodeIsSet = false; +void RuleReport::unsetFailureCode() { + m_FailureCodeIsSet = false; } -FinalUnitAction RuleReport::getFinUnitAct() const -{ - return m_FinUnitAct; +FinalUnitAction RuleReport::getFinUnitAct() const { + return m_FinUnitAct; } -void RuleReport::setFinUnitAct(FinalUnitAction const& value) -{ - m_FinUnitAct = value; - m_FinUnitActIsSet = true; +void RuleReport::setFinUnitAct(FinalUnitAction const& value) { + m_FinUnitAct = value; + m_FinUnitActIsSet = true; } -bool RuleReport::finUnitActIsSet() const -{ - return m_FinUnitActIsSet; +bool RuleReport::finUnitActIsSet() const { + return m_FinUnitActIsSet; } -void RuleReport::unsetFinUnitAct() -{ - m_FinUnitActIsSet = false; +void RuleReport::unsetFinUnitAct() { + m_FinUnitActIsSet = false; } -std::vector<RanNasRelCause> RuleReport::getRanNasRelCauses() const -{ - return m_RanNasRelCauses; +std::vector<RanNasRelCause> RuleReport::getRanNasRelCauses() const { + return m_RanNasRelCauses; } -void RuleReport::setRanNasRelCauses(std::vector<RanNasRelCause> const& value) -{ - m_RanNasRelCauses = value; - m_RanNasRelCausesIsSet = true; +void RuleReport::setRanNasRelCauses(std::vector<RanNasRelCause> const& value) { + m_RanNasRelCauses = value; + m_RanNasRelCausesIsSet = true; } -bool RuleReport::ranNasRelCausesIsSet() const -{ - return m_RanNasRelCausesIsSet; +bool RuleReport::ranNasRelCausesIsSet() const { + return m_RanNasRelCausesIsSet; } -void RuleReport::unsetRanNasRelCauses() -{ - m_RanNasRelCausesIsSet = false; +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 old mode 100755 new mode 100644 index b53e4e0..d434ba3 --- a/src/api-server/model/RuleReport.h +++ b/src/api-server/model/RuleReport.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -32,93 +32,92 @@ 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; - +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 diff --git a/src/api-server/model/RuleStatus.cpp b/src/api-server/model/RuleStatus.cpp old mode 100755 new mode 100644 index 905f317..e66fdc9 --- a/src/api-server/model/RuleStatus.cpp +++ b/src/api-server/model/RuleStatus.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,65 @@ namespace oai { namespace pcf { namespace model { -RuleStatus::RuleStatus() -{ - -} +RuleStatus::RuleStatus() {} -void RuleStatus::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool RuleStatus::operator!=(const RuleStatus& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, RuleStatus& o) { + from_json(j, o.m_value); } -RuleStatus_anyOf RuleStatus::getValue() const -{ - return m_value; +RuleStatus_anyOf RuleStatus::getValue() const { + return m_value; } -void RuleStatus::setValue(RuleStatus_anyOf value) -{ - m_value = value; +void RuleStatus::setValue(RuleStatus_anyOf value) { + m_value = value; } -RuleStatus_anyOf::eRuleStatus_anyOf RuleStatus::getEnumValue() const -{ - return m_value.getValue(); +RuleStatus_anyOf::eRuleStatus_anyOf RuleStatus::getEnumValue() const { + return m_value.getValue(); } -void RuleStatus::setEnumValue(RuleStatus_anyOf::eRuleStatus_anyOf value) -{ - m_value.setValue(value); +void RuleStatus::setEnumValue(RuleStatus_anyOf::eRuleStatus_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/RuleStatus.h b/src/api-server/model/RuleStatus.h old mode 100755 new mode 100644 index 826e3ff..d3b4e36 --- a/src/api-server/model/RuleStatus.h +++ b/src/api-server/model/RuleStatus.h @@ -1,24 +1,29 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -27,49 +32,53 @@ 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. +/// 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; - +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. 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> + /// 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; + /// <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; + bool operator==(const RuleStatus& rhs) const; + bool operator!=(const RuleStatus& rhs) const; - ///////////////////////////////////////////// - /// RuleStatus members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + RuleStatus_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/RuleStatus_anyOf.cpp b/src/api-server/model/RuleStatus_anyOf.cpp old mode 100755 new mode 100644 index befb1ec..b0afcf6 --- a/src/api-server/model/RuleStatus_anyOf.cpp +++ b/src/api-server/model/RuleStatus_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,97 +20,81 @@ namespace oai { namespace pcf { namespace model { -RuleStatus_anyOf::RuleStatus_anyOf() -{ - -} +RuleStatus_anyOf::RuleStatus_anyOf() {} -void RuleStatus_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == + RuleStatus_anyOf::eRuleStatus_anyOf::INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool RuleStatus_anyOf::operator!=(const RuleStatus_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +RuleStatus_anyOf::eRuleStatus_anyOf RuleStatus_anyOf::getValue() const { + return m_value; } -void RuleStatus_anyOf::setValue(RuleStatus_anyOf::eRuleStatus_anyOf value) -{ - m_value = value; +void RuleStatus_anyOf::setValue(RuleStatus_anyOf::eRuleStatus_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/RuleStatus_anyOf.h b/src/api-server/model/RuleStatus_anyOf.h old mode 100755 new mode 100644 index ec0da52..e3a4ec7 --- a/src/api-server/model/RuleStatus_anyOf.h +++ b/src/api-server/model/RuleStatus_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,53 +26,55 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class RuleStatus_anyOf -{ -public: - RuleStatus_anyOf(); - virtual ~RuleStatus_anyOf() = default; +class RuleStatus_anyOf { + public: + RuleStatus_anyOf(); + virtual ~RuleStatus_anyOf() = default; - enum class eRuleStatus_anyOf { + enum class eRuleStatus_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - ACTIVE, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const RuleStatus_anyOf& rhs) const; + bool operator!=(const RuleStatus_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// RuleStatus_anyOf members - bool operator==(const RuleStatus_anyOf& rhs) const; - bool operator!=(const RuleStatus_anyOf& rhs) const; + RuleStatus_anyOf::eRuleStatus_anyOf getValue() const; + void setValue(RuleStatus_anyOf::eRuleStatus_anyOf value); - ///////////////////////////////////////////// - /// RuleStatus_anyOf members + friend void to_json(nlohmann::json& j, const RuleStatus_anyOf& o); + friend void from_json(const nlohmann::json& j, RuleStatus_anyOf& o); - 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; + protected: + RuleStatus_anyOf::eRuleStatus_anyOf m_value = + RuleStatus_anyOf::eRuleStatus_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/ServiceAreaId.cpp b/src/api-server/model/ServiceAreaId.cpp old mode 100755 new mode 100644 index f0bcee6..18a25b5 --- a/src/api-server/model/ServiceAreaId.cpp +++ b/src/api-server/model/ServiceAreaId.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "ServiceAreaId.h" #include "Helpers.h" @@ -20,119 +20,90 @@ namespace oai { namespace pcf { namespace model { -ServiceAreaId::ServiceAreaId() -{ - m_Lac = ""; - m_Sac = ""; - +ServiceAreaId::ServiceAreaId() { + m_Lac = ""; + m_Sac = ""; } -void ServiceAreaId::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void ServiceAreaId::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool ServiceAreaId::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool ServiceAreaId::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool ServiceAreaId::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "ServiceAreaId" : pathPrefix; - - - - /* Lac */ { - const std::string& value = m_Lac; - const std::string currentValuePath = _pathPrefix + ".lac"; - - - - } - - - /* Sac */ { - const std::string& value = m_Sac; - const std::string currentValuePath = _pathPrefix + ".sac"; - - - - } - - return success; +bool ServiceAreaId::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "ServiceAreaId" : pathPrefix; + + /* Lac */ { + const std::string& value = m_Lac; + const std::string currentValuePath = _pathPrefix + ".lac"; + } + + /* Sac */ { + const std::string& value = m_Sac; + const std::string currentValuePath = _pathPrefix + ".sac"; + } + + return success; } -bool ServiceAreaId::operator==(const ServiceAreaId& rhs) const -{ - return - - - (getPlmnId() == rhs.getPlmnId()) - && - - (getLac() == rhs.getLac()) - && - - (getSac() == rhs.getSac()) - - - ; +bool ServiceAreaId::operator==(const ServiceAreaId& rhs) const { + return + + (getPlmnId() == rhs.getPlmnId()) && + + (getLac() == rhs.getLac()) && + + (getSac() == rhs.getSac()) + + ; } -bool ServiceAreaId::operator!=(const ServiceAreaId& rhs) const -{ - return !(*this == rhs); +bool ServiceAreaId::operator!=(const ServiceAreaId& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const ServiceAreaId& o) -{ - j = nlohmann::json(); - j["plmnId"] = o.m_PlmnId; - j["lac"] = o.m_Lac; - j["sac"] = o.m_Sac; - +void to_json(nlohmann::json& j, const ServiceAreaId& o) { + j = nlohmann::json(); + j["plmnId"] = o.m_PlmnId; + j["lac"] = o.m_Lac; + j["sac"] = o.m_Sac; } -void from_json(const nlohmann::json& j, ServiceAreaId& o) -{ - j.at("plmnId").get_to(o.m_PlmnId); - j.at("lac").get_to(o.m_Lac); - j.at("sac").get_to(o.m_Sac); - +void from_json(const nlohmann::json& j, ServiceAreaId& o) { + j.at("plmnId").get_to(o.m_PlmnId); + j.at("lac").get_to(o.m_Lac); + j.at("sac").get_to(o.m_Sac); } -PlmnId ServiceAreaId::getPlmnId() const -{ - return m_PlmnId; +PlmnId ServiceAreaId::getPlmnId() const { + return m_PlmnId; } -void ServiceAreaId::setPlmnId(PlmnId const& value) -{ - m_PlmnId = value; +void ServiceAreaId::setPlmnId(PlmnId const& value) { + m_PlmnId = value; } -std::string ServiceAreaId::getLac() const -{ - return m_Lac; +std::string ServiceAreaId::getLac() const { + return m_Lac; } -void ServiceAreaId::setLac(std::string const& value) -{ - m_Lac = value; +void ServiceAreaId::setLac(std::string const& value) { + m_Lac = value; } -std::string ServiceAreaId::getSac() const -{ - return m_Sac; +std::string ServiceAreaId::getSac() const { + return m_Sac; } -void ServiceAreaId::setSac(std::string const& value) -{ - m_Sac = value; +void ServiceAreaId::setSac(std::string const& value) { + m_Sac = value; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/ServiceAreaId.h b/src/api-server/model/ServiceAreaId.h old mode 100755 new mode 100644 index 7d57a8c..68e9c21 --- a/src/api-server/model/ServiceAreaId.h +++ b/src/api-server/model/ServiceAreaId.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * ServiceAreaId.h * - * + * */ #ifndef ServiceAreaId_H_ #define ServiceAreaId_H_ - #include <string> #include "PlmnId.h" #include <nlohmann/json.hpp> @@ -28,64 +28,62 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class ServiceAreaId -{ -public: - ServiceAreaId(); - virtual ~ServiceAreaId() = 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 ServiceAreaId& rhs) const; - bool operator!=(const ServiceAreaId& rhs) const; - - ///////////////////////////////////////////// - /// ServiceAreaId members - - /// <summary> - /// - /// </summary> - PlmnId getPlmnId() const; - void setPlmnId(PlmnId const& value); - /// <summary> - /// - /// </summary> - std::string getLac() const; - void setLac(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getSac() const; - void setSac(std::string const& value); - - friend void to_json(nlohmann::json& j, const ServiceAreaId& o); - friend void from_json(const nlohmann::json& j, ServiceAreaId& o); -protected: - PlmnId m_PlmnId; - - std::string m_Lac; - - std::string m_Sac; - - +class ServiceAreaId { + public: + ServiceAreaId(); + virtual ~ServiceAreaId() = 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 ServiceAreaId& rhs) const; + bool operator!=(const ServiceAreaId& rhs) const; + + ///////////////////////////////////////////// + /// ServiceAreaId members + + /// <summary> + /// + /// </summary> + PlmnId getPlmnId() const; + void setPlmnId(PlmnId const& value); + /// <summary> + /// + /// </summary> + std::string getLac() const; + void setLac(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getSac() const; + void setSac(std::string const& value); + + friend void to_json(nlohmann::json& j, const ServiceAreaId& o); + friend void from_json(const nlohmann::json& j, ServiceAreaId& o); + + protected: + PlmnId m_PlmnId; + + std::string m_Lac; + + std::string m_Sac; }; } // namespace model diff --git a/src/api-server/model/ServingNfIdentity.cpp b/src/api-server/model/ServingNfIdentity.cpp old mode 100755 new mode 100644 index 00cfd5f..fd46811 --- a/src/api-server/model/ServingNfIdentity.cpp +++ b/src/api-server/model/ServingNfIdentity.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,144 +20,116 @@ namespace oai { namespace pcf { namespace model { -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; +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 diff --git a/src/api-server/model/ServingNfIdentity.h b/src/api-server/model/ServingNfIdentity.h old mode 100755 new mode 100644 index 298bb00..e9d8958 --- a/src/api-server/model/ServingNfIdentity.h +++ b/src/api-server/model/ServingNfIdentity.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -29,70 +29,69 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class ServingNfIdentity -{ -public: - ServingNfIdentity(); - virtual ~ServingNfIdentity() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const ServingNfIdentity& rhs) const; - bool operator!=(const ServingNfIdentity& rhs) const; + ///////////////////////////////////////////// + /// ServingNfIdentity members - ///////////////////////////////////////////// - /// ServingNfIdentity members + /// <summary> + /// + /// </summary> + std::string getServNfInstId() const; + void setServNfInstId(std::string const& value); + bool servNfInstIdIsSet() const; + void unsetServNfInstId(); + /// <summary> + /// + /// </summary> + Guami getGuami() const; + void setGuami(Guami const& value); + bool guamiIsSet() const; + void unsetGuami(); + /// <summary> + /// + /// </summary> + AnGwAddress getAnGwAddr() const; + void setAnGwAddr(AnGwAddress const& value); + bool anGwAddrIsSet() const; + void unsetAnGwAddr(); - /// <summary> - /// - /// </summary> - std::string getServNfInstId() const; - void setServNfInstId(std::string const& value); - bool servNfInstIdIsSet() const; - void unsetServNfInstId(); - /// <summary> - /// - /// </summary> - Guami getGuami() const; - void setGuami(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); - 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; - Guami m_Guami; - bool m_GuamiIsSet; - AnGwAddress m_AnGwAddr; - bool m_AnGwAddrIsSet; - + protected: + std::string m_ServNfInstId; + bool m_ServNfInstIdIsSet; + Guami m_Guami; + bool m_GuamiIsSet; + AnGwAddress m_AnGwAddr; + bool m_AnGwAddrIsSet; }; } // namespace model diff --git a/src/api-server/model/SessionRule.cpp b/src/api-server/model/SessionRule.cpp old mode 100755 new mode 100644 index e88b0f9..291e296 --- a/src/api-server/model/SessionRule.cpp +++ b/src/api-server/model/SessionRule.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,216 +20,176 @@ namespace oai { namespace pcf { namespace model { -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; +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 diff --git a/src/api-server/model/SessionRule.h b/src/api-server/model/SessionRule.h old mode 100755 new mode 100644 index 948c1a9..af5710f --- a/src/api-server/model/SessionRule.h +++ b/src/api-server/model/SessionRule.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -29,95 +29,97 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SessionRule -{ -public: - SessionRule(); - virtual ~SessionRule() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const SessionRule& rhs) const; - bool operator!=(const SessionRule& rhs) const; + ///////////////////////////////////////////// + /// SessionRule members - ///////////////////////////////////////////// - /// SessionRule members + /// <summary> + /// + /// </summary> + Ambr getAuthSessAmbr() const; + void setAuthSessAmbr(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(); - /// <summary> - /// - /// </summary> - Ambr getAuthSessAmbr() const; - void setAuthSessAmbr(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); - friend void to_json(nlohmann::json& j, const SessionRule& o); - friend void from_json(const nlohmann::json& j, SessionRule& o); -protected: - Ambr m_AuthSessAmbr; - bool m_AuthSessAmbrIsSet; - AuthorizedDefaultQos m_AuthDefQos; - bool m_AuthDefQosIsSet; - std::string m_SessRuleId; + protected: + 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; - + std::string m_RefUmData; + bool m_RefUmDataIsSet; + std::string m_RefUmN3gData; + bool m_RefUmN3gDataIsSet; + std::string m_RefCondData; + bool m_RefCondDataIsSet; }; } // namespace model diff --git a/src/api-server/model/SessionRuleFailureCode.cpp b/src/api-server/model/SessionRuleFailureCode.cpp old mode 100755 new mode 100644 index 1500b8e..c05e921 --- a/src/api-server/model/SessionRuleFailureCode.cpp +++ b/src/api-server/model/SessionRuleFailureCode.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,69 @@ namespace oai { namespace pcf { namespace model { -SessionRuleFailureCode::SessionRuleFailureCode() -{ - -} +SessionRuleFailureCode::SessionRuleFailureCode() {} -void SessionRuleFailureCode::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool SessionRuleFailureCode::operator!=(const SessionRuleFailureCode& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, SessionRuleFailureCode& o) { + from_json(j, o.m_value); } -SessionRuleFailureCode_anyOf SessionRuleFailureCode::getValue() const -{ - return m_value; +SessionRuleFailureCode_anyOf SessionRuleFailureCode::getValue() const { + return m_value; } -void SessionRuleFailureCode::setValue(SessionRuleFailureCode_anyOf value) -{ - m_value = value; +void SessionRuleFailureCode::setValue(SessionRuleFailureCode_anyOf value) { + m_value = value; } -SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf SessionRuleFailureCode::getEnumValue() const -{ - return m_value.getValue(); +SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf +SessionRuleFailureCode::getEnumValue() const { + return m_value.getValue(); } -void SessionRuleFailureCode::setEnumValue(SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf value) -{ - m_value.setValue(value); +void SessionRuleFailureCode::setEnumValue( + SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/SessionRuleFailureCode.h b/src/api-server/model/SessionRuleFailureCode.h old mode 100755 new mode 100644 index de7dae8..82c6c8b --- a/src/api-server/model/SessionRuleFailureCode.h +++ b/src/api-server/model/SessionRuleFailureCode.h @@ -1,24 +1,32 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -27,49 +35,59 @@ 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. +/// 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; - +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. 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> + /// 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; + /// <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; + bool operator==(const SessionRuleFailureCode& rhs) const; + bool operator!=(const SessionRuleFailureCode& rhs) const; - ///////////////////////////////////////////// - /// SessionRuleFailureCode members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + SessionRuleFailureCode_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/SessionRuleFailureCode_anyOf.cpp b/src/api-server/model/SessionRuleFailureCode_anyOf.cpp old mode 100755 new mode 100644 index f3dea87..7ca6c25 --- a/src/api-server/model/SessionRuleFailureCode_anyOf.cpp +++ b/src/api-server/model/SessionRuleFailureCode_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,109 +20,102 @@ namespace oai { namespace pcf { namespace model { -SessionRuleFailureCode_anyOf::SessionRuleFailureCode_anyOf() -{ - -} +SessionRuleFailureCode_anyOf::SessionRuleFailureCode_anyOf() {} -void SessionRuleFailureCode_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool SessionRuleFailureCode_anyOf::operator!=( + const SessionRuleFailureCode_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf +SessionRuleFailureCode_anyOf::getValue() const { + return m_value; } -void SessionRuleFailureCode_anyOf::setValue(SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf value) -{ - m_value = value; +void SessionRuleFailureCode_anyOf::setValue( + SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/SessionRuleFailureCode_anyOf.h b/src/api-server/model/SessionRuleFailureCode_anyOf.h old mode 100755 new mode 100644 index 015cfa6..5cbab48 --- a/src/api-server/model/SessionRuleFailureCode_anyOf.h +++ b/src/api-server/model/SessionRuleFailureCode_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,55 +26,60 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SessionRuleFailureCode_anyOf -{ -public: - SessionRuleFailureCode_anyOf(); - virtual ~SessionRuleFailureCode_anyOf() = default; +class SessionRuleFailureCode_anyOf { + public: + SessionRuleFailureCode_anyOf(); + virtual ~SessionRuleFailureCode_anyOf() = default; - enum class eSessionRuleFailureCode_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const SessionRuleFailureCode_anyOf& rhs) const; + bool operator!=(const SessionRuleFailureCode_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// SessionRuleFailureCode_anyOf members - bool operator==(const SessionRuleFailureCode_anyOf& rhs) const; - bool operator!=(const SessionRuleFailureCode_anyOf& rhs) const; + SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf getValue() const; + void setValue( + SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf value); - ///////////////////////////////////////////// - /// SessionRuleFailureCode_anyOf members + friend void to_json(nlohmann::json& j, const SessionRuleFailureCode_anyOf& o); + friend void from_json( + const nlohmann::json& j, SessionRuleFailureCode_anyOf& o); - 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; + protected: + SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf m_value = + SessionRuleFailureCode_anyOf::eSessionRuleFailureCode_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/SessionRuleReport.cpp b/src/api-server/model/SessionRuleReport.cpp old mode 100755 new mode 100644 index 2b5af04..6cfe87e --- a/src/api-server/model/SessionRuleReport.cpp +++ b/src/api-server/model/SessionRuleReport.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,139 +20,112 @@ namespace oai { namespace pcf { namespace model { -SessionRuleReport::SessionRuleReport() -{ - m_SessRuleFailureCodeIsSet = false; - +SessionRuleReport::SessionRuleReport() { + m_SessRuleFailureCodeIsSet = false; } -void SessionRuleReport::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 -{ - 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++; - } - } +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; + } + + 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 diff --git a/src/api-server/model/SessionRuleReport.h b/src/api-server/model/SessionRuleReport.h old mode 100755 new mode 100644 index 332d511..026a90a --- a/src/api-server/model/SessionRuleReport.h +++ b/src/api-server/model/SessionRuleReport.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -30,66 +30,65 @@ 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; - +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 diff --git a/src/api-server/model/SmPolicyAssociationReleaseCause.cpp b/src/api-server/model/SmPolicyAssociationReleaseCause.cpp old mode 100755 new mode 100644 index 257e1f6..9d57aea --- a/src/api-server/model/SmPolicyAssociationReleaseCause.cpp +++ b/src/api-server/model/SmPolicyAssociationReleaseCause.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,72 @@ namespace oai { namespace pcf { namespace model { -SmPolicyAssociationReleaseCause::SmPolicyAssociationReleaseCause() -{ - -} +SmPolicyAssociationReleaseCause::SmPolicyAssociationReleaseCause() {} -void SmPolicyAssociationReleaseCause::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool SmPolicyAssociationReleaseCause::operator!=(const SmPolicyAssociationReleaseCause& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, SmPolicyAssociationReleaseCause& o) { + from_json(j, o.m_value); } -SmPolicyAssociationReleaseCause_anyOf SmPolicyAssociationReleaseCause::getValue() const -{ - return m_value; +SmPolicyAssociationReleaseCause_anyOf +SmPolicyAssociationReleaseCause::getValue() const { + return m_value; } -void SmPolicyAssociationReleaseCause::setValue(SmPolicyAssociationReleaseCause_anyOf value) -{ - m_value = value; +void SmPolicyAssociationReleaseCause::setValue( + SmPolicyAssociationReleaseCause_anyOf value) { + m_value = value; } -SmPolicyAssociationReleaseCause_anyOf::eSmPolicyAssociationReleaseCause_anyOf SmPolicyAssociationReleaseCause::getEnumValue() const -{ - return m_value.getValue(); +SmPolicyAssociationReleaseCause_anyOf::eSmPolicyAssociationReleaseCause_anyOf +SmPolicyAssociationReleaseCause::getEnumValue() const { + return m_value.getValue(); } -void SmPolicyAssociationReleaseCause::setEnumValue(SmPolicyAssociationReleaseCause_anyOf::eSmPolicyAssociationReleaseCause_anyOf value) -{ - m_value.setValue(value); +void SmPolicyAssociationReleaseCause::setEnumValue( + SmPolicyAssociationReleaseCause_anyOf:: + eSmPolicyAssociationReleaseCause_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/SmPolicyAssociationReleaseCause.h b/src/api-server/model/SmPolicyAssociationReleaseCause.h old mode 100755 new mode 100644 index 77ccdb8..9473462 --- a/src/api-server/model/SmPolicyAssociationReleaseCause.h +++ b/src/api-server/model/SmPolicyAssociationReleaseCause.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,49 +27,54 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SmPolicyAssociationReleaseCause -{ -public: - SmPolicyAssociationReleaseCause(); - virtual ~SmPolicyAssociationReleaseCause() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const SmPolicyAssociationReleaseCause& rhs) const; + bool operator!=(const SmPolicyAssociationReleaseCause& rhs) const; - ///////////////////////////////////////////// - /// SmPolicyAssociationReleaseCause members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + SmPolicyAssociationReleaseCause_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.cpp b/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.cpp old mode 100755 new mode 100644 index 0c9feb4..9a79dcd --- a/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.cpp +++ b/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,109 +20,113 @@ namespace oai { namespace pcf { namespace model { -SmPolicyAssociationReleaseCause_anyOf::SmPolicyAssociationReleaseCause_anyOf() -{ - +SmPolicyAssociationReleaseCause_anyOf::SmPolicyAssociationReleaseCause_anyOf() { + } -void SmPolicyAssociationReleaseCause_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == SmPolicyAssociationReleaseCause_anyOf:: + eSmPolicyAssociationReleaseCause_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool SmPolicyAssociationReleaseCause_anyOf::operator!=( + const SmPolicyAssociationReleaseCause_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +SmPolicyAssociationReleaseCause_anyOf::eSmPolicyAssociationReleaseCause_anyOf +SmPolicyAssociationReleaseCause_anyOf::getValue() const { + return m_value; } -void SmPolicyAssociationReleaseCause_anyOf::setValue(SmPolicyAssociationReleaseCause_anyOf::eSmPolicyAssociationReleaseCause_anyOf value) -{ - m_value = value; +void SmPolicyAssociationReleaseCause_anyOf::setValue( + SmPolicyAssociationReleaseCause_anyOf:: + eSmPolicyAssociationReleaseCause_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.h b/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.h old mode 100755 new mode 100644 index f8b9fc4..e60e689 --- a/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.h +++ b/src/api-server/model/SmPolicyAssociationReleaseCause_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,55 +26,63 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SmPolicyAssociationReleaseCause_anyOf -{ -public: - SmPolicyAssociationReleaseCause_anyOf(); - virtual ~SmPolicyAssociationReleaseCause_anyOf() = default; +class SmPolicyAssociationReleaseCause_anyOf { + public: + SmPolicyAssociationReleaseCause_anyOf(); + virtual ~SmPolicyAssociationReleaseCause_anyOf() = default; - enum class eSmPolicyAssociationReleaseCause_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const SmPolicyAssociationReleaseCause_anyOf& rhs) const; + bool operator!=(const SmPolicyAssociationReleaseCause_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// SmPolicyAssociationReleaseCause_anyOf members - bool operator==(const SmPolicyAssociationReleaseCause_anyOf& rhs) const; - bool operator!=(const SmPolicyAssociationReleaseCause_anyOf& rhs) const; + SmPolicyAssociationReleaseCause_anyOf::eSmPolicyAssociationReleaseCause_anyOf + getValue() const; + void setValue(SmPolicyAssociationReleaseCause_anyOf:: + eSmPolicyAssociationReleaseCause_anyOf value); - ///////////////////////////////////////////// - /// SmPolicyAssociationReleaseCause_anyOf members + friend void to_json( + nlohmann::json& j, const SmPolicyAssociationReleaseCause_anyOf& o); + friend void from_json( + const nlohmann::json& j, SmPolicyAssociationReleaseCause_anyOf& o); - 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; + protected: + SmPolicyAssociationReleaseCause_anyOf::eSmPolicyAssociationReleaseCause_anyOf + m_value = SmPolicyAssociationReleaseCause_anyOf:: + eSmPolicyAssociationReleaseCause_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/SmPolicyContextData.cpp b/src/api-server/model/SmPolicyContextData.cpp old mode 100755 new mode 100644 index 34cb785..0b493b2 --- a/src/api-server/model/SmPolicyContextData.cpp +++ b/src/api-server/model/SmPolicyContextData.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,1142 +20,924 @@ namespace oai { namespace pcf { namespace model { -SmPolicyContextData::SmPolicyContextData() -{ - m_AccNetChIdIsSet = false; - m_ChargEntityAddrIsSet = false; - m_Gpsi = ""; - m_GpsiIsSet = false; - m_Supi = ""; - m_InterGrpIdsIsSet = false; - m_PduSessionId = 0; - m_Chargingcharacteristics = ""; - m_ChargingcharacteristicsIsSet = false; - m_Dnn = ""; - m_DnnSelModeIsSet = false; - m_NotificationUri = ""; - m_AccessTypeIsSet = false; - m_RatTypeIsSet = false; - m_AddAccessInfoIsSet = false; - m_ServingNetworkIsSet = false; - m_UserLocationInfoIsSet = false; - m_UeTimeZone = ""; - m_UeTimeZoneIsSet = false; - m_Pei = ""; - m_PeiIsSet = false; - m_Ipv4Address = ""; - m_Ipv4AddressIsSet = false; - m_Ipv6AddressPrefixIsSet = false; - m_IpDomain = ""; - m_IpDomainIsSet = false; - m_SubsSessAmbrIsSet = false; - m_AuthProfIndex = ""; - m_AuthProfIndexIsSet = false; - m_SubsDefQosIsSet = false; - m_NumOfPackFilter = 0; - m_NumOfPackFilterIsSet = false; - m_Online = false; - m_OnlineIsSet = false; - m_Offline = false; - m_OfflineIsSet = false; - m_r_3gppPsDataOffStatus = false; - m_r_3gppPsDataOffStatusIsSet = false; - m_RefQosIndication = false; - m_RefQosIndicationIsSet = false; - m_TraceReqIsSet = false; - m_QosFlowUsageIsSet = false; - m_ServNfIdIsSet = false; - m_SuppFeat = ""; - m_SuppFeatIsSet = false; - m_SmfId = ""; - m_SmfIdIsSet = false; - m_RecoveryTime = ""; - m_RecoveryTimeIsSet = false; - m_MaPduIndIsSet = false; - m_AtsssCapabIsSet = false; - +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()); - } +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 { + 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; +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"; - - + 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"; - - + /* 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++; - } - } + 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;"; } - - - /* 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;"; - } + { // 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 (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"; - - + /* 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 (suppFeatIsSet()) - { - const std::string& value = m_SuppFeat; - const std::string currentValuePath = _pathPrefix + ".suppFeat"; - - - + if (value > 255) { + success = false; + msg << currentValuePath << ": must be less than or equal to 255;"; } - - return success; -} + } + + 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"; + } -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())) - - ; + if (suppFeatIsSet()) { + const std::string& value = m_SuppFeat; + const std::string currentValuePath = _pathPrefix + ".suppFeat"; + } + + return success; } -bool SmPolicyContextData::operator!=(const SmPolicyContextData& rhs) const -{ - return !(*this == rhs); +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())) + + ; } -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; - +bool SmPolicyContextData::operator!=(const SmPolicyContextData& rhs) const { + return !(*this == rhs); } -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; - } - +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; } -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; +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 diff --git a/src/api-server/model/SmPolicyContextData.h b/src/api-server/model/SmPolicyContextData.h old mode 100755 new mode 100644 index 84c89c6..9287706 --- a/src/api-server/model/SmPolicyContextData.h +++ b/src/api-server/model/SmPolicyContextData.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -46,373 +46,376 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SmPolicyContextData -{ -public: - SmPolicyContextData(); - virtual ~SmPolicyContextData() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const SmPolicyContextData& rhs) const; - bool operator!=(const SmPolicyContextData& rhs) const; + ///////////////////////////////////////////// + /// SmPolicyContextData members - ///////////////////////////////////////////// - /// SmPolicyContextData members + /// <summary> + /// + /// </summary> + AccNetChId getAccNetChId() const; + void setAccNetChId(AccNetChId const& value); + bool accNetChIdIsSet() const; + void unsetAccNetChId(); + /// <summary> + /// + /// </summary> + AccNetChargingAddress getChargEntityAddr() const; + void setChargEntityAddr(AccNetChargingAddress const& value); + bool chargEntityAddrIsSet() const; + void unsetChargEntityAddr(); + /// <summary> + /// + /// </summary> + std::string getGpsi() const; + void setGpsi(std::string const& value); + bool gpsiIsSet() const; + void unsetGpsi(); + /// <summary> + /// + /// </summary> + std::string getSupi() const; + void setSupi(std::string const& value); + /// <summary> + /// + /// </summary> + std::vector<std::string> getInterGrpIds() const; + void setInterGrpIds(std::vector<std::string> const& value); + bool interGrpIdsIsSet() const; + void unsetInterGrpIds(); + /// <summary> + /// + /// </summary> + int32_t getPduSessionId() const; + void setPduSessionId(int32_t const value); + /// <summary> + /// + /// </summary> + PduSessionType getPduSessionType() const; + void setPduSessionType(PduSessionType const& value); + /// <summary> + /// + /// </summary> + std::string getChargingcharacteristics() const; + void setChargingcharacteristics(std::string const& value); + bool chargingcharacteristicsIsSet() const; + void unsetChargingcharacteristics(); + /// <summary> + /// + /// </summary> + std::string getDnn() const; + void setDnn(std::string const& value); + /// <summary> + /// + /// </summary> + DnnSelectionMode getDnnSelMode() const; + void setDnnSelMode(DnnSelectionMode const& value); + bool dnnSelModeIsSet() const; + void unsetDnnSelMode(); + /// <summary> + /// + /// </summary> + std::string getNotificationUri() const; + void setNotificationUri(std::string const& value); + /// <summary> + /// + /// </summary> + AccessType getAccessType() const; + void setAccessType(AccessType const& value); + bool accessTypeIsSet() const; + void unsetAccessType(); + /// <summary> + /// + /// </summary> + RatType getRatType() const; + void setRatType(RatType const& value); + bool ratTypeIsSet() const; + void unsetRatType(); + /// <summary> + /// + /// </summary> + AdditionalAccessInfo getAddAccessInfo() const; + void setAddAccessInfo(AdditionalAccessInfo const& value); + bool addAccessInfoIsSet() const; + void unsetAddAccessInfo(); + /// <summary> + /// + /// </summary> + PlmnIdNid getServingNetwork() const; + void setServingNetwork(PlmnIdNid const& value); + bool servingNetworkIsSet() const; + void unsetServingNetwork(); + /// <summary> + /// + /// </summary> + UserLocation getUserLocationInfo() const; + void setUserLocationInfo(UserLocation const& value); + bool userLocationInfoIsSet() const; + void unsetUserLocationInfo(); + /// <summary> + /// + /// </summary> + std::string getUeTimeZone() const; + void setUeTimeZone(std::string const& value); + bool ueTimeZoneIsSet() const; + void unsetUeTimeZone(); + /// <summary> + /// + /// </summary> + std::string getPei() const; + void setPei(std::string const& value); + bool peiIsSet() const; + void unsetPei(); + /// <summary> + /// + /// </summary> + std::string getIpv4Address() const; + void setIpv4Address(std::string const& value); + bool ipv4AddressIsSet() const; + void unsetIpv4Address(); + /// <summary> + /// + /// </summary> + Ipv6Prefix getIpv6AddressPrefix() const; + void setIpv6AddressPrefix(Ipv6Prefix const& value); + bool ipv6AddressPrefixIsSet() const; + void unsetIpv6AddressPrefix(); + /// <summary> + /// Indicates the IPv4 address domain + /// </summary> + std::string getIpDomain() const; + void setIpDomain(std::string const& value); + bool ipDomainIsSet() const; + void unsetIpDomain(); + /// <summary> + /// + /// </summary> + Ambr getSubsSessAmbr() const; + void setSubsSessAmbr(Ambr const& value); + bool subsSessAmbrIsSet() const; + void unsetSubsSessAmbr(); + /// <summary> + /// Indicates the DN-AAA authorization profile index + /// </summary> + std::string getAuthProfIndex() const; + void setAuthProfIndex(std::string const& value); + bool authProfIndexIsSet() const; + void unsetAuthProfIndex(); + /// <summary> + /// + /// </summary> + SubscribedDefaultQos getSubsDefQos() const; + void setSubsDefQos(SubscribedDefaultQos const& value); + bool subsDefQosIsSet() const; + void unsetSubsDefQos(); + /// <summary> + /// Contains the number of supported packet filter for signalled QoS rules. + /// </summary> + int32_t getNumOfPackFilter() const; + void setNumOfPackFilter(int32_t const value); + bool numOfPackFilterIsSet() const; + void unsetNumOfPackFilter(); + /// <summary> + /// If it is included and set to true, the online charging is applied to the + /// PDU session. + /// </summary> + bool isOnline() const; + void setOnline(bool const value); + bool onlineIsSet() const; + void unsetOnline(); + /// <summary> + /// If it is included and set to true, the offline charging is applied to the + /// PDU session. + /// </summary> + bool isOffline() const; + void setOffline(bool const value); + bool offlineIsSet() const; + void unsetOffline(); + /// <summary> + /// If it is included and set to true, the 3GPP PS Data Off is activated by + /// the UE. + /// </summary> + bool isR3gppPsDataOffStatus() const; + void setR3gppPsDataOffStatus(bool const value); + bool r3gppPsDataOffStatusIsSet() const; + void unsetr_3gppPsDataOffStatus(); + /// <summary> + /// If it is included and set to true, the reflective QoS is supported by the + /// UE. + /// </summary> + bool isRefQosIndication() const; + void setRefQosIndication(bool const value); + bool refQosIndicationIsSet() const; + void unsetRefQosIndication(); + /// <summary> + /// + /// </summary> + TraceData getTraceReq() const; + void setTraceReq(TraceData const& value); + bool traceReqIsSet() const; + void unsetTraceReq(); + /// <summary> + /// + /// </summary> + Snssai getSliceInfo() const; + void setSliceInfo(Snssai const& value); + /// <summary> + /// + /// </summary> + QosFlowUsage getQosFlowUsage() const; + void setQosFlowUsage(QosFlowUsage const& value); + bool qosFlowUsageIsSet() const; + void unsetQosFlowUsage(); + /// <summary> + /// + /// </summary> + ServingNfIdentity getServNfId() const; + void setServNfId(ServingNfIdentity const& value); + bool servNfIdIsSet() const; + void unsetServNfId(); + /// <summary> + /// + /// </summary> + std::string getSuppFeat() const; + void setSuppFeat(std::string const& value); + bool suppFeatIsSet() const; + void unsetSuppFeat(); + /// <summary> + /// + /// </summary> + std::string getSmfId() const; + void setSmfId(std::string const& value); + bool smfIdIsSet() const; + void unsetSmfId(); + /// <summary> + /// + /// </summary> + std::string getRecoveryTime() const; + void setRecoveryTime(std::string const& value); + bool recoveryTimeIsSet() const; + void unsetRecoveryTime(); + /// <summary> + /// + /// </summary> + MaPduIndication getMaPduInd() const; + void setMaPduInd(MaPduIndication const& value); + bool maPduIndIsSet() const; + void unsetMaPduInd(); + /// <summary> + /// + /// </summary> + AtsssCapability getAtsssCapab() const; + void setAtsssCapab(AtsssCapability const& value); + bool atsssCapabIsSet() const; + void unsetAtsssCapab(); - /// <summary> - /// - /// </summary> - AccNetChId getAccNetChId() const; - void setAccNetChId(AccNetChId const& value); - bool accNetChIdIsSet() const; - void unsetAccNetChId(); - /// <summary> - /// - /// </summary> - AccNetChargingAddress getChargEntityAddr() const; - void setChargEntityAddr(AccNetChargingAddress const& value); - bool chargEntityAddrIsSet() const; - void unsetChargEntityAddr(); - /// <summary> - /// - /// </summary> - std::string getGpsi() const; - void setGpsi(std::string const& value); - bool gpsiIsSet() const; - void unsetGpsi(); - /// <summary> - /// - /// </summary> - std::string getSupi() const; - void setSupi(std::string const& value); - /// <summary> - /// - /// </summary> - std::vector<std::string> getInterGrpIds() const; - void setInterGrpIds(std::vector<std::string> const& value); - bool interGrpIdsIsSet() const; - void unsetInterGrpIds(); - /// <summary> - /// - /// </summary> - int32_t getPduSessionId() const; - void setPduSessionId(int32_t const value); - /// <summary> - /// - /// </summary> - PduSessionType getPduSessionType() const; - void setPduSessionType(PduSessionType const& value); - /// <summary> - /// - /// </summary> - std::string getChargingcharacteristics() const; - void setChargingcharacteristics(std::string const& value); - bool chargingcharacteristicsIsSet() const; - void unsetChargingcharacteristics(); - /// <summary> - /// - /// </summary> - std::string getDnn() const; - void setDnn(std::string const& value); - /// <summary> - /// - /// </summary> - DnnSelectionMode getDnnSelMode() const; - void setDnnSelMode(DnnSelectionMode const& value); - bool dnnSelModeIsSet() const; - void unsetDnnSelMode(); - /// <summary> - /// - /// </summary> - std::string getNotificationUri() const; - void setNotificationUri(std::string const& value); - /// <summary> - /// - /// </summary> - AccessType getAccessType() const; - void setAccessType(AccessType const& value); - bool accessTypeIsSet() const; - void unsetAccessType(); - /// <summary> - /// - /// </summary> - RatType getRatType() const; - void setRatType(RatType const& value); - bool ratTypeIsSet() const; - void unsetRatType(); - /// <summary> - /// - /// </summary> - AdditionalAccessInfo getAddAccessInfo() const; - void setAddAccessInfo(AdditionalAccessInfo const& value); - bool addAccessInfoIsSet() const; - void unsetAddAccessInfo(); - /// <summary> - /// - /// </summary> - PlmnIdNid getServingNetwork() const; - void setServingNetwork(PlmnIdNid const& value); - bool servingNetworkIsSet() const; - void unsetServingNetwork(); - /// <summary> - /// - /// </summary> - UserLocation getUserLocationInfo() const; - void setUserLocationInfo(UserLocation const& value); - bool userLocationInfoIsSet() const; - void unsetUserLocationInfo(); - /// <summary> - /// - /// </summary> - std::string getUeTimeZone() const; - void setUeTimeZone(std::string const& value); - bool ueTimeZoneIsSet() const; - void unsetUeTimeZone(); - /// <summary> - /// - /// </summary> - std::string getPei() const; - void setPei(std::string const& value); - bool peiIsSet() const; - void unsetPei(); - /// <summary> - /// - /// </summary> - std::string getIpv4Address() const; - void setIpv4Address(std::string const& value); - bool ipv4AddressIsSet() const; - void unsetIpv4Address(); - /// <summary> - /// - /// </summary> - Ipv6Prefix getIpv6AddressPrefix() const; - void setIpv6AddressPrefix(Ipv6Prefix const& value); - bool ipv6AddressPrefixIsSet() const; - void unsetIpv6AddressPrefix(); - /// <summary> - /// Indicates the IPv4 address domain - /// </summary> - std::string getIpDomain() const; - void setIpDomain(std::string const& value); - bool ipDomainIsSet() const; - void unsetIpDomain(); - /// <summary> - /// - /// </summary> - Ambr getSubsSessAmbr() const; - void setSubsSessAmbr(Ambr const& value); - bool subsSessAmbrIsSet() const; - void unsetSubsSessAmbr(); - /// <summary> - /// Indicates the DN-AAA authorization profile index - /// </summary> - std::string getAuthProfIndex() const; - void setAuthProfIndex(std::string const& value); - bool authProfIndexIsSet() const; - void unsetAuthProfIndex(); - /// <summary> - /// - /// </summary> - SubscribedDefaultQos getSubsDefQos() const; - void setSubsDefQos(SubscribedDefaultQos const& value); - bool subsDefQosIsSet() const; - void unsetSubsDefQos(); - /// <summary> - /// Contains the number of supported packet filter for signalled QoS rules. - /// </summary> - int32_t getNumOfPackFilter() const; - void setNumOfPackFilter(int32_t const value); - bool numOfPackFilterIsSet() const; - void unsetNumOfPackFilter(); - /// <summary> - /// If it is included and set to true, the online charging is applied to the PDU session. - /// </summary> - bool isOnline() const; - void setOnline(bool const value); - bool onlineIsSet() const; - void unsetOnline(); - /// <summary> - /// If it is included and set to true, the offline charging is applied to the PDU session. - /// </summary> - bool isOffline() const; - void setOffline(bool const value); - bool offlineIsSet() const; - void unsetOffline(); - /// <summary> - /// If it is included and set to true, the 3GPP PS Data Off is activated by the UE. - /// </summary> - bool isR3gppPsDataOffStatus() const; - void setR3gppPsDataOffStatus(bool const value); - bool r3gppPsDataOffStatusIsSet() const; - void unsetr_3gppPsDataOffStatus(); - /// <summary> - /// If it is included and set to true, the reflective QoS is supported by the UE. - /// </summary> - bool isRefQosIndication() const; - void setRefQosIndication(bool const value); - bool refQosIndicationIsSet() const; - void unsetRefQosIndication(); - /// <summary> - /// - /// </summary> - TraceData getTraceReq() const; - void setTraceReq(TraceData const& value); - bool traceReqIsSet() const; - void unsetTraceReq(); - /// <summary> - /// - /// </summary> - Snssai getSliceInfo() const; - void setSliceInfo(Snssai const& value); - /// <summary> - /// - /// </summary> - QosFlowUsage getQosFlowUsage() const; - void setQosFlowUsage(QosFlowUsage const& value); - bool qosFlowUsageIsSet() const; - void unsetQosFlowUsage(); - /// <summary> - /// - /// </summary> - ServingNfIdentity getServNfId() const; - void setServNfId(ServingNfIdentity const& value); - bool servNfIdIsSet() const; - void unsetServNfId(); - /// <summary> - /// - /// </summary> - std::string getSuppFeat() const; - void setSuppFeat(std::string const& value); - bool suppFeatIsSet() const; - void unsetSuppFeat(); - /// <summary> - /// - /// </summary> - std::string getSmfId() const; - void setSmfId(std::string const& value); - bool smfIdIsSet() const; - void unsetSmfId(); - /// <summary> - /// - /// </summary> - std::string getRecoveryTime() const; - void setRecoveryTime(std::string const& value); - bool recoveryTimeIsSet() const; - void unsetRecoveryTime(); - /// <summary> - /// - /// </summary> - MaPduIndication getMaPduInd() const; - void setMaPduInd(MaPduIndication const& value); - bool maPduIndIsSet() const; - void unsetMaPduInd(); - /// <summary> - /// - /// </summary> - AtsssCapability getAtsssCapab() const; - void setAtsssCapab(AtsssCapability const& value); - bool atsssCapabIsSet() const; - void unsetAtsssCapab(); + friend void to_json(nlohmann::json& j, const SmPolicyContextData& o); + friend void from_json(const nlohmann::json& j, SmPolicyContextData& o); - 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; + 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; + std::vector<std::string> m_InterGrpIds; + bool m_InterGrpIdsIsSet; + int32_t m_PduSessionId; - PduSessionType m_PduSessionType; + PduSessionType m_PduSessionType; - std::string m_Chargingcharacteristics; - bool m_ChargingcharacteristicsIsSet; - std::string m_Dnn; + std::string m_Chargingcharacteristics; + bool m_ChargingcharacteristicsIsSet; + std::string m_Dnn; - DnnSelectionMode m_DnnSelMode; - bool m_DnnSelModeIsSet; - std::string m_NotificationUri; + DnnSelectionMode m_DnnSelMode; + bool m_DnnSelModeIsSet; + std::string m_NotificationUri; - AccessType m_AccessType; - bool m_AccessTypeIsSet; - RatType m_RatType; - bool m_RatTypeIsSet; - AdditionalAccessInfo m_AddAccessInfo; - bool m_AddAccessInfoIsSet; - PlmnIdNid m_ServingNetwork; - bool m_ServingNetworkIsSet; - UserLocation m_UserLocationInfo; - bool m_UserLocationInfoIsSet; - std::string m_UeTimeZone; - bool m_UeTimeZoneIsSet; - std::string m_Pei; - bool m_PeiIsSet; - std::string m_Ipv4Address; - bool m_Ipv4AddressIsSet; - Ipv6Prefix m_Ipv6AddressPrefix; - bool m_Ipv6AddressPrefixIsSet; - std::string m_IpDomain; - bool m_IpDomainIsSet; - Ambr m_SubsSessAmbr; - bool m_SubsSessAmbrIsSet; - std::string m_AuthProfIndex; - bool m_AuthProfIndexIsSet; - SubscribedDefaultQos m_SubsDefQos; - bool m_SubsDefQosIsSet; - int32_t m_NumOfPackFilter; - bool m_NumOfPackFilterIsSet; - bool m_Online; - bool m_OnlineIsSet; - bool m_Offline; - bool m_OfflineIsSet; - bool m_r_3gppPsDataOffStatus; - bool m_r_3gppPsDataOffStatusIsSet; - bool m_RefQosIndication; - bool m_RefQosIndicationIsSet; - TraceData m_TraceReq; - bool m_TraceReqIsSet; - Snssai m_SliceInfo; + AccessType m_AccessType; + bool m_AccessTypeIsSet; + RatType m_RatType; + bool m_RatTypeIsSet; + AdditionalAccessInfo m_AddAccessInfo; + bool m_AddAccessInfoIsSet; + PlmnIdNid m_ServingNetwork; + bool m_ServingNetworkIsSet; + UserLocation m_UserLocationInfo; + bool m_UserLocationInfoIsSet; + std::string m_UeTimeZone; + bool m_UeTimeZoneIsSet; + std::string m_Pei; + bool m_PeiIsSet; + std::string m_Ipv4Address; + bool m_Ipv4AddressIsSet; + Ipv6Prefix m_Ipv6AddressPrefix; + bool m_Ipv6AddressPrefixIsSet; + std::string m_IpDomain; + bool m_IpDomainIsSet; + Ambr m_SubsSessAmbr; + bool m_SubsSessAmbrIsSet; + std::string m_AuthProfIndex; + bool m_AuthProfIndexIsSet; + SubscribedDefaultQos m_SubsDefQos; + bool m_SubsDefQosIsSet; + int32_t m_NumOfPackFilter; + bool m_NumOfPackFilterIsSet; + bool m_Online; + bool m_OnlineIsSet; + bool m_Offline; + bool m_OfflineIsSet; + bool m_r_3gppPsDataOffStatus; + bool m_r_3gppPsDataOffStatusIsSet; + bool m_RefQosIndication; + bool m_RefQosIndicationIsSet; + TraceData m_TraceReq; + bool m_TraceReqIsSet; + Snssai m_SliceInfo; - QosFlowUsage m_QosFlowUsage; - bool m_QosFlowUsageIsSet; - ServingNfIdentity m_ServNfId; - bool m_ServNfIdIsSet; - std::string m_SuppFeat; - bool m_SuppFeatIsSet; - std::string m_SmfId; - bool m_SmfIdIsSet; - std::string m_RecoveryTime; - bool m_RecoveryTimeIsSet; - MaPduIndication m_MaPduInd; - bool m_MaPduIndIsSet; - AtsssCapability m_AtsssCapab; - bool m_AtsssCapabIsSet; - + QosFlowUsage m_QosFlowUsage; + bool m_QosFlowUsageIsSet; + ServingNfIdentity m_ServNfId; + bool m_ServNfIdIsSet; + std::string m_SuppFeat; + bool m_SuppFeatIsSet; + std::string m_SmfId; + bool m_SmfIdIsSet; + std::string m_RecoveryTime; + bool m_RecoveryTimeIsSet; + MaPduIndication m_MaPduInd; + bool m_MaPduIndIsSet; + AtsssCapability m_AtsssCapab; + bool m_AtsssCapabIsSet; }; } // namespace model diff --git a/src/api-server/model/SmPolicyControl.cpp b/src/api-server/model/SmPolicyControl.cpp old mode 100755 new mode 100644 index 95539f5..46ba093 --- a/src/api-server/model/SmPolicyControl.cpp +++ b/src/api-server/model/SmPolicyControl.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,86 +20,67 @@ namespace oai { namespace pcf { namespace model { -SmPolicyControl::SmPolicyControl() -{ - -} +SmPolicyControl::SmPolicyControl() {} -void SmPolicyControl::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +bool SmPolicyControl::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "SmPolicyControl" : pathPrefix; - - return success; + return success; } -bool SmPolicyControl::operator==(const SmPolicyControl& rhs) const -{ - return - - - (getContext() == rhs.getContext()) - && - - (getPolicy() == rhs.getPolicy()) - - - ; +bool SmPolicyControl::operator==(const SmPolicyControl& rhs) const { + return + + (getContext() == rhs.getContext()) && + + (getPolicy() == rhs.getPolicy()) + + ; } -bool SmPolicyControl::operator!=(const SmPolicyControl& rhs) const -{ - return !(*this == rhs); +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 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); - +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; +SmPolicyContextData SmPolicyControl::getContext() const { + return m_Context; } -void SmPolicyControl::setContext(SmPolicyContextData const& value) -{ - m_Context = value; +void SmPolicyControl::setContext(SmPolicyContextData const& value) { + m_Context = value; } -SmPolicyDecision SmPolicyControl::getPolicy() const -{ - return m_Policy; +SmPolicyDecision SmPolicyControl::getPolicy() const { + return m_Policy; } -void SmPolicyControl::setPolicy(SmPolicyDecision const& value) -{ - m_Policy = value; +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 old mode 100755 new mode 100644 index 38b2763..e148690 --- a/src/api-server/model/SmPolicyControl.h +++ b/src/api-server/model/SmPolicyControl.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,57 +28,55 @@ 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; - - +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 diff --git a/src/api-server/model/SmPolicyDecision.cpp b/src/api-server/model/SmPolicyDecision.cpp old mode 100755 new mode 100644 index e784f4f..83d5d58 --- a/src/api-server/model/SmPolicyDecision.cpp +++ b/src/api-server/model/SmPolicyDecision.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,972 +20,806 @@ namespace oai { namespace pcf { namespace model { -SmPolicyDecision::SmPolicyDecision() -{ - m_SessRulesIsSet = false; - m_PccRulesIsSet = false; - m_PcscfRestIndication = false; - m_PcscfRestIndicationIsSet = false; - m_QosDecsIsSet = false; - m_ChgDecsIsSet = false; - m_ChargingInfoIsSet = false; - m_TraffContDecsIsSet = false; - m_UmDecsIsSet = false; - m_QosCharsIsSet = false; - m_QosMonDecsIsSet = false; - m_ReflectiveQoSTimer = 0; - m_ReflectiveQoSTimerIsSet = false; - m_CondsIsSet = false; - m_RevalidationTime = ""; - m_RevalidationTimeIsSet = false; - m_Offline = false; - m_OfflineIsSet = false; - m_Online = false; - m_OnlineIsSet = false; - m_PolicyCtrlReqTriggersIsSet = false; - m_LastReqRuleDataIsSet = false; - m_LastReqUsageDataIsSet = false; - m_PraInfosIsSet = false; - m_Ipv4Index = 0; - m_Ipv4IndexIsSet = false; - m_Ipv6Index = 0; - m_Ipv6IndexIsSet = false; - m_QosFlowUsageIsSet = false; - m_RelCauseIsSet = false; - m_SuppFeat = ""; - m_SuppFeatIsSet = false; - m_TsnPortManContDsttIsSet = false; - m_TsnPortManContNwttsIsSet = false; - -} - -void SmPolicyDecision::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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; } -bool SmPolicyDecision::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +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 std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "SmPolicyDecision" : pathPrefix; +bool SmPolicyDecision::validate(std::stringstream& msg) const { + return validate(msg, ""); +} - - if (sessRulesIsSet()) - { - const std::map<std::string, SessionRule>& value = m_SessRules; - const std::string currentValuePath = _pathPrefix + ".sessRules"; - - +bool SmPolicyDecision::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "SmPolicyDecision" : pathPrefix; - } - - if (pccRulesIsSet()) - { - const std::map<std::string, PccRule>& value = m_PccRules; - const std::string currentValuePath = _pathPrefix + ".pccRules"; - - + if (sessRulesIsSet()) { + const std::map<std::string, SessionRule>& value = m_SessRules; + const std::string currentValuePath = _pathPrefix + ".sessRules"; + } - } - - if (qosDecsIsSet()) - { - const std::map<std::string, QosData>& value = m_QosDecs; - const std::string currentValuePath = _pathPrefix + ".qosDecs"; - - + if (pccRulesIsSet()) { + const std::map<std::string, PccRule>& value = m_PccRules; + const std::string currentValuePath = _pathPrefix + ".pccRules"; + } - } - - if (chgDecsIsSet()) - { - const std::map<std::string, ChargingData>& value = m_ChgDecs; - const std::string currentValuePath = _pathPrefix + ".chgDecs"; - - + if (qosDecsIsSet()) { + const std::map<std::string, QosData>& value = m_QosDecs; + const std::string currentValuePath = _pathPrefix + ".qosDecs"; + } - } - - if (traffContDecsIsSet()) - { - const std::map<std::string, TrafficControlData>& value = m_TraffContDecs; - const std::string currentValuePath = _pathPrefix + ".traffContDecs"; - - + if (chgDecsIsSet()) { + const std::map<std::string, ChargingData>& value = m_ChgDecs; + const std::string currentValuePath = _pathPrefix + ".chgDecs"; + } - } - - if (umDecsIsSet()) - { - const std::map<std::string, UsageMonitoringData>& value = m_UmDecs; - const std::string currentValuePath = _pathPrefix + ".umDecs"; - - + if (traffContDecsIsSet()) { + const std::map<std::string, TrafficControlData>& value = m_TraffContDecs; + const std::string currentValuePath = _pathPrefix + ".traffContDecs"; + } - } - - if (qosCharsIsSet()) - { - const std::map<std::string, QosCharacteristics>& value = m_QosChars; - const std::string currentValuePath = _pathPrefix + ".qosChars"; - - + if (umDecsIsSet()) { + const std::map<std::string, UsageMonitoringData>& value = m_UmDecs; + const std::string currentValuePath = _pathPrefix + ".umDecs"; + } - } - - if (qosMonDecsIsSet()) - { - const std::map<std::string, QosMonitoringData>& value = m_QosMonDecs; - const std::string currentValuePath = _pathPrefix + ".qosMonDecs"; - - + if (qosCharsIsSet()) { + const std::map<std::string, QosCharacteristics>& value = m_QosChars; + const std::string currentValuePath = _pathPrefix + ".qosChars"; + } - } - - if (condsIsSet()) - { - const std::map<std::string, ConditionData>& value = m_Conds; - const std::string currentValuePath = _pathPrefix + ".conds"; - - + 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;"; } - - 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++; - } - } + { // 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 (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;"; } - - if (praInfosIsSet()) - { - const std::map<std::string, PresenceInfoRm>& value = m_PraInfos; - const std::string currentValuePath = _pathPrefix + ".praInfos"; - - + { // 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 (suppFeatIsSet()) - { - const std::string& value = m_SuppFeat; - const std::string currentValuePath = _pathPrefix + ".suppFeat"; - - + } + + 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;"; } - - 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++; - } - } + { // 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; + } + + 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; } -bool SmPolicyDecision::tsnPortManContDsttIsSet() const -{ - return m_TsnPortManContDsttIsSet; + +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; + } } -void SmPolicyDecision::unsetTsnPortManContDstt() -{ - m_TsnPortManContDsttIsSet = false; + +std::map<std::string, SessionRule> SmPolicyDecision::getSessRules() const { + return m_SessRules; } -std::vector<PortManagementContainer> SmPolicyDecision::getTsnPortManContNwtts() const -{ - return m_TsnPortManContNwtts; +void SmPolicyDecision::setSessRules( + std::map<std::string, SessionRule> const& value) { + m_SessRules = value; + m_SessRulesIsSet = true; } -void SmPolicyDecision::setTsnPortManContNwtts(std::vector<PortManagementContainer> const& value) -{ - m_TsnPortManContNwtts = value; - m_TsnPortManContNwttsIsSet = true; +bool SmPolicyDecision::sessRulesIsSet() const { + return m_SessRulesIsSet; } -bool SmPolicyDecision::tsnPortManContNwttsIsSet() const -{ - return m_TsnPortManContNwttsIsSet; +void SmPolicyDecision::unsetSessRules() { + m_SessRulesIsSet = false; } -void SmPolicyDecision::unsetTsnPortManContNwtts() -{ - m_TsnPortManContNwttsIsSet = 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 diff --git a/src/api-server/model/SmPolicyDecision.h b/src/api-server/model/SmPolicyDecision.h old mode 100755 new mode 100644 index 669c286..53887db --- a/src/api-server/model/SmPolicyDecision.h +++ b/src/api-server/model/SmPolicyDecision.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -46,277 +46,285 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SmPolicyDecision -{ -public: - SmPolicyDecision(); - virtual ~SmPolicyDecision() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const SmPolicyDecision& rhs) const; - bool operator!=(const SmPolicyDecision& rhs) const; + ///////////////////////////////////////////// + /// SmPolicyDecision members - ///////////////////////////////////////////// - /// SmPolicyDecision members + /// <summary> + /// A map of Sessionrules with the content being the SessionRule as described + /// in subclause 5.6.2.7. + /// </summary> + std::map<std::string, SessionRule> getSessRules() const; + void setSessRules(std::map<std::string, SessionRule> const& value); + bool sessRulesIsSet() const; + void unsetSessRules(); + /// <summary> + /// A map of PCC rules with the content being the PCCRule as described in + /// subclause 5.6.2.6. + /// </summary> + std::map<std::string, PccRule> getPccRules() const; + void setPccRules(std::map<std::string, PccRule> const& value); + bool pccRulesIsSet() const; + void unsetPccRules(); + /// <summary> + /// If it is included and set to true, it indicates the P-CSCF Restoration is + /// requested. + /// </summary> + bool isPcscfRestIndication() const; + void setPcscfRestIndication(bool const value); + bool pcscfRestIndicationIsSet() const; + void unsetPcscfRestIndication(); + /// <summary> + /// Map of QoS data policy decisions. + /// </summary> + std::map<std::string, QosData> getQosDecs() const; + void setQosDecs(std::map<std::string, QosData> const& value); + bool qosDecsIsSet() const; + void unsetQosDecs(); + /// <summary> + /// Map of Charging data policy decisions. + /// </summary> + std::map<std::string, ChargingData> getChgDecs() const; + void setChgDecs(std::map<std::string, ChargingData> const& value); + bool chgDecsIsSet() const; + void unsetChgDecs(); + /// <summary> + /// + /// </summary> + ChargingInformation getChargingInfo() const; + void setChargingInfo(ChargingInformation const& value); + bool chargingInfoIsSet() const; + void unsetChargingInfo(); + /// <summary> + /// Map of Traffic Control data policy decisions. + /// </summary> + std::map<std::string, TrafficControlData> getTraffContDecs() const; + void setTraffContDecs(std::map<std::string, TrafficControlData> const& value); + bool traffContDecsIsSet() const; + void unsetTraffContDecs(); + /// <summary> + /// Map of Usage Monitoring data policy decisions. + /// </summary> + std::map<std::string, UsageMonitoringData> getUmDecs() const; + void setUmDecs(std::map<std::string, UsageMonitoringData> const& value); + bool umDecsIsSet() const; + void unsetUmDecs(); + /// <summary> + /// Map of QoS characteristics for non standard 5QIs. This map uses the 5QI + /// values as keys. + /// </summary> + std::map<std::string, QosCharacteristics> getQosChars() const; + void setQosChars(std::map<std::string, QosCharacteristics> const& value); + bool qosCharsIsSet() const; + void unsetQosChars(); + /// <summary> + /// Map of QoS Monitoring data policy decisions. + /// </summary> + std::map<std::string, QosMonitoringData> getQosMonDecs() const; + void setQosMonDecs(std::map<std::string, QosMonitoringData> const& value); + bool qosMonDecsIsSet() const; + void unsetQosMonDecs(); + /// <summary> + /// + /// </summary> + int32_t getReflectiveQoSTimer() const; + void setReflectiveQoSTimer(int32_t const value); + bool reflectiveQoSTimerIsSet() const; + void unsetReflectiveQoSTimer(); + /// <summary> + /// A map of condition data with the content being as described in + /// subclause 5.6.2.9. + /// </summary> + std::map<std::string, ConditionData> getConds() const; + void setConds(std::map<std::string, ConditionData> const& value); + bool condsIsSet() const; + void unsetConds(); + /// <summary> + /// + /// </summary> + std::string getRevalidationTime() const; + void setRevalidationTime(std::string const& value); + bool revalidationTimeIsSet() const; + void unsetRevalidationTime(); + /// <summary> + /// Indicates the offline charging is applicable to the PDU session or PCC + /// rule. + /// </summary> + bool isOffline() const; + void setOffline(bool const value); + bool offlineIsSet() const; + void unsetOffline(); + /// <summary> + /// Indicates the online charging is applicable to the PDU session or PCC + /// rule. + /// </summary> + bool isOnline() const; + void setOnline(bool const value); + bool onlineIsSet() const; + void unsetOnline(); + /// <summary> + /// Defines the policy control request triggers subscribed by the PCF. + /// </summary> + std::vector<PolicyControlRequestTrigger> getPolicyCtrlReqTriggers() const; + void setPolicyCtrlReqTriggers( + std::vector<PolicyControlRequestTrigger> const& value); + bool policyCtrlReqTriggersIsSet() const; + void unsetPolicyCtrlReqTriggers(); + /// <summary> + /// Defines the last list of rule control data requested by the PCF. + /// </summary> + std::vector<RequestedRuleData> getLastReqRuleData() const; + void setLastReqRuleData(std::vector<RequestedRuleData> const& value); + bool lastReqRuleDataIsSet() const; + void unsetLastReqRuleData(); + /// <summary> + /// + /// </summary> + RequestedUsageData getLastReqUsageData() const; + void setLastReqUsageData(RequestedUsageData const& value); + bool lastReqUsageDataIsSet() const; + void unsetLastReqUsageData(); + /// <summary> + /// Map of PRA information. + /// </summary> + std::map<std::string, PresenceInfoRm> getPraInfos() const; + void setPraInfos(std::map<std::string, PresenceInfoRm> const& value); + bool praInfosIsSet() const; + void unsetPraInfos(); + /// <summary> + /// + /// </summary> + int32_t getIpv4Index() const; + void setIpv4Index(int32_t const value); + bool ipv4IndexIsSet() const; + void unsetIpv4Index(); + /// <summary> + /// + /// </summary> + int32_t getIpv6Index() const; + void setIpv6Index(int32_t const value); + bool ipv6IndexIsSet() const; + void unsetIpv6Index(); + /// <summary> + /// + /// </summary> + QosFlowUsage getQosFlowUsage() const; + void setQosFlowUsage(QosFlowUsage const& value); + bool qosFlowUsageIsSet() const; + void unsetQosFlowUsage(); + /// <summary> + /// + /// </summary> + SmPolicyAssociationReleaseCause getRelCause() const; + void setRelCause(SmPolicyAssociationReleaseCause const& value); + bool relCauseIsSet() const; + void unsetRelCause(); + /// <summary> + /// + /// </summary> + std::string getSuppFeat() const; + void setSuppFeat(std::string const& value); + bool suppFeatIsSet() const; + void unsetSuppFeat(); + /// <summary> + /// + /// </summary> + PortManagementContainer getTsnPortManContDstt() const; + void setTsnPortManContDstt(PortManagementContainer const& value); + bool tsnPortManContDsttIsSet() const; + void unsetTsnPortManContDstt(); + /// <summary> + /// + /// </summary> + std::vector<PortManagementContainer> getTsnPortManContNwtts() const; + void setTsnPortManContNwtts( + std::vector<PortManagementContainer> const& value); + bool tsnPortManContNwttsIsSet() const; + void unsetTsnPortManContNwtts(); - /// <summary> - /// A map of Sessionrules with the content being the SessionRule as described in subclause 5.6.2.7. - /// </summary> - std::map<std::string, SessionRule> getSessRules() const; - void setSessRules(std::map<std::string, SessionRule> const& value); - bool sessRulesIsSet() const; - void unsetSessRules(); - /// <summary> - /// A map of PCC rules with the content being the PCCRule as described in subclause 5.6.2.6. - /// </summary> - std::map<std::string, PccRule> getPccRules() const; - void setPccRules(std::map<std::string, PccRule> const& value); - bool pccRulesIsSet() const; - void unsetPccRules(); - /// <summary> - /// If it is included and set to true, it indicates the P-CSCF Restoration is requested. - /// </summary> - bool isPcscfRestIndication() const; - void setPcscfRestIndication(bool const value); - bool pcscfRestIndicationIsSet() const; - void unsetPcscfRestIndication(); - /// <summary> - /// Map of QoS data policy decisions. - /// </summary> - std::map<std::string, QosData> getQosDecs() const; - void setQosDecs(std::map<std::string, QosData> const& value); - bool qosDecsIsSet() const; - void unsetQosDecs(); - /// <summary> - /// Map of Charging data policy decisions. - /// </summary> - std::map<std::string, ChargingData> getChgDecs() const; - void setChgDecs(std::map<std::string, ChargingData> const& value); - bool chgDecsIsSet() const; - void unsetChgDecs(); - /// <summary> - /// - /// </summary> - ChargingInformation getChargingInfo() const; - void setChargingInfo(ChargingInformation const& value); - bool chargingInfoIsSet() const; - void unsetChargingInfo(); - /// <summary> - /// Map of Traffic Control data policy decisions. - /// </summary> - std::map<std::string, TrafficControlData> getTraffContDecs() const; - void setTraffContDecs(std::map<std::string, TrafficControlData> const& value); - bool traffContDecsIsSet() const; - void unsetTraffContDecs(); - /// <summary> - /// Map of Usage Monitoring data policy decisions. - /// </summary> - std::map<std::string, UsageMonitoringData> getUmDecs() const; - void setUmDecs(std::map<std::string, UsageMonitoringData> const& value); - bool umDecsIsSet() const; - void unsetUmDecs(); - /// <summary> - /// Map of QoS characteristics for non standard 5QIs. This map uses the 5QI values as keys. - /// </summary> - std::map<std::string, QosCharacteristics> getQosChars() const; - void setQosChars(std::map<std::string, QosCharacteristics> const& value); - bool qosCharsIsSet() const; - void unsetQosChars(); - /// <summary> - /// Map of QoS Monitoring data policy decisions. - /// </summary> - std::map<std::string, QosMonitoringData> getQosMonDecs() const; - void setQosMonDecs(std::map<std::string, QosMonitoringData> const& value); - bool qosMonDecsIsSet() const; - void unsetQosMonDecs(); - /// <summary> - /// - /// </summary> - int32_t getReflectiveQoSTimer() const; - void setReflectiveQoSTimer(int32_t const value); - bool reflectiveQoSTimerIsSet() const; - void unsetReflectiveQoSTimer(); - /// <summary> - /// A map of condition data with the content being as described in subclause 5.6.2.9. - /// </summary> - std::map<std::string, ConditionData> getConds() const; - void setConds(std::map<std::string, ConditionData> const& value); - bool condsIsSet() const; - void unsetConds(); - /// <summary> - /// - /// </summary> - std::string getRevalidationTime() const; - void setRevalidationTime(std::string const& value); - bool revalidationTimeIsSet() const; - void unsetRevalidationTime(); - /// <summary> - /// Indicates the offline charging is applicable to the PDU session or PCC rule. - /// </summary> - bool isOffline() const; - void setOffline(bool const value); - bool offlineIsSet() const; - void unsetOffline(); - /// <summary> - /// Indicates the online charging is applicable to the PDU session or PCC rule. - /// </summary> - bool isOnline() const; - void setOnline(bool const value); - bool onlineIsSet() const; - void unsetOnline(); - /// <summary> - /// Defines the policy control request triggers subscribed by the PCF. - /// </summary> - std::vector<PolicyControlRequestTrigger> getPolicyCtrlReqTriggers() const; - void setPolicyCtrlReqTriggers(std::vector<PolicyControlRequestTrigger> const& value); - bool policyCtrlReqTriggersIsSet() const; - void unsetPolicyCtrlReqTriggers(); - /// <summary> - /// Defines the last list of rule control data requested by the PCF. - /// </summary> - std::vector<RequestedRuleData> getLastReqRuleData() const; - void setLastReqRuleData(std::vector<RequestedRuleData> const& value); - bool lastReqRuleDataIsSet() const; - void unsetLastReqRuleData(); - /// <summary> - /// - /// </summary> - RequestedUsageData getLastReqUsageData() const; - void setLastReqUsageData(RequestedUsageData const& value); - bool lastReqUsageDataIsSet() const; - void unsetLastReqUsageData(); - /// <summary> - /// Map of PRA information. - /// </summary> - std::map<std::string, PresenceInfoRm> getPraInfos() const; - void setPraInfos(std::map<std::string, PresenceInfoRm> const& value); - bool praInfosIsSet() const; - void unsetPraInfos(); - /// <summary> - /// - /// </summary> - int32_t getIpv4Index() const; - void setIpv4Index(int32_t const value); - bool ipv4IndexIsSet() const; - void unsetIpv4Index(); - /// <summary> - /// - /// </summary> - int32_t getIpv6Index() const; - void setIpv6Index(int32_t const value); - bool ipv6IndexIsSet() const; - void unsetIpv6Index(); - /// <summary> - /// - /// </summary> - QosFlowUsage getQosFlowUsage() const; - void setQosFlowUsage(QosFlowUsage const& value); - bool qosFlowUsageIsSet() const; - void unsetQosFlowUsage(); - /// <summary> - /// - /// </summary> - SmPolicyAssociationReleaseCause getRelCause() const; - void setRelCause(SmPolicyAssociationReleaseCause const& value); - bool relCauseIsSet() const; - void unsetRelCause(); - /// <summary> - /// - /// </summary> - std::string getSuppFeat() const; - void setSuppFeat(std::string const& value); - bool suppFeatIsSet() const; - void unsetSuppFeat(); - /// <summary> - /// - /// </summary> - PortManagementContainer getTsnPortManContDstt() const; - void setTsnPortManContDstt(PortManagementContainer const& value); - bool tsnPortManContDsttIsSet() const; - void unsetTsnPortManContDstt(); - /// <summary> - /// - /// </summary> - std::vector<PortManagementContainer> getTsnPortManContNwtts() const; - void setTsnPortManContNwtts(std::vector<PortManagementContainer> const& value); - bool tsnPortManContNwttsIsSet() const; - void unsetTsnPortManContNwtts(); + friend void to_json(nlohmann::json& j, const SmPolicyDecision& o); + friend void from_json(const nlohmann::json& j, SmPolicyDecision& o); - friend void to_json(nlohmann::json& j, const SmPolicyDecision& o); - friend void from_json(const nlohmann::json& j, SmPolicyDecision& o); -protected: - std::map<std::string, SessionRule> m_SessRules; - bool m_SessRulesIsSet; - std::map<std::string, PccRule> m_PccRules; - bool m_PccRulesIsSet; - bool m_PcscfRestIndication; - bool m_PcscfRestIndicationIsSet; - std::map<std::string, QosData> m_QosDecs; - bool m_QosDecsIsSet; - std::map<std::string, ChargingData> m_ChgDecs; - bool m_ChgDecsIsSet; - ChargingInformation m_ChargingInfo; - bool m_ChargingInfoIsSet; - std::map<std::string, TrafficControlData> m_TraffContDecs; - bool m_TraffContDecsIsSet; - std::map<std::string, UsageMonitoringData> m_UmDecs; - bool m_UmDecsIsSet; - std::map<std::string, QosCharacteristics> m_QosChars; - bool m_QosCharsIsSet; - std::map<std::string, QosMonitoringData> m_QosMonDecs; - bool m_QosMonDecsIsSet; - int32_t m_ReflectiveQoSTimer; - bool m_ReflectiveQoSTimerIsSet; - std::map<std::string, ConditionData> m_Conds; - bool m_CondsIsSet; - std::string m_RevalidationTime; - bool m_RevalidationTimeIsSet; - bool m_Offline; - bool m_OfflineIsSet; - bool m_Online; - bool m_OnlineIsSet; - std::vector<PolicyControlRequestTrigger> m_PolicyCtrlReqTriggers; - bool m_PolicyCtrlReqTriggersIsSet; - std::vector<RequestedRuleData> m_LastReqRuleData; - bool m_LastReqRuleDataIsSet; - RequestedUsageData m_LastReqUsageData; - bool m_LastReqUsageDataIsSet; - std::map<std::string, PresenceInfoRm> m_PraInfos; - bool m_PraInfosIsSet; - int32_t m_Ipv4Index; - bool m_Ipv4IndexIsSet; - int32_t m_Ipv6Index; - bool m_Ipv6IndexIsSet; - QosFlowUsage m_QosFlowUsage; - bool m_QosFlowUsageIsSet; - SmPolicyAssociationReleaseCause m_RelCause; - bool m_RelCauseIsSet; - std::string m_SuppFeat; - bool m_SuppFeatIsSet; - PortManagementContainer m_TsnPortManContDstt; - bool m_TsnPortManContDsttIsSet; - std::vector<PortManagementContainer> m_TsnPortManContNwtts; - bool m_TsnPortManContNwttsIsSet; - + protected: + std::map<std::string, SessionRule> m_SessRules; + bool m_SessRulesIsSet; + std::map<std::string, PccRule> m_PccRules; + bool m_PccRulesIsSet; + bool m_PcscfRestIndication; + bool m_PcscfRestIndicationIsSet; + std::map<std::string, QosData> m_QosDecs; + bool m_QosDecsIsSet; + std::map<std::string, ChargingData> m_ChgDecs; + bool m_ChgDecsIsSet; + ChargingInformation m_ChargingInfo; + bool m_ChargingInfoIsSet; + std::map<std::string, TrafficControlData> m_TraffContDecs; + bool m_TraffContDecsIsSet; + std::map<std::string, UsageMonitoringData> m_UmDecs; + bool m_UmDecsIsSet; + std::map<std::string, QosCharacteristics> m_QosChars; + bool m_QosCharsIsSet; + std::map<std::string, QosMonitoringData> m_QosMonDecs; + bool m_QosMonDecsIsSet; + int32_t m_ReflectiveQoSTimer; + bool m_ReflectiveQoSTimerIsSet; + std::map<std::string, ConditionData> m_Conds; + bool m_CondsIsSet; + std::string m_RevalidationTime; + bool m_RevalidationTimeIsSet; + bool m_Offline; + bool m_OfflineIsSet; + bool m_Online; + bool m_OnlineIsSet; + std::vector<PolicyControlRequestTrigger> m_PolicyCtrlReqTriggers; + bool m_PolicyCtrlReqTriggersIsSet; + std::vector<RequestedRuleData> m_LastReqRuleData; + bool m_LastReqRuleDataIsSet; + RequestedUsageData m_LastReqUsageData; + bool m_LastReqUsageDataIsSet; + std::map<std::string, PresenceInfoRm> m_PraInfos; + bool m_PraInfosIsSet; + int32_t m_Ipv4Index; + bool m_Ipv4IndexIsSet; + int32_t m_Ipv6Index; + bool m_Ipv6IndexIsSet; + QosFlowUsage m_QosFlowUsage; + bool m_QosFlowUsageIsSet; + SmPolicyAssociationReleaseCause m_RelCause; + bool m_RelCauseIsSet; + std::string m_SuppFeat; + bool m_SuppFeatIsSet; + PortManagementContainer m_TsnPortManContDstt; + bool m_TsnPortManContDsttIsSet; + std::vector<PortManagementContainer> m_TsnPortManContNwtts; + bool m_TsnPortManContNwttsIsSet; }; } // namespace model diff --git a/src/api-server/model/SmPolicyDeleteData.cpp b/src/api-server/model/SmPolicyDeleteData.cpp old mode 100755 new mode 100644 index 6e28840..255a847 --- a/src/api-server/model/SmPolicyDeleteData.cpp +++ b/src/api-server/model/SmPolicyDeleteData.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,309 +20,261 @@ namespace oai { namespace pcf { namespace model { -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; - +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()); - } +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 { + 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; +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 (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;"; } - - 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++; - } - } + { // 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; -} + } + + 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++; + } + } + } -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())) - - ; + return success; } -bool SmPolicyDeleteData::operator!=(const SmPolicyDeleteData& rhs) const -{ - return !(*this == rhs); +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())) + + ; } -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; - +bool SmPolicyDeleteData::operator!=(const SmPolicyDeleteData& rhs) const { + return !(*this == rhs); } -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; - } - +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; } -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; +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 diff --git a/src/api-server/model/SmPolicyDeleteData.h b/src/api-server/model/SmPolicyDeleteData.h old mode 100755 new mode 100644 index 5b3e2ea..6addb32 --- a/src/api-server/model/SmPolicyDeleteData.h +++ b/src/api-server/model/SmPolicyDeleteData.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -33,106 +33,105 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SmPolicyDeleteData -{ -public: - SmPolicyDeleteData(); - virtual ~SmPolicyDeleteData() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const SmPolicyDeleteData& rhs) const; - bool operator!=(const SmPolicyDeleteData& rhs) const; + ///////////////////////////////////////////// + /// SmPolicyDeleteData members - ///////////////////////////////////////////// - /// SmPolicyDeleteData members + /// <summary> + /// + /// </summary> + UserLocation getUserLocationInfo() const; + void setUserLocationInfo(UserLocation const& value); + bool userLocationInfoIsSet() const; + void unsetUserLocationInfo(); + /// <summary> + /// + /// </summary> + std::string getUeTimeZone() const; + void setUeTimeZone(std::string const& value); + bool ueTimeZoneIsSet() const; + void unsetUeTimeZone(); + /// <summary> + /// + /// </summary> + PlmnIdNid getServingNetwork() const; + void setServingNetwork(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(); - /// <summary> - /// - /// </summary> - UserLocation getUserLocationInfo() const; - void setUserLocationInfo(UserLocation const& value); - bool userLocationInfoIsSet() const; - void unsetUserLocationInfo(); - /// <summary> - /// - /// </summary> - std::string getUeTimeZone() const; - void setUeTimeZone(std::string const& value); - bool ueTimeZoneIsSet() const; - void unsetUeTimeZone(); - /// <summary> - /// - /// </summary> - PlmnIdNid getServingNetwork() const; - void setServingNetwork(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); - friend void to_json(nlohmann::json& j, const SmPolicyDeleteData& o); - friend void from_json(const nlohmann::json& j, SmPolicyDeleteData& o); -protected: - UserLocation m_UserLocationInfo; - bool m_UserLocationInfoIsSet; - std::string m_UeTimeZone; - bool m_UeTimeZoneIsSet; - 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; - + protected: + UserLocation m_UserLocationInfo; + bool m_UserLocationInfoIsSet; + std::string m_UeTimeZone; + bool m_UeTimeZoneIsSet; + 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 diff --git a/src/api-server/model/SmPolicyNotification.cpp b/src/api-server/model/SmPolicyNotification.cpp old mode 100755 new mode 100644 index 416c8fc..091bc96 --- a/src/api-server/model/SmPolicyNotification.cpp +++ b/src/api-server/model/SmPolicyNotification.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,116 +20,94 @@ 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()); - } +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 { + 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; +bool SmPolicyNotification::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "SmPolicyNotification" : pathPrefix; - - return success; + 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 + + ((!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); +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 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; - } - +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; +std::string SmPolicyNotification::getResourceUri() const { + return m_ResourceUri; } -void SmPolicyNotification::setResourceUri(std::string const& value) -{ - m_ResourceUri = value; - m_ResourceUriIsSet = true; +void SmPolicyNotification::setResourceUri(std::string const& value) { + m_ResourceUri = value; + m_ResourceUriIsSet = true; } -bool SmPolicyNotification::resourceUriIsSet() const -{ - return m_ResourceUriIsSet; +bool SmPolicyNotification::resourceUriIsSet() const { + return m_ResourceUriIsSet; } -void SmPolicyNotification::unsetResourceUri() -{ - m_ResourceUriIsSet = false; +void SmPolicyNotification::unsetResourceUri() { + m_ResourceUriIsSet = false; } -SmPolicyDecision SmPolicyNotification::getSmPolicyDecision() const -{ - return m_SmPolicyDecision; +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::setSmPolicyDecision(SmPolicyDecision const& value) { + m_SmPolicyDecision = value; + m_SmPolicyDecisionIsSet = true; } -void SmPolicyNotification::unsetSmPolicyDecision() -{ - m_SmPolicyDecisionIsSet = false; +bool SmPolicyNotification::smPolicyDecisionIsSet() const { + return m_SmPolicyDecisionIsSet; +} +void SmPolicyNotification::unsetSmPolicyDecision() { + m_SmPolicyDecisionIsSet = false; } - } // namespace model } // namespace pcf diff --git a/src/api-server/model/SmPolicyNotification.h b/src/api-server/model/SmPolicyNotification.h old mode 100755 new mode 100644 index 6c3b7e6..7049cbc --- a/src/api-server/model/SmPolicyNotification.h +++ b/src/api-server/model/SmPolicyNotification.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,61 +28,60 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SmPolicyNotification -{ -public: - SmPolicyNotification(); - virtual ~SmPolicyNotification() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const SmPolicyNotification& rhs) const; - bool operator!=(const SmPolicyNotification& rhs) const; + ///////////////////////////////////////////// + /// SmPolicyNotification members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; - + protected: + std::string m_ResourceUri; + bool m_ResourceUriIsSet; + SmPolicyDecision m_SmPolicyDecision; + bool m_SmPolicyDecisionIsSet; }; } // namespace model diff --git a/src/api-server/model/SmPolicyUpdateContextData.cpp b/src/api-server/model/SmPolicyUpdateContextData.cpp old mode 100755 new mode 100644 index 00cea53..e7b7143 --- a/src/api-server/model/SmPolicyUpdateContextData.cpp +++ b/src/api-server/model/SmPolicyUpdateContextData.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,1574 +20,1358 @@ namespace oai { namespace pcf { namespace model { -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()); - } +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; } -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++; - } - } +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;"; } - - 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++; - } - } + { // 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 (relIpv4AddressIsSet()) - { - const std::string& value = m_RelIpv4Address; - const std::string currentValuePath = _pathPrefix + ".relIpv4Address"; - - + } + + 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;"; } - - if (ipv4AddressIsSet()) - { - const std::string& value = m_Ipv4Address; - const std::string currentValuePath = _pathPrefix + ".ipv4Address"; - - + { // 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 (relUeMacIsSet()) - { - const std::string& value = m_RelUeMac; - const std::string currentValuePath = _pathPrefix + ".relUeMac"; - - + } + + 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;"; } - - if (ueMacIsSet()) - { - const std::string& value = m_UeMac; - const std::string currentValuePath = _pathPrefix + ".ueMac"; - - + { // 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 (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;"; } - - 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++; - } - } + { // 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 (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 (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;"; } - - 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++; - } - } + { // 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 (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 (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;"; } - - if (repPraInfosIsSet()) - { - const std::map<std::string, PresenceInfo>& value = m_RepPraInfos; - const std::string currentValuePath = _pathPrefix + ".repPraInfos"; - - + { // 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 (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;"; } - - 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++; - } - } + { // 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; + } + + return success; } -bool SmPolicyUpdateContextData::tsnPortManContNwttsIsSet() const -{ - return m_TsnPortManContNwttsIsSet; + +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())) + + ; } -void SmPolicyUpdateContextData::unsetTsnPortManContNwtts() -{ - m_TsnPortManContNwttsIsSet = false; + +bool SmPolicyUpdateContextData::operator!=( + const SmPolicyUpdateContextData& rhs) const { + return !(*this == rhs); } -std::vector<IpMulticastAddressInfo> SmPolicyUpdateContextData::getMulAddrInfos() const -{ - return m_MulAddrInfos; + +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 SmPolicyUpdateContextData::setMulAddrInfos(std::vector<IpMulticastAddressInfo> const& value) -{ - m_MulAddrInfos = value; - m_MulAddrInfosIsSet = true; + +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; + } } -bool SmPolicyUpdateContextData::mulAddrInfosIsSet() const -{ - return m_MulAddrInfosIsSet; + +std::vector<PolicyControlRequestTrigger> +SmPolicyUpdateContextData::getRepPolicyCtrlReqTriggers() const { + return m_RepPolicyCtrlReqTriggers; } -void SmPolicyUpdateContextData::unsetMulAddrInfos() -{ - m_MulAddrInfosIsSet = false; +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 diff --git a/src/api-server/model/SmPolicyUpdateContextData.h b/src/api-server/model/SmPolicyUpdateContextData.h old mode 100755 new mode 100644 index 0432296..1a9d32b --- a/src/api-server/model/SmPolicyUpdateContextData.h +++ b/src/api-server/model/SmPolicyUpdateContextData.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -56,430 +56,436 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SmPolicyUpdateContextData -{ -public: - SmPolicyUpdateContextData(); - virtual ~SmPolicyUpdateContextData() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const SmPolicyUpdateContextData& rhs) const; - bool operator!=(const SmPolicyUpdateContextData& rhs) const; + ///////////////////////////////////////////// + /// SmPolicyUpdateContextData members - ///////////////////////////////////////////// - /// 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> + AccessType getAccessType() const; + void setAccessType(AccessType const& value); + bool accessTypeIsSet() const; + void unsetAccessType(); + /// <summary> + /// + /// </summary> + RatType getRatType() const; + void setRatType(RatType const& value); + bool ratTypeIsSet() const; + void unsetRatType(); + /// <summary> + /// + /// </summary> + AdditionalAccessInfo getAddAccessInfo() const; + void setAddAccessInfo(AdditionalAccessInfo const& value); + bool addAccessInfoIsSet() const; + void unsetAddAccessInfo(); + /// <summary> + /// + /// </summary> + AdditionalAccessInfo getRelAccessInfo() const; + void setRelAccessInfo(AdditionalAccessInfo const& value); + bool relAccessInfoIsSet() const; + void unsetRelAccessInfo(); + /// <summary> + /// + /// </summary> + PlmnIdNid getServingNetwork() const; + void setServingNetwork(PlmnIdNid const& value); + bool servingNetworkIsSet() const; + void unsetServingNetwork(); + /// <summary> + /// + /// </summary> + UserLocation getUserLocationInfo() const; + void setUserLocationInfo(UserLocation const& value); + bool userLocationInfoIsSet() const; + void unsetUserLocationInfo(); + /// <summary> + /// + /// </summary> + std::string getUeTimeZone() const; + void setUeTimeZone(std::string const& value); + bool ueTimeZoneIsSet() const; + void unsetUeTimeZone(); + /// <summary> + /// + /// </summary> + std::string 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> + Ipv6Prefix getIpv6AddressPrefix() const; + void setIpv6AddressPrefix(Ipv6Prefix const& value); + bool ipv6AddressPrefixIsSet() const; + void unsetIpv6AddressPrefix(); + /// <summary> + /// + /// </summary> + Ipv6Prefix getRelIpv6AddressPrefix() const; + void setRelIpv6AddressPrefix(Ipv6Prefix const& value); + bool relIpv6AddressPrefixIsSet() const; + void unsetRelIpv6AddressPrefix(); + /// <summary> + /// + /// </summary> + Ipv6Prefix getAddIpv6AddrPrefixes() const; + void setAddIpv6AddrPrefixes(Ipv6Prefix const& value); + bool addIpv6AddrPrefixesIsSet() const; + void unsetAddIpv6AddrPrefixes(); + /// <summary> + /// + /// </summary> + Ipv6Prefix getAddRelIpv6AddrPrefixes() const; + void setAddRelIpv6AddrPrefixes(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> + Ambr getSubsSessAmbr() const; + void setSubsSessAmbr(Ambr const& value); + bool subsSessAmbrIsSet() const; + void unsetSubsSessAmbr(); + /// <summary> + /// Indicates the DN-AAA authorization profile index + /// </summary> + std::string getAuthProfIndex() const; + void setAuthProfIndex(std::string const& value); + bool authProfIndexIsSet() const; + void unsetAuthProfIndex(); + /// <summary> + /// + /// </summary> + SubscribedDefaultQos getSubsDefQos() const; + void setSubsDefQos(SubscribedDefaultQos const& value); + bool subsDefQosIsSet() const; + void unsetSubsDefQos(); + /// <summary> + /// Contains the number of supported packet filter for signalled QoS rules. + /// </summary> + int32_t getNumOfPackFilter() const; + void setNumOfPackFilter(int32_t const value); + bool numOfPackFilterIsSet() const; + void unsetNumOfPackFilter(); + /// <summary> + /// 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, PresenceInfo> getRepPraInfos() const; + void setRepPraInfos(std::map<std::string, 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> + TraceData getTraceReq() const; + void setTraceReq(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> + AtsssCapability getAtsssCapab() const; + void setAtsssCapab(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(); - /// <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> - AccessType getAccessType() const; - void setAccessType(AccessType const& value); - bool accessTypeIsSet() const; - void unsetAccessType(); - /// <summary> - /// - /// </summary> - RatType getRatType() const; - void setRatType(RatType const& value); - bool ratTypeIsSet() const; - void unsetRatType(); - /// <summary> - /// - /// </summary> - AdditionalAccessInfo getAddAccessInfo() const; - void setAddAccessInfo(AdditionalAccessInfo const& value); - bool addAccessInfoIsSet() const; - void unsetAddAccessInfo(); - /// <summary> - /// - /// </summary> - AdditionalAccessInfo getRelAccessInfo() const; - void setRelAccessInfo(AdditionalAccessInfo const& value); - bool relAccessInfoIsSet() const; - void unsetRelAccessInfo(); - /// <summary> - /// - /// </summary> - PlmnIdNid getServingNetwork() const; - void setServingNetwork(PlmnIdNid const& value); - bool servingNetworkIsSet() const; - void unsetServingNetwork(); - /// <summary> - /// - /// </summary> - UserLocation getUserLocationInfo() const; - void setUserLocationInfo(UserLocation const& value); - bool userLocationInfoIsSet() const; - void unsetUserLocationInfo(); - /// <summary> - /// - /// </summary> - std::string getUeTimeZone() const; - void setUeTimeZone(std::string const& value); - bool ueTimeZoneIsSet() const; - void unsetUeTimeZone(); - /// <summary> - /// - /// </summary> - std::string 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> - Ipv6Prefix getIpv6AddressPrefix() const; - void setIpv6AddressPrefix(Ipv6Prefix const& value); - bool ipv6AddressPrefixIsSet() const; - void unsetIpv6AddressPrefix(); - /// <summary> - /// - /// </summary> - Ipv6Prefix getRelIpv6AddressPrefix() const; - void setRelIpv6AddressPrefix(Ipv6Prefix const& value); - bool relIpv6AddressPrefixIsSet() const; - void unsetRelIpv6AddressPrefix(); - /// <summary> - /// - /// </summary> - Ipv6Prefix getAddIpv6AddrPrefixes() const; - void setAddIpv6AddrPrefixes(Ipv6Prefix const& value); - bool addIpv6AddrPrefixesIsSet() const; - void unsetAddIpv6AddrPrefixes(); - /// <summary> - /// - /// </summary> - Ipv6Prefix getAddRelIpv6AddrPrefixes() const; - void setAddRelIpv6AddrPrefixes(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> - Ambr getSubsSessAmbr() const; - void setSubsSessAmbr(Ambr const& value); - bool subsSessAmbrIsSet() const; - void unsetSubsSessAmbr(); - /// <summary> - /// Indicates the DN-AAA authorization profile index - /// </summary> - std::string getAuthProfIndex() const; - void setAuthProfIndex(std::string const& value); - bool authProfIndexIsSet() const; - void unsetAuthProfIndex(); - /// <summary> - /// - /// </summary> - SubscribedDefaultQos getSubsDefQos() const; - void setSubsDefQos(SubscribedDefaultQos const& value); - bool subsDefQosIsSet() const; - void unsetSubsDefQos(); - /// <summary> - /// Contains the number of supported packet filter for signalled QoS rules. - /// </summary> - int32_t getNumOfPackFilter() const; - void setNumOfPackFilter(int32_t const value); - bool numOfPackFilterIsSet() const; - void unsetNumOfPackFilter(); - /// <summary> - /// 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, PresenceInfo> getRepPraInfos() const; - void setRepPraInfos(std::map<std::string, 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> - TraceData getTraceReq() const; - void setTraceReq(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> - AtsssCapability getAtsssCapab() const; - void setAtsssCapab(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); - 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; - AccessType m_AccessType; - bool m_AccessTypeIsSet; - RatType m_RatType; - bool m_RatTypeIsSet; - AdditionalAccessInfo m_AddAccessInfo; - bool m_AddAccessInfoIsSet; - AdditionalAccessInfo m_RelAccessInfo; - bool m_RelAccessInfoIsSet; - PlmnIdNid m_ServingNetwork; - bool m_ServingNetworkIsSet; - 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; - Ipv6Prefix m_Ipv6AddressPrefix; - bool m_Ipv6AddressPrefixIsSet; - Ipv6Prefix m_RelIpv6AddressPrefix; - bool m_RelIpv6AddressPrefixIsSet; - Ipv6Prefix m_AddIpv6AddrPrefixes; - bool m_AddIpv6AddrPrefixesIsSet; - Ipv6Prefix m_AddRelIpv6AddrPrefixes; - bool m_AddRelIpv6AddrPrefixesIsSet; - std::string m_RelUeMac; - bool m_RelUeMacIsSet; - std::string m_UeMac; - bool m_UeMacIsSet; - Ambr m_SubsSessAmbr; - bool m_SubsSessAmbrIsSet; - std::string m_AuthProfIndex; - bool m_AuthProfIndexIsSet; - SubscribedDefaultQos m_SubsDefQos; - bool m_SubsDefQosIsSet; - int32_t m_NumOfPackFilter; - bool m_NumOfPackFilterIsSet; - 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, 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; - TraceData m_TraceReq; - bool m_TraceReqIsSet; - MaPduIndication m_MaPduInd; - bool m_MaPduIndIsSet; - 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; - + protected: + std::vector<PolicyControlRequestTrigger> m_RepPolicyCtrlReqTriggers; + bool m_RepPolicyCtrlReqTriggersIsSet; + std::vector<AccNetChId> m_AccNetChIds; + bool m_AccNetChIdsIsSet; + AccessType m_AccessType; + bool m_AccessTypeIsSet; + RatType m_RatType; + bool m_RatTypeIsSet; + AdditionalAccessInfo m_AddAccessInfo; + bool m_AddAccessInfoIsSet; + AdditionalAccessInfo m_RelAccessInfo; + bool m_RelAccessInfoIsSet; + PlmnIdNid m_ServingNetwork; + bool m_ServingNetworkIsSet; + 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; + Ipv6Prefix m_Ipv6AddressPrefix; + bool m_Ipv6AddressPrefixIsSet; + Ipv6Prefix m_RelIpv6AddressPrefix; + bool m_RelIpv6AddressPrefixIsSet; + Ipv6Prefix m_AddIpv6AddrPrefixes; + bool m_AddIpv6AddrPrefixesIsSet; + Ipv6Prefix m_AddRelIpv6AddrPrefixes; + bool m_AddRelIpv6AddrPrefixesIsSet; + std::string m_RelUeMac; + bool m_RelUeMacIsSet; + std::string m_UeMac; + bool m_UeMacIsSet; + Ambr m_SubsSessAmbr; + bool m_SubsSessAmbrIsSet; + std::string m_AuthProfIndex; + bool m_AuthProfIndexIsSet; + SubscribedDefaultQos m_SubsDefQos; + bool m_SubsDefQosIsSet; + int32_t m_NumOfPackFilter; + bool m_NumOfPackFilterIsSet; + 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, 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; + TraceData m_TraceReq; + bool m_TraceReqIsSet; + MaPduIndication m_MaPduInd; + bool m_MaPduIndIsSet; + 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 diff --git a/src/api-server/model/Snssai.cpp b/src/api-server/model/Snssai.cpp old mode 100755 new mode 100644 index 0427336..1584eda --- a/src/api-server/model/Snssai.cpp +++ b/src/api-server/model/Snssai.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "Snssai.h" #include "Helpers.h" @@ -20,131 +20,100 @@ namespace oai { namespace pcf { namespace model { -Snssai::Snssai() -{ - m_Sst = 0; - m_Sd = ""; - m_SdIsSet = false; - +Snssai::Snssai() { + m_Sst = 0; + m_Sd = ""; + m_SdIsSet = false; } -void Snssai::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void Snssai::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool Snssai::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool Snssai::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool Snssai::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "Snssai" : pathPrefix; - - - - /* Sst */ { - const int32_t& value = m_Sst; - const std::string currentValuePath = _pathPrefix + ".sst"; - - - 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;"; - } +bool Snssai::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "Snssai" : pathPrefix; - } - - if (sdIsSet()) - { - const std::string& value = m_Sd; - const std::string currentValuePath = _pathPrefix + ".sd"; - - + /* Sst */ { + const int32_t& value = m_Sst; + const std::string currentValuePath = _pathPrefix + ".sst"; + if (value < 0) { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0;"; } - - return success; + if (value > 255) { + success = false; + msg << currentValuePath << ": must be less than or equal to 255;"; + } + } + + if (sdIsSet()) { + const std::string& value = m_Sd; + const std::string currentValuePath = _pathPrefix + ".sd"; + } + + return success; } -bool Snssai::operator==(const Snssai& rhs) const -{ - return - - - (getSst() == rhs.getSst()) - && - - - ((!sdIsSet() && !rhs.sdIsSet()) || (sdIsSet() && rhs.sdIsSet() && getSd() == rhs.getSd())) - - ; +bool Snssai::operator==(const Snssai& rhs) const { + return + + (getSst() == rhs.getSst()) && + + ((!sdIsSet() && !rhs.sdIsSet()) || + (sdIsSet() && rhs.sdIsSet() && getSd() == rhs.getSd())) + + ; } -bool Snssai::operator!=(const Snssai& rhs) const -{ - return !(*this == rhs); +bool Snssai::operator!=(const Snssai& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const Snssai& o) -{ - j = nlohmann::json(); - j["sst"] = o.m_Sst; - if(o.sdIsSet()) - j["sd"] = o.m_Sd; - +void to_json(nlohmann::json& j, const Snssai& o) { + j = nlohmann::json(); + j["sst"] = o.m_Sst; + if (o.sdIsSet()) j["sd"] = o.m_Sd; } -void from_json(const nlohmann::json& j, Snssai& o) -{ - j.at("sst").get_to(o.m_Sst); - if(j.find("sd") != j.end()) - { - j.at("sd").get_to(o.m_Sd); - o.m_SdIsSet = true; - } - +void from_json(const nlohmann::json& j, Snssai& o) { + j.at("sst").get_to(o.m_Sst); + if (j.find("sd") != j.end()) { + j.at("sd").get_to(o.m_Sd); + o.m_SdIsSet = true; + } } -int32_t Snssai::getSst() const -{ - return m_Sst; +int32_t Snssai::getSst() const { + return m_Sst; } -void Snssai::setSst(int32_t const value) -{ - m_Sst = value; +void Snssai::setSst(int32_t const value) { + m_Sst = value; } -std::string Snssai::getSd() const -{ - return m_Sd; +std::string Snssai::getSd() const { + return m_Sd; } -void Snssai::setSd(std::string const& value) -{ - m_Sd = value; - m_SdIsSet = true; +void Snssai::setSd(std::string const& value) { + m_Sd = value; + m_SdIsSet = true; } -bool Snssai::sdIsSet() const -{ - return m_SdIsSet; +bool Snssai::sdIsSet() const { + return m_SdIsSet; } -void Snssai::unsetSd() -{ - m_SdIsSet = false; +void Snssai::unsetSd() { + m_SdIsSet = false; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/Snssai.h b/src/api-server/model/Snssai.h old mode 100755 new mode 100644 index 40f64f3..93cc876 --- a/src/api-server/model/Snssai.h +++ b/src/api-server/model/Snssai.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * Snssai.h * - * + * */ #ifndef Snssai_H_ #define Snssai_H_ - #include <string> #include <nlohmann/json.hpp> @@ -27,59 +27,58 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class Snssai -{ -public: - Snssai(); - virtual ~Snssai() = default; +class Snssai { + public: + Snssai(); + virtual ~Snssai() = 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. 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> - /// 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; - /// <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 Snssai& rhs) const; + bool operator!=(const Snssai& rhs) const; - bool operator==(const Snssai& rhs) const; - bool operator!=(const Snssai& rhs) const; + ///////////////////////////////////////////// + /// Snssai members - ///////////////////////////////////////////// - /// Snssai members + /// <summary> + /// + /// </summary> + int32_t getSst() const; + void setSst(int32_t const value); + /// <summary> + /// + /// </summary> + std::string getSd() const; + void setSd(std::string const& value); + bool sdIsSet() const; + void unsetSd(); - /// <summary> - /// - /// </summary> - int32_t getSst() const; - void setSst(int32_t const value); - /// <summary> - /// - /// </summary> - std::string getSd() const; - void setSd(std::string const& value); - bool sdIsSet() const; - void unsetSd(); + friend void to_json(nlohmann::json& j, const Snssai& o); + friend void from_json(const nlohmann::json& j, Snssai& o); - friend void to_json(nlohmann::json& j, const Snssai& o); - friend void from_json(const nlohmann::json& j, Snssai& o); -protected: - int32_t m_Sst; + protected: + int32_t m_Sst; - std::string m_Sd; - bool m_SdIsSet; - + std::string m_Sd; + bool m_SdIsSet; }; } // namespace model diff --git a/src/api-server/model/SteerModeValue.cpp b/src/api-server/model/SteerModeValue.cpp old mode 100755 new mode 100644 index 47e6641..5d7de5e --- a/src/api-server/model/SteerModeValue.cpp +++ b/src/api-server/model/SteerModeValue.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -SteerModeValue::SteerModeValue() -{ - -} +SteerModeValue::SteerModeValue() {} -void SteerModeValue::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool SteerModeValue::operator!=(const SteerModeValue& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, SteerModeValue& o) { + from_json(j, o.m_value); } -SteerModeValue_anyOf SteerModeValue::getValue() const -{ - return m_value; +SteerModeValue_anyOf SteerModeValue::getValue() const { + return m_value; } -void SteerModeValue::setValue(SteerModeValue_anyOf value) -{ - m_value = value; +void SteerModeValue::setValue(SteerModeValue_anyOf value) { + m_value = value; } -SteerModeValue_anyOf::eSteerModeValue_anyOf SteerModeValue::getEnumValue() const -{ - return m_value.getValue(); +SteerModeValue_anyOf::eSteerModeValue_anyOf SteerModeValue::getEnumValue() + const { + return m_value.getValue(); } -void SteerModeValue::setEnumValue(SteerModeValue_anyOf::eSteerModeValue_anyOf value) -{ - m_value.setValue(value); +void SteerModeValue::setEnumValue( + SteerModeValue_anyOf::eSteerModeValue_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/SteerModeValue.h b/src/api-server/model/SteerModeValue.h old mode 100755 new mode 100644 index ed4e8e0..bd04504 --- a/src/api-server/model/SteerModeValue.h +++ b/src/api-server/model/SteerModeValue.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SteerModeValue -{ -public: - SteerModeValue(); - virtual ~SteerModeValue() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const SteerModeValue& rhs) const; + bool operator!=(const SteerModeValue& rhs) const; - ///////////////////////////////////////////// - /// SteerModeValue members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + SteerModeValue_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/SteerModeValue_anyOf.cpp b/src/api-server/model/SteerModeValue_anyOf.cpp old mode 100755 new mode 100644 index 422d6c9..74a5ea4 --- a/src/api-server/model/SteerModeValue_anyOf.cpp +++ b/src/api-server/model/SteerModeValue_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,109 +20,94 @@ namespace oai { namespace pcf { namespace model { -SteerModeValue_anyOf::SteerModeValue_anyOf() -{ - -} +SteerModeValue_anyOf::SteerModeValue_anyOf() {} -void SteerModeValue_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == SteerModeValue_anyOf::eSteerModeValue_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool SteerModeValue_anyOf::operator!=(const SteerModeValue_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +SteerModeValue_anyOf::eSteerModeValue_anyOf SteerModeValue_anyOf::getValue() + const { + return m_value; } -void SteerModeValue_anyOf::setValue(SteerModeValue_anyOf::eSteerModeValue_anyOf value) -{ - m_value = value; +void SteerModeValue_anyOf::setValue( + SteerModeValue_anyOf::eSteerModeValue_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/SteerModeValue_anyOf.h b/src/api-server/model/SteerModeValue_anyOf.h old mode 100755 new mode 100644 index 2d322f6..a5ca2e0 --- a/src/api-server/model/SteerModeValue_anyOf.h +++ b/src/api-server/model/SteerModeValue_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,55 +26,57 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SteerModeValue_anyOf -{ -public: - SteerModeValue_anyOf(); - virtual ~SteerModeValue_anyOf() = default; +class SteerModeValue_anyOf { + public: + SteerModeValue_anyOf(); + virtual ~SteerModeValue_anyOf() = default; - enum class eSteerModeValue_anyOf { + 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, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const SteerModeValue_anyOf& rhs) const; + bool operator!=(const SteerModeValue_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// SteerModeValue_anyOf members - bool operator==(const SteerModeValue_anyOf& rhs) const; - bool operator!=(const SteerModeValue_anyOf& rhs) const; + SteerModeValue_anyOf::eSteerModeValue_anyOf getValue() const; + void setValue(SteerModeValue_anyOf::eSteerModeValue_anyOf value); - ///////////////////////////////////////////// - /// SteerModeValue_anyOf members + friend void to_json(nlohmann::json& j, const SteerModeValue_anyOf& o); + friend void from_json(const nlohmann::json& j, SteerModeValue_anyOf& o); - 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; + protected: + SteerModeValue_anyOf::eSteerModeValue_anyOf m_value = SteerModeValue_anyOf:: + eSteerModeValue_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/SteeringFunctionality.cpp b/src/api-server/model/SteeringFunctionality.cpp old mode 100755 new mode 100644 index becc24a..48595d4 --- a/src/api-server/model/SteeringFunctionality.cpp +++ b/src/api-server/model/SteeringFunctionality.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -SteeringFunctionality::SteeringFunctionality() -{ - -} +SteeringFunctionality::SteeringFunctionality() {} -void SteeringFunctionality::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool SteeringFunctionality::operator!=(const SteeringFunctionality& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, SteeringFunctionality& o) { + from_json(j, o.m_value); } -SteeringFunctionality_anyOf SteeringFunctionality::getValue() const -{ - return m_value; +SteeringFunctionality_anyOf SteeringFunctionality::getValue() const { + return m_value; } -void SteeringFunctionality::setValue(SteeringFunctionality_anyOf value) -{ - m_value = value; +void SteeringFunctionality::setValue(SteeringFunctionality_anyOf value) { + m_value = value; } -SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf SteeringFunctionality::getEnumValue() const -{ - return m_value.getValue(); +SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf +SteeringFunctionality::getEnumValue() const { + return m_value.getValue(); } -void SteeringFunctionality::setEnumValue(SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf value) -{ - m_value.setValue(value); +void SteeringFunctionality::setEnumValue( + SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/SteeringFunctionality.h b/src/api-server/model/SteeringFunctionality.h old mode 100755 new mode 100644 index 5e757fd..d05d09b --- a/src/api-server/model/SteeringFunctionality.h +++ b/src/api-server/model/SteeringFunctionality.h @@ -1,24 +1,27 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -27,49 +30,54 @@ 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. +/// 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; - +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. 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> + /// 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; + /// <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; + bool operator==(const SteeringFunctionality& rhs) const; + bool operator!=(const SteeringFunctionality& rhs) const; - ///////////////////////////////////////////// - /// SteeringFunctionality members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + SteeringFunctionality_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/SteeringFunctionality_anyOf.cpp b/src/api-server/model/SteeringFunctionality_anyOf.cpp old mode 100755 new mode 100644 index f82e5b5..db80615 --- a/src/api-server/model/SteeringFunctionality_anyOf.cpp +++ b/src/api-server/model/SteeringFunctionality_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,97 +20,88 @@ namespace oai { namespace pcf { namespace model { -SteeringFunctionality_anyOf::SteeringFunctionality_anyOf() -{ - -} +SteeringFunctionality_anyOf::SteeringFunctionality_anyOf() {} -void SteeringFunctionality_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool SteeringFunctionality_anyOf::operator!=( + const SteeringFunctionality_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf +SteeringFunctionality_anyOf::getValue() const { + return m_value; } -void SteeringFunctionality_anyOf::setValue(SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf value) -{ - m_value = value; +void SteeringFunctionality_anyOf::setValue( + SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/SteeringFunctionality_anyOf.h b/src/api-server/model/SteeringFunctionality_anyOf.h old mode 100755 new mode 100644 index 1ce0936..7ce6ce9 --- a/src/api-server/model/SteeringFunctionality_anyOf.h +++ b/src/api-server/model/SteeringFunctionality_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,53 +26,58 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SteeringFunctionality_anyOf -{ -public: - SteeringFunctionality_anyOf(); - virtual ~SteeringFunctionality_anyOf() = default; +class SteeringFunctionality_anyOf { + public: + SteeringFunctionality_anyOf(); + virtual ~SteeringFunctionality_anyOf() = default; - enum class eSteeringFunctionality_anyOf { + enum class eSteeringFunctionality_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - MPTCP, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const SteeringFunctionality_anyOf& rhs) const; + bool operator!=(const SteeringFunctionality_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// SteeringFunctionality_anyOf members - bool operator==(const SteeringFunctionality_anyOf& rhs) const; - bool operator!=(const SteeringFunctionality_anyOf& rhs) const; + SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf getValue() const; + void setValue( + SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf value); - ///////////////////////////////////////////// - /// SteeringFunctionality_anyOf members + friend void to_json(nlohmann::json& j, const SteeringFunctionality_anyOf& o); + friend void from_json( + const nlohmann::json& j, SteeringFunctionality_anyOf& o); - 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; + protected: + SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf m_value = + SteeringFunctionality_anyOf::eSteeringFunctionality_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/SteeringMode.cpp b/src/api-server/model/SteeringMode.cpp old mode 100755 new mode 100644 index 1ba8c2e..596d243 --- a/src/api-server/model/SteeringMode.cpp +++ b/src/api-server/model/SteeringMode.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,199 +20,160 @@ namespace oai { namespace pcf { namespace model { -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()); - } +SteeringMode::SteeringMode() { + m_ActiveIsSet = false; + m_StandbyIsSet = false; + m_r_3gLoad = 0; + m_r_3gLoadIsSet = false; + m_PrioAccIsSet = false; } -bool SteeringMode::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +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 std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "SteeringMode" : pathPrefix; +bool SteeringMode::validate(std::stringstream& msg) const { + return validate(msg, ""); +} - - 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;"; - } +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; + } + + 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 diff --git a/src/api-server/model/SteeringMode.h b/src/api-server/model/SteeringMode.h old mode 100755 new mode 100644 index 2ddd6ea..9d87157 --- a/src/api-server/model/SteeringMode.h +++ b/src/api-server/model/SteeringMode.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,86 +28,85 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SteeringMode -{ -public: - SteeringMode(); - virtual ~SteeringMode() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const SteeringMode& rhs) const; - bool operator!=(const SteeringMode& rhs) const; + ///////////////////////////////////////////// + /// SteeringMode members - ///////////////////////////////////////////// - /// SteeringMode members + /// <summary> + /// + /// </summary> + SteerModeValue getSteerModeValue() const; + void setSteerModeValue(SteerModeValue const& value); + /// <summary> + /// + /// </summary> + AccessType getActive() const; + void setActive(AccessType const& value); + bool activeIsSet() const; + void unsetActive(); + /// <summary> + /// + /// </summary> + AccessType getStandby() const; + void setStandby(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> + AccessType getPrioAcc() const; + void setPrioAcc(AccessType const& value); + bool prioAccIsSet() const; + void unsetPrioAcc(); - /// <summary> - /// - /// </summary> - SteerModeValue getSteerModeValue() const; - void setSteerModeValue(SteerModeValue const& value); - /// <summary> - /// - /// </summary> - AccessType getActive() const; - void setActive(AccessType const& value); - bool activeIsSet() const; - void unsetActive(); - /// <summary> - /// - /// </summary> - AccessType getStandby() const; - void setStandby(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> - AccessType getPrioAcc() const; - void setPrioAcc(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); - friend void to_json(nlohmann::json& j, const SteeringMode& o); - friend void from_json(const nlohmann::json& j, SteeringMode& o); -protected: - SteerModeValue m_SteerModeValue; + protected: + SteerModeValue m_SteerModeValue; - AccessType m_Active; - bool m_ActiveIsSet; - AccessType m_Standby; - bool m_StandbyIsSet; - int32_t m_r_3gLoad; - bool m_r_3gLoadIsSet; - AccessType m_PrioAcc; - bool m_PrioAccIsSet; - + AccessType m_Active; + bool m_ActiveIsSet; + AccessType m_Standby; + bool m_StandbyIsSet; + int32_t m_r_3gLoad; + bool m_r_3gLoadIsSet; + AccessType m_PrioAcc; + bool m_PrioAccIsSet; }; } // namespace model diff --git a/src/api-server/model/SubscribedDefaultQos.cpp b/src/api-server/model/SubscribedDefaultQos.cpp old mode 100755 new mode 100644 index 5ec1c91..50aea67 --- a/src/api-server/model/SubscribedDefaultQos.cpp +++ b/src/api-server/model/SubscribedDefaultQos.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "SubscribedDefaultQos.h" #include "Helpers.h" @@ -20,153 +20,120 @@ namespace oai { namespace pcf { namespace model { -SubscribedDefaultQos::SubscribedDefaultQos() -{ - m_r_5qi = 0; - m_PriorityLevel = 0; - m_PriorityLevelIsSet = false; - +SubscribedDefaultQos::SubscribedDefaultQos() { + m_r_5qi = 0; + m_PriorityLevel = 0; + m_PriorityLevelIsSet = false; } -void SubscribedDefaultQos::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void SubscribedDefaultQos::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool SubscribedDefaultQos::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool SubscribedDefaultQos::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool SubscribedDefaultQos::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "SubscribedDefaultQos" : 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;"; - } +bool SubscribedDefaultQos::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "SubscribedDefaultQos" : 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 (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 (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;"; } - - return success; -} - -bool SubscribedDefaultQos::operator==(const SubscribedDefaultQos& rhs) const -{ - return - - - (getR5qi() == rhs.getR5qi()) - && - - (getArp() == rhs.getArp()) - && - - - ((!priorityLevelIsSet() && !rhs.priorityLevelIsSet()) || (priorityLevelIsSet() && rhs.priorityLevelIsSet() && getPriorityLevel() == rhs.getPriorityLevel())) - - ; -} - -bool SubscribedDefaultQos::operator!=(const SubscribedDefaultQos& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const SubscribedDefaultQos& o) -{ - j = nlohmann::json(); - j["5qi"] = o.m_r_5qi; - j["arp"] = o.m_Arp; - if(o.priorityLevelIsSet()) - j["priorityLevel"] = o.m_PriorityLevel; - -} - -void from_json(const nlohmann::json& j, SubscribedDefaultQos& o) -{ - j.at("5qi").get_to(o.m_r_5qi); - j.at("arp").get_to(o.m_Arp); - if(j.find("priorityLevel") != j.end()) - { - j.at("priorityLevel").get_to(o.m_PriorityLevel); - o.m_PriorityLevelIsSet = true; - } - -} - -int32_t SubscribedDefaultQos::getR5qi() const -{ - return m_r_5qi; -} -void SubscribedDefaultQos::setR5qi(int32_t const value) -{ - m_r_5qi = value; -} -Arp SubscribedDefaultQos::getArp() const -{ - return m_Arp; -} -void SubscribedDefaultQos::setArp(Arp const& value) -{ - m_Arp = value; -} -int32_t SubscribedDefaultQos::getPriorityLevel() const -{ - return m_PriorityLevel; -} -void SubscribedDefaultQos::setPriorityLevel(int32_t const value) -{ - m_PriorityLevel = value; - m_PriorityLevelIsSet = true; -} -bool SubscribedDefaultQos::priorityLevelIsSet() const -{ - return m_PriorityLevelIsSet; -} -void SubscribedDefaultQos::unsetPriorityLevel() -{ - m_PriorityLevelIsSet = false; + } + + return success; +} + +bool SubscribedDefaultQos::operator==(const SubscribedDefaultQos& rhs) const { + return + + (getR5qi() == rhs.getR5qi()) && + + (getArp() == rhs.getArp()) && + + ((!priorityLevelIsSet() && !rhs.priorityLevelIsSet()) || + (priorityLevelIsSet() && rhs.priorityLevelIsSet() && + getPriorityLevel() == rhs.getPriorityLevel())) + + ; } +bool SubscribedDefaultQos::operator!=(const SubscribedDefaultQos& rhs) const { + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const SubscribedDefaultQos& o) { + j = nlohmann::json(); + j["5qi"] = o.m_r_5qi; + j["arp"] = o.m_Arp; + if (o.priorityLevelIsSet()) j["priorityLevel"] = o.m_PriorityLevel; +} + +void from_json(const nlohmann::json& j, SubscribedDefaultQos& o) { + j.at("5qi").get_to(o.m_r_5qi); + j.at("arp").get_to(o.m_Arp); + if (j.find("priorityLevel") != j.end()) { + j.at("priorityLevel").get_to(o.m_PriorityLevel); + o.m_PriorityLevelIsSet = true; + } +} + +int32_t SubscribedDefaultQos::getR5qi() const { + return m_r_5qi; +} +void SubscribedDefaultQos::setR5qi(int32_t const value) { + m_r_5qi = value; +} +Arp SubscribedDefaultQos::getArp() const { + return m_Arp; +} +void SubscribedDefaultQos::setArp(Arp const& value) { + m_Arp = value; +} +int32_t SubscribedDefaultQos::getPriorityLevel() const { + return m_PriorityLevel; +} +void SubscribedDefaultQos::setPriorityLevel(int32_t const value) { + m_PriorityLevel = value; + m_PriorityLevelIsSet = true; +} +bool SubscribedDefaultQos::priorityLevelIsSet() const { + return m_PriorityLevelIsSet; +} +void SubscribedDefaultQos::unsetPriorityLevel() { + m_PriorityLevelIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/SubscribedDefaultQos.h b/src/api-server/model/SubscribedDefaultQos.h old mode 100755 new mode 100644 index b37e659..618960e --- a/src/api-server/model/SubscribedDefaultQos.h +++ b/src/api-server/model/SubscribedDefaultQos.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * SubscribedDefaultQos.h * - * + * */ #ifndef SubscribedDefaultQos_H_ #define SubscribedDefaultQos_H_ - #include "Arp.h" #include <nlohmann/json.hpp> @@ -27,66 +27,65 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class SubscribedDefaultQos -{ -public: - SubscribedDefaultQos(); - virtual ~SubscribedDefaultQos() = 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 SubscribedDefaultQos& rhs) const; - bool operator!=(const SubscribedDefaultQos& rhs) const; - - ///////////////////////////////////////////// - /// SubscribedDefaultQos members - - /// <summary> - /// - /// </summary> - int32_t getR5qi() const; - void setR5qi(int32_t const value); - /// <summary> - /// - /// </summary> - Arp getArp() const; - void setArp(Arp const& value); - /// <summary> - /// - /// </summary> - int32_t getPriorityLevel() const; - void setPriorityLevel(int32_t const value); - bool priorityLevelIsSet() const; - void unsetPriorityLevel(); - - friend void to_json(nlohmann::json& j, const SubscribedDefaultQos& o); - friend void from_json(const nlohmann::json& j, SubscribedDefaultQos& o); -protected: - int32_t m_r_5qi; - - Arp m_Arp; - - int32_t m_PriorityLevel; - bool m_PriorityLevelIsSet; - +class SubscribedDefaultQos { + public: + SubscribedDefaultQos(); + virtual ~SubscribedDefaultQos() = 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 SubscribedDefaultQos& rhs) const; + bool operator!=(const SubscribedDefaultQos& rhs) const; + + ///////////////////////////////////////////// + /// SubscribedDefaultQos members + + /// <summary> + /// + /// </summary> + int32_t getR5qi() const; + void setR5qi(int32_t const value); + /// <summary> + /// + /// </summary> + Arp getArp() const; + void setArp(Arp const& value); + /// <summary> + /// + /// </summary> + int32_t getPriorityLevel() const; + void setPriorityLevel(int32_t const value); + bool priorityLevelIsSet() const; + void unsetPriorityLevel(); + + friend void to_json(nlohmann::json& j, const SubscribedDefaultQos& o); + friend void from_json(const nlohmann::json& j, SubscribedDefaultQos& o); + + protected: + int32_t m_r_5qi; + + Arp m_Arp; + + int32_t m_PriorityLevel; + bool m_PriorityLevelIsSet; }; } // namespace model diff --git a/src/api-server/model/Tai.cpp b/src/api-server/model/Tai.cpp old mode 100755 new mode 100644 index bc9f563..328fb90 --- a/src/api-server/model/Tai.cpp +++ b/src/api-server/model/Tai.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "Tai.h" #include "Helpers.h" @@ -20,133 +20,100 @@ namespace oai { namespace pcf { namespace model { -Tai::Tai() -{ - m_Tac = ""; - m_Nid = ""; - m_NidIsSet = false; - -} - -void Tai::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool Tai::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool Tai::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "Tai" : pathPrefix; - - - - /* Tac */ { - const std::string& value = m_Tac; - const std::string currentValuePath = _pathPrefix + ".tac"; - - - - } - - if (nidIsSet()) - { - const std::string& value = m_Nid; - const std::string currentValuePath = _pathPrefix + ".nid"; - - - - } - - return success; -} - -bool Tai::operator==(const Tai& rhs) const -{ - return - - - (getPlmnId() == rhs.getPlmnId()) - && - - (getTac() == rhs.getTac()) - && - - - ((!nidIsSet() && !rhs.nidIsSet()) || (nidIsSet() && rhs.nidIsSet() && getNid() == rhs.getNid())) - - ; -} - -bool Tai::operator!=(const Tai& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const Tai& o) -{ - j = nlohmann::json(); - j["plmnId"] = o.m_PlmnId; - j["tac"] = o.m_Tac; - if(o.nidIsSet()) - j["nid"] = o.m_Nid; - -} - -void from_json(const nlohmann::json& j, Tai& o) -{ - j.at("plmnId").get_to(o.m_PlmnId); - j.at("tac").get_to(o.m_Tac); - if(j.find("nid") != j.end()) - { - j.at("nid").get_to(o.m_Nid); - o.m_NidIsSet = true; - } - -} - -PlmnId Tai::getPlmnId() const -{ - return m_PlmnId; -} -void Tai::setPlmnId(PlmnId const& value) -{ - m_PlmnId = value; -} -std::string Tai::getTac() const -{ - return m_Tac; -} -void Tai::setTac(std::string const& value) -{ - m_Tac = value; -} -std::string Tai::getNid() const -{ - return m_Nid; -} -void Tai::setNid(std::string const& value) -{ - m_Nid = value; - m_NidIsSet = true; -} -bool Tai::nidIsSet() const -{ - return m_NidIsSet; -} -void Tai::unsetNid() -{ - m_NidIsSet = false; +Tai::Tai() { + m_Tac = ""; + m_Nid = ""; + m_NidIsSet = false; +} + +void Tai::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool Tai::validate(std::stringstream& msg) const { + return validate(msg, ""); +} + +bool Tai::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "Tai" : pathPrefix; + + /* Tac */ { + const std::string& value = m_Tac; + const std::string currentValuePath = _pathPrefix + ".tac"; + } + + if (nidIsSet()) { + const std::string& value = m_Nid; + const std::string currentValuePath = _pathPrefix + ".nid"; + } + + return success; +} + +bool Tai::operator==(const Tai& rhs) const { + return + + (getPlmnId() == rhs.getPlmnId()) && + + (getTac() == rhs.getTac()) && + + ((!nidIsSet() && !rhs.nidIsSet()) || + (nidIsSet() && rhs.nidIsSet() && getNid() == rhs.getNid())) + + ; +} + +bool Tai::operator!=(const Tai& rhs) const { + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const Tai& o) { + j = nlohmann::json(); + j["plmnId"] = o.m_PlmnId; + j["tac"] = o.m_Tac; + if (o.nidIsSet()) j["nid"] = o.m_Nid; +} + +void from_json(const nlohmann::json& j, Tai& o) { + j.at("plmnId").get_to(o.m_PlmnId); + j.at("tac").get_to(o.m_Tac); + if (j.find("nid") != j.end()) { + j.at("nid").get_to(o.m_Nid); + o.m_NidIsSet = true; + } } +PlmnId Tai::getPlmnId() const { + return m_PlmnId; +} +void Tai::setPlmnId(PlmnId const& value) { + m_PlmnId = value; +} +std::string Tai::getTac() const { + return m_Tac; +} +void Tai::setTac(std::string const& value) { + m_Tac = value; +} +std::string Tai::getNid() const { + return m_Nid; +} +void Tai::setNid(std::string const& value) { + m_Nid = value; + m_NidIsSet = true; +} +bool Tai::nidIsSet() const { + return m_NidIsSet; +} +void Tai::unsetNid() { + m_NidIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/Tai.h b/src/api-server/model/Tai.h old mode 100755 new mode 100644 index 2c98d7d..0a67927 --- a/src/api-server/model/Tai.h +++ b/src/api-server/model/Tai.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * Tai.h * - * + * */ #ifndef Tai_H_ #define Tai_H_ - #include <string> #include "PlmnId.h" #include <nlohmann/json.hpp> @@ -28,66 +28,65 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class Tai -{ -public: - Tai(); - virtual ~Tai() = 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 Tai& rhs) const; - bool operator!=(const Tai& rhs) const; - - ///////////////////////////////////////////// - /// Tai members - - /// <summary> - /// - /// </summary> - PlmnId getPlmnId() const; - void setPlmnId(PlmnId const& value); - /// <summary> - /// - /// </summary> - std::string getTac() const; - void setTac(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getNid() const; - void setNid(std::string const& value); - bool nidIsSet() const; - void unsetNid(); - - friend void to_json(nlohmann::json& j, const Tai& o); - friend void from_json(const nlohmann::json& j, Tai& o); -protected: - PlmnId m_PlmnId; - - std::string m_Tac; - - std::string m_Nid; - bool m_NidIsSet; - +class Tai { + public: + Tai(); + virtual ~Tai() = 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 Tai& rhs) const; + bool operator!=(const Tai& rhs) const; + + ///////////////////////////////////////////// + /// Tai members + + /// <summary> + /// + /// </summary> + PlmnId getPlmnId() const; + void setPlmnId(PlmnId const& value); + /// <summary> + /// + /// </summary> + std::string getTac() const; + void setTac(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getNid() const; + void setNid(std::string const& value); + bool nidIsSet() const; + void unsetNid(); + + friend void to_json(nlohmann::json& j, const Tai& o); + friend void from_json(const nlohmann::json& j, Tai& o); + + protected: + PlmnId m_PlmnId; + + std::string m_Tac; + + std::string m_Nid; + bool m_NidIsSet; }; } // namespace model diff --git a/src/api-server/model/TerminationNotification.cpp b/src/api-server/model/TerminationNotification.cpp old mode 100755 new mode 100644 index ae55d7b..6c6a367 --- a/src/api-server/model/TerminationNotification.cpp +++ b/src/api-server/model/TerminationNotification.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,87 +20,72 @@ namespace oai { namespace pcf { namespace model { -TerminationNotification::TerminationNotification() -{ - m_ResourceUri = ""; - +TerminationNotification::TerminationNotification() { + m_ResourceUri = ""; } -void TerminationNotification::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +bool TerminationNotification::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "TerminationNotification" : pathPrefix; - - return success; + return success; } -bool TerminationNotification::operator==(const TerminationNotification& rhs) const -{ - return - - - (getResourceUri() == rhs.getResourceUri()) - && - - (getCause() == rhs.getCause()) - - - ; +bool TerminationNotification::operator==( + const TerminationNotification& rhs) const { + return + + (getResourceUri() == rhs.getResourceUri()) && + + (getCause() == rhs.getCause()) + + ; } -bool TerminationNotification::operator!=(const TerminationNotification& rhs) const -{ - return !(*this == rhs); +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 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); - +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; +std::string TerminationNotification::getResourceUri() const { + return m_ResourceUri; } -void TerminationNotification::setResourceUri(std::string const& value) -{ - m_ResourceUri = value; +void TerminationNotification::setResourceUri(std::string const& value) { + m_ResourceUri = value; } -SmPolicyAssociationReleaseCause TerminationNotification::getCause() const -{ - return m_Cause; +SmPolicyAssociationReleaseCause TerminationNotification::getCause() const { + return m_Cause; } -void TerminationNotification::setCause(SmPolicyAssociationReleaseCause const& value) -{ - m_Cause = value; +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 old mode 100755 new mode 100644 index f08f153..feba811 --- a/src/api-server/model/TerminationNotification.h +++ b/src/api-server/model/TerminationNotification.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,57 +28,55 @@ 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; - - +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 diff --git a/src/api-server/model/TnapId.cpp b/src/api-server/model/TnapId.cpp old mode 100755 new mode 100644 index e62c9de..b41d03c --- a/src/api-server/model/TnapId.cpp +++ b/src/api-server/model/TnapId.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "TnapId.h" #include "Helpers.h" @@ -20,145 +20,115 @@ namespace oai { namespace pcf { namespace model { -TnapId::TnapId() -{ - m_SsId = ""; - m_SsIdIsSet = false; - m_BssId = ""; - m_BssIdIsSet = false; - m_CivicAddressIsSet = false; - -} - -void TnapId::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool TnapId::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool TnapId::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "TnapId" : pathPrefix; - - - return success; -} - -bool TnapId::operator==(const TnapId& rhs) const -{ - return - - - - ((!ssIdIsSet() && !rhs.ssIdIsSet()) || (ssIdIsSet() && rhs.ssIdIsSet() && getSsId() == rhs.getSsId())) && - - - ((!bssIdIsSet() && !rhs.bssIdIsSet()) || (bssIdIsSet() && rhs.bssIdIsSet() && getBssId() == rhs.getBssId())) && - - - ((!civicAddressIsSet() && !rhs.civicAddressIsSet()) || (civicAddressIsSet() && rhs.civicAddressIsSet() && getCivicAddress() == rhs.getCivicAddress())) - - ; -} - -bool TnapId::operator!=(const TnapId& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const TnapId& o) -{ - j = nlohmann::json(); - if(o.ssIdIsSet()) - j["ssId"] = o.m_SsId; - if(o.bssIdIsSet()) - j["bssId"] = o.m_BssId; - if(o.civicAddressIsSet()) - j["civicAddress"] = o.m_CivicAddress; - -} - -void from_json(const nlohmann::json& j, TnapId& o) -{ - if(j.find("ssId") != j.end()) - { - j.at("ssId").get_to(o.m_SsId); - o.m_SsIdIsSet = true; - } - if(j.find("bssId") != j.end()) - { - j.at("bssId").get_to(o.m_BssId); - o.m_BssIdIsSet = true; - } - if(j.find("civicAddress") != j.end()) - { - j.at("civicAddress").get_to(o.m_CivicAddress); - o.m_CivicAddressIsSet = true; - } - -} - -std::string TnapId::getSsId() const -{ - return m_SsId; -} -void TnapId::setSsId(std::string const& value) -{ - m_SsId = value; - m_SsIdIsSet = true; -} -bool TnapId::ssIdIsSet() const -{ - return m_SsIdIsSet; -} -void TnapId::unsetSsId() -{ - m_SsIdIsSet = false; -} -std::string TnapId::getBssId() const -{ - return m_BssId; -} -void TnapId::setBssId(std::string const& value) -{ - m_BssId = value; - m_BssIdIsSet = true; -} -bool TnapId::bssIdIsSet() const -{ - return m_BssIdIsSet; -} -void TnapId::unsetBssId() -{ - m_BssIdIsSet = false; -} -std::string TnapId::getCivicAddress() const -{ - return m_CivicAddress; -} -void TnapId::setCivicAddress(std::string const& value) -{ - m_CivicAddress = value; - m_CivicAddressIsSet = true; -} -bool TnapId::civicAddressIsSet() const -{ - return m_CivicAddressIsSet; -} -void TnapId::unsetCivicAddress() -{ - m_CivicAddressIsSet = false; +TnapId::TnapId() { + m_SsId = ""; + m_SsIdIsSet = false; + m_BssId = ""; + m_BssIdIsSet = false; + m_CivicAddressIsSet = false; +} + +void TnapId::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool TnapId::validate(std::stringstream& msg) const { + return validate(msg, ""); +} + +bool TnapId::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "TnapId" : pathPrefix; + + return success; +} + +bool TnapId::operator==(const TnapId& rhs) const { + return + + ((!ssIdIsSet() && !rhs.ssIdIsSet()) || + (ssIdIsSet() && rhs.ssIdIsSet() && getSsId() == rhs.getSsId())) && + + ((!bssIdIsSet() && !rhs.bssIdIsSet()) || + (bssIdIsSet() && rhs.bssIdIsSet() && getBssId() == rhs.getBssId())) && + + ((!civicAddressIsSet() && !rhs.civicAddressIsSet()) || + (civicAddressIsSet() && rhs.civicAddressIsSet() && + getCivicAddress() == rhs.getCivicAddress())) + + ; +} + +bool TnapId::operator!=(const TnapId& rhs) const { + return !(*this == rhs); } +void to_json(nlohmann::json& j, const TnapId& o) { + j = nlohmann::json(); + if (o.ssIdIsSet()) j["ssId"] = o.m_SsId; + if (o.bssIdIsSet()) j["bssId"] = o.m_BssId; + if (o.civicAddressIsSet()) j["civicAddress"] = o.m_CivicAddress; +} + +void from_json(const nlohmann::json& j, TnapId& o) { + if (j.find("ssId") != j.end()) { + j.at("ssId").get_to(o.m_SsId); + o.m_SsIdIsSet = true; + } + if (j.find("bssId") != j.end()) { + j.at("bssId").get_to(o.m_BssId); + o.m_BssIdIsSet = true; + } + if (j.find("civicAddress") != j.end()) { + j.at("civicAddress").get_to(o.m_CivicAddress); + o.m_CivicAddressIsSet = true; + } +} + +std::string TnapId::getSsId() const { + return m_SsId; +} +void TnapId::setSsId(std::string const& value) { + m_SsId = value; + m_SsIdIsSet = true; +} +bool TnapId::ssIdIsSet() const { + return m_SsIdIsSet; +} +void TnapId::unsetSsId() { + m_SsIdIsSet = false; +} +std::string TnapId::getBssId() const { + return m_BssId; +} +void TnapId::setBssId(std::string const& value) { + m_BssId = value; + m_BssIdIsSet = true; +} +bool TnapId::bssIdIsSet() const { + return m_BssIdIsSet; +} +void TnapId::unsetBssId() { + m_BssIdIsSet = false; +} +std::string TnapId::getCivicAddress() const { + return m_CivicAddress; +} +void TnapId::setCivicAddress(std::string const& value) { + m_CivicAddress = value; + m_CivicAddressIsSet = true; +} +bool TnapId::civicAddressIsSet() const { + return m_CivicAddressIsSet; +} +void TnapId::unsetCivicAddress() { + m_CivicAddressIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/TnapId.h b/src/api-server/model/TnapId.h old mode 100755 new mode 100644 index 0855b2e..2cdda68 --- a/src/api-server/model/TnapId.h +++ b/src/api-server/model/TnapId.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * TnapId.h * - * + * */ #ifndef TnapId_H_ #define TnapId_H_ - #include <string> #include <nlohmann/json.hpp> @@ -27,70 +27,69 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class TnapId -{ -public: - TnapId(); - virtual ~TnapId() = default; +class TnapId { + public: + TnapId(); + virtual ~TnapId() = 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. 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> - /// 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; - /// <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 TnapId& rhs) const; + bool operator!=(const TnapId& rhs) const; - bool operator==(const TnapId& rhs) const; - bool operator!=(const TnapId& rhs) const; + ///////////////////////////////////////////// + /// TnapId members - ///////////////////////////////////////////// - /// TnapId members + /// <summary> + /// + /// </summary> + std::string getSsId() const; + void setSsId(std::string const& value); + bool ssIdIsSet() const; + void unsetSsId(); + /// <summary> + /// + /// </summary> + std::string getBssId() const; + void setBssId(std::string const& value); + bool bssIdIsSet() const; + void unsetBssId(); + /// <summary> + /// + /// </summary> + std::string getCivicAddress() const; + void setCivicAddress(std::string const& value); + bool civicAddressIsSet() const; + void unsetCivicAddress(); - /// <summary> - /// - /// </summary> - std::string getSsId() const; - void setSsId(std::string const& value); - bool ssIdIsSet() const; - void unsetSsId(); - /// <summary> - /// - /// </summary> - std::string getBssId() const; - void setBssId(std::string const& value); - bool bssIdIsSet() const; - void unsetBssId(); - /// <summary> - /// - /// </summary> - std::string getCivicAddress() const; - void setCivicAddress(std::string const& value); - bool civicAddressIsSet() const; - void unsetCivicAddress(); + friend void to_json(nlohmann::json& j, const TnapId& o); + friend void from_json(const nlohmann::json& j, TnapId& o); - friend void to_json(nlohmann::json& j, const TnapId& o); - friend void from_json(const nlohmann::json& j, TnapId& o); -protected: - std::string m_SsId; - bool m_SsIdIsSet; - std::string m_BssId; - bool m_BssIdIsSet; - std::string m_CivicAddress; - bool m_CivicAddressIsSet; - + protected: + std::string m_SsId; + bool m_SsIdIsSet; + std::string m_BssId; + bool m_BssIdIsSet; + std::string m_CivicAddress; + bool m_CivicAddressIsSet; }; } // namespace model diff --git a/src/api-server/model/TraceData.cpp b/src/api-server/model/TraceData.cpp old mode 100755 new mode 100644 index 8577749..6cd51ff --- a/src/api-server/model/TraceData.cpp +++ b/src/api-server/model/TraceData.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "TraceData.h" #include "Helpers.h" @@ -20,246 +20,193 @@ namespace oai { namespace pcf { namespace model { -TraceData::TraceData() -{ - m_TraceRef = ""; - m_NeTypeList = ""; - m_EventList = ""; - m_CollectionEntityIpv4Addr = ""; - m_CollectionEntityIpv4AddrIsSet = false; - m_CollectionEntityIpv6AddrIsSet = false; - m_InterfaceList = ""; - m_InterfaceListIsSet = false; - +TraceData::TraceData() { + m_TraceRef = ""; + m_NeTypeList = ""; + m_EventList = ""; + m_CollectionEntityIpv4Addr = ""; + m_CollectionEntityIpv4AddrIsSet = false; + m_CollectionEntityIpv6AddrIsSet = false; + m_InterfaceList = ""; + m_InterfaceListIsSet = false; } -void TraceData::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void TraceData::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } - -bool TraceData::validate(std::stringstream& msg) const -{ - return validate(msg, ""); + +bool TraceData::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool TraceData::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "TraceData" : pathPrefix; +bool TraceData::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "TraceData" : pathPrefix; - - - /* TraceRef */ { - const std::string& value = m_TraceRef; - const std::string currentValuePath = _pathPrefix + ".traceRef"; - - + /* TraceRef */ { + const std::string& value = m_TraceRef; + const std::string currentValuePath = _pathPrefix + ".traceRef"; + } - } - - - /* NeTypeList */ { - const std::string& value = m_NeTypeList; - const std::string currentValuePath = _pathPrefix + ".neTypeList"; - - + /* NeTypeList */ { + const std::string& value = m_NeTypeList; + const std::string currentValuePath = _pathPrefix + ".neTypeList"; + } - } - - - /* EventList */ { - const std::string& value = m_EventList; - const std::string currentValuePath = _pathPrefix + ".eventList"; - - + /* EventList */ { + const std::string& value = m_EventList; + const std::string currentValuePath = _pathPrefix + ".eventList"; + } - } - - if (collectionEntityIpv4AddrIsSet()) - { - const std::string& value = m_CollectionEntityIpv4Addr; - const std::string currentValuePath = _pathPrefix + ".collectionEntityIpv4Addr"; - - + if (collectionEntityIpv4AddrIsSet()) { + const std::string& value = m_CollectionEntityIpv4Addr; + const std::string currentValuePath = + _pathPrefix + ".collectionEntityIpv4Addr"; + } - } - - if (interfaceListIsSet()) - { - const std::string& value = m_InterfaceList; - const std::string currentValuePath = _pathPrefix + ".interfaceList"; - - + if (interfaceListIsSet()) { + const std::string& value = m_InterfaceList; + const std::string currentValuePath = _pathPrefix + ".interfaceList"; + } - } - - return success; + return success; } -bool TraceData::operator==(const TraceData& rhs) const -{ - return - - - (getTraceRef() == rhs.getTraceRef()) - && - - (getTraceDepth() == rhs.getTraceDepth()) - && - - (getNeTypeList() == rhs.getNeTypeList()) - && - - (getEventList() == rhs.getEventList()) - && - - - ((!collectionEntityIpv4AddrIsSet() && !rhs.collectionEntityIpv4AddrIsSet()) || (collectionEntityIpv4AddrIsSet() && rhs.collectionEntityIpv4AddrIsSet() && getCollectionEntityIpv4Addr() == rhs.getCollectionEntityIpv4Addr())) && - - - ((!collectionEntityIpv6AddrIsSet() && !rhs.collectionEntityIpv6AddrIsSet()) || (collectionEntityIpv6AddrIsSet() && rhs.collectionEntityIpv6AddrIsSet() && getCollectionEntityIpv6Addr() == rhs.getCollectionEntityIpv6Addr())) && - - - ((!interfaceListIsSet() && !rhs.interfaceListIsSet()) || (interfaceListIsSet() && rhs.interfaceListIsSet() && getInterfaceList() == rhs.getInterfaceList())) - - ; +bool TraceData::operator==(const TraceData& rhs) const { + return + + (getTraceRef() == rhs.getTraceRef()) && + + (getTraceDepth() == rhs.getTraceDepth()) && + + (getNeTypeList() == rhs.getNeTypeList()) && + + (getEventList() == rhs.getEventList()) && + + ((!collectionEntityIpv4AddrIsSet() && + !rhs.collectionEntityIpv4AddrIsSet()) || + (collectionEntityIpv4AddrIsSet() && + rhs.collectionEntityIpv4AddrIsSet() && + getCollectionEntityIpv4Addr() == rhs.getCollectionEntityIpv4Addr())) && + + ((!collectionEntityIpv6AddrIsSet() && + !rhs.collectionEntityIpv6AddrIsSet()) || + (collectionEntityIpv6AddrIsSet() && + rhs.collectionEntityIpv6AddrIsSet() && + getCollectionEntityIpv6Addr() == rhs.getCollectionEntityIpv6Addr())) && + + ((!interfaceListIsSet() && !rhs.interfaceListIsSet()) || + (interfaceListIsSet() && rhs.interfaceListIsSet() && + getInterfaceList() == rhs.getInterfaceList())) + + ; } -bool TraceData::operator!=(const TraceData& rhs) const -{ - return !(*this == rhs); +bool TraceData::operator!=(const TraceData& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const TraceData& o) -{ - j = nlohmann::json(); - j["traceRef"] = o.m_TraceRef; - j["traceDepth"] = o.m_TraceDepth; - j["neTypeList"] = o.m_NeTypeList; - j["eventList"] = o.m_EventList; - if(o.collectionEntityIpv4AddrIsSet()) - j["collectionEntityIpv4Addr"] = o.m_CollectionEntityIpv4Addr; - if(o.collectionEntityIpv6AddrIsSet()) - j["collectionEntityIpv6Addr"] = o.m_CollectionEntityIpv6Addr; - if(o.interfaceListIsSet()) - j["interfaceList"] = o.m_InterfaceList; - +void to_json(nlohmann::json& j, const TraceData& o) { + j = nlohmann::json(); + j["traceRef"] = o.m_TraceRef; + j["traceDepth"] = o.m_TraceDepth; + j["neTypeList"] = o.m_NeTypeList; + j["eventList"] = o.m_EventList; + if (o.collectionEntityIpv4AddrIsSet()) + j["collectionEntityIpv4Addr"] = o.m_CollectionEntityIpv4Addr; + if (o.collectionEntityIpv6AddrIsSet()) + j["collectionEntityIpv6Addr"] = o.m_CollectionEntityIpv6Addr; + if (o.interfaceListIsSet()) j["interfaceList"] = o.m_InterfaceList; } -void from_json(const nlohmann::json& j, TraceData& o) -{ - j.at("traceRef").get_to(o.m_TraceRef); - j.at("traceDepth").get_to(o.m_TraceDepth); - j.at("neTypeList").get_to(o.m_NeTypeList); - j.at("eventList").get_to(o.m_EventList); - if(j.find("collectionEntityIpv4Addr") != j.end()) - { - j.at("collectionEntityIpv4Addr").get_to(o.m_CollectionEntityIpv4Addr); - o.m_CollectionEntityIpv4AddrIsSet = true; - } - if(j.find("collectionEntityIpv6Addr") != j.end()) - { - j.at("collectionEntityIpv6Addr").get_to(o.m_CollectionEntityIpv6Addr); - o.m_CollectionEntityIpv6AddrIsSet = true; - } - if(j.find("interfaceList") != j.end()) - { - j.at("interfaceList").get_to(o.m_InterfaceList); - o.m_InterfaceListIsSet = true; - } - +void from_json(const nlohmann::json& j, TraceData& o) { + j.at("traceRef").get_to(o.m_TraceRef); + j.at("traceDepth").get_to(o.m_TraceDepth); + j.at("neTypeList").get_to(o.m_NeTypeList); + j.at("eventList").get_to(o.m_EventList); + if (j.find("collectionEntityIpv4Addr") != j.end()) { + j.at("collectionEntityIpv4Addr").get_to(o.m_CollectionEntityIpv4Addr); + o.m_CollectionEntityIpv4AddrIsSet = true; + } + if (j.find("collectionEntityIpv6Addr") != j.end()) { + j.at("collectionEntityIpv6Addr").get_to(o.m_CollectionEntityIpv6Addr); + o.m_CollectionEntityIpv6AddrIsSet = true; + } + if (j.find("interfaceList") != j.end()) { + j.at("interfaceList").get_to(o.m_InterfaceList); + o.m_InterfaceListIsSet = true; + } } -std::string TraceData::getTraceRef() const -{ - return m_TraceRef; +std::string TraceData::getTraceRef() const { + return m_TraceRef; } -void TraceData::setTraceRef(std::string const& value) -{ - m_TraceRef = value; +void TraceData::setTraceRef(std::string const& value) { + m_TraceRef = value; } -TraceDepth TraceData::getTraceDepth() const -{ - return m_TraceDepth; +TraceDepth TraceData::getTraceDepth() const { + return m_TraceDepth; } -void TraceData::setTraceDepth(TraceDepth const& value) -{ - m_TraceDepth = value; +void TraceData::setTraceDepth(TraceDepth const& value) { + m_TraceDepth = value; } -std::string TraceData::getNeTypeList() const -{ - return m_NeTypeList; +std::string TraceData::getNeTypeList() const { + return m_NeTypeList; } -void TraceData::setNeTypeList(std::string const& value) -{ - m_NeTypeList = value; +void TraceData::setNeTypeList(std::string const& value) { + m_NeTypeList = value; } -std::string TraceData::getEventList() const -{ - return m_EventList; +std::string TraceData::getEventList() const { + return m_EventList; } -void TraceData::setEventList(std::string const& value) -{ - m_EventList = value; +void TraceData::setEventList(std::string const& value) { + m_EventList = value; } -std::string TraceData::getCollectionEntityIpv4Addr() const -{ - return m_CollectionEntityIpv4Addr; +std::string TraceData::getCollectionEntityIpv4Addr() const { + return m_CollectionEntityIpv4Addr; } -void TraceData::setCollectionEntityIpv4Addr(std::string const& value) -{ - m_CollectionEntityIpv4Addr = value; - m_CollectionEntityIpv4AddrIsSet = true; +void TraceData::setCollectionEntityIpv4Addr(std::string const& value) { + m_CollectionEntityIpv4Addr = value; + m_CollectionEntityIpv4AddrIsSet = true; } -bool TraceData::collectionEntityIpv4AddrIsSet() const -{ - return m_CollectionEntityIpv4AddrIsSet; +bool TraceData::collectionEntityIpv4AddrIsSet() const { + return m_CollectionEntityIpv4AddrIsSet; } -void TraceData::unsetCollectionEntityIpv4Addr() -{ - m_CollectionEntityIpv4AddrIsSet = false; +void TraceData::unsetCollectionEntityIpv4Addr() { + m_CollectionEntityIpv4AddrIsSet = false; } -Ipv6Addr TraceData::getCollectionEntityIpv6Addr() const -{ - return m_CollectionEntityIpv6Addr; +Ipv6Addr TraceData::getCollectionEntityIpv6Addr() const { + return m_CollectionEntityIpv6Addr; } -void TraceData::setCollectionEntityIpv6Addr(Ipv6Addr const& value) -{ - m_CollectionEntityIpv6Addr = value; - m_CollectionEntityIpv6AddrIsSet = true; +void TraceData::setCollectionEntityIpv6Addr(Ipv6Addr const& value) { + m_CollectionEntityIpv6Addr = value; + m_CollectionEntityIpv6AddrIsSet = true; } -bool TraceData::collectionEntityIpv6AddrIsSet() const -{ - return m_CollectionEntityIpv6AddrIsSet; +bool TraceData::collectionEntityIpv6AddrIsSet() const { + return m_CollectionEntityIpv6AddrIsSet; } -void TraceData::unsetCollectionEntityIpv6Addr() -{ - m_CollectionEntityIpv6AddrIsSet = false; +void TraceData::unsetCollectionEntityIpv6Addr() { + m_CollectionEntityIpv6AddrIsSet = false; } -std::string TraceData::getInterfaceList() const -{ - return m_InterfaceList; +std::string TraceData::getInterfaceList() const { + return m_InterfaceList; } -void TraceData::setInterfaceList(std::string const& value) -{ - m_InterfaceList = value; - m_InterfaceListIsSet = true; +void TraceData::setInterfaceList(std::string const& value) { + m_InterfaceList = value; + m_InterfaceListIsSet = true; } -bool TraceData::interfaceListIsSet() const -{ - return m_InterfaceListIsSet; +bool TraceData::interfaceListIsSet() const { + return m_InterfaceListIsSet; } -void TraceData::unsetInterfaceList() -{ - m_InterfaceListIsSet = false; +void TraceData::unsetInterfaceList() { + m_InterfaceListIsSet = false; } - } // namespace model } // namespace pcf } // namespace oai diff --git a/src/api-server/model/TraceData.h b/src/api-server/model/TraceData.h old mode 100755 new mode 100644 index fb1235e..be9583b --- a/src/api-server/model/TraceData.h +++ b/src/api-server/model/TraceData.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * TraceData.h * - * + * */ #ifndef TraceData_H_ #define TraceData_H_ - #include "TraceDepth.h" #include <string> #include "Ipv6Addr.h" @@ -29,98 +29,97 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class TraceData -{ -public: - TraceData(); - virtual ~TraceData() = 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 TraceData& rhs) const; - bool operator!=(const TraceData& rhs) const; - - ///////////////////////////////////////////// - /// TraceData members - - /// <summary> - /// - /// </summary> - std::string getTraceRef() const; - void setTraceRef(std::string const& value); - /// <summary> - /// - /// </summary> - TraceDepth getTraceDepth() const; - void setTraceDepth(TraceDepth const& value); - /// <summary> - /// - /// </summary> - std::string getNeTypeList() const; - void setNeTypeList(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getEventList() const; - void setEventList(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getCollectionEntityIpv4Addr() const; - void setCollectionEntityIpv4Addr(std::string const& value); - bool collectionEntityIpv4AddrIsSet() const; - void unsetCollectionEntityIpv4Addr(); - /// <summary> - /// - /// </summary> - Ipv6Addr getCollectionEntityIpv6Addr() const; - void setCollectionEntityIpv6Addr(Ipv6Addr const& value); - bool collectionEntityIpv6AddrIsSet() const; - void unsetCollectionEntityIpv6Addr(); - /// <summary> - /// - /// </summary> - std::string getInterfaceList() const; - void setInterfaceList(std::string const& value); - bool interfaceListIsSet() const; - void unsetInterfaceList(); - - friend void to_json(nlohmann::json& j, const TraceData& o); - friend void from_json(const nlohmann::json& j, TraceData& o); -protected: - std::string m_TraceRef; - - TraceDepth m_TraceDepth; - - std::string m_NeTypeList; - - std::string m_EventList; - - std::string m_CollectionEntityIpv4Addr; - bool m_CollectionEntityIpv4AddrIsSet; - Ipv6Addr m_CollectionEntityIpv6Addr; - bool m_CollectionEntityIpv6AddrIsSet; - std::string m_InterfaceList; - bool m_InterfaceListIsSet; - +class TraceData { + public: + TraceData(); + virtual ~TraceData() = 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 TraceData& rhs) const; + bool operator!=(const TraceData& rhs) const; + + ///////////////////////////////////////////// + /// TraceData members + + /// <summary> + /// + /// </summary> + std::string getTraceRef() const; + void setTraceRef(std::string const& value); + /// <summary> + /// + /// </summary> + TraceDepth getTraceDepth() const; + void setTraceDepth(TraceDepth const& value); + /// <summary> + /// + /// </summary> + std::string getNeTypeList() const; + void setNeTypeList(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getEventList() const; + void setEventList(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getCollectionEntityIpv4Addr() const; + void setCollectionEntityIpv4Addr(std::string const& value); + bool collectionEntityIpv4AddrIsSet() const; + void unsetCollectionEntityIpv4Addr(); + /// <summary> + /// + /// </summary> + Ipv6Addr getCollectionEntityIpv6Addr() const; + void setCollectionEntityIpv6Addr(Ipv6Addr const& value); + bool collectionEntityIpv6AddrIsSet() const; + void unsetCollectionEntityIpv6Addr(); + /// <summary> + /// + /// </summary> + std::string getInterfaceList() const; + void setInterfaceList(std::string const& value); + bool interfaceListIsSet() const; + void unsetInterfaceList(); + + friend void to_json(nlohmann::json& j, const TraceData& o); + friend void from_json(const nlohmann::json& j, TraceData& o); + + protected: + std::string m_TraceRef; + + TraceDepth m_TraceDepth; + + std::string m_NeTypeList; + + std::string m_EventList; + + std::string m_CollectionEntityIpv4Addr; + bool m_CollectionEntityIpv4AddrIsSet; + Ipv6Addr m_CollectionEntityIpv6Addr; + bool m_CollectionEntityIpv6AddrIsSet; + std::string m_InterfaceList; + bool m_InterfaceListIsSet; }; } // namespace model diff --git a/src/api-server/model/TraceDepth.cpp b/src/api-server/model/TraceDepth.cpp old mode 100755 new mode 100644 index df848e0..62ae09e --- a/src/api-server/model/TraceDepth.cpp +++ b/src/api-server/model/TraceDepth.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "TraceDepth.h" #include "Helpers.h" @@ -20,80 +20,65 @@ namespace oai { namespace pcf { namespace model { -TraceDepth::TraceDepth() -{ - -} +TraceDepth::TraceDepth() {} -void TraceDepth::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void TraceDepth::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool TraceDepth::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool TraceDepth::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool TraceDepth::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "TraceDepth" : pathPrefix; - - - if (!m_value.validate(msg)) - { - success = false; - } - return success; +bool TraceDepth::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "TraceDepth" : pathPrefix; + + if (!m_value.validate(msg)) { + success = false; + } + return success; } -bool TraceDepth::operator==(const TraceDepth& rhs) const -{ - return - - getValue() == rhs.getValue() - ; +bool TraceDepth::operator==(const TraceDepth& rhs) const { + return + + getValue() == rhs.getValue(); } -bool TraceDepth::operator!=(const TraceDepth& rhs) const -{ - return !(*this == rhs); +bool TraceDepth::operator!=(const TraceDepth& rhs) const { + return !(*this == rhs); } -void to_json(nlohmann::json& j, const TraceDepth& o) -{ - j = nlohmann::json(); - to_json(j, o.m_value); +void to_json(nlohmann::json& j, const TraceDepth& o) { + j = nlohmann::json(); + to_json(j, o.m_value); } -void from_json(const nlohmann::json& j, TraceDepth& o) -{ - from_json(j, o.m_value); +void from_json(const nlohmann::json& j, TraceDepth& o) { + from_json(j, o.m_value); } -TraceDepth_anyOf TraceDepth::getValue() const -{ - return m_value; +TraceDepth_anyOf TraceDepth::getValue() const { + return m_value; } -void TraceDepth::setValue(TraceDepth_anyOf value) -{ - m_value = value; +void TraceDepth::setValue(TraceDepth_anyOf value) { + m_value = value; } -TraceDepth_anyOf::eTraceDepth_anyOf TraceDepth::getEnumValue() const -{ - return m_value.getValue(); +TraceDepth_anyOf::eTraceDepth_anyOf TraceDepth::getEnumValue() const { + return m_value.getValue(); } -void TraceDepth::setEnumValue(TraceDepth_anyOf::eTraceDepth_anyOf value) -{ - m_value.setValue(value); +void TraceDepth::setEnumValue(TraceDepth_anyOf::eTraceDepth_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/TraceDepth.h b/src/api-server/model/TraceDepth.h old mode 100755 new mode 100644 index 601c059..5f412c0 --- a/src/api-server/model/TraceDepth.h +++ b/src/api-server/model/TraceDepth.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * TraceDepth.h * - * + * */ #ifndef TraceDepth_H_ #define TraceDepth_H_ - #include "TraceDepth_anyOf.h" #include <nlohmann/json.hpp> @@ -27,49 +27,48 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class TraceDepth -{ -public: - TraceDepth(); - virtual ~TraceDepth() = default; - +class TraceDepth { + public: + TraceDepth(); + virtual ~TraceDepth() = 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. 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> + /// 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; + /// <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 TraceDepth& rhs) const; - bool operator!=(const TraceDepth& rhs) const; + bool operator==(const TraceDepth& rhs) const; + bool operator!=(const TraceDepth& rhs) const; - ///////////////////////////////////////////// - /// TraceDepth members + ///////////////////////////////////////////// + /// TraceDepth members + TraceDepth_anyOf getValue() const; + void setValue(TraceDepth_anyOf value); + TraceDepth_anyOf::eTraceDepth_anyOf getEnumValue() const; + void setEnumValue(TraceDepth_anyOf::eTraceDepth_anyOf value); + friend void to_json(nlohmann::json& j, const TraceDepth& o); + friend void from_json(const nlohmann::json& j, TraceDepth& o); + friend void to_json(nlohmann::json& j, const TraceDepth_anyOf& o); + friend void from_json(const nlohmann::json& j, TraceDepth_anyOf& o); - TraceDepth_anyOf getValue() const; - void setValue(TraceDepth_anyOf value); - TraceDepth_anyOf::eTraceDepth_anyOf getEnumValue() const; - void setEnumValue(TraceDepth_anyOf::eTraceDepth_anyOf value); - friend void to_json(nlohmann::json& j, const TraceDepth& o); - friend void from_json(const nlohmann::json& j, TraceDepth& o); - friend void to_json(nlohmann::json& j, const TraceDepth_anyOf& o); - friend void from_json(const nlohmann::json& j, TraceDepth_anyOf& o); -protected: - TraceDepth_anyOf m_value; + protected: + TraceDepth_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/TraceDepth_anyOf.cpp b/src/api-server/model/TraceDepth_anyOf.cpp old mode 100755 new mode 100644 index 0f11248..598839a --- a/src/api-server/model/TraceDepth_anyOf.cpp +++ b/src/api-server/model/TraceDepth_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "TraceDepth_anyOf.h" #include "Helpers.h" @@ -20,121 +20,103 @@ namespace oai { namespace pcf { namespace model { -TraceDepth_anyOf::TraceDepth_anyOf() -{ - -} +TraceDepth_anyOf::TraceDepth_anyOf() {} -void TraceDepth_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void TraceDepth_anyOf::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool TraceDepth_anyOf::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool TraceDepth_anyOf::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool TraceDepth_anyOf::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "TraceDepth_anyOf" : pathPrefix; +bool TraceDepth_anyOf::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "TraceDepth_anyOf" : pathPrefix; - - if (m_value == TraceDepth_anyOf::eTraceDepth_anyOf::INVALID_VALUE_OPENAPI_GENERATED) - { - success = false; - msg << _pathPrefix << ": has no value;"; - } + if (m_value == + TraceDepth_anyOf::eTraceDepth_anyOf::INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + return success; } -bool TraceDepth_anyOf::operator==(const TraceDepth_anyOf& rhs) const -{ - return - getValue() == rhs.getValue() - - ; -} +bool TraceDepth_anyOf::operator==(const TraceDepth_anyOf& rhs) const { + return getValue() == rhs.getValue() -bool TraceDepth_anyOf::operator!=(const TraceDepth_anyOf& rhs) const -{ - return !(*this == rhs); + ; } -void to_json(nlohmann::json& j, const TraceDepth_anyOf& o) -{ - j = nlohmann::json(); - - switch (o.getValue()) - { - case TraceDepth_anyOf::eTraceDepth_anyOf::INVALID_VALUE_OPENAPI_GENERATED: - j = "INVALID_VALUE_OPENAPI_GENERATED"; - break; - case TraceDepth_anyOf::eTraceDepth_anyOf::MINIMUM: - j = "MINIMUM"; - break; - case TraceDepth_anyOf::eTraceDepth_anyOf::MEDIUM: - j = "MEDIUM"; - break; - case TraceDepth_anyOf::eTraceDepth_anyOf::MAXIMUM: - j = "MAXIMUM"; - break; - case TraceDepth_anyOf::eTraceDepth_anyOf::MINIMUM_WO_VENDOR_EXTENSION: - j = "MINIMUM_WO_VENDOR_EXTENSION"; - break; - case TraceDepth_anyOf::eTraceDepth_anyOf::MEDIUM_WO_VENDOR_EXTENSION: - j = "MEDIUM_WO_VENDOR_EXTENSION"; - break; - case TraceDepth_anyOf::eTraceDepth_anyOf::MAXIMUM_WO_VENDOR_EXTENSION: - j = "MAXIMUM_WO_VENDOR_EXTENSION"; - break; - } +bool TraceDepth_anyOf::operator!=(const TraceDepth_anyOf& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, TraceDepth_anyOf& o) -{ - - auto s = j.get<std::string>(); - if (s == "MINIMUM") { - o.setValue(TraceDepth_anyOf::eTraceDepth_anyOf::MINIMUM); - } - else if (s == "MEDIUM") { - o.setValue(TraceDepth_anyOf::eTraceDepth_anyOf::MEDIUM); - } - else if (s == "MAXIMUM") { - o.setValue(TraceDepth_anyOf::eTraceDepth_anyOf::MAXIMUM); - } - else if (s == "MINIMUM_WO_VENDOR_EXTENSION") { - o.setValue(TraceDepth_anyOf::eTraceDepth_anyOf::MINIMUM_WO_VENDOR_EXTENSION); - } - else if (s == "MEDIUM_WO_VENDOR_EXTENSION") { - o.setValue(TraceDepth_anyOf::eTraceDepth_anyOf::MEDIUM_WO_VENDOR_EXTENSION); - } - else if (s == "MAXIMUM_WO_VENDOR_EXTENSION") { - o.setValue(TraceDepth_anyOf::eTraceDepth_anyOf::MAXIMUM_WO_VENDOR_EXTENSION); - } else { - std::stringstream ss; - ss << "Unexpected value " << s << " in json" - << " cannot be converted to enum of type" - << " TraceDepth_anyOf::eTraceDepth_anyOf"; - throw std::invalid_argument(ss.str()); - } +void to_json(nlohmann::json& j, const TraceDepth_anyOf& o) { + j = nlohmann::json(); + + switch (o.getValue()) { + case TraceDepth_anyOf::eTraceDepth_anyOf::INVALID_VALUE_OPENAPI_GENERATED: + j = "INVALID_VALUE_OPENAPI_GENERATED"; + break; + case TraceDepth_anyOf::eTraceDepth_anyOf::MINIMUM: + j = "MINIMUM"; + break; + case TraceDepth_anyOf::eTraceDepth_anyOf::MEDIUM: + j = "MEDIUM"; + break; + case TraceDepth_anyOf::eTraceDepth_anyOf::MAXIMUM: + j = "MAXIMUM"; + break; + case TraceDepth_anyOf::eTraceDepth_anyOf::MINIMUM_WO_VENDOR_EXTENSION: + j = "MINIMUM_WO_VENDOR_EXTENSION"; + break; + case TraceDepth_anyOf::eTraceDepth_anyOf::MEDIUM_WO_VENDOR_EXTENSION: + j = "MEDIUM_WO_VENDOR_EXTENSION"; + break; + case TraceDepth_anyOf::eTraceDepth_anyOf::MAXIMUM_WO_VENDOR_EXTENSION: + j = "MAXIMUM_WO_VENDOR_EXTENSION"; + break; + } +} +void from_json(const nlohmann::json& j, TraceDepth_anyOf& o) { + auto s = j.get<std::string>(); + if (s == "MINIMUM") { + o.setValue(TraceDepth_anyOf::eTraceDepth_anyOf::MINIMUM); + } else if (s == "MEDIUM") { + o.setValue(TraceDepth_anyOf::eTraceDepth_anyOf::MEDIUM); + } else if (s == "MAXIMUM") { + o.setValue(TraceDepth_anyOf::eTraceDepth_anyOf::MAXIMUM); + } else if (s == "MINIMUM_WO_VENDOR_EXTENSION") { + o.setValue( + TraceDepth_anyOf::eTraceDepth_anyOf::MINIMUM_WO_VENDOR_EXTENSION); + } else if (s == "MEDIUM_WO_VENDOR_EXTENSION") { + o.setValue(TraceDepth_anyOf::eTraceDepth_anyOf::MEDIUM_WO_VENDOR_EXTENSION); + } else if (s == "MAXIMUM_WO_VENDOR_EXTENSION") { + o.setValue( + TraceDepth_anyOf::eTraceDepth_anyOf::MAXIMUM_WO_VENDOR_EXTENSION); + } else { + std::stringstream ss; + ss << "Unexpected value " << s << " in json" + << " cannot be converted to enum of type" + << " TraceDepth_anyOf::eTraceDepth_anyOf"; + throw std::invalid_argument(ss.str()); + } } -TraceDepth_anyOf::eTraceDepth_anyOf TraceDepth_anyOf::getValue() const -{ - return m_value; +TraceDepth_anyOf::eTraceDepth_anyOf TraceDepth_anyOf::getValue() const { + return m_value; } -void TraceDepth_anyOf::setValue(TraceDepth_anyOf::eTraceDepth_anyOf value) -{ - m_value = value; +void TraceDepth_anyOf::setValue(TraceDepth_anyOf::eTraceDepth_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/TraceDepth_anyOf.h b/src/api-server/model/TraceDepth_anyOf.h old mode 100755 new mode 100644 index 7070106..1f5e2e7 --- a/src/api-server/model/TraceDepth_anyOf.h +++ b/src/api-server/model/TraceDepth_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * TraceDepth_anyOf.h * - * + * */ #ifndef TraceDepth_anyOf_H_ #define TraceDepth_anyOf_H_ - #include <nlohmann/json.hpp> namespace oai { @@ -26,57 +26,59 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class TraceDepth_anyOf -{ -public: - TraceDepth_anyOf(); - virtual ~TraceDepth_anyOf() = default; +class TraceDepth_anyOf { + public: + TraceDepth_anyOf(); + virtual ~TraceDepth_anyOf() = default; - enum class eTraceDepth_anyOf { + enum class eTraceDepth_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - MINIMUM, - MEDIUM, - MAXIMUM, - MINIMUM_WO_VENDOR_EXTENSION, - MEDIUM_WO_VENDOR_EXTENSION, + MINIMUM, + MEDIUM, + MAXIMUM, + MINIMUM_WO_VENDOR_EXTENSION, + MEDIUM_WO_VENDOR_EXTENSION, MAXIMUM_WO_VENDOR_EXTENSION - }; + }; + + /// <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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const TraceDepth_anyOf& rhs) const; + bool operator!=(const TraceDepth_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// TraceDepth_anyOf members - bool operator==(const TraceDepth_anyOf& rhs) const; - bool operator!=(const TraceDepth_anyOf& rhs) const; + TraceDepth_anyOf::eTraceDepth_anyOf getValue() const; + void setValue(TraceDepth_anyOf::eTraceDepth_anyOf value); - ///////////////////////////////////////////// - /// TraceDepth_anyOf members + friend void to_json(nlohmann::json& j, const TraceDepth_anyOf& o); + friend void from_json(const nlohmann::json& j, TraceDepth_anyOf& o); - TraceDepth_anyOf::eTraceDepth_anyOf getValue() const; - void setValue(TraceDepth_anyOf::eTraceDepth_anyOf value); - - friend void to_json(nlohmann::json& j, const TraceDepth_anyOf& o); - friend void from_json(const nlohmann::json& j, TraceDepth_anyOf& o); -protected: - TraceDepth_anyOf::eTraceDepth_anyOf m_value = TraceDepth_anyOf::eTraceDepth_anyOf::INVALID_VALUE_OPENAPI_GENERATED; + protected: + TraceDepth_anyOf::eTraceDepth_anyOf m_value = + TraceDepth_anyOf::eTraceDepth_anyOf::INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/TrafficControlData.cpp b/src/api-server/model/TrafficControlData.cpp old mode 100755 new mode 100644 index 8922f51..36154f1 --- a/src/api-server/model/TrafficControlData.cpp +++ b/src/api-server/model/TrafficControlData.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,493 +20,414 @@ namespace oai { namespace pcf { namespace model { -TrafficControlData::TrafficControlData() -{ - m_TcId = ""; - m_FlowStatusIsSet = false; - m_RedirectInfoIsSet = false; - m_AddRedirectInfoIsSet = false; - m_MuteNotif = false; - m_MuteNotifIsSet = false; - m_TrafficSteeringPolIdDl = ""; - m_TrafficSteeringPolIdDlIsSet = false; - m_TrafficSteeringPolIdUl = ""; - m_TrafficSteeringPolIdUlIsSet = false; - m_RouteToLocsIsSet = false; - m_TraffCorreInd = false; - m_TraffCorreIndIsSet = false; - m_UpPathChgEventIsSet = false; - m_SteerFunIsSet = false; - m_SteerModeDlIsSet = false; - m_SteerModeUlIsSet = false; - m_MulAccCtrlIsSet = false; - -} - -void TrafficControlData::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 -{ - 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++; - } - } +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;"; } - - 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++; - } - } + { // Recursive validation of array elements + const std::string oldValuePath = currentValuePath; + int i = 0; + for (const RouteToLocation& value : value) { + const std::string currentValuePath = + oldValuePath + "[" + std::to_string(i) + "]"; + + success = + value.validate(msg, currentValuePath + ".routeToLocs") && success; + i++; + } } - - return success; -} - -bool TrafficControlData::operator==(const TrafficControlData& rhs) const -{ - return - - - (getTcId() == rhs.getTcId()) - && - - - ((!flowStatusIsSet() && !rhs.flowStatusIsSet()) || (flowStatusIsSet() && rhs.flowStatusIsSet() && getFlowStatus() == rhs.getFlowStatus())) && - - - ((!redirectInfoIsSet() && !rhs.redirectInfoIsSet()) || (redirectInfoIsSet() && rhs.redirectInfoIsSet() && getRedirectInfo() == rhs.getRedirectInfo())) && - - - ((!addRedirectInfoIsSet() && !rhs.addRedirectInfoIsSet()) || (addRedirectInfoIsSet() && rhs.addRedirectInfoIsSet() && getAddRedirectInfo() == rhs.getAddRedirectInfo())) && - - - ((!muteNotifIsSet() && !rhs.muteNotifIsSet()) || (muteNotifIsSet() && rhs.muteNotifIsSet() && isMuteNotif() == rhs.isMuteNotif())) && - - - ((!trafficSteeringPolIdDlIsSet() && !rhs.trafficSteeringPolIdDlIsSet()) || (trafficSteeringPolIdDlIsSet() && rhs.trafficSteeringPolIdDlIsSet() && getTrafficSteeringPolIdDl() == rhs.getTrafficSteeringPolIdDl())) && - - - ((!trafficSteeringPolIdUlIsSet() && !rhs.trafficSteeringPolIdUlIsSet()) || (trafficSteeringPolIdUlIsSet() && rhs.trafficSteeringPolIdUlIsSet() && getTrafficSteeringPolIdUl() == rhs.getTrafficSteeringPolIdUl())) && - - - ((!routeToLocsIsSet() && !rhs.routeToLocsIsSet()) || (routeToLocsIsSet() && rhs.routeToLocsIsSet() && getRouteToLocs() == rhs.getRouteToLocs())) && - - - ((!traffCorreIndIsSet() && !rhs.traffCorreIndIsSet()) || (traffCorreIndIsSet() && rhs.traffCorreIndIsSet() && isTraffCorreInd() == rhs.isTraffCorreInd())) && - - - ((!upPathChgEventIsSet() && !rhs.upPathChgEventIsSet()) || (upPathChgEventIsSet() && rhs.upPathChgEventIsSet() && getUpPathChgEvent() == rhs.getUpPathChgEvent())) && - - - ((!steerFunIsSet() && !rhs.steerFunIsSet()) || (steerFunIsSet() && rhs.steerFunIsSet() && getSteerFun() == rhs.getSteerFun())) && - - - ((!steerModeDlIsSet() && !rhs.steerModeDlIsSet()) || (steerModeDlIsSet() && rhs.steerModeDlIsSet() && getSteerModeDl() == rhs.getSteerModeDl())) && - - - ((!steerModeUlIsSet() && !rhs.steerModeUlIsSet()) || (steerModeUlIsSet() && rhs.steerModeUlIsSet() && getSteerModeUl() == rhs.getSteerModeUl())) && - - - ((!mulAccCtrlIsSet() && !rhs.mulAccCtrlIsSet()) || (mulAccCtrlIsSet() && rhs.mulAccCtrlIsSet() && getMulAccCtrl() == rhs.getMulAccCtrl())) - - ; -} - -bool TrafficControlData::operator!=(const TrafficControlData& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const TrafficControlData& o) -{ - j = nlohmann::json(); - j["tcId"] = o.m_TcId; - if(o.flowStatusIsSet()) - j["flowStatus"] = o.m_FlowStatus; - if(o.redirectInfoIsSet()) - j["redirectInfo"] = o.m_RedirectInfo; - if(o.addRedirectInfoIsSet() || !o.m_AddRedirectInfo.empty()) - j["addRedirectInfo"] = o.m_AddRedirectInfo; - if(o.muteNotifIsSet()) - j["muteNotif"] = o.m_MuteNotif; - if(o.trafficSteeringPolIdDlIsSet()) - j["trafficSteeringPolIdDl"] = o.m_TrafficSteeringPolIdDl; - if(o.trafficSteeringPolIdUlIsSet()) - j["trafficSteeringPolIdUl"] = o.m_TrafficSteeringPolIdUl; - if(o.routeToLocsIsSet() || !o.m_RouteToLocs.empty()) - j["routeToLocs"] = o.m_RouteToLocs; - if(o.traffCorreIndIsSet()) - j["traffCorreInd"] = o.m_TraffCorreInd; - if(o.upPathChgEventIsSet()) - j["upPathChgEvent"] = o.m_UpPathChgEvent; - if(o.steerFunIsSet()) - j["steerFun"] = o.m_SteerFun; - if(o.steerModeDlIsSet()) - j["steerModeDl"] = o.m_SteerModeDl; - if(o.steerModeUlIsSet()) - j["steerModeUl"] = o.m_SteerModeUl; - if(o.mulAccCtrlIsSet()) - j["mulAccCtrl"] = o.m_MulAccCtrl; - -} - -void from_json(const nlohmann::json& j, TrafficControlData& o) -{ - j.at("tcId").get_to(o.m_TcId); - if(j.find("flowStatus") != j.end()) - { - j.at("flowStatus").get_to(o.m_FlowStatus); - o.m_FlowStatusIsSet = true; - } - if(j.find("redirectInfo") != j.end()) - { - j.at("redirectInfo").get_to(o.m_RedirectInfo); - o.m_RedirectInfoIsSet = true; - } - if(j.find("addRedirectInfo") != j.end()) - { - j.at("addRedirectInfo").get_to(o.m_AddRedirectInfo); - o.m_AddRedirectInfoIsSet = true; - } - if(j.find("muteNotif") != j.end()) - { - j.at("muteNotif").get_to(o.m_MuteNotif); - o.m_MuteNotifIsSet = true; - } - if(j.find("trafficSteeringPolIdDl") != j.end()) - { - j.at("trafficSteeringPolIdDl").get_to(o.m_TrafficSteeringPolIdDl); - o.m_TrafficSteeringPolIdDlIsSet = true; - } - if(j.find("trafficSteeringPolIdUl") != j.end()) - { - j.at("trafficSteeringPolIdUl").get_to(o.m_TrafficSteeringPolIdUl); - o.m_TrafficSteeringPolIdUlIsSet = true; - } - if(j.find("routeToLocs") != j.end()) - { - j.at("routeToLocs").get_to(o.m_RouteToLocs); - o.m_RouteToLocsIsSet = true; - } - if(j.find("traffCorreInd") != j.end()) - { - j.at("traffCorreInd").get_to(o.m_TraffCorreInd); - o.m_TraffCorreIndIsSet = true; - } - if(j.find("upPathChgEvent") != j.end()) - { - j.at("upPathChgEvent").get_to(o.m_UpPathChgEvent); - o.m_UpPathChgEventIsSet = true; - } - if(j.find("steerFun") != j.end()) - { - j.at("steerFun").get_to(o.m_SteerFun); - o.m_SteerFunIsSet = true; - } - if(j.find("steerModeDl") != j.end()) - { - j.at("steerModeDl").get_to(o.m_SteerModeDl); - o.m_SteerModeDlIsSet = true; - } - if(j.find("steerModeUl") != j.end()) - { - j.at("steerModeUl").get_to(o.m_SteerModeUl); - o.m_SteerModeUlIsSet = true; - } - if(j.find("mulAccCtrl") != j.end()) - { - j.at("mulAccCtrl").get_to(o.m_MulAccCtrl); - o.m_MulAccCtrlIsSet = true; - } - -} - -std::string TrafficControlData::getTcId() const -{ - return m_TcId; -} -void TrafficControlData::setTcId(std::string const& value) -{ - m_TcId = value; -} -FlowStatus TrafficControlData::getFlowStatus() const -{ - return m_FlowStatus; -} -void TrafficControlData::setFlowStatus(FlowStatus const& value) -{ - m_FlowStatus = value; - m_FlowStatusIsSet = true; -} -bool TrafficControlData::flowStatusIsSet() const -{ - return m_FlowStatusIsSet; -} -void TrafficControlData::unsetFlowStatus() -{ - m_FlowStatusIsSet = false; -} -RedirectInformation TrafficControlData::getRedirectInfo() const -{ - return m_RedirectInfo; -} -void TrafficControlData::setRedirectInfo(RedirectInformation const& value) -{ - m_RedirectInfo = value; - m_RedirectInfoIsSet = true; -} -bool TrafficControlData::redirectInfoIsSet() const -{ - return m_RedirectInfoIsSet; -} -void TrafficControlData::unsetRedirectInfo() -{ - m_RedirectInfoIsSet = false; -} -std::vector<RedirectInformation> TrafficControlData::getAddRedirectInfo() const -{ - return m_AddRedirectInfo; -} -void TrafficControlData::setAddRedirectInfo(std::vector<RedirectInformation> const& value) -{ - m_AddRedirectInfo = value; - m_AddRedirectInfoIsSet = true; -} -bool TrafficControlData::addRedirectInfoIsSet() const -{ - return m_AddRedirectInfoIsSet; -} -void TrafficControlData::unsetAddRedirectInfo() -{ - m_AddRedirectInfoIsSet = false; -} -bool TrafficControlData::isMuteNotif() const -{ - return m_MuteNotif; -} -void TrafficControlData::setMuteNotif(bool const value) -{ - m_MuteNotif = value; - m_MuteNotifIsSet = true; -} -bool TrafficControlData::muteNotifIsSet() const -{ - return m_MuteNotifIsSet; -} -void TrafficControlData::unsetMuteNotif() -{ - m_MuteNotifIsSet = false; -} -std::string TrafficControlData::getTrafficSteeringPolIdDl() const -{ - return m_TrafficSteeringPolIdDl; -} -void TrafficControlData::setTrafficSteeringPolIdDl(std::string const& value) -{ - m_TrafficSteeringPolIdDl = value; - m_TrafficSteeringPolIdDlIsSet = true; -} -bool TrafficControlData::trafficSteeringPolIdDlIsSet() const -{ - return m_TrafficSteeringPolIdDlIsSet; -} -void TrafficControlData::unsetTrafficSteeringPolIdDl() -{ - m_TrafficSteeringPolIdDlIsSet = false; -} -std::string TrafficControlData::getTrafficSteeringPolIdUl() const -{ - return m_TrafficSteeringPolIdUl; -} -void TrafficControlData::setTrafficSteeringPolIdUl(std::string const& value) -{ - m_TrafficSteeringPolIdUl = value; - m_TrafficSteeringPolIdUlIsSet = true; -} -bool TrafficControlData::trafficSteeringPolIdUlIsSet() const -{ - return m_TrafficSteeringPolIdUlIsSet; -} -void TrafficControlData::unsetTrafficSteeringPolIdUl() -{ - m_TrafficSteeringPolIdUlIsSet = false; -} -std::vector<RouteToLocation> TrafficControlData::getRouteToLocs() const -{ - return m_RouteToLocs; -} -void TrafficControlData::setRouteToLocs(std::vector<RouteToLocation> const& value) -{ - m_RouteToLocs = value; - m_RouteToLocsIsSet = true; -} -bool TrafficControlData::routeToLocsIsSet() const -{ - return m_RouteToLocsIsSet; -} -void TrafficControlData::unsetRouteToLocs() -{ - m_RouteToLocsIsSet = false; -} -bool TrafficControlData::isTraffCorreInd() const -{ - return m_TraffCorreInd; -} -void TrafficControlData::setTraffCorreInd(bool const value) -{ - m_TraffCorreInd = value; - m_TraffCorreIndIsSet = true; -} -bool TrafficControlData::traffCorreIndIsSet() const -{ - return m_TraffCorreIndIsSet; -} -void TrafficControlData::unsetTraffCorreInd() -{ - m_TraffCorreIndIsSet = false; -} -UpPathChgEvent TrafficControlData::getUpPathChgEvent() const -{ - return m_UpPathChgEvent; -} -void TrafficControlData::setUpPathChgEvent(UpPathChgEvent const& value) -{ - m_UpPathChgEvent = value; - m_UpPathChgEventIsSet = true; -} -bool TrafficControlData::upPathChgEventIsSet() const -{ - return m_UpPathChgEventIsSet; -} -void TrafficControlData::unsetUpPathChgEvent() -{ - m_UpPathChgEventIsSet = false; -} -SteeringFunctionality TrafficControlData::getSteerFun() const -{ - return m_SteerFun; -} -void TrafficControlData::setSteerFun(SteeringFunctionality const& value) -{ - m_SteerFun = value; - m_SteerFunIsSet = true; -} -bool TrafficControlData::steerFunIsSet() const -{ - return m_SteerFunIsSet; -} -void TrafficControlData::unsetSteerFun() -{ - m_SteerFunIsSet = false; -} -SteeringMode TrafficControlData::getSteerModeDl() const -{ - return m_SteerModeDl; -} -void TrafficControlData::setSteerModeDl(SteeringMode const& value) -{ - m_SteerModeDl = value; - m_SteerModeDlIsSet = true; -} -bool TrafficControlData::steerModeDlIsSet() const -{ - return m_SteerModeDlIsSet; -} -void TrafficControlData::unsetSteerModeDl() -{ - m_SteerModeDlIsSet = false; -} -SteeringMode TrafficControlData::getSteerModeUl() const -{ - return m_SteerModeUl; -} -void TrafficControlData::setSteerModeUl(SteeringMode const& value) -{ - m_SteerModeUl = value; - m_SteerModeUlIsSet = true; + } + + 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; } -bool TrafficControlData::steerModeUlIsSet() const -{ - return m_SteerModeUlIsSet; + +void from_json(const nlohmann::json& j, TrafficControlData& o) { + j.at("tcId").get_to(o.m_TcId); + if (j.find("flowStatus") != j.end()) { + j.at("flowStatus").get_to(o.m_FlowStatus); + o.m_FlowStatusIsSet = true; + } + if (j.find("redirectInfo") != j.end()) { + j.at("redirectInfo").get_to(o.m_RedirectInfo); + o.m_RedirectInfoIsSet = true; + } + if (j.find("addRedirectInfo") != j.end()) { + j.at("addRedirectInfo").get_to(o.m_AddRedirectInfo); + o.m_AddRedirectInfoIsSet = true; + } + if (j.find("muteNotif") != j.end()) { + j.at("muteNotif").get_to(o.m_MuteNotif); + o.m_MuteNotifIsSet = true; + } + if (j.find("trafficSteeringPolIdDl") != j.end()) { + j.at("trafficSteeringPolIdDl").get_to(o.m_TrafficSteeringPolIdDl); + o.m_TrafficSteeringPolIdDlIsSet = true; + } + if (j.find("trafficSteeringPolIdUl") != j.end()) { + j.at("trafficSteeringPolIdUl").get_to(o.m_TrafficSteeringPolIdUl); + o.m_TrafficSteeringPolIdUlIsSet = true; + } + if (j.find("routeToLocs") != j.end()) { + j.at("routeToLocs").get_to(o.m_RouteToLocs); + o.m_RouteToLocsIsSet = true; + } + if (j.find("traffCorreInd") != j.end()) { + j.at("traffCorreInd").get_to(o.m_TraffCorreInd); + o.m_TraffCorreIndIsSet = true; + } + if (j.find("upPathChgEvent") != j.end()) { + j.at("upPathChgEvent").get_to(o.m_UpPathChgEvent); + o.m_UpPathChgEventIsSet = true; + } + if (j.find("steerFun") != j.end()) { + j.at("steerFun").get_to(o.m_SteerFun); + o.m_SteerFunIsSet = true; + } + if (j.find("steerModeDl") != j.end()) { + j.at("steerModeDl").get_to(o.m_SteerModeDl); + o.m_SteerModeDlIsSet = true; + } + if (j.find("steerModeUl") != j.end()) { + j.at("steerModeUl").get_to(o.m_SteerModeUl); + o.m_SteerModeUlIsSet = true; + } + if (j.find("mulAccCtrl") != j.end()) { + j.at("mulAccCtrl").get_to(o.m_MulAccCtrl); + o.m_MulAccCtrlIsSet = true; + } } -void TrafficControlData::unsetSteerModeUl() -{ - m_SteerModeUlIsSet = false; + +std::string TrafficControlData::getTcId() const { + return m_TcId; } -MulticastAccessControl TrafficControlData::getMulAccCtrl() const -{ - return m_MulAccCtrl; +void TrafficControlData::setTcId(std::string const& value) { + m_TcId = value; } -void TrafficControlData::setMulAccCtrl(MulticastAccessControl const& value) -{ - m_MulAccCtrl = value; - m_MulAccCtrlIsSet = true; +FlowStatus TrafficControlData::getFlowStatus() const { + return m_FlowStatus; } -bool TrafficControlData::mulAccCtrlIsSet() const -{ - return m_MulAccCtrlIsSet; +void TrafficControlData::setFlowStatus(FlowStatus const& value) { + m_FlowStatus = value; + m_FlowStatusIsSet = true; } -void TrafficControlData::unsetMulAccCtrl() -{ - m_MulAccCtrlIsSet = false; +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 diff --git a/src/api-server/model/TrafficControlData.h b/src/api-server/model/TrafficControlData.h old mode 100755 new mode 100644 index 40ca32a..1bc4ff5 --- a/src/api-server/model/TrafficControlData.h +++ b/src/api-server/model/TrafficControlData.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -35,167 +35,170 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class TrafficControlData -{ -public: - TrafficControlData(); - virtual ~TrafficControlData() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const TrafficControlData& rhs) const; - bool operator!=(const TrafficControlData& rhs) const; + ///////////////////////////////////////////// + /// TrafficControlData members - ///////////////////////////////////////////// - /// 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<RouteToLocation> getRouteToLocs() const; + void setRouteToLocs(std::vector<RouteToLocation> const& value); + bool routeToLocsIsSet() const; + void unsetRouteToLocs(); + /// <summary> + /// + /// </summary> + bool isTraffCorreInd() const; + void setTraffCorreInd(bool const value); + bool traffCorreIndIsSet() const; + void unsetTraffCorreInd(); + /// <summary> + /// + /// </summary> + UpPathChgEvent getUpPathChgEvent() const; + void setUpPathChgEvent(UpPathChgEvent const& value); + bool upPathChgEventIsSet() const; + void unsetUpPathChgEvent(); + /// <summary> + /// + /// </summary> + SteeringFunctionality getSteerFun() const; + void setSteerFun(SteeringFunctionality const& value); + bool steerFunIsSet() const; + void unsetSteerFun(); + /// <summary> + /// + /// </summary> + SteeringMode getSteerModeDl() const; + void setSteerModeDl(SteeringMode const& value); + bool steerModeDlIsSet() const; + void unsetSteerModeDl(); + /// <summary> + /// + /// </summary> + SteeringMode getSteerModeUl() const; + void setSteerModeUl(SteeringMode const& value); + bool steerModeUlIsSet() const; + void unsetSteerModeUl(); + /// <summary> + /// + /// </summary> + MulticastAccessControl getMulAccCtrl() const; + void setMulAccCtrl(MulticastAccessControl const& value); + bool mulAccCtrlIsSet() const; + void unsetMulAccCtrl(); - /// <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<RouteToLocation> getRouteToLocs() const; - void setRouteToLocs(std::vector<RouteToLocation> const& value); - bool routeToLocsIsSet() const; - void unsetRouteToLocs(); - /// <summary> - /// - /// </summary> - bool isTraffCorreInd() const; - void setTraffCorreInd(bool const value); - bool traffCorreIndIsSet() const; - void unsetTraffCorreInd(); - /// <summary> - /// - /// </summary> - UpPathChgEvent getUpPathChgEvent() const; - void setUpPathChgEvent(UpPathChgEvent const& value); - bool upPathChgEventIsSet() const; - void unsetUpPathChgEvent(); - /// <summary> - /// - /// </summary> - SteeringFunctionality getSteerFun() const; - void setSteerFun(SteeringFunctionality const& value); - bool steerFunIsSet() const; - void unsetSteerFun(); - /// <summary> - /// - /// </summary> - SteeringMode getSteerModeDl() const; - void setSteerModeDl(SteeringMode const& value); - bool steerModeDlIsSet() const; - void unsetSteerModeDl(); - /// <summary> - /// - /// </summary> - SteeringMode getSteerModeUl() const; - void setSteerModeUl(SteeringMode const& value); - bool steerModeUlIsSet() const; - void unsetSteerModeUl(); - /// <summary> - /// - /// </summary> - MulticastAccessControl getMulAccCtrl() const; - void setMulAccCtrl(MulticastAccessControl const& value); - bool mulAccCtrlIsSet() const; - void unsetMulAccCtrl(); + friend void to_json(nlohmann::json& j, const TrafficControlData& o); + friend void from_json(const nlohmann::json& j, TrafficControlData& o); - 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; + protected: + std::string m_TcId; - FlowStatus m_FlowStatus; - bool m_FlowStatusIsSet; - RedirectInformation m_RedirectInfo; - bool m_RedirectInfoIsSet; - std::vector<RedirectInformation> m_AddRedirectInfo; - bool m_AddRedirectInfoIsSet; - bool m_MuteNotif; - bool m_MuteNotifIsSet; - std::string m_TrafficSteeringPolIdDl; - bool m_TrafficSteeringPolIdDlIsSet; - std::string m_TrafficSteeringPolIdUl; - bool m_TrafficSteeringPolIdUlIsSet; - std::vector<RouteToLocation> m_RouteToLocs; - bool m_RouteToLocsIsSet; - bool m_TraffCorreInd; - bool m_TraffCorreIndIsSet; - UpPathChgEvent m_UpPathChgEvent; - bool m_UpPathChgEventIsSet; - SteeringFunctionality m_SteerFun; - bool m_SteerFunIsSet; - SteeringMode m_SteerModeDl; - bool m_SteerModeDlIsSet; - SteeringMode m_SteerModeUl; - bool m_SteerModeUlIsSet; - MulticastAccessControl m_MulAccCtrl; - bool m_MulAccCtrlIsSet; - + FlowStatus m_FlowStatus; + bool m_FlowStatusIsSet; + RedirectInformation m_RedirectInfo; + bool m_RedirectInfoIsSet; + std::vector<RedirectInformation> m_AddRedirectInfo; + bool m_AddRedirectInfoIsSet; + bool m_MuteNotif; + bool m_MuteNotifIsSet; + std::string m_TrafficSteeringPolIdDl; + bool m_TrafficSteeringPolIdDlIsSet; + std::string m_TrafficSteeringPolIdUl; + bool m_TrafficSteeringPolIdUlIsSet; + std::vector<RouteToLocation> m_RouteToLocs; + bool m_RouteToLocsIsSet; + bool m_TraffCorreInd; + bool m_TraffCorreIndIsSet; + UpPathChgEvent m_UpPathChgEvent; + bool m_UpPathChgEventIsSet; + SteeringFunctionality m_SteerFun; + bool m_SteerFunIsSet; + SteeringMode m_SteerModeDl; + bool m_SteerModeDlIsSet; + SteeringMode m_SteerModeUl; + bool m_SteerModeUlIsSet; + MulticastAccessControl m_MulAccCtrl; + bool m_MulAccCtrlIsSet; }; } // namespace model diff --git a/src/api-server/model/TransportProtocol.cpp b/src/api-server/model/TransportProtocol.cpp old mode 100755 new mode 100644 index 377399a..4cfbdb1 --- a/src/api-server/model/TransportProtocol.cpp +++ b/src/api-server/model/TransportProtocol.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,80 +20,67 @@ namespace oai { namespace pcf { namespace model { -TransportProtocol::TransportProtocol() -{ - -} +TransportProtocol::TransportProtocol() {} -void TransportProtocol::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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::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 + + getValue() == rhs.getValue(); } -bool TransportProtocol::operator!=(const TransportProtocol& rhs) const -{ - return !(*this == rhs); +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 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); +void from_json(const nlohmann::json& j, TransportProtocol& o) { + from_json(j, o.m_value); } -TransportProtocol_anyOf TransportProtocol::getValue() const -{ - return m_value; +TransportProtocol_anyOf TransportProtocol::getValue() const { + return m_value; } -void TransportProtocol::setValue(TransportProtocol_anyOf value) -{ - m_value = value; +void TransportProtocol::setValue(TransportProtocol_anyOf value) { + m_value = value; } -TransportProtocol_anyOf::eTransportProtocol_anyOf TransportProtocol::getEnumValue() const -{ - return m_value.getValue(); +TransportProtocol_anyOf::eTransportProtocol_anyOf +TransportProtocol::getEnumValue() const { + return m_value.getValue(); } -void TransportProtocol::setEnumValue(TransportProtocol_anyOf::eTransportProtocol_anyOf value) -{ - m_value.setValue(value); +void TransportProtocol::setEnumValue( + TransportProtocol_anyOf::eTransportProtocol_anyOf value) { + m_value.setValue(value); } } // namespace model diff --git a/src/api-server/model/TransportProtocol.h b/src/api-server/model/TransportProtocol.h old mode 100755 new mode 100644 index b7df6cb..e9ef8ef --- a/src/api-server/model/TransportProtocol.h +++ b/src/api-server/model/TransportProtocol.h @@ -1,24 +1,25 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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. + * 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> @@ -27,49 +28,49 @@ namespace pcf { namespace model { /// <summary> -/// Possible values are - UDP: User Datagram Protocol. - TCP: Transmission Control Protocol. +/// Possible values are - UDP: User Datagram Protocol. - TCP: Transmission +/// Control Protocol. /// </summary> -class TransportProtocol -{ -public: - TransportProtocol(); - virtual ~TransportProtocol() = default; - +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. 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> + /// 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; + /// <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; + bool operator==(const TransportProtocol& rhs) const; + bool operator!=(const TransportProtocol& rhs) const; - ///////////////////////////////////////////// - /// TransportProtocol members + ///////////////////////////////////////////// + /// 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); - 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; + protected: + TransportProtocol_anyOf m_value; }; } // namespace model diff --git a/src/api-server/model/TransportProtocol_anyOf.cpp b/src/api-server/model/TransportProtocol_anyOf.cpp old mode 100755 new mode 100644 index 94b15e0..43a0f69 --- a/src/api-server/model/TransportProtocol_anyOf.cpp +++ b/src/api-server/model/TransportProtocol_anyOf.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,97 +20,86 @@ namespace oai { namespace pcf { namespace model { -TransportProtocol_anyOf::TransportProtocol_anyOf() -{ - -} +TransportProtocol_anyOf::TransportProtocol_anyOf() {} -void TransportProtocol_anyOf::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +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 { + 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; +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;"; - } + if (m_value == TransportProtocol_anyOf::eTransportProtocol_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED) { + success = false; + msg << _pathPrefix << ": has no value;"; + } - return success; + 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 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; - } +bool TransportProtocol_anyOf::operator!=( + const TransportProtocol_anyOf& rhs) const { + return !(*this == rhs); } -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()); - } +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; +TransportProtocol_anyOf::eTransportProtocol_anyOf +TransportProtocol_anyOf::getValue() const { + return m_value; } -void TransportProtocol_anyOf::setValue(TransportProtocol_anyOf::eTransportProtocol_anyOf value) -{ - m_value = value; +void TransportProtocol_anyOf::setValue( + TransportProtocol_anyOf::eTransportProtocol_anyOf value) { + m_value = value; } } // namespace model diff --git a/src/api-server/model/TransportProtocol_anyOf.h b/src/api-server/model/TransportProtocol_anyOf.h old mode 100755 new mode 100644 index b0cbdde..f41ed81 --- a/src/api-server/model/TransportProtocol_anyOf.h +++ b/src/api-server/model/TransportProtocol_anyOf.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 { @@ -26,53 +26,56 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class TransportProtocol_anyOf -{ -public: - TransportProtocol_anyOf(); - virtual ~TransportProtocol_anyOf() = default; +class TransportProtocol_anyOf { + public: + TransportProtocol_anyOf(); + virtual ~TransportProtocol_anyOf() = default; - enum class eTransportProtocol_anyOf { + enum class eTransportProtocol_anyOf { // To have a valid default value. // Avoiding name clashes with user defined // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, - UDP, + 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> - /// Validate the current data in the model. Throws a ValidationException on failure. - /// </summary> - void validate() 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; - /// <summary> - /// Validate the current data in the model. Returns false on error and writes an error - /// message into the given stringstream. - /// </summary> - bool validate(std::stringstream& msg) const; + bool operator==(const TransportProtocol_anyOf& rhs) const; + bool operator!=(const TransportProtocol_anyOf& rhs) 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; + ///////////////////////////////////////////// + /// TransportProtocol_anyOf members - bool operator==(const TransportProtocol_anyOf& rhs) const; - bool operator!=(const TransportProtocol_anyOf& rhs) const; + TransportProtocol_anyOf::eTransportProtocol_anyOf getValue() const; + void setValue(TransportProtocol_anyOf::eTransportProtocol_anyOf value); - ///////////////////////////////////////////// - /// TransportProtocol_anyOf members + friend void to_json(nlohmann::json& j, const TransportProtocol_anyOf& o); + friend void from_json(const nlohmann::json& j, TransportProtocol_anyOf& o); - 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; + protected: + TransportProtocol_anyOf::eTransportProtocol_anyOf m_value = + TransportProtocol_anyOf::eTransportProtocol_anyOf:: + INVALID_VALUE_OPENAPI_GENERATED; }; } // namespace model diff --git a/src/api-server/model/TscaiInputContainer.cpp b/src/api-server/model/TscaiInputContainer.cpp old mode 100755 new mode 100644 index 77907ea..698bddf --- a/src/api-server/model/TscaiInputContainer.cpp +++ b/src/api-server/model/TscaiInputContainer.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,131 +20,105 @@ 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()); - } +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 { + 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; +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;"; - } + 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; + } + + 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 diff --git a/src/api-server/model/TscaiInputContainer.h b/src/api-server/model/TscaiInputContainer.h old mode 100755 new mode 100644 index 3a524b2..8d7f1e2 --- a/src/api-server/model/TscaiInputContainer.h +++ b/src/api-server/model/TscaiInputContainer.h @@ -1,14 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 * @@ -18,7 +19,6 @@ #ifndef TscaiInputContainer_H_ #define TscaiInputContainer_H_ - #include <string> #include <nlohmann/json.hpp> @@ -29,59 +29,58 @@ namespace model { /// <summary> /// Indicates TSC Traffic pattern. /// </summary> -class TscaiInputContainer -{ -public: - TscaiInputContainer(); - virtual ~TscaiInputContainer() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const TscaiInputContainer& rhs) const; - bool operator!=(const TscaiInputContainer& rhs) const; + ///////////////////////////////////////////// + /// TscaiInputContainer members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; - + protected: + int32_t m_Periodicity; + bool m_PeriodicityIsSet; + std::string m_BurstArrivalTime; + bool m_BurstArrivalTimeIsSet; }; } // namespace model diff --git a/src/api-server/model/TsnBridgeInfo.cpp b/src/api-server/model/TsnBridgeInfo.cpp old mode 100755 new mode 100644 index 6871c52..41ee03a --- a/src/api-server/model/TsnBridgeInfo.cpp +++ b/src/api-server/model/TsnBridgeInfo.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,252 +20,205 @@ 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; - +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()); - } +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 { + 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; +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 (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 (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;"; - } + } + 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; + } + + 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 + + ((!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); +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 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; - } - +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; +std::string TsnBridgeInfo::getBridgeName() const { + return m_BridgeName; } -void TsnBridgeInfo::setBridgeName(std::string const& value) -{ - m_BridgeName = value; - m_BridgeNameIsSet = true; +void TsnBridgeInfo::setBridgeName(std::string const& value) { + m_BridgeName = value; + m_BridgeNameIsSet = true; } -bool TsnBridgeInfo::bridgeNameIsSet() const -{ - return m_BridgeNameIsSet; +bool TsnBridgeInfo::bridgeNameIsSet() const { + return m_BridgeNameIsSet; } -void TsnBridgeInfo::unsetBridgeName() -{ - m_BridgeNameIsSet = false; +void TsnBridgeInfo::unsetBridgeName() { + m_BridgeNameIsSet = false; } -std::string TsnBridgeInfo::getBridgeMac() const -{ - return m_BridgeMac; +std::string TsnBridgeInfo::getBridgeMac() const { + return m_BridgeMac; } -void TsnBridgeInfo::setBridgeMac(std::string const& value) -{ - m_BridgeMac = value; - m_BridgeMacIsSet = true; +void TsnBridgeInfo::setBridgeMac(std::string const& value) { + m_BridgeMac = value; + m_BridgeMacIsSet = true; } -bool TsnBridgeInfo::bridgeMacIsSet() const -{ - return m_BridgeMacIsSet; +bool TsnBridgeInfo::bridgeMacIsSet() const { + return m_BridgeMacIsSet; } -void TsnBridgeInfo::unsetBridgeMac() -{ - m_BridgeMacIsSet = false; +void TsnBridgeInfo::unsetBridgeMac() { + m_BridgeMacIsSet = false; } -std::vector<TsnPortIdentifier> TsnBridgeInfo::getNwttPorts() const -{ - return m_NwttPorts; +std::vector<TsnPortIdentifier> TsnBridgeInfo::getNwttPorts() const { + return m_NwttPorts; } -void TsnBridgeInfo::setNwttPorts(std::vector<TsnPortIdentifier> const& value) -{ - m_NwttPorts = value; - m_NwttPortsIsSet = true; +void TsnBridgeInfo::setNwttPorts(std::vector<TsnPortIdentifier> const& value) { + m_NwttPorts = value; + m_NwttPortsIsSet = true; } -bool TsnBridgeInfo::nwttPortsIsSet() const -{ - return m_NwttPortsIsSet; +bool TsnBridgeInfo::nwttPortsIsSet() const { + return m_NwttPortsIsSet; } -void TsnBridgeInfo::unsetNwttPorts() -{ - m_NwttPortsIsSet = false; +void TsnBridgeInfo::unsetNwttPorts() { + m_NwttPortsIsSet = false; } -TsnPortIdentifier TsnBridgeInfo::getDsttPort() const -{ - return m_DsttPort; +TsnPortIdentifier TsnBridgeInfo::getDsttPort() const { + return m_DsttPort; } -void TsnBridgeInfo::setDsttPort(TsnPortIdentifier const& value) -{ - m_DsttPort = value; - m_DsttPortIsSet = true; +void TsnBridgeInfo::setDsttPort(TsnPortIdentifier const& value) { + m_DsttPort = value; + m_DsttPortIsSet = true; } -bool TsnBridgeInfo::dsttPortIsSet() const -{ - return m_DsttPortIsSet; +bool TsnBridgeInfo::dsttPortIsSet() const { + return m_DsttPortIsSet; } -void TsnBridgeInfo::unsetDsttPort() -{ - m_DsttPortIsSet = false; +void TsnBridgeInfo::unsetDsttPort() { + m_DsttPortIsSet = false; } -int32_t TsnBridgeInfo::getDsttResidTime() const -{ - return m_DsttResidTime; +int32_t TsnBridgeInfo::getDsttResidTime() const { + return m_DsttResidTime; } -void TsnBridgeInfo::setDsttResidTime(int32_t const value) -{ - m_DsttResidTime = value; - m_DsttResidTimeIsSet = true; +void TsnBridgeInfo::setDsttResidTime(int32_t const value) { + m_DsttResidTime = value; + m_DsttResidTimeIsSet = true; } -bool TsnBridgeInfo::dsttResidTimeIsSet() const -{ - return m_DsttResidTimeIsSet; +bool TsnBridgeInfo::dsttResidTimeIsSet() const { + return m_DsttResidTimeIsSet; } -void TsnBridgeInfo::unsetDsttResidTime() -{ - m_DsttResidTimeIsSet = false; +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 old mode 100755 new mode 100644 index 26d62be..dd25e22 --- a/src/api-server/model/TsnBridgeInfo.h +++ b/src/api-server/model/TsnBridgeInfo.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -29,88 +29,87 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class TsnBridgeInfo -{ -public: - TsnBridgeInfo(); - virtual ~TsnBridgeInfo() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const TsnBridgeInfo& rhs) const; - bool operator!=(const TsnBridgeInfo& rhs) const; + ///////////////////////////////////////////// + /// TsnBridgeInfo members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; - + 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 diff --git a/src/api-server/model/TsnPortIdentifier.cpp b/src/api-server/model/TsnPortIdentifier.cpp old mode 100755 new mode 100644 index 67c3d85..7ee328a --- a/src/api-server/model/TsnPortIdentifier.cpp +++ b/src/api-server/model/TsnPortIdentifier.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,126 +20,98 @@ namespace oai { namespace pcf { namespace model { -TsnPortIdentifier::TsnPortIdentifier() -{ - m_PortMac = ""; - m_PortNumber = 0; - m_PortNumberIsSet = false; - +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()); - } +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 { + 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; +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"; - - + /* 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;"; - } + 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; + } + + 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 + + (getPortMac() == rhs.getPortMac()) && + + ((!portNumberIsSet() && !rhs.portNumberIsSet()) || + (portNumberIsSet() && rhs.portNumberIsSet() && + getPortNumber() == rhs.getPortNumber())) + + ; } -bool TsnPortIdentifier::operator!=(const TsnPortIdentifier& rhs) const -{ - return !(*this == rhs); +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 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; - } - +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; +std::string TsnPortIdentifier::getPortMac() const { + return m_PortMac; } -void TsnPortIdentifier::setPortMac(std::string const& value) -{ - m_PortMac = value; +void TsnPortIdentifier::setPortMac(std::string const& value) { + m_PortMac = value; } -int32_t TsnPortIdentifier::getPortNumber() const -{ - return m_PortNumber; +int32_t TsnPortIdentifier::getPortNumber() const { + return m_PortNumber; } -void TsnPortIdentifier::setPortNumber(int32_t const value) -{ - m_PortNumber = value; - m_PortNumberIsSet = true; +void TsnPortIdentifier::setPortNumber(int32_t const value) { + m_PortNumber = value; + m_PortNumberIsSet = true; } -bool TsnPortIdentifier::portNumberIsSet() const -{ - return m_PortNumberIsSet; +bool TsnPortIdentifier::portNumberIsSet() const { + return m_PortNumberIsSet; } -void TsnPortIdentifier::unsetPortNumber() -{ - m_PortNumberIsSet = false; +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 old mode 100755 new mode 100644 index 73c681f..f6de11e --- a/src/api-server/model/TsnPortIdentifier.h +++ b/src/api-server/model/TsnPortIdentifier.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -27,59 +27,58 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class TsnPortIdentifier -{ -public: - TsnPortIdentifier(); - virtual ~TsnPortIdentifier() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const TsnPortIdentifier& rhs) const; - bool operator!=(const TsnPortIdentifier& rhs) const; + ///////////////////////////////////////////// + /// TsnPortIdentifier members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; + protected: + std::string m_PortMac; - int32_t m_PortNumber; - bool m_PortNumberIsSet; - + int32_t m_PortNumber; + bool m_PortNumberIsSet; }; } // namespace model diff --git a/src/api-server/model/TwapId.cpp b/src/api-server/model/TwapId.cpp old mode 100755 new mode 100644 index 0fbb338..da8ab12 --- a/src/api-server/model/TwapId.cpp +++ b/src/api-server/model/TwapId.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "TwapId.h" #include "Helpers.h" @@ -20,130 +20,103 @@ namespace oai { namespace pcf { namespace model { -TwapId::TwapId() -{ - m_SsId = ""; - m_BssId = ""; - m_BssIdIsSet = false; - m_CivicAddressIsSet = false; - -} - -void TwapId::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool TwapId::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool TwapId::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "TwapId" : pathPrefix; - - - return success; -} - -bool TwapId::operator==(const TwapId& rhs) const -{ - return - - - (getSsId() == rhs.getSsId()) - && - - - ((!bssIdIsSet() && !rhs.bssIdIsSet()) || (bssIdIsSet() && rhs.bssIdIsSet() && getBssId() == rhs.getBssId())) && - - - ((!civicAddressIsSet() && !rhs.civicAddressIsSet()) || (civicAddressIsSet() && rhs.civicAddressIsSet() && getCivicAddress() == rhs.getCivicAddress())) - - ; -} - -bool TwapId::operator!=(const TwapId& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const TwapId& o) -{ - j = nlohmann::json(); - j["ssId"] = o.m_SsId; - if(o.bssIdIsSet()) - j["bssId"] = o.m_BssId; - if(o.civicAddressIsSet()) - j["civicAddress"] = o.m_CivicAddress; - -} - -void from_json(const nlohmann::json& j, TwapId& o) -{ - j.at("ssId").get_to(o.m_SsId); - if(j.find("bssId") != j.end()) - { - j.at("bssId").get_to(o.m_BssId); - o.m_BssIdIsSet = true; - } - if(j.find("civicAddress") != j.end()) - { - j.at("civicAddress").get_to(o.m_CivicAddress); - o.m_CivicAddressIsSet = true; - } - -} - -std::string TwapId::getSsId() const -{ - return m_SsId; -} -void TwapId::setSsId(std::string const& value) -{ - m_SsId = value; -} -std::string TwapId::getBssId() const -{ - return m_BssId; -} -void TwapId::setBssId(std::string const& value) -{ - m_BssId = value; - m_BssIdIsSet = true; -} -bool TwapId::bssIdIsSet() const -{ - return m_BssIdIsSet; -} -void TwapId::unsetBssId() -{ - m_BssIdIsSet = false; -} -std::string TwapId::getCivicAddress() const -{ - return m_CivicAddress; -} -void TwapId::setCivicAddress(std::string const& value) -{ - m_CivicAddress = value; - m_CivicAddressIsSet = true; -} -bool TwapId::civicAddressIsSet() const -{ - return m_CivicAddressIsSet; -} -void TwapId::unsetCivicAddress() -{ - m_CivicAddressIsSet = false; +TwapId::TwapId() { + m_SsId = ""; + m_BssId = ""; + m_BssIdIsSet = false; + m_CivicAddressIsSet = false; +} + +void TwapId::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool TwapId::validate(std::stringstream& msg) const { + return validate(msg, ""); +} + +bool TwapId::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "TwapId" : pathPrefix; + + return success; +} + +bool TwapId::operator==(const TwapId& rhs) const { + return + + (getSsId() == rhs.getSsId()) && + + ((!bssIdIsSet() && !rhs.bssIdIsSet()) || + (bssIdIsSet() && rhs.bssIdIsSet() && getBssId() == rhs.getBssId())) && + + ((!civicAddressIsSet() && !rhs.civicAddressIsSet()) || + (civicAddressIsSet() && rhs.civicAddressIsSet() && + getCivicAddress() == rhs.getCivicAddress())) + + ; +} + +bool TwapId::operator!=(const TwapId& rhs) const { + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const TwapId& o) { + j = nlohmann::json(); + j["ssId"] = o.m_SsId; + if (o.bssIdIsSet()) j["bssId"] = o.m_BssId; + if (o.civicAddressIsSet()) j["civicAddress"] = o.m_CivicAddress; +} + +void from_json(const nlohmann::json& j, TwapId& o) { + j.at("ssId").get_to(o.m_SsId); + if (j.find("bssId") != j.end()) { + j.at("bssId").get_to(o.m_BssId); + o.m_BssIdIsSet = true; + } + if (j.find("civicAddress") != j.end()) { + j.at("civicAddress").get_to(o.m_CivicAddress); + o.m_CivicAddressIsSet = true; + } } +std::string TwapId::getSsId() const { + return m_SsId; +} +void TwapId::setSsId(std::string const& value) { + m_SsId = value; +} +std::string TwapId::getBssId() const { + return m_BssId; +} +void TwapId::setBssId(std::string const& value) { + m_BssId = value; + m_BssIdIsSet = true; +} +bool TwapId::bssIdIsSet() const { + return m_BssIdIsSet; +} +void TwapId::unsetBssId() { + m_BssIdIsSet = false; +} +std::string TwapId::getCivicAddress() const { + return m_CivicAddress; +} +void TwapId::setCivicAddress(std::string const& value) { + m_CivicAddress = value; + m_CivicAddressIsSet = true; +} +bool TwapId::civicAddressIsSet() const { + return m_CivicAddressIsSet; +} +void TwapId::unsetCivicAddress() { + m_CivicAddressIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/TwapId.h b/src/api-server/model/TwapId.h old mode 100755 new mode 100644 index 5527eff..b789f89 --- a/src/api-server/model/TwapId.h +++ b/src/api-server/model/TwapId.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * TwapId.h * - * + * */ #ifndef TwapId_H_ #define TwapId_H_ - #include <string> #include <nlohmann/json.hpp> @@ -27,68 +27,67 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class TwapId -{ -public: - TwapId(); - virtual ~TwapId() = default; +class TwapId { + public: + TwapId(); + virtual ~TwapId() = 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. 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> - /// 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; - /// <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 TwapId& rhs) const; + bool operator!=(const TwapId& rhs) const; - bool operator==(const TwapId& rhs) const; - bool operator!=(const TwapId& rhs) const; + ///////////////////////////////////////////// + /// TwapId members - ///////////////////////////////////////////// - /// TwapId members + /// <summary> + /// + /// </summary> + std::string getSsId() const; + void setSsId(std::string const& value); + /// <summary> + /// + /// </summary> + std::string getBssId() const; + void setBssId(std::string const& value); + bool bssIdIsSet() const; + void unsetBssId(); + /// <summary> + /// + /// </summary> + std::string getCivicAddress() const; + void setCivicAddress(std::string const& value); + bool civicAddressIsSet() const; + void unsetCivicAddress(); - /// <summary> - /// - /// </summary> - std::string getSsId() const; - void setSsId(std::string const& value); - /// <summary> - /// - /// </summary> - std::string getBssId() const; - void setBssId(std::string const& value); - bool bssIdIsSet() const; - void unsetBssId(); - /// <summary> - /// - /// </summary> - std::string getCivicAddress() const; - void setCivicAddress(std::string const& value); - bool civicAddressIsSet() const; - void unsetCivicAddress(); + friend void to_json(nlohmann::json& j, const TwapId& o); + friend void from_json(const nlohmann::json& j, TwapId& o); - friend void to_json(nlohmann::json& j, const TwapId& o); - friend void from_json(const nlohmann::json& j, TwapId& o); -protected: - std::string m_SsId; + protected: + std::string m_SsId; - std::string m_BssId; - bool m_BssIdIsSet; - std::string m_CivicAddress; - bool m_CivicAddressIsSet; - + std::string m_BssId; + bool m_BssIdIsSet; + std::string m_CivicAddress; + bool m_CivicAddressIsSet; }; } // namespace model diff --git a/src/api-server/model/UeCampingRep.cpp b/src/api-server/model/UeCampingRep.cpp old mode 100755 new mode 100644 index 0a35f40..7d2a62e --- a/src/api-server/model/UeCampingRep.cpp +++ b/src/api-server/model/UeCampingRep.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,228 +20,186 @@ namespace oai { namespace pcf { namespace model { -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; +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::ueTimeZoneIsSet() const -{ - return m_UeTimeZoneIsSet; + +bool UeCampingRep::validate(std::stringstream& msg) const { + return validate(msg, ""); } -void UeCampingRep::unsetUeTimeZone() -{ - m_UeTimeZoneIsSet = false; + +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 diff --git a/src/api-server/model/UeCampingRep.h b/src/api-server/model/UeCampingRep.h old mode 100755 new mode 100644 index 856296c..d9099e2 --- a/src/api-server/model/UeCampingRep.h +++ b/src/api-server/model/UeCampingRep.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -32,97 +32,96 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class UeCampingRep -{ -public: - UeCampingRep(); - virtual ~UeCampingRep() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const UeCampingRep& rhs) const; - bool operator!=(const UeCampingRep& rhs) const; + ///////////////////////////////////////////// + /// UeCampingRep members - ///////////////////////////////////////////// - /// UeCampingRep members + /// <summary> + /// + /// </summary> + AccessType getAccessType() const; + void setAccessType(AccessType const& value); + bool accessTypeIsSet() const; + void unsetAccessType(); + /// <summary> + /// + /// </summary> + RatType getRatType() const; + void setRatType(RatType const& value); + bool ratTypeIsSet() const; + void unsetRatType(); + /// <summary> + /// + /// </summary> + ServingNfIdentity getServNfId() const; + void setServNfId(ServingNfIdentity const& value); + bool servNfIdIsSet() const; + void unsetServNfId(); + /// <summary> + /// + /// </summary> + PlmnIdNid getServingNetwork() const; + void setServingNetwork(PlmnIdNid const& value); + bool servingNetworkIsSet() const; + void unsetServingNetwork(); + /// <summary> + /// + /// </summary> + UserLocation getUserLocationInfo() const; + void setUserLocationInfo(UserLocation const& value); + bool userLocationInfoIsSet() const; + void unsetUserLocationInfo(); + /// <summary> + /// + /// </summary> + std::string getUeTimeZone() const; + void setUeTimeZone(std::string const& value); + bool ueTimeZoneIsSet() const; + void unsetUeTimeZone(); - /// <summary> - /// - /// </summary> - AccessType getAccessType() const; - void setAccessType(AccessType const& value); - bool accessTypeIsSet() const; - void unsetAccessType(); - /// <summary> - /// - /// </summary> - RatType getRatType() const; - void setRatType(RatType const& value); - bool ratTypeIsSet() const; - void unsetRatType(); - /// <summary> - /// - /// </summary> - ServingNfIdentity getServNfId() const; - void setServNfId(ServingNfIdentity const& value); - bool servNfIdIsSet() const; - void unsetServNfId(); - /// <summary> - /// - /// </summary> - PlmnIdNid getServingNetwork() const; - void setServingNetwork(PlmnIdNid const& value); - bool servingNetworkIsSet() const; - void unsetServingNetwork(); - /// <summary> - /// - /// </summary> - UserLocation getUserLocationInfo() const; - void setUserLocationInfo(UserLocation const& value); - bool userLocationInfoIsSet() const; - void unsetUserLocationInfo(); - /// <summary> - /// - /// </summary> - std::string getUeTimeZone() const; - void setUeTimeZone(std::string const& value); - bool ueTimeZoneIsSet() const; - void unsetUeTimeZone(); + friend void to_json(nlohmann::json& j, const UeCampingRep& o); + friend void from_json(const nlohmann::json& j, UeCampingRep& o); - friend void to_json(nlohmann::json& j, const UeCampingRep& o); - friend void from_json(const nlohmann::json& j, UeCampingRep& o); -protected: - AccessType m_AccessType; - bool m_AccessTypeIsSet; - RatType m_RatType; - bool m_RatTypeIsSet; - ServingNfIdentity m_ServNfId; - bool m_ServNfIdIsSet; - PlmnIdNid m_ServingNetwork; - bool m_ServingNetworkIsSet; - UserLocation m_UserLocationInfo; - bool m_UserLocationInfoIsSet; - std::string m_UeTimeZone; - bool m_UeTimeZoneIsSet; - + protected: + AccessType m_AccessType; + bool m_AccessTypeIsSet; + RatType m_RatType; + bool m_RatTypeIsSet; + ServingNfIdentity m_ServNfId; + bool m_ServNfIdIsSet; + PlmnIdNid m_ServingNetwork; + bool m_ServingNetworkIsSet; + UserLocation m_UserLocationInfo; + bool m_UserLocationInfoIsSet; + std::string m_UeTimeZone; + bool m_UeTimeZoneIsSet; }; } // namespace model diff --git a/src/api-server/model/UeInitiatedResourceRequest.cpp b/src/api-server/model/UeInitiatedResourceRequest.cpp old mode 100755 new mode 100644 index a130b30..bb4b46c --- a/src/api-server/model/UeInitiatedResourceRequest.cpp +++ b/src/api-server/model/UeInitiatedResourceRequest.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,197 +20,164 @@ 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()); - } +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 -{ - 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++; - } - } +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; + } + + 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 diff --git a/src/api-server/model/UeInitiatedResourceRequest.h b/src/api-server/model/UeInitiatedResourceRequest.h old mode 100755 new mode 100644 index fd91d1e..0d70bb1 --- a/src/api-server/model/UeInitiatedResourceRequest.h +++ b/src/api-server/model/UeInitiatedResourceRequest.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -31,84 +31,83 @@ 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; - +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 diff --git a/src/api-server/model/UpPathChgEvent.cpp b/src/api-server/model/UpPathChgEvent.cpp old mode 100755 new mode 100644 index 4ba77c0..944a01c --- a/src/api-server/model/UpPathChgEvent.cpp +++ b/src/api-server/model/UpPathChgEvent.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,129 +20,103 @@ namespace oai { namespace pcf { namespace model { -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; +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 diff --git a/src/api-server/model/UpPathChgEvent.h b/src/api-server/model/UpPathChgEvent.h old mode 100755 new mode 100644 index 12d71fd..c07fac4 --- a/src/api-server/model/UpPathChgEvent.h +++ b/src/api-server/model/UpPathChgEvent.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,73 +28,73 @@ 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> - DnaiChangeType getDnaiChgType() const; - void setDnaiChgType(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; - - DnaiChangeType m_DnaiChgType; - - bool m_AfAckInd; - bool m_AfAckIndIsSet; - +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> + DnaiChangeType getDnaiChgType() const; + void setDnaiChgType(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; + + DnaiChangeType m_DnaiChgType; + + bool m_AfAckInd; + bool m_AfAckIndIsSet; }; } // namespace model diff --git a/src/api-server/model/UsageMonitoringData.cpp b/src/api-server/model/UsageMonitoringData.cpp old mode 100755 new mode 100644 index e549b62..bd707a4 --- a/src/api-server/model/UsageMonitoringData.cpp +++ b/src/api-server/model/UsageMonitoringData.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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" @@ -20,501 +20,414 @@ 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()); - } +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; } -bool UsageMonitoringData::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +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 std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "UsageMonitoringData" : pathPrefix; +bool UsageMonitoringData::validate(std::stringstream& msg) const { + return validate(msg, ""); +} - - 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;"; - } +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 (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 (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 (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 (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 (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++; - } - } + } + + 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;"; } - - 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; + { // 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::inactivityTimeIsSet() const -{ - return m_InactivityTimeIsSet; + +bool UsageMonitoringData::operator!=(const UsageMonitoringData& rhs) const { + return !(*this == rhs); } -void UsageMonitoringData::unsetInactivityTime() -{ - m_InactivityTimeIsSet = false; + +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; } -std::vector<std::string> UsageMonitoringData::getExUsagePccRuleIds() const -{ - return 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; + } } -void UsageMonitoringData::setExUsagePccRuleIds(std::vector<std::string> const& value) -{ - m_ExUsagePccRuleIds = value; - m_ExUsagePccRuleIdsIsSet = true; + +std::string UsageMonitoringData::getUmId() const { + return m_UmId; } -bool UsageMonitoringData::exUsagePccRuleIdsIsSet() const -{ - return m_ExUsagePccRuleIdsIsSet; +void UsageMonitoringData::setUmId(std::string const& value) { + m_UmId = value; } -void UsageMonitoringData::unsetExUsagePccRuleIds() -{ - m_ExUsagePccRuleIdsIsSet = false; +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 diff --git a/src/api-server/model/UsageMonitoringData.h b/src/api-server/model/UsageMonitoringData.h old mode 100755 new mode 100644 index 1b8c7c3..0a9f881 --- a/src/api-server/model/UsageMonitoringData.h +++ b/src/api-server/model/UsageMonitoringData.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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> @@ -28,149 +28,158 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class UsageMonitoringData -{ -public: - UsageMonitoringData(); - virtual ~UsageMonitoringData() = default; +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. 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> - /// 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; - /// <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; - bool operator==(const UsageMonitoringData& rhs) const; - bool operator!=(const UsageMonitoringData& rhs) const; + ///////////////////////////////////////////// + /// UsageMonitoringData members - ///////////////////////////////////////////// - /// 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(); - /// <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); - 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; + 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; - + 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 diff --git a/src/api-server/model/UserLocation.cpp b/src/api-server/model/UserLocation.cpp old mode 100755 new mode 100644 index 95afc67..9c85400 --- a/src/api-server/model/UserLocation.cpp +++ b/src/api-server/model/UserLocation.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "UserLocation.h" #include "Helpers.h" @@ -20,199 +20,162 @@ namespace oai { namespace pcf { namespace model { -UserLocation::UserLocation() -{ - m_EutraLocationIsSet = false; - m_NrLocationIsSet = false; - m_N3gaLocationIsSet = false; - m_UtraLocationIsSet = false; - m_GeraLocationIsSet = false; - -} - -void UserLocation::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool UserLocation::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool UserLocation::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "UserLocation" : pathPrefix; - - - return success; -} - -bool UserLocation::operator==(const UserLocation& rhs) const -{ - return - - - - ((!eutraLocationIsSet() && !rhs.eutraLocationIsSet()) || (eutraLocationIsSet() && rhs.eutraLocationIsSet() && getEutraLocation() == rhs.getEutraLocation())) && - - - ((!nrLocationIsSet() && !rhs.nrLocationIsSet()) || (nrLocationIsSet() && rhs.nrLocationIsSet() && getNrLocation() == rhs.getNrLocation())) && - - - ((!n3gaLocationIsSet() && !rhs.n3gaLocationIsSet()) || (n3gaLocationIsSet() && rhs.n3gaLocationIsSet() && getN3gaLocation() == rhs.getN3gaLocation())) && - - - ((!utraLocationIsSet() && !rhs.utraLocationIsSet()) || (utraLocationIsSet() && rhs.utraLocationIsSet() && getUtraLocation() == rhs.getUtraLocation())) && - - - ((!geraLocationIsSet() && !rhs.geraLocationIsSet()) || (geraLocationIsSet() && rhs.geraLocationIsSet() && getGeraLocation() == rhs.getGeraLocation())) - - ; -} - -bool UserLocation::operator!=(const UserLocation& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const UserLocation& o) -{ - j = nlohmann::json(); - if(o.eutraLocationIsSet()) - j["eutraLocation"] = o.m_EutraLocation; - if(o.nrLocationIsSet()) - j["nrLocation"] = o.m_NrLocation; - if(o.n3gaLocationIsSet()) - j["n3gaLocation"] = o.m_N3gaLocation; - if(o.utraLocationIsSet()) - j["utraLocation"] = o.m_UtraLocation; - if(o.geraLocationIsSet()) - j["geraLocation"] = o.m_GeraLocation; - -} - -void from_json(const nlohmann::json& j, UserLocation& o) -{ - if(j.find("eutraLocation") != j.end()) - { - j.at("eutraLocation").get_to(o.m_EutraLocation); - o.m_EutraLocationIsSet = true; - } - if(j.find("nrLocation") != j.end()) - { - j.at("nrLocation").get_to(o.m_NrLocation); - o.m_NrLocationIsSet = true; - } - if(j.find("n3gaLocation") != j.end()) - { - j.at("n3gaLocation").get_to(o.m_N3gaLocation); - o.m_N3gaLocationIsSet = true; - } - if(j.find("utraLocation") != j.end()) - { - j.at("utraLocation").get_to(o.m_UtraLocation); - o.m_UtraLocationIsSet = true; - } - if(j.find("geraLocation") != j.end()) - { - j.at("geraLocation").get_to(o.m_GeraLocation); - o.m_GeraLocationIsSet = true; - } - -} - -EutraLocation UserLocation::getEutraLocation() const -{ - return m_EutraLocation; -} -void UserLocation::setEutraLocation(EutraLocation const& value) -{ - m_EutraLocation = value; - m_EutraLocationIsSet = true; -} -bool UserLocation::eutraLocationIsSet() const -{ - return m_EutraLocationIsSet; -} -void UserLocation::unsetEutraLocation() -{ - m_EutraLocationIsSet = false; -} -NrLocation UserLocation::getNrLocation() const -{ - return m_NrLocation; -} -void UserLocation::setNrLocation(NrLocation const& value) -{ - m_NrLocation = value; - m_NrLocationIsSet = true; -} -bool UserLocation::nrLocationIsSet() const -{ - return m_NrLocationIsSet; -} -void UserLocation::unsetNrLocation() -{ - m_NrLocationIsSet = false; -} -N3gaLocation UserLocation::getN3gaLocation() const -{ - return m_N3gaLocation; -} -void UserLocation::setN3gaLocation(N3gaLocation const& value) -{ - m_N3gaLocation = value; - m_N3gaLocationIsSet = true; -} -bool UserLocation::n3gaLocationIsSet() const -{ - return m_N3gaLocationIsSet; -} -void UserLocation::unsetN3gaLocation() -{ - m_N3gaLocationIsSet = false; -} -UtraLocation UserLocation::getUtraLocation() const -{ - return m_UtraLocation; -} -void UserLocation::setUtraLocation(UtraLocation const& value) -{ - m_UtraLocation = value; - m_UtraLocationIsSet = true; -} -bool UserLocation::utraLocationIsSet() const -{ - return m_UtraLocationIsSet; -} -void UserLocation::unsetUtraLocation() -{ - m_UtraLocationIsSet = false; -} -GeraLocation UserLocation::getGeraLocation() const -{ - return m_GeraLocation; -} -void UserLocation::setGeraLocation(GeraLocation const& value) -{ - m_GeraLocation = value; - m_GeraLocationIsSet = true; -} -bool UserLocation::geraLocationIsSet() const -{ - return m_GeraLocationIsSet; -} -void UserLocation::unsetGeraLocation() -{ - m_GeraLocationIsSet = false; +UserLocation::UserLocation() { + m_EutraLocationIsSet = false; + m_NrLocationIsSet = false; + m_N3gaLocationIsSet = false; + m_UtraLocationIsSet = false; + m_GeraLocationIsSet = false; +} + +void UserLocation::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool UserLocation::validate(std::stringstream& msg) const { + return validate(msg, ""); +} + +bool UserLocation::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "UserLocation" : pathPrefix; + + return success; +} + +bool UserLocation::operator==(const UserLocation& rhs) const { + return + + ((!eutraLocationIsSet() && !rhs.eutraLocationIsSet()) || + (eutraLocationIsSet() && rhs.eutraLocationIsSet() && + getEutraLocation() == rhs.getEutraLocation())) && + + ((!nrLocationIsSet() && !rhs.nrLocationIsSet()) || + (nrLocationIsSet() && rhs.nrLocationIsSet() && + getNrLocation() == rhs.getNrLocation())) && + + ((!n3gaLocationIsSet() && !rhs.n3gaLocationIsSet()) || + (n3gaLocationIsSet() && rhs.n3gaLocationIsSet() && + getN3gaLocation() == rhs.getN3gaLocation())) && + + ((!utraLocationIsSet() && !rhs.utraLocationIsSet()) || + (utraLocationIsSet() && rhs.utraLocationIsSet() && + getUtraLocation() == rhs.getUtraLocation())) && + + ((!geraLocationIsSet() && !rhs.geraLocationIsSet()) || + (geraLocationIsSet() && rhs.geraLocationIsSet() && + getGeraLocation() == rhs.getGeraLocation())) + + ; +} + +bool UserLocation::operator!=(const UserLocation& rhs) const { + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const UserLocation& o) { + j = nlohmann::json(); + if (o.eutraLocationIsSet()) j["eutraLocation"] = o.m_EutraLocation; + if (o.nrLocationIsSet()) j["nrLocation"] = o.m_NrLocation; + if (o.n3gaLocationIsSet()) j["n3gaLocation"] = o.m_N3gaLocation; + if (o.utraLocationIsSet()) j["utraLocation"] = o.m_UtraLocation; + if (o.geraLocationIsSet()) j["geraLocation"] = o.m_GeraLocation; +} + +void from_json(const nlohmann::json& j, UserLocation& o) { + if (j.find("eutraLocation") != j.end()) { + j.at("eutraLocation").get_to(o.m_EutraLocation); + o.m_EutraLocationIsSet = true; + } + if (j.find("nrLocation") != j.end()) { + j.at("nrLocation").get_to(o.m_NrLocation); + o.m_NrLocationIsSet = true; + } + if (j.find("n3gaLocation") != j.end()) { + j.at("n3gaLocation").get_to(o.m_N3gaLocation); + o.m_N3gaLocationIsSet = true; + } + if (j.find("utraLocation") != j.end()) { + j.at("utraLocation").get_to(o.m_UtraLocation); + o.m_UtraLocationIsSet = true; + } + if (j.find("geraLocation") != j.end()) { + j.at("geraLocation").get_to(o.m_GeraLocation); + o.m_GeraLocationIsSet = true; + } } +EutraLocation UserLocation::getEutraLocation() const { + return m_EutraLocation; +} +void UserLocation::setEutraLocation(EutraLocation const& value) { + m_EutraLocation = value; + m_EutraLocationIsSet = true; +} +bool UserLocation::eutraLocationIsSet() const { + return m_EutraLocationIsSet; +} +void UserLocation::unsetEutraLocation() { + m_EutraLocationIsSet = false; +} +NrLocation UserLocation::getNrLocation() const { + return m_NrLocation; +} +void UserLocation::setNrLocation(NrLocation const& value) { + m_NrLocation = value; + m_NrLocationIsSet = true; +} +bool UserLocation::nrLocationIsSet() const { + return m_NrLocationIsSet; +} +void UserLocation::unsetNrLocation() { + m_NrLocationIsSet = false; +} +N3gaLocation UserLocation::getN3gaLocation() const { + return m_N3gaLocation; +} +void UserLocation::setN3gaLocation(N3gaLocation const& value) { + m_N3gaLocation = value; + m_N3gaLocationIsSet = true; +} +bool UserLocation::n3gaLocationIsSet() const { + return m_N3gaLocationIsSet; +} +void UserLocation::unsetN3gaLocation() { + m_N3gaLocationIsSet = false; +} +UtraLocation UserLocation::getUtraLocation() const { + return m_UtraLocation; +} +void UserLocation::setUtraLocation(UtraLocation const& value) { + m_UtraLocation = value; + m_UtraLocationIsSet = true; +} +bool UserLocation::utraLocationIsSet() const { + return m_UtraLocationIsSet; +} +void UserLocation::unsetUtraLocation() { + m_UtraLocationIsSet = false; +} +GeraLocation UserLocation::getGeraLocation() const { + return m_GeraLocation; +} +void UserLocation::setGeraLocation(GeraLocation const& value) { + m_GeraLocation = value; + m_GeraLocationIsSet = true; +} +bool UserLocation::geraLocationIsSet() const { + return m_GeraLocationIsSet; +} +void UserLocation::unsetGeraLocation() { + m_GeraLocationIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/UserLocation.h b/src/api-server/model/UserLocation.h old mode 100755 new mode 100644 index 90c5dc1..8796d8f --- a/src/api-server/model/UserLocation.h +++ b/src/api-server/model/UserLocation.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * UserLocation.h * - * + * */ #ifndef UserLocation_H_ #define UserLocation_H_ - #include "EutraLocation.h" #include "GeraLocation.h" #include "NrLocation.h" @@ -31,88 +31,87 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class UserLocation -{ -public: - UserLocation(); - virtual ~UserLocation() = default; +class UserLocation { + public: + UserLocation(); + virtual ~UserLocation() = 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. 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> - /// 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; - /// <summary> - /// Helper overload for validate. Used when one model stores another model and calls it's validate. - /// Not meant to be called outside that case. - /// </summary> - bool validate(std::stringstream& msg, const std::string& pathPrefix) const; + bool operator==(const UserLocation& rhs) const; + bool operator!=(const UserLocation& rhs) const; - bool operator==(const UserLocation& rhs) const; - bool operator!=(const UserLocation& rhs) const; + ///////////////////////////////////////////// + /// UserLocation members - ///////////////////////////////////////////// - /// UserLocation members + /// <summary> + /// + /// </summary> + EutraLocation getEutraLocation() const; + void setEutraLocation(EutraLocation const& value); + bool eutraLocationIsSet() const; + void unsetEutraLocation(); + /// <summary> + /// + /// </summary> + NrLocation getNrLocation() const; + void setNrLocation(NrLocation const& value); + bool nrLocationIsSet() const; + void unsetNrLocation(); + /// <summary> + /// + /// </summary> + N3gaLocation getN3gaLocation() const; + void setN3gaLocation(N3gaLocation const& value); + bool n3gaLocationIsSet() const; + void unsetN3gaLocation(); + /// <summary> + /// + /// </summary> + UtraLocation getUtraLocation() const; + void setUtraLocation(UtraLocation const& value); + bool utraLocationIsSet() const; + void unsetUtraLocation(); + /// <summary> + /// + /// </summary> + GeraLocation getGeraLocation() const; + void setGeraLocation(GeraLocation const& value); + bool geraLocationIsSet() const; + void unsetGeraLocation(); - /// <summary> - /// - /// </summary> - EutraLocation getEutraLocation() const; - void setEutraLocation(EutraLocation const& value); - bool eutraLocationIsSet() const; - void unsetEutraLocation(); - /// <summary> - /// - /// </summary> - NrLocation getNrLocation() const; - void setNrLocation(NrLocation const& value); - bool nrLocationIsSet() const; - void unsetNrLocation(); - /// <summary> - /// - /// </summary> - N3gaLocation getN3gaLocation() const; - void setN3gaLocation(N3gaLocation const& value); - bool n3gaLocationIsSet() const; - void unsetN3gaLocation(); - /// <summary> - /// - /// </summary> - UtraLocation getUtraLocation() const; - void setUtraLocation(UtraLocation const& value); - bool utraLocationIsSet() const; - void unsetUtraLocation(); - /// <summary> - /// - /// </summary> - GeraLocation getGeraLocation() const; - void setGeraLocation(GeraLocation const& value); - bool geraLocationIsSet() const; - void unsetGeraLocation(); + friend void to_json(nlohmann::json& j, const UserLocation& o); + friend void from_json(const nlohmann::json& j, UserLocation& o); - friend void to_json(nlohmann::json& j, const UserLocation& o); - friend void from_json(const nlohmann::json& j, UserLocation& o); -protected: - EutraLocation m_EutraLocation; - bool m_EutraLocationIsSet; - NrLocation m_NrLocation; - bool m_NrLocationIsSet; - N3gaLocation m_N3gaLocation; - bool m_N3gaLocationIsSet; - UtraLocation m_UtraLocation; - bool m_UtraLocationIsSet; - GeraLocation m_GeraLocation; - bool m_GeraLocationIsSet; - + protected: + EutraLocation m_EutraLocation; + bool m_EutraLocationIsSet; + NrLocation m_NrLocation; + bool m_NrLocationIsSet; + N3gaLocation m_N3gaLocation; + bool m_N3gaLocationIsSet; + UtraLocation m_UtraLocation; + bool m_UtraLocationIsSet; + GeraLocation m_GeraLocation; + bool m_GeraLocationIsSet; }; } // namespace model diff --git a/src/api-server/model/UtraLocation.cpp b/src/api-server/model/UtraLocation.cpp old mode 100755 new mode 100644 index 106f033..10541e1 --- a/src/api-server/model/UtraLocation.cpp +++ b/src/api-server/model/UtraLocation.cpp @@ -1,15 +1,15 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-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 "UtraLocation.h" #include "Helpers.h" @@ -20,324 +20,264 @@ namespace oai { namespace pcf { namespace model { -UtraLocation::UtraLocation() -{ - m_CgiIsSet = false; - m_SaiIsSet = false; - m_LaiIsSet = false; - m_RaiIsSet = false; - m_AgeOfLocationInformation = 0; - m_AgeOfLocationInformationIsSet = false; - m_UeLocationTimestamp = ""; - m_UeLocationTimestampIsSet = false; - m_GeographicalInformation = ""; - m_GeographicalInformationIsSet = false; - m_GeodeticInformation = ""; - m_GeodeticInformationIsSet = false; - +UtraLocation::UtraLocation() { + m_CgiIsSet = false; + m_SaiIsSet = false; + m_LaiIsSet = false; + m_RaiIsSet = false; + m_AgeOfLocationInformation = 0; + m_AgeOfLocationInformationIsSet = false; + m_UeLocationTimestamp = ""; + m_UeLocationTimestampIsSet = false; + m_GeographicalInformation = ""; + m_GeographicalInformationIsSet = false; + m_GeodeticInformation = ""; + m_GeodeticInformationIsSet = false; } -void UtraLocation::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { -// throw org::openapitools::server::helpers::ValidationException(msg.str()); - } +void UtraLocation::validate() const { + std::stringstream msg; + if (!validate(msg)) { + // throw + // org::openapitools::server::helpers::ValidationException(msg.str()); + } } -bool UtraLocation::validate(std::stringstream& msg) const -{ - return validate(msg, ""); +bool UtraLocation::validate(std::stringstream& msg) const { + return validate(msg, ""); } -bool UtraLocation::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "UtraLocation" : pathPrefix; +bool UtraLocation::validate( + std::stringstream& msg, const std::string& pathPrefix) const { + bool success = true; + const std::string _pathPrefix = + pathPrefix.empty() ? "UtraLocation" : pathPrefix; - - if (ageOfLocationInformationIsSet()) - { - const int32_t& value = m_AgeOfLocationInformation; - const std::string currentValuePath = _pathPrefix + ".ageOfLocationInformation"; - - - if (value < 0) - { - success = false; - msg << currentValuePath << ": must be greater than or equal to 0;"; - } - if (value > 32767) - { - success = false; - msg << currentValuePath << ": must be less than or equal to 32767;"; - } + if (ageOfLocationInformationIsSet()) { + const int32_t& value = m_AgeOfLocationInformation; + const std::string currentValuePath = + _pathPrefix + ".ageOfLocationInformation"; + if (value < 0) { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0;"; } - - if (geographicalInformationIsSet()) - { - const std::string& value = m_GeographicalInformation; - const std::string currentValuePath = _pathPrefix + ".geographicalInformation"; - - - + if (value > 32767) { + success = false; + msg << currentValuePath << ": must be less than or equal to 32767;"; } - - if (geodeticInformationIsSet()) - { - const std::string& value = m_GeodeticInformation; - const std::string currentValuePath = _pathPrefix + ".geodeticInformation"; - - + } - } - - return success; -} + if (geographicalInformationIsSet()) { + const std::string& value = m_GeographicalInformation; + const std::string currentValuePath = + _pathPrefix + ".geographicalInformation"; + } + + if (geodeticInformationIsSet()) { + const std::string& value = m_GeodeticInformation; + const std::string currentValuePath = _pathPrefix + ".geodeticInformation"; + } -bool UtraLocation::operator==(const UtraLocation& rhs) const -{ - return - - - - ((!cgiIsSet() && !rhs.cgiIsSet()) || (cgiIsSet() && rhs.cgiIsSet() && getCgi() == rhs.getCgi())) && - - - ((!saiIsSet() && !rhs.saiIsSet()) || (saiIsSet() && rhs.saiIsSet() && getSai() == rhs.getSai())) && - - - ((!laiIsSet() && !rhs.laiIsSet()) || (laiIsSet() && rhs.laiIsSet() && getLai() == rhs.getLai())) && - - - ((!raiIsSet() && !rhs.raiIsSet()) || (raiIsSet() && rhs.raiIsSet() && getRai() == rhs.getRai())) && - - - ((!ageOfLocationInformationIsSet() && !rhs.ageOfLocationInformationIsSet()) || (ageOfLocationInformationIsSet() && rhs.ageOfLocationInformationIsSet() && getAgeOfLocationInformation() == rhs.getAgeOfLocationInformation())) && - - - ((!ueLocationTimestampIsSet() && !rhs.ueLocationTimestampIsSet()) || (ueLocationTimestampIsSet() && rhs.ueLocationTimestampIsSet() && getUeLocationTimestamp() == rhs.getUeLocationTimestamp())) && - - - ((!geographicalInformationIsSet() && !rhs.geographicalInformationIsSet()) || (geographicalInformationIsSet() && rhs.geographicalInformationIsSet() && getGeographicalInformation() == rhs.getGeographicalInformation())) && - - - ((!geodeticInformationIsSet() && !rhs.geodeticInformationIsSet()) || (geodeticInformationIsSet() && rhs.geodeticInformationIsSet() && getGeodeticInformation() == rhs.getGeodeticInformation())) - - ; + return success; } -bool UtraLocation::operator!=(const UtraLocation& rhs) const -{ - return !(*this == rhs); +bool UtraLocation::operator==(const UtraLocation& rhs) const { + return + + ((!cgiIsSet() && !rhs.cgiIsSet()) || + (cgiIsSet() && rhs.cgiIsSet() && getCgi() == rhs.getCgi())) && + + ((!saiIsSet() && !rhs.saiIsSet()) || + (saiIsSet() && rhs.saiIsSet() && getSai() == rhs.getSai())) && + + ((!laiIsSet() && !rhs.laiIsSet()) || + (laiIsSet() && rhs.laiIsSet() && getLai() == rhs.getLai())) && + + ((!raiIsSet() && !rhs.raiIsSet()) || + (raiIsSet() && rhs.raiIsSet() && getRai() == rhs.getRai())) && + + ((!ageOfLocationInformationIsSet() && + !rhs.ageOfLocationInformationIsSet()) || + (ageOfLocationInformationIsSet() && + rhs.ageOfLocationInformationIsSet() && + getAgeOfLocationInformation() == rhs.getAgeOfLocationInformation())) && + + ((!ueLocationTimestampIsSet() && !rhs.ueLocationTimestampIsSet()) || + (ueLocationTimestampIsSet() && rhs.ueLocationTimestampIsSet() && + getUeLocationTimestamp() == rhs.getUeLocationTimestamp())) && + + ((!geographicalInformationIsSet() && + !rhs.geographicalInformationIsSet()) || + (geographicalInformationIsSet() && rhs.geographicalInformationIsSet() && + getGeographicalInformation() == rhs.getGeographicalInformation())) && + + ((!geodeticInformationIsSet() && !rhs.geodeticInformationIsSet()) || + (geodeticInformationIsSet() && rhs.geodeticInformationIsSet() && + getGeodeticInformation() == rhs.getGeodeticInformation())) + + ; } -void to_json(nlohmann::json& j, const UtraLocation& o) -{ - j = nlohmann::json(); - if(o.cgiIsSet()) - j["cgi"] = o.m_Cgi; - if(o.saiIsSet()) - j["sai"] = o.m_Sai; - if(o.laiIsSet()) - j["lai"] = o.m_Lai; - if(o.raiIsSet()) - j["rai"] = o.m_Rai; - if(o.ageOfLocationInformationIsSet()) - j["ageOfLocationInformation"] = o.m_AgeOfLocationInformation; - if(o.ueLocationTimestampIsSet()) - j["ueLocationTimestamp"] = o.m_UeLocationTimestamp; - if(o.geographicalInformationIsSet()) - j["geographicalInformation"] = o.m_GeographicalInformation; - if(o.geodeticInformationIsSet()) - j["geodeticInformation"] = o.m_GeodeticInformation; - +bool UtraLocation::operator!=(const UtraLocation& rhs) const { + return !(*this == rhs); } -void from_json(const nlohmann::json& j, UtraLocation& o) -{ - if(j.find("cgi") != j.end()) - { - j.at("cgi").get_to(o.m_Cgi); - o.m_CgiIsSet = true; - } - if(j.find("sai") != j.end()) - { - j.at("sai").get_to(o.m_Sai); - o.m_SaiIsSet = true; - } - if(j.find("lai") != j.end()) - { - j.at("lai").get_to(o.m_Lai); - o.m_LaiIsSet = true; - } - if(j.find("rai") != j.end()) - { - j.at("rai").get_to(o.m_Rai); - o.m_RaiIsSet = true; - } - if(j.find("ageOfLocationInformation") != j.end()) - { - j.at("ageOfLocationInformation").get_to(o.m_AgeOfLocationInformation); - o.m_AgeOfLocationInformationIsSet = true; - } - if(j.find("ueLocationTimestamp") != j.end()) - { - j.at("ueLocationTimestamp").get_to(o.m_UeLocationTimestamp); - o.m_UeLocationTimestampIsSet = true; - } - if(j.find("geographicalInformation") != j.end()) - { - j.at("geographicalInformation").get_to(o.m_GeographicalInformation); - o.m_GeographicalInformationIsSet = true; - } - if(j.find("geodeticInformation") != j.end()) - { - j.at("geodeticInformation").get_to(o.m_GeodeticInformation); - o.m_GeodeticInformationIsSet = true; - } - +void to_json(nlohmann::json& j, const UtraLocation& o) { + j = nlohmann::json(); + if (o.cgiIsSet()) j["cgi"] = o.m_Cgi; + if (o.saiIsSet()) j["sai"] = o.m_Sai; + if (o.laiIsSet()) j["lai"] = o.m_Lai; + if (o.raiIsSet()) j["rai"] = o.m_Rai; + if (o.ageOfLocationInformationIsSet()) + j["ageOfLocationInformation"] = o.m_AgeOfLocationInformation; + if (o.ueLocationTimestampIsSet()) + j["ueLocationTimestamp"] = o.m_UeLocationTimestamp; + if (o.geographicalInformationIsSet()) + j["geographicalInformation"] = o.m_GeographicalInformation; + if (o.geodeticInformationIsSet()) + j["geodeticInformation"] = o.m_GeodeticInformation; } -CellGlobalId UtraLocation::getCgi() const -{ - return m_Cgi; -} -void UtraLocation::setCgi(CellGlobalId const& value) -{ - m_Cgi = value; - m_CgiIsSet = true; -} -bool UtraLocation::cgiIsSet() const -{ - return m_CgiIsSet; -} -void UtraLocation::unsetCgi() -{ - m_CgiIsSet = false; -} -ServiceAreaId UtraLocation::getSai() const -{ - return m_Sai; -} -void UtraLocation::setSai(ServiceAreaId const& value) -{ - m_Sai = value; - m_SaiIsSet = true; -} -bool UtraLocation::saiIsSet() const -{ - return m_SaiIsSet; -} -void UtraLocation::unsetSai() -{ - m_SaiIsSet = false; -} -LocationAreaId UtraLocation::getLai() const -{ - return m_Lai; -} -void UtraLocation::setLai(LocationAreaId const& value) -{ - m_Lai = value; - m_LaiIsSet = true; -} -bool UtraLocation::laiIsSet() const -{ - return m_LaiIsSet; -} -void UtraLocation::unsetLai() -{ - m_LaiIsSet = false; -} -RoutingAreaId UtraLocation::getRai() const -{ - return m_Rai; -} -void UtraLocation::setRai(RoutingAreaId const& value) -{ - m_Rai = value; - m_RaiIsSet = true; -} -bool UtraLocation::raiIsSet() const -{ - return m_RaiIsSet; -} -void UtraLocation::unsetRai() -{ - m_RaiIsSet = false; -} -int32_t UtraLocation::getAgeOfLocationInformation() const -{ - return m_AgeOfLocationInformation; -} -void UtraLocation::setAgeOfLocationInformation(int32_t const value) -{ - m_AgeOfLocationInformation = value; - m_AgeOfLocationInformationIsSet = true; -} -bool UtraLocation::ageOfLocationInformationIsSet() const -{ - return m_AgeOfLocationInformationIsSet; -} -void UtraLocation::unsetAgeOfLocationInformation() -{ - m_AgeOfLocationInformationIsSet = false; -} -std::string UtraLocation::getUeLocationTimestamp() const -{ - return m_UeLocationTimestamp; -} -void UtraLocation::setUeLocationTimestamp(std::string const& value) -{ - m_UeLocationTimestamp = value; - m_UeLocationTimestampIsSet = true; -} -bool UtraLocation::ueLocationTimestampIsSet() const -{ - return m_UeLocationTimestampIsSet; -} -void UtraLocation::unsetUeLocationTimestamp() -{ - m_UeLocationTimestampIsSet = false; -} -std::string UtraLocation::getGeographicalInformation() const -{ - return m_GeographicalInformation; -} -void UtraLocation::setGeographicalInformation(std::string const& value) -{ - m_GeographicalInformation = value; - m_GeographicalInformationIsSet = true; -} -bool UtraLocation::geographicalInformationIsSet() const -{ - return m_GeographicalInformationIsSet; -} -void UtraLocation::unsetGeographicalInformation() -{ - m_GeographicalInformationIsSet = false; -} -std::string UtraLocation::getGeodeticInformation() const -{ - return m_GeodeticInformation; -} -void UtraLocation::setGeodeticInformation(std::string const& value) -{ - m_GeodeticInformation = value; - m_GeodeticInformationIsSet = true; -} -bool UtraLocation::geodeticInformationIsSet() const -{ - return m_GeodeticInformationIsSet; -} -void UtraLocation::unsetGeodeticInformation() -{ - m_GeodeticInformationIsSet = false; +void from_json(const nlohmann::json& j, UtraLocation& o) { + if (j.find("cgi") != j.end()) { + j.at("cgi").get_to(o.m_Cgi); + o.m_CgiIsSet = true; + } + if (j.find("sai") != j.end()) { + j.at("sai").get_to(o.m_Sai); + o.m_SaiIsSet = true; + } + if (j.find("lai") != j.end()) { + j.at("lai").get_to(o.m_Lai); + o.m_LaiIsSet = true; + } + if (j.find("rai") != j.end()) { + j.at("rai").get_to(o.m_Rai); + o.m_RaiIsSet = true; + } + if (j.find("ageOfLocationInformation") != j.end()) { + j.at("ageOfLocationInformation").get_to(o.m_AgeOfLocationInformation); + o.m_AgeOfLocationInformationIsSet = true; + } + if (j.find("ueLocationTimestamp") != j.end()) { + j.at("ueLocationTimestamp").get_to(o.m_UeLocationTimestamp); + o.m_UeLocationTimestampIsSet = true; + } + if (j.find("geographicalInformation") != j.end()) { + j.at("geographicalInformation").get_to(o.m_GeographicalInformation); + o.m_GeographicalInformationIsSet = true; + } + if (j.find("geodeticInformation") != j.end()) { + j.at("geodeticInformation").get_to(o.m_GeodeticInformation); + o.m_GeodeticInformationIsSet = true; + } } +CellGlobalId UtraLocation::getCgi() const { + return m_Cgi; +} +void UtraLocation::setCgi(CellGlobalId const& value) { + m_Cgi = value; + m_CgiIsSet = true; +} +bool UtraLocation::cgiIsSet() const { + return m_CgiIsSet; +} +void UtraLocation::unsetCgi() { + m_CgiIsSet = false; +} +ServiceAreaId UtraLocation::getSai() const { + return m_Sai; +} +void UtraLocation::setSai(ServiceAreaId const& value) { + m_Sai = value; + m_SaiIsSet = true; +} +bool UtraLocation::saiIsSet() const { + return m_SaiIsSet; +} +void UtraLocation::unsetSai() { + m_SaiIsSet = false; +} +LocationAreaId UtraLocation::getLai() const { + return m_Lai; +} +void UtraLocation::setLai(LocationAreaId const& value) { + m_Lai = value; + m_LaiIsSet = true; +} +bool UtraLocation::laiIsSet() const { + return m_LaiIsSet; +} +void UtraLocation::unsetLai() { + m_LaiIsSet = false; +} +RoutingAreaId UtraLocation::getRai() const { + return m_Rai; +} +void UtraLocation::setRai(RoutingAreaId const& value) { + m_Rai = value; + m_RaiIsSet = true; +} +bool UtraLocation::raiIsSet() const { + return m_RaiIsSet; +} +void UtraLocation::unsetRai() { + m_RaiIsSet = false; +} +int32_t UtraLocation::getAgeOfLocationInformation() const { + return m_AgeOfLocationInformation; +} +void UtraLocation::setAgeOfLocationInformation(int32_t const value) { + m_AgeOfLocationInformation = value; + m_AgeOfLocationInformationIsSet = true; +} +bool UtraLocation::ageOfLocationInformationIsSet() const { + return m_AgeOfLocationInformationIsSet; +} +void UtraLocation::unsetAgeOfLocationInformation() { + m_AgeOfLocationInformationIsSet = false; +} +std::string UtraLocation::getUeLocationTimestamp() const { + return m_UeLocationTimestamp; +} +void UtraLocation::setUeLocationTimestamp(std::string const& value) { + m_UeLocationTimestamp = value; + m_UeLocationTimestampIsSet = true; +} +bool UtraLocation::ueLocationTimestampIsSet() const { + return m_UeLocationTimestampIsSet; +} +void UtraLocation::unsetUeLocationTimestamp() { + m_UeLocationTimestampIsSet = false; +} +std::string UtraLocation::getGeographicalInformation() const { + return m_GeographicalInformation; +} +void UtraLocation::setGeographicalInformation(std::string const& value) { + m_GeographicalInformation = value; + m_GeographicalInformationIsSet = true; +} +bool UtraLocation::geographicalInformationIsSet() const { + return m_GeographicalInformationIsSet; +} +void UtraLocation::unsetGeographicalInformation() { + m_GeographicalInformationIsSet = false; +} +std::string UtraLocation::getGeodeticInformation() const { + return m_GeodeticInformation; +} +void UtraLocation::setGeodeticInformation(std::string const& value) { + m_GeodeticInformation = value; + m_GeodeticInformationIsSet = true; +} +bool UtraLocation::geodeticInformationIsSet() const { + return m_GeodeticInformationIsSet; +} +void UtraLocation::unsetGeodeticInformation() { + m_GeodeticInformationIsSet = false; +} } // namespace model } // namespace pcf diff --git a/src/api-server/model/UtraLocation.h b/src/api-server/model/UtraLocation.h old mode 100755 new mode 100644 index 81a83c0..1b167d2 --- a/src/api-server/model/UtraLocation.h +++ b/src/api-server/model/UtraLocation.h @@ -1,24 +1,24 @@ /** -* Npcf_SMPolicyControl API -* Session Management Policy Control Service © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. -* -* The version of the OpenAPI document: 1.1.1.alpha-5 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ + * Npcf_SMPolicyControl API + * Session Management Policy Control Service © 2020, 3GPP Organizational + * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. + * + * The version of the OpenAPI document: 1.1.1.alpha-5 + * + * + * NOTE: This class is auto generated by OpenAPI Generator + * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit + * the class manually. + */ /* * UtraLocation.h * - * + * */ #ifndef UtraLocation_H_ #define UtraLocation_H_ - #include "CellGlobalId.h" #include <string> #include "RoutingAreaId.h" @@ -31,115 +31,114 @@ namespace pcf { namespace model { /// <summary> -/// +/// /// </summary> -class UtraLocation -{ -public: - UtraLocation(); - virtual ~UtraLocation() = default; +class UtraLocation { + public: + UtraLocation(); + virtual ~UtraLocation() = 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. 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> - /// 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; - /// <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 UtraLocation& rhs) const; + bool operator!=(const UtraLocation& rhs) const; - bool operator==(const UtraLocation& rhs) const; - bool operator!=(const UtraLocation& rhs) const; + ///////////////////////////////////////////// + /// UtraLocation members - ///////////////////////////////////////////// - /// UtraLocation members + /// <summary> + /// + /// </summary> + CellGlobalId getCgi() const; + void setCgi(CellGlobalId const& value); + bool cgiIsSet() const; + void unsetCgi(); + /// <summary> + /// + /// </summary> + ServiceAreaId getSai() const; + void setSai(ServiceAreaId const& value); + bool saiIsSet() const; + void unsetSai(); + /// <summary> + /// + /// </summary> + LocationAreaId getLai() const; + void setLai(LocationAreaId const& value); + bool laiIsSet() const; + void unsetLai(); + /// <summary> + /// + /// </summary> + RoutingAreaId getRai() const; + void setRai(RoutingAreaId const& value); + bool raiIsSet() const; + void unsetRai(); + /// <summary> + /// + /// </summary> + int32_t getAgeOfLocationInformation() const; + void setAgeOfLocationInformation(int32_t const value); + bool ageOfLocationInformationIsSet() const; + void unsetAgeOfLocationInformation(); + /// <summary> + /// + /// </summary> + std::string getUeLocationTimestamp() const; + void setUeLocationTimestamp(std::string const& value); + bool ueLocationTimestampIsSet() const; + void unsetUeLocationTimestamp(); + /// <summary> + /// + /// </summary> + std::string getGeographicalInformation() const; + void setGeographicalInformation(std::string const& value); + bool geographicalInformationIsSet() const; + void unsetGeographicalInformation(); + /// <summary> + /// + /// </summary> + std::string getGeodeticInformation() const; + void setGeodeticInformation(std::string const& value); + bool geodeticInformationIsSet() const; + void unsetGeodeticInformation(); - /// <summary> - /// - /// </summary> - CellGlobalId getCgi() const; - void setCgi(CellGlobalId const& value); - bool cgiIsSet() const; - void unsetCgi(); - /// <summary> - /// - /// </summary> - ServiceAreaId getSai() const; - void setSai(ServiceAreaId const& value); - bool saiIsSet() const; - void unsetSai(); - /// <summary> - /// - /// </summary> - LocationAreaId getLai() const; - void setLai(LocationAreaId const& value); - bool laiIsSet() const; - void unsetLai(); - /// <summary> - /// - /// </summary> - RoutingAreaId getRai() const; - void setRai(RoutingAreaId const& value); - bool raiIsSet() const; - void unsetRai(); - /// <summary> - /// - /// </summary> - int32_t getAgeOfLocationInformation() const; - void setAgeOfLocationInformation(int32_t const value); - bool ageOfLocationInformationIsSet() const; - void unsetAgeOfLocationInformation(); - /// <summary> - /// - /// </summary> - std::string getUeLocationTimestamp() const; - void setUeLocationTimestamp(std::string const& value); - bool ueLocationTimestampIsSet() const; - void unsetUeLocationTimestamp(); - /// <summary> - /// - /// </summary> - std::string getGeographicalInformation() const; - void setGeographicalInformation(std::string const& value); - bool geographicalInformationIsSet() const; - void unsetGeographicalInformation(); - /// <summary> - /// - /// </summary> - std::string getGeodeticInformation() const; - void setGeodeticInformation(std::string const& value); - bool geodeticInformationIsSet() const; - void unsetGeodeticInformation(); + friend void to_json(nlohmann::json& j, const UtraLocation& o); + friend void from_json(const nlohmann::json& j, UtraLocation& o); - friend void to_json(nlohmann::json& j, const UtraLocation& o); - friend void from_json(const nlohmann::json& j, UtraLocation& o); -protected: - CellGlobalId m_Cgi; - bool m_CgiIsSet; - ServiceAreaId m_Sai; - bool m_SaiIsSet; - LocationAreaId m_Lai; - bool m_LaiIsSet; - RoutingAreaId m_Rai; - bool m_RaiIsSet; - int32_t m_AgeOfLocationInformation; - bool m_AgeOfLocationInformationIsSet; - std::string m_UeLocationTimestamp; - bool m_UeLocationTimestampIsSet; - std::string m_GeographicalInformation; - bool m_GeographicalInformationIsSet; - std::string m_GeodeticInformation; - bool m_GeodeticInformationIsSet; - + protected: + CellGlobalId m_Cgi; + bool m_CgiIsSet; + ServiceAreaId m_Sai; + bool m_SaiIsSet; + LocationAreaId m_Lai; + bool m_LaiIsSet; + RoutingAreaId m_Rai; + bool m_RaiIsSet; + int32_t m_AgeOfLocationInformation; + bool m_AgeOfLocationInformationIsSet; + std::string m_UeLocationTimestamp; + bool m_UeLocationTimestampIsSet; + std::string m_GeographicalInformation; + bool m_GeographicalInformationIsSet; + std::string m_GeodeticInformation; + bool m_GeodeticInformationIsSet; }; } // namespace model diff --git a/src/api-server/pcf-api-server.cpp b/src/api-server/pcf-api-server.cpp old mode 100755 new mode 100644 index 8199e61..34c5221 --- a/src/api-server/pcf-api-server.cpp +++ b/src/api-server/pcf-api-server.cpp @@ -69,7 +69,7 @@ void setUpUnixSignals(std::vector<int> quitSignals) { } #endif -//using namespace oai::pcf::api; +// using namespace oai::pcf::api; void PCFApiServer::init(size_t thr) { auto opts = Pistache::Http::Endpoint::options().threads(thr); @@ -77,7 +77,6 @@ void PCFApiServer::init(size_t thr) { opts.maxRequestSize(PISTACHE_SERVER_MAX_PAYLOAD); m_httpEndpoint->init(opts); - // Custom APIs } diff --git a/src/api-server/pcf-api-server.h b/src/api-server/pcf-api-server.h old mode 100755 new mode 100644 index cb31698..630ac59 --- a/src/api-server/pcf-api-server.h +++ b/src/api-server/pcf-api-server.h @@ -48,7 +48,7 @@ #include "logger.hpp" #include "pcf_app.hpp" -//using namespace oai::pcf::api; +// using namespace oai::pcf::api; using namespace oai::pcf::app; class PCFApiServer { @@ -57,7 +57,6 @@ class PCFApiServer { : m_httpEndpoint(std::make_shared<Pistache::Http::Endpoint>(address)) { m_router = std::make_shared<Pistache::Rest::Router>(); m_address = address.host() + ":" + (address.port()).toString(); - } void init(size_t thr = 1); void start(); @@ -67,7 +66,6 @@ class PCFApiServer { std::shared_ptr<Pistache::Http::Endpoint> m_httpEndpoint; std::shared_ptr<Pistache::Rest::Router> m_router; - std::string m_address; }; diff --git a/src/api-server/pcf-http2-server.cpp b/src/api-server/pcf-http2-server.cpp old mode 100755 new mode 100644 index 0def79c..47a8067 --- a/src/api-server/pcf-http2-server.cpp +++ b/src/api-server/pcf-http2-server.cpp @@ -52,14 +52,14 @@ void pcf_http2_server::start() { boost::system::error_code ec; Logger::pcf_sbi().info("HTTP2 server started"); - std::string nfId = {}; + std::string nfId = {}; std::string subscriptionID = {}; // Get list of supported APIs - server.handle("/", [&](const request &request, const response &response) { - request.on_data([&](const uint8_t *data, std::size_t len) { + server.handle("/", [&](const request& request, const response& response) { + request.on_data([&](const uint8_t* data, std::size_t len) { if (request.method().compare("GET") == 0) { - //this->get_api_list(response); + // this->get_api_list(response); } }); }); @@ -89,4 +89,6 @@ void pcf_http2_server::start() { // } // } //------------------------------------------------------------------------------ -void pcf_http2_server::stop() { server.stop(); } +void pcf_http2_server::stop() { + server.stop(); +} diff --git a/src/api-server/pcf-http2-server.h b/src/api-server/pcf-http2-server.h old mode 100755 new mode 100644 index 0b329b6..a6e5b7b --- a/src/api-server/pcf-http2-server.h +++ b/src/api-server/pcf-http2-server.h @@ -45,23 +45,22 @@ using namespace oai::pcf::model; using namespace oai::pcf::app; class pcf_http2_server { -public: - pcf_http2_server(std::string addr, uint32_t port, - pcf_app *pcf_app_inst) + public: + pcf_http2_server(std::string addr, uint32_t port, pcf_app* pcf_app_inst) : m_address(addr), m_port(port), server(), m_pcf_app(pcf_app_inst) {} void start(); void init(size_t thr) {} - // PCF + // PCF void stop(); -private: + private: util::uint_generator<uint32_t> m_promise_id_generator; std::string m_address; uint32_t m_port; http2 server; - pcf_app *m_pcf_app; + pcf_app* m_pcf_app; }; #endif \ No newline at end of file diff --git a/src/common/3gpp_29.500.h b/src/common/3gpp_29.500.h index 30ff34d..f7ab3d8 100644 --- a/src/common/3gpp_29.500.h +++ b/src/common/3gpp_29.500.h @@ -25,56 +25,56 @@ #define FILE_3GPP_29_500_SEEN enum http_status_code_e { - HTTP_STATUS_CODE_100_CONTINUE = 100, - HTTP_STATUS_CODE_200_OK = 200, - HTTP_STATUS_CODE_201_CREATED = 201, - HTTP_STATUS_CODE_202_ACCEPTED = 202, - HTTP_STATUS_CODE_204_NO_CONTENT = 204, - HTTP_STATUS_CODE_300_MULTIPLE_CHOICES = 300, - HTTP_STATUS_CODE_303_SEE_OTHER = 303, - HTTP_STATUS_CODE_307_TEMPORARY_REDIRECT = 307, - HTTP_STATUS_CODE_308_PERMANENT_REDIRECT = 308, - HTTP_STATUS_CODE_400_BAD_REQUEST = 400, - HTTP_STATUS_CODE_401_UNAUTHORIZED = 401, - HTTP_STATUS_CODE_403_FORBIDDEN = 403, - HTTP_STATUS_CODE_404_NOT_FOUND = 404, - HTTP_STATUS_CODE_405_METHOD_NOT_ALLOWED = 405, - HTTP_STATUS_CODE_406_NOT_ACCEPTABLE = 406, - HTTP_STATUS_CODE_408_REQUEST_TIMEOUT = 408, - HTTP_STATUS_CODE_409_CONFLICT = 409, - HTTP_STATUS_CODE_410_GONE = 410, - HTTP_STATUS_CODE_411_LENGTH_REQUIRED = 411, - HTTP_STATUS_CODE_412_PRECONDITION_FAILED = 412, - HTTP_STATUS_CODE_413_PAYLOAD_TOO_LARGE = 413, - HTTP_STATUS_CODE_414_URI_TOO_LONG = 414, + HTTP_STATUS_CODE_100_CONTINUE = 100, + HTTP_STATUS_CODE_200_OK = 200, + HTTP_STATUS_CODE_201_CREATED = 201, + HTTP_STATUS_CODE_202_ACCEPTED = 202, + HTTP_STATUS_CODE_204_NO_CONTENT = 204, + HTTP_STATUS_CODE_300_MULTIPLE_CHOICES = 300, + HTTP_STATUS_CODE_303_SEE_OTHER = 303, + HTTP_STATUS_CODE_307_TEMPORARY_REDIRECT = 307, + HTTP_STATUS_CODE_308_PERMANENT_REDIRECT = 308, + HTTP_STATUS_CODE_400_BAD_REQUEST = 400, + HTTP_STATUS_CODE_401_UNAUTHORIZED = 401, + HTTP_STATUS_CODE_403_FORBIDDEN = 403, + HTTP_STATUS_CODE_404_NOT_FOUND = 404, + HTTP_STATUS_CODE_405_METHOD_NOT_ALLOWED = 405, + HTTP_STATUS_CODE_406_NOT_ACCEPTABLE = 406, + HTTP_STATUS_CODE_408_REQUEST_TIMEOUT = 408, + HTTP_STATUS_CODE_409_CONFLICT = 409, + HTTP_STATUS_CODE_410_GONE = 410, + HTTP_STATUS_CODE_411_LENGTH_REQUIRED = 411, + HTTP_STATUS_CODE_412_PRECONDITION_FAILED = 412, + HTTP_STATUS_CODE_413_PAYLOAD_TOO_LARGE = 413, + HTTP_STATUS_CODE_414_URI_TOO_LONG = 414, HTTP_STATUS_CODE_415_UNSUPPORTED_MEDIA_TYPE_NA = 415, - HTTP_STATUS_CODE_429_TOO_MANY_REQUESTS = 429, - HTTP_STATUS_CODE_500_INTERNAL_SERVER_ERROR = 500, - HTTP_STATUS_CODE_501_NOT_IMPLEMENTED = 501, - HTTP_STATUS_CODE_503_SERVICE_UNAVAILABLE = 503, - HTTP_STATUS_CODE_504_GATEWAY_TIMEOUT = 504 + HTTP_STATUS_CODE_429_TOO_MANY_REQUESTS = 429, + HTTP_STATUS_CODE_500_INTERNAL_SERVER_ERROR = 500, + HTTP_STATUS_CODE_501_NOT_IMPLEMENTED = 501, + HTTP_STATUS_CODE_503_SERVICE_UNAVAILABLE = 503, + HTTP_STATUS_CODE_504_GATEWAY_TIMEOUT = 504 }; enum protocol_application_error_e { - PROTOCOL_APP_ERROR_INVALID_API = 0, // 400 Bad Request - PROTOCOL_APP_ERROR_INVALID_MSG_FORMAT = 1, // 400 Bad Request - PROTOCOL_APP_ERROR_INVALID_QUERY_PARAM = 2, // 400 Bad Request - PROTOCOL_APP_ERROR_MANDATORY_QUERY_PARAM_INCORRECT = 3, // 400 Bad Request - PROTOCOL_APP_ERROR_OPTIONAL_QUERY_PARAM_INCORRECT = 4, // 400 Bad Request - PROTOCOL_APP_ERROR_MANDATORY_QUERY_PARAM_MISSING = 5, // 400 Bad Request - PROTOCOL_APP_ERROR_MANDATORY_IE_INCORRECT = 6, // 400 Bad Request - PROTOCOL_APP_ERROR_OPTIONAL_IE_INCORRECT = 7, // 400 Bad Request - PROTOCOL_APP_ERROR_MANDATORY_IE_MISSING = 8, // 400 Bad Request - PROTOCOL_APP_ERROR_UNSPECIFIED_MSG_FAILURE = 9, // 400 Bad Request - PROTOCOL_APP_ERROR_MODIFICATION_NOT_ALLOWED = 10, // 403 Forbidden - PROTOCOL_APP_ERROR_SUBSCRIPTION_NOT_FOUND = 11, // 404 Not Found - PROTOCOL_APP_ERROR_RESOURCE_URI_STRUCTURE_NOT_FOUND = 12, // 404 Not Found - PROTOCOL_APP_ERROR_INCORRECT_LENGTH = 13, // 411 Length Required - PROTOCOL_APP_ERROR_NF_CONGESTION_RISK = 14, // 429 Too Many Requests - PROTOCOL_APP_ERROR_INSUFFICIENT_RESOURCES = 15, // 500 Internal Server Error - PROTOCOL_APP_ERROR_UNSPECIFIED_NF_FAILURE = 16, // 500 Internal Server Error - PROTOCOL_APP_ERROR_SYSTEM_FAILURE = 17, // 500 Internal Server Error - PROTOCOL_APP_ERROR_NF_CONGESTION = 18, // 503 Service Unavailable + PROTOCOL_APP_ERROR_INVALID_API = 0, // 400 Bad Request + PROTOCOL_APP_ERROR_INVALID_MSG_FORMAT = 1, // 400 Bad Request + PROTOCOL_APP_ERROR_INVALID_QUERY_PARAM = 2, // 400 Bad Request + PROTOCOL_APP_ERROR_MANDATORY_QUERY_PARAM_INCORRECT = 3, // 400 Bad Request + PROTOCOL_APP_ERROR_OPTIONAL_QUERY_PARAM_INCORRECT = 4, // 400 Bad Request + PROTOCOL_APP_ERROR_MANDATORY_QUERY_PARAM_MISSING = 5, // 400 Bad Request + PROTOCOL_APP_ERROR_MANDATORY_IE_INCORRECT = 6, // 400 Bad Request + PROTOCOL_APP_ERROR_OPTIONAL_IE_INCORRECT = 7, // 400 Bad Request + PROTOCOL_APP_ERROR_MANDATORY_IE_MISSING = 8, // 400 Bad Request + PROTOCOL_APP_ERROR_UNSPECIFIED_MSG_FAILURE = 9, // 400 Bad Request + PROTOCOL_APP_ERROR_MODIFICATION_NOT_ALLOWED = 10, // 403 Forbidden + PROTOCOL_APP_ERROR_SUBSCRIPTION_NOT_FOUND = 11, // 404 Not Found + PROTOCOL_APP_ERROR_RESOURCE_URI_STRUCTURE_NOT_FOUND = 12, // 404 Not Found + PROTOCOL_APP_ERROR_INCORRECT_LENGTH = 13, // 411 Length Required + PROTOCOL_APP_ERROR_NF_CONGESTION_RISK = 14, // 429 Too Many Requests + PROTOCOL_APP_ERROR_INSUFFICIENT_RESOURCES = 15, // 500 Internal Server Error + PROTOCOL_APP_ERROR_UNSPECIFIED_NF_FAILURE = 16, // 500 Internal Server Error + PROTOCOL_APP_ERROR_SYSTEM_FAILURE = 17, // 500 Internal Server Error + PROTOCOL_APP_ERROR_NF_CONGESTION = 18, // 503 Service Unavailable }; static const std::vector<std::string> protocol_application_error_e2str{ @@ -98,4 +98,4 @@ static const std::vector<std::string> protocol_application_error_e2str{ "SYSTEM_FAILURE", "NF_CONGESTION"}; -#endif // FILE_3GPP_29_500_SEEN +#endif // FILE_3GPP_29_500_SEEN diff --git a/src/common/3gpp_29.571.h b/src/common/3gpp_29.571.h index dcdf0a2..7668a1a 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 d76ad87..6e0f8c5 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/logger.cpp b/src/common/logger.cpp index 036f3cd..ef7fb64 100644 --- a/src/common/logger.cpp +++ b/src/common/logger.cpp @@ -55,8 +55,8 @@ void Logger::_init( m_async_cmd = new _Logger("async_c ", m_sinks, ss.str().c_str()); m_itti = new _Logger("itti ", m_sinks, ss.str().c_str()); - m_pcf_app = new _Logger("pcf_app ", m_sinks, ss.str().c_str()); - m_pcf_sbi = new _Logger("pcf_sbi ", m_sinks, ss.str().c_str()); + m_pcf_app = new _Logger("pcf_app ", m_sinks, ss.str().c_str()); + m_pcf_sbi = new _Logger("pcf_sbi ", m_sinks, ss.str().c_str()); m_system = new _Logger("system ", m_sinks, ss.str().c_str()); } diff --git a/src/common/pcf.h b/src/common/pcf.h index a4ab265..92cf8dd 100644 --- a/src/common/pcf.h +++ b/src/common/pcf.h @@ -174,7 +174,7 @@ typedef struct nf_service_s { // for CURL #define NF_CURL_TIMEOUT_MS 100L -#define MAX_WAIT_MSECS 10000 // 1 second +#define MAX_WAIT_MSECS 10000 // 1 second #define AMF_NUMBER_RETRIES 3 #define UDM_NUMBER_RETRIES 3 diff --git a/src/common/utils/conversions.hpp b/src/common/utils/conversions.hpp index bd464b1..773275b 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_pcf/main.cpp b/src/oai_pcf/main.cpp index 401aea1..e234a42 100644 --- a/src/oai_pcf/main.cpp +++ b/src/oai_pcf/main.cpp @@ -32,7 +32,7 @@ #include <signal.h> #include <stdint.h> #include <thread> -#include <unistd.h> // get_pid(), pause() +#include <unistd.h> // get_pid(), pause() #include <vector> #include <boost/algorithm/string.hpp> @@ -43,11 +43,11 @@ using namespace std; using namespace oai::pcf::app; using namespace oai::pcf::config; -pcf_app *pcf_app_inst = nullptr; +pcf_app* pcf_app_inst = nullptr; pcf_config pcf_cfg; boost::asio::io_service io_service; -PCFApiServer *pcf_api_server_1 = nullptr; -pcf_http2_server *pcf_api_server_2 = nullptr; +PCFApiServer* pcf_api_server_1 = nullptr; +pcf_http2_server* pcf_api_server_2 = nullptr; //------------------------------------------------------------------------------ void my_app_signal_handler(int s) { @@ -61,8 +61,7 @@ void my_app_signal_handler(int s) { pcf_api_server_1 = nullptr; } std::cout << "PCF API Server memory done." << std::endl; - if (pcf_app_inst) - delete pcf_app_inst; + if (pcf_app_inst) delete pcf_app_inst; pcf_app_inst = nullptr; std::cout << "PCF APP memory done." << std::endl; // if (itti_inst) delete itti_inst; @@ -75,18 +74,19 @@ void my_app_signal_handler(int s) { // We are doing a check to see if an existing process already runs this program. // We have seen that running at least twice this program in a container may lead // to the container host to crash. -int my_check_redundant_process(char *exec_name) { - FILE *fp; - char *cmd = new char[200]; +int my_check_redundant_process(char* exec_name) { + FILE* fp; + char* cmd = new char[200]; std::vector<std::string> words; - int result = 0; + int result = 0; size_t retSize = 0; // Retrieving only the executable name boost::split(words, exec_name, boost::is_any_of("/")); memset(cmd, 0, 200); - sprintf(cmd, "ps aux | grep -v grep | grep -v nohup | grep -c %s || true", - words[words.size() - 1].c_str()); + sprintf( + cmd, "ps aux | grep -v grep | grep -v nohup | grep -c %s || true", + words[words.size() - 1].c_str()); fp = popen(cmd, "r"); // clearing the buffer @@ -105,8 +105,7 @@ int my_check_redundant_process(char *exec_name) { return result; } //------------------------------------------------------------------------------ -int main(int argc, char **argv) { - +int main(int argc, char** argv) { // Checking if another instance of pcf is running int nb_processes = my_check_redundant_process(argv[0]); if (nb_processes > 1) { @@ -131,7 +130,7 @@ int main(int argc, char **argv) { sigIntHandler.sa_flags = 0; sigaction(SIGINT, &sigIntHandler, NULL); - // Event subsystem + // Event subsystem pcf_event ev; // Config @@ -140,7 +139,7 @@ int main(int argc, char **argv) { // PCF application layer pcf_app_inst = new pcf_app(Options::getlibconfigConfig(), ev); - + // Task Manager task_manager tm(ev); std::thread task_manager_thread(&task_manager::run, &tm); @@ -149,31 +148,29 @@ int main(int argc, char **argv) { // Currently hard-coded value. TODO: add as config option. string pid_file_name = get_exe_absolute_path("/var/run", pcf_cfg.instance); if (!is_pid_file_lock_success(pid_file_name.c_str())) { - Logger::pcf_app().error("Lock PID file %s failed\n", - pid_file_name.c_str()); + Logger::pcf_app().error("Lock PID file %s failed\n", pid_file_name.c_str()); exit(-EDEADLK); } // PCF Pistache API server (HTTP1) Pistache::Address addr( - std::string(inet_ntoa(*((struct in_addr *)&pcf_cfg.sbi.addr4))), + std::string(inet_ntoa(*((struct in_addr*) &pcf_cfg.sbi.addr4))), Pistache::Port(pcf_cfg.sbi.http1_port)); pcf_api_server_1 = new PCFApiServer(addr, pcf_app_inst); pcf_api_server_1->init(2); std::thread pcf_http1_manager(&PCFApiServer::start, pcf_api_server_1); // PCF NGHTTP API server (HTTP2) - pcf_api_server_2 = - new pcf_http2_server(conv::toString(pcf_cfg.sbi.addr4), - pcf_cfg.sbi.http2_port, pcf_app_inst); + pcf_api_server_2 = new pcf_http2_server( + conv::toString(pcf_cfg.sbi.addr4), pcf_cfg.sbi.http2_port, pcf_app_inst); std::thread pcf_http2_manager(&pcf_http2_server::start, pcf_api_server_2); pcf_http1_manager.join(); pcf_http2_manager.join(); - FILE *fp = NULL; + FILE* fp = NULL; std::string filename = fmt::format("/tmp/pcf_{}.status", getpid()); - fp = fopen(filename.c_str(), "w+"); + fp = fopen(filename.c_str(), "w+"); fprintf(fp, "STARTED\n"); fflush(fp); fclose(fp); diff --git a/src/pcf_app/pcf_app.cpp b/src/pcf_app/pcf_app.cpp index 37b5a10..c1a52a8 100644 --- a/src/pcf_app/pcf_app.cpp +++ b/src/pcf_app/pcf_app.cpp @@ -46,12 +46,13 @@ using namespace oai::pcf::model; using namespace std; -extern pcf_app *pcf_app_inst; +extern pcf_app* pcf_app_inst; extern pcf_config pcf_cfg; -pcf_nrf *pcf_nrf_inst; +pcf_nrf* pcf_nrf_inst; //------------------------------------------------------------------------------ -pcf_app::pcf_app(const std::string& config_file, pcf_event& ev) : event_sub(ev) { +pcf_app::pcf_app(const std::string& config_file, pcf_event& ev) + : event_sub(ev) { Logger::pcf_app().startup("Starting..."); // Register to NRF if (pcf_cfg.pcf_features.register_nrf) { diff --git a/src/pcf_app/pcf_app.hpp b/src/pcf_app/pcf_app.hpp index d69bb47..9cbe332 100644 --- a/src/pcf_app/pcf_app.hpp +++ b/src/pcf_app/pcf_app.hpp @@ -44,7 +44,7 @@ namespace oai::pcf::app { class pcf_app { -public: + public: explicit pcf_app(const std::string& config_file, pcf_event& ev); pcf_app(pcf_app const&) = delete; void operator=(pcf_app const&) = delete; @@ -58,13 +58,12 @@ public: */ void handle_create_sm_policy(); - private: - pcf_profile nf_instance_profile; // PCF profile - std::string pcf_instance_id; // PCF instance id - // for Event Handling - pcf_event& event_sub; - bs2::connection task_connection; -}; -}// namespace pcf + private: + pcf_profile nf_instance_profile; // PCF profile + std::string pcf_instance_id; // PCF instance id + // for Event Handling + pcf_event& event_sub; + bs2::connection task_connection; +}; +} // namespace oai::pcf::app #endif /* FILE_PCF_APP_HPP_SEEN */ - diff --git a/src/pcf_app/pcf_config.cpp b/src/pcf_app/pcf_config.cpp index 6c990b6..a500361 100644 --- a/src/pcf_app/pcf_config.cpp +++ b/src/pcf_app/pcf_config.cpp @@ -60,7 +60,7 @@ namespace oai::pcf::config { // int pcf_config::execute() { return RETURNok; } //------------------------------------------------------------------------------ -int pcf_config::load_interface(const Setting &if_cfg, interface_cfg_t &cfg) { +int pcf_config::load_interface(const Setting& if_cfg, interface_cfg_t& cfg) { if_cfg.lookupValue(PCF_CONFIG_STRING_INTERFACE_NAME, cfg.if_name); util::trim(cfg.if_name); if (not boost::iequals(cfg.if_name, "none")) { @@ -68,23 +68,23 @@ int pcf_config::load_interface(const Setting &if_cfg, interface_cfg_t &cfg) { if_cfg.lookupValue(PCF_CONFIG_STRING_IPV4_ADDRESS, address); util::trim(address); if (boost::iequals(address, "read")) { - if (get_inet_addr_infos_from_iface(cfg.if_name, cfg.addr4, cfg.network4, - cfg.mtu)) { + if (get_inet_addr_infos_from_iface( + cfg.if_name, cfg.addr4, cfg.network4, cfg.mtu)) { Logger::pcf_app().error( "Could not read %s network interface configuration", cfg.if_name); return RETURNerror; } } else { std::vector<std::string> words; - boost::split(words, address, boost::is_any_of("/"), - boost::token_compress_on); + boost::split( + words, address, boost::is_any_of("/"), boost::token_compress_on); if (words.size() != 2) { - Logger::pcf_app().error("Bad value " PCF_CONFIG_STRING_IPV4_ADDRESS - " = %s in config file", - address.c_str()); + Logger::pcf_app().error( + "Bad value " PCF_CONFIG_STRING_IPV4_ADDRESS " = %s in config file", + address.c_str()); return RETURNerror; } - unsigned char buf_in_addr[sizeof(struct in6_addr)]; // you never know... + unsigned char buf_in_addr[sizeof(struct in6_addr)]; // you never know... if (inet_pton(AF_INET, util::trim(words.at(0)).c_str(), buf_in_addr) == 1) { memcpy(&cfg.addr4, buf_in_addr, sizeof(struct in_addr)); @@ -95,9 +95,9 @@ int pcf_config::load_interface(const Setting &if_cfg, interface_cfg_t &cfg) { util::trim(words.at(0)).c_str()); return RETURNerror; } - cfg.network4.s_addr = - htons(ntohs(cfg.addr4.s_addr) & - 0xFFFFFFFF << (32 - std::stoi(util::trim(words.at(1))))); + cfg.network4.s_addr = htons( + ntohs(cfg.addr4.s_addr) & + 0xFFFFFFFF << (32 - std::stoi(util::trim(words.at(1))))); } if_cfg.lookupValue(PCF_CONFIG_STRING_SBI_PORT_HTTP1, cfg.http1_port); if_cfg.lookupValue(PCF_CONFIG_STRING_SBI_PORT_HTTP2, cfg.http2_port); @@ -106,7 +106,7 @@ int pcf_config::load_interface(const Setting &if_cfg, interface_cfg_t &cfg) { } //------------------------------------------------------------------------------ -int pcf_config::load(const string &config_file) { +int pcf_config::load(const string& config_file) { Config cfg; unsigned char buf_in_addr[sizeof(struct in_addr) + 1]; unsigned char buf_in6_addr[sizeof(struct in6_addr) + 1]; @@ -114,67 +114,69 @@ int pcf_config::load(const string &config_file) { // Read the file. If there is an error, report it and exit. try { cfg.readFile(config_file.c_str()); - } catch (const FileIOException &fioex) { - Logger::pcf_app().error("I/O error while reading file %s - %s", - config_file.c_str(), fioex.what()); + } catch (const FileIOException& fioex) { + Logger::pcf_app().error( + "I/O error while reading file %s - %s", config_file.c_str(), + fioex.what()); throw; - } catch (const ParseException &pex) { - Logger::pcf_app().error("Parse error at %s:%d - %s", pex.getFile(), - pex.getLine(), pex.getError()); + } catch (const ParseException& pex) { + Logger::pcf_app().error( + "Parse error at %s:%d - %s", pex.getFile(), pex.getLine(), + pex.getError()); throw; } - const Setting &root = cfg.getRoot(); + const Setting& root = cfg.getRoot(); try { - const Setting &pcf_cfg = root[PCF_CONFIG_STRING_PCF_CONFIG]; - } catch (const SettingNotFoundException &nfex) { + const Setting& pcf_cfg = root[PCF_CONFIG_STRING_PCF_CONFIG]; + } catch (const SettingNotFoundException& nfex) { Logger::pcf_app().error("%s : %s", nfex.what(), nfex.getPath()); return RETURNerror; } - const Setting &pcf_cfg = root[PCF_CONFIG_STRING_PCF_CONFIG]; + const Setting& pcf_cfg = root[PCF_CONFIG_STRING_PCF_CONFIG]; try { pcf_cfg.lookupValue(PCF_CONFIG_STRING_FQDN, fqdn); util::trim(fqdn); - } catch (const SettingNotFoundException &nfex) { - Logger::pcf_app().info("%s : %s, No FQDN configured", nfex.what(), - nfex.getPath()); + } catch (const SettingNotFoundException& nfex) { + Logger::pcf_app().info( + "%s : %s, No FQDN configured", nfex.what(), nfex.getPath()); } try { - const Setting &nw_if_cfg = pcf_cfg[PCF_CONFIG_STRING_INTERFACES]; + const Setting& nw_if_cfg = pcf_cfg[PCF_CONFIG_STRING_INTERFACES]; - const Setting &sbi_cfg = nw_if_cfg[PCF_CONFIG_STRING_SBI_INTERFACE]; + const Setting& sbi_cfg = nw_if_cfg[PCF_CONFIG_STRING_SBI_INTERFACE]; load_interface(sbi_cfg, sbi); sbi_cfg.lookupValue(PCF_CONFIG_STRING_API_VERSION, sbi_api_version); - } catch (const SettingNotFoundException &nfex) { + } catch (const SettingNotFoundException& nfex) { Logger::pcf_app().error("%s : %s", nfex.what(), nfex.getPath()); return RETURNerror; } - // Support features - try { - const Setting& support_features = - pcf_cfg[PCF_CONFIG_STRING_SUPPORT_FEATURES]; - string opt; - unsigned int httpVersion = {0}; - support_features.lookupValue( - PCF_CONFIG_STRING_SUPPORT_FEATURES_REGISTER_NRF, opt); - if (boost::iequals(opt, "yes")) { - pcf_features.register_nrf = true; - } else { - pcf_features.register_nrf = false; - } + // Support features + try { + const Setting& support_features = + pcf_cfg[PCF_CONFIG_STRING_SUPPORT_FEATURES]; + string opt; + unsigned int httpVersion = {0}; + support_features.lookupValue( + PCF_CONFIG_STRING_SUPPORT_FEATURES_REGISTER_NRF, opt); + if (boost::iequals(opt, "yes")) { + pcf_features.register_nrf = true; + } else { + pcf_features.register_nrf = false; + } - support_features.lookupValue( - PCF_CONFIG_STRING_SUPPORT_FEATURES_USE_FQDN_DNS, opt); - if (boost::iequals(opt, "yes")) { - pcf_features.use_fqdn = true; - } else { - pcf_features.use_fqdn = false; - } + support_features.lookupValue( + PCF_CONFIG_STRING_SUPPORT_FEATURES_USE_FQDN_DNS, opt); + if (boost::iequals(opt, "yes")) { + pcf_features.use_fqdn = true; + } else { + pcf_features.use_fqdn = false; + } support_features.lookupValue( PCF_CONFIG_STRING_SUPPORT_FEATURES_USE_HTTP2, opt); @@ -184,11 +186,11 @@ int pcf_config::load(const string &config_file) { pcf_features.use_http2 = false; } - } catch (const SettingNotFoundException& nfex) { - Logger::pcf_app().error( - "%s : %s, using defaults", nfex.what(), nfex.getPath()); - return -1; - } + } catch (const SettingNotFoundException& nfex) { + Logger::pcf_app().error( + "%s : %s, using defaults", nfex.what(), nfex.getPath()); + return -1; + } try { string astring = {}; @@ -251,20 +253,18 @@ int pcf_config::load(const string &config_file) { //------------------------------------------------------------------------------ void pcf_config::display() { - Logger::pcf_app().info("==== OPENAIRINTERFACE %s v%s ====", PACKAGE_NAME, - PACKAGE_VERSION); + Logger::pcf_app().info( + "==== OPENAIRINTERFACE %s v%s ====", PACKAGE_NAME, PACKAGE_VERSION); Logger::pcf_app().info("Configuration:"); Logger::pcf_app().info("- FQDN ..................: %s", fqdn.c_str()); Logger::pcf_app().info("- SBI:"); Logger::pcf_app().info(" iface ............: %s", sbi.if_name.c_str()); Logger::pcf_app().info(" ipv4.addr ........: %s", inet_ntoa(sbi.addr4)); - Logger::pcf_app().info(" ipv4.mask ........: %s", - inet_ntoa(sbi.network4)); + Logger::pcf_app().info(" ipv4.mask ........: %s", inet_ntoa(sbi.network4)); Logger::pcf_app().info(" mtu ..............: %d", sbi.mtu); Logger::pcf_app().info(" http1_port .......: %u", sbi.http1_port); Logger::pcf_app().info(" http2_port .......: %u", sbi.http2_port); - Logger::pcf_app().info(" api_version ......: %s", - sbi_api_version.c_str()); + Logger::pcf_app().info(" api_version ......: %s", sbi_api_version.c_str()); if (pcf_features.register_nrf) { Logger::pcf_app().info("- NRF:"); Logger::pcf_app().info( @@ -282,11 +282,9 @@ void pcf_config::display() { " Register to NRF........: %s", pcf_features.register_nrf ? "Yes" : "No"); Logger::pcf_app().info( - " Use FQDN ..............: %s", - pcf_features.use_fqdn ? "Yes" : "No"); + " Use FQDN ..............: %s", pcf_features.use_fqdn ? "Yes" : "No"); Logger::pcf_app().info( " Use HTTP2..............: %s", pcf_features.use_http2 ? "Yes" : "No"); - } //------------------------------------------------------------------------------ @@ -307,7 +305,8 @@ void pcf_config::display() { // {"URI Path", // "/npcf-nsselection/<api_version>/network-slice-information"}, // {"Details", -// "Retrieve the Network Slice Selection Information (PDU Session)"}}}}; +// "Retrieve the Network Slice Selection Information (PDU +// Session)"}}}}; // return true; // } //------------------------------------------------------------------------------ diff --git a/src/pcf_app/pcf_config.hpp b/src/pcf_app/pcf_config.hpp index f6359e8..444e4b0 100644 --- a/src/pcf_app/pcf_config.hpp +++ b/src/pcf_app/pcf_config.hpp @@ -41,7 +41,7 @@ #include <string> #include <unistd.h> -//using namespace oai::pcf::model; +// using namespace oai::pcf::model; #define PCF_CONFIG_STRING_PCF_CONFIG "PCF" #define PCF_CONFIG_STRING_FQDN "FQDN" @@ -60,7 +60,7 @@ #define PCF_CONFIG_STRING_ITTI_TASKS "ITTI_TASKS" #define PCF_CONFIG_STRING_ITTI_TIMER_SCHED_PARAMS "ITTI_TIMER_SCHED_PARAMS" #define PCF_CONFIG_STRING_SBI_SCHED_PARAMS "SBI_SCHED_PARAMS" - + #define PCF_CONFIG_STRING_SUPPORT_FEATURES "SUPPORT_FEATURES" #define PCF_CONFIG_STRING_SUPPORT_FEATURES_REGISTER_NRF "REGISTER_NRF" #define PCF_CONFIG_STRING_NRF "NRF" @@ -83,11 +83,11 @@ typedef struct interface_cfg_s { } interface_cfg_t; class pcf_config { -protected: -private: - int load_interface(const libconfig::Setting &if_cfg, interface_cfg_t &cfg); + protected: + private: + int load_interface(const libconfig::Setting& if_cfg, interface_cfg_t& cfg); -public: + public: /* Reader/writer lock for this configuration */ std::mutex m_rw_lock; std::string pid_dir; @@ -135,12 +135,12 @@ public: void lock() { m_rw_lock.lock(); }; void unlock() { m_rw_lock.unlock(); }; - int load(const std::string &config_file); + int load(const std::string& config_file); int execute(); void display(); static bool parse_config(); }; -} // namespace pcf +} // namespace oai::pcf::config #endif /* FILE_PCF_CONFIG_HPP_SEEN */ diff --git a/src/pcf_app/pcf_nrf.cpp b/src/pcf_app/pcf_nrf.cpp index d3c13ae..4dc4bd2 100644 --- a/src/pcf_app/pcf_nrf.cpp +++ b/src/pcf_app/pcf_nrf.cpp @@ -45,7 +45,7 @@ using namespace oai::pcf::model; using namespace std; -extern pcf_nrf *pcf_nrf_inst; +extern pcf_nrf* pcf_nrf_inst; extern pcf_config pcf_cfg; pcf_client* pcf_client_instance = nullptr; @@ -61,7 +61,8 @@ void pcf_nrf::get_pcf_api_root(std::string& api_root) { } //--------------------------------------------------------------------------------------------- -void pcf_nrf::generate_pcf_profile (pcf_profile& pcf_nf_profile, std::string& pcf_instance_id) { +void pcf_nrf::generate_pcf_profile( + pcf_profile& pcf_nf_profile, std::string& pcf_instance_id) { // TODO: remove hardcoded values // generate UUID pcf_nf_profile.set_nf_instance_id(pcf_instance_id); diff --git a/src/pcf_app/pcf_nrf.hpp b/src/pcf_app/pcf_nrf.hpp index f6defbd..77ca83d 100644 --- a/src/pcf_app/pcf_nrf.hpp +++ b/src/pcf_app/pcf_nrf.hpp @@ -44,7 +44,7 @@ namespace oai::pcf::app { class pcf_nrf { -public: + public: explicit pcf_nrf(pcf_event& ev); pcf_nrf(pcf_nrf const&) = delete; void operator=(pcf_nrf const&) = delete; @@ -83,7 +83,8 @@ public: * @param [void] * @return void */ - void generate_pcf_profile(pcf_profile& pcf_nf_profile, std::string& pcf_instance_id); + void generate_pcf_profile( + pcf_profile& pcf_nf_profile, std::string& pcf_instance_id); /* * Send request to N11 task to trigger NF instance registration to NRF @@ -98,13 +99,13 @@ public: * @return void */ void trigger_nf_deregistration(); - private: - pcf_profile nf_instance_profile; // PCF profile - std::string pcf_instance_id; // PCF instance id - // for Event Handling - pcf_event& event_sub; - bs2::connection task_connection; -}; -}// namespace pcf -#endif /* FILE_PCF_NRF_HPP_SEEN */ + private: + pcf_profile nf_instance_profile; // PCF profile + std::string pcf_instance_id; // PCF instance id + // for Event Handling + pcf_event& event_sub; + bs2::connection task_connection; +}; +} // namespace oai::pcf::app +#endif /* FILE_PCF_NRF_HPP_SEEN */ diff --git a/src/pcf_app/pcf_profile.cpp b/src/pcf_app/pcf_profile.cpp index 5323278..f52e346 100644 --- a/src/pcf_app/pcf_profile.cpp +++ b/src/pcf_app/pcf_profile.cpp @@ -368,7 +368,7 @@ void pcf_profile::display() const { Logger::pcf_app().debug(" Priority: %d", priority); Logger::pcf_app().debug(" Capacity: %d", capacity); - // SNSSAIs + // SNSSAIs if (snssais.size() > 0) { Logger::pcf_app().debug(" SNSSAI:"); } @@ -399,7 +399,7 @@ void pcf_profile::display() const { } for (auto dnn : pcf_info.dnn_list) { Logger::pcf_app().debug("\t\t DNN: %s", dnn.c_str()); - } + } } //------------------------------------------------------------------------------ @@ -437,10 +437,10 @@ void pcf_profile::to_json(nlohmann::json& data) const { data["custom_info"] = custom_info; // PCF info - data["pcfInfo"]["groupId"] = pcf_info.groupid; - data["pcfInfo"]["dnnList"] = nlohmann::json::array(); - data["pcfInfo"]["supiRanges"] = nlohmann::json::array(); - data["pcfInfo"]["gpsiRanges"] = nlohmann::json::array(); + data["pcfInfo"]["groupId"] = pcf_info.groupid; + data["pcfInfo"]["dnnList"] = nlohmann::json::array(); + data["pcfInfo"]["supiRanges"] = nlohmann::json::array(); + data["pcfInfo"]["gpsiRanges"] = nlohmann::json::array(); for (auto supi : pcf_info.supi_ranges) { nlohmann::json tmp = {}; @@ -525,8 +525,7 @@ void pcf_profile::from_json(const nlohmann::json& data) { pcf_info.groupid = info["groupId"].get<std::string>(); } if (info.find("dnnList") != info.end()) { - nlohmann::json dnnList = - data["pcfInfo"]["dnnList"]; + nlohmann::json dnnList = data["pcfInfo"]["dnnList"]; for (auto d : dnnList) { pcf_info.dnn_list.push_back(d); } @@ -550,10 +549,8 @@ void pcf_profile::from_json(const nlohmann::json& data) { gpsi.identity_range.pattern = d["pattern"]; pcf_info.gpsi_ranges.push_back(gpsi); } - - // TODO: custom_info; - + // TODO: custom_info; } } diff --git a/src/pcf_app/pcf_profile.hpp b/src/pcf_app/pcf_profile.hpp index 3fdccda..08bb332 100644 --- a/src/pcf_app/pcf_profile.hpp +++ b/src/pcf_app/pcf_profile.hpp @@ -44,8 +44,8 @@ // namespace oai { // namespace pcf { -namespace oai::pcf::app{ - +namespace oai::pcf::app { + using namespace std; class nf_profile : public std::enable_shared_from_this<nf_profile> { public: @@ -457,7 +457,7 @@ class pcf_profile : public nf_profile { }; // } // namespace app -} // namespace pcf +} // namespace oai::pcf::app // } // namespace oai #endif diff --git a/src/pcf_app/pcf_sm_policy_control.cpp b/src/pcf_app/pcf_sm_policy_control.cpp index 1de0d93..78ecc88 100644 --- a/src/pcf_app/pcf_sm_policy_control.cpp +++ b/src/pcf_app/pcf_sm_policy_control.cpp @@ -45,7 +45,7 @@ using namespace oai::pcf::model; using namespace std; -extern pcf_smpc *pcf_smpc_inst; +extern pcf_smpc* pcf_smpc_inst; extern pcf_config pcf_cfg; pcf_client* pcf_client_instance = nullptr; diff --git a/src/pcf_app/pcf_sm_policy_control.hpp b/src/pcf_app/pcf_sm_policy_control.hpp index 2767dcb..17953dc 100644 --- a/src/pcf_app/pcf_sm_policy_control.hpp +++ b/src/pcf_app/pcf_sm_policy_control.hpp @@ -49,7 +49,7 @@ namespace oai::pcf::app { class pcf_smpc { -public: + public: explicit pcf_smpc(); pcf_smpc(pcf_smpc const&) = delete; void operator=(pcf_smpc const&) = delete; @@ -63,13 +63,13 @@ public: */ void create_sm_policy_handler(); - // void delete_sm_policy(const std::string &smPolicyId, const SmPolicyDeleteData &smPolicyDeleteData); - void get_sm_policy(const std::string &smPolicyId); - //void update_sm_policy(const std::string &smPolicyId, const SmPolicyUpdateContextData &smPolicyUpdateContextData); + // void delete_sm_policy(const std::string &smPolicyId, const + // SmPolicyDeleteData &smPolicyDeleteData); + void get_sm_policy(const std::string& smPolicyId); + // void update_sm_policy(const std::string &smPolicyId, const + // SmPolicyUpdateContextData &smPolicyUpdateContextData); - private: - -}; -}// namespace pcf + private: +}; +} // namespace oai::pcf::app #endif /* FILE_PCF_SM_POLICY_CONTROL_SEEN */ - -- GitLab