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.GetJobsOutputV1;
import com.seeq.model.JobOutputV1;
import com.seeq.model.ScreenshotOutputV1;
import com.seeq.model.StatusMessageBase;
import com.seeq.model.ValidateCronListInputV1;
import com.seeq.model.ValidateCronListOutputV1;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class JobsApi {
private ApiClient apiClient;
private long retryTimeout = 5_000; // Default of 5 seconds
public JobsApi() {
this(Configuration.getDefaultApiClient());
}
public JobsApi(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;
}
/**
* Create a job to capture a content screenshot at a regular interval
*
* @param body ID of the content (required)
* @return JobOutputV1
* @throws ApiException if fails to make API call
*/
public JobOutputV1 createContentJob(String body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createContentJobWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create a job to capture a content screenshot at a regular interval
*
* @param body ID of the content (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createContentJobWithHttpInfo(String body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createContentJobWithHeadersAndHttpInfo(body, localVarHeaderParams);
}
/**
* Create a job to capture a content screenshot at a regular interval
*
* @param body ID of the content (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createContentJobWithHeadersAndHttpInfo(String body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createContentJobInternal(body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createContentJobInternal(String body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling createContentJob");
}
// create path and map variables
String localVarPath = "/jobs/content";
// 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
}
/**
* Create a job to update a date range and its content at a regular interval
*
* @param body ID for the Date Range (required)
* @return JobOutputV1
* @throws ApiException if fails to make API call
*/
public JobOutputV1 createDateRangeJob(String body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createDateRangeJobWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create a job to update a date range and its content at a regular interval
*
* @param body ID for the Date Range (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createDateRangeJobWithHttpInfo(String body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createDateRangeJobWithHeadersAndHttpInfo(body, localVarHeaderParams);
}
/**
* Create a job to update a date range and its content at a regular interval
*
* @param body ID for the Date Range (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createDateRangeJobWithHeadersAndHttpInfo(String body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createDateRangeJobInternal(body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createDateRangeJobInternal(String body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling createDateRangeJob");
}
// create path and map variables
String localVarPath = "/jobs/dateRange";
// 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
}
/**
* Delete a scheduled job and cancel any currently running instance
*
* @param group Group to which the job belongs (required)
* @param id ID of the job to delete (required)
* @param schedulerType Which scheduler to query for the job. The options are User (default), System, and AsyncMigration. (optional, default to User)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase deleteJob(String group, String id, String schedulerType) throws ApiException {
ApiClient.ApiResponse localVarResponse = deleteJobWithHttpInfo(group, id, schedulerType);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Delete a scheduled job and cancel any currently running instance
*
* @param group Group to which the job belongs (required)
* @param id ID of the job to delete (required)
* @param schedulerType Which scheduler to query for the job. The options are User (default), System, and AsyncMigration. (optional, default to User)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse deleteJobWithHttpInfo(String group, String id, String schedulerType) throws ApiException {
Map localVarHeaderParams = new HashMap();
return deleteJobWithHeadersAndHttpInfo(group, id, schedulerType, localVarHeaderParams);
}
/**
* Delete a scheduled job and cancel any currently running instance
*
* @param group Group to which the job belongs (required)
* @param id ID of the job to delete (required)
* @param schedulerType Which scheduler to query for the job. The options are User (default), System, and AsyncMigration. (optional, default to User)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse deleteJobWithHeadersAndHttpInfo(String group, String id, String schedulerType, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "schedulerType", schedulerType));
localVarHeaderParams.putAll(customHeaders);
return deleteJobInternal(group, id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse deleteJobInternal(String group, String id, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'group' is set
if (group == null) {
throw new ApiException(400, "Missing the required path parameter 'group' when calling deleteJob");
}
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling deleteJob");
}
// create path and map variables
String localVarPath = "/jobs/{group}/{id}"
.replaceAll("\\{" + "group" + "\\}", apiClient.escapeString(group.toString()))
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.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
}
/**
* Get details of a specified job
*
* @param group Group to which the job belongs (required)
* @param id ID of the job to retrieve (required)
* @param schedulerType Which scheduler to query for the job. The options are User (default), System, and AsyncMigration. (optional, default to User)
* @return JobOutputV1
* @throws ApiException if fails to make API call
*/
public JobOutputV1 getJob(String group, String id, String schedulerType) throws ApiException {
ApiClient.ApiResponse localVarResponse = getJobWithHttpInfo(group, id, schedulerType);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get details of a specified job
*
* @param group Group to which the job belongs (required)
* @param id ID of the job to retrieve (required)
* @param schedulerType Which scheduler to query for the job. The options are User (default), System, and AsyncMigration. (optional, default to User)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getJobWithHttpInfo(String group, String id, String schedulerType) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getJobWithHeadersAndHttpInfo(group, id, schedulerType, localVarHeaderParams);
}
/**
* Get details of a specified job
*
* @param group Group to which the job belongs (required)
* @param id ID of the job to retrieve (required)
* @param schedulerType Which scheduler to query for the job. The options are User (default), System, and AsyncMigration. (optional, default to User)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getJobWithHeadersAndHttpInfo(String group, String id, String schedulerType, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "schedulerType", schedulerType));
localVarHeaderParams.putAll(customHeaders);
return getJobInternal(group, id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getJobInternal(String group, String id, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'group' is set
if (group == null) {
throw new ApiException(400, "Missing the required path parameter 'group' when calling getJob");
}
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling getJob");
}
// create path and map variables
String localVarPath = "/jobs/{group}/{id}"
.replaceAll("\\{" + "group" + "\\}", apiClient.escapeString(group.toString()))
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.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
}
/**
* List of scheduled jobs
*
* @param offset The pagination offset, the index of the first job that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of jobs that will be returned in this page of results (optional, default to 40)
* @param schedulerType Which scheduler to query for jobs. The options are User (default), System, and AsyncMigration. (optional, default to User)
* @return GetJobsOutputV1
* @throws ApiException if fails to make API call
*/
public GetJobsOutputV1 getJobs(Integer offset, Integer limit, String schedulerType) throws ApiException {
ApiClient.ApiResponse localVarResponse = getJobsWithHttpInfo(offset, limit, schedulerType);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* List of scheduled jobs
*
* @param offset The pagination offset, the index of the first job that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of jobs that will be returned in this page of results (optional, default to 40)
* @param schedulerType Which scheduler to query for jobs. The options are User (default), System, and AsyncMigration. (optional, default to User)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getJobsWithHttpInfo(Integer offset, Integer limit, String schedulerType) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getJobsWithHeadersAndHttpInfo(offset, limit, schedulerType, localVarHeaderParams);
}
/**
* List of scheduled jobs
*
* @param offset The pagination offset, the index of the first job that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of jobs that will be returned in this page of results (optional, default to 40)
* @param schedulerType Which scheduler to query for jobs. The options are User (default), System, and AsyncMigration. (optional, default to User)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getJobsWithHeadersAndHttpInfo(Integer offset, Integer limit, String schedulerType, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "schedulerType", schedulerType));
localVarHeaderParams.putAll(customHeaders);
return getJobsInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getJobsInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/jobs";
// 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
}
/**
* A simplified endpoint for fetching a screenshot of Seeq content at a regular interval.
*
* @param id The content id to capture (required)
* @return ScreenshotOutputV1
* @throws ApiException if fails to make API call
*/
public ScreenshotOutputV1 getScreenshotFromContent(String id) throws ApiException {
ApiClient.ApiResponse localVarResponse = getScreenshotFromContentWithHttpInfo(id);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* A simplified endpoint for fetching a screenshot of Seeq content at a regular interval.
*
* @param id The content id to capture (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getScreenshotFromContentWithHttpInfo(String id) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getScreenshotFromContentWithHeadersAndHttpInfo(id, localVarHeaderParams);
}
/**
* A simplified endpoint for fetching a screenshot of Seeq content at a regular interval.
*
* @param id The content id to capture (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getScreenshotFromContentWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getScreenshotFromContentInternal(id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getScreenshotFromContentInternal(String id, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling getScreenshotFromContent");
}
// create path and map variables
String localVarPath = "/jobs/content/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.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
}
/**
* Validate a list of Quartz cron expressions
*
* @param body The list of cron schedules to evaluate (required)
* @return ValidateCronListOutputV1
* @throws ApiException if fails to make API call
*/
public ValidateCronListOutputV1 validateCron(ValidateCronListInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = validateCronWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Validate a list of Quartz cron expressions
*
* @param body The list of cron schedules to evaluate (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse validateCronWithHttpInfo(ValidateCronListInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return validateCronWithHeadersAndHttpInfo(body, localVarHeaderParams);
}
/**
* Validate a list of Quartz cron expressions
*
* @param body The list of cron schedules to evaluate (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse validateCronWithHeadersAndHttpInfo(ValidateCronListInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return validateCronInternal(body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse validateCronInternal(ValidateCronListInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling validateCron");
}
// create path and map variables
String localVarPath = "/jobs/validateCron";
// 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
/**
* List of scheduled jobs
*
* @param offset The pagination offset, the index of the first job that will be returned in this page of results (optional)
* @param limit The pagination limit, the total number of jobs that will be returned in this page of results (optional)
* @return GetJobsOutputV1
* @throws ApiException if fails to make API call
*/
public GetJobsOutputV1 getJobs(Integer offset, Integer limit) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
ApiClient.ApiResponse localVarResponse = getJobsInternal(localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* List of scheduled jobs
* @param offset The pagination offset, the index of the first job that will be returned in this page of results (optional)
* @param limit The pagination limit, the total number of jobs that will be returned in this page of results (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getJobsWithHttpInfo(Integer offset, Integer limit) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
return getJobsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* List of scheduled jobs
*
* @param offset The pagination offset, the index of the first job that will be returned in this page of results (optional)
* @param limit The pagination limit, the total number of jobs that will be returned in this page of results (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getJobsWithHeadersAndHttpInfo(Integer offset, Integer limit, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
localVarHeaderParams.putAll(customHeaders);
return getJobsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* List of scheduled jobs
*
* @param offset The pagination offset, the index of the first job that will be returned in this page of results (optional)
* @return GetJobsOutputV1
* @throws ApiException if fails to make API call
*/
public GetJobsOutputV1 getJobs(Integer offset) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
ApiClient.ApiResponse localVarResponse = getJobsInternal(localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* List of scheduled jobs
* @param offset The pagination offset, the index of the first job that will be returned in this page of results (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getJobsWithHttpInfo(Integer offset) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
return getJobsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* List of scheduled jobs
*
* @param offset The pagination offset, the index of the first job that will be returned in this page of results (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getJobsWithHeadersAndHttpInfo(Integer offset, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarHeaderParams.putAll(customHeaders);
return getJobsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* List of scheduled jobs
*
*
* @return GetJobsOutputV1
* @throws ApiException if fails to make API call
*/
public GetJobsOutputV1 getJobs() throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
ApiClient.ApiResponse localVarResponse = getJobsInternal(localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* List of scheduled jobs
*
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getJobsWithHttpInfo() throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
return getJobsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* List of scheduled jobs
*
*
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getJobsWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getJobsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Delete a scheduled job and cancel any currently running instance
*
* @param group Group to which the job belongs (required)
* @param id ID of the job to delete (required)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase deleteJob(String group, String id) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
ApiClient.ApiResponse localVarResponse = deleteJobInternal(group, id, localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Delete a scheduled job and cancel any currently running instance
* @param group Group to which the job belongs (required)
* @param id ID of the job to delete (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse deleteJobWithHttpInfo(String group, String id) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
return deleteJobInternal(group, id, localVarQueryParams, localVarHeaderParams);
}
/**
* Delete a scheduled job and cancel any currently running instance
*
* @param group Group to which the job belongs (required)
* @param id ID of the job to delete (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse deleteJobWithHeadersAndHttpInfo(String group, String id, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return deleteJobInternal(group, id, localVarQueryParams, localVarHeaderParams);
}
/**
* Get details of a specified job
*
* @param group Group to which the job belongs (required)
* @param id ID of the job to retrieve (required)
* @return JobOutputV1
* @throws ApiException if fails to make API call
*/
public JobOutputV1 getJob(String group, String id) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
ApiClient.ApiResponse localVarResponse = getJobInternal(group, id, localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get details of a specified job
* @param group Group to which the job belongs (required)
* @param id ID of the job to retrieve (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getJobWithHttpInfo(String group, String id) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
return getJobInternal(group, id, localVarQueryParams, localVarHeaderParams);
}
/**
* Get details of a specified job
*
* @param group Group to which the job belongs (required)
* @param id ID of the job to retrieve (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getJobWithHeadersAndHttpInfo(String group, String id, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getJobInternal(group, id, localVarQueryParams, localVarHeaderParams);
}
// OVERLOADS END
}