Class HeaderValueMatcher
java.lang.Object
com.azure.resourcemanager.network.models.HeaderValueMatcher
- All Implemented Interfaces:
com.azure.json.JsonSerializable<HeaderValueMatcher>
public final class HeaderValueMatcher
extends Object
implements com.azure.json.JsonSerializable<HeaderValueMatcher>
An optional field under "Rewrite Action". It lets you capture and modify the value(s) of a specific header when
multiple headers with the same name exist. Currently supported for Set-Cookie Response header only. For more details,
visit https://aka.ms/appgwheadercrud.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HeaderValueMatcherfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of HeaderValueMatcher from the JsonReader.Get the ignoreCase property: Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison.negate()Get the negate property: Setting this value as truth will force to check the negation of the condition given by the user in the pattern field.pattern()Get the pattern property: The pattern, either fixed string or regular expression, that evaluates if a header value should be selected for rewrite.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withIgnoreCase(Boolean ignoreCase) Set the ignoreCase property: Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison.withNegate(Boolean negate) Set the negate property: Setting this value as truth will force to check the negation of the condition given by the user in the pattern field.withPattern(String pattern) Set the pattern property: The pattern, either fixed string or regular expression, that evaluates if a header value should be selected for rewrite.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
-
HeaderValueMatcher
public HeaderValueMatcher()Creates an instance of HeaderValueMatcher class.
-
-
Method Details
-
pattern
Get the pattern property: The pattern, either fixed string or regular expression, that evaluates if a header value should be selected for rewrite.- Returns:
- the pattern value.
-
withPattern
Set the pattern property: The pattern, either fixed string or regular expression, that evaluates if a header value should be selected for rewrite.- Parameters:
pattern- the pattern value to set.- Returns:
- the HeaderValueMatcher object itself.
-
ignoreCase
Get the ignoreCase property: Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison.- Returns:
- the ignoreCase value.
-
withIgnoreCase
Set the ignoreCase property: Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison.- Parameters:
ignoreCase- the ignoreCase value to set.- Returns:
- the HeaderValueMatcher object itself.
-
negate
Get the negate property: Setting this value as truth will force to check the negation of the condition given by the user in the pattern field.- Returns:
- the negate value.
-
withNegate
Set the negate property: Setting this value as truth will force to check the negation of the condition given by the user in the pattern field.- Parameters:
negate- the negate value to set.- Returns:
- the HeaderValueMatcher 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<HeaderValueMatcher>- Throws:
IOException
-
fromJson
Reads an instance of HeaderValueMatcher from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of HeaderValueMatcher 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 HeaderValueMatcher.
-