windows_snapshot/operating_system/
file_system.rs

1//! ## File System
2//!
3//! The File System subcategory groups classes that represent the way a hard disk is logically
4//! arranged. This includes the type of file system used, the directory structure, and way the disk
5//! is partitioned.
6//!
7//! | Class                                                                               | Description                                                                                                                                                                          |
8//! |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
9//! | [**Win32\_CIMLogicalDeviceCIMDataFile**](win32-cimlogicaldevicecimdatafile)     | Association class<br/> Relates logical devices and data files, indicating the driver files used by the device.<br/>                                                      |
10//! | [**Win32\_Directory**](win32-directory)                                         | Instance class<br/> Represents a directory entry on a computer system running Windows.<br/>                                                                              |
11//! | [**Win32\_DirectorySpecification**](/previous-versions/windows/desktop/msiprov/win32-directoryspecification)               | Instance class<br/> Represents the directory layout for the product.<br/>                                                                                                |
12//! | [**Win32\_DiskDriveToDiskPartition**](win32-diskdrivetodiskpartition)           | Association class<br/> Relates a disk drive and a partition existing on it.<br/>                                                                                         |
13//! | [**Win32\_DiskPartition**](win32-diskpartition)                                 | Instance class<br/> Represents the capabilities and management capacity of a partitioned area of a physical disk on a computer system running Windows.<br/>              |
14//! | [**Win32\_DiskQuota**](/previous-versions/windows/desktop/wmipdskq/win32-diskquota)                                    | Association class<br/> Tracks disk space usage for NTFS file system volumes.<br/>                                                                                        |
15//! | [**Win32\_LogicalDisk**](win32-logicaldisk)                                     | Represents a data source that resolves to an actual local storage device on a computer system running Windows.<br/>                                                            |
16//! | [**Win32\_LogicalDiskRootDirectory**](win32-logicaldiskrootdirectory)           | Association class<br/> Relates a logical disk and its directory structure.<br/>                                                                                          |
17//! | [**Win32\_LogicalDiskToPartition**](win32-logicaldisktopartition)               | Association class<br/> Relates a logical disk drive and the disk partition it resides on.<br/>                                                                           |
18//! | [**Win32\_MappedLogicalDisk**](win32-mappedlogicaldisk)                         | Represents network storage devices that are mapped as logical disks on the computer system running Windows.<br/>                                                               |
19//! | [**Win32\_OperatingSystemAutochkSetting**](/previous-versions//aa394240(v=vs.85)) | Association class<br/> Represents the association between a [**CIM\_ManagedSystemElement**](cim-managedsystemelement) instance and the settings defined for it.<br/> |
20//! | [**Win32\_QuotaSetting**](/previous-versions/windows/desktop/wmipdskq/win32-quotasetting)                              | Instance class<br/> Contains setting information for disk quotas on a volume.<br/>                                                                                       |
21//! | [**Win32\_ShortcutFile**](win32-shortcutfile)                                   | Instance class<br/> Represents files that are shortcuts to other files, directories, and commands.<br/>                                                                  |
22//! | [**Win32\_SubDirectory**](win32-subdirectory)                                   | Association class<br/> Relates a directory (folder) and one of its subdirectories (subfolders).<br/>                                                                     |
23//! | [**Win32\_SystemPartitions**](win32-systempartitions)                           | Association class<br/> Relates a computer system and a disk partition on that system.<br/>                                                                               |
24//! | [**Win32\_Volume**](/previous-versions/windows/desktop/legacy/aa394515(v=vs.85))                                               | Instance class<br/> Represents an area of storage on a hard disk.<br/>                                                                                                   |
25//! | [**Win32\_VolumeQuota**](/previous-versions/windows/desktop/vdswmi/win32-volumequota)                                     | Association class<br/> Relates a volume to the per volume quota settings.<br/>                                                                                           |
26//! | [**Win32\_VolumeQuotaSetting**](/previous-versions/windows/desktop/wmipdskq/win32-volumequotasetting)                  | Association class<br/> Relates disk quota settings with a specific disk volume.<br/>                                                                                     |
27//! | [**Win32\_VolumeUserQuota**](/previous-versions/windows/desktop/vdswmi/win32-volumeuserquota)                             | Association class<br/> Relates per user quotas to quota-enabled volumes.<br/>
28
29use crate::update;
30use serde::{Deserialize, Serialize};
31use std::time::SystemTime;
32use wmi::{COMLibrary, WMIConnection, WMIDateTime};
33
34/// Represents the state of Windows Directories
35#[derive(Deserialize, Serialize, Debug, Clone)]
36pub struct Directories {
37    /// Sequence of windows directories
38    pub directories: Vec<Win32_Directory>,
39    /// When was the record last updated
40    pub last_updated: SystemTime,
41}
42
43update!(Directories, directories);
44
45/// Represents the state of Windows Directory Specification
46#[derive(Deserialize, Serialize, Debug, Clone)]
47pub struct DirectorySpecifications {
48    /// Sequence of windows directories specifications
49    pub directory_specifications: Vec<Win32_DirectorySpecification>,
50    /// When was the record last updated
51    pub last_updated: SystemTime,
52}
53
54update!(DirectorySpecifications, directory_specifications);
55
56/// Represents the state of Windows Disk Partitions
57#[derive(Deserialize, Serialize, Debug, Clone)]
58pub struct DiskPartitions {
59    /// Sequence of windows disk partitions
60    pub disk_partitions: Vec<Win32_DiskPartition>,
61    /// When was the record last updated
62    pub last_updated: SystemTime,
63}
64
65update!(DiskPartitions, disk_partitions);
66
67/// Represents the state of Windows Logical Disks
68#[derive(Deserialize, Serialize, Debug, Clone)]
69pub struct LogicalDisks {
70    /// Sequence of windows logical disks
71    pub logical_disks: Vec<Win32_LogicalDisk>,
72    /// When was the record last updated
73    pub last_updated: SystemTime,
74}
75
76update!(LogicalDisks, logical_disks);
77
78/// Represents the state of Windows Mapped Logical Disks
79#[derive(Deserialize, Serialize, Debug, Clone)]
80pub struct MappedLogicalDisks {
81    /// Sequence of windows mapped logical disks
82    pub mapped_logical_disks: Vec<Win32_MappedLogicalDisk>,
83    /// When was the record last updated
84    pub last_updated: SystemTime,
85}
86
87update!(MappedLogicalDisks, mapped_logical_disks);
88
89/// Represents the state of Windows Quota Settings
90#[derive(Deserialize, Serialize, Debug, Clone)]
91pub struct QuotaSettings {
92    /// Sequence of windows quota settings
93    pub quota_settings: Vec<Win32_MappedLogicalDisk>,
94    /// When was the record last updated
95    pub last_updated: SystemTime,
96}
97
98update!(QuotaSettings, quota_settings);
99
100/// Represents the state of Windows Shortcut Files
101#[derive(Deserialize, Serialize, Debug, Clone)]
102pub struct ShortcutFiles {
103    /// Sequence of windows shortcut files
104    pub shortcut_files: Vec<Win32_ShortcutFile>,
105    /// When was the record last updated
106    pub last_updated: SystemTime,
107}
108
109update!(ShortcutFiles, shortcut_files);
110
111/// Represents the state of Windows Volumes
112#[derive(Deserialize, Serialize, Debug, Clone)]
113pub struct Volumes {
114    /// Sequence of windows volumes
115    pub volumes: Vec<Win32_Volume>,
116    /// When was the record last updated
117    pub last_updated: SystemTime,
118}
119
120update!(Volumes, volumes);
121
122/// The `Win32_Directory` WMI class represents a directory entry on a computer system running Windows.
123/// A directory is a type of file that logically groups data files and provides path information for
124/// the grouped files. Example: C:\TEMP. Win32_Directory does not include directories of network
125/// drives.
126///
127/// <https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-directory>
128#[derive(Default, Deserialize, Serialize, Debug, Clone)]
129#[allow(non_snake_case)]
130#[allow(non_camel_case_types)]
131pub struct Win32_Directory {
132    /// A short textual description of the object.
133    pub Caption: Option<String>,
134    /// A textual description of the object.
135    pub Description: Option<String>,
136    /// Indicates when the object was installed. Lack of a value does not indicate that the object
137    /// is not installed.
138    pub InstallDate: Option<WMIDateTime>,
139    /// The Name property is a string representing the inherited name that serves as a key of a
140    /// logical file instance within a file system. Full path names should be provided. Example:
141    /// C:\Windows\system\win.ini
142    pub Name: Option<String>,
143    /// String that indicates the current status of the object.
144    ///
145    /// Values include the following:
146    ///
147    /// - OK ("OK")
148    /// - Error ("Error")
149    /// - Degraded ("Degraded")
150    /// - Unknown ("Unknown")
151    /// - Pred Fail ("Pred Fail")
152    /// - Starting ("Starting")
153    /// - Stopping ("Stopping")
154    /// - Service ("Service")
155    /// - Stressed ("Stressed")
156    /// - NonRecover ("NonRecover")
157    /// - No Contact ("No Contact")
158    /// - Lost Comm ("Lost Comm")
159    pub Status: Option<String>,
160    /// Bitmask that represents the access rights required to access or perform specific operations
161    /// on the directory. For bit values, see File and Directory Access Rights Constants.
162    ///
163    /// Note: On FAT volumes, the FULL_ACCESS value is returned instead, which indicates no security
164    /// has been set on the object.
165    ///
166    /// - FILE_READ_DATA (file) or FILE_LIST_DIRECTORY (directory) (1): Grants the right to read data from the file. For a directory, this value grants the right to list the contents of the directory.
167    /// - FILE_WRITE_DATA (file) or FILE_ADD_FILE (directory) (2): Grants the right to write data to the file. For a directory, this value grants the right to create a file in the directory.
168    /// - FILE_APPEND_DATA (file) or FILE_ADD_SUBDIRECTORY (4): Grants the right to append data to the file. For a directory, this value grants the right to create a subdirectory.
169    /// - FILE_READ_EA (8): Grants the right to read extended attributes.
170    /// - FILE_WRITE_EA (16): Grants the right to write extended attributes.
171    /// - FILE_EXECUTE (file) or FILE_TRAVERSE (directory) (32): Grants the right to execute a file. For a directory, the directory can be traversed.
172    /// - FILE_DELETE_CHILD (directory) (64): Grants the right to delete a directory and all of the files it contains (its children), even if the files are read-only.
173    /// - FILE_READ_ATTRIBUTES (128): Grants the right to read file attributes.
174    /// - FILE_WRITE_ATTRIBUTES (256): Grants the right to change file attributes.
175    /// - DELETE (65536): Grants delete access.
176    /// - READ_CONTROL (131072): Grants read access to the security descriptor and owner.
177    /// - WRITE_DAC (262144): Grants write access to the discretionary ACL.
178    /// - WRITE_OWNER (524288): Assigns the write owner.
179    /// - SYNCHRONIZE (1048576): Synchronizes access and allows a process to wait for an object to enter the signaled state.
180    /// - ACCESS_SYSTEM_SECURITY (18809343): Controls the ability to get or set the SACL in an object's security descriptor.
181    pub AccessMask: Option<u32>,
182    /// Indicates whether the archive bit on the folder has been set. The archive bit is used by
183    /// backup programs to identify files that should be backed up. If True, the file should be
184    /// archived.
185    pub Archive: Option<bool>,
186    /// Indicates whether or not the folder has been compressed. WMI recognizes folders compressed
187    /// using WMI itself or using the graphical user interface; it does not, however, recognize
188    /// .ZIP files as being compressed. If True, the file is compressed.
189    pub Compressed: Option<bool>,
190    /// Algorithm or tool (usually a method) used to compress the logical file. If it is not
191    /// possible (or not desired) to describe the compression scheme (perhaps because it is not
192    /// known), use the following words: "Unknown" to represent that it is not known whether the
193    /// logical file is compressed; "Compressed" to represent that the file is compressed, but
194    /// either its compression scheme is not known or not disclosed; and "Not Compressed" to
195    /// represent that the logical file is not compressed.
196    pub CompressionMethod: Option<String>,
197    /// Name of the first concrete class to appear in the inheritance chain used in the creation of
198    /// an instance. When used with the other key properties of the class, this property allows all
199    /// instances of this class and its subclasses to be uniquely identified.
200    pub CreationClassName: Option<String>,
201    /// Date that the file system object was created.
202    pub CreationDate: Option<WMIDateTime>,
203    /// Creation class name of the scoping computer system.
204    pub CSCreationClassName: Option<String>,
205    /// Name of the computer where the file system object is stored.
206    pub CSName: Option<String>,
207    /// Drive letter of the drive (including colon) where the file system object is stored.
208    ///
209    /// Example: "c:"
210    pub Drive: Option<String>,
211    /// MS-DOS -compatible name for the folder.
212    ///
213    /// Example: "c:\progra~1"
214    pub EightDotThreeFileName: Option<String>,
215    /// Indicates whether or not the folder has been encrypted. If True, the folder is encrypted.
216    pub Encrypted: Option<bool>,
217    /// Algorithm or tool used to encrypt the logical file. If it is not possible (or not desired)
218    /// to describe the encryption scheme (perhaps for security reasons), use the following words:
219    /// "Unknown" to represent that it is not known whether the logical file is encrypted;
220    /// "Encrypted" to represent that the file is encrypted, but either its encryption scheme is
221    /// not known or not disclosed; and "Not Encrypted" to represent that the logical file is not
222    /// encrypted.
223    pub EncryptionMethod: Option<String>,
224    /// File name extension for the file system object, not including the dot (.) that separates
225    /// the extension from the file name.
226    ///
227    /// Examples: "txt", "mof", "mdb"
228    pub Extension: Option<String>,
229    /// File name (without the dot or extension) of the file.
230    ///
231    /// Example: "autoexec"
232    pub FileName: Option<String>,
233    /// Size of the file system object, in bytes. Although folders possess a FileSize property,
234    /// the value 0 is always returned. To determine the size of a folder, use the FileSystemObject
235    /// or add up the size of all the files stored in the folder.
236    pub FileSize: Option<u64>,
237    /// For example, an .mdb file is likely to have the file type Microsoft Access Application. An
238    /// .asp file likely has the file type HTML Document. Folders are typically reported simply as
239    /// Folder.
240    pub FileType: Option<String>,
241    /// Class of the file system.
242    pub FSCreationClassName: Option<String>,
243    /// Type of file system (NTFS, FAT, FAT32) installed on the drive where the file or folder is
244    /// located.
245    pub FSName: Option<String>,
246    /// Indicates whether the file system object is hidden. If True, the file is hidden.
247    pub Hidden: Option<bool>,
248    /// Number of "file opens" that are currently active against the file.
249    pub InUseCount: Option<u64>,
250    /// Date the file was last accessed.
251    pub LastAccessed: Option<WMIDateTime>,
252    /// Date the file was last modified.
253    pub LastModified: Option<WMIDateTime>,
254    /// Path for the file. The path includes the leading and trailing backslashes, but not the drive
255    /// letter or the folder name.
256    ///
257    /// For the folder c:\windows\system32\wbem, the path is \windows\system32\. For the folder
258    /// c:\scripts, the path is \.
259    pub Path: Option<String>,
260    /// Indicates whether you can read items in the folder. If True, the file can be read.
261    pub Readable: Option<bool>,
262    /// Indicates whether the object is a system file. If True, the file is a system file
263    pub System: Option<bool>,
264    /// If True, the file can be written.
265    pub Writeable: Option<bool>,
266}
267
268/// The `Win32_DirectorySpecification` class represents the directory layout for the product.
269/// Each instance of the class represents a directory in both the source image and the destination image.
270///
271/// Directory resolution is performed as follows:
272///
273/// - Root destination directories:
274/// The root directory entries are those with a null Directory_Parent value or a Directory_Parent value identical to the Directory value.
275/// The value in the Directory property is interpreted as the name of a property
276/// defining the location of the destination directory.
277/// If the property is defined, the destination directory is resolved to the property's value.
278/// If the property is undefined, the ROOTDRIVE property is used instead to resolve the path.
279/// - Root source directories:
280/// The value of the DefaultDir column for root entries is interpreted as the name of a property
281/// defining the source location of this directory.
282/// This property must be defined or an error will occur.
283/// - Nonroot destination directories:
284/// The Directory value for a nonroot directory is also interpreted as the name of a property
285/// defining the location of the destination.
286/// If the property is defined, the destination directory is resolved to the property's value.
287/// If the property is not defined,
288/// the destination directory is resolved to a subdirectory beneath the resolved destination directory for the Directory_Parent entry.
289/// The DefaultDir value defines the name of the subdirectory.
290/// - Nonroot source directories:
291/// The source directory for a nonroot directory is resolved to a subdirectory of the resolved source directory for the Directory_Parent entry.
292/// Again, the DefaultDir value defines the name of the subdirectory.
293///
294/// <https://learn.microsoft.com/en-us/previous-versions/windows/desktop/msiprov/win32-directoryspecification>
295#[derive(Default, Deserialize, Serialize, Debug, Clone)]
296#[allow(non_snake_case)]
297#[allow(non_camel_case_types)]
298pub struct Win32_DirectorySpecification {
299    /// Short description of the object.
300    pub Caption: Option<String>,
301    /// Identifier used in conjunction with other keys to uniquely identify the check.
302    pub CheckID: Option<String>,
303    /// Condition is expected to exist or not exist in the environment.
304    /// When TRUE,
305    /// the condition is expected to exist (a file is expected to be on a system)
306    /// so the Invoke() method is expected to return TRUE.
307    pub CheckMode: Option<bool>,
308    pub DefaultDir: Option<String>,
309    /// Description of the objects.
310    pub Description: Option<String>,
311    pub Directory: Option<String>,
312    /// Name of a directory.
313    /// The value supplied by an application provider is actually a default or recommended path name
314    /// and can be changed for a particular environment.
315    pub DirectoryPath: Option<String>,
316    /// Type of directory being described.
317    ///
318    /// Value: Meaning
319    ///
320    /// - 1: Product log directory
321    /// - 2: Shared base directory
322    /// - 3: Shared executable directory
323    /// - 4: Shared library directory
324    /// - 5: Shared include directory
325    /// - 6: System base directory
326    /// - 7: System executable directory
327    /// - 8: System library directory
328    /// - 9: System configuration directory
329    /// - 10: System include directory
330    /// - 11: System log directory
331    /// - 12: Other
332    pub DirectoryType: Option<u16>,
333    /// Name used to identify this software element.
334    pub Name: Option<String>,
335    /// Identifier for this software element.
336    pub SoftwareElementID: Option<String>,
337    /// State of a software element.
338    ///
339    /// Value: Meaning
340    ///
341    /// - 1: Disabled
342    /// - 2: Installable
343    /// - 3: Executable
344    /// - 4: Running
345    pub SoftwareElementState: Option<u16>,
346    /// Target operating system of the owning software element. The possible values for this
347    /// property are as follows.
348    ///
349    /// Value: Meaning
350    ///
351    /// - 0: Unknown
352    /// - 1: Other
353    /// - 2: MACOS
354    /// - 3: ATTUNIX
355    /// - 4: DGUX
356    /// - 5: DECNT
357    /// - 6: Digital UNIX
358    /// - 7: OpenVMS
359    /// - 8: HPUX
360    /// - 9: AIX
361    /// - 10: MVS
362    /// - 11: OS400
363    /// - 12: OS/2
364    /// - 13: JavaVM
365    /// - 14: MSDOS
366    /// - 15: WIN3x
367    /// - 16: WIN95
368    /// - 17: WIN98
369    /// - 18: WINNT
370    /// - 19: WINCE
371    /// - 20: NCR3000
372    /// - 21: NetWare
373    /// - 22: OSF
374    /// - 23: DC/OS
375    /// - 24: Reliant UNIX
376    /// - 25: SCO UnixWare
377    /// - 26: SCO OpenServer
378    /// - 27: Sequent
379    /// - 28: IRIX
380    /// - 29: Solaris
381    /// - 30: SunOS
382    /// - 31: U6000
383    /// - 32: ASERIES
384    /// - 33: TandemNSK
385    /// - 34: TandemNT
386    /// - 35: BS2000
387    /// - 36: LINUX
388    /// - 37: Lynx
389    /// - 38: XENIX
390    /// - 39: VM/ESA
391    /// - 40: Interactive UNIX
392    /// - 41: BSDUNIX
393    /// - 42: FreeBSD
394    /// - 43: NetBSD
395    /// - 44: GNU Hurd
396    /// - 45: OS9
397    /// - 46: MACH Kernel
398    /// - 47: Inferno
399    /// - 48: QNX
400    /// - 49: EPOC
401    /// - 50: IxWorks
402    /// - 51: VxWorks
403    /// - 52: MiNT
404    /// - 53: BeOS
405    /// - 54: HP MPE
406    /// - 55: NextStep
407    /// - 56: PalmPilot
408    /// - 57: Rhapsody
409    pub TargetOperatingSystem: Option<u16>,
410    /// Version of the software element. Version should be in the form <Major>.<Minor>.<Revision> or
411    /// <Major>.<Minor><letter><revision>.
412    pub Version: Option<String>,
413}
414
415/// The `Win32_DiskPartition` WMI class represents the capabilities and management capacity of a
416/// partitioned area of a physical disk on a computer system running Windows.
417/// Example: Disk #0, Partition #1.
418///
419/// <https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-diskpartition>
420// Some struct fields no longer exist
421#[derive(Default, Deserialize, Serialize, Debug, Clone)]
422#[allow(non_snake_case)]
423#[allow(non_camel_case_types)]
424pub struct Win32_DiskPartition {
425    /*
426    /// Additional availability and status of the Device,
427    /// beyond that specified in the Availability property.
428    /// The Availability property denotes the primary status and availability of the Device.
429    /// In some cases, this will not be sufficient to denote the complete status of the Device.
430    /// In those cases, the AdditionalAvailability property can be used to provide further information.
431    /// For example, a Device's primary Availability may be Off line (value=8),
432    /// but it may also be in a low power state (AdditonalAvailability value=14),
433    /// or the Device could be running Diagnostics (AdditionalAvailability value=5, In Test)."
434    ///
435    /// - Other (1)
436    /// - Unknown (2)
437    /// - Running/Full Power (3)
438    /// - Warning (4)
439    /// - In Test (5)
440    /// - Not Applicable (6)
441    /// - Power Off (7)
442    /// - Off Line (8)
443    /// - Off Duty (9)
444    /// - Degraded (10)
445    /// - Not Installed (11)
446    /// - Install Error (12)
447    /// - Power Save - Unknown (13)
448    /// - Power Save - Low Power Mode (14)
449    /// - Power Save - Standby (15)
450    /// - Power Cycle (16)
451    /// - Power Save - Warning (17)
452    /// - Paused (18)
453    /// - Not Ready (19)
454    /// - Not Configured (20)
455    /// - Quiesce (21)
456    pub AdditionalAvailability: Option<u16>,
457    */
458    /// Availability and status of the device.
459    ///
460    /// - Other (1)
461    /// - Unknown (2)
462    /// - Running/Full Power (3)
463    /// - Warning (4)
464    /// - In Test (5)
465    /// - Not Applicable (6)
466    /// - Power Off (7)
467    /// - Off Line (8)
468    /// - Off Duty (9)
469    /// - Degraded (10)
470    /// - Not Installed (11)
471    /// - Install Error (12)
472    /// - Power Save: Unknown (13): The device is known to be in a power save mode, but its exact status is unknown.
473    /// - Power Save: Low Power Mode (14): he device is in a power save state but still functioning, and may exhibit degraded performance.
474    /// - Power Save: Standby (15): he device is not functioning but could be brought to full power quickly.
475    /// - Power Cycle (16)
476    /// - Power Save: Warning (17): The device is in a warning state, though also in a power save mode.
477    /// - Paused (18): he device is paused.
478    /// - Not Ready (19): The device is not ready.
479    /// - Not Configured (20): The device is not configured.
480    /// - Quiesced (21): The device is quiet.
481    pub Availability: Option<u16>,
482    /// Indicates the specific power-related capabilities of the logical device.
483    /// The array values, 0="Unknown", 1="Not Supported" and 2="Disabled" are self-explanatory.
484    /// The value, 3="Enabled"
485    /// indicates that the power management features are currently enabled
486    /// but the exact feature set is unknown or the information is unavailable.
487    /// "Power Saving Modes Entered Automatically"
488    /// (4) describes that a device can change its power state based on usage or other criteria.
489    /// "Power State Settable" (5) indicates that the SetPowerState method is supported.
490    /// "Power Cycling Supported"
491    /// (6)
492    /// indicates that the SetPowerState method can be invoked with the PowerState input variable set to 5
493    /// ("Power Cycle").
494    /// "Timed Power On Supported"
495    /// (7)
496    /// indicates that the SetPowerState method can be invoked with the PowerState input variable set to 5
497    /// ("Power Cycle") and the Time parameter set to a specific date and time,
498    /// or interval, for power-on.
499    ///
500    /// - Unknown (0)
501    /// - Not Supported (1)
502    /// - Disabled (2)
503    /// - Enabled (3)
504    /// - Power Saving Modes Entered Automatically (4)
505    /// - Power State Settable (5)
506    /// - Power Cycling Supported (6)
507    /// - Timed Power On Supported (7)
508    pub PowerManagementCapabilities: Option<Vec<u16>>,
509    /*
510    /// An array of free-form strings
511    /// providing explanations and details behind the entries in the OtherIdentifyingInfo array.
512    /// Note,
513    /// each entry of this array is related to the entry in OtherIdentifyingInfo
514    /// that is located at the same index.
515    pub IdentifyingDescriptions: Option<Vec<Option<String>>>,
516    /// Maximum time in milliseconds, that a Device can run in a Quiesced state.
517    /// A Device's state is defined in its Availability and AdditionalAvailability properties,
518    /// where Quiesced is conveyed by the value 21. What occurs at the end of the time limit is device-specific.
519    /// The Device may unquiesce, may offline or take other action.
520    /// A value of 0 indicates that a Device can remain quiesced indefinitely.
521    ///
522    /// Note: "The MaxQuiesceTime property has been deprecated.
523    /// When evaluating the use of Quiesce,
524    /// it was determine
525    /// that this single property is not adequate
526    /// for describing when a device will automatically exit a quiescent state.
527    /// In fact,
528    /// the most likely scenario for a device to exit a quiescent state was determined
529    /// to be based on the number of outstanding requests queued rather than on a maximum time.
530    /// This will be re-evaluated and repositioned later.
531    pub MaxQuiesceTime: Option<u64>,
532    /// Array that captures additional data, beyond DeviceID information,
533    /// that could be used to identify a LogicalDevice.
534    /// One example would be
535    /// to hold the Operating System's user friendly name for the Device in this property.
536    /// Maximum length is 256.
537    pub OtherIdentifyingInfo: Option<u64>,
538    /// State of the logical device.
539    /// If this property does not apply to the logical device,
540    /// the value 5 ("Not Applicable") should be used.
541    ///
542    /// - Other (1)
543    /// - Unknown (2)
544    /// - Enabled (3)
545    /// - Disabled (4)
546    /// - Not Applicable (5)
547    pub StatusInfo: Option<u16>,
548    /// The number of consecutive hours that this Device has been powered, since its last power cycle.
549    pub PowerOnHours: Option<u64>,
550    /// The total number of hours that this device has been powered.
551    //pub TotalPowerOnHours: Option<u64>,
552    */
553    /// Media access available.
554    ///
555    /// - Unknown (0)
556    /// - Readable (1)
557    /// - Writeable (2)
558    /// - Read/Write Supported (3)
559    /// - Write Once (4)
560    pub Access: Option<u16>,
561    /// Size in bytes of the blocks which form this storage extent.
562    /// If unknown or if a block concept is not valid
563    /// (for example, for aggregate extents, memory or logical disks),
564    /// enter a 1.
565    pub BlockSize: Option<u64>,
566    /// Indicates whether the computer can be booted from this partition.
567    pub Bootable: Option<bool>,
568    /// Partition is the active partition.
569    /// The operating system uses the active partition when booting from a hard disk.
570    pub BootPartition: Option<bool>,
571    /// Short description of the object.
572    pub Caption: Option<String>,
573    /// Windows Configuration Manager error code.
574    ///
575    /// - This device is working properly. (0): Device is working properly.
576    /// - This device is not configured correctly. (1): Device is not configured correctly.
577    /// - Windows cannot load the driver for this device. (2)
578    /// - The driver for this device might be corrupted, or your system may be running low on memory or other resources. (3)
579    /// - This device is not working properly. One of its drivers or your registry might be corrupted. (4)
580    /// - The driver for this device needs a resource that Windows cannot manage. (5)
581    /// - The boot configuration for this device conflicts with other devices. (6)
582    /// - Cannot filter. (7)
583    /// - The driver loader for the device is missing. (8)
584    /// - This device is not working properly because the controlling firmware is reporting the resources for the device incorrectly. (9)
585    /// - This device cannot start. (10)
586    /// - This device failed. (11)
587    /// - This device cannot find enough free resources that it can use. (12)
588    /// - Windows cannot verify this device's resources. (13)
589    /// - This device cannot work properly until you restart your computer. (14)
590    /// - This device is not working properly because there is probably a re-enumeration problem. (15)
591    /// - Windows cannot identify all the resources this device uses. (16)
592    /// - This device is asking for an unknown resource type. (17)
593    /// - Reinstall the drivers for this device. (18)
594    /// - Failure using the VxD loader. (19)
595    /// - Your registry might be corrupted. (20)
596    /// - System failure: Try changing the driver for this device. If that does not work, see your hardware documentation. Windows is removing this device. (21)
597    /// - This device is disabled. (22)
598    /// - System failure: Try changing the driver for this device. If that doesn't work, see your hardware documentation. (23)
599    /// - This device is not present, is not working properly, or does not have all its drivers installed. (24)
600    /// - Windows is still setting up this device. (25)
601    /// - Windows is still setting up this device. (26)
602    /// - This device does not have valid log configuration. (27)
603    /// - The drivers for this device are not installed. (28)
604    /// - This device is disabled because the firmware of the device did not give it the required resources. (29)
605    /// - This device is using an Interrupt Request (IRQ) resource that another device is using. (30)
606    /// - This device is not working properly because Windows cannot load the drivers required for this device. (31)
607    pub ConfigManagerErrorCode: Option<u32>,
608    /// If True, the device is using a user-defined configuration.
609    pub ConfigManagerUserConfig: Option<bool>,
610    /// Name of the first concrete class to appear in the inheritance chain
611    /// used in the creation of an instance.
612    /// When used with the other key properties of the class,
613    /// the property allows all instances of this class and its subclasses to be uniquely identified.
614    pub CreationClassName: Option<String>,
615    /// Description of the object.
616    pub Description: Option<String>,
617    /// Unique identifier of the disk drive and partition, from the rest of the system.
618    pub DeviceID: Option<String>,
619    /// Index number of the disk containing this partition.
620    ///
621    /// Example: 0
622    pub DiskIndex: Option<u32>,
623    /// If True, the error reported in LastErrorCode is now cleared.
624    pub ErrorCleared: Option<bool>,
625    /// Information about the error recorded in LastErrorCode,
626    /// and information on any corrective actions that may be taken.
627    pub ErrorDescription: Option<String>,
628    /// Type of error detection and correction supported by this storage extent.
629    pub ErrorMethodology: Option<String>,
630    /// Number of hidden sectors in the partition.
631    ///
632    /// Example: 63
633    pub HiddenSectors: Option<u32>,
634    /// Index number of the partition.
635    ///
636    /// Example: 1
637    pub Index: Option<u32>,
638    /// Date the object was installed.
639    /// This property does not need a value to indicate that the object is installed.
640    pub InstallDate: Option<WMIDateTime>,
641    /// Last error code reported by the logical device.
642    pub LastErrorCode: Option<u32>,
643    /// Label by which the object is known.
644    /// When subclassed, the property can be overridden to be a key property.
645    pub Name: Option<String>,
646    /// Total number of consecutive blocks,
647    /// each block the size of the value contained in the BlockSize property,
648    /// which form this storage extent.
649    /// Total size of the storage extent can be calculated by multiplying the value of the BlockSize property by the value of this property.
650    /// If the value of BlockSize is 1, this property is the total size of the storage extent.
651    pub NumberOfBlocks: Option<u64>,
652    /// Windows Plug and Play device identifier of the logical device.
653    ///
654    /// Example: "*PNP030b"
655    pub PNPDeviceID: Option<String>,
656    /// If True, the device can be power-managed (can be put into suspend mode, and so on).
657    /// The property does not indicate that power management features are currently enabled,
658    /// only that the logical device is capable of power management.
659    pub PowerManagementSupported: Option<bool>,
660    /// If True, this is the primary partition.
661    pub PrimaryPartition: Option<bool>,
662    /// Description of the media and its use.
663    pub Purpose: Option<String>,
664    /// If True, the partition information has changed.
665    /// When you change a partition (with IOCTL_DISK_SET_DRIVE_LAYOUT),
666    /// the system uses this property
667    /// to determine which partitions have changed and need their information rewritten.
668    /// If TRUE, the partition must be rewritten.
669    pub RewritePartition: Option<bool>,
670    /// Total size of the partition.
671    ///
672    /// Example: 1059045376
673    pub Size: Option<u64>,
674    /// Starting offset (in bytes) of the partition.
675    ///
676    /// Example: 32256
677    pub StartingOffset: Option<u64>,
678    /// Current status of the object.
679    /// Various operational and nonoperational statuses can be defined.
680    /// Operational statuses include: "OK", "Degraded", and "Pred Fail"
681    /// (an element, such as a SMART-enabled hard disk drive,
682    /// may be functioning properly but predicting a failure in the near future).
683    /// Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service".
684    /// The latter, "Service", could apply during mirror-re-silvering of a disk,
685    /// reload of a user permissions list, or other administrative work.
686    /// Not all such work is online,
687    /// yet the managed element is neither "OK" nor in one of the other states.
688    ///
689    /// The values are:
690    ///
691    /// - OK ("OK")
692    /// - Error ("Error")
693    /// - Degraded ("Degraded")
694    /// - Unknown ("Unknown")
695    /// - Pred Fail ("Pred Fail")
696    /// - Starting ("Starting")
697    /// - Stopping ("Stopping")
698    /// - Service ("Service")
699    /// - Stressed ("Stressed")
700    /// - NonRecover ("NonRecover")
701    /// - No Contact ("No Contact")
702    /// - Lost Comm ("Lost Comm")
703    pub Status: Option<String>,
704    /// Creation class name of the scoping system.
705    pub SystemCreationClassName: Option<String>,
706    /// Name of the scoping system.
707    pub SystemName: Option<String>,
708    /// Type of the partition.
709    ///
710    /// The values are:
711    ///
712    /// - Unused ("Unused")
713    /// - 12-bit FAT ("12-bit FAT")
714    /// - Xenix Type 1 ("Xenix Type 1")
715    /// - Xenix Type 2 ("Xenix Type 2")
716    /// - 16-bit FAT ("16-bit FAT")
717    /// - Extended Partition ("Extended Partition")
718    /// - MS-DOS V4 Huge ("MS-DOS V4 Huge")
719    /// - Installable File System ("Installable File System")
720    /// - PowerPC Reference Platform ("PowerPC Reference Platform")
721    /// - UNIX ("UNIX")
722    /// - NTFS ("NTFS")
723    /// - Win95 w/Extended Int 13 ("Win95 w/Extended Int 13")
724    /// - Extended w/Extended Int 13 ("Extended w/Extended Int 13")
725    /// - Logical Disk Manager ("Logical Disk Manager")
726    /// - Unknown ("Unknown")
727    pub Type: Option<String>,
728}
729
730/// The `Win32_LogicalDisk` WMI class represents a data source
731/// that resolves to an actual local storage device on a computer system running Windows.
732///
733/// <https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-logicaldisk>
734// Some struct fields no longer exist
735#[derive(Default, Deserialize, Serialize, Debug, Clone)]
736#[allow(non_snake_case)]
737#[allow(non_camel_case_types)]
738pub struct Win32_LogicalDisk {
739    /// Type of media access available.
740    ///
741    /// - Unknown (0)
742    /// - Readable (1)
743    /// - Writeable (2)
744    /// - Read/Write Supported (3)
745    /// - Write Once (4)
746    pub Access: Option<u16>,
747    /// Availability and status of the device.
748    ///
749    /// - Other (1)
750    /// - Unknown (2)
751    /// - Running/Full Power (3)
752    /// - Warning (4)
753    /// - In Test (5)
754    /// - Not Applicable (6)
755    /// - Power Off (7)
756    /// - Off Line (8)
757    /// - Off Duty (9)
758    /// - Degraded (10)
759    /// - Not Installed (11)
760    /// - Install Error (12)
761    /// - Power Save: Unknown (13): The device is known to be in a power save mode, but its exact status is unknown.
762    /// - Power Save: Low Power Mode (14): he device is in a power save state but still functioning, and may exhibit degraded performance.
763    /// - Power Save: Standby (15): he device is not functioning but could be brought to full power quickly.
764    /// - Power Cycle (16)
765    /// - Power Save: Warning (17): The device is in a warning state, though also in a power save mode.
766    /// - Paused (18): he device is paused.
767    /// - Not Ready (19): The device is not ready.
768    /// - Not Configured (20): The device is not configured.
769    /// - Quiesced (21): The device is quiet.
770    pub Availability: Option<u16>,
771    /// Size, in bytes, of the blocks that form this storage extent.
772    /// If unknown or if a block concept is not valid
773    /// (for example, for aggregate extents, memory or logical disks),
774    /// enter 1.
775    pub BlockSize: Option<u64>,
776    /// Short description of the object a one-line string.
777    pub Caption: Option<String>,
778    /// If True, the logical volume exists as a single compressed entity, such as a DoubleSpace volume.
779    /// If file based compression is supported, such as on NTFS, this property is False.
780    pub Compressed: Option<bool>,
781    /// Windows Configuration Manager error code.
782    ///
783    /// - This device is working properly. (0): Device is working properly.
784    /// - This device is not configured correctly. (1): Device is not configured correctly.
785    /// - Windows cannot load the driver for this device. (2)
786    /// - The driver for this device might be corrupted, or your system may be running low on memory or other resources. (3)
787    /// - This device is not working properly. One of its drivers or your registry might be corrupted. (4)
788    /// - The driver for this device needs a resource that Windows cannot manage. (5)
789    /// - The boot configuration for this device conflicts with other devices. (6)
790    /// - Cannot filter. (7)
791    /// - The driver loader for the device is missing. (8)
792    /// - This device is not working properly because the controlling firmware is reporting the resources for the device incorrectly. (9)
793    /// - This device cannot start. (10)
794    /// - This device failed. (11)
795    /// - This device cannot find enough free resources that it can use. (12)
796    /// - Windows cannot verify this device's resources. (13)
797    /// - This device cannot work properly until you restart your computer. (14)
798    /// - This device is not working properly because there is probably a re-enumeration problem. (15)
799    /// - Windows cannot identify all the resources this device uses. (16)
800    /// - This device is asking for an unknown resource type. (17)
801    /// - Reinstall the drivers for this device. (18)
802    /// - Failure using the VxD loader. (19)
803    /// - Your registry might be corrupted. (20)
804    /// - System failure: Try changing the driver for this device. If that does not work, see your hardware documentation. Windows is removing this device. (21)
805    /// - This device is disabled. (22)
806    /// - System failure: Try changing the driver for this device. If that doesn't work, see your hardware documentation. (23)
807    /// - This device is not present, is not working properly, or does not have all its drivers installed. (24)
808    /// - Windows is still setting up this device. (25)
809    /// - Windows is still setting up this device. (26)
810    /// - This device does not have valid log configuration. (27)
811    /// - The drivers for this device are not installed. (28)
812    /// - This device is disabled because the firmware of the device did not give it the required resources. (29)
813    /// - This device is using an Interrupt Request (IRQ) resource that another device is using. (30)
814    /// - This device is not working properly because Windows cannot load the drivers required for this device. (31)
815    pub ConfigManagerErrorCode: Option<u32>,
816    /// If True, the device is using a user-defined configuration.
817    pub ConfigManagerUserConfig: Option<bool>,
818    /// Name of the first concrete class to appear in the inheritance chain
819    /// used in the creation of an instance.
820    /// When used with the other key properties of the class,
821    /// the property allows all instances of this class and its subclasses to be uniquely identified.
822    pub CreationClassName: Option<String>,
823    /// Description of the object.
824    pub Description: Option<String>,
825    /// Unique identifier of the logical disk from other devices on the system.
826    pub DeviceID: Option<String>,
827    /// Numeric value that corresponds to the type of disk drive this logical disk represents.
828    ///
829    /// - Unknown (0)
830    /// - No Root Directory (1)
831    /// - Removable Disk (2)
832    /// - Local Disk (3)
833    /// - Network Drive (4)
834    /// - Compact Disc (5)
835    /// - RAM Disk (6)
836    pub DriveType: Option<u32>,
837    /// If True, the error reported in LastErrorCode is now cleared.
838    pub ErrorCleared: Option<bool>,
839    /// More information about the error recorded in LastErrorCode,
840    /// and information on any corrective actions that may be taken.
841    pub ErrorDescription: Option<String>,
842    /// Type of error detection and correction supported by this storage extent.
843    pub ErrorMethodology: Option<String>,
844    /// File system on the logical disk.
845    ///
846    /// Example: "NTFS"
847    pub FileSystem: Option<String>,
848    /// Space, in bytes, available on the logical disk.
849    pub FreeSpace: Option<u64>,
850    /// Date and time the object was installed.
851    /// This property does not require a value to indicate that the object is installed.
852    pub InstallDate: Option<WMIDateTime>,
853    /// Last error code reported by the logical device.
854    pub LastErrorCode: Option<u32>,
855    /// Maximum length of a filename component supported by the Windows drive.
856    /// A filename component is that portion of a filename between backslashes.
857    /// The value can be used to indicate that long names are supported by the specified file system.
858    /// For example, for a FAT file system supporting long names,
859    /// the function stores the value 255, rather than the previous 8.3 indicator.
860    /// Long names can also be supported on systems that use the NTFS file system.
861    ///
862    /// Example: 255
863    pub MaximumComponentLength: Option<u32>,
864    /// Type of media currently present in the logical drive. This value will be one of the values of the MEDIA_TYPE enumeration defined in Winioctl.h. The value may not be exact for removable drives if currently there is no media in the drive.
865    ///
866    /// Format is unknown (0)
867    ///
868    /// 5 -Inch Floppy Disk (1)
869    ///
870    ///     5 1/4-Inch Floppy Disk - 1.2 MB - 512 bytes/sector
871    ///
872    /// 3 -Inch Floppy Disk (2)
873    ///
874    ///     3 1/2-Inch Floppy Disk - 1.44 MB -512 bytes/sector
875    ///
876    /// 3 -Inch Floppy Disk (3)
877    ///
878    ///     3 1/2-Inch Floppy Disk - 2.88 MB - 512 bytes/sector
879    ///
880    /// 3 -Inch Floppy Disk (4)
881    ///
882    ///     3 1/2-Inch Floppy Disk - 20.8 MB - 512 bytes/sector
883    ///
884    /// 3 -Inch Floppy Disk (5)
885    ///
886    ///     3 1/2-Inch Floppy Disk - 720 KB - 512 bytes/sector
887    ///
888    /// 5 -Inch Floppy Disk (6)
889    ///
890    ///     5 1/4-Inch Floppy Disk - 360 KB - 512 bytes/sector
891    ///
892    /// 5 -Inch Floppy Disk (7)
893    ///
894    ///     5 1/4-Inch Floppy Disk - 320 KB - 512 bytes/sector
895    ///
896    /// 5 -Inch Floppy Disk (8)
897    ///
898    ///     5 1/4-Inch Floppy Disk - 320 KB - 1024 bytes/sector
899    ///
900    /// 5 -Inch Floppy Disk (9)
901    ///
902    ///     5 1/4-Inch Floppy Disk - 180 KB - 512 bytes/sector
903    ///
904    /// 5 -Inch Floppy Disk (10)
905    ///
906    ///     5 1/4-Inch Floppy Disk - 160 KB - 512 bytes/sector
907    ///
908    /// Removable media other than floppy (11)
909    ///
910    /// Fixed hard disk media (12)
911    ///
912    /// 3 -Inch Floppy Disk (13)
913    ///
914    ///     3 1/2-Inch Floppy Disk - 120 MB - 512 bytes/sector
915    ///
916    /// 3 -Inch Floppy Disk (14)
917    ///
918    ///     3 1/2-Inch Floppy Disk - 640 KB - 512 bytes/sector
919    ///
920    /// 5 -Inch Floppy Disk (15)
921    ///
922    ///     5 1/4-Inch Floppy Disk - 640 KB - 512 bytes/sector
923    ///
924    /// 5 -Inch Floppy Disk (16)
925    ///
926    ///     5 1/4-Inch Floppy Disk - 720 KB - 512 bytes/sector
927    ///
928    /// 3 -Inch Floppy Disk (17)
929    ///
930    ///     3 1/2-Inch Floppy Disk - 1.2 MB - 512 bytes/sector
931    ///
932    /// 3 -Inch Floppy Disk (18)
933    ///
934    ///     3 1/2-Inch Floppy Disk - 1.23 MB - 1024 bytes/sector
935    ///
936    /// 5 -Inch Floppy Disk (19)
937    ///
938    ///     5 1/4-Inch Floppy Disk - 1.23 MB - 1024 bytes/sector
939    ///
940    /// 3 -Inch Floppy Disk (20)
941    ///
942    ///     3 1/2-Inch Floppy Disk - 128 MB - 512 bytes/sector
943    ///
944    /// 3 -Inch Floppy Disk (21)
945    ///
946    ///     3 1/2-Inch Floppy Disk - 230 MB - 512 bytes/sector
947    ///
948    /// 8-Inch Floppy Disk (22)
949    ///
950    ///     8-Inch Floppy Disk - 256 KB - 128 bytes/sector
951    pub MediaType: Option<u32>,
952    /// Label by which the object is known.
953    /// When subclassed, this property can be overridden to be a key property.
954    pub Name: Option<String>,
955    /// Total number of consecutive blocks,
956    /// each block the size of the value contained in the BlockSize property,
957    /// which form this storage extent.
958    /// Total size of the storage extent can be calculated by multiplying the value of the BlockSize property by the value of this property.
959    /// If the value of BlockSize is 1, this property is the total size of the storage extent.
960    pub NumberOfBlocks: Option<u64>,
961    /// Windows Plug and Play device identifier of the logical device.
962    ///
963    /// Example: "*PNP030b"
964    pub PNPDeviceID: Option<String>,
965    /// Array of the specific power-related capabilities of a logical device.
966    ///
967    /// - Unknown (0)
968    /// - Not Supported (1)
969    /// - Disabled (2)
970    /// - Enabled (3): he power management features are currently enabled but the exact feature set is unknown or the information is unavailable.
971    /// - Power Saving Modes Entered Automatically (4): The device can change its power state based on usage or other criteria.
972    /// - Power State Settable (5): The SetPowerState method is supported. This method is found on the parent CIM_LogicalDevice class and can be implemented. For more information, see Designing Managed Object Format (MOF) Classes.
973    /// - Power Cycling Supported (6): The SetPowerState method can be invoked with the PowerState parameter set to 5 (Power Cycle).
974    /// - Timed Power On Supported (7): Timed Power-On Supported
975    ///
976    /// The SetPowerState method can be invoked with the PowerState parameter set to 5 (Power Cycle) and Time set to a specific date and time, or interval, for power-on.
977    pub PowerManagementCapabilities: Option<Vec<u16>>,
978    /// If True, the device can be power-managed (can be put into suspend mode, and so on).
979    /// This property does not indicate that power management features are currently enabled,
980    /// only that the logical device is capable of power management.
981    pub PowerManagementSupported: Option<bool>,
982    /// Network path to the logical device.
983    pub ProviderName: Option<String>,
984    /// Free-form string describing the media and its use.
985    pub Purpose: Option<String>,
986    /// Indicates that quota management is not enabled (TRUE) on this system.
987    pub QuotasDisabled: Option<bool>,
988    /// Indicates that the quota management was used but has been disabled (True).
989    /// Incomplete refers to the information left in the file system after quota management was disabled.
990    pub QuotasIncomplete: Option<bool>,
991    /// If True,
992    /// indicates
993    /// that the file system is in the active process of compiling information
994    /// and setting the disk up for quota management.
995    pub QuotasRebuilding: Option<bool>,
996    /// Size of the disk drive.
997    pub Size: Option<u64>,
998    /// Current status of the object.
999    /// Various operational and nonoperational statuses can be defined.
1000    /// Operational statuses include: "OK", "Degraded", and "Pred Fail"
1001    /// (an element, such as a SMART-enabled hard disk drive,
1002    /// may be functioning properly but predicting a failure in the near future).
1003    /// Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service".
1004    /// The latter, "Service", could apply during mirror-resilvering of a disk,
1005    /// reload of a user permissions list, or other administrative work.
1006    /// Not all such work is online,
1007    /// yet the managed element is neither "OK" nor in one of the other states.
1008    ///
1009    /// Values include the following:
1010    ///
1011    /// - OK ("OK")
1012    /// - Error ("Error")
1013    /// - Degraded ("Degraded")
1014    /// - Unknown ("Unknown")
1015    /// - Pred Fail ("Pred Fail")
1016    /// - Starting ("Starting")
1017    /// - Stopping ("Stopping")
1018    /// - Service ("Service")
1019    /// - Stressed ("Stressed")
1020    /// - NonRecover ("NonRecover")
1021    /// - No Contact ("No Contact")
1022    /// - Lost Comm ("Lost Comm")
1023    pub Status: Option<String>,
1024    /// State of the logical device.
1025    /// If this property does not apply to the logical device, the value 5 (Not Applicable) should be used.
1026    ///
1027    /// - Other (1)
1028    /// - Unknown (2)
1029    /// - Enabled (3)
1030    /// - Disabled (4)
1031    /// - Not Applicable (5)
1032    pub StatusInfo: Option<u16>,
1033    /// If True, this volume supports disk quotas.
1034    pub SupportsDiskQuotas: Option<bool>,
1035    /// If True, the logical disk partition supports file-based compression,
1036    /// such as is the case with the NTFS file system.
1037    /// This property is False when the Compressed property is True.
1038    pub SupportsFileBasedCompression: Option<bool>,
1039    /// Value of the scoping computer CreationClassName property.
1040    pub SystemCreationClassName: Option<String>,
1041    /// Name of the scoping system.
1042    pub SystemName: Option<String>,
1043    /// If True, the disk requires ChkDsk to be run at the next restart.
1044    /// This property is only applicable to those instances of logical disk
1045    /// that represent a physical disk in the machine.
1046    /// It is not applicable to mapped logical drives.
1047    pub VolumeDirty: Option<bool>,
1048    /// Volume name of the logical disk.
1049    ///
1050    /// Constraints: Maximum 32 characters.
1051    pub VolumeName: Option<String>,
1052    /// Volume serial number of the logical disk.
1053    ///
1054    /// Constraints: Maximum 11 characters.
1055    ///
1056    /// Example: "A8C3-D032"
1057    pub VolumeSerialNumber: Option<String>,
1058}
1059
1060/// The `Win32_MappedLogicalDisk` WMI class represents network storage devices
1061/// that are mapped as logical disks on the computer system.
1062///
1063/// <https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-mappedlogicaldisk>
1064#[derive(Default, Deserialize, Serialize, Debug, Clone)]
1065#[allow(non_snake_case)]
1066#[allow(non_camel_case_types)]
1067pub struct Win32_MappedLogicalDisk {
1068    /// Device access state.
1069    ///
1070    /// - Unknown (0)
1071    /// - Readable (1)
1072    /// - Writeable (2)
1073    /// - Read/Write Supported (3)
1074    /// - Write Once (4)
1075    pub Access: Option<u16>,
1076    /// Availability and status of the device.
1077    ///
1078    /// - Other (1)
1079    /// - Unknown (2)
1080    /// - Running/Full Power (3)
1081    /// - Warning (4)
1082    /// - In Test (5)
1083    /// - Not Applicable (6)
1084    /// - Power Off (7)
1085    /// - Off Line (8)
1086    /// - Off Duty (9)
1087    /// - Degraded (10)
1088    /// - Not Installed (11)
1089    /// - Install Error (12)
1090    /// - Power Save: Unknown (13): The device is known to be in a power save mode, but its exact status is unknown.
1091    /// - Power Save: Low Power Mode (14): he device is in a power save state but still functioning, and may exhibit degraded performance.
1092    /// - Power Save: Standby (15): he device is not functioning but could be brought to full power quickly.
1093    /// - Power Cycle (16)
1094    /// - Power Save: Warning (17): The device is in a warning state, though also in a power save mode.
1095    /// - Paused (18): he device is paused.
1096    /// - Not Ready (19): The device is not ready.
1097    /// - Not Configured (20): The device is not configured.
1098    /// - Quiesced (21): he device is quiet.
1099    pub Availability: Option<u16>,
1100    /// Size, in bytes, of the blocks that form this storage extent.
1101    /// If this concept is not valid for the device type, the value is 1.
1102    pub BlockSize: Option<u64>,
1103    /// Short description of the object.
1104    pub Caption: Option<String>,
1105    /// If True, the file is compressed.
1106    pub Compressed: Option<bool>,
1107    /// Windows Configuration Manager error code.
1108    ///
1109    /// - This device is working properly. (0): Device is working properly.
1110    /// - This device is not configured correctly. (1): Device is not configured correctly.
1111    /// - Windows cannot load the driver for this device. (2)
1112    /// - The driver for this device might be corrupted, or your system may be running low on memory or other resources. (3)
1113    /// - This device is not working properly. One of its drivers or your registry might be corrupted. (4)
1114    /// - The driver for this device needs a resource that Windows cannot manage. (5)
1115    /// - The boot configuration for this device conflicts with other devices. (6)
1116    /// - Cannot filter. (7)
1117    /// - The driver loader for the device is missing. (8)
1118    /// - This device is not working properly because the controlling firmware is reporting the resources for the device incorrectly. (9)
1119    /// - This device cannot start. (10)
1120    /// - This device failed. (11)
1121    /// - This device cannot find enough free resources that it can use. (12)
1122    /// - Windows cannot verify this device's resources. (13)
1123    /// - This device cannot work properly until you restart your computer. (14)
1124    /// - This device is not working properly because there is probably a re-enumeration problem. (15)
1125    /// - Windows cannot identify all the resources this device uses. (16)
1126    /// - This device is asking for an unknown resource type. (17)
1127    /// - Reinstall the drivers for this device. (18)
1128    /// - Failure using the VxD loader. (19)
1129    /// - Your registry might be corrupted. (20)
1130    /// - System failure: Try changing the driver for this device. If that does not work, see your hardware documentation. Windows is removing this device. (21)
1131    /// - This device is disabled. (22)
1132    /// - System failure: Try changing the driver for this device. If that doesn't work, see your hardware documentation. (23)
1133    /// - This device is not present, is not working properly, or does not have all its drivers installed. (24)
1134    /// - Windows is still setting up this device. (25)
1135    /// - Windows is still setting up this device. (26)
1136    /// - This device does not have valid log configuration. (27)
1137    /// - The drivers for this device are not installed. (28)
1138    /// - This device is disabled because the firmware of the device did not give it the required resources. (29)
1139    /// - This device is using an Interrupt Request (IRQ) resource that another device is using. (30)
1140    /// - This device is not working properly because Windows cannot load the drivers required for this device. (31)
1141    pub ConfigManagerErrorCode: Option<u32>,
1142    /// If True, the device is using a user-defined configuration.
1143    pub ConfigManagerUserConfig: Option<bool>,
1144    /// Name of the first concrete class to appear in the inheritance chain
1145    /// used in the creation of an instance.
1146    /// When used with the other key properties of the class,
1147    /// this property allows all instances of this class and its subclasses to be uniquely identified.
1148    pub CreationClassName: Option<String>,
1149    /// Description of the object.
1150    pub Description: Option<String>,
1151    /// Unique identifier of the memory array.
1152    pub DeviceID: Option<String>,
1153    /// If True, the error reported in LastErrorCode is now cleared.
1154    pub ErrorCleared: Option<bool>,
1155    /// More information about the error recorded in LastErrorCode,
1156    /// and information on any corrective actions that can be taken.
1157    pub ErrorDescription: Option<String>,
1158    /// Types of error checking used by the hardware.
1159    pub ErrorMethodology: Option<String>,
1160    /// File system on the logical disk.
1161    ///
1162    /// Example: "NTFS"
1163    pub FileSystem: Option<String>,
1164    /// Space available on the logical disk.
1165    pub FreeSpace: Option<u64>,
1166    /// Date and time the object was installed.
1167    /// This property does not require a value to indicate that the object is installed.
1168    pub InstallDate: Option<WMIDateTime>,
1169    /// Last error code reported by the logical device.
1170    pub LastErrorCode: Option<u32>,
1171    /// Contains the maximum length of a file-name component supported by the Windows drive.
1172    ///
1173    /// Example: 255
1174    pub MaximumComponentLength: Option<u32>,
1175    /// Object label.
1176    pub Name: Option<String>,
1177    /// Total number of consecutive blocks,
1178    /// each block the size of the value contained in the BlockSize property,
1179    /// which form this storage extent.
1180    /// Total size of the storage extent can be calculated by multiplying the value of the BlockSize property by the value of this property.
1181    /// If the value of BlockSize is 1, this property is the total size of the storage extent.
1182    pub NumberOfBlocks: Option<u64>,
1183    /// Windows Plug and Play device identifier of the logical device.
1184    ///
1185    /// Example: "*PNP030b"
1186    pub PNPDeviceID: Option<String>,
1187    /// Indicates the specific power-related capabilities of the logical device.
1188    /// The array values, 0="Unknown", 1="Not Supported" and 2="Disabled" are self-explanatory.
1189    /// The value, 3="Enabled"
1190    /// indicates that the power management features are currently enabled
1191    /// but the exact feature set is unknown or the information is unavailable.
1192    /// "Power Saving Modes Entered Automatically"
1193    /// (4) describes that a device can change its power state based on usage or other criteria.
1194    /// "Power State Settable" (5) indicates that the SetPowerState method is supported.
1195    /// "Power Cycling Supported"
1196    /// (6)
1197    /// indicates that the SetPowerState method can be invoked with the PowerState input variable set to 5
1198    /// ("Power Cycle").
1199    /// "Timed Power On Supported"
1200    /// (7)
1201    /// indicates that the SetPowerState method can be invoked with the PowerState input variable set to 5
1202    /// ("Power Cycle") and the Time parameter set to a specific date and time,
1203    /// or interval, for power-on.
1204    ///
1205    /// - Unknown (0)
1206    /// - Not Supported (1)
1207    /// - Disabled (2)
1208    /// - Enabled (3)
1209    /// - Power Saving Modes Entered Automatically (4)
1210    /// - Power State Settable (5)
1211    /// - Power Cycling Supported (6)
1212    /// - Timed Power On Supported (7)
1213    pub PowerManagementCapabilities: Option<Vec<u16>>,
1214    /// If True, the device can be power-managed (can be put into suspend mode, and so on).
1215    /// The property does not indicate that power management features are currently enabled,
1216    /// only that the logical device is capable of power management.
1217    pub PowerManagementSupported: Option<bool>,
1218    /// Network path name to the logical device.
1219    pub ProviderName: Option<String>,
1220    /// Free-form string that describes the media and its use.
1221    pub Purpose: Option<String>,
1222    /// If True, quota management is not enabled for this volume.
1223    pub QuotasDisabled: Option<bool>,
1224    /// If True, quota management was used but has been disabled.
1225    /// Incomplete refers to the information
1226    /// left in the file system after quota management has been disabled.
1227    pub QuotasIncomplete: Option<bool>,
1228    /// If True, the file system is setting up for quota management.
1229    pub QuotasRebuilding: Option<bool>,
1230    /// ID of the user's session. The user may be connected using a local login or a terminal session.
1231    pub SessionID: Option<String>,
1232    /// Size of the logical disk.
1233    pub Size: Option<u64>,
1234    /// Current status of the object.
1235    /// Various operational and nonoperational statuses can be defined.
1236    /// Operational statuses include: "OK", "Degraded", and "Pred Fail"
1237    /// (an element, such as a SMART-enabled hard disk drive,
1238    /// may be functioning properly but predicting a failure in the near future).
1239    /// Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service".
1240    /// The latter, "Service", could apply during mirror-re-silvering of a disk,
1241    /// reload of a user permissions list, or other administrative work.
1242    /// Not all such work is online,
1243    /// yet the managed element is neither "OK" nor in one of the other states.
1244    ///
1245    /// The values are:
1246    ///
1247    /// - OK ("OK")
1248    /// - Error ("Error")
1249    /// - Degraded ("Degraded")
1250    /// - Unknown ("Unknown")
1251    /// - Pred Fail ("Pred Fail")
1252    /// - Starting ("Starting")
1253    /// - Stopping ("Stopping")
1254    /// - Service ("Service")
1255    /// - Stressed ("Stressed")
1256    /// - NonRecover ("NonRecover")
1257    /// - No Contact ("No Contact")
1258    /// - Lost Comm ("Lost Comm")
1259    pub Status: Option<String>,
1260    /// State of the logical device.
1261    /// If this property does not apply to the logical device, the value 5 (Not Applicable) should be used.
1262    ///
1263    /// - Other (1)
1264    /// - Unknown (2)
1265    /// - Enabled (3)
1266    /// - Disabled (4)
1267    /// - Not Applicable (5)
1268    pub StatusInfo: Option<u16>,
1269    /// If True, then the file system on which this network drive is mapped supports disk quotas.
1270    pub SupportsDiskQuotas: Option<bool>,
1271    /// If True, the logical disk partition supports file-based compression, such as is the case with NTFS.
1272    /// This property is False, when the Compressed property is True.
1273    pub SupportsFileBasedCompression: Option<bool>,
1274    /// Value of the scoping computer's CreationClassName property.
1275    pub SystemCreationClassName: Option<String>,
1276    /// Name of the scoping system.
1277    pub SystemName: Option<String>,
1278    /// Volume name of the logical disk. This property value can have a maximum of 32 characters.
1279    pub VolumeName: Option<String>,
1280    /// Volume serial number of the logical disk. This property value can have a maximum of 11 characters.
1281    ///
1282    /// Example: "A8C3-D032"
1283    pub VolumeSerialNumber: Option<String>,
1284}
1285
1286/// The `Win32_QuotaSetting` WMI class contains setting information for disk quotas on a volume.
1287///
1288/// <https://learn.microsoft.com/en-us/previous-versions/windows/desktop/wmipdskq/win32-quotasetting>
1289#[derive(Default, Deserialize, Serialize, Debug, Clone)]
1290#[allow(non_snake_case)]
1291#[allow(non_camel_case_types)]
1292pub struct Win32_QuotaSetting {
1293    /// Short description of the object a one line string.
1294    pub Caption: Option<String>,
1295    /// Default limit set for quotas on this specific volume.
1296    pub DefaultLimit: Option<i64>,
1297    /// Default warning limit set for quotas on this specific volume.
1298    pub DefaultWarningLimit: Option<i64>,
1299    /// Comment that describes the link
1300    pub Description: Option<String>,
1301    /// If TRUE, events are written to the event log when quotas are exceeded.
1302    pub ExceededNotification: Option<bool>,
1303    pub SettingID: Option<String>,
1304    /// Level of quota management set for this volume.
1305    ///
1306    /// The values are:
1307    ///
1308    /// Values: Meaning
1309    ///
1310    /// 0: Disabled
1311    /// Quota management is not enabled on this volume.
1312    ///
1313    /// 1: Tracked
1314    /// Quotas are tracked but the limit value is not enforced and users may exceed their quota limit.
1315    ///
1316    /// 2: Enforced
1317    /// Quotas are tracked and enforced on this volume.
1318    pub State: Option<u32>,
1319    /// Name of the volume where disk quotas are located.
1320    /// It can be volume name, volume path (such as D:\),
1321    /// or it can be the unique volume name (such as "\\\\?Volume{GUID}\\.").
1322    pub VolumePath: Option<String>,
1323    /// If TRUE, events are written to the event log when warnings are exceeded.
1324    pub WarningExceededNotification: Option<bool>,
1325}
1326
1327/// The `Win32_ShortcutFile` WMI class represents files that are shortcuts to other files,
1328/// directories, and commands.
1329///
1330/// <https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-shortcutfile>
1331#[derive(Default, Deserialize, Serialize, Debug, Clone)]
1332#[allow(non_snake_case)]
1333#[allow(non_camel_case_types)]
1334pub struct Win32_ShortcutFile {
1335    /// A short textual description of the object.
1336    pub Caption: Option<String>,
1337    /// A textual description of the object.
1338    pub Description: Option<String>,
1339    /// Indicates when the object was installed.
1340    /// Lack of a value does not indicate that the object is not installed.
1341    pub InstallDate: Option<WMIDateTime>,
1342    /// String that indicates the current status of the object.
1343    /// Operational and non-operational status can be defined.
1344    /// Operational status can include "OK", "Degraded", and "Pred Fail".
1345    /// "Pred Fail" indicates that an element is functioning properly,
1346    /// but is predicting a failure (for example, a SMART-enabled hard disk drive).
1347    ///
1348    /// Non-operational status can include "Error", "Starting", "Stopping", and "Service".
1349    /// "Service" can apply during disk mirror-resilvering,
1350    /// reloading a user permissions list, or other administrative work.
1351    /// Not all such work is online,
1352    /// but the managed element is neither "OK" nor in one of the other states.
1353    ///
1354    /// Values include the following:
1355    /// - OK ("OK")
1356    /// - Error ("Error")
1357    /// - Degraded ("Degraded")
1358    /// - Unknown ("Unknown")
1359    /// - Pred Fail ("Pred Fail")
1360    /// - Starting ("Starting")
1361    /// - Stopping ("Stopping")
1362    /// - Service ("Service")
1363    /// - Stressed ("Stressed")
1364    /// - NonRecover ("NonRecover")
1365    /// - No Contact ("No Contact")
1366    /// - Lost Comm ("Lost Comm")
1367    pub Status: Option<String>,
1368    /// Bitmask that represents the access rights required to access or perform specific operations
1369    /// on the directory. For bit values, see File and Directory Access Rights Constants.
1370    ///
1371    /// Note: On FAT volumes, the FULL_ACCESS value is returned instead, which indicates no security
1372    /// has been set on the object.
1373    ///
1374    /// - FILE_READ_DATA (file) or FILE_LIST_DIRECTORY (directory) (1): Grants the right to read data from the file. For a directory, this value grants the right to list the contents of the directory.
1375    /// - FILE_WRITE_DATA (file) or FILE_ADD_FILE (directory) (2): Grants the right to write data to the file. For a directory, this value grants the right to create a file in the directory.
1376    /// - FILE_APPEND_DATA (file) or FILE_ADD_SUBDIRECTORY (4): Grants the right to append data to the file. For a directory, this value grants the right to create a subdirectory.
1377    /// - FILE_READ_EA (8): Grants the right to read extended attributes.
1378    /// - FILE_WRITE_EA (16): Grants the right to write extended attributes.
1379    /// - FILE_EXECUTE (file) or FILE_TRAVERSE (directory) (32): Grants the right to execute a file. For a directory, the directory can be traversed.
1380    /// - FILE_DELETE_CHILD (directory) (64): Grants the right to delete a directory and all of the files it contains (its children), even if the files are read-only.
1381    /// - FILE_READ_ATTRIBUTES (128): Grants the right to read file attributes.
1382    /// - FILE_WRITE_ATTRIBUTES (256): Grants the right to change file attributes.
1383    /// - DELETE (65536): Grants delete access.
1384    /// - READ_CONTROL (131072): Grants read access to the security descriptor and owner.
1385    /// - WRITE_DAC (262144): Grants write access to the discretionary ACL.
1386    /// - WRITE_OWNER (524288): Assigns the write owner.
1387    /// - SYNCHRONIZE (1048576): Synchronizes access and allows a process to wait for an object to enter the signaled state.
1388    /// - ACCESS_SYSTEM_SECURITY (18809343): Controls the ability to get or set the SACL in an object's security descriptor.
1389    pub AccessMask: Option<u32>,
1390    /// If True, the file should be archived.
1391    pub Archive: Option<bool>,
1392    /// If True, the file is compressed.
1393    pub Compressed: Option<bool>,
1394    /// Free-form string that indicates the algorithm or tool used to compress the logical file.
1395    /// If the compression scheme is unknown or not described, use "Unknown".
1396    /// If the logical file is compressed,
1397    /// but the compression scheme is unknown or not described, use "Compressed".
1398    /// If the logical file is not compressed, use "Not Compressed".
1399    pub CompressionMethod: Option<String>,
1400    /// Name of the class.
1401    pub CreationClassName: Option<String>,
1402    /// Date and time of the file's creation.
1403    pub CreationDate: Option<WMIDateTime>,
1404    /// Class of the computer system.
1405    pub CSCreationClassName: Option<String>,
1406    /// Name of the computer system.
1407    pub CSName: Option<String>,
1408    /// Drive letter (including the colon that follows the drive letter) of the file.
1409    ///
1410    /// Example: "c:"
1411    pub Drive: Option<String>,
1412    /// File name in 8.3 format.
1413    ///
1414    /// Example: "c:\progra~1"
1415    pub EightDotThreeFileName: Option<String>,
1416    /// If True, the file is encrypted.
1417    pub Encrypted: Option<bool>,
1418    /// Free-form string that identifies the algorithm or tool used to encrypt a logical file.
1419    /// If the encryption scheme is not indulged (for security reasons, for example), use "Unknown".
1420    /// If the file is encrypted,
1421    /// but either its encryption scheme is unknown or not disclosed, use "Encrypted".
1422    /// If the logical file is not encrypted, use "Not Encrypted".
1423    pub EncryptionMethod: Option<String>,
1424    /// The Name property is a string
1425    /// representing the inherited name
1426    /// that serves as a key of a logical file instance within a file system.
1427    /// Full path names should be provided.
1428    ///
1429    /// Example: C:\Windows\system\win.ini
1430    pub Name: Option<String>,
1431    /// File name extension without the preceding period (dot).
1432    ///
1433    /// Example: "txt", "mof", "mdb"
1434    pub Extension: Option<String>,
1435    /// File name without the file name extension.
1436    ///
1437    /// Example: "MyDataFile"
1438    pub FileName: Option<String>,
1439    /// Size of the file, in bytes.
1440    pub FileSize: Option<u64>,
1441    /// Descriptor that represents the file type indicated by the Extension property.
1442    pub FileType: Option<String>,
1443    /// Class of the file system.
1444    pub FSCreationClassName: Option<String>,
1445    /// Name of the file system.
1446    pub FSName: Option<String>,
1447    /// If True, the file is hidden.
1448    pub Hidden: Option<bool>,
1449    /// Number of "file opens" that are currently active against the file.
1450    pub InUseCount: Option<u64>,
1451    /// Date and time the file was last accessed.
1452    pub LastAccessed: Option<WMIDateTime>,
1453    /// Date and time the file was last modified.
1454    pub LastModified: Option<WMIDateTime>,
1455    /// Path of the file including the leading and trailing backslashes.
1456    ///
1457    /// Example: "\windows\system\"
1458    pub Path: Option<String>,
1459    /// If True, the file can be read.
1460    pub Readable: Option<bool>,
1461    /// If True, the file is a system file.
1462    pub System: Option<bool>,
1463    /// If True, the file can be written.
1464    pub Writeable: Option<bool>,
1465    /// Manufacturer string from the version resource (if one is present).
1466    pub Manufacturer: Option<String>,
1467    /// Version string from the version resource (if one is present).
1468    pub Version: Option<String>,
1469    /// Name of the object that this is a shortcut to.
1470    pub Target: Option<String>,
1471}
1472
1473/// The `Win32_Volume` class represents an area of storage on a hard disk.
1474/// The class returns local volumes that are formatted, unformatted, mounted, or offline.
1475/// A volume is formatted by using a file system, such as FAT or NTFS,
1476/// and might have a drive letter assigned to it.
1477/// One hard disk can have multiple volumes, and volumes can span multiple physical disks.
1478/// The Win32_Volume class does not support disk drive management.
1479///
1480/// Windows XP and earlier: This class is not available.
1481///
1482/// Note: This class has been repeated in Storage as well. 
1483/// 
1484/// <https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa394515(v=vs.85)>
1485#[derive(Default, Deserialize, Serialize, Debug, Clone)]
1486#[allow(non_snake_case)]
1487#[allow(non_camel_case_types)]
1488pub struct Win32_Volume {
1489    /// Describes whether the media is readable.
1490    /// This can be one of the following values:
1491    ///
1492    /// Value: Meaning
1493    /// - 0 (0x0): Unknown media.
1494    /// - 1 (0x1): The media is readable.
1495    /// - 2 (0x2): The media is writable.
1496    /// - 3 (0x3): The media is readable and writable.
1497    /// - 4 (0x4): "Write once" media.
1498    pub Access: Option<u16>,
1499    /// If true, the volume is mounted to the file system automatically when the first I/O is issued.
1500    /// If false, the volume is not mounted until explicitly mounted by using the Mount method,
1501    /// or by adding a drive letter or mount point.
1502    pub Automount: Option<bool>,
1503    /// Describes the availability and status of the device.  This can be one of the following values:
1504    ///
1505    /// Value: Meaning
1506    /// - 1 (0x1): Other
1507    /// - 2 (0x2): Unknown
1508    /// - 3 (0x3):  Running or Full Power
1509    /// - 4 (0x4): Warning
1510    /// - 5 (0x5): In Test
1511    /// - 6 (0x6): Not Applicable
1512    /// - 7 (0x7): Power Off
1513    /// - 8 (0x8): Offline
1514    /// - 9 (0x9): Off Duty
1515    /// - 10 (0xA): Degraded
1516    /// - 11 (0xB): Not Installed
1517    /// - 12 (0xC): Install Error
1518    /// - 13 (0xD):  Power Save: Unknown: The device is known to be in a power save mode, but its exact status is unknown.
1519    /// - 14 (0xE): Power Save: Low Power Mode: The device is in a power save state, but still functioning, and may exhibit degraded performance.
1520    /// - 15 (0xF): Power Save: Standby: The device is not functioning, but could be brought to full power quickly.
1521    /// - 16 (0x10): Power Cycle
1522    /// - 17 (0x11): Power Save: Warning: The device is in a warning state, but also in a power save mode.
1523    /// - 18 (0x12):  Paused
1524    /// - 19 (0x13): Not Ready
1525    /// - 20 (0x14): Not Configured
1526    /// - 21 (0x15): Quiesced
1527    pub Availability: Option<u16>,
1528    /// Size in bytes of the blocks in this storage extent.
1529    /// If there is a variable block size, then the maximum block size in bytes is specified.
1530    /// If the block size is unknown or if a block concept is not valid
1531    /// (for example, for Aggregate Extents, Memory, or LogicalDisks),
1532    /// the value is 1
1533    /// (one).
1534    pub BlockSize: Option<u64>,
1535    /// Size of the volume in bytes.
1536    pub Capacity: Option<u64>,
1537    /// A short description of the area of storage.
1538    pub Caption: Option<String>,
1539    /// If true, the volume exists as one compressed entity, such as a DoubleSpace volume.
1540    /// If file-based compression is supported, such as the NTFS file system, this property is false.
1541    pub Compressed: Option<bool>,
1542    /// Indicates the Win32 Configuration Manager error code. This can be one of the following values:
1543    ///
1544    /// Value: Meaning
1545    ///
1546    /// - 0 (0x0): This device is working properly.
1547    /// - 1 (0x1): This device is not configured correctly.
1548    /// - 2 (0x2): Windows cannot load the driver for this device.
1549    /// - 3 (0x3): The driver for this device might be corrupted, or your system may be running low on memory or other resources.
1550    /// - 4 (0x4): This device is not working properly. One of its drivers or your registry might be corrupted.
1551    /// - 5 (0x5): The driver for this device needs a resource that Windows cannot manage.
1552    /// - 6 (0x6): The boot configuration for this device conflicts with other devices.
1553    /// - 7 (0x7): Cannot filter.
1554    /// - 8 (0x8): The driver loader for the device is missing.
1555    /// - 9 (0x9): This device is not working properly because the controlling firmware is reporting the resources for the device incorrectly.
1556    /// - 10 (0xA): This device cannot start.
1557    /// - 11 (0xB): This device failed.
1558    /// - 12 (0xC): This device cannot find enough free resources that it can use.
1559    /// - 13 (0xD): Windows cannot verify this device's resources.
1560    /// - 14 (0xE): This device cannot work properly until you restart your computer.
1561    /// - 15 (0xF): This device is not working properly because there is probably a re-enumeration problem.
1562    /// - 16 (0x10): Windows cannot identify all the resources this device uses.
1563    /// - 17 (0x11): This device is asking for an unknown resource type.
1564    /// - 18 (0x12): Reinstall the drivers for this device.
1565    /// - 19 (0x13): Failure using the VxD loader.
1566    /// - 20 (0x14): Your registry might be corrupted.
1567    /// - 21 (0x15): System failure. Try changing the driver for this device. If that does not work, see your hardware documentation. Windows is removing this device.
1568    /// - 22 (0x16): This device is disabled.
1569    /// - 23 (0x17): System failure. Try changing the driver for this device. If that does not work, see your hardware documentation.
1570    /// - 24 (0x18): This device is not present, is not working properly, or does not have all of its drivers installed.
1571    /// - 25 (0x19): Windows is still setting up this device.
1572    /// - 26 (0x1A): Windows is still setting up this device.
1573    /// - 27 (0x1B): This device does not have a valid log configuration.
1574    /// - 28 (0x1C): The drivers for this device are not installed.
1575    /// - 29 (0x1D): This device is disabled because the firmware of the device did not give it the required resources.
1576    /// - 30 (0x1E): This device is using an Interrupt Request resource that another device is using.
1577    /// - 31 (0x1F): This device is not working properly because Windows cannot load the drivers required for this device.
1578    pub ConfigManagerErrorCode: Option<u32>,
1579    /// If True, the device is using a user-defined configuration. Otherwise, False.
1580    pub ConfigManagerUserConfig: Option<bool>,
1581    /// Indicates the name of the class or the subclass used in the creation of an instance of this class.
1582    /// When used with the other key properties of this class,
1583    /// this property allows all instances of this class and its subclasses to be uniquely identified.
1584    pub CreationClassName: Option<String>,
1585    /// A description of the object
1586    pub Description: Option<String>,
1587    /// Unique identifier for the volume on this system.
1588    pub DeviceID: Option<String>,
1589    /// If true, the Chkdsk method is automatically run by the system at the next restart.
1590    pub DirtyBitSet: Option<bool>,
1591    /// Drive letter assigned to a volume. This property is NULL for volumes without drive letters.
1592    pub DriveLetter: Option<String>,
1593    /// Numeric value that corresponds to the type of disk drive that this logical disk represents.
1594    ///
1595    /// The values are:
1596    ///
1597    /// Value: Meaning
1598    ///
1599    /// - 0 (0x0): Unknown
1600    /// - 1 (0x1): No Root Directory
1601    /// - 2 (0x2): Removable Disk
1602    /// - 3 (0x3): Local Disk
1603    /// - 4 (0x4): Network Drive
1604    /// - 5 (0x5): Compact Disk
1605    /// - 6 (0x6): RAM Disk
1606    pub DriveType: Option<u32>,
1607    /// If True, the error reported in LastErrorCode is now cleared.
1608    pub ErrorCleared: Option<bool>,
1609    /// More information about the error recorded in LastErrorCode,
1610    /// and information on any corrective actions that may be taken.
1611    pub ErrorDescription: Option<String>,
1612    /// Type of error detection and correction supported by this storage extent.
1613    pub ErrorMethodology: Option<String>,
1614    /// File system on the logical disk.
1615    ///
1616    /// Example: NTFS
1617    pub FileSystem: Option<String>,
1618    /// Space, in bytes, available on the logical disk
1619    pub FreeSpace: Option<u64>,
1620    /// If true, context indexing is enabled.
1621    pub IndexingEnabled: Option<bool>,
1622    /// Date and time the object was installed.
1623    /// This property does not require a value to indicate that the object is installed.
1624    pub InstallDate: Option<WMIDateTime>,
1625    /// Volume name of the logical disk.
1626    /// This property is null for volumes without a label.
1627    /// For FAT and FAT32 systems, the maximum length is 11 characters.
1628    /// For NTFS file systems, the maximum length is 32 characters.
1629    pub Label: Option<String>,
1630    /// Last error code reported by the logical device.
1631    pub LastErrorCode: Option<u32>,
1632    /// Maximum length, in characters, of a filename component supported by a Windows drive.
1633    /// A filename component is the portion of a filename between backslashes.
1634    /// This value can be used to indicate that long names are supported by the file system.
1635    /// For example, for a FAT file system that supports long names,
1636    /// the property stores the value 255—not the previous 8.3 indicator.
1637    /// Long names can be supported on systems that use the NTFS file system.
1638    pub MaximumFileNameLength: Option<u32>,
1639    /// Label by which the object is known.
1640    /// When subclassed, this property can be overridden to be a key property.
1641    pub Name: Option<String>,
1642    /// Total number of consecutive blocks,
1643    /// each block the size of the value contained in the BlockSize property,
1644    /// which form this storage extent.
1645    /// Total size of the storage extent can be calculated by multiplying the value of the BlockSize property by the value of this property.
1646    /// If the value of BlockSize is 1, this property is the total size of the storage extent.
1647    pub NumberOfBlocks: Option<u64>,
1648    /// Indicates the Win32 Plug and Play device ID of the logical device. Example: *PNP030b.
1649    pub PNPDeviceID: Option<String>,
1650    /// Indicates the specific power-related capabilities of the logical device.
1651    /// This can be one of the following values:
1652    ///
1653    /// Value: Meaning
1654    /// - 0 (0x0): Unknown
1655    /// - 1 (0x1): Not Supported
1656    /// - 2 (0x2): Disabled
1657    /// - 3 (0x3): Enabled: The power management features are currently enabled but the exact feature set is unknown or the information is unavailable.
1658    /// - 4 (0x4): Power Saving Modes Entered Automatically: The device can change its power state based on usage or other criteria.
1659    /// - 5 (0x5): Power State Settable: The SetPowerState method is supported. This method is found on the parent CIM_LogicalDevice class and can be implemented. For more information, see Designing Managed Object Format (MOF) Classes.
1660    /// - 6 (0x6): Power Cycling Supported: The SetPowerState method can be invoked with the PowerState parameter set to 5 (Power Cycle).
1661    /// - 7 (0x7): Timed Power-On Supported: The SetPowerState method can be invoked with the PowerState parameter set to 5 (Power Cycle) and Time set to a specific date and time, or interval, for power-on.
1662    pub PowerManagementCapabilities: Option<Vec<u16>>,
1663    /// True, if the device can be power managed (put into a power save state), otherwise False.
1664    /// This boolean does not indicate that power management features are currently enabled,
1665    /// or if enabled, what features are supported.
1666    /// Refer to the PowerManagementCapabilities array for this information.
1667    /// If this boolean is false, the integer value 1, for the string,
1668    /// "Not Supported", should be the only entry in the PowerManagementCapabilities array.
1669    pub PowerManagementSupported: Option<bool>,
1670    /// Describes the media and its use.
1671    pub Purpose: Option<String>,
1672    /// If true, quota management is enabled for this volume.
1673    pub QuotasEnabled: Option<bool>,
1674    /// If true, quota management was used but is disabled.
1675    /// Incomplete refers to the information left in the file system after quota management is disabled.
1676    pub QuotasIncomplete: Option<bool>,
1677    /// If true,
1678    /// the file system is in the process of compiling information
1679    /// and setting the disk up for quota management.
1680    pub QuotasRebuilding: Option<bool>,
1681    /// Current status of the object.
1682    /// Various operational and nonoperational statuses can be defined.
1683    /// Operational statuses include: "OK", "Degraded", and "Pred Fail"
1684    /// (an element, such as a SMART-enabled hard disk drive,
1685    /// may be functioning properly but predicting a failure in the near future).
1686    /// Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service".
1687    /// The latter, "Service", could apply during mirror-resilvering of a disk,
1688    /// reload of a user permissions list, or other administrative work.
1689    /// Not all such work is online,
1690    /// yet the managed element is neither "OK" nor in one of the other states.
1691    ///
1692    /// The values are:
1693    ///
1694    /// - "OK"
1695    /// - "Error"
1696    /// - "Degraded"
1697    /// - "Unknown"
1698    /// - "Pred Fail"
1699    /// - "Starting"
1700    /// - "Stopping"
1701    /// - "Service"
1702    /// - "Stressed"
1703    /// - "NonRecover"
1704    /// - "No Contact"
1705    /// - "Lost Comm"
1706    pub Status: Option<String>,
1707    /// Indicates the state of the logical device. This can be one of the following values:
1708    ///
1709    /// Value 	Meaning
1710    /// - 1 (0x1): Other
1711    /// - 2 (0x2): Unknown
1712    /// - 3 (0x3): Enabled
1713    /// - 4 (0x4): Disabled
1714    /// - 5 (0x5): Not Applicable
1715    pub StatusInfo: Option<u16>,
1716    /// Indicates the system's creation class name.
1717    pub SystemCreationClassName: Option<String>,
1718    /// Indicates the system's name.
1719    pub SystemName: Option<String>,
1720    /// Serial number of the volume.
1721    ///
1722    /// Example: A8C3D032
1723    pub SerialNumber: Option<u32>,
1724    /// If true, the volume supports disk quotas.
1725    pub SupportsDiskQuotas: Option<bool>,
1726    /// If True, the logical disk partition supports file-based compression,
1727    /// such as is the case with the NTFS file system.
1728    /// This property is False when the Compressed property is True.
1729    pub SupportsFileBasedCompression: Option<bool>,
1730}