Class UrlRewriteActionParameters

java.lang.Object
com.azure.resourcemanager.cdn.models.UrlRewriteActionParameters
All Implemented Interfaces:
com.azure.json.JsonSerializable<UrlRewriteActionParameters>

public final class UrlRewriteActionParameters extends Object implements com.azure.json.JsonSerializable<UrlRewriteActionParameters>
Defines the parameters for the url rewrite action.
  • Constructor Details

    • UrlRewriteActionParameters

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

    • typeName

      public String typeName()
      Get the typeName property: The typeName property.
      Returns:
      the typeName value.
    • withTypeName

      public UrlRewriteActionParameters withTypeName(String typeName)
      Set the typeName property: The typeName property.
      Parameters:
      typeName - the typeName value to set.
      Returns:
      the UrlRewriteActionParameters object itself.
    • sourcePattern

      public String sourcePattern()
      Get the sourcePattern property: define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched.
      Returns:
      the sourcePattern value.
    • withSourcePattern

      public UrlRewriteActionParameters withSourcePattern(String sourcePattern)
      Set the sourcePattern property: define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched.
      Parameters:
      sourcePattern - the sourcePattern value to set.
      Returns:
      the UrlRewriteActionParameters object itself.
    • destination

      public String destination()
      Get the destination property: Define the relative URL to which the above requests will be rewritten by.
      Returns:
      the destination value.
    • withDestination

      public UrlRewriteActionParameters withDestination(String destination)
      Set the destination property: Define the relative URL to which the above requests will be rewritten by.
      Parameters:
      destination - the destination value to set.
      Returns:
      the UrlRewriteActionParameters object itself.
    • preserveUnmatchedPath

      public Boolean preserveUnmatchedPath()
      Get the preserveUnmatchedPath property: Whether to preserve unmatched path. Default value is true.
      Returns:
      the preserveUnmatchedPath value.
    • withPreserveUnmatchedPath

      public UrlRewriteActionParameters withPreserveUnmatchedPath(Boolean preserveUnmatchedPath)
      Set the preserveUnmatchedPath property: Whether to preserve unmatched path. Default value is true.
      Parameters:
      preserveUnmatchedPath - the preserveUnmatchedPath value to set.
      Returns:
      the UrlRewriteActionParameters 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<UrlRewriteActionParameters>
      Throws:
      IOException
    • fromJson

      public static UrlRewriteActionParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of UrlRewriteActionParameters from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of UrlRewriteActionParameters if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the UrlRewriteActionParameters.