Class MatchCondition
java.lang.Object
com.azure.resourcemanager.cdn.models.MatchCondition
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MatchCondition>
public final class MatchCondition
extends Object
implements com.azure.json.JsonSerializable<MatchCondition>
Define match conditions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MatchConditionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of MatchCondition from the JsonReader.Get the matchValue property: List of possible match values.Get the matchVariable property: Match variable to compare against.Get the negateCondition property: Describes if the result of this condition should be negated.operator()Get the operator property: Describes operator to be matched.selector()Get the selector property: Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Get the transforms property: List of transforms.voidvalidate()Validates the instance.withMatchValue(List<String> matchValue) Set the matchValue property: List of possible match values.withMatchVariable(WafMatchVariable matchVariable) Set the matchVariable property: Match variable to compare against.withNegateCondition(Boolean negateCondition) Set the negateCondition property: Describes if the result of this condition should be negated.withOperator(Operator operator) Set the operator property: Describes operator to be matched.withSelector(String selector) Set the selector property: Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.withTransforms(List<TransformType> transforms) Set the transforms property: List of transforms.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
-
MatchCondition
public MatchCondition()Creates an instance of MatchCondition class.
-
-
Method Details
-
matchVariable
Get the matchVariable property: Match variable to compare against.- Returns:
- the matchVariable value.
-
withMatchVariable
Set the matchVariable property: Match variable to compare against.- Parameters:
matchVariable- the matchVariable value to set.- Returns:
- the MatchCondition object itself.
-
selector
Get the selector property: Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.- Returns:
- the selector value.
-
withSelector
Set the selector property: Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.- Parameters:
selector- the selector value to set.- Returns:
- the MatchCondition object itself.
-
operator
Get the operator property: Describes operator to be matched.- Returns:
- the operator value.
-
withOperator
Set the operator property: Describes operator to be matched.- Parameters:
operator- the operator value to set.- Returns:
- the MatchCondition object itself.
-
negateCondition
Get the negateCondition property: Describes if the result of this condition should be negated.- Returns:
- the negateCondition value.
-
withNegateCondition
Set the negateCondition property: Describes if the result of this condition should be negated.- Parameters:
negateCondition- the negateCondition value to set.- Returns:
- the MatchCondition object itself.
-
matchValue
Get the matchValue property: List of possible match values.- Returns:
- the matchValue value.
-
withMatchValue
Set the matchValue property: List of possible match values.- Parameters:
matchValue- the matchValue value to set.- Returns:
- the MatchCondition object itself.
-
transforms
Get the transforms property: List of transforms.- Returns:
- the transforms value.
-
withTransforms
Set the transforms property: List of transforms.- Parameters:
transforms- the transforms value to set.- Returns:
- the MatchCondition 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<MatchCondition>- Throws:
IOException
-
fromJson
Reads an instance of MatchCondition from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of MatchCondition 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 MatchCondition.
-