IpRule Class

  • java.lang.Object
    • com.azure.resourcemanager.search.models.IpRule

Implements

public final class IpRule
implements JsonSerializable<IpRule>

The IP restriction rule of the search service.

Constructor Summary

Constructor Description
IpRule()

Creates an instance of IpRule class.

Method Summary

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

Reads an instance of IpRule from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

String value()

Get the value property: Value corresponding to a single IPv4 address (for example, 123.1.2.3) or an IP range in CIDR format (for example, 123.1.2.3/24) to be allowed.

IpRule withValue(String value)

Set the value property: Value corresponding to a single IPv4 address (for example, 123.1.2.3) or an IP range in CIDR format (for example, 123.1.2.3/24) to be allowed.

Methods inherited from java.lang.Object

Constructor Details

IpRule

public IpRule()

Creates an instance of IpRule class.

Method Details

fromJson

public static IpRule fromJson(JsonReader jsonReader)

Reads an instance of IpRule from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of IpRule 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 IpRule.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

value

public String value()

Get the value property: Value corresponding to a single IPv4 address (for example, 123.1.2.3) or an IP range in CIDR format (for example, 123.1.2.3/24) to be allowed.

Returns:

the value value.

withValue

public IpRule withValue(String value)

Set the value property: Value corresponding to a single IPv4 address (for example, 123.1.2.3) or an IP range in CIDR format (for example, 123.1.2.3/24) to be allowed.

Parameters:

value - the value value to set.

Returns:

the IpRule object itself.

Applies to