Class ExceptionEntry
java.lang.Object
com.azure.resourcemanager.network.models.ExceptionEntry
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ExceptionEntry>
public final class ExceptionEntry
extends Object
implements com.azure.json.JsonSerializable<ExceptionEntry>
Adds exception to allow a request when the condition is satisfied.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the exceptionManagedRuleSets property: The managed rule sets that are associated with the exception.static ExceptionEntryfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ExceptionEntry from the JsonReader.Get the matchVariable property: The variable on which we evaluate the exception condition.selector()Get the selector property: When the matchVariable points to a key-value pair (e.g, RequestHeader), this identifies the key.Get the selectorMatchOperator property: When the matchVariable points to a key-value pair (e.g, RequestHeader), this operates on the selector.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Get the valueMatchOperator property: Operates on the allowed values for the matchVariable.values()Get the values property: Allowed values for the matchVariable.withExceptionManagedRuleSets(List<ExclusionManagedRuleSet> exceptionManagedRuleSets) Set the exceptionManagedRuleSets property: The managed rule sets that are associated with the exception.withMatchVariable(ExceptionEntryMatchVariable matchVariable) Set the matchVariable property: The variable on which we evaluate the exception condition.withSelector(String selector) Set the selector property: When the matchVariable points to a key-value pair (e.g, RequestHeader), this identifies the key.withSelectorMatchOperator(ExceptionEntrySelectorMatchOperator selectorMatchOperator) Set the selectorMatchOperator property: When the matchVariable points to a key-value pair (e.g, RequestHeader), this operates on the selector.withValueMatchOperator(ExceptionEntryValueMatchOperator valueMatchOperator) Set the valueMatchOperator property: Operates on the allowed values for the matchVariable.withValues(List<String> values) Set the values property: Allowed values for the matchVariable.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
-
ExceptionEntry
public ExceptionEntry()Creates an instance of ExceptionEntry class.
-
-
Method Details
-
matchVariable
Get the matchVariable property: The variable on which we evaluate the exception condition.- Returns:
- the matchVariable value.
-
withMatchVariable
Set the matchVariable property: The variable on which we evaluate the exception condition.- Parameters:
matchVariable- the matchVariable value to set.- Returns:
- the ExceptionEntry object itself.
-
values
Get the values property: Allowed values for the matchVariable.- Returns:
- the values value.
-
withValues
Set the values property: Allowed values for the matchVariable.- Parameters:
values- the values value to set.- Returns:
- the ExceptionEntry object itself.
-
valueMatchOperator
Get the valueMatchOperator property: Operates on the allowed values for the matchVariable.- Returns:
- the valueMatchOperator value.
-
withValueMatchOperator
Set the valueMatchOperator property: Operates on the allowed values for the matchVariable.- Parameters:
valueMatchOperator- the valueMatchOperator value to set.- Returns:
- the ExceptionEntry object itself.
-
selectorMatchOperator
Get the selectorMatchOperator property: When the matchVariable points to a key-value pair (e.g, RequestHeader), this operates on the selector.- Returns:
- the selectorMatchOperator value.
-
withSelectorMatchOperator
public ExceptionEntry withSelectorMatchOperator(ExceptionEntrySelectorMatchOperator selectorMatchOperator) Set the selectorMatchOperator property: When the matchVariable points to a key-value pair (e.g, RequestHeader), this operates on the selector.- Parameters:
selectorMatchOperator- the selectorMatchOperator value to set.- Returns:
- the ExceptionEntry object itself.
-
selector
Get the selector property: When the matchVariable points to a key-value pair (e.g, RequestHeader), this identifies the key.- Returns:
- the selector value.
-
withSelector
Set the selector property: When the matchVariable points to a key-value pair (e.g, RequestHeader), this identifies the key.- Parameters:
selector- the selector value to set.- Returns:
- the ExceptionEntry object itself.
-
exceptionManagedRuleSets
Get the exceptionManagedRuleSets property: The managed rule sets that are associated with the exception.- Returns:
- the exceptionManagedRuleSets value.
-
withExceptionManagedRuleSets
public ExceptionEntry withExceptionManagedRuleSets(List<ExclusionManagedRuleSet> exceptionManagedRuleSets) Set the exceptionManagedRuleSets property: The managed rule sets that are associated with the exception.- Parameters:
exceptionManagedRuleSets- the exceptionManagedRuleSets value to set.- Returns:
- the ExceptionEntry 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<ExceptionEntry>- Throws:
IOException
-
fromJson
Reads an instance of ExceptionEntry from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ExceptionEntry 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 ExceptionEntry.
-