Class HttpRequestContext.QueryParameter

java.lang.Object
io.clientcore.annotation.processor.models.HttpRequestContext.QueryParameter
Enclosing class:
HttpRequestContext

public static class HttpRequestContext.QueryParameter extends Object
Represents a query parameter.
  • Constructor Summary

    Constructors
    Constructor
    Description
    QueryParameter(String value, boolean isMultiple, boolean shouldEncode, boolean isStatic)
    Constructs a new QueryParameter.
    QueryParameter(List<String> values, boolean isMultiple, boolean shouldEncode, boolean isStatic)
    Constructs a new QueryParameter with multiple values.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a value to the query parameter.
    Gets the values of the query parameter.
    boolean
    Checks if the query parameter can accept multiple values.
    boolean
    Whether the query parameter is a static value.
    boolean
    Checks if the query parameter and value should be encoded.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QueryParameter

      public QueryParameter(String value, boolean isMultiple, boolean shouldEncode, boolean isStatic)
      Constructs a new QueryParameter.
      Parameters:
      value - the value of the query parameter.
      isMultiple - whether the parameter can accept multiple values.
      shouldEncode - whether the parameter and value is encoded
      isStatic - Whether the query parameter is a static value.
    • QueryParameter

      public QueryParameter(List<String> values, boolean isMultiple, boolean shouldEncode, boolean isStatic)
      Constructs a new QueryParameter with multiple values.
      Parameters:
      values - the values of the query parameter.
      isMultiple - whether the parameter can accept multiple values.
      shouldEncode - whether the parameter and value is encoded
      isStatic - Whether the query parameter is a static value.
  • Method Details

    • getValues

      public List<String> getValues()
      Gets the values of the query parameter.
      Returns:
      the values.
    • addValue

      public void addValue(String value)
      Adds a value to the query parameter.
      Parameters:
      value - the value to add.
    • isMultiple

      public boolean isMultiple()
      Checks if the query parameter can accept multiple values.
      Returns:
      true if it can accept multiple values, false otherwise.
    • shouldEncode

      public boolean shouldEncode()
      Checks if the query parameter and value should be encoded.
      Returns:
      true if it should be encoded, false otherwise.
    • isStatic

      public boolean isStatic()
      Whether the query parameter is a static value.
      Returns:
      Whether the query parameter is a static value.