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;

/// A small form-factor pluggable (SFP) device attached to a port.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct SFP {
    #[serde(rename = "FiberConnectionType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub fiber_connection_type: Option<models::port::v1_9_0::FiberConnectionType>,
    /// The manufacturer of this SFP.
    #[serde(rename = "Manufacturer")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub manufacturer: Option<String>,
    #[serde(rename = "MediumType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub medium_type: Option<models::port::v1_9_0::MediumType>,
    /// The part number for this SFP.
    #[serde(rename = "PartNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub part_number: Option<String>,
    /// The serial number for this SFP.
    #[serde(rename = "SerialNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub serial_number: Option<String>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
    /// The types of SFP devices that can be attached to this port.
    #[serde(rename = "SupportedSFPTypes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub supported_sfp_types: Option<Vec<models::port::v1_9_0::SFPType>>,
    #[serde(rename = "Type")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub r#type: Option<models::port::v1_9_0::SFPType>,
}

impl crate::Metadata<'static> for SFP {
    const JSON_SCHEMA: &'static str = "Port.v1_9_0.json";
}