Class Win32NetworkAdapterConfiguration

java.lang.Object
io.github.eggy03.ferrumx.windows.entity.network.Win32NetworkAdapterConfiguration

@ShallowImmutable public class Win32NetworkAdapterConfiguration extends Object
Immutable representation of a network adapter configuration on a Windows system.

Fields correspond to properties retrieved from the Win32_NetworkAdapterConfiguration WMI class.

Usage examples

// Create a new configuration using the builder
Win32NetworkAdapterConfiguration config = Win32NetworkAdapterConfiguration.builder()
    .index(1)
    .description("Ethernet Adapter")
    .ipEnabled(true)
    .ipAddress(List.of("192.168.1.100"))
    .dnsServerSearchOrder(List.of("8.8.8.8", "8.8.4.4"))
    .build();

// Create a modified copy using the builder
Win32NetworkAdapterConfiguration updated = config.toBuilder()
    .description("Updated Ethernet Adapter")
    .build();

See Win32NetworkAdapter for the corresponding adapter entity

Since:
3.0.0
See Also:
  • Field Details

    • index

      @SerializedName("Index") @Nullable @Nullable Integer index
      Index number of the Windows network adapter configuration. Used when multiple configurations exist.
    • description

      @SerializedName("Description") @Nullable @Nullable String description
      Textual description of the network adapter configuration.
    • caption

      @SerializedName("Caption") @Nullable @Nullable String caption
      Short textual caption describing the object.
    • settingId

      @SerializedName("SettingID") @Nullable @Nullable String settingId
      Unique identifier by which the configuration instance is known.
    • ipEnabled

      @SerializedName("IPEnabled") @Nullable @Nullable Boolean ipEnabled
      Indicates whether TCP/IP is bound and enabled on this adapter.
    • ipAddress

      @SerializedName("IPAddress") @Nullable @Nullable List<String> ipAddress
      List of IP addresses associated with this network adapter. May contain IPv4 and/or IPv6 addresses.
    • ipSubnet

      @SerializedName("IPSubnet") @Nullable @Nullable List<String> ipSubnet
      Subnet masks associated with each IP address on this adapter.
    • defaultIpGateway

      @SerializedName("DefaultIPGateway") @Nullable @Nullable List<String> defaultIpGateway
      List of default gateway IP addresses used by this system.
    • dhcpEnabled

      @SerializedName("DHCPEnabled") @Nullable @Nullable Boolean dhcpEnabled
      Indicates whether DHCP is enabled for this adapter.
    • dhcpServer

      @SerializedName("DHCPServer") @Nullable @Nullable String dhcpServer
      IP address of the DHCP server that assigned this configuration.
    • dhcpLeaseObtained

      @SerializedName("DHCPLeaseObtained") @Nullable @Nullable String dhcpLeaseObtained
      Date and time when the DHCP lease was obtained.
    • dhcpLeaseExpires

      @SerializedName("DHCPLeaseExpires") @Nullable @Nullable String dhcpLeaseExpires
      Date and time when the DHCP lease expires.
    • dnsHostName

      @SerializedName("DNSHostName") @Nullable @Nullable String dnsHostName
      Host name used to identify this computer on the network.
    • dnsServerSearchOrder

      @SerializedName("DNSServerSearchOrder") @Nullable @Nullable List<String> dnsServerSearchOrder
      List of DNS server IP addresses used for name resolution.
  • Constructor Details

    • Win32NetworkAdapterConfiguration

      public Win32NetworkAdapterConfiguration()
  • Method Details

    • isIPEnabled

      @Nullable public @Nullable Boolean isIPEnabled()
    • isDHCPEnabled

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