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;

/// This type defines information for a PCIe slot.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct PCIeSlot {
    /// An indication of whether this PCIe slot supports hotplug.
    #[serde(rename = "HotPluggable")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub hot_pluggable: Option<bool>,
    /// 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 = "Links")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub links: Option<models::pcie_slots::v1_5_0::PCIeLinks>,
    #[serde(rename = "Location")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub location: Option<models::resource::Location>,
    /// An indicator allowing an operator to physically locate this resource.
    #[serde(rename = "LocationIndicatorActive")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub location_indicator_active: Option<bool>,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    #[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_slots::v1_5_0::SlotTypes>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
}

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