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 Luminesce Web 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.luminesce.api;
import com.finbourne.luminesce.ApiCallback;
import com.finbourne.luminesce.ApiClient;
import com.finbourne.luminesce.ApiException;
import com.finbourne.luminesce.ApiResponse;
import com.finbourne.luminesce.Configuration;
import com.finbourne.luminesce.Pair;
import com.finbourne.luminesce.ProgressRequestBody;
import com.finbourne.luminesce.ProgressResponseBody;
import com.finbourne.luminesce.extensions.ConfigurationOptions;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.finbourne.luminesce.model.BackgroundQueryCancelResponse;
import com.finbourne.luminesce.model.BackgroundQueryProgressResponse;
import com.finbourne.luminesce.model.BackgroundQueryResponse;
import java.io.File;
import com.finbourne.luminesce.model.LusidProblemDetails;
import java.time.OffsetDateTime;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class SqlBackgroundExecutionApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public SqlBackgroundExecutionApi() {
this(Configuration.getDefaultApiClient());
}
public SqlBackgroundExecutionApi(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 cancelQueryCall(String executionId, final ApiCallback _callback) throws ApiException {
return cancelQueryCall(executionId, _callback, new ConfigurationOptions());
}
private okhttp3.Call cancelQueryCall(String executionId, final ApiCallback _callback, ConfigurationOptions opts) 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/SqlBackground/{executionId}"
.replace("{" + "executionId" + "}", localVarApiClient.escapeString(executionId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call cancelQueryValidateBeforeCall(String executionId, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling cancelQuery(Async)");
}
return cancelQueryCall(executionId, _callback, opts);
}
private ApiResponse cancelQueryWithHttpInfo(String executionId) throws ApiException {
okhttp3.Call localVarCall = cancelQueryValidateBeforeCall(executionId, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse cancelQueryWithHttpInfo(String executionId, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = cancelQueryValidateBeforeCall(executionId, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call cancelQueryAsync(String executionId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = cancelQueryValidateBeforeCall(executionId, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call cancelQueryAsync(String executionId, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = cancelQueryValidateBeforeCall(executionId, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIcancelQueryRequest {
private final String executionId;
private APIcancelQueryRequest(String executionId) {
this.executionId = executionId;
}
/**
* Build call for cancelQuery
* @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
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return cancelQueryCall(executionId, _callback);
}
/**
* Execute cancelQuery request
* @return BackgroundQueryCancelResponse
* @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
-
*/
public BackgroundQueryCancelResponse execute() throws ApiException {
ApiResponse localVarResp = cancelQueryWithHttpInfo(executionId);
return localVarResp.getData();
}
/**
* Execute cancelQuery request. Use any specified configuration options to override any other configuration for this request only.
* @return BackgroundQueryCancelResponse
* @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
-
*/
public BackgroundQueryCancelResponse execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = cancelQueryWithHttpInfo(executionId, opts);
return localVarResp.getData();
}
/**
* Execute cancelQuery request with HTTP info returned
* @return ApiResponse<BackgroundQueryCancelResponse>
* @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
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return cancelQueryWithHttpInfo(executionId);
}
/**
* Execute cancelQuery request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<BackgroundQueryCancelResponse>
* @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
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return cancelQueryWithHttpInfo(executionId, opts);
}
/**
* Execute cancelQuery 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
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return cancelQueryAsync(executionId, _callback);
}
/**
* Execute cancelQuery request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return cancelQueryAsync(executionId, _callback, opts);
}
}
/**
* CancelQuery: Cancels (if running) or clears the data from (if completed) a previously started query
* Cancel the query (if still running) / clear the data (if already returned) The following error codes are to be anticipated with standard Problem Detail reports: - 401 Unauthorized - 403 Forbidden - 404 Not Found : The requested query result doesn't exist and is not running.
* @param executionId ExecutionId returned when starting the query (required)
* @return APIcancelQueryRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
*/
public APIcancelQueryRequest cancelQuery(String executionId) {
return new APIcancelQueryRequest(executionId);
}
private okhttp3.Call fetchQueryResultCsvCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, String delimiter, String escape, final ApiCallback _callback) throws ApiException {
return fetchQueryResultCsvCall(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, _callback, new ConfigurationOptions());
}
private okhttp3.Call fetchQueryResultCsvCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, String delimiter, String escape, final ApiCallback _callback, ConfigurationOptions opts) 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/SqlBackground/{executionId}/csv"
.replace("{" + "executionId" + "}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (download != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("download", download));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (delimiter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("delimiter", delimiter));
}
if (escape != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("escape", escape));
}
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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultCsvValidateBeforeCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, String delimiter, String escape, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultCsv(Async)");
}
return fetchQueryResultCsvCall(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, _callback, opts);
}
private ApiResponse fetchQueryResultCsvWithHttpInfo(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, String delimiter, String escape) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultCsvValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse fetchQueryResultCsvWithHttpInfo(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, String delimiter, String escape, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultCsvValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call fetchQueryResultCsvAsync(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, String delimiter, String escape, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultCsvValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call fetchQueryResultCsvAsync(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, String delimiter, String escape, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultCsvValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIfetchQueryResultCsvRequest {
private final String executionId;
private Boolean download;
private String sortBy;
private String filter;
private String select;
private String groupBy;
private Integer limit;
private Integer page;
private String delimiter;
private String escape;
private APIfetchQueryResultCsvRequest(String executionId) {
this.executionId = executionId;
}
/**
* Set download
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @return APIfetchQueryResultCsvRequest
*/
public APIfetchQueryResultCsvRequest download(Boolean download) {
this.download = download;
return this;
}
/**
* Set sortBy
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @return APIfetchQueryResultCsvRequest
*/
public APIfetchQueryResultCsvRequest sortBy(String sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Set filter
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @return APIfetchQueryResultCsvRequest
*/
public APIfetchQueryResultCsvRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Set select
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @return APIfetchQueryResultCsvRequest
*/
public APIfetchQueryResultCsvRequest select(String select) {
this.select = select;
return this;
}
/**
* Set groupBy
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return APIfetchQueryResultCsvRequest
*/
public APIfetchQueryResultCsvRequest groupBy(String groupBy) {
this.groupBy = groupBy;
return this;
}
/**
* Set limit
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @return APIfetchQueryResultCsvRequest
*/
public APIfetchQueryResultCsvRequest limit(Integer limit) {
this.limit = limit;
return this;
}
/**
* Set page
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @return APIfetchQueryResultCsvRequest
*/
public APIfetchQueryResultCsvRequest page(Integer page) {
this.page = page;
return this;
}
/**
* Set delimiter
* @param delimiter Delimiter string to override the default (optional)
* @return APIfetchQueryResultCsvRequest
*/
public APIfetchQueryResultCsvRequest delimiter(String delimiter) {
this.delimiter = delimiter;
return this;
}
/**
* Set escape
* @param escape Escape character to override the default (optional)
* @return APIfetchQueryResultCsvRequest
*/
public APIfetchQueryResultCsvRequest escape(String escape) {
this.escape = escape;
return this;
}
/**
* Build call for fetchQueryResultCsv
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return fetchQueryResultCsvCall(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, _callback);
}
/**
* Execute fetchQueryResultCsv request
* @return String
* @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
Bad Request
-
403
Forbidden
-
*/
public String execute() throws ApiException {
ApiResponse localVarResp = fetchQueryResultCsvWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultCsv request. Use any specified configuration options to override any other configuration for this request only.
* @return String
* @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
Bad Request
-
403
Forbidden
-
*/
public String execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = fetchQueryResultCsvWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, opts);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultCsv request with HTTP info returned
* @return ApiResponse<String>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return fetchQueryResultCsvWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape);
}
/**
* Execute fetchQueryResultCsv request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<String>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return fetchQueryResultCsvWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, opts);
}
/**
* Execute fetchQueryResultCsv 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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return fetchQueryResultCsvAsync(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, _callback);
}
/**
* Execute fetchQueryResultCsv request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return fetchQueryResultCsvAsync(executionId, download, sortBy, filter, select, groupBy, limit, page, delimiter, escape, _callback, opts);
}
}
/**
* FetchQueryResultCsv: Fetches the result from a previously started query, in CSV format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 403 Forbidden - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @return APIfetchQueryResultCsvRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
403
Forbidden
-
*/
public APIfetchQueryResultCsvRequest fetchQueryResultCsv(String executionId) {
return new APIfetchQueryResultCsvRequest(executionId);
}
private okhttp3.Call fetchQueryResultExcelCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
return fetchQueryResultExcelCall(executionId, sortBy, filter, select, groupBy, _callback, new ConfigurationOptions());
}
private okhttp3.Call fetchQueryResultExcelCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback, ConfigurationOptions opts) 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/SqlBackground/{executionId}/excel"
.replace("{" + "executionId" + "}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultExcelValidateBeforeCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultExcel(Async)");
}
return fetchQueryResultExcelCall(executionId, sortBy, filter, select, groupBy, _callback, opts);
}
private ApiResponse fetchQueryResultExcelWithHttpInfo(String executionId, String sortBy, String filter, String select, String groupBy) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultExcelValidateBeforeCall(executionId, sortBy, filter, select, groupBy, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse fetchQueryResultExcelWithHttpInfo(String executionId, String sortBy, String filter, String select, String groupBy, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultExcelValidateBeforeCall(executionId, sortBy, filter, select, groupBy, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call fetchQueryResultExcelAsync(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultExcelValidateBeforeCall(executionId, sortBy, filter, select, groupBy, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call fetchQueryResultExcelAsync(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultExcelValidateBeforeCall(executionId, sortBy, filter, select, groupBy, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIfetchQueryResultExcelRequest {
private final String executionId;
private String sortBy;
private String filter;
private String select;
private String groupBy;
private APIfetchQueryResultExcelRequest(String executionId) {
this.executionId = executionId;
}
/**
* Set sortBy
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @return APIfetchQueryResultExcelRequest
*/
public APIfetchQueryResultExcelRequest sortBy(String sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Set filter
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @return APIfetchQueryResultExcelRequest
*/
public APIfetchQueryResultExcelRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Set select
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @return APIfetchQueryResultExcelRequest
*/
public APIfetchQueryResultExcelRequest select(String select) {
this.select = select;
return this;
}
/**
* Set groupBy
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return APIfetchQueryResultExcelRequest
*/
public APIfetchQueryResultExcelRequest groupBy(String groupBy) {
this.groupBy = groupBy;
return this;
}
/**
* Build call for fetchQueryResultExcel
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return fetchQueryResultExcelCall(executionId, sortBy, filter, select, groupBy, _callback);
}
/**
* Execute fetchQueryResultExcel request
* @return File
* @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
Bad Request
-
403
Forbidden
-
*/
public File execute() throws ApiException {
ApiResponse localVarResp = fetchQueryResultExcelWithHttpInfo(executionId, sortBy, filter, select, groupBy);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultExcel request. Use any specified configuration options to override any other configuration for this request only.
* @return File
* @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
Bad Request
-
403
Forbidden
-
*/
public File execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = fetchQueryResultExcelWithHttpInfo(executionId, sortBy, filter, select, groupBy, opts);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultExcel request with HTTP info returned
* @return ApiResponse<File>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return fetchQueryResultExcelWithHttpInfo(executionId, sortBy, filter, select, groupBy);
}
/**
* Execute fetchQueryResultExcel request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<File>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return fetchQueryResultExcelWithHttpInfo(executionId, sortBy, filter, select, groupBy, opts);
}
/**
* Execute fetchQueryResultExcel 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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return fetchQueryResultExcelAsync(executionId, sortBy, filter, select, groupBy, _callback);
}
/**
* Execute fetchQueryResultExcel request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return fetchQueryResultExcelAsync(executionId, sortBy, filter, select, groupBy, _callback, opts);
}
}
/**
* FetchQueryResultExcel: Fetches the result from a previously started query, in Excel format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 403 Forbidden - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @return APIfetchQueryResultExcelRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
403
Forbidden
-
*/
public APIfetchQueryResultExcelRequest fetchQueryResultExcel(String executionId) {
return new APIfetchQueryResultExcelRequest(executionId);
}
private okhttp3.Call fetchQueryResultHistogramCall(String executionId, String timestampFieldName, OffsetDateTime startAt, OffsetDateTime endAt, String bucketSize, String filter, Boolean jsonProper, final ApiCallback _callback) throws ApiException {
return fetchQueryResultHistogramCall(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, _callback, new ConfigurationOptions());
}
private okhttp3.Call fetchQueryResultHistogramCall(String executionId, String timestampFieldName, OffsetDateTime startAt, OffsetDateTime endAt, String bucketSize, String filter, Boolean jsonProper, final ApiCallback _callback, ConfigurationOptions opts) 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/SqlBackground/{executionId}/histogram"
.replace("{" + "executionId" + "}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (timestampFieldName != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("timestampFieldName", timestampFieldName));
}
if (startAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAt", startAt));
}
if (endAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("endAt", endAt));
}
if (bucketSize != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("bucketSize", bucketSize));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (jsonProper != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("jsonProper", jsonProper));
}
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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultHistogramValidateBeforeCall(String executionId, String timestampFieldName, OffsetDateTime startAt, OffsetDateTime endAt, String bucketSize, String filter, Boolean jsonProper, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultHistogram(Async)");
}
// verify the required parameter 'timestampFieldName' is set
if (timestampFieldName == null) {
throw new ApiException("Missing the required parameter 'timestampFieldName' when calling fetchQueryResultHistogram(Async)");
}
return fetchQueryResultHistogramCall(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, _callback, opts);
}
private ApiResponse fetchQueryResultHistogramWithHttpInfo(String executionId, String timestampFieldName, OffsetDateTime startAt, OffsetDateTime endAt, String bucketSize, String filter, Boolean jsonProper) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultHistogramValidateBeforeCall(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse fetchQueryResultHistogramWithHttpInfo(String executionId, String timestampFieldName, OffsetDateTime startAt, OffsetDateTime endAt, String bucketSize, String filter, Boolean jsonProper, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultHistogramValidateBeforeCall(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call fetchQueryResultHistogramAsync(String executionId, String timestampFieldName, OffsetDateTime startAt, OffsetDateTime endAt, String bucketSize, String filter, Boolean jsonProper, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultHistogramValidateBeforeCall(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call fetchQueryResultHistogramAsync(String executionId, String timestampFieldName, OffsetDateTime startAt, OffsetDateTime endAt, String bucketSize, String filter, Boolean jsonProper, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultHistogramValidateBeforeCall(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIfetchQueryResultHistogramRequest {
private final String executionId;
private final String timestampFieldName;
private OffsetDateTime startAt;
private OffsetDateTime endAt;
private String bucketSize;
private String filter;
private Boolean jsonProper;
private APIfetchQueryResultHistogramRequest(String executionId, String timestampFieldName) {
this.executionId = executionId;
this.timestampFieldName = timestampFieldName;
}
/**
* Set startAt
* @param startAt Start point (of the timestampFieldName field) for the histogram (optional)
* @return APIfetchQueryResultHistogramRequest
*/
public APIfetchQueryResultHistogramRequest startAt(OffsetDateTime startAt) {
this.startAt = startAt;
return this;
}
/**
* Set endAt
* @param endAt End point (of the timestampFieldName field) for the histogram (optional)
* @return APIfetchQueryResultHistogramRequest
*/
public APIfetchQueryResultHistogramRequest endAt(OffsetDateTime endAt) {
this.endAt = endAt;
return this;
}
/**
* Set bucketSize
* @param bucketSize Optional histogram bucket width. If not provided a set number of buckets between start/end range will be generated. (optional)
* @return APIfetchQueryResultHistogramRequest
*/
public APIfetchQueryResultHistogramRequest bucketSize(String bucketSize) {
this.bucketSize = bucketSize;
return this;
}
/**
* Set filter
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @return APIfetchQueryResultHistogramRequest
*/
public APIfetchQueryResultHistogramRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Set jsonProper
* @param jsonProper Should this be text/json (not json-encoded-as-a-string) (optional, default to false)
* @return APIfetchQueryResultHistogramRequest
*/
public APIfetchQueryResultHistogramRequest jsonProper(Boolean jsonProper) {
this.jsonProper = jsonProper;
return this;
}
/**
* Build call for fetchQueryResultHistogram
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return fetchQueryResultHistogramCall(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, _callback);
}
/**
* Execute fetchQueryResultHistogram request
* @return String
* @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
Bad Request
-
403
Forbidden
-
*/
public String execute() throws ApiException {
ApiResponse localVarResp = fetchQueryResultHistogramWithHttpInfo(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultHistogram request. Use any specified configuration options to override any other configuration for this request only.
* @return String
* @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
Bad Request
-
403
Forbidden
-
*/
public String execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = fetchQueryResultHistogramWithHttpInfo(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, opts);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultHistogram request with HTTP info returned
* @return ApiResponse<String>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return fetchQueryResultHistogramWithHttpInfo(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper);
}
/**
* Execute fetchQueryResultHistogram request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<String>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return fetchQueryResultHistogramWithHttpInfo(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, opts);
}
/**
* Execute fetchQueryResultHistogram 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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return fetchQueryResultHistogramAsync(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, _callback);
}
/**
* Execute fetchQueryResultHistogram request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return fetchQueryResultHistogramAsync(executionId, timestampFieldName, startAt, endAt, bucketSize, filter, jsonProper, _callback, opts);
}
}
/**
* FetchQueryResultHistogram: Fetches the result from a previously started query, converts it to a histogram (counts in buckets).
* Fetch the histogram in Json format (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated with standard Problem Detail reports: - 401 Unauthorized - 403 Forbidden - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @param timestampFieldName Name of the timestamp field used in building the histogram (required)
* @return APIfetchQueryResultHistogramRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
403
Forbidden
-
*/
public APIfetchQueryResultHistogramRequest fetchQueryResultHistogram(String executionId, String timestampFieldName) {
return new APIfetchQueryResultHistogramRequest(executionId, timestampFieldName);
}
private okhttp3.Call fetchQueryResultJsonCall(String executionId, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
return fetchQueryResultJsonCall(executionId, sortBy, filter, select, groupBy, limit, page, _callback, new ConfigurationOptions());
}
private okhttp3.Call fetchQueryResultJsonCall(String executionId, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback, ConfigurationOptions opts) 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/SqlBackground/{executionId}/json"
.replace("{" + "executionId" + "}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultJsonValidateBeforeCall(String executionId, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultJson(Async)");
}
return fetchQueryResultJsonCall(executionId, sortBy, filter, select, groupBy, limit, page, _callback, opts);
}
private ApiResponse fetchQueryResultJsonWithHttpInfo(String executionId, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultJsonValidateBeforeCall(executionId, sortBy, filter, select, groupBy, limit, page, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse fetchQueryResultJsonWithHttpInfo(String executionId, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultJsonValidateBeforeCall(executionId, sortBy, filter, select, groupBy, limit, page, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call fetchQueryResultJsonAsync(String executionId, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultJsonValidateBeforeCall(executionId, sortBy, filter, select, groupBy, limit, page, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call fetchQueryResultJsonAsync(String executionId, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultJsonValidateBeforeCall(executionId, sortBy, filter, select, groupBy, limit, page, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIfetchQueryResultJsonRequest {
private final String executionId;
private String sortBy;
private String filter;
private String select;
private String groupBy;
private Integer limit;
private Integer page;
private APIfetchQueryResultJsonRequest(String executionId) {
this.executionId = executionId;
}
/**
* Set sortBy
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @return APIfetchQueryResultJsonRequest
*/
public APIfetchQueryResultJsonRequest sortBy(String sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Set filter
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @return APIfetchQueryResultJsonRequest
*/
public APIfetchQueryResultJsonRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Set select
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @return APIfetchQueryResultJsonRequest
*/
public APIfetchQueryResultJsonRequest select(String select) {
this.select = select;
return this;
}
/**
* Set groupBy
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return APIfetchQueryResultJsonRequest
*/
public APIfetchQueryResultJsonRequest groupBy(String groupBy) {
this.groupBy = groupBy;
return this;
}
/**
* Set limit
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @return APIfetchQueryResultJsonRequest
*/
public APIfetchQueryResultJsonRequest limit(Integer limit) {
this.limit = limit;
return this;
}
/**
* Set page
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @return APIfetchQueryResultJsonRequest
*/
public APIfetchQueryResultJsonRequest page(Integer page) {
this.page = page;
return this;
}
/**
* Build call for fetchQueryResultJson
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return fetchQueryResultJsonCall(executionId, sortBy, filter, select, groupBy, limit, page, _callback);
}
/**
* Execute fetchQueryResultJson request
* @return String
* @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
Bad Request
-
403
Forbidden
-
*/
public String execute() throws ApiException {
ApiResponse localVarResp = fetchQueryResultJsonWithHttpInfo(executionId, sortBy, filter, select, groupBy, limit, page);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultJson request. Use any specified configuration options to override any other configuration for this request only.
* @return String
* @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
Bad Request
-
403
Forbidden
-
*/
public String execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = fetchQueryResultJsonWithHttpInfo(executionId, sortBy, filter, select, groupBy, limit, page, opts);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultJson request with HTTP info returned
* @return ApiResponse<String>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return fetchQueryResultJsonWithHttpInfo(executionId, sortBy, filter, select, groupBy, limit, page);
}
/**
* Execute fetchQueryResultJson request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<String>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return fetchQueryResultJsonWithHttpInfo(executionId, sortBy, filter, select, groupBy, limit, page, opts);
}
/**
* Execute fetchQueryResultJson 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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return fetchQueryResultJsonAsync(executionId, sortBy, filter, select, groupBy, limit, page, _callback);
}
/**
* Execute fetchQueryResultJson request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return fetchQueryResultJsonAsync(executionId, sortBy, filter, select, groupBy, limit, page, _callback, opts);
}
}
/**
* FetchQueryResultJson: Fetches the result from a previously started query, in JSON string format. Please move to '/jsonProper' instead. This may be marked as Deprecated in the future.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 403 Forbidden - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @return APIfetchQueryResultJsonRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
403
Forbidden
-
*/
public APIfetchQueryResultJsonRequest fetchQueryResultJson(String executionId) {
return new APIfetchQueryResultJsonRequest(executionId);
}
private okhttp3.Call fetchQueryResultJsonProperCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
return fetchQueryResultJsonProperCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, new ConfigurationOptions());
}
private okhttp3.Call fetchQueryResultJsonProperCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback, ConfigurationOptions opts) 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/SqlBackground/{executionId}/jsonProper"
.replace("{" + "executionId" + "}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (download != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("download", download));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultJsonProperValidateBeforeCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultJsonProper(Async)");
}
return fetchQueryResultJsonProperCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, opts);
}
private ApiResponse fetchQueryResultJsonProperWithHttpInfo(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultJsonProperValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse fetchQueryResultJsonProperWithHttpInfo(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultJsonProperValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call fetchQueryResultJsonProperAsync(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultJsonProperValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call fetchQueryResultJsonProperAsync(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultJsonProperValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIfetchQueryResultJsonProperRequest {
private final String executionId;
private Boolean download;
private String sortBy;
private String filter;
private String select;
private String groupBy;
private Integer limit;
private Integer page;
private APIfetchQueryResultJsonProperRequest(String executionId) {
this.executionId = executionId;
}
/**
* Set download
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @return APIfetchQueryResultJsonProperRequest
*/
public APIfetchQueryResultJsonProperRequest download(Boolean download) {
this.download = download;
return this;
}
/**
* Set sortBy
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @return APIfetchQueryResultJsonProperRequest
*/
public APIfetchQueryResultJsonProperRequest sortBy(String sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Set filter
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @return APIfetchQueryResultJsonProperRequest
*/
public APIfetchQueryResultJsonProperRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Set select
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @return APIfetchQueryResultJsonProperRequest
*/
public APIfetchQueryResultJsonProperRequest select(String select) {
this.select = select;
return this;
}
/**
* Set groupBy
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return APIfetchQueryResultJsonProperRequest
*/
public APIfetchQueryResultJsonProperRequest groupBy(String groupBy) {
this.groupBy = groupBy;
return this;
}
/**
* Set limit
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @return APIfetchQueryResultJsonProperRequest
*/
public APIfetchQueryResultJsonProperRequest limit(Integer limit) {
this.limit = limit;
return this;
}
/**
* Set page
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @return APIfetchQueryResultJsonProperRequest
*/
public APIfetchQueryResultJsonProperRequest page(Integer page) {
this.page = page;
return this;
}
/**
* Build call for fetchQueryResultJsonProper
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return fetchQueryResultJsonProperCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback);
}
/**
* Execute fetchQueryResultJsonProper request
* @return String
* @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
Bad Request
-
403
Forbidden
-
*/
public String execute() throws ApiException {
ApiResponse localVarResp = fetchQueryResultJsonProperWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultJsonProper request. Use any specified configuration options to override any other configuration for this request only.
* @return String
* @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
Bad Request
-
403
Forbidden
-
*/
public String execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = fetchQueryResultJsonProperWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page, opts);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultJsonProper request with HTTP info returned
* @return ApiResponse<String>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return fetchQueryResultJsonProperWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page);
}
/**
* Execute fetchQueryResultJsonProper request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<String>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return fetchQueryResultJsonProperWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page, opts);
}
/**
* Execute fetchQueryResultJsonProper 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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return fetchQueryResultJsonProperAsync(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback);
}
/**
* Execute fetchQueryResultJsonProper request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return fetchQueryResultJsonProperAsync(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, opts);
}
}
/**
* FetchQueryResultJsonProper: Fetches the result from a previously started query, in JSON format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 403 Forbidden - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @return APIfetchQueryResultJsonProperRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
403
Forbidden
-
*/
public APIfetchQueryResultJsonProperRequest fetchQueryResultJsonProper(String executionId) {
return new APIfetchQueryResultJsonProperRequest(executionId);
}
private okhttp3.Call fetchQueryResultParquetCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
return fetchQueryResultParquetCall(executionId, sortBy, filter, select, groupBy, _callback, new ConfigurationOptions());
}
private okhttp3.Call fetchQueryResultParquetCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback, ConfigurationOptions opts) 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/SqlBackground/{executionId}/parquet"
.replace("{" + "executionId" + "}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultParquetValidateBeforeCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultParquet(Async)");
}
return fetchQueryResultParquetCall(executionId, sortBy, filter, select, groupBy, _callback, opts);
}
private ApiResponse fetchQueryResultParquetWithHttpInfo(String executionId, String sortBy, String filter, String select, String groupBy) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultParquetValidateBeforeCall(executionId, sortBy, filter, select, groupBy, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse fetchQueryResultParquetWithHttpInfo(String executionId, String sortBy, String filter, String select, String groupBy, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultParquetValidateBeforeCall(executionId, sortBy, filter, select, groupBy, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call fetchQueryResultParquetAsync(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultParquetValidateBeforeCall(executionId, sortBy, filter, select, groupBy, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call fetchQueryResultParquetAsync(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultParquetValidateBeforeCall(executionId, sortBy, filter, select, groupBy, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIfetchQueryResultParquetRequest {
private final String executionId;
private String sortBy;
private String filter;
private String select;
private String groupBy;
private APIfetchQueryResultParquetRequest(String executionId) {
this.executionId = executionId;
}
/**
* Set sortBy
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @return APIfetchQueryResultParquetRequest
*/
public APIfetchQueryResultParquetRequest sortBy(String sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Set filter
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @return APIfetchQueryResultParquetRequest
*/
public APIfetchQueryResultParquetRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Set select
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @return APIfetchQueryResultParquetRequest
*/
public APIfetchQueryResultParquetRequest select(String select) {
this.select = select;
return this;
}
/**
* Set groupBy
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return APIfetchQueryResultParquetRequest
*/
public APIfetchQueryResultParquetRequest groupBy(String groupBy) {
this.groupBy = groupBy;
return this;
}
/**
* Build call for fetchQueryResultParquet
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return fetchQueryResultParquetCall(executionId, sortBy, filter, select, groupBy, _callback);
}
/**
* Execute fetchQueryResultParquet request
* @return File
* @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
Bad Request
-
403
Forbidden
-
*/
public File execute() throws ApiException {
ApiResponse localVarResp = fetchQueryResultParquetWithHttpInfo(executionId, sortBy, filter, select, groupBy);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultParquet request. Use any specified configuration options to override any other configuration for this request only.
* @return File
* @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
Bad Request
-
403
Forbidden
-
*/
public File execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = fetchQueryResultParquetWithHttpInfo(executionId, sortBy, filter, select, groupBy, opts);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultParquet request with HTTP info returned
* @return ApiResponse<File>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return fetchQueryResultParquetWithHttpInfo(executionId, sortBy, filter, select, groupBy);
}
/**
* Execute fetchQueryResultParquet request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<File>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return fetchQueryResultParquetWithHttpInfo(executionId, sortBy, filter, select, groupBy, opts);
}
/**
* Execute fetchQueryResultParquet 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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return fetchQueryResultParquetAsync(executionId, sortBy, filter, select, groupBy, _callback);
}
/**
* Execute fetchQueryResultParquet request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return fetchQueryResultParquetAsync(executionId, sortBy, filter, select, groupBy, _callback, opts);
}
}
/**
* FetchQueryResultParquet: Fetches the result from a previously started query, in Parquet format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 403 Forbidden - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @return APIfetchQueryResultParquetRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
403
Forbidden
-
*/
public APIfetchQueryResultParquetRequest fetchQueryResultParquet(String executionId) {
return new APIfetchQueryResultParquetRequest(executionId);
}
private okhttp3.Call fetchQueryResultPipeCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
return fetchQueryResultPipeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, new ConfigurationOptions());
}
private okhttp3.Call fetchQueryResultPipeCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback, ConfigurationOptions opts) 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/SqlBackground/{executionId}/pipe"
.replace("{" + "executionId" + "}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (download != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("download", download));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultPipeValidateBeforeCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultPipe(Async)");
}
return fetchQueryResultPipeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, opts);
}
private ApiResponse fetchQueryResultPipeWithHttpInfo(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultPipeValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse fetchQueryResultPipeWithHttpInfo(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultPipeValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call fetchQueryResultPipeAsync(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultPipeValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call fetchQueryResultPipeAsync(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultPipeValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIfetchQueryResultPipeRequest {
private final String executionId;
private Boolean download;
private String sortBy;
private String filter;
private String select;
private String groupBy;
private Integer limit;
private Integer page;
private APIfetchQueryResultPipeRequest(String executionId) {
this.executionId = executionId;
}
/**
* Set download
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @return APIfetchQueryResultPipeRequest
*/
public APIfetchQueryResultPipeRequest download(Boolean download) {
this.download = download;
return this;
}
/**
* Set sortBy
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @return APIfetchQueryResultPipeRequest
*/
public APIfetchQueryResultPipeRequest sortBy(String sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Set filter
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @return APIfetchQueryResultPipeRequest
*/
public APIfetchQueryResultPipeRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Set select
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @return APIfetchQueryResultPipeRequest
*/
public APIfetchQueryResultPipeRequest select(String select) {
this.select = select;
return this;
}
/**
* Set groupBy
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return APIfetchQueryResultPipeRequest
*/
public APIfetchQueryResultPipeRequest groupBy(String groupBy) {
this.groupBy = groupBy;
return this;
}
/**
* Set limit
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @return APIfetchQueryResultPipeRequest
*/
public APIfetchQueryResultPipeRequest limit(Integer limit) {
this.limit = limit;
return this;
}
/**
* Set page
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @return APIfetchQueryResultPipeRequest
*/
public APIfetchQueryResultPipeRequest page(Integer page) {
this.page = page;
return this;
}
/**
* Build call for fetchQueryResultPipe
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return fetchQueryResultPipeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback);
}
/**
* Execute fetchQueryResultPipe request
* @return String
* @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
Bad Request
-
403
Forbidden
-
*/
public String execute() throws ApiException {
ApiResponse localVarResp = fetchQueryResultPipeWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultPipe request. Use any specified configuration options to override any other configuration for this request only.
* @return String
* @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
Bad Request
-
403
Forbidden
-
*/
public String execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = fetchQueryResultPipeWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page, opts);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultPipe request with HTTP info returned
* @return ApiResponse<String>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return fetchQueryResultPipeWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page);
}
/**
* Execute fetchQueryResultPipe request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<String>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return fetchQueryResultPipeWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page, opts);
}
/**
* Execute fetchQueryResultPipe 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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return fetchQueryResultPipeAsync(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback);
}
/**
* Execute fetchQueryResultPipe request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return fetchQueryResultPipeAsync(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, opts);
}
}
/**
* FetchQueryResultPipe: Fetches the result from a previously started query, in pipe-delimited format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 403 Forbidden - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @return APIfetchQueryResultPipeRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
403
Forbidden
-
*/
public APIfetchQueryResultPipeRequest fetchQueryResultPipe(String executionId) {
return new APIfetchQueryResultPipeRequest(executionId);
}
private okhttp3.Call fetchQueryResultSqliteCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
return fetchQueryResultSqliteCall(executionId, sortBy, filter, select, groupBy, _callback, new ConfigurationOptions());
}
private okhttp3.Call fetchQueryResultSqliteCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback, ConfigurationOptions opts) 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/SqlBackground/{executionId}/sqlite"
.replace("{" + "executionId" + "}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultSqliteValidateBeforeCall(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultSqlite(Async)");
}
return fetchQueryResultSqliteCall(executionId, sortBy, filter, select, groupBy, _callback, opts);
}
private ApiResponse fetchQueryResultSqliteWithHttpInfo(String executionId, String sortBy, String filter, String select, String groupBy) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultSqliteValidateBeforeCall(executionId, sortBy, filter, select, groupBy, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse fetchQueryResultSqliteWithHttpInfo(String executionId, String sortBy, String filter, String select, String groupBy, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultSqliteValidateBeforeCall(executionId, sortBy, filter, select, groupBy, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call fetchQueryResultSqliteAsync(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultSqliteValidateBeforeCall(executionId, sortBy, filter, select, groupBy, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call fetchQueryResultSqliteAsync(String executionId, String sortBy, String filter, String select, String groupBy, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultSqliteValidateBeforeCall(executionId, sortBy, filter, select, groupBy, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIfetchQueryResultSqliteRequest {
private final String executionId;
private String sortBy;
private String filter;
private String select;
private String groupBy;
private APIfetchQueryResultSqliteRequest(String executionId) {
this.executionId = executionId;
}
/**
* Set sortBy
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @return APIfetchQueryResultSqliteRequest
*/
public APIfetchQueryResultSqliteRequest sortBy(String sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Set filter
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @return APIfetchQueryResultSqliteRequest
*/
public APIfetchQueryResultSqliteRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Set select
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @return APIfetchQueryResultSqliteRequest
*/
public APIfetchQueryResultSqliteRequest select(String select) {
this.select = select;
return this;
}
/**
* Set groupBy
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return APIfetchQueryResultSqliteRequest
*/
public APIfetchQueryResultSqliteRequest groupBy(String groupBy) {
this.groupBy = groupBy;
return this;
}
/**
* Build call for fetchQueryResultSqlite
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return fetchQueryResultSqliteCall(executionId, sortBy, filter, select, groupBy, _callback);
}
/**
* Execute fetchQueryResultSqlite request
* @return File
* @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
Bad Request
-
403
Forbidden
-
*/
public File execute() throws ApiException {
ApiResponse localVarResp = fetchQueryResultSqliteWithHttpInfo(executionId, sortBy, filter, select, groupBy);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultSqlite request. Use any specified configuration options to override any other configuration for this request only.
* @return File
* @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
Bad Request
-
403
Forbidden
-
*/
public File execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = fetchQueryResultSqliteWithHttpInfo(executionId, sortBy, filter, select, groupBy, opts);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultSqlite request with HTTP info returned
* @return ApiResponse<File>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return fetchQueryResultSqliteWithHttpInfo(executionId, sortBy, filter, select, groupBy);
}
/**
* Execute fetchQueryResultSqlite request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<File>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return fetchQueryResultSqliteWithHttpInfo(executionId, sortBy, filter, select, groupBy, opts);
}
/**
* Execute fetchQueryResultSqlite 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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return fetchQueryResultSqliteAsync(executionId, sortBy, filter, select, groupBy, _callback);
}
/**
* Execute fetchQueryResultSqlite request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return fetchQueryResultSqliteAsync(executionId, sortBy, filter, select, groupBy, _callback, opts);
}
}
/**
* FetchQueryResultSqlite: Fetches the result from a previously started query, in SqLite format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 403 Forbidden - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @return APIfetchQueryResultSqliteRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
403
Forbidden
-
*/
public APIfetchQueryResultSqliteRequest fetchQueryResultSqlite(String executionId) {
return new APIfetchQueryResultSqliteRequest(executionId);
}
private okhttp3.Call fetchQueryResultXmlCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
return fetchQueryResultXmlCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, new ConfigurationOptions());
}
private okhttp3.Call fetchQueryResultXmlCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback, ConfigurationOptions opts) 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/SqlBackground/{executionId}/xml"
.replace("{" + "executionId" + "}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (download != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("download", download));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
if (select != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("select", select));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupBy", groupBy));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchQueryResultXmlValidateBeforeCall(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling fetchQueryResultXml(Async)");
}
return fetchQueryResultXmlCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, opts);
}
private ApiResponse fetchQueryResultXmlWithHttpInfo(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultXmlValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse fetchQueryResultXmlWithHttpInfo(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultXmlValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call fetchQueryResultXmlAsync(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultXmlValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call fetchQueryResultXmlAsync(String executionId, Boolean download, String sortBy, String filter, String select, String groupBy, Integer limit, Integer page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fetchQueryResultXmlValidateBeforeCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIfetchQueryResultXmlRequest {
private final String executionId;
private Boolean download;
private String sortBy;
private String filter;
private String select;
private String groupBy;
private Integer limit;
private Integer page;
private APIfetchQueryResultXmlRequest(String executionId) {
this.executionId = executionId;
}
/**
* Set download
* @param download Makes this a file-download request (as opposed to returning the data in the response-body) (optional, default to false)
* @return APIfetchQueryResultXmlRequest
*/
public APIfetchQueryResultXmlRequest download(Boolean download) {
this.download = download;
return this;
}
/**
* Set sortBy
* @param sortBy Order the results by these fields. Use the `-` sign to denote descending order, e.g. `-MyFieldName`. Numeric indexes may be used also, e.g. `2,-3`. Multiple fields can be denoted by a comma e.g. `-MyFieldName,AnotherFieldName,-AFurtherFieldName`. Default is null, the sort order specified in the query itself. (optional)
* @return APIfetchQueryResultXmlRequest
*/
public APIfetchQueryResultXmlRequest sortBy(String sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Set filter
* @param filter An ODATA filter per Finbourne.Filtering syntax. (optional)
* @return APIfetchQueryResultXmlRequest
*/
public APIfetchQueryResultXmlRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Set select
* @param select Default is null (meaning return all columns in the original query itself). The values are in terms of the result column name from the original data set and are comma delimited. The power of this comes in that you may aggregate the data if you wish (that is the main reason for allowing this, in fact). e.g.: - `MyField` - `Max(x) FILTER (WHERE y > 12) as ABC` (max of a field, if another field lets it qualify, with a nice column name) - `count(*)` (count the rows for the given group, that would produce a rather ugly column name, but it works) - `count(distinct x) as numOfXs` If there was an illegal character in a field you are selecting from, you are responsible for bracketing it with [ ]. e.g. - `some_field, count(*) as a, max(x) as b, min([column with space in name]) as nice_name` where you would likely want to pass `1` as the `groupBy` also. (optional)
* @return APIfetchQueryResultXmlRequest
*/
public APIfetchQueryResultXmlRequest select(String select) {
this.select = select;
return this;
}
/**
* Set groupBy
* @param groupBy Groups by the specified fields. A comma delimited list of: 1 based numeric indexes (cleaner), or repeats of the select expressions (a bit verbose and must match exactly). e.g. `2,3`, `myColumn`. Default is null (meaning no grouping will be performed on the selected columns). This applies only over the result set being requested here, meaning indexes into the \"select\" parameter fields. Only specify this if you are selecting aggregations in the \"select\" parameter. (optional)
* @return APIfetchQueryResultXmlRequest
*/
public APIfetchQueryResultXmlRequest groupBy(String groupBy) {
this.groupBy = groupBy;
return this;
}
/**
* Set limit
* @param limit When paginating, only return this number of records, page should also be specified. (optional, default to 0)
* @return APIfetchQueryResultXmlRequest
*/
public APIfetchQueryResultXmlRequest limit(Integer limit) {
this.limit = limit;
return this;
}
/**
* Set page
* @param page 0-N based on chunk sized determined by the limit, ignored if limit < 1. (optional, default to 0)
* @return APIfetchQueryResultXmlRequest
*/
public APIfetchQueryResultXmlRequest page(Integer page) {
this.page = page;
return this;
}
/**
* Build call for fetchQueryResultXml
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return fetchQueryResultXmlCall(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback);
}
/**
* Execute fetchQueryResultXml request
* @return String
* @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
Bad Request
-
403
Forbidden
-
*/
public String execute() throws ApiException {
ApiResponse localVarResp = fetchQueryResultXmlWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultXml request. Use any specified configuration options to override any other configuration for this request only.
* @return String
* @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
Bad Request
-
403
Forbidden
-
*/
public String execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = fetchQueryResultXmlWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page, opts);
return localVarResp.getData();
}
/**
* Execute fetchQueryResultXml request with HTTP info returned
* @return ApiResponse<String>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return fetchQueryResultXmlWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page);
}
/**
* Execute fetchQueryResultXml request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<String>
* @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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return fetchQueryResultXmlWithHttpInfo(executionId, download, sortBy, filter, select, groupBy, limit, page, opts);
}
/**
* Execute fetchQueryResultXml 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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return fetchQueryResultXmlAsync(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback);
}
/**
* Execute fetchQueryResultXml request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return fetchQueryResultXmlAsync(executionId, download, sortBy, filter, select, groupBy, limit, page, _callback, opts);
}
}
/**
* FetchQueryResultXml: Fetches the result from a previously started query, in Xml format.
* Fetch the data in various formats (if available, or if not simply being informed it is not yet ready) The following error codes are to be anticipated most with standard Problem Detail reports: - 400 BadRequest : Something failed with the execution of your query - 401 Unauthorized - 403 Forbidden - 404 Not Found : The requested query result doesn't (yet) exist. - 429 Too Many Requests : Please try your request again soon 1. The query has been executed successfully in the past yet the server-instance receiving this request (e.g. from a load balancer) doesn't yet have this data available. 1. By virtue of the request you have just placed this will have started to load from the persisted cache and will soon be available. 1. It is also the case that the original server-instance to process the original query is likely to already be able to service this request.
* @param executionId ExecutionId returned when starting the query (required)
* @return APIfetchQueryResultXmlRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
403
Forbidden
-
*/
public APIfetchQueryResultXmlRequest fetchQueryResultXml(String executionId) {
return new APIfetchQueryResultXmlRequest(executionId);
}
private okhttp3.Call getProgressOfCall(String executionId, Boolean buildFromLogs, final ApiCallback _callback) throws ApiException {
return getProgressOfCall(executionId, buildFromLogs, _callback, new ConfigurationOptions());
}
private okhttp3.Call getProgressOfCall(String executionId, Boolean buildFromLogs, final ApiCallback _callback, ConfigurationOptions opts) 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/SqlBackground/{executionId}"
.replace("{" + "executionId" + "}", localVarApiClient.escapeString(executionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (buildFromLogs != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("buildFromLogs", buildFromLogs));
}
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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getProgressOfValidateBeforeCall(String executionId, Boolean buildFromLogs, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'executionId' is set
if (executionId == null) {
throw new ApiException("Missing the required parameter 'executionId' when calling getProgressOf(Async)");
}
return getProgressOfCall(executionId, buildFromLogs, _callback, opts);
}
private ApiResponse getProgressOfWithHttpInfo(String executionId, Boolean buildFromLogs) throws ApiException {
okhttp3.Call localVarCall = getProgressOfValidateBeforeCall(executionId, buildFromLogs, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken