Class MsftDnsClientServerAddress

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

@ShallowImmutable public class MsftDnsClientServerAddress extends Object
Immutable representation of a DNS server configuration for a particular network adapter on a Windows system.

Fields correspond to properties retrieved from the MSFT_DNSClientServerAddress class in the root/StandardCimv2 namespace.

Together, with MsftNetIpAddress, this class aims to be a replacement for Win32NetworkAdapterConfiguration

Usage example

MsftDnsClientServerAddress dns = MsftDnsClientServerAddress.builder()
    .interfaceIndex(1)
    .interfaceAlias("Ethernet")
    .addressFamily(23)
    .build();

// Create a modified copy
MsftDnsClientServerAddress updated = dns.toBuilder()
    .addressFamily(2)
    .build();

See MsftNetAdapter, for network adapter information.

See MsftNetConnectionProfile, for information regarding the current profile of a network adapter.

See MsftNetIpAddress, for IP address configuration information of a network adapter.

Since:
3.0.0
See Also:
  • Field Details

    • interfaceIndex

      @SerializedName("InterfaceIndex") @Nullable @Nullable Long interfaceIndex
      Gets the user-friendly index of the server interface. It's the unique interface index number used by the network stack.
    • interfaceAlias

      @SerializedName("InterfaceAlias") @Nullable @Nullable String interfaceAlias
      Gets the user-friendly name of the server interface.
    • addressFamily

      @SerializedName("AddressFamily") @Nullable @Nullable Integer addressFamily
      Gets the address family of the server address.

      Possible values:

      • 2 - IPv4
      • 23 - IPv6
    • dnsServerAddresses

      @SerializedName("ServerAddresses") @Nullable @Nullable List<String> dnsServerAddresses
      Gets a list that contains the DNS server addresses.
  • Constructor Details

    • MsftDnsClientServerAddress

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