/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 */

package com.microsoft.rest.v2.annotations;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Replaces the header with the value of its target. The value specified here
 * replaces headers specified statically in the {@link Headers}.
 * If the parameter this annotation is attached to is a Map type, then this will
 * be treated as a header collection. In that case each of the entries in the
 * argument's map will be individual header values that use the value of this
 * annotation as a prefix to their key/header name.
 *
 * Example 1:
 *   {@literal @}PUT("{functionId}")
 *   {@literal Single<RestResponse<Headers, Body>>} createOrReplace(@PathParam("functionId", encoded = true) String functionId, @BodyParam FunctionInner function, @HeaderParam("If-Match") String ifMatch);
 *
 *   "If-Match: user passed value" will show up as one of the headers.
 *
 * Example 2:
 *   {@literal @}GET("subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces")
 *   {@literal Single<RestResponse<Headers, Body>>} list(@Path("subscriptionId") String subscriptionId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 *
 *   "accept-language" generated by the HTTP client will be overwritten by the user passed value.
 *
 * Example 3:
 *   {@literal @}GET("subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces")
 *   {@literal Single<RestResponse<Headers, Body>>} list(@Path("subscriptionId") String subscriptionId, @Header("Authorization") String token);
 *
 *   The token parameter will replace the effect of any credentials in the HTTP pipeline.
 *
 * Example 4:
 *   {@literal @}PUT("{containerName}/{blob}")
 *   {@literal @}ExpectedResponses({200})
 *   {@literal Single<RestResponse<BlobSetMetadataHeaders, Void>>} setMetadata(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map<String, String> metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") String ifModifiedSince, @HeaderParam("If-Unmodified-Since") String ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatches, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp);
 *
 *   The metadata parameter will be expanded out so that each entry becomes "x-ms-meta-{@literal <entryKey>}: {@literal <entryValue>}".
 */
@Retention(RUNTIME)
@Target(PARAMETER)
public @interface HeaderParam {
    /**
     * The name of the variable in the endpoint uri template which will be replaced with the value
     * of the parameter annotated with this annotation.
     * @return The name of the variable in the endpoint uri template which will be replaced with the
     *      value of the parameter annotated with this annotation.
     */
    String value();
}
@@ -857,34 +857,30 @@
 e 1:%0A *   %7B@
-literal
+code
  @
-%7D
 PUT(%22%7Bfuncti
@@ -886,24 +886,25 @@
 ionId%7D%22)
+%7D
 %0A *   %7B@
 literal 
@@ -887,39 +887,36 @@
 onId%7D%22)%7D%0A *   %7B@
-literal
+code
  Single%3CRestResp
@@ -1180,39 +1180,36 @@
 ample 2:%0A *   %7B@
-literal
+code
  @%7DGET(%22subscrip
@@ -1274,39 +1274,36 @@
 spaces%22)%0A *   %7B@
-literal
+code
  Single%3CRestResp
@@ -1592,26 +1592,22 @@
 %0A *   %7B@
-literal
+code
  @
-%7D
 GET(%22sub
@@ -1677,24 +1677,25 @@
 spaces%22)
+%7D
 %0A *   %7B@
 literal 
@@ -1678,39 +1678,36 @@
 paces%22)%7D%0A *   %7B@
-literal
+code
  Single%3CRestResp
@@ -1937,26 +1937,22 @@
 %0A *   %7B@
-literal
+code
  @
-%7D
 PUT(%22%7Bco
@@ -1972,24 +1972,25 @@
 %7Bblob%7D%22)
+%7D
 %0A *   %7B@
 literal 
@@ -1985,18 +1985,14 @@
   %7B@
-literal
+code
  @
-%7D
 Expe
@@ -2011,24 +2011,25 @@
 s(%7B200%7D)
+%7D
 %0A *   %7B@
 literal 
@@ -2020,23 +2020,20 @@
 %0A *   %7B@
-literal
+code
  Single%3C
@@ -2075,17 +2075,16 @@
 , Void%3E%3E
-%7D
  setMeta
@@ -2609,16 +2609,17 @@
 g comp);
+%7D
 %0A *%0A *  

Fix javadoc error (#378)