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 storage device, such as a disk drive or optical media device.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct Device {
    /// The size, in bytes, of the storage device.
    #[serde(rename = "CapacityBytes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub capacity_bytes: Option<i64>,
    /// The name of the manufacturer of this device.
    #[serde(rename = "Manufacturer")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub manufacturer: Option<String>,
    /// The product model number of this device.
    #[serde(rename = "Model")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub model: Option<String>,
    /// The name of the Resource or array member.
    #[serde(rename = "Name")]
    pub name: String,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
}

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