-
Notifications
You must be signed in to change notification settings - Fork 0
/
IotAlertMessage.java
86 lines (69 loc) · 1.8 KB
/
IotAlertMessage.java
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
75
76
77
78
79
80
81
82
83
84
85
86
package kafkastreams.iot.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
public class IotAlertMessage {
@JsonProperty
String id;
@JsonProperty
String metricName;
@JsonProperty
String ruleName;
@JsonProperty
String payload;
@JsonProperty("controlAction")
String controlAction;
@JsonCreator
public IotAlertMessage(
@JsonProperty("id") String id,
@JsonProperty("metricName") String metricName,
@JsonProperty("ruleName") String ruleName,
@JsonProperty("payload") String payload,
@JsonProperty("controlAction") String controlAction
) {
this.id = id;
this.metricName = metricName;
this.ruleName = ruleName;
this.payload = payload;
this.controlAction = controlAction;
}
@JsonProperty
public String getId() {
return id;
}
@JsonProperty
public void setId(String id) {
this.id = id;
}
@JsonProperty
public String getMetricName() {
return metricName;
}
@JsonProperty
public void setMetricName(String metricName) {
this.metricName = metricName;
}
@JsonProperty
public String getRuleName() {
return ruleName;
}
@JsonProperty
public void setRuleName(String ruleName) {
this.ruleName = ruleName;
}
@JsonProperty
public String getPayload() {
return payload;
}
@JsonProperty
public void setPayload(String payload) {
this.payload = payload;
}
@JsonProperty
public String getControlAction() {
return controlAction;
}
@JsonProperty
public void setControlAction(String controlAction) {
this.controlAction = controlAction;
}
}