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

    Modifier and Type
    Method
    Description
    fromJson(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.
    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.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    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

    Methods 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

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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<HeaderValueMatcher>
      Throws:
      IOException
    • fromJson

      public static HeaderValueMatcher fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.