Class NetworkInterfaceReference

java.lang.Object
com.azure.core.management.SubResource
com.azure.resourcemanager.compute.models.NetworkInterfaceReference

public final class NetworkInterfaceReference extends com.azure.core.management.SubResource
Describes a network interface reference.
  • Constructor Details

    • NetworkInterfaceReference

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

    • withId

      public NetworkInterfaceReference withId(String id)
      Overrides:
      withId in class com.azure.core.management.SubResource
    • 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 NetworkInterfaceReference 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 NetworkInterfaceReference 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 NetworkInterfaceReference 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 NetworkInterfaceReference object itself.
    • validate

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