lattice_sdk/api/types/
alert.rs

1pub use crate::prelude::*;
2
3/// An alert informs operators of critical events related to system performance and mission
4/// execution. An alert is produced as a result of one or more alert conditions.
5#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)]
6pub struct Alert {
7    /// Short, machine-readable code that describes this alert. This code is intended to provide systems off-asset
8    /// with a lookup key to retrieve more detailed information about the alert.
9    #[serde(rename = "alertCode")]
10    #[serde(skip_serializing_if = "Option::is_none")]
11    pub alert_code: Option<String>,
12    /// Human-readable description of this alert. The description is intended for display in the UI for human
13    /// understanding and should not be used for machine processing. If the description is fixed and the vehicle controller
14    /// provides no dynamic substitutions, then prefer lookup based on alert_code.
15    #[serde(skip_serializing_if = "Option::is_none")]
16    pub description: Option<String>,
17    /// Alert level (Warning, Caution, or Advisory).
18    #[serde(skip_serializing_if = "Option::is_none")]
19    pub level: Option<AlertLevel>,
20    /// Time at which this alert was activated.
21    #[serde(rename = "activatedTime")]
22    #[serde(skip_serializing_if = "Option::is_none")]
23    pub activated_time: Option<DateTime<Utc>>,
24    /// Set of conditions which have activated this alert.
25    #[serde(rename = "activeConditions")]
26    #[serde(skip_serializing_if = "Option::is_none")]
27    pub active_conditions: Option<Vec<AlertCondition>>,
28}