Class VirtualNetworkRule

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

public final class VirtualNetworkRule extends Object implements com.azure.json.JsonSerializable<VirtualNetworkRule>
Virtual Network rule.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of VirtualNetworkRule class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the action property: The action of virtual network rule.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of VirtualNetworkRule from the JsonReader.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Get the virtualNetworkResourceId property: Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
    Set the action property: The action of virtual network rule.
    withVirtualNetworkResourceId(String virtualNetworkResourceId)
    Set the virtualNetworkResourceId property: Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • VirtualNetworkRule

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

    • virtualNetworkResourceId

      public String virtualNetworkResourceId()
      Get the virtualNetworkResourceId property: Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
      Returns:
      the virtualNetworkResourceId value.
    • withVirtualNetworkResourceId

      public VirtualNetworkRule withVirtualNetworkResourceId(String virtualNetworkResourceId)
      Set the virtualNetworkResourceId property: Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
      Parameters:
      virtualNetworkResourceId - the virtualNetworkResourceId value to set.
      Returns:
      the VirtualNetworkRule object itself.
    • action

      public Action action()
      Get the action property: The action of virtual network rule.
      Returns:
      the action value.
    • withAction

      public VirtualNetworkRule withAction(Action action)
      Set the action property: The action of virtual network rule.
      Parameters:
      action - the action value to set.
      Returns:
      the VirtualNetworkRule 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<VirtualNetworkRule>
      Throws:
      IOException
    • fromJson

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