Class Win32DiskDrive

java.lang.Object
io.github.eggy03.ferrumx.windows.entity.storage.Win32DiskDrive

@ShallowImmutable public class Win32DiskDrive extends Object
Immutable representation of a Physical disk on a Windows system.

Fields correspond to properties retrieved from the Win32_DiskDrive WMI class.

Usage examples

// Build a new instance
Win32DiskDrive drive = Win32DiskDrive.builder()
    .deviceId("\\\\.\\PHYSICALDRIVE0")
    .caption("Samsung SSD 970 EVO")
    .model("MZ-V7E1T0")
    .size(1000204886016L)
    .firmwareRevision("2B2QEXM7")
    .serialNumber("S4EVNX0M123456")
    .partitions(3)
    .status("OK")
    .interfaceType("NVMe")
    .pnpDeviceId("PCI\\VEN_144D&DEV_A808&SUBSYS_0A0E144D&REV_01\\4&1A2B3C4D&0&000000")
    .build();

// Create a modified copy
Win32DiskDrive updatedDrive = drive.toBuilder()
    .size(2000409772032L)
    .build();

See Win32DiskPartition for information about partitions on this disk.

See Win32LogicalDisk for information about the logical volumes on this disk.

Since:
3.0.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) @Nullable List<Integer>
    Array of capabilities of the media access device.
    (package private) @Nullable List<String>
    List of more detailed explanations for any of the access device features indicated in the capabilities array.
    (package private) @Nullable String
    Short description of the object.
    (package private) @Nullable String
    Unique identifier of the disk drive with other devices on the system.
    (package private) @Nullable String
    Revision of the disk drive firmware assigned by the manufacturer.
    (package private) @Nullable String
    Interface type of the physical disk drive (e.g., SCSI, IDE, USB, NVMe).
    (package private) @Nullable String
    Manufacturer’s model number of the disk drive.
    (package private) @Nullable Long
    Number of partitions on this physical disk drive recognized by the operating system.
    (package private) @Nullable String
    Windows Plug and Play device identifier of the logical device.
    (package private) @Nullable String
    Number allocated by the manufacturer to identify the physical media.
    (package private) @Nullable BigInteger
    Size of the disk drive, calculated by multiplying the total number of cylinders, tracks in each cylinder, sectors in each track, and bytes in each sector.
    (package private) @Nullable String
    Current operational status of the physical disk.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
    Retrieves the entity in a JSON pretty-print formatted string

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • deviceId

      @SerializedName("DeviceID") @Nullable @Nullable String deviceId
      Unique identifier of the disk drive with other devices on the system.
    • caption

      @SerializedName("Caption") @Nullable @Nullable String caption
      Short description of the object.
    • model

      @SerializedName("Model") @Nullable @Nullable String model
      Manufacturer’s model number of the disk drive.
    • size

      @SerializedName("Size") @Nullable @Nullable BigInteger size
      Size of the disk drive, calculated by multiplying the total number of cylinders, tracks in each cylinder, sectors in each track, and bytes in each sector.
    • firmwareRevision

      @SerializedName("FirmwareRevision") @Nullable @Nullable String firmwareRevision
      Revision of the disk drive firmware assigned by the manufacturer.
    • serialNumber

      @SerializedName("SerialNumber") @Nullable @Nullable String serialNumber
      Number allocated by the manufacturer to identify the physical media.
    • partitions

      @SerializedName("Partitions") @Nullable @Nullable Long partitions
      Number of partitions on this physical disk drive recognized by the operating system.
    • status

      @SerializedName("Status") @Nullable @Nullable String status
      Current operational status of the physical disk.

      Possible OPERATIONAL values:

      • "OK"
      • "Degraded"
      • "Pred Fail"

      Possible NON-OPERATIONAL values:

      • "Unknown"
      • "Error"
      • "Starting"
      • "Stopping"
      • "Service"

      Possible OTHER values:

      • "Stressed"
      • "NonRecover"
      • "No Contact"
      • "Lost Comm"
    • interfaceType

      @SerializedName("InterfaceType") @Nullable @Nullable String interfaceType
      Interface type of the physical disk drive (e.g., SCSI, IDE, USB, NVMe).
    • pnpDeviceId

      @SerializedName("PNPDeviceID") @Nullable @Nullable String pnpDeviceId
      Windows Plug and Play device identifier of the logical device.
    • capabilities

      @SerializedName("Capabilities") @Nullable @Nullable List<Integer> capabilities
      Array of capabilities of the media access device.

      Possible Values:

      • 1 - Other
      • 2 - Sequential Access
      • 3 - Random Access
      • 4 - Supports Writing
      • 5 - Encryption
      • 6 - Compression
      • 7 - Supports Removable Media
      • 8 - Manual Cleaning
      • 9 - Automatic Cleaning
      • 10 - S.M.A.R.T Notification
      • 11 - Supports Dual Sided Media
      • 12 - Pre-dismount Eject Not Required
    • capabilityDescriptions

      @SerializedName("CapabilityDescriptions") @Nullable @Nullable List<String> capabilityDescriptions
      List of more detailed explanations for any of the access device features indicated in the capabilities array. Note, each entry of this array is related to the entry in the capabilities array that is located at the same index.
  • Constructor Details

    • Win32DiskDrive

      public Win32DiskDrive()
  • Method Details

    • toString

      @NotNull public @NotNull String toString()
      Retrieves the entity in a JSON pretty-print formatted string
      Overrides:
      toString in class Object
      Returns:
      the String value of the object in JSON pretty-print format