Class Win32SoundDevice

java.lang.Object
io.github.eggy03.ferrumx.windows.entity.peripheral.Win32SoundDevice

@ShallowImmutable public class Win32SoundDevice extends Object
Immutable representation of a Sound device on a Windows system.

Fields correspond to properties retrieved from the Win32_SoundDevice WMI class.

Usage example

// Build a new instance
Win32SoundDevice device = Win32SoundDevice.builder()
    .deviceId("AUDIO\\0001")
    .name("Realtek High Definition Audio")
    .pnpDeviceId("HDAUDIO\\FUNC_01&VEN_10EC&DEV_0256&SUBSYS_10431A00&REV_1000")
    .manufacturer("Realtek Semiconductor Corp.")
    .status("OK")
    .statusInfo(3)
    .build();

// Modify using toBuilder()
Win32SoundDevice updated = device.toBuilder()
    .status("Degraded")
    .statusInfo(4)
    .build();
Since:
3.0.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) @Nullable String
    Unique identifier of the sound device.
    (package private) @Nullable String
    Manufacturer of the sound device.
    (package private) @Nullable String
    Friendly name of the sound device as recognized by the system.
    (package private) @Nullable String
    Windows Plug and Play device identifier.
    (package private) @Nullable String
    Current operational status of the sound device.
    (package private) @Nullable Integer
    Numeric state of the logical device.
  • 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 sound device.
    • pnpDeviceId

      @SerializedName("PNPDeviceID") @Nullable @Nullable String pnpDeviceId
      Windows Plug and Play device identifier.
    • name

      @SerializedName("Name") @Nullable @Nullable String name
      Friendly name of the sound device as recognized by the system.
    • manufacturer

      @SerializedName("Manufacturer") @Nullable @Nullable String manufacturer
      Manufacturer of the sound device.
    • status

      @SerializedName("Status") @Nullable @Nullable String status
      Current operational status of the sound 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"
    • statusInfo

      @SerializedName("StatusInfo") @Nullable @Nullable Integer statusInfo
      Numeric state of the logical device.
      • 1 - Other
      • 2 - Unknown
      • 3 - Enabled
      • 4 - Disabled
      • 5 - Not Applicable
  • Constructor Details

    • Win32SoundDevice

      public Win32SoundDevice()
  • 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