Class UrlReplaceHandlerOption

java.lang.Object
com.microsoft.kiota.http.middleware.options.UrlReplaceHandlerOption
All Implemented Interfaces:
com.microsoft.kiota.RequestOption

public class UrlReplaceHandlerOption extends Object implements com.microsoft.kiota.RequestOption
The options to be passed to the UrlReplaceHandler. Defines the replacement pairs and whether the handler is enabled or not.
  • Constructor Details

    • UrlReplaceHandlerOption

      public UrlReplaceHandlerOption()
      Instantiates a new UrlReplaceOption with an empty replacementPairs map and enabled set to true.
    • UrlReplaceHandlerOption

      public UrlReplaceHandlerOption(@Nonnull Map<String,String> replacementPairs)
      Instantiates a new UrlReplaceOption with the specified replacementPairs map and enabled set to true.
      Parameters:
      replacementPairs - the replacement pairs map.
    • UrlReplaceHandlerOption

      public UrlReplaceHandlerOption(@Nonnull Map<String,String> replacementPairs, boolean enabled)
      Instantiates a new UrlReplaceOption with the specified replacementPairs map and enabled set to the specified value.
      Parameters:
      replacementPairs - the replacement pairs map.
      enabled - whether the handler is enabled or not.
  • Method Details

    • getReplacementPairs

      @Nonnull public Map<String,String> getReplacementPairs()
      Gets the replacement pairs map.
      Returns:
      the replacement pairs map.
    • setReplacementPairs

      public void setReplacementPairs(@Nonnull Map<String,String> replacementPairs)
      Sets the replacement pairs map.
      Parameters:
      replacementPairs - the replacement pairs map.
    • enable

      public void enable()
      Enables the handler.
    • disable

      public void disable()
      Disables the handler.
    • isEnabled

      public boolean isEnabled()
      Gets whether the handler is enabled or not.
      Returns:
      whether the handler is enabled or not.
    • getType

      @Nonnull public <T extends com.microsoft.kiota.RequestOption> Class<T> getType()
      Specified by:
      getType in interface com.microsoft.kiota.RequestOption