-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathBenchmarksApi.java
More file actions
142 lines (116 loc) · 12.6 KB
/
BenchmarksApi.java
File metadata and controls
142 lines (116 loc) · 12.6 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
package factset.analyticsapi.engines.api;
import factset.analyticsapi.engines.ApiException;
import factset.analyticsapi.engines.ApiClient;
import factset.analyticsapi.engines.ApiResponse;
import factset.analyticsapi.engines.Configuration;
import factset.analyticsapi.engines.Pair;
import javax.ws.rs.core.GenericType;
import java.util.HashMap;
import java.util.Map;
import java.io.File;
import factset.analyticsapi.engines.models.ClientErrorResponse;
import factset.analyticsapi.engines.models.SPARBenchmarkRoot;
@javax.annotation.Generated(value = "CustomJavaClientCodegen")
/**
* @deprecated This library is deprecated.Please use https://central.sonatype.com/search?q=com.factset.sdk&smo=true instead.
*/
@Deprecated
public class BenchmarksApi {
private ApiClient apiClient;
public BenchmarksApi() {
this(Configuration.getDefaultApiClient());
}
public BenchmarksApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Get the API cilent
*
* @return API client
*/
public ApiClient getApiClient() {
return apiClient;
}
/**
* Set the API cilent
*
* @param apiClient an instance of API client
*/
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Get SPAR benchmark details
* This endpoint returns the details of a given SPAR benchmark identifier.
* @param id Benchmark Identifier (required)
@return SPARBenchmarkRoot
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Expected response, returns the list of prefix and return types for the benchmark. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid benchmark identifier. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> Benchmark identifier not found. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 406 </td><td> Unsupported Accept header. Header needs to be set to application/json. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 429 </td><td> Rate limit reached. Wait till the time specified in Retry-After header value to make further requests. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * Retry-After - Time to wait in seconds before making a new request as the rate limit has reached. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public SPARBenchmarkRoot getSPARBenchmarkById(String id) throws ApiException {
return getSPARBenchmarkByIdWithHttpInfo(id).getData();
}
/**
* Get SPAR benchmark details
* This endpoint returns the details of a given SPAR benchmark identifier.
* @param id Benchmark Identifier (required)
* @return ApiResponse<SPARBenchmarkRoot>
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Expected response, returns the list of prefix and return types for the benchmark. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid benchmark identifier. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> Benchmark identifier not found. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 406 </td><td> Unsupported Accept header. Header needs to be set to application/json. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 429 </td><td> Rate limit reached. Wait till the time specified in Retry-After header value to make further requests. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * Retry-After - Time to wait in seconds before making a new request as the rate limit has reached. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public ApiResponse<SPARBenchmarkRoot> getSPARBenchmarkByIdWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling getSPARBenchmarkById");
}
// create path and map variables
String localVarPath = "/analytics/engines/spar/v3/benchmarks";
// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
java.util.Map<String, String> localVarHeaderParams = new java.util.HashMap<String, String>();
java.util.Map<String, String> localVarCookieParams = new java.util.HashMap<String, String>();
java.util.Map<String, Object> localVarFormParams = new java.util.HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "Basic", "Bearer" };
GenericType<SPARBenchmarkRoot> localVarReturnType = new GenericType<SPARBenchmarkRoot>() {};
Map<Integer, GenericType> returnTypeMap = new HashMap<Integer, GenericType>();
returnTypeMap.put(200, new GenericType<SPARBenchmarkRoot>(){});
returnTypeMap.put(400, new GenericType<ClientErrorResponse>(){});
returnTypeMap.put(404, new GenericType<ClientErrorResponse>(){});
return apiClient.<SPARBenchmarkRoot>invokeAPIWithReturnMap("BenchmarksApi.getSPARBenchmarkById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, returnTypeMap, false);
}
}