Class Win32NetworkAdapter

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

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

Fields correspond to properties retrieved from the Win32_NetworkAdapter WMI class.

Usage example

Win32NetworkAdapter adapter = Win32NetworkAdapter.builder()
    .name("Ethernet 1")
    .macAddress("00:1A:2B:3C:4D:5E")
    .netEnabled(true)
    .build();

// Create a modified copy
Win32NetworkAdapter updated = adapter.toBuilder()
    .netEnabled(false)
    .build();

Win32NetworkAdapterConfiguration contains related network configuration details.

Since:
3.0.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) @Nullable String
    Text description of the network adapter.
    (package private) @Nullable String
    Unique identifier of the network adapter within the system.
    (package private) @Nullable Integer
    Index number of the network adapter, stored in the system registry.
    (package private) @Nullable Boolean
    Indicates whether the network adapter is installed in the system.
    (package private) @Nullable String
    Media access control (MAC) address for this adapter.
    (package private) @Nullable String
    Friendly name of the network adapter.
    (package private) @Nullable String
    Name of the network connection as displayed in the Network Connections Control Panel.
    (package private) @Nullable Boolean
    Indicates whether the network adapter is currently enabled.
    (package private) @Nullable Boolean
    Indicates whether the adapter represents a physical or logical device.
    (package private) @Nullable String
    Windows Plug-and-Play device identifier for the network adapter.
    (package private) @Nullable String
    Date and time the network adapter was last reset.
  • 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

    • deviceId

      @SerializedName("DeviceID") @Nullable @Nullable String deviceId
      Unique identifier of the network adapter within the system.
    • index

      @SerializedName("Index") @Nullable @Nullable Integer index
      Index number of the network adapter, stored in the system registry.
    • name

      @SerializedName("Name") @Nullable @Nullable String name
      Friendly name of the network adapter.

      Example: "Intel(R) Ethernet Connection"

    • description

      @SerializedName("Description") @Nullable @Nullable String description
      Text description of the network adapter.
    • pnpDeviceId

      @SerializedName("PNPDeviceID") @Nullable @Nullable String pnpDeviceId
      Windows Plug-and-Play device identifier for the network adapter.
    • macAddress

      @SerializedName("MACAddress") @Nullable @Nullable String macAddress
      Media access control (MAC) address for this adapter.
    • installed

      @SerializedName("Installed") @Nullable @Nullable Boolean installed
      Indicates whether the network adapter is installed in the system.
    • netEnabled

      @SerializedName("NetEnabled") @Nullable @Nullable Boolean netEnabled
      Indicates whether the network adapter is currently enabled.
    • netConnectionId

      @SerializedName("NetConnectionID") @Nullable @Nullable String netConnectionId
      Name of the network connection as displayed in the Network Connections Control Panel.
    • physicalAdapter

      @SerializedName("PhysicalAdapter") @Nullable @Nullable Boolean physicalAdapter
      Indicates whether the adapter represents a physical or logical device.
    • timeOfLastReset

      @SerializedName("TimeOfLastReset") @Nullable @Nullable String timeOfLastReset
      Date and time the network adapter was last reset.
  • Constructor Details

    • Win32NetworkAdapter

      public Win32NetworkAdapter()
  • Method Details

    • isInstalled

      @Nullable public @Nullable Boolean isInstalled()
    • isNetEnabled

      @Nullable public @Nullable Boolean isNetEnabled()
    • isPhysicalAdapter

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