Class CidrIpAddress
java.lang.Object
com.azure.resourcemanager.cdn.models.CidrIpAddress
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CidrIpAddress>
public final class CidrIpAddress
extends Object
implements com.azure.json.JsonSerializable<CidrIpAddress>
CIDR Ip address.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the baseIpAddress property: Ip address itself.static CidrIpAddressfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of CidrIpAddress from the JsonReader.Get the prefixLength property: The length of the prefix of the ip address.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withBaseIpAddress(String baseIpAddress) Set the baseIpAddress property: Ip address itself.withPrefixLength(Integer prefixLength) Set the prefixLength property: The length of the prefix of the ip address.Methods inherited from class 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
-
CidrIpAddress
public CidrIpAddress()Creates an instance of CidrIpAddress class.
-
-
Method Details
-
baseIpAddress
Get the baseIpAddress property: Ip address itself.- Returns:
- the baseIpAddress value.
-
withBaseIpAddress
Set the baseIpAddress property: Ip address itself.- Parameters:
baseIpAddress- the baseIpAddress value to set.- Returns:
- the CidrIpAddress object itself.
-
prefixLength
Get the prefixLength property: The length of the prefix of the ip address.- Returns:
- the prefixLength value.
-
withPrefixLength
Set the prefixLength property: The length of the prefix of the ip address.- Parameters:
prefixLength- the prefixLength value to set.- Returns:
- the CidrIpAddress 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<CidrIpAddress>- Throws:
IOException
-
fromJson
Reads an instance of CidrIpAddress from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of CidrIpAddress 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 CidrIpAddress.
-