Class Win32OperatingSystem

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

@ShallowImmutable public class Win32OperatingSystem extends Object
Immutable representation of the Windows Operating System.

Fields correspond to properties retrieved from the Win32_OperatingSystem WMI class.

Usage examples

// Build a new OperatingSystem instance
Win32OperatingSystem os = Win32OperatingSystem.builder()
    .name("Windows 11 Pro")
    .version("22H2")
    .numberOfUsers(1)
    .osArchitecture("64-bit")
    .build();

// Create a modified copy using the builder
Win32OperatingSystem updated = os.toBuilder()
    .numberOfUsers(5)
    .build();

Since:
3.0.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) @Nullable String
    Path to the boot device that the operating system uses to start the computer.
    (package private) @Nullable String
    Internal build number of the operating system.
    (package private) @Nullable String
    Type of build (e.g., "Multiprocessor Free" or "Checked").
    (package private) @Nullable String
    Short textual description (friendly name) of the operating system.
    (package private) @Nullable String
    Name of the computer system running the operating system.
    (package private) @Nullable Boolean
    Indicates whether this operating system is part of a distributed system.
    (package private) @Nullable String
    Date and time when the operating system was installed.
    (package private) @Nullable String
    Date and time when the computer was last booted.
    (package private) @Nullable String
    Current local date and time of the operating system.
    (package private) @Nullable String
    Manufacturer of the operating system (typically "Microsoft Corporation").
    (package private) @Nullable List<String>
    List of installed user interface languages (MUI language codes).
    (package private) @Nullable String
    Name of the operating system.
    (package private) @Nullable Integer
    Number of user sessions currently active.
    (package private) @Nullable String
    Architecture of the operating system, such as "32-bit" or "64-bit".
    (package private) @Nullable Boolean
    Indicates whether the operating system is installed on a portable device.
    (package private) @Nullable Boolean
    Indicates whether this is the primary operating system on the computer.
    (package private) @Nullable String
    Name of the registered user of the operating system.
    (package private) @Nullable String
    Operating system serial number or product key identifier.
    (package private) @Nullable Integer
    Major version number of the most recent service pack installed.
    (package private) @Nullable Integer
    Minor version number of the most recent service pack installed.
    (package private) @Nullable String
    Full path to the system directory (typically "C:\WINDOWS\system32").
    (package private) @Nullable String
    Drive letter where the operating system is installed (e.g., "C:").
    (package private) @Nullable String
    Version number of the operating system (for example, "10.0.22621").
    (package private) @Nullable String
    Full path to the Windows installation directory (typically "C:\WINDOWS").
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Boolean
     
    @Nullable Boolean
     
    @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

    • name

      @SerializedName("Name") @Nullable @Nullable String name
      Name of the operating system.
    • caption

      @SerializedName("Caption") @Nullable @Nullable String caption
      Short textual description (friendly name) of the operating system.
    • installDate

      @SerializedName("InstallDate") @Nullable @Nullable String installDate
      Date and time when the operating system was installed.
    • csName

      @SerializedName("CSName") @Nullable @Nullable String csName
      Name of the computer system running the operating system.
    • lastBootUpTime

      @SerializedName("LastBootUpTime") @Nullable @Nullable String lastBootUpTime
      Date and time when the computer was last booted.
    • localDateTime

      @SerializedName("LocalDateTime") @Nullable @Nullable String localDateTime
      Current local date and time of the operating system.
    • distributed

      @SerializedName("Distributed") @Nullable @Nullable Boolean distributed
      Indicates whether this operating system is part of a distributed system.
    • numberOfUsers

      @SerializedName("NumberOfUsers") @Nullable @Nullable Integer numberOfUsers
      Number of user sessions currently active.
    • version

      @SerializedName("Version") @Nullable @Nullable String version
      Version number of the operating system (for example, "10.0.22621").
    • bootDevice

      @SerializedName("BootDevice") @Nullable @Nullable String bootDevice
      Path to the boot device that the operating system uses to start the computer.
    • buildNumber

      @SerializedName("BuildNumber") @Nullable @Nullable String buildNumber
      Internal build number of the operating system.
    • buildType

      @SerializedName("BuildType") @Nullable @Nullable String buildType
      Type of build (e.g., "Multiprocessor Free" or "Checked").
    • manufacturer

      @SerializedName("Manufacturer") @Nullable @Nullable String manufacturer
      Manufacturer of the operating system (typically "Microsoft Corporation").
    • osArchitecture

      @SerializedName("OSArchitecture") @Nullable @Nullable String osArchitecture
      Architecture of the operating system, such as "32-bit" or "64-bit".
    • muiLanguages

      @SerializedName("MUILanguages") @Nullable @Nullable List<String> muiLanguages
      List of installed user interface languages (MUI language codes).
    • portableOperatingSystem

      @SerializedName("PortableOperatingSystem") @Nullable @Nullable Boolean portableOperatingSystem
      Indicates whether the operating system is installed on a portable device.
      • true — The operating system is installed on a portable device (e.g., Windows To Go).
      • false — The operating system is installed on a fixed computer.
    • primary

      @SerializedName("Primary") @Nullable @Nullable Boolean primary
      Indicates whether this is the primary operating system on the computer.
    • registeredUser

      @SerializedName("RegisteredUser") @Nullable @Nullable String registeredUser
      Name of the registered user of the operating system.
    • serialNumber

      @SerializedName("SerialNumber") @Nullable @Nullable String serialNumber
      Operating system serial number or product key identifier.
    • servicePackMajorVersion

      @SerializedName("ServicePackMajorVersion") @Nullable @Nullable Integer servicePackMajorVersion
      Major version number of the most recent service pack installed.
    • servicePackMinorVersion

      @SerializedName("ServicePackMinorVersion") @Nullable @Nullable Integer servicePackMinorVersion
      Minor version number of the most recent service pack installed.
    • systemDirectory

      @SerializedName("SystemDirectory") @Nullable @Nullable String systemDirectory
      Full path to the system directory (typically "C:\WINDOWS\system32").
    • systemDrive

      @SerializedName("SystemDrive") @Nullable @Nullable String systemDrive
      Drive letter where the operating system is installed (e.g., "C:").
    • windowsDirectory

      @SerializedName("WindowsDirectory") @Nullable @Nullable String windowsDirectory
      Full path to the Windows installation directory (typically "C:\WINDOWS").
  • Constructor Details

    • Win32OperatingSystem

      public Win32OperatingSystem()
  • Method Details

    • isDistributed

      @Nullable public @Nullable Boolean isDistributed()
    • isPortable

      @Nullable public @Nullable Boolean isPortable()
    • isPrimary

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