Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* FINBOURNE Insights API
*
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.finbourne.insights.api;
import com.finbourne.insights.ApiCallback;
import com.finbourne.insights.ApiClient;
import com.finbourne.insights.ApiException;
import com.finbourne.insights.ApiResponse;
import com.finbourne.insights.Configuration;
import com.finbourne.insights.Pair;
import com.finbourne.insights.ProgressRequestBody;
import com.finbourne.insights.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.finbourne.insights.model.LusidProblemDetails;
import com.finbourne.insights.model.LusidValidationProblemDetails;
import com.finbourne.insights.model.Request;
import com.finbourne.insights.model.RequestLog;
import com.finbourne.insights.model.ResourceListWithHistogramOfRequestLog;
import com.finbourne.insights.model.Response;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class RequestsApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public RequestsApi() {
this(Configuration.getDefaultApiClient());
}
public RequestsApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public int getHostIndex() {
return localHostIndex;
}
public void setHostIndex(int hostIndex) {
this.localHostIndex = hostIndex;
}
public String getCustomBaseUrl() {
return localCustomBaseUrl;
}
public void setCustomBaseUrl(String customBaseUrl) {
this.localCustomBaseUrl = customBaseUrl;
}
private okhttp3.Call getRequestCall(String id, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/requests/{id}/request"
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getRequestValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling getRequest(Async)");
}
return getRequestCall(id, _callback);
}
private ApiResponse getRequestWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = getRequestValidateBeforeCall(id, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getRequestAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getRequestValidateBeforeCall(id, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetRequestRequest {
private final String id;
private APIgetRequestRequest(String id) {
this.id = id;
}
/**
* Build call for getRequest
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getRequestCall(id, _callback);
}
/**
* Execute getRequest request
* @return Request
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public Request execute() throws ApiException {
ApiResponse localVarResp = getRequestWithHttpInfo(id);
return localVarResp.getData();
}
/**
* Execute getRequest request with HTTP info returned
* @return ApiResponse<Request>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getRequestWithHttpInfo(id);
}
/**
* Execute getRequest request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getRequestAsync(id, _callback);
}
}
/**
* GetRequest: Get the request content for a specific API request.
*
* @param id The identifier of the request to obtain the content for. (required)
* @return APIgetRequestRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIgetRequestRequest getRequest(String id) {
return new APIgetRequestRequest(id);
}
private okhttp3.Call getRequestLogCall(String id, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/requests/{id}"
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getRequestLogValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling getRequestLog(Async)");
}
return getRequestLogCall(id, _callback);
}
private ApiResponse getRequestLogWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = getRequestLogValidateBeforeCall(id, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getRequestLogAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getRequestLogValidateBeforeCall(id, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetRequestLogRequest {
private final String id;
private APIgetRequestLogRequest(String id) {
this.id = id;
}
/**
* Build call for getRequestLog
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getRequestLogCall(id, _callback);
}
/**
* Execute getRequestLog request
* @return RequestLog
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public RequestLog execute() throws ApiException {
ApiResponse localVarResp = getRequestLogWithHttpInfo(id);
return localVarResp.getData();
}
/**
* Execute getRequestLog request with HTTP info returned
* @return ApiResponse<RequestLog>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getRequestLogWithHttpInfo(id);
}
/**
* Execute getRequestLog request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getRequestLogAsync(id, _callback);
}
}
/**
* GetRequestLog: Get the log for a specific API request.
*
* @param id The identifier of the request to obtain the log for. (required)
* @return APIgetRequestLogRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIgetRequestLogRequest getRequestLog(String id) {
return new APIgetRequestLogRequest(id);
}
private okhttp3.Call getResponseCall(String id, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/requests/{id}/response"
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getResponseValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling getResponse(Async)");
}
return getResponseCall(id, _callback);
}
private ApiResponse getResponseWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = getResponseValidateBeforeCall(id, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getResponseAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getResponseValidateBeforeCall(id, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetResponseRequest {
private final String id;
private APIgetResponseRequest(String id) {
this.id = id;
}
/**
* Build call for getResponse
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getResponseCall(id, _callback);
}
/**
* Execute getResponse request
* @return Response
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public Response execute() throws ApiException {
ApiResponse localVarResp = getResponseWithHttpInfo(id);
return localVarResp.getData();
}
/**
* Execute getResponse request with HTTP info returned
* @return ApiResponse<Response>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getResponseWithHttpInfo(id);
}
/**
* Execute getResponse request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getResponseAsync(id, _callback);
}
}
/**
* GetResponse: Get the response for a specific API request.
*
* @param id The identifier of the request to obtain the response for. (required)
* @return APIgetResponseRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIgetResponseRequest getResponse(String id) {
return new APIgetResponseRequest(id);
}
private okhttp3.Call listRequestLogsCall(String filter, String sortBy, Integer limit, String page, String histogramInterval, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/requests";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (histogramInterval != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("histogramInterval", histogramInterval));
}
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listRequestLogsValidateBeforeCall(String filter, String sortBy, Integer limit, String page, String histogramInterval, final ApiCallback _callback) throws ApiException {
return listRequestLogsCall(filter, sortBy, limit, page, histogramInterval, _callback);
}
private ApiResponse listRequestLogsWithHttpInfo(String filter, String sortBy, Integer limit, String page, String histogramInterval) throws ApiException {
okhttp3.Call localVarCall = listRequestLogsValidateBeforeCall(filter, sortBy, limit, page, histogramInterval, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call listRequestLogsAsync(String filter, String sortBy, Integer limit, String page, String histogramInterval, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = listRequestLogsValidateBeforeCall(filter, sortBy, limit, page, histogramInterval, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIlistRequestLogsRequest {
private String filter;
private String sortBy;
private Integer limit;
private String page;
private String histogramInterval;
private APIlistRequestLogsRequest() {
}
/**
* Set filter
* @param filter Expression to filter the result set. Read more about <see href=\"https://support.lusid.com/filtering-results-from-lusid\"> filtering results from LUSID</see>. (optional)
* @return APIlistRequestLogsRequest
*/
public APIlistRequestLogsRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Set sortBy
* @param sortBy Order the results by these fields. Use the '-' sign to denote descending order e.g. -MyFieldName. Multiple fields can be denoted by a comma e.g. -MyFieldName,AnotherFieldName,-AFurtherFieldName (optional)
* @return APIlistRequestLogsRequest
*/
public APIlistRequestLogsRequest sortBy(String sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Set limit
* @param limit When paginating, only return this number of records. The minimum value is 0 and the maximum is 10000. (optional)
* @return APIlistRequestLogsRequest
*/
public APIlistRequestLogsRequest limit(Integer limit) {
this.limit = limit;
return this;
}
/**
* Set page
* @param page Encoded page string returned from a previous search result that will retrieve the next page of data. When this field is supplied, filter and sortby fields should not be supplied. (optional)
* @return APIlistRequestLogsRequest
*/
public APIlistRequestLogsRequest page(String page) {
this.page = page;
return this;
}
/**
* Set histogramInterval
* @param histogramInterval Optional interval to use in a histogram of the returned values. If not provided, no histogram will be generated. (optional)
* @return APIlistRequestLogsRequest
*/
public APIlistRequestLogsRequest histogramInterval(String histogramInterval) {
this.histogramInterval = histogramInterval;
return this;
}
/**
* Build call for listRequestLogs
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return listRequestLogsCall(filter, sortBy, limit, page, histogramInterval, _callback);
}
/**
* Execute listRequestLogs request
* @return ResourceListWithHistogramOfRequestLog
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public ResourceListWithHistogramOfRequestLog execute() throws ApiException {
ApiResponse localVarResp = listRequestLogsWithHttpInfo(filter, sortBy, limit, page, histogramInterval);
return localVarResp.getData();
}
/**
* Execute listRequestLogs request with HTTP info returned
* @return ApiResponse<ResourceListWithHistogramOfRequestLog>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return listRequestLogsWithHttpInfo(filter, sortBy, limit, page, histogramInterval);
}
/**
* Execute listRequestLogs request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return listRequestLogsAsync(filter, sortBy, limit, page, histogramInterval, _callback);
}
}
/**
* ListRequestLogs: Get the logs for API requests.
*
* @return APIlistRequestLogsRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIlistRequestLogsRequest listRequestLogs() {
return new APIlistRequestLogsRequest();
}
}