windmill_api/models/
critical_alert.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.558.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CriticalAlert {
16    /// Unique identifier for the alert
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<i32>,
19    /// Type of alert (e.g., critical_error)
20    #[serde(rename = "alert_type", skip_serializing_if = "Option::is_none")]
21    pub alert_type: Option<String>,
22    /// The message content of the alert
23    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
24    pub message: Option<String>,
25    /// Time when the alert was created
26    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
27    pub created_at: Option<String>,
28    /// Acknowledgment status of the alert, can be true, false, or null if not set
29    #[serde(rename = "acknowledged", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub acknowledged: Option<Option<bool>>,
31    /// Workspace id if the alert is in the scope of a workspace
32    #[serde(rename = "workspace_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
33    pub workspace_id: Option<Option<String>>,
34}
35
36impl CriticalAlert {
37    pub fn new() -> CriticalAlert {
38        CriticalAlert {
39            id: None,
40            alert_type: None,
41            message: None,
42            created_at: None,
43            acknowledged: None,
44            workspace_id: None,
45        }
46    }
47}
48