HeaderValueMatcher Class

  • java.lang.Object
    • com.azure.resourcemanager.network.models.HeaderValueMatcher

Implements

public final class HeaderValueMatcher
implements 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

Constructor Description
HeaderValueMatcher()

Creates an instance of HeaderValueMatcher class.

Method Summary

Modifier and Type Method and Description
static HeaderValueMatcher fromJson(JsonReader jsonReader)

Reads an instance of HeaderValueMatcher from the JsonReader.

Boolean ignoreCase()

Get the ignoreCase property: Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison.

Boolean 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.

String pattern()

Get the pattern property: The pattern, either fixed string or regular expression, that evaluates if a header value should be selected for rewrite.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

HeaderValueMatcher withIgnoreCase(Boolean ignoreCase)

Set the ignoreCase property: Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison.

HeaderValueMatcher 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.

HeaderValueMatcher 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 java.lang.Object

Constructor Details

HeaderValueMatcher

public HeaderValueMatcher()

Creates an instance of HeaderValueMatcher class.

Method Details

fromJson

public static HeaderValueMatcher fromJson(JsonReader jsonReader)

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.

ignoreCase

public Boolean 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.

negate

public Boolean 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.

pattern

public String 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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withIgnoreCase

public HeaderValueMatcher withIgnoreCase(Boolean ignoreCase)

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.

withNegate

public HeaderValueMatcher 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.

Parameters:

negate - the negate value to set.

Returns:

the HeaderValueMatcher object itself.

withPattern

public HeaderValueMatcher 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.

Parameters:

pattern - the pattern value to set.

Returns:

the HeaderValueMatcher object itself.

Applies to