X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frest%2Fmodel%2FSubsequentAction.h;fp=src%2Frest%2Fmodel%2FSubsequentAction.h;h=0000000000000000000000000000000000000000;hb=e64778dac480d66d93449efd3e9767cea4f980f9;hp=094357961f29c3dc3f15cd9b96cbcf9bac712beb;hpb=56044b79a2282e50a8c271b36289b1724cb40cd8;p=ric-plt%2Fxapp-frame-cpp.git diff --git a/src/rest/model/SubsequentAction.h b/src/rest/model/SubsequentAction.h deleted file mode 100644 index 0943579..0000000 --- a/src/rest/model/SubsequentAction.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef XAPP_MODEL_SubsequentAction_H -#define XAPP_MODEL_SubsequentAction_H -#include "ModelBase.h" - -namespace xapp { -namespace model { - -struct SubsequentAction: ModelBase { - std::string SubsequentActionType; - std::string TimeToWait; - json validator_schema = R"( - { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SubsequentAction", - "properties": { - "SubsequentActionType": { - "description": "Type of Subsequent Action", - "type": "string", - "enum": ["wait", "continue"] - - }, - "TimeToWait": { - "description": "Time to waiting", - "type": "string", - "enum": ["zero", "w1ms", "w2ms", "w5ms", "w10ms", "w20ms", "w30ms", - "w40ms", "w50ms", "w100ms", "w200ms", "w500ms", "w1s", - "w2s", "w5s", "w10s", "w20s", "w60s"] - } - }, - "required": [ - "SubsequentActionType", - "TimeToWait" - ], - "type": "object" - })"_json; - - virtual json get_validator_schema() const { return validator_schema; } -}; - -void from_json(const json& j, SubsequentAction& ref) { - - std::cout << __PRETTY_FUNCTION__ << "\n"; - ref.validate_json(j); - - j.at("SubsequentActionType").get_to(ref.SubsequentActionType); - j.at("TimeToWait").get_to(ref.TimeToWait); -} - -void to_json(json& j, const SubsequentAction& ref) { - - j = json { - {"SubsequentActionType",ref.SubsequentActionType}, - {"TimeToWait", ref.TimeToWait} - }; -} - -} /*model*/ -} /*xapp*/ -#endif /*XAPP_MODEL_SubsequentAction_H*/