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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the addressPrefix property: Address prefix.Get the addressPrefixType property: Address prefix type.static AddressPrefixItemfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of AddressPrefixItem from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withAddressPrefix(String addressPrefix) Set the addressPrefix property: Address prefix.withAddressPrefixType(AddressPrefixType addressPrefixType) Set the addressPrefixType property: Address prefix type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
AddressPrefixItem
public AddressPrefixItem()Creates an instance of AddressPrefixItem class.
-
-
Method Details
-
addressPrefix
Get the addressPrefix property: Address prefix.- Returns:
- the addressPrefix value.
-
withAddressPrefix
Set the addressPrefix property: Address prefix.- Parameters:
addressPrefix- the addressPrefix value to set.- Returns:
- the AddressPrefixItem object itself.
-
addressPrefixType
Get the addressPrefixType property: Address prefix type.- Returns:
- the addressPrefixType value.
-
withAddressPrefixType
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<AddressPrefixItem>- Throws:
IOException
-
fromJson
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.
-