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.
package com.seeq.api;
import com.seeq.ApiException;
import com.seeq.ApiClient;
import com.seeq.Configuration;
import com.seeq.model.*;
import com.seeq.Pair;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.ProcessingException;
import com.seeq.model.GetRequestOutputV1;
import com.seeq.model.GetRequestsOutputV1;
import com.seeq.model.StatusMessageBase;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class RequestsApi {
private ApiClient apiClient;
private long retryTimeout = 5_000; // Default of 5 seconds
public RequestsApi() {
this(Configuration.getDefaultApiClient());
}
public RequestsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public void setRetryTimeout(long retryTimeout) {
this.retryTimeout = retryTimeout;
}
public long getRetryTimeout() {
return this.retryTimeout;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Cancel all requests
*
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase cancelAllRequests() throws ApiException {
ApiClient.ApiResponse localVarResponse = cancelAllRequestsWithHttpInfo();
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Cancel all requests
*
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelAllRequestsWithHttpInfo() throws ApiException {
Map localVarHeaderParams = new HashMap();
return cancelAllRequestsWithHeadersAndHttpInfo(localVarHeaderParams);
}
/**
* Cancel all requests
*
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelAllRequestsWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return cancelAllRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse cancelAllRequestsInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/requests/all";
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Cancel all requests made by the invoking user
*
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase cancelMyRequests() throws ApiException {
ApiClient.ApiResponse localVarResponse = cancelMyRequestsWithHttpInfo();
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Cancel all requests made by the invoking user
*
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelMyRequestsWithHttpInfo() throws ApiException {
Map localVarHeaderParams = new HashMap();
return cancelMyRequestsWithHeadersAndHttpInfo(localVarHeaderParams);
}
/**
* Cancel all requests made by the invoking user
*
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelMyRequestsWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return cancelMyRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse cancelMyRequestsInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/requests/me";
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Cancel all requests made by the invoking user for a specific session
*
* @param sessionId ID of the current session (required)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase cancelMyRequestsBySessionId(String sessionId) throws ApiException {
ApiClient.ApiResponse localVarResponse = cancelMyRequestsBySessionIdWithHttpInfo(sessionId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Cancel all requests made by the invoking user for a specific session
*
* @param sessionId ID of the current session (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelMyRequestsBySessionIdWithHttpInfo(String sessionId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return cancelMyRequestsBySessionIdWithHeadersAndHttpInfo(sessionId, localVarHeaderParams);
}
/**
* Cancel all requests made by the invoking user for a specific session
*
* @param sessionId ID of the current session (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelMyRequestsBySessionIdWithHeadersAndHttpInfo(String sessionId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return cancelMyRequestsBySessionIdInternal(sessionId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse cancelMyRequestsBySessionIdInternal(String sessionId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'sessionId' is set
if (sessionId == null) {
throw new ApiException(400, "Missing the required path parameter 'sessionId' when calling cancelMyRequestsBySessionId");
}
// create path and map variables
String localVarPath = "/requests/me/{sessionId}"
.replaceAll("\\{" + "sessionId" + "\\}", apiClient.escapeString(sessionId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Cancel a request
*
* @param requestId ID of the request to cancel (required)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase cancelRequest(String requestId) throws ApiException {
ApiClient.ApiResponse localVarResponse = cancelRequestWithHttpInfo(requestId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Cancel a request
*
* @param requestId ID of the request to cancel (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelRequestWithHttpInfo(String requestId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return cancelRequestWithHeadersAndHttpInfo(requestId, localVarHeaderParams);
}
/**
* Cancel a request
*
* @param requestId ID of the request to cancel (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelRequestWithHeadersAndHttpInfo(String requestId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return cancelRequestInternal(requestId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse cancelRequestInternal(String requestId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'requestId' is set
if (requestId == null) {
throw new ApiException(400, "Missing the required path parameter 'requestId' when calling cancelRequest");
}
// create path and map variables
String localVarPath = "/requests/{requestId}"
.replaceAll("\\{" + "requestId" + "\\}", apiClient.escapeString(requestId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
*
* @param userId userId (optional)
* @param datasourceClass datasourceClass (optional)
* @param datasourceId datasourceId (optional)
* @param dataId dataId (optional)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase cancelRequests(String userId, String datasourceClass, String datasourceId, String dataId) throws ApiException {
ApiClient.ApiResponse localVarResponse = cancelRequestsWithHttpInfo(userId, datasourceClass, datasourceId, dataId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
*
* @param userId userId (optional)
* @param datasourceClass datasourceClass (optional)
* @param datasourceId datasourceId (optional)
* @param dataId dataId (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelRequestsWithHttpInfo(String userId, String datasourceClass, String datasourceId, String dataId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return cancelRequestsWithHeadersAndHttpInfo(userId, datasourceClass, datasourceId, dataId, localVarHeaderParams);
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
*
* @param userId userId (optional)
* @param datasourceClass datasourceClass (optional)
* @param datasourceId datasourceId (optional)
* @param dataId dataId (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelRequestsWithHeadersAndHttpInfo(String userId, String datasourceClass, String datasourceId, String dataId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "userId", userId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceClass", datasourceClass));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceId", datasourceId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "dataId", dataId));
localVarHeaderParams.putAll(customHeaders);
return cancelRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse cancelRequestsInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/requests";
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Get progress information for the request identified by the supplied ID
*
* @param requestId ID of the request for which to retrieve progress information (required)
* @return GetRequestOutputV1
* @throws ApiException if fails to make API call
*/
public GetRequestOutputV1 getRequest(String requestId) throws ApiException {
ApiClient.ApiResponse localVarResponse = getRequestWithHttpInfo(requestId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get progress information for the request identified by the supplied ID
*
* @param requestId ID of the request for which to retrieve progress information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getRequestWithHttpInfo(String requestId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getRequestWithHeadersAndHttpInfo(requestId, localVarHeaderParams);
}
/**
* Get progress information for the request identified by the supplied ID
*
* @param requestId ID of the request for which to retrieve progress information (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getRequestWithHeadersAndHttpInfo(String requestId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getRequestInternal(requestId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getRequestInternal(String requestId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'requestId' is set
if (requestId == null) {
throw new ApiException(400, "Missing the required path parameter 'requestId' when calling getRequest");
}
// create path and map variables
String localVarPath = "/requests/{requestId}"
.replaceAll("\\{" + "requestId" + "\\}", apiClient.escapeString(requestId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Get the collection of requests
*
* @param limit The maximum number of requests that will be returned (optional, default to 250)
* @return GetRequestsOutputV1
* @throws ApiException if fails to make API call
*/
public GetRequestsOutputV1 getRequests(Integer limit) throws ApiException {
ApiClient.ApiResponse localVarResponse = getRequestsWithHttpInfo(limit);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get the collection of requests
*
* @param limit The maximum number of requests that will be returned (optional, default to 250)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getRequestsWithHttpInfo(Integer limit) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getRequestsWithHeadersAndHttpInfo(limit, localVarHeaderParams);
}
/**
* Get the collection of requests
*
* @param limit The maximum number of requests that will be returned (optional, default to 250)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getRequestsWithHeadersAndHttpInfo(Integer limit, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
localVarHeaderParams.putAll(customHeaders);
return getRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getRequestsInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/requests";
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Restart a request, sending it to the back of the line
*
* @param requestId ID of the request to restart (required)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase restartRequest(String requestId) throws ApiException {
ApiClient.ApiResponse localVarResponse = restartRequestWithHttpInfo(requestId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Restart a request, sending it to the back of the line
*
* @param requestId ID of the request to restart (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse restartRequestWithHttpInfo(String requestId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return restartRequestWithHeadersAndHttpInfo(requestId, localVarHeaderParams);
}
/**
* Restart a request, sending it to the back of the line
*
* @param requestId ID of the request to restart (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse restartRequestWithHeadersAndHttpInfo(String requestId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return restartRequestInternal(requestId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse restartRequestInternal(String requestId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'requestId' is set
if (requestId == null) {
throw new ApiException(400, "Missing the required path parameter 'requestId' when calling restartRequest");
}
// create path and map variables
String localVarPath = "/requests/{requestId}/restart"
.replaceAll("\\{" + "requestId" + "\\}", apiClient.escapeString(requestId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
// OVERLOADS START
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
*
* @param userId userId (optional)
* @param datasourceClass datasourceClass (optional)
* @param datasourceId datasourceId (optional)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase cancelRequests(String userId, String datasourceClass, String datasourceId) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "userId", userId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceClass", datasourceClass));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceId", datasourceId));
ApiClient.ApiResponse localVarResponse = cancelRequestsInternal(localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
* @param userId userId (optional)
* @param datasourceClass datasourceClass (optional)
* @param datasourceId datasourceId (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelRequestsWithHttpInfo(String userId, String datasourceClass, String datasourceId) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "userId", userId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceClass", datasourceClass));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceId", datasourceId));
return cancelRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
*
* @param userId userId (optional)
* @param datasourceClass datasourceClass (optional)
* @param datasourceId datasourceId (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelRequestsWithHeadersAndHttpInfo(String userId, String datasourceClass, String datasourceId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "userId", userId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceClass", datasourceClass));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceId", datasourceId));
localVarHeaderParams.putAll(customHeaders);
return cancelRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
*
* @param userId userId (optional)
* @param datasourceClass datasourceClass (optional)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase cancelRequests(String userId, String datasourceClass) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "userId", userId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceClass", datasourceClass));
ApiClient.ApiResponse localVarResponse = cancelRequestsInternal(localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
* @param userId userId (optional)
* @param datasourceClass datasourceClass (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelRequestsWithHttpInfo(String userId, String datasourceClass) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "userId", userId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceClass", datasourceClass));
return cancelRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
*
* @param userId userId (optional)
* @param datasourceClass datasourceClass (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelRequestsWithHeadersAndHttpInfo(String userId, String datasourceClass, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "userId", userId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceClass", datasourceClass));
localVarHeaderParams.putAll(customHeaders);
return cancelRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
*
* @param userId userId (optional)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase cancelRequests(String userId) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "userId", userId));
ApiClient.ApiResponse localVarResponse = cancelRequestsInternal(localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
* @param userId userId (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelRequestsWithHttpInfo(String userId) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "userId", userId));
return cancelRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
*
* @param userId userId (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelRequestsWithHeadersAndHttpInfo(String userId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "userId", userId));
localVarHeaderParams.putAll(customHeaders);
return cancelRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
*
*
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase cancelRequests() throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
ApiClient.ApiResponse localVarResponse = cancelRequestsInternal(localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
*
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelRequestsWithHttpInfo() throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
return cancelRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Cancel multiple requests, optionally filtering by a user and/or datasource. If you don't specify any filters, all of the requests currently running in Seeq will be cancelled. If you specify multiple filters, only requests matching all filters will be cancelled.
*
*
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse cancelRequestsWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return cancelRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Get the collection of requests
*
*
* @return GetRequestsOutputV1
* @throws ApiException if fails to make API call
*/
public GetRequestsOutputV1 getRequests() throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
ApiClient.ApiResponse localVarResponse = getRequestsInternal(localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get the collection of requests
*
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getRequestsWithHttpInfo() throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
return getRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Get the collection of requests
*
*
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getRequestsWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getRequestsInternal(localVarQueryParams, localVarHeaderParams);
}
// OVERLOADS END
}