Class NetworkInterfaceReferenceProperties

java.lang.Object
com.azure.resourcemanager.compute.fluent.models.NetworkInterfaceReferenceProperties
All Implemented Interfaces:
com.azure.json.JsonSerializable<NetworkInterfaceReferenceProperties>

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

    • NetworkInterfaceReferenceProperties

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

    • primary

      public Boolean primary()
      Get the primary property: Specifies the primary network interface in case the virtual machine has more than 1 network interface.
      Returns:
      the primary value.
    • withPrimary

      public NetworkInterfaceReferenceProperties withPrimary(Boolean primary)
      Set the primary property: Specifies the primary network interface in case the virtual machine has more than 1 network interface.
      Parameters:
      primary - the primary value to set.
      Returns:
      the NetworkInterfaceReferenceProperties object itself.
    • deleteOption

      public DeleteOptions deleteOption()
      Get the deleteOption property: Specify what happens to the network interface when the VM is deleted.
      Returns:
      the deleteOption value.
    • withDeleteOption

      public NetworkInterfaceReferenceProperties withDeleteOption(DeleteOptions deleteOption)
      Set the deleteOption property: Specify what happens to the network interface when the VM is deleted.
      Parameters:
      deleteOption - the deleteOption value to set.
      Returns:
      the NetworkInterfaceReferenceProperties 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<NetworkInterfaceReferenceProperties>
      Throws:
      IOException
    • fromJson

      public static NetworkInterfaceReferenceProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of NetworkInterfaceReferenceProperties from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of NetworkInterfaceReferenceProperties 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 NetworkInterfaceReferenceProperties.