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;

/// Properties that capture a metric value and other associated information.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct MetricValue {
    #[serde(rename = "MetricDefinition")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub metric_definition: Option<models::odata_v4::IdRef>,
    /// The metric definitions identifier for this metric.
    #[serde(rename = "MetricId")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub metric_id: Option<String>,
    /// The URI for the property from which this metric is derived.
    #[serde(rename = "MetricProperty")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub metric_property: Option<String>,
    /// The metric value, as a string.
    #[serde(rename = "MetricValue")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub metric_value: Option<String>,
    /// The date and time when the metric is obtained.  A management application can establish a time series of metric data by retrieving the instances of metric value and sorting them according to their timestamp.
    #[serde(rename = "Timestamp")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<String>,
}

impl crate::Metadata<'static> for MetricValue {
    const JSON_SCHEMA: &'static str = "TelemetryService.v1_3_1.json";
}