/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.2.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CriticalAlert {
    /// Unique identifier for the alert
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<i32>,
    /// Type of alert (e.g., critical_error)
    #[serde(rename = "alert_type", skip_serializing_if = "Option::is_none")]
    pub alert_type: Option<String>,
    /// The message content of the alert
    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    /// Time when the alert was created
    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// Acknowledgment status of the alert, can be true, false, or null if not set
    #[serde(rename = "acknowledged", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub acknowledged: Option<Option<bool>>,
    /// Workspace id if the alert is in the scope of a workspace
    #[serde(rename = "workspace_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub workspace_id: Option<Option<String>>,
}

impl CriticalAlert {
    pub fn new() -> CriticalAlert {
        CriticalAlert {
            id: None,
            alert_type: None,
            message: None,
            created_at: None,
            acknowledged: None,
            workspace_id: None,
        }
    }
}

