Class HttpRequestContext.QueryParameter
java.lang.Object
io.clientcore.annotation.processor.models.HttpRequestContext.QueryParameter
- Enclosing class:
HttpRequestContext
Represents a query parameter.
-
Constructor Summary
ConstructorsConstructorDescriptionQueryParameter(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 TypeMethodDescriptionvoidAdds a value to the query parameter.Gets the values of the query parameter.booleanChecks if the query parameter can accept multiple values.booleanisStatic()Whether the query parameter is a static value.booleanChecks if the query parameter and value should be encoded.
-
Constructor Details
-
QueryParameter
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 encodedisStatic- 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 encodedisStatic- Whether the query parameter is a static value.
-
-
Method Details
-
getValues
Gets the values of the query parameter.- Returns:
- the values.
-
addValue
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.
-