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 part location for a resource within an enclosure.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct PartLocation {
    /// The number that represents the location of the part.  For example, if LocationType is `Slot` and this unit is in slot 2, the LocationOrdinalValue is `2`.
    #[serde(rename = "LocationOrdinalValue")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub location_ordinal_value: Option<i64>,
    #[serde(rename = "LocationType")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub location_type: Option<models::resource::v1_5_11::LocationType>,
    #[serde(rename = "Orientation")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub orientation: Option<models::resource::v1_5_11::Orientation>,
    #[serde(rename = "Reference")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub reference: Option<models::resource::v1_5_11::Reference>,
    /// The label of the part location, such as a silk-screened name or a printed label.
    #[serde(rename = "ServiceLabel")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub service_label: Option<String>,
}

impl crate::Metadata<'static> for PartLocation {
    const JSON_SCHEMA: &'static str = "Resource.v1_5_11.json";
}