X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frest%2Fmodel%2FSubscriptionParams_E2SubscriptionDirectives.h;fp=src%2Frest%2Fmodel%2FSubscriptionParams_E2SubscriptionDirectives.h;h=0000000000000000000000000000000000000000;hb=e64778dac480d66d93449efd3e9767cea4f980f9;hp=a0f783cecaa62cbb80787d0ba756db54ae7bc383;hpb=56044b79a2282e50a8c271b36289b1724cb40cd8;p=ric-plt%2Fxapp-frame-cpp.git diff --git a/src/rest/model/SubscriptionParams_E2SubscriptionDirectives.h b/src/rest/model/SubscriptionParams_E2SubscriptionDirectives.h deleted file mode 100644 index a0f783c..0000000 --- a/src/rest/model/SubscriptionParams_E2SubscriptionDirectives.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef XAPP_MODEL_SubscriptionParams_E2SubscriptionDirectives_H -#define XAPP_MODEL_SubscriptionParams_E2SubscriptionDirectives_H -#include "ModelBase.h" - -namespace xapp { -namespace model { - -struct SubscriptionParams_E2SubscriptionDirectives: ModelBase { - int E2RetryCount; - int E2TimeoutTimerValue; - bool RMRRoutingNeeded; - json validator_schema = R"( - { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SubscriptionParams_E2SubscriptionDirectives", - "description": "Optional. If not set Submgr uses its default values", - "properties": { - "E2RetryCount": { - "description": "How many times E2 subscription request is retried", - "type": "integer", - "minimum": 0, - "maximum": 10 - }, - "E2TimeoutTimerValue": { - "description": "How long time response is waited from E2 node", - "type": "integer", - "minimum": 0, - "maximum": 10 - }, - "RMRRoutingNeeded": { - "description": "Subscription needs RMR route from E2Term to xApp", - "type": "boolean" - } - }, - "required": [ - "E2TimeoutTimerValue", - "E2RetryCount", - "RMRRoutingNeeded" - ], - "type": "object" - })"_json; - - virtual json get_validator_schema() const { return validator_schema; } -}; - -void from_json(const json& j, SubscriptionParams_E2SubscriptionDirectives& ref) { - - std::cout << __PRETTY_FUNCTION__ << std::endl; - - j.at("E2RetryCount").get_to(ref.E2RetryCount); - j.at("E2TimeoutTimerValue").get_to(ref.E2TimeoutTimerValue); - j.at("RMRRoutingNeeded").get_to(ref.RMRRoutingNeeded); -} - -void to_json(json& j, const SubscriptionParams_E2SubscriptionDirectives& ref) { - - j = json { - {"E2RetryCount", ref.E2RetryCount}, - {"E2TimeoutTimerValue", ref.E2TimeoutTimerValue}, - {"RMRRoutingNeeded", ref.RMRRoutingNeeded}, - }; -} - -} /*namespace model*/ -} /*namespace xapp*/ -#endif /*XAPP_MODEL_SubscriptionParams_ClientEndpoint_H*/