summaryrefslogtreecommitdiffstats
path: root/veslibrary/ves_cpplibrary/src/lib/encode/include/XThresholdCrossingAlertFields.h
blob: 7b9d7fa336c56825c0726950923c51422e254f11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#pragma once
        
#include "XCommonEventHeader.h"
#include "XCounter.h"

namespace vagt
{
    namespace encode
    {
        enum XEnumThresholdCrossingAlertFieldsAlertAction
        {
            XEnumThresholdCrossingAlertFieldsAlertActionCLEAR,
            XEnumThresholdCrossingAlertFieldsAlertActionCONT,
            XEnumThresholdCrossingAlertFieldsAlertActionSET,
        };

        enum XEnumThresholdCrossingAlertFieldsAlertType
        {
            XEnumThresholdCrossingAlertFieldsAlertTypeCARD_ANOMALY,
            XEnumThresholdCrossingAlertFieldsAlertTypeELEMENT_ANOMALY,
            XEnumThresholdCrossingAlertFieldsAlertTypeINTERFACE_ANOMALY,
            XEnumThresholdCrossingAlertFieldsAlertTypeSERVICE_ANOMALY,
        };

        enum XEnumThresholdCrossingAlertFieldsEventSeverity
        {
            XEnumThresholdCrossingAlertFieldsEventSeverityCRITICAL,
            XEnumThresholdCrossingAlertFieldsEventSeverityMAJOR,
            XEnumThresholdCrossingAlertFieldsEventSeverityMINOR,
            XEnumThresholdCrossingAlertFieldsEventSeverityWARNING,
            XEnumThresholdCrossingAlertFieldsEventSeverityNORMAL,
        };

        enum XEnumThresholdCrossingAlertFieldsThresholdCrossingFieldsVersion
        {
            XEnumThresholdCrossingAlertFieldsThresholdCrossingFieldsVersion4_0,
        };

        class XThresholdCrossingAlertFields : public XExtendEvent
        {
        public:
            virtual std::string toString() = 0;

            virtual std::shared_ptr<XCommonEventHeader> getCommonHeader() = 0;

            virtual void setAlertDescription(const XString& alertDescription)= 0;
            virtual void setAlertType(XEnumThresholdCrossingAlertFieldsAlertType alertType)= 0;
            virtual void setInterfaceName(const XString& interfaceName)= 0;
            virtual void setCollectionTimestamp(const XString& collectionTimestamp)= 0;
            virtual void setEventSeverity(XEnumThresholdCrossingAlertFieldsEventSeverity eventSeverity)= 0;
            virtual void setPossibleRootCause(const XString& possibleRootCause)= 0;
            virtual void setAssociatedAlertIdList(const XArrayOfString& associatedAlertIdList)= 0;
            virtual void setAlertValue(const XString& alertValue)= 0;
            virtual void setDataCollector(const XString& dataCollector)= 0;
            virtual void setAdditionalParameters(const XArrayOfXCounter& additionalParameters)= 0;
            virtual void setAlertAction(XEnumThresholdCrossingAlertFieldsAlertAction alertAction)= 0;
            virtual void setNetworkService(const XString& networkService)= 0;
            virtual void setElementType(const XString& elementType)= 0;
            virtual void setAdditionalFields(const XHashMap& additionalFields)= 0;
            virtual void setEventStartTimestamp(const XString& eventStartTimestamp)= 0;

            static std::shared_ptr<XThresholdCrossingAlertFields> create(std::shared_ptr<XCommonEventHeader> header,
                XEnumThresholdCrossingAlertFieldsAlertAction alertAction,
                XEnumThresholdCrossingAlertFieldsAlertType alertType,
                XEnumThresholdCrossingAlertFieldsEventSeverity eventSeverity,
                const XString& alertDescription,
                const XString& collectionTimestamp,
                const XString& eventStartTimestamp,
                const XArrayOfXCounter& additionalParameters
                );
        };
    }
}