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;

/// Details of a power supplies associated with this system or device.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct PowerSupply {
    #[serde(rename = "@odata.id")]
    #[serde(skip_deserializing)]
    pub odata_id: models::odata_v4::Id,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::power::v1_7_1::PowerSupplyActions>,
    #[serde(rename = "Assembly")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub assembly: Option<models::odata_v4::IdRef>,
    /// The measured efficiency of this power supply as a percentage.
    #[serde(rename = "EfficiencyPercent")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub efficiency_percent: Option<f64>,
    /// The firmware version for this power supply.
    #[serde(rename = "FirmwareVersion")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub firmware_version: Option<String>,
    /// An indication of whether this device can be inserted or removed while the equipment is in operation.
    #[serde(rename = "HotPluggable")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub hot_pluggable: Option<bool>,
    #[serde(rename = "IndicatorLED")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub indicator_led: Option<models::resource::IndicatorLED>,
    /// The input ranges that the power supply can use.
    #[serde(rename = "InputRanges")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub input_ranges: Option<Vec<models::power::v1_7_1::InputRange>>,
    /// The average power output of this power supply.
    #[serde(rename = "LastPowerOutputWatts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub last_power_output_watts: Option<f64>,
    /// The line input voltage at which the power supply is operating.
    #[serde(rename = "LineInputVoltage")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub line_input_voltage: Option<f64>,
    #[serde(rename = "LineInputVoltageType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub line_input_voltage_type: Option<models::power::v1_7_1::LineInputVoltageType>,
    #[serde(rename = "Location")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub location: Option<models::resource::Location>,
    /// The manufacturer of this power supply.
    #[serde(rename = "Manufacturer")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub manufacturer: Option<String>,
    /// The identifier for the member within the collection.
    #[serde(rename = "MemberId")]
    pub member_id: String,
    /// The model number for this power supply.
    #[serde(rename = "Model")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub model: Option<String>,
    /// The name of the power supply.
    #[serde(rename = "Name")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    /// The part number for this power supply.
    #[serde(rename = "PartNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub part_number: Option<String>,
    /// The maximum capacity of this power supply.
    #[serde(rename = "PowerCapacityWatts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub power_capacity_watts: Option<f64>,
    /// The measured input power of this power supply.
    #[serde(rename = "PowerInputWatts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub power_input_watts: Option<f64>,
    /// The measured output power of this power supply.
    #[serde(rename = "PowerOutputWatts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub power_output_watts: Option<f64>,
    #[serde(rename = "PowerSupplyType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub power_supply_type: Option<models::power::v1_7_1::PowerSupplyType>,
    /// The set of redundancy groups for this power supply.
    #[serde(rename = "Redundancy")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub redundancy: Option<Vec<models::redundancy::Redundancy>>,
    #[serde(rename = "Redundancy@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub redundancy_odata_count: Option<models::odata_v4::Count>,
    /// An array of links to resources or objects associated with this power supply.
    #[serde(rename = "RelatedItem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub related_item: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "RelatedItem@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub related_item_odata_count: Option<models::odata_v4::Count>,
    /// The serial number for this power supply.
    #[serde(rename = "SerialNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub serial_number: Option<String>,
    /// The spare part number for this power supply.
    #[serde(rename = "SparePartNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub spare_part_number: Option<String>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
}

impl crate::Metadata<'static> for PowerSupply {
    const JSON_SCHEMA: &'static str = "Power.v1_7_1.json";
}