Class NetworkInterface

java.lang.Object
com.azure.resourcemanager.hybridcompute.models.NetworkInterface
All Implemented Interfaces:
com.azure.json.JsonSerializable<NetworkInterface>

public final class NetworkInterface extends Object implements com.azure.json.JsonSerializable<NetworkInterface>
Describes a network interface.
  • Constructor Details

    • NetworkInterface

      public NetworkInterface()
      Creates an instance of NetworkInterface class.
  • Method Details

    • macAddress

      public String macAddress()
      Get the macAddress property: Represents MAC address of the network interface.
      Returns:
      the macAddress value.
    • withMacAddress

      public NetworkInterface withMacAddress(String macAddress)
      Set the macAddress property: Represents MAC address of the network interface.
      Parameters:
      macAddress - the macAddress value to set.
      Returns:
      the NetworkInterface object itself.
    • id

      public String id()
      Get the id property: Represents the ID of the network interface.
      Returns:
      the id value.
    • withId

      public NetworkInterface withId(String id)
      Set the id property: Represents the ID of the network interface.
      Parameters:
      id - the id value to set.
      Returns:
      the NetworkInterface object itself.
    • name

      public String name()
      Get the name property: Represents the name of the network interface.
      Returns:
      the name value.
    • withName

      public NetworkInterface withName(String name)
      Set the name property: Represents the name of the network interface.
      Parameters:
      name - the name value to set.
      Returns:
      the NetworkInterface object itself.
    • ipAddresses

      public List<IpAddress> ipAddresses()
      Get the ipAddresses property: The list of IP addresses in this interface.
      Returns:
      the ipAddresses value.
    • withIpAddresses

      public NetworkInterface withIpAddresses(List<IpAddress> ipAddresses)
      Set the ipAddresses property: The list of IP addresses in this interface.
      Parameters:
      ipAddresses - the ipAddresses value to set.
      Returns:
      the NetworkInterface object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<NetworkInterface>
      Throws:
      IOException
    • fromJson

      public static NetworkInterface fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of NetworkInterface from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of NetworkInterface if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the NetworkInterface.