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 StorageController schema describes a storage controller and its properties.  A storage controller represents a physical or virtual storage device that produces volumes.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct StorageController {
    #[serde(rename = "@odata.id")]
    #[serde(skip_deserializing)]
    pub odata_id: models::odata_v4::Id,
    /// The user-assigned asset tag for this storage controller.
    #[serde(rename = "AssetTag")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub asset_tag: Option<String>,
    /// The firmware version of this storage controller.
    #[serde(rename = "FirmwareVersion")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub firmware_version: Option<String>,
    /// The durable names for the storage controller.
    #[serde(rename = "Identifiers")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub identifiers: Option<Vec<models::resource::Identifier>>,
    /// The manufacturer of this storage controller.
    #[serde(rename = "Manufacturer")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub manufacturer: Option<String>,
    /// The identifier for the member within the collection.
    #[serde(rename = "MemberId")]
    pub member_id: String,
    /// The model number for the storage controller.
    #[serde(rename = "Model")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub model: Option<String>,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    /// The part number for this storage controller.
    #[serde(rename = "PartNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub part_number: Option<String>,
    /// The SKU for this storage controller.
    #[serde(rename = "SKU")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sku: Option<String>,
    /// The serial number for this storage controller.
    #[serde(rename = "SerialNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub serial_number: Option<String>,
    /// The maximum speed of the storage controller's device interface.
    #[serde(rename = "SpeedGbps")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub speed_gbps: Option<f64>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
    /// The supported set of protocols for communicating to this storage controller.
    #[serde(rename = "SupportedControllerProtocols")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub supported_controller_protocols: Option<Vec<models::protocol::Protocol>>,
    /// The protocols that the storage controller can use to communicate with attached devices.
    #[serde(rename = "SupportedDeviceProtocols")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub supported_device_protocols: Option<Vec<models::protocol::Protocol>>,
}

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