azure-docs-sdk-java/docs-ref-autogen/com.azure.core.annotation.E...

28 строки
1.9 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.core.annotation.ExpectedResponses"
fullName: "com.azure.core.annotation.ExpectedResponses"
name: "ExpectedResponses"
nameWithType: "ExpectedResponses"
summary: "Annotation to annotate list of HTTP status codes that are expected in response from a REST endpoint."
syntax: "public interface **ExpectedResponses**</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.ExpectedResponses.value()"
fullName: "com.azure.core.annotation.ExpectedResponses.value()"
name: "value()"
nameWithType: "ExpectedResponses.value()"
summary: "The status code that will trigger that an error of type error<wbr>Type should be returned."
modifiers:
- "abstract"
syntax: "public abstract int[] value()"
desc: "The status code that will trigger that an error of type errorType should be returned."
returns:
description: "The status code that will trigger than an error of type errorType should be returned."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />[]"
type: "interface"
desc: "Annotation to annotate list of HTTP status codes that are expected in response from a REST endpoint.\n\n**Example:**\n\n```java\n@ExpectedResponses({200, 201})\n @Post(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/\"\n + \"hubs/{hubName}/images/getEntityTypeImageUploadUrl\")\n void getUploadUrlForEntityType(@PathParam(\"resourceGroupName\") String resourceGroupName,\n @PathParam(\"hubName\") String hubName,\n @PathParam(\"subscriptionId\") String subscriptionId,\n @BodyParam(\"application/json\") RequestBody parameters);\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.52.0