redfish-codegen 0.3.1

An unopinionated translation of the Redfish specification into Rust.
Documentation
// Generated by redfish-codegen. Do not modify.

use crate::models;

/// A condition that requires attention.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct Condition {
    #[serde(rename = "LogEntry")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub log_entry: Option<models::odata_v4::IdRef>,
    /// The human-readable message for this condition.
    #[serde(rename = "Message")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    /// An array of message arguments that are substituted for the arguments in the message when looked up in the message registry.
    #[serde(rename = "MessageArgs")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub message_args: Option<Vec<String>>,
    /// The identifier for the message.
    #[serde(rename = "MessageId")]
    pub message_id: String,
    #[serde(rename = "OriginOfCondition")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub origin_of_condition: Option<models::odata_v4::IdRef>,
    /// Suggestions on how to resolve the condition.
    #[serde(rename = "Resolution")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub resolution: Option<String>,
    #[serde(rename = "Severity")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub severity: Option<models::resource::Health>,
    /// The time the condition occurred.
    #[serde(rename = "Timestamp")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<String>,
}

impl crate::Metadata<'static> for Condition {
    const JSON_SCHEMA: &'static str = "Resource.json";
}