Class AddressPrefixItem

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

public final class AddressPrefixItem extends Object implements com.azure.json.JsonSerializable<AddressPrefixItem>
Address prefix item.
  • Constructor Details

    • AddressPrefixItem

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

    • addressPrefix

      public String addressPrefix()
      Get the addressPrefix property: Address prefix.
      Returns:
      the addressPrefix value.
    • withAddressPrefix

      public AddressPrefixItem withAddressPrefix(String addressPrefix)
      Set the addressPrefix property: Address prefix.
      Parameters:
      addressPrefix - the addressPrefix value to set.
      Returns:
      the AddressPrefixItem object itself.
    • addressPrefixType

      public AddressPrefixType addressPrefixType()
      Get the addressPrefixType property: Address prefix type.
      Returns:
      the addressPrefixType value.
    • withAddressPrefixType

      public AddressPrefixItem withAddressPrefixType(AddressPrefixType addressPrefixType)
      Set the addressPrefixType property: Address prefix type.
      Parameters:
      addressPrefixType - the addressPrefixType value to set.
      Returns:
      the AddressPrefixItem 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<AddressPrefixItem>
      Throws:
      IOException
    • fromJson

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