redfish_codegen/models/drive/v1_17_0/
drive.rs

1// Generated by redfish-codegen. Do not modify.
2
3use crate::models;
4
5/// The Drive schema represents a single physical drive for a system, including links to associated volumes.  It also describes the location, such as a slot, socket, or bay, where a unit can be installed, by populating a resource instance with an absent state if a unit is not present.
6#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
7#[derive(derivative::Derivative)]
8#[derivative(Default)]
9pub struct Drive {
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(\"#Drive.v1_17_0.Drive\".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::v1_17_0::Actions>,
28    #[serde(rename = "Assembly")]
29    #[serde(default, skip_serializing_if = "Option::is_none")]
30    pub assembly: Option<models::odata_v4::IdRef>,
31    /// The user-assigned asset tag for this drive.
32    #[serde(rename = "AssetTag")]
33    #[serde(default, skip_serializing_if = "Option::is_none")]
34    pub asset_tag: Option<String>,
35    /// The size, in bytes, of the smallest addressable unit, or block.
36    #[serde(rename = "BlockSizeBytes")]
37    #[serde(default, skip_serializing_if = "Option::is_none")]
38    pub block_size_bytes: Option<i64>,
39    /// The speed, in gigabit per second (Gbit/s), at which this drive can communicate to a storage controller in ideal conditions.
40    #[serde(rename = "CapableSpeedGbs")]
41    #[serde(default, skip_serializing_if = "Option::is_none")]
42    pub capable_speed_gbs: Option<f64>,
43    /// The size, in bytes, of this drive.
44    #[serde(rename = "CapacityBytes")]
45    #[serde(default, skip_serializing_if = "Option::is_none")]
46    pub capacity_bytes: Option<i64>,
47    #[serde(rename = "Certificates")]
48    #[serde(default, skip_serializing_if = "Option::is_none")]
49    pub certificates: Option<models::odata_v4::IdRef>,
50    #[serde(rename = "Description")]
51    #[serde(default, skip_serializing_if = "Option::is_none")]
52    pub description: Option<models::resource::Description>,
53    #[serde(rename = "DriveFormFactor")]
54    #[serde(default, skip_serializing_if = "Option::is_none")]
55    pub drive_form_factor: Option<models::drive::v1_17_0::FormFactor>,
56    #[serde(rename = "EncryptionAbility")]
57    #[serde(default, skip_serializing_if = "Option::is_none")]
58    pub encryption_ability: Option<models::drive::v1_17_0::EncryptionAbility>,
59    #[serde(rename = "EncryptionStatus")]
60    #[serde(default, skip_serializing_if = "Option::is_none")]
61    pub encryption_status: Option<models::drive::v1_17_0::EncryptionStatus>,
62    #[serde(rename = "EnvironmentMetrics")]
63    #[serde(default, skip_serializing_if = "Option::is_none")]
64    pub environment_metrics: Option<models::odata_v4::IdRef>,
65    /// An indication of whether this drive currently predicts a failure in the near future.
66    #[serde(rename = "FailurePredicted")]
67    #[serde(default, skip_serializing_if = "Option::is_none")]
68    pub failure_predicted: Option<bool>,
69    /// The firmware version for this drive.
70    #[serde(rename = "FirmwareVersion")]
71    #[serde(default, skip_serializing_if = "Option::is_none")]
72    pub firmware_version: Option<String>,
73    #[serde(rename = "HotspareReplacementMode")]
74    #[serde(default, skip_serializing_if = "Option::is_none")]
75    pub hotspare_replacement_mode: Option<models::drive::v1_17_0::HotspareReplacementModeType>,
76    #[serde(rename = "HotspareType")]
77    #[serde(default, skip_serializing_if = "Option::is_none")]
78    pub hotspare_type: Option<models::drive::v1_17_0::HotspareType>,
79    #[serde(rename = "Id")]
80    #[serde(skip_deserializing)]
81    pub id: models::resource::Id,
82    /// The durable names for the drive.
83    #[serde(rename = "Identifiers")]
84    #[serde(default, skip_serializing_if = "Option::is_none")]
85    pub identifiers: Option<Vec<models::resource::Identifier>>,
86    #[serde(rename = "IndicatorLED")]
87    #[serde(default, skip_serializing_if = "Option::is_none")]
88    pub indicator_led: Option<models::resource::IndicatorLED>,
89    #[serde(rename = "Links")]
90    #[serde(default, skip_serializing_if = "Option::is_none")]
91    pub links: Option<models::drive::v1_17_0::Links>,
92    /// The location of the drive.
93    #[serde(rename = "Location")]
94    #[serde(default, skip_serializing_if = "Option::is_none")]
95    pub location: Option<Vec<models::resource::Location>>,
96    /// An indicator allowing an operator to physically locate this resource.
97    #[serde(rename = "LocationIndicatorActive")]
98    #[serde(default, skip_serializing_if = "Option::is_none")]
99    pub location_indicator_active: Option<bool>,
100    /// The manufacturer of this drive.
101    #[serde(rename = "Manufacturer")]
102    #[serde(default, skip_serializing_if = "Option::is_none")]
103    pub manufacturer: Option<String>,
104    /// An array of DSP0274-defined measurement blocks.
105    #[serde(rename = "Measurements")]
106    #[serde(default, skip_serializing_if = "Option::is_none")]
107    pub measurements: Option<Vec<models::software_inventory::MeasurementBlock>>,
108    #[serde(rename = "MediaType")]
109    #[serde(default, skip_serializing_if = "Option::is_none")]
110    pub media_type: Option<models::drive::v1_17_0::MediaType>,
111    #[serde(rename = "Metrics")]
112    #[serde(default, skip_serializing_if = "Option::is_none")]
113    pub metrics: Option<models::odata_v4::IdRef>,
114    /// The model number for the drive.
115    #[serde(rename = "Model")]
116    #[serde(default, skip_serializing_if = "Option::is_none")]
117    pub model: Option<String>,
118    /// An indication of whether the drive is accessible from multiple paths.
119    #[serde(rename = "Multipath")]
120    #[serde(default, skip_serializing_if = "Option::is_none")]
121    pub multipath: Option<bool>,
122    #[serde(rename = "Name")]
123    #[serde(skip_deserializing)]
124    pub name: models::resource::Name,
125    /// The speed, in gigabit per second (Gbit/s), at which this drive currently communicates to the storage controller.
126    #[serde(rename = "NegotiatedSpeedGbs")]
127    #[serde(default, skip_serializing_if = "Option::is_none")]
128    pub negotiated_speed_gbs: Option<f64>,
129    #[serde(rename = "Oem")]
130    #[serde(default, skip_serializing_if = "Option::is_none")]
131    pub oem: Option<models::resource::Oem>,
132    /// The operations currently running on the Drive.
133    #[serde(rename = "Operations")]
134    #[serde(default, skip_serializing_if = "Option::is_none")]
135    pub operations: Option<Vec<models::drive::v1_17_0::Operations>>,
136    /// The part number for this drive.
137    #[serde(rename = "PartNumber")]
138    #[serde(default, skip_serializing_if = "Option::is_none")]
139    pub part_number: Option<String>,
140    #[serde(rename = "PhysicalLocation")]
141    #[serde(default, skip_serializing_if = "Option::is_none")]
142    pub physical_location: Option<models::resource::Location>,
143    /// The percentage of reads and writes that are predicted to be available for the media.
144    #[serde(rename = "PredictedMediaLifeLeftPercent")]
145    #[serde(default, skip_serializing_if = "Option::is_none")]
146    pub predicted_media_life_left_percent: Option<f64>,
147    #[serde(rename = "Protocol")]
148    #[serde(default, skip_serializing_if = "Option::is_none")]
149    pub protocol: Option<models::protocol::Protocol>,
150    /// An indication of whether the drive is prepared by the system for removal.
151    #[serde(rename = "ReadyToRemove")]
152    #[serde(default, skip_serializing_if = "Option::is_none")]
153    pub ready_to_remove: Option<bool>,
154    /// The revision of this drive.  For SCSI-based drives, this is the version of the drive from the 'Inquiry' command, which can be the firmware or hardware version.  For other types of drives, this is the hardware version.
155    #[serde(rename = "Revision")]
156    #[serde(default, skip_serializing_if = "Option::is_none")]
157    pub revision: Option<String>,
158    /// The rotation speed of this drive, in revolutions per minute (RPM).
159    #[serde(rename = "RotationSpeedRPM")]
160    #[serde(default, skip_serializing_if = "Option::is_none")]
161    pub rotation_speed_rpm: Option<f64>,
162    /// The SKU for this drive.
163    #[serde(rename = "SKU")]
164    #[serde(default, skip_serializing_if = "Option::is_none")]
165    pub sku: Option<String>,
166    /// The serial number for this drive.
167    #[serde(rename = "SerialNumber")]
168    #[serde(default, skip_serializing_if = "Option::is_none")]
169    pub serial_number: Option<String>,
170    /// The drive protocols capable in this slot.
171    #[serde(rename = "SlotCapableProtocols")]
172    #[serde(default, skip_serializing_if = "Option::is_none")]
173    pub slot_capable_protocols: Option<Vec<models::protocol::Protocol>>,
174    #[serde(rename = "SlotFormFactor")]
175    #[serde(default, skip_serializing_if = "Option::is_none")]
176    pub slot_form_factor: Option<models::drive::v1_17_0::FormFactor>,
177    #[serde(rename = "Status")]
178    #[serde(default, skip_serializing_if = "Option::is_none")]
179    pub status: Option<models::resource::Status>,
180    #[serde(rename = "StatusIndicator")]
181    #[serde(default, skip_serializing_if = "Option::is_none")]
182    pub status_indicator: Option<models::drive::v1_17_0::StatusIndicator>,
183    /// An indication of whether the drive write cache is enabled.
184    #[serde(rename = "WriteCacheEnabled")]
185    #[serde(default, skip_serializing_if = "Option::is_none")]
186    pub write_cache_enabled: Option<bool>,
187}
188
189impl crate::Metadata<'static> for Drive {
190    const JSON_SCHEMA: &'static str = "Drive.v1_17_0.json";
191}