Class Win32Printer

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

@ShallowImmutable public class Win32Printer extends Object
Immutable representation of a Printing device on a Windows system.

Fields correspond to properties retrieved from the Win32_Printer WMI class.

Usage example

// Build a new instance
Win32Printer printer = Win32Printer.builder()
    .deviceId("PR1")
    .name("Primary Printer")
    .isShared(true)
    .shareName("Shared Primary Printer")
    .build();

// Modify using toBuilder()
Win32Printer updated = printer.toBuilder()
    .isShared(false)
    .shareName(null)
    .build();
Since:
3.0.0
See Also:
  • Field Details

    • deviceId

      @SerializedName("DeviceID") @Nullable @Nullable String deviceId
      System-assigned unique identifier of the printer.
    • name

      @SerializedName("Name") @Nullable @Nullable String name
      Name of the printer as recognized by the system.
    • pnpDeviceId

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

      @SerializedName("Capabilities") @Nullable @Nullable List<Integer> capabilities
      List of capability codes supported by the printer.
      • 1 - Other
      • 2 - Color printing
      • 3 - Duplex printing
      • 4 - Copies
      • 5 - Collation
      • 6 - Stapling
      • 7 - Transparency printing
      • 8 - Punch
      • 9 - Cover
      • 10 - Bind
      • 11 - Black-and-white printing
      • 12 - One-sided
      • 13 - Two-sided long edge
      • 14 - Two-sided short edge
      • 15 - Portrait
      • 16 - Landscape
      • 17 - Reverse Portrait
      • 18 - Reverse Landscape
      • 19 - Quality High
      • 20 - Quality Normal
      • 21 - Quality Low
    • capabilityDescriptions

      @SerializedName("CapabilityDescriptions") @Nullable @Nullable List<String> capabilityDescriptions
      Descriptive text corresponding to capabilities.
    • horizontalResolution

      @SerializedName("HorizontalResolution") @Nullable @Nullable Long horizontalResolution
      Printer’s horizontal resolution in DPI (dots per inch).
    • verticalResolution

      @SerializedName("VerticalResolution") @Nullable @Nullable Long verticalResolution
      Printer’s vertical resolution in DPI (dots per inch).
    • paperSizesSupported

      @SerializedName("PaperSizesSupported") @Nullable @Nullable List<Integer> paperSizesSupported
      Numeric codes of paper sizes supported by the printer. Refer to the documentation link attached at the class level for the exhaustive list of available sizes
    • printerPaperNames

      @SerializedName("PrinterPaperNames") @Nullable @Nullable List<String> printerPaperNames
      Names of paper types or forms supported by the printer.
    • printerStatus

      @SerializedName("PrinterStatus") @Nullable @Nullable Integer printerStatus
      Current operational state of the printer.
      • 1 - Other
      • 2 - Unknown
      • 3 - Idle
      • 4 - Printing
      • 5 - Warm-up
      • 6 - Stopped printing
      • 7 - Offline
    • printJobDataType

      @SerializedName("PrintJobDataType") @Nullable @Nullable String printJobDataType
      Data type of print jobs Example: RAW or EMF
    • printProcessor

      @SerializedName("PrintProcessor") @Nullable @Nullable String printProcessor
      Print processor used to process print jobs Example: WinPrint
    • driverName

      @SerializedName("DriverName") @Nullable @Nullable String driverName
      Name of the printer driver installed.
    • shared

      @SerializedName("Shared") @Nullable @Nullable Boolean shared
      Indicates whether the printer is shared on the network.
    • shareName

      @SerializedName("ShareName") @Nullable @Nullable String shareName
      Share name of the printer if it is shared.
    • spoolEnabled

      @SerializedName("SpoolEnabled") @Nullable @Nullable Boolean spoolEnabled
      Indicates whether spooling is enabled for the printer.
    • hidden

      @SerializedName("Hidden") @Nullable @Nullable Boolean hidden
      Specifies whether the printer is hidden from standard user interfaces.
  • Constructor Details

    • Win32Printer

      public Win32Printer()
  • Method Details

    • isShared

      @Nullable public @Nullable Boolean isShared()
    • hasSpoolEnabled

      @Nullable public @Nullable Boolean hasSpoolEnabled()
    • isHidden

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