Class Win32PnPEntity

java.lang.Object
io.github.eggy03.ferrumx.windows.entity.system.Win32PnPEntity

@ShallowImmutable public class Win32PnPEntity extends Object
Immutable representation of a Plug and Play (PnP) device on Windows systems.

Fields correspond to properties retrieved from the WMI Win32_PnPEntity class. Instances of this class represent entries as they would appear in the Windows Device Manager.

Usage examples

// Build a new Plug and Play device instance
Win32PnPEntity device = Win32PnPEntity.builder()
    .deviceId("USB\\VID_045E&PID_07A5\\6&1A2C0F8&0&2")
    .name("USB Composite Device")
    .manufacturer("Microsoft")
    .present(true)
    .status("OK")
    .build();

// Create a modified copy using the builder
Win32PnPEntity updatedDevice = device.toBuilder()
    .status("Degraded")
    .build();
Since:
3.0.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) @Nullable List<String>
    A vendor-defined list of compatible identification strings that Windows Setup uses as fallback identifiers when no matching hardware ID is found.
    (package private) @Nullable String
    A human-readable description of the device.
    (package private) @Nullable String
    Identifier of the Plug and Play device.
    (package private) @Nullable List<String>
    A vendor-defined list of hardware identification strings used by Windows Setup to match the device to an INF file.
    (package private) @Nullable String
    Name of the manufacturer of the Plug and Play device.
    (package private) @Nullable String
    The name by which the device is known.
    (package private) @Nullable String
    Windows Plug and Play device identifier of the logical device.
    (package private) @Nullable Boolean
    Indicates whether this Plug and Play device is currently present in the system.
    (package private) @Nullable String
    Current operational status of the PnP Device.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Boolean
     
    @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
      Identifier of the Plug and Play device.
    • pnpDeviceId

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

      @SerializedName("HardwareID") @Nullable @Nullable List<String> hardwareId
      A vendor-defined list of hardware identification strings used by Windows Setup to match the device to an INF file.
    • compatibleId

      @SerializedName("CompatibleID") @Nullable @Nullable List<String> compatibleId
      A vendor-defined list of compatible identification strings that Windows Setup uses as fallback identifiers when no matching hardware ID is found.
    • name

      @SerializedName("Name") @Nullable @Nullable String name
      The name by which the device is known.
    • description

      @SerializedName("Description") @Nullable @Nullable String description
      A human-readable description of the device.
    • manufacturer

      @SerializedName("Manufacturer") @Nullable @Nullable String manufacturer
      Name of the manufacturer of the Plug and Play device.
    • present

      @SerializedName("Present") @Nullable @Nullable Boolean present
      Indicates whether this Plug and Play device is currently present in the system. Note: This property is not supported on Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista.
    • status

      @SerializedName("Status") @Nullable @Nullable String status
      Current operational status of the PnP Device.

      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"
  • Constructor Details

    • Win32PnPEntity

      public Win32PnPEntity()
  • Method Details

    • isPresent

      @Nullable public @Nullable Boolean isPresent()
    • 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