Class ManagedRuleOverride
java.lang.Object
com.azure.resourcemanager.network.models.ManagedRuleOverride
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ManagedRuleOverride>
public final class ManagedRuleOverride
extends Object
implements com.azure.json.JsonSerializable<ManagedRuleOverride>
Defines a managed rule group override setting.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaction()
Get the action property: Describes the override action to be applied when rule matches.static ManagedRuleOverride
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ManagedRuleOverride from the JsonReader.ruleId()
Get the ruleId property: Identifier for the managed rule.Get the sensitivity property: Describes the override sensitivity to be applied when rule matches.state()
Get the state property: The state of the managed rule.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withAction
(ActionType action) Set the action property: Describes the override action to be applied when rule matches.withRuleId
(String ruleId) Set the ruleId property: Identifier for the managed rule.withSensitivity
(SensitivityType sensitivity) Set the sensitivity property: Describes the override sensitivity to be applied when rule matches.withState
(ManagedRuleEnabledState state) Set the state property: The state of the managed rule.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ManagedRuleOverride
public ManagedRuleOverride()Creates an instance of ManagedRuleOverride class.
-
-
Method Details
-
ruleId
Get the ruleId property: Identifier for the managed rule.- Returns:
- the ruleId value.
-
withRuleId
Set the ruleId property: Identifier for the managed rule.- Parameters:
ruleId
- the ruleId value to set.- Returns:
- the ManagedRuleOverride object itself.
-
state
Get the state property: The state of the managed rule. Defaults to Disabled if not specified.- Returns:
- the state value.
-
withState
Set the state property: The state of the managed rule. Defaults to Disabled if not specified.- Parameters:
state
- the state value to set.- Returns:
- the ManagedRuleOverride object itself.
-
action
Get the action property: Describes the override action to be applied when rule matches.- Returns:
- the action value.
-
withAction
Set the action property: Describes the override action to be applied when rule matches.- Parameters:
action
- the action value to set.- Returns:
- the ManagedRuleOverride object itself.
-
sensitivity
Get the sensitivity property: Describes the override sensitivity to be applied when rule matches.- Returns:
- the sensitivity value.
-
withSensitivity
Set the sensitivity property: Describes the override sensitivity to be applied when rule matches.- Parameters:
sensitivity
- the sensitivity value to set.- Returns:
- the ManagedRuleOverride object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<ManagedRuleOverride>
- Throws:
IOException
-
fromJson
Reads an instance of ManagedRuleOverride from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ManagedRuleOverride if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the ManagedRuleOverride.
-