com.azure.core.annotation.ExpectedResponses Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-core Show documentation
Show all versions of azure-core Show documentation
This package contains core types for Azure Java clients.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.core.annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Annotation to annotate list of HTTP status codes that are expected in response from a REST endpoint.
*
* Example:
*
*
*
* @ExpectedResponses({200, 201})
* @Post("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/"
* + "hubs/{hubName}/images/getEntityTypeImageUploadUrl")
* void getUploadUrlForEntityType(@PathParam("resourceGroupName") String resourceGroupName,
* @PathParam("hubName") String hubName,
* @PathParam("subscriptionId") String subscriptionId,
* @BodyParam("application/json") RequestBody parameters);
*
*
*/
@Retention(RUNTIME)
@Target(METHOD)
public @interface ExpectedResponses {
/**
* The status code that will trigger that an error of type errorType should be returned.
*
* @return The status code that will trigger than an error of type errorType should be returned.
*/
int[] value();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy