-
Notifications
You must be signed in to change notification settings - Fork 9
/
OnmsSituationFeedbackType.ts
41 lines (36 loc) · 1.34 KB
/
OnmsSituationFeedbackType.ts
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
import {IHasUrlValue} from '../api/IHasUrlValue';
import {OnmsEnum, forId, forLabel} from '../internal/OnmsEnum';
/**
* Represents an OpenNMS "SituationFeedback" type.
* @category Model
*/
export class OnmsSituationFeedbackType extends OnmsEnum<string> implements IHasUrlValue {
/** Given an ID, return the matching SituationFeedback type object. */
public static forId(id?: string) {
return forId(FeedbackTypes, id);
}
/** Given a label, return the matching snmp status type object. */
public static forLabel(label?: string) {
return forLabel(FeedbackTypes, label);
}
/** @inheritdoc */
public get urlValue() {
return String(this.id);
}
}
/* tslint:disable:object-literal-sort-keys */
/**
* Contains constant instances of all feedback types.
* @category Model
*/
export const FeedbackTypes = {
/** Alarm is correctly correlated */
CORRECT: new OnmsSituationFeedbackType('CORRECT', 'CORRECT'),
/** Alarm should be correlated in a new Situation */
CREATE_SITUATION: new OnmsSituationFeedbackType('CREATE_SITUATION', 'CREATE_SITUATION'),
/** Alarm was incorrectly correlated */
FALSE_POSITIVE: new OnmsSituationFeedbackType('FALSE_POSITIVE', 'FALSE_POSITIVE'),
/** Alarm was incorrectly ommitted */
FALSE_NEGATIVE: new OnmsSituationFeedbackType('FALSE_NEGATIVE', 'FALSE_NEGATIVE'),
};
Object.freeze(FeedbackTypes);