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 location of a resource.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct Location {
    /// The altitude of the resource in meters.
    #[serde(rename = "AltitudeMeters")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub altitude_meters: Option<f64>,
    /// An array of contact information.
    #[serde(rename = "Contacts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub contacts: Option<Vec<models::resource::v1_16_0::ContactInfo>>,
    /// The location of the resource.
    #[serde(rename = "Info")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub info: Option<String>,
    /// The format of the Info property.
    #[serde(rename = "InfoFormat")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub inf_of: Option<String>,
    /// The latitude of the resource.
    #[serde(rename = "Latitude")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub latitude: Option<f64>,
    /// The longitude of the resource in degrees.
    #[serde(rename = "Longitude")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub longitude: Option<f64>,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    #[serde(rename = "PartLocation")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub part_location: Option<models::resource::v1_16_0::PartLocation>,
    /// Human readable string to enable differentiation between PartLocation value for parts in the same enclosure, which might include hierarchical information of containing PartLocation values for the part.
    #[serde(rename = "PartLocationContext")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub part_location_context: Option<String>,
    #[serde(rename = "Placement")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub placement: Option<models::resource::v1_16_0::Placement>,
    #[serde(rename = "PostalAddress")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub postal_address: Option<models::resource::v1_16_0::PostalAddress>,
}

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