Class IpAddressOrRange
java.lang.Object
com.azure.resourcemanager.cosmos.models.IpAddressOrRange
- All Implemented Interfaces:
com.azure.json.JsonSerializable<IpAddressOrRange>
public final class IpAddressOrRange
extends Object
implements com.azure.json.JsonSerializable<IpAddressOrRange>
IpAddressOrRange object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IpAddressOrRangefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of IpAddressOrRange from the JsonReader.Get the ipAddressOrRange property: A single IPv4 address or a single IPv4 address range in CIDR format.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withIpAddressOrRange(String ipAddressOrRange) Set the ipAddressOrRange property: A single IPv4 address or a single IPv4 address range in CIDR format.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
-
IpAddressOrRange
public IpAddressOrRange()Creates an instance of IpAddressOrRange class.
-
-
Method Details
-
ipAddressOrRange
Get the ipAddressOrRange property: A single IPv4 address or a single IPv4 address range in CIDR format. Provided IPs must be well-formatted and cannot be contained in one of the following ranges: 10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16, since these are not enforceable by the IP address filter. Example of valid inputs: “23.40.210.245” or “23.40.210.0/8”.- Returns:
- the ipAddressOrRange value.
-
withIpAddressOrRange
Set the ipAddressOrRange property: A single IPv4 address or a single IPv4 address range in CIDR format. Provided IPs must be well-formatted and cannot be contained in one of the following ranges: 10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16, since these are not enforceable by the IP address filter. Example of valid inputs: “23.40.210.245” or “23.40.210.0/8”.- Parameters:
ipAddressOrRange- the ipAddressOrRange value to set.- Returns:
- the IpAddressOrRange 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<IpAddressOrRange>- Throws:
IOException
-
fromJson
Reads an instance of IpAddressOrRange from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of IpAddressOrRange 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 IpAddressOrRange.
-