redfish-codegen 0.3.1

An unopinionated translation of the Redfish specification into Rust.
Documentation
// Generated by redfish-codegen. Do not modify.


/// The port metrics for a Gen-Z interface.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct GenZ {
    /// The total number of Access Key Violations detected.
    #[serde(rename = "AccessKeyViolations")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub access_key_violations: Option<i64>,
    /// The total number of ECRC transient errors detected.
    #[serde(rename = "EndToEndCRCErrors")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub end_to_end_crc_errors: Option<i64>,
    /// The total number of times Link-Level Reliability (LLR) recovery has been initiated.
    #[serde(rename = "LLRRecovery")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub llr_recovery: Option<i64>,
    /// The total number of link-local non-transient errors detected.
    #[serde(rename = "LinkNTE")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub link_nte: Option<i64>,
    /// The number of packets with the Congestion ECN bit set.
    #[serde(rename = "MarkedECN")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub marked_ecn: Option<i64>,
    /// The total number transient errors detected that are unrelated to CRC validation.
    #[serde(rename = "NonCRCTransientErrors")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub non_crc_transient_errors: Option<i64>,
    /// The total number of PCRC transient errors detected.
    #[serde(rename = "PacketCRCErrors")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub packet_crc_errors: Option<i64>,
    /// The number of packets discarded due to the Congestion Deadline sub-field reaching zero.
    #[serde(rename = "PacketDeadlineDiscards")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub packet_deadline_discards: Option<i64>,
    /// The total number of packets received with a stomped ECRC field.
    #[serde(rename = "RXStompedECRC")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub rx_stomped_ecrc: Option<i64>,
    /// The number of packets received on this interface with the Congestion ECN bit set.
    #[serde(rename = "ReceivedECN")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub received_ecn: Option<i64>,
    /// The total number of packets that this interface stomped the ECRC field.
    #[serde(rename = "TXStompedECRC")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub tx_stomped_ecrc: Option<i64>,
}

impl crate::Metadata<'static> for GenZ {
    const JSON_SCHEMA: &'static str = "PortMetrics.v1_4_0.json";
}