All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.core.annotation.ExpectedResponses Maven / Gradle / Ivy

There is a newer version: 1.54.1
Show newest version
// 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