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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NetworkInterfacefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of NetworkInterface from the JsonReader.id()Get the id property: Represents the ID of the network interface.Get the ipAddresses property: The list of IP addresses in this interface.Get the macAddress property: Represents MAC address of the network interface.name()Get the name property: Represents the name of the network interface.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the id property: Represents the ID of the network interface.withIpAddresses(List<IpAddress> ipAddresses) Set the ipAddresses property: The list of IP addresses in this interface.withMacAddress(String macAddress) Set the macAddress property: Represents MAC address of the network interface.Set the name property: Represents the name of the network interface.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
NetworkInterface
public NetworkInterface()Creates an instance of NetworkInterface class.
-
-
Method Details
-
macAddress
Get the macAddress property: Represents MAC address of the network interface.- Returns:
- the macAddress value.
-
withMacAddress
Set the macAddress property: Represents MAC address of the network interface.- Parameters:
macAddress- the macAddress value to set.- Returns:
- the NetworkInterface object itself.
-
id
Get the id property: Represents the ID of the network interface.- Returns:
- the id value.
-
withId
Set the id property: Represents the ID of the network interface.- Parameters:
id- the id value to set.- Returns:
- the NetworkInterface object itself.
-
name
Get the name property: Represents the name of the network interface.- Returns:
- the name value.
-
withName
Set the name property: Represents the name of the network interface.- Parameters:
name- the name value to set.- Returns:
- the NetworkInterface object itself.
-
ipAddresses
Get the ipAddresses property: The list of IP addresses in this interface.- Returns:
- the ipAddresses value.
-
withIpAddresses
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<NetworkInterface>- Throws:
IOException
-
fromJson
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.
-