Class Win32Environment

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

@ShallowImmutable public class Win32Environment extends Object
Immutable representation of the environment variables in a system running Windows.

Fields correspond to properties retrieved from the Win32_Environment WMI class.

Usage examples

// Build a new instance
Win32Environment env = Win32Environment.builder()
    .name("DOT_NET_CLI_TELEMETRY_DISABLE")
    .systemVariable(true)
    .variableValue("0")
    .build();

// Create a modified copy
Win32Environment updated = env.toBuilder()
    .variableValue("1")
    .build();

Since:
3.0.0
See Also:
  • Field Details

    • name

      @SerializedName("Name") @Nullable @Nullable String name
      Character string that specifies the name of a Windows-based environment variable.
    • systemVariable

      @SerializedName("SystemVariable") @Nullable @Nullable Boolean systemVariable
      Indicates whether the variable is a system variable.
    • variableValue

      @SerializedName("VariableValue") @Nullable @Nullable String variableValue
      Placeholder variable of a Windows-based environment variable. Information like the file system directory can change from computer to computer. The operating system substitutes placeholders for these.
  • Constructor Details

    • Win32Environment

      public Win32Environment()
  • Method Details

    • isSystemVariable

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