Class HeaderValueMatcher

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

public final class HeaderValueMatcher extends Object
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
    Constructor
    Description
    Creates an instance of HeaderValueMatcher class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the ignoreCase property: Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison.
    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.
    Get the pattern property: The pattern, either fixed string or regular expression, that evaluates if a header value should be selected for rewrite.
    void
    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.
    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.
    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, wait
  • Constructor Details

    • HeaderValueMatcher

      public HeaderValueMatcher()
      Creates an instance of HeaderValueMatcher class.
  • Method Details

    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.