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;

/// The NVMe SMART Critical Warnings for a storage controller.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[serde(untagged)]
pub enum NVMeSMARTCriticalWarnings {
    V1_0_2(models::storage_controller::v1_0_2::NVMeSMARTCriticalWarnings),
    V1_1_1(models::storage_controller::v1_1_1::NVMeSMARTCriticalWarnings),
    V1_2_0(models::storage_controller::v1_2_0::NVMeSMARTCriticalWarnings),
    V1_3_0(models::storage_controller::v1_3_0::NVMeSMARTCriticalWarnings),
    V1_4_0(models::storage_controller::v1_4_0::NVMeSMARTCriticalWarnings),
    V1_5_0(models::storage_controller::v1_5_0::NVMeSMARTCriticalWarnings),
    V1_6_0(models::storage_controller::v1_6_0::NVMeSMARTCriticalWarnings),
    V1_7_0(models::storage_controller::v1_7_0::NVMeSMARTCriticalWarnings),
}

#[allow(clippy::derivable_impls)]
impl Default for NVMeSMARTCriticalWarnings {
     fn default() -> NVMeSMARTCriticalWarnings {
        NVMeSMARTCriticalWarnings::V1_0_2(models::storage_controller::v1_0_2::NVMeSMARTCriticalWarnings::default())
     }
}

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