redfish_codegen/models/drive_metrics/v1_0_0/
drive_metrics.rs

1// Generated by redfish-codegen. Do not modify.
2
3use crate::models;
4
5/// The usage and health statistics for a drive.
6#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
7#[derive(derivative::Derivative)]
8#[derivative(Default)]
9pub struct DriveMetrics {
10    #[serde(rename = "@odata.context")]
11    #[serde(skip_deserializing)]
12    #[serde(default, skip_serializing_if = "Option::is_none")]
13    pub odata_context: Option<models::odata_v4::Context>,
14    #[serde(rename = "@odata.etag")]
15    #[serde(skip_deserializing)]
16    #[serde(default, skip_serializing_if = "Option::is_none")]
17    pub odata_etag: Option<models::odata_v4::Etag>,
18    #[serde(rename = "@odata.id")]
19    #[serde(skip_deserializing)]
20    pub odata_id: models::odata_v4::Id,
21    #[serde(rename = "@odata.type")]
22    #[serde(skip_deserializing)]
23    #[derivative(Default(value = "models::odata_v4::Type(\"#DriveMetrics.v1_0_0.DriveMetrics\".to_string())"))]
24    pub odata_type: models::odata_v4::Type,
25    #[serde(rename = "Actions")]
26    #[serde(default, skip_serializing_if = "Option::is_none")]
27    pub actions: Option<models::drive_metrics::v1_0_0::Actions>,
28    /// The total number of bad blocks reported by the drive.
29    #[serde(rename = "BadBlockCount")]
30    #[serde(default, skip_serializing_if = "Option::is_none")]
31    pub bad_block_count: Option<i64>,
32    /// The number of the correctable read errors for the lifetime of the drive.
33    #[serde(rename = "CorrectableIOReadErrorCount")]
34    #[serde(default, skip_serializing_if = "Option::is_none")]
35    pub correctable_io_read_error_count: Option<i64>,
36    /// The number of the correctable write errors for the lifetime of the drive.
37    #[serde(rename = "CorrectableIOWriteErrorCount")]
38    #[serde(default, skip_serializing_if = "Option::is_none")]
39    pub correctable_io_write_error_count: Option<i64>,
40    #[serde(rename = "Description")]
41    #[serde(default, skip_serializing_if = "Option::is_none")]
42    pub description: Option<models::resource::Description>,
43    #[serde(rename = "Id")]
44    #[serde(skip_deserializing)]
45    pub id: models::resource::Id,
46    #[serde(rename = "NVMeSMART")]
47    #[serde(default, skip_serializing_if = "Option::is_none")]
48    pub nvme_smart: Option<models::storage_controller_metrics::NVMeSMARTMetrics>,
49    #[serde(rename = "Name")]
50    #[serde(skip_deserializing)]
51    pub name: models::resource::Name,
52    #[serde(rename = "Oem")]
53    #[serde(default, skip_serializing_if = "Option::is_none")]
54    pub oem: Option<models::resource::Oem>,
55    /// The number of power-on hours for the lifetime of the drive.
56    #[serde(rename = "PowerOnHours")]
57    #[serde(default, skip_serializing_if = "Option::is_none")]
58    pub power_on_hours: Option<f64>,
59    /// The number of the uncorrectable read errors for the lifetime of the drive.
60    #[serde(rename = "UncorrectableIOReadErrorCount")]
61    #[serde(default, skip_serializing_if = "Option::is_none")]
62    pub uncorrectable_io_read_error_count: Option<i64>,
63    /// The number of the uncorrectable write errors for the lifetime of the drive.
64    #[serde(rename = "UncorrectableIOWriteErrorCount")]
65    #[serde(default, skip_serializing_if = "Option::is_none")]
66    pub uncorrectable_io_write_error_count: Option<i64>,
67}
68
69impl crate::Metadata<'static> for DriveMetrics {
70    const JSON_SCHEMA: &'static str = "DriveMetrics.v1_0_0.json";
71}