52 строки
5.5 KiB
YAML
52 строки
5.5 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.azure.core.annotation.QueryParam"
|
|
fullName: "com.azure.core.annotation.QueryParam"
|
|
name: "QueryParam"
|
|
nameWithType: "QueryParam"
|
|
summary: "Annotation for query parameters to be appended to a REST API Request URI."
|
|
syntax: "public interface **QueryParam**</br> implements <a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html\">Annotation</a>"
|
|
methods:
|
|
- uid: "com.azure.core.annotation.QueryParam.encoded()"
|
|
fullName: "com.azure.core.annotation.QueryParam.encoded()"
|
|
name: "encoded()"
|
|
nameWithType: "QueryParam.encoded()"
|
|
summary: "A value true for this argument indicates that value of <xref uid=\"com.azure.core.annotation.QueryParam.value()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"QueryParam#value()\"></xref> is already encoded hence engine should not encode it, by default value will be encoded."
|
|
modifiers:
|
|
- "abstract"
|
|
syntax: "public abstract boolean encoded()"
|
|
desc: "A value true for this argument indicates that value of <xref uid=\"com.azure.core.annotation.QueryParam.value()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"QueryParam#value()\"></xref> is already encoded hence engine should not encode it, by default value will be encoded."
|
|
returns:
|
|
description: "Whether this query parameter is already encoded."
|
|
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.annotation.QueryParam.multipleQueryParams()"
|
|
fullName: "com.azure.core.annotation.QueryParam.multipleQueryParams()"
|
|
name: "multipleQueryParams()"
|
|
nameWithType: "QueryParam.multipleQueryParams()"
|
|
summary: "A value true for this argument indicates that value of <xref uid=\"com.azure.core.annotation.QueryParam.value()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"QueryParam#value()\"></xref> should not be converted to Json in case it is an array but instead sent as multiple values with same parameter name."
|
|
modifiers:
|
|
- "abstract"
|
|
syntax: "public abstract boolean multipleQueryParams()"
|
|
desc: "A value true for this argument indicates that value of <xref uid=\"com.azure.core.annotation.QueryParam.value()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"QueryParam#value()\"></xref> should not be converted to Json in case it is an array but instead sent as multiple values with same parameter name."
|
|
returns:
|
|
description: "Whether this query parameter list values should be sent as individual query\n params or as a single Json."
|
|
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.annotation.QueryParam.value()"
|
|
fullName: "com.azure.core.annotation.QueryParam.value()"
|
|
name: "value()"
|
|
nameWithType: "QueryParam.value()"
|
|
summary: "The name of the variable in the endpoint uri template which will be replaced with the value of the parameter annotated with this annotation."
|
|
modifiers:
|
|
- "abstract"
|
|
syntax: "public abstract String value()"
|
|
desc: "The name of the variable in the endpoint uri template which will be replaced with the value of the parameter annotated with this annotation."
|
|
returns:
|
|
description: "The name of the variable in the endpoint uri template which will be replaced with the\n value of the parameter annotated with this annotation."
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
type: "interface"
|
|
desc: "Annotation for query parameters to be appended to a REST API Request URI.\n\n**Example 1:**\n\n```java\n@Get(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources\")\n Mono<ResponseBase<ResponseHeaders, ResponseBody>> listByResourceGroup(\n @PathParam(\"resourceGroupName\") String resourceGroupName,\n @PathParam(\"subscriptionId\") String subscriptionId,\n @QueryParam(\"$filter\") String filter,\n @QueryParam(\"$expand\") String expand,\n @QueryParam(\"$top\") Integer top,\n @QueryParam(\"api-version\") String apiVersion);\n\n // The value of parameters filter, expand, top, apiVersion will be encoded and will be used to set the query\n // parameters {$filter}, {$expand}, {$top}, {api-version} on the HTTP URL.\n```\n\n**Example 2:** (A use case where PathParam.encoded=true will be used)\n\n```java\n// It is possible that a query parameter will need to be encoded:\n @Get(\"http://wq.com/foo/{subpath}/value\")\n String getValue(@PathParam(\"subpath\") String param,\n @QueryParam(\"query\") String query);\n\n // In this case, if consumer pass \"a=b\" as the value for 'query' then the resolved url looks like:\n // \"http://wq.com/foo/subpath/value?query=a%3Db\"\n```\n\nFor such cases the encoded attribute can be used:\n\n```java\n@Get(\"http://wq.com/foo/{subpath}/values\")\n List<String> getValues(@PathParam(\"subpath\") String param,\n @QueryParam(value = \"query\", encoded = true) String query);\n\n // In this case, if consumer pass \"a=b\" as the value for 'query' then the resolved url looks like:\n // \"http://wq.com/foo/subpath/values?connectionString=a=b\"\n```\n\n**Example 3:**\n\n```java\n@Get(\"http://wq.com/foo/multiple/params\")\n String multipleParams(@QueryParam(value = \"query\", multipleQueryParams = true) List<String> query);\n\n // The value of parameter avoid would look like this:\n // \"http://wq.com/foo/multiple/params?avoid%3Dtest1&avoid%3Dtest2&avoid%3Dtest3\"\n```"
|
|
implements:
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html\">Annotation</a>"
|
|
metadata: {}
|
|
package: "com.azure.core.annotation"
|
|
artifact: com.azure:azure-core:1.54.0
|