IpFilterRule Class

  • java.lang.Object
    • com.azure.resourcemanager.deviceprovisioningservices.models.IpFilterRule

Implements

public final class IpFilterRule
implements JsonSerializable<IpFilterRule>

The IP filter rules for a provisioning Service.

Constructor Summary

Constructor Description
IpFilterRule()

Creates an instance of IpFilterRule class.

Method Summary

Modifier and Type Method and Description
IpFilterActionType action()

Get the action property: The desired action for requests captured by this rule.

String filterName()

Get the filterName property: The name of the IP filter rule.

static IpFilterRule fromJson(JsonReader jsonReader)

Reads an instance of IpFilterRule from the JsonReader.

String ipMask()

Get the ipMask property: A string that contains the IP address range in CIDR notation for the rule.

IpFilterTargetType target()

Get the target property: Target for requests captured by this rule.

JsonWriter toJson(JsonWriter jsonWriter)
IpFilterRule withAction(IpFilterActionType action)

Set the action property: The desired action for requests captured by this rule.

IpFilterRule withFilterName(String filterName)

Set the filterName property: The name of the IP filter rule.

IpFilterRule withIpMask(String ipMask)

Set the ipMask property: A string that contains the IP address range in CIDR notation for the rule.

IpFilterRule withTarget(IpFilterTargetType target)

Set the target property: Target for requests captured by this rule.

Methods inherited from java.lang.Object

Constructor Details

IpFilterRule

public IpFilterRule()

Creates an instance of IpFilterRule class.

Method Details

action

public IpFilterActionType action()

Get the action property: The desired action for requests captured by this rule.

Returns:

the action value.

filterName

public String filterName()

Get the filterName property: The name of the IP filter rule.

Returns:

the filterName value.

fromJson

public static IpFilterRule fromJson(JsonReader jsonReader)

Reads an instance of IpFilterRule from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of IpFilterRule if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

ipMask

public String ipMask()

Get the ipMask property: A string that contains the IP address range in CIDR notation for the rule.

Returns:

the ipMask value.

target

public IpFilterTargetType target()

Get the target property: Target for requests captured by this rule.

Returns:

the target value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

withAction

public IpFilterRule withAction(IpFilterActionType action)

Set the action property: The desired action for requests captured by this rule.

Parameters:

action - the action value to set.

Returns:

the IpFilterRule object itself.

withFilterName

public IpFilterRule withFilterName(String filterName)

Set the filterName property: The name of the IP filter rule.

Parameters:

filterName - the filterName value to set.

Returns:

the IpFilterRule object itself.

withIpMask

public IpFilterRule withIpMask(String ipMask)

Set the ipMask property: A string that contains the IP address range in CIDR notation for the rule.

Parameters:

ipMask - the ipMask value to set.

Returns:

the IpFilterRule object itself.

withTarget

public IpFilterRule withTarget(IpFilterTargetType target)

Set the target property: Target for requests captured by this rule.

Parameters:

target - the target value to set.

Returns:

the IpFilterRule object itself.

Applies to