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;

/// Specifies a set of metrics to include in the metric report.  Calculation parameters, if present, are applied to the metrics prior to being included in the metric report.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct Metric {
    /// The duration over which the function is computed.
    #[serde(rename = "CollectionDuration")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub collection_duration: Option<String>,
    #[serde(rename = "CollectionFunction")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub collection_function: Option<models::metric_report_definition::v1_4_3::CalculationAlgorithmEnum>,
    #[serde(rename = "CollectionTimeScope")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub collection_time_scope: Option<models::metric_report_definition::v1_4_3::CollectionTimeScope>,
    /// The metric definition identifier that contains the metric properties to include in the metric report.
    #[serde(rename = "MetricId")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub metric_id: Option<String>,
    /// The list of URIs with wildcards and property identifiers to include in the metric report.  If a URI has wildcards, the wildcards are substituted as specified in the Wildcards property.
    #[serde(rename = "MetricProperties")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub metric_properties: Option<Vec<String>>,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
}

impl crate::Metadata<'static> for Metric {
    const JSON_SCHEMA: &'static str = "MetricReportDefinition.v1_4_3.json";
}