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 PCIe slot associated with a PCIe device.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct Slot {
    #[serde(rename = "LaneSplitting")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub lane_splitting: Option<models::pcie_device::v1_11_0::LaneSplittingType>,
    /// The number of PCIe lanes supported by this slot.
    #[serde(rename = "Lanes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub lanes: Option<i64>,
    #[serde(rename = "Location")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub location: Option<models::resource::Location>,
    #[serde(rename = "PCIeType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub pcie_type: Option<models::pcie_device::PCIeTypes>,
    #[serde(rename = "SlotType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub slot_type: Option<models::pcie_device::v1_11_0::SlotType>,
}

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