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.SubResourceDescribes a network interface reference.
-
-
Constructor Summary
Constructors Constructor Description NetworkInterfaceReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeleteOptionsdeleteOption()Get the deleteOption property: Specify what happens to the network interface when the VM is deleted.Booleanprimary()Get the primary property: Specifies the primary network interface in case the virtual machine has more than 1 network interface.voidvalidate()Validates the instance.NetworkInterfaceReferencewithDeleteOption(DeleteOptions deleteOption)Set the deleteOption property: Specify what happens to the network interface when the VM is deleted.NetworkInterfaceReferencewithId(String id)NetworkInterfaceReferencewithPrimary(Boolean primary)Set the primary property: Specifies the primary network interface in case the virtual machine has more than 1 network interface.
-
-
-
Method Detail
-
withId
public NetworkInterfaceReference withId(String id)
- Overrides:
withIdin classcom.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.
-
-