Class AddressSpace

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

public final class AddressSpace extends Object implements com.azure.json.JsonSerializable<AddressSpace>
AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Get the addressPrefixes property: A list of address blocks reserved for this virtual network in CIDR notation.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of AddressSpace from the JsonReader.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withAddressPrefixes(List<String> addressPrefixes)
    Set the addressPrefixes property: A list of address blocks reserved for this virtual network in CIDR notation.

    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

    • AddressSpace

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

    • addressPrefixes

      public List<String> addressPrefixes()
      Get the addressPrefixes property: A list of address blocks reserved for this virtual network in CIDR notation.
      Returns:
      the addressPrefixes value.
    • withAddressPrefixes

      public AddressSpace withAddressPrefixes(List<String> addressPrefixes)
      Set the addressPrefixes property: A list of address blocks reserved for this virtual network in CIDR notation.
      Parameters:
      addressPrefixes - the addressPrefixes value to set.
      Returns:
      the AddressSpace 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<AddressSpace>
      Throws:
      IOException
    • fromJson

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