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 CXL-specific properties of a PCIe device.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct CXLDevice {
    #[serde(rename = "DeviceType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub device_type: Option<models::pcie_device::v1_11_1::CXLDeviceType>,
    /// Indicates whether the CXL device supports egress port congestion management.
    #[serde(rename = "EgressPortCongestionSupport")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub egress_port_congestion_support: Option<bool>,
    /// The maximum number of logical devices supported by this CXL device.
    #[serde(rename = "MaxNumberLogicalDevices")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_number_logical_devices: Option<f64>,
    /// Indicates whether the CXL device supports throughput reduction.
    #[serde(rename = "ThroughputReductionSupport")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub throughput_reduction_support: Option<bool>,
    /// The timestamp set on the CXL device.
    #[serde(rename = "Timestamp")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<String>,
}

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