### 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**
implements Annotation" 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 errorType 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: "[]" 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: - "Annotation" metadata: {} package: "com.azure.core.annotation" artifact: com.azure:azure-core:1.37.0