-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathHttpOutput.java
More file actions
45 lines (41 loc) · 1.49 KB
/
HttpOutput.java
File metadata and controls
45 lines (41 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* 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.azure.functions.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* <p>Place this on a parameter whose value would be send back to the user as an HTTP response.
* The parameter type should be OutputBinding<T>, where T could be one of:</p>
*
* <ul>
* <li>{@link com.microsoft.azure.functions.HttpResponseMessage HttpResponseMessage}</li>
* <li>Any native Java types such as int, String, byte[]</li>
* <li>Any POJO type</li>
* </ul>
*
*
* @since 1.0.0
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER, ElementType.METHOD})
public @interface HttpOutput {
/**
* The variable name used in function.json.
* @return The variable name used in function.json.
*/
String name();
/**
* <p>Defines how Functions runtime should treat the parameter value. Possible values are:</p>
* <ul>
* <li>"" or string: treat it as a string whose value is serialized from the parameter</li>
* <li>binary: treat it as a binary data whose value comes from for example OutputBinding<byte[]></li>
* </ul>
* @return The dataType which will be used by the Functions runtime.
*/
String dataType() default "";
}