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.ArchiveOutputV1;
import com.seeq.model.GetProjectsOutputV1;
import com.seeq.model.ProjectInputV1;
import com.seeq.model.ProjectOutputV1;
import com.seeq.model.ScheduledNotebookInputV1;
import com.seeq.model.ScheduledNotebookListOutputV1;
import com.seeq.model.ScheduledNotebookOutputV1;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ProjectsApi {
private ApiClient apiClient;
private long retryTimeout = 5_000; // Default of 5 seconds
public ProjectsApi() {
this(Configuration.getDefaultApiClient());
}
public ProjectsApi(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;
}
/**
* Archive a project
*
* @param id ID of the project to archive (required)
* @return ArchiveOutputV1
* @throws ApiException if fails to make API call
*/
public ArchiveOutputV1 archiveProject(String id) throws ApiException {
ApiClient.ApiResponse localVarResponse = archiveProjectWithHttpInfo(id);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Archive a project
*
* @param id ID of the project to archive (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse archiveProjectWithHttpInfo(String id) throws ApiException {
Map localVarHeaderParams = new HashMap();
return archiveProjectWithHeadersAndHttpInfo(id, localVarHeaderParams);
}
/**
* Archive a project
*
* @param id ID of the project to archive (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse archiveProjectWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return archiveProjectInternal(id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse archiveProjectInternal(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 archiveProject");
}
// create path and map variables
String localVarPath = "/projects/{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, "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
}
/**
* Create a project
*
* @param body Project information (required)
* @return ProjectOutputV1
* @throws ApiException if fails to make API call
*/
public ProjectOutputV1 createProject(ProjectInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createProjectWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create a project
*
* @param body Project information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createProjectWithHttpInfo(ProjectInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createProjectWithHeadersAndHttpInfo(body, localVarHeaderParams);
}
/**
* Create a project
*
* @param body Project 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 createProjectWithHeadersAndHttpInfo(ProjectInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createProjectInternal(body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createProjectInternal(ProjectInputV1 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 createProject");
}
// create path and map variables
String localVarPath = "/projects";
// 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
}
/**
* Get a project
*
* @param id ID of the project to retrieve (required)
* @return ProjectOutputV1
* @throws ApiException if fails to make API call
*/
public ProjectOutputV1 getProject(String id) throws ApiException {
ApiClient.ApiResponse localVarResponse = getProjectWithHttpInfo(id);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a project
*
* @param id ID of the project to retrieve (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getProjectWithHttpInfo(String id) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getProjectWithHeadersAndHttpInfo(id, localVarHeaderParams);
}
/**
* Get a project
*
* @param id ID of the project 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 getProjectWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getProjectInternal(id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getProjectInternal(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 getProject");
}
// create path and map variables
String localVarPath = "/projects/{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
}
/**
* List projects
*
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @return GetProjectsOutputV1
* @throws ApiException if fails to make API call
*/
public GetProjectsOutputV1 getProjects(Integer offset, Integer limit) throws ApiException {
ApiClient.ApiResponse localVarResponse = getProjectsWithHttpInfo(offset, limit);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* List projects
*
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getProjectsWithHttpInfo(Integer offset, Integer limit) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getProjectsWithHeadersAndHttpInfo(offset, limit, localVarHeaderParams);
}
/**
* List projects
*
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getProjectsWithHeadersAndHttpInfo(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 getProjectsInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getProjectsInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/projects";
// 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
}
/**
* Update a project
*
* @param id The Seeq ID for the project (required)
* @param body (required)
* @return ProjectOutputV1
* @throws ApiException if fails to make API call
*/
public ProjectOutputV1 putProject(String id, ProjectInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = putProjectWithHttpInfo(id, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Update a project
*
* @param id The Seeq ID for the project (required)
* @param body (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse putProjectWithHttpInfo(String id, ProjectInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return putProjectWithHeadersAndHttpInfo(id, body, localVarHeaderParams);
}
/**
* Update a project
*
* @param id The Seeq ID for the project (required)
* @param body (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse putProjectWithHeadersAndHttpInfo(String id, ProjectInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return putProjectInternal(id, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse putProjectInternal(String id, ProjectInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling putProject");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling putProject");
}
// create path and map variables
String localVarPath = "/projects/{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 = {
"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
}
/**
* Schedule a Notebook within a Project to run on a set interval
*
* @param id ID of the Project containing the Notebook to schedule (required)
* @param body The Notebook schedule information (required)
* @return ScheduledNotebookOutputV1
* @throws ApiException if fails to make API call
*/
public ScheduledNotebookOutputV1 scheduleNotebook(String id, ScheduledNotebookInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = scheduleNotebookWithHttpInfo(id, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Schedule a Notebook within a Project to run on a set interval
*
* @param id ID of the Project containing the Notebook to schedule (required)
* @param body The Notebook schedule information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse scheduleNotebookWithHttpInfo(String id, ScheduledNotebookInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return scheduleNotebookWithHeadersAndHttpInfo(id, body, localVarHeaderParams);
}
/**
* Schedule a Notebook within a Project to run on a set interval
*
* @param id ID of the Project containing the Notebook to schedule (required)
* @param body The Notebook schedule 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 scheduleNotebookWithHeadersAndHttpInfo(String id, ScheduledNotebookInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return scheduleNotebookInternal(id, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse scheduleNotebookInternal(String id, ScheduledNotebookInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling scheduleNotebook");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling scheduleNotebook");
}
// create path and map variables
String localVarPath = "/projects/{id}/scheduleNotebook"
.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 = {
"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
}
/**
* Archive Scheduled Notebook(s) within a Project so that it will no longer run
*
* @param id ID of the Project containing the Notebook to unschedule (required)
* @param filePath The path to the Notebook file. Using '*' will unschedule all Notebooks for this Project, regardless of their label (required)
* @param label The label for the Notebook schedule. Using '*' will unschedule all labels for this filePath (optional)
* @return ScheduledNotebookListOutputV1
* @throws ApiException if fails to make API call
*/
public ScheduledNotebookListOutputV1 unscheduleNotebook(String id, String filePath, String label) throws ApiException {
ApiClient.ApiResponse localVarResponse = unscheduleNotebookWithHttpInfo(id, filePath, label);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Archive Scheduled Notebook(s) within a Project so that it will no longer run
*
* @param id ID of the Project containing the Notebook to unschedule (required)
* @param filePath The path to the Notebook file. Using '*' will unschedule all Notebooks for this Project, regardless of their label (required)
* @param label The label for the Notebook schedule. Using '*' will unschedule all labels for this filePath (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse unscheduleNotebookWithHttpInfo(String id, String filePath, String label) throws ApiException {
Map localVarHeaderParams = new HashMap();
return unscheduleNotebookWithHeadersAndHttpInfo(id, filePath, label, localVarHeaderParams);
}
/**
* Archive Scheduled Notebook(s) within a Project so that it will no longer run
*
* @param id ID of the Project containing the Notebook to unschedule (required)
* @param filePath The path to the Notebook file. Using '*' will unschedule all Notebooks for this Project, regardless of their label (required)
* @param label The label for the Notebook schedule. Using '*' will unschedule all labels for this filePath (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse unscheduleNotebookWithHeadersAndHttpInfo(String id, String filePath, String label, Map customHeaders) throws ApiException {
// verify the required query parameter 'filePath' is set
if (filePath == null) {
throw new ApiException(400, "Missing the required query parameter 'filePath' when calling unscheduleNotebook");
}
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filePath", filePath));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "label", label));
localVarHeaderParams.putAll(customHeaders);
return unscheduleNotebookInternal(id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse unscheduleNotebookInternal(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 unscheduleNotebook");
}
// create path and map variables
String localVarPath = "/projects/{id}/scheduleNotebook"
.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
}
// OVERLOADS START
/**
* List projects
*
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional)
* @return GetProjectsOutputV1
* @throws ApiException if fails to make API call
*/
public GetProjectsOutputV1 getProjects(Integer offset) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
ApiClient.ApiResponse localVarResponse = getProjectsInternal(localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* List projects
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getProjectsWithHttpInfo(Integer offset) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
return getProjectsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* List projects
*
* @param offset The pagination offset, the index of the first collection item 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 getProjectsWithHeadersAndHttpInfo(Integer offset, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarHeaderParams.putAll(customHeaders);
return getProjectsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* List projects
*
*
* @return GetProjectsOutputV1
* @throws ApiException if fails to make API call
*/
public GetProjectsOutputV1 getProjects() throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
ApiClient.ApiResponse localVarResponse = getProjectsInternal(localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* List projects
*
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getProjectsWithHttpInfo() throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
return getProjectsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* List projects
*
*
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getProjectsWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getProjectsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Archive Scheduled Notebook(s) within a Project so that it will no longer run
*
* @param id ID of the Project containing the Notebook to unschedule (required)
* @param filePath The path to the Notebook file. Using '*' will unschedule all Notebooks for this Project, regardless of their label (required)
* @return ScheduledNotebookListOutputV1
* @throws ApiException if fails to make API call
*/
public ScheduledNotebookListOutputV1 unscheduleNotebook(String id, String filePath) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
if (filePath == null) {
throw new ApiException(400, "Missing the required query parameter 'filePath' when calling unscheduleNotebook");
}
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filePath", filePath));
ApiClient.ApiResponse localVarResponse = unscheduleNotebookInternal(id, localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Archive Scheduled Notebook(s) within a Project so that it will no longer run
* @param id ID of the Project containing the Notebook to unschedule (required)
* @param filePath The path to the Notebook file. Using '*' will unschedule all Notebooks for this Project, regardless of their label (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse unscheduleNotebookWithHttpInfo(String id, String filePath) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
if (filePath == null) {
throw new ApiException(400, "Missing the required query parameter 'filePath' when calling unscheduleNotebook");
}
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filePath", filePath));
return unscheduleNotebookInternal(id, localVarQueryParams, localVarHeaderParams);
}
/**
* Archive Scheduled Notebook(s) within a Project so that it will no longer run
*
* @param id ID of the Project containing the Notebook to unschedule (required)
* @param filePath The path to the Notebook file. Using '*' will unschedule all Notebooks for this Project, regardless of their label (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse unscheduleNotebookWithHeadersAndHttpInfo(String id, String filePath, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
if (filePath == null) {
throw new ApiException(400, "Missing the required query parameter 'filePath' when calling unscheduleNotebook");
}
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filePath", filePath));
localVarHeaderParams.putAll(customHeaders);
return unscheduleNotebookInternal(id, localVarQueryParams, localVarHeaderParams);
}
// OVERLOADS END
}