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
use serde::{Deserialize, Serialize};
use crate::serde::{deserialize_icinga_timestamp, serialize_icinga_timestamp};
use crate::types::common::check_result::IcingaCheckResult;
use crate::types::enums::notification_type::IcingaNotificationType;
use crate::types::names::{
IcingaHostName, IcingaNotificationCommandName, IcingaServiceName, IcingaUserName,
};
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct IcingaEventNotification {
#[serde(
serialize_with = "serialize_icinga_timestamp",
deserialize_with = "deserialize_icinga_timestamp"
)]
pub timestamp: time::OffsetDateTime,
pub host: IcingaHostName,
pub service: Option<IcingaServiceName>,
pub command: IcingaNotificationCommandName,
pub users: Vec<IcingaUserName>,
pub notification_type: IcingaNotificationType,
pub author: String,
pub text: String,
pub check_result: IcingaCheckResult,
}