Partager via


IpAddressOrRange Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.models.IpAddressOrRange

Implements

public final class IpAddressOrRange
implements JsonSerializable<IpAddressOrRange>

IpAddressOrRange object.

Constructor Summary

Constructor Description
IpAddressOrRange()

Creates an instance of IpAddressOrRange class.

Method Summary

Modifier and Type Method and Description
static IpAddressOrRange fromJson(JsonReader jsonReader)

Reads an instance of IpAddressOrRange from the JsonReader.

String ipAddressOrRange()

Get the ipAddressOrRange property: A single IPv4 address or a single IPv4 address range in CIDR format.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

IpAddressOrRange withIpAddressOrRange(String ipAddressOrRange)

Set the ipAddressOrRange property: A single IPv4 address or a single IPv4 address range in CIDR format.

Methods inherited from java.lang.Object

Constructor Details

IpAddressOrRange

public IpAddressOrRange()

Creates an instance of IpAddressOrRange class.

Method Details

fromJson

public static IpAddressOrRange fromJson(JsonReader jsonReader)

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.

ipAddressOrRange

public String 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: \u201c23.40.210.245\u201d or \u201c23.40.210.0/8\u201d.

Returns:

the ipAddressOrRange value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withIpAddressOrRange

public IpAddressOrRange withIpAddressOrRange(String ipAddressOrRange)

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: \u201c23.40.210.245\u201d or \u201c23.40.210.0/8\u201d.

Parameters:

ipAddressOrRange - the ipAddressOrRange value to set.

Returns:

the IpAddressOrRange object itself.

Applies to