-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApiResponse.java
More file actions
73 lines (65 loc) · 1.81 KB
/
ApiResponse.java
File metadata and controls
73 lines (65 loc) · 1.81 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* STACKIT Network Load Balancer API
* This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
*
* The version of the OpenAPI document: 2.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package cloud.stackit.sdk.loadbalancer;
import java.util.List;
import java.util.Map;
/** API response returned by API call. */
public class ApiResponse<T> {
private final int statusCode;
private final Map<String, List<String>> headers;
private final T data;
/**
* Constructor for ApiResponse.
*
* @param statusCode The status code of HTTP response
* @param headers The headers of HTTP response
*/
public ApiResponse(int statusCode, Map<String, List<String>> headers) {
this(statusCode, headers, null);
}
/**
* Constructor for ApiResponse.
*
* @param statusCode The status code of HTTP response
* @param headers The headers of HTTP response
* @param data The object deserialized from response bod
*/
public ApiResponse(int statusCode, Map<String, List<String>> headers, T data) {
this.statusCode = statusCode;
this.headers = headers;
this.data = data;
}
/**
* Get the <code>status code</code>.
*
* @return the status code
*/
public int getStatusCode() {
return statusCode;
}
/**
* Get the <code>headers</code>.
*
* @return a {@link java.util.Map} of headers
*/
public Map<String, List<String>> getHeaders() {
return headers;
}
/**
* Get the <code>data</code>.
*
* @return the data
*/
public T getData() {
return data;
}
}