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.CalculatedItemOutputV1;
import com.seeq.model.FormulaCompileInputV1;
import com.seeq.model.FormulaCompileOutputV1;
import com.seeq.model.FormulaDocInputV1;
import com.seeq.model.FormulaDocOutputV1;
import com.seeq.model.FormulaDocSummariesOutputV1;
import com.seeq.model.FormulaErrorOutputV1;
import com.seeq.model.FormulaItemInputV1;
import com.seeq.model.FormulaItemOutputV1;
import com.seeq.model.FormulaPackageImportInputV1;
import com.seeq.model.FormulaPackageImportOutputV1;
import com.seeq.model.FormulaPackageInputV1;
import com.seeq.model.FormulaPackageOutputV1;
import com.seeq.model.FormulaRunInputV1;
import com.seeq.model.FormulaRunOutputV1;
import com.seeq.model.FunctionInputV1;
import com.seeq.model.ItemPreviewListV1;
import com.seeq.model.StatusMessageBase;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FormulasApi {
private ApiClient apiClient;
private long retryTimeout = 5_000; // Default of 5 seconds
public FormulasApi() {
this(Configuration.getDefaultApiClient());
}
public FormulasApi(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;
}
/**
* Clear all formula caches. This method is deprecated
*
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase clearCache() throws ApiException {
ApiClient.ApiResponse localVarResponse = clearCacheWithHttpInfo();
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Clear all formula caches. This method is deprecated
*
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse clearCacheWithHttpInfo() throws ApiException {
Map localVarHeaderParams = new HashMap();
return clearCacheWithHeadersAndHttpInfo(localVarHeaderParams);
}
/**
* Clear all formula caches. This method is deprecated
*
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse clearCacheWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return clearCacheInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse clearCacheInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/formulas/clearCache";
// 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
}
/**
* Compile a Seeq Formula. This method is deprecated.
*
* @param formula A formula to be applied. (optional)
* @param parameters Parameters for the formula. Each parameter should have a format of 'name=id' where 'name' is the variable identifier, without the leading $ sign, and 'id' is the ID of the item referenced by the variable. (optional)
* @return FormulaCompileOutputV1
* @throws ApiException if fails to make API call
*/
public FormulaCompileOutputV1 compileFormula(String formula, List parameters) throws ApiException {
ApiClient.ApiResponse localVarResponse = compileFormulaWithHttpInfo(formula, parameters);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Compile a Seeq Formula. This method is deprecated.
*
* @param formula A formula to be applied. (optional)
* @param parameters Parameters for the formula. Each parameter should have a format of 'name=id' where 'name' is the variable identifier, without the leading $ sign, and 'id' is the ID of the item referenced by the variable. (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse compileFormulaWithHttpInfo(String formula, List parameters) throws ApiException {
Map localVarHeaderParams = new HashMap();
return compileFormulaWithHeadersAndHttpInfo(formula, parameters, localVarHeaderParams);
}
/**
* Compile a Seeq Formula. This method is deprecated.
*
* @param formula A formula to be applied. (optional)
* @param parameters Parameters for the formula. Each parameter should have a format of 'name=id' where 'name' is the variable identifier, without the leading $ sign, and 'id' is the ID of the item referenced by the variable. (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse compileFormulaWithHeadersAndHttpInfo(String formula, List parameters, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "parameters", parameters));
localVarHeaderParams.putAll(customHeaders);
return compileFormulaInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse compileFormulaInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/formulas/compile";
// 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
}
/**
* Compile a Seeq Formula. Use this endpoint instead of GET /compile when the input is large.
*
* @param body Seeq Formula to compile and its parameters (required)
* @return FormulaCompileOutputV1
* @throws ApiException if fails to make API call
*/
public FormulaCompileOutputV1 compileFormulaAndParameters(FormulaCompileInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = compileFormulaAndParametersWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Compile a Seeq Formula. Use this endpoint instead of GET /compile when the input is large.
*
* @param body Seeq Formula to compile and its parameters (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse compileFormulaAndParametersWithHttpInfo(FormulaCompileInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return compileFormulaAndParametersWithHeadersAndHttpInfo(body, localVarHeaderParams);
}
/**
* Compile a Seeq Formula. Use this endpoint instead of GET /compile when the input is large.
*
* @param body Seeq Formula to compile and its parameters (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse compileFormulaAndParametersWithHeadersAndHttpInfo(FormulaCompileInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return compileFormulaAndParametersInternal(body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse compileFormulaAndParametersInternal(FormulaCompileInputV1 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 compileFormulaAndParameters");
}
// create path and map variables
String localVarPath = "/formulas/compile";
// 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 function
*
* @param body Function information (required)
* @return CalculatedItemOutputV1
* @throws ApiException if fails to make API call
*/
public CalculatedItemOutputV1 createFunction(FunctionInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createFunctionWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create a function
*
* @param body Function information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createFunctionWithHttpInfo(FunctionInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createFunctionWithHeadersAndHttpInfo(body, localVarHeaderParams);
}
/**
* Create a function
*
* @param body Function 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 createFunctionWithHeadersAndHttpInfo(FunctionInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createFunctionInternal(body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createFunctionInternal(FunctionInputV1 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 createFunction");
}
// create path and map variables
String localVarPath = "/formulas/functions";
// 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 formula item
*
* @param body Item information (required)
* @return FormulaItemOutputV1
* @throws ApiException if fails to make API call
*/
public FormulaItemOutputV1 createItem(FormulaItemInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createItemWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create a formula item
*
* @param body Item information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createItemWithHttpInfo(FormulaItemInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createItemWithHeadersAndHttpInfo(body, localVarHeaderParams);
}
/**
* Create a formula item
*
* @param body Item 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 createItemWithHeadersAndHttpInfo(FormulaItemInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createItemInternal(body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createItemInternal(FormulaItemInputV1 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 createItem");
}
// create path and map variables
String localVarPath = "/formulas/items";
// 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
}
/**
* Permanently delete the specified formula doc
*
* @param packageName The name of the package (required)
* @param docName The name of the formula doc (required)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase deleteFormulaDoc(String packageName, String docName) throws ApiException {
ApiClient.ApiResponse localVarResponse = deleteFormulaDocWithHttpInfo(packageName, docName);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Permanently delete the specified formula doc
*
* @param packageName The name of the package (required)
* @param docName The name of the formula doc (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse deleteFormulaDocWithHttpInfo(String packageName, String docName) throws ApiException {
Map localVarHeaderParams = new HashMap();
return deleteFormulaDocWithHeadersAndHttpInfo(packageName, docName, localVarHeaderParams);
}
/**
* Permanently delete the specified formula doc
*
* @param packageName The name of the package (required)
* @param docName The name of the formula doc (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse deleteFormulaDocWithHeadersAndHttpInfo(String packageName, String docName, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return deleteFormulaDocInternal(packageName, docName, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse deleteFormulaDocInternal(String packageName, String docName, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'packageName' is set
if (packageName == null) {
throw new ApiException(400, "Missing the required path parameter 'packageName' when calling deleteFormulaDoc");
}
// verify the required path parameter 'docName' is set
if (docName == null) {
throw new ApiException(400, "Missing the required path parameter 'docName' when calling deleteFormulaDoc");
}
// create path and map variables
String localVarPath = "/formulas/docs/{packageName}/{docName}"
.replaceAll("\\{" + "packageName" + "\\}", apiClient.escapeString(packageName.toString()))
.replaceAll("\\{" + "docName" + "\\}", apiClient.escapeString(docName.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
}
/**
* Permanently delete a specific package
*
* @param packageName The name of the package (required)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase deletePackage(String packageName) throws ApiException {
ApiClient.ApiResponse localVarResponse = deletePackageWithHttpInfo(packageName);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Permanently delete a specific package
*
* @param packageName The name of the package (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse deletePackageWithHttpInfo(String packageName) throws ApiException {
Map localVarHeaderParams = new HashMap();
return deletePackageWithHeadersAndHttpInfo(packageName, localVarHeaderParams);
}
/**
* Permanently delete a specific package
*
* @param packageName The name of the package (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse deletePackageWithHeadersAndHttpInfo(String packageName, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return deletePackageInternal(packageName, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse deletePackageInternal(String packageName, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'packageName' is set
if (packageName == null) {
throw new ApiException(400, "Missing the required path parameter 'packageName' when calling deletePackage");
}
// create path and map variables
String localVarPath = "/formulas/packages/{packageName}"
.replaceAll("\\{" + "packageName" + "\\}", apiClient.escapeString(packageName.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 a list of the constants available for use in a calculation
*
* @return List<String>
* @throws ApiException if fails to make API call
*/
public List getConstantNameList() throws ApiException {
ApiClient.ApiResponse> localVarResponse = getConstantNameListWithHttpInfo();
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a list of the constants available for use in a calculation
*
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse> getConstantNameListWithHttpInfo() throws ApiException {
Map localVarHeaderParams = new HashMap();
return getConstantNameListWithHeadersAndHttpInfo(localVarHeaderParams);
}
/**
* Get a list of the constants available for use in a calculation
*
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse> getConstantNameListWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getConstantNameListInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse> getConstantNameListInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/formulas/docs/constants";
// 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 documentation details about a specific function group or index
*
* @param packageName The name of the package (required)
* @param docName The name of the document for the desired function or index (required)
* @return FormulaDocOutputV1
* @throws ApiException if fails to make API call
*/
public FormulaDocOutputV1 getFormulaDoc(String packageName, String docName) throws ApiException {
ApiClient.ApiResponse localVarResponse = getFormulaDocWithHttpInfo(packageName, docName);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get documentation details about a specific function group or index
*
* @param packageName The name of the package (required)
* @param docName The name of the document for the desired function or index (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getFormulaDocWithHttpInfo(String packageName, String docName) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getFormulaDocWithHeadersAndHttpInfo(packageName, docName, localVarHeaderParams);
}
/**
* Get documentation details about a specific function group or index
*
* @param packageName The name of the package (required)
* @param docName The name of the document for the desired function or index (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getFormulaDocWithHeadersAndHttpInfo(String packageName, String docName, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getFormulaDocInternal(packageName, docName, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getFormulaDocInternal(String packageName, String docName, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'packageName' is set
if (packageName == null) {
throw new ApiException(400, "Missing the required path parameter 'packageName' when calling getFormulaDoc");
}
// verify the required path parameter 'docName' is set
if (docName == null) {
throw new ApiException(400, "Missing the required path parameter 'docName' when calling getFormulaDoc");
}
// create path and map variables
String localVarPath = "/formulas/docs/{packageName}/{docName}"
.replaceAll("\\{" + "packageName" + "\\}", apiClient.escapeString(packageName.toString()))
.replaceAll("\\{" + "docName" + "\\}", apiClient.escapeString(docName.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 a list of the functions available for use in a calculation
*
* @return FormulaDocSummariesOutputV1
* @throws ApiException if fails to make API call
*/
public FormulaDocSummariesOutputV1 getFormulaDocs() throws ApiException {
ApiClient.ApiResponse localVarResponse = getFormulaDocsWithHttpInfo();
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a list of the functions available for use in a calculation
*
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getFormulaDocsWithHttpInfo() throws ApiException {
Map localVarHeaderParams = new HashMap();
return getFormulaDocsWithHeadersAndHttpInfo(localVarHeaderParams);
}
/**
* Get a list of the functions available for use in a calculation
*
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getFormulaDocsWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getFormulaDocsInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getFormulaDocsInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/formulas/docs";
// 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 a collection of Formula Functions
*
* @param type The type of Formula Functions that should be included. Valid options are FormulaFunction, AggregatingFormulaFunction, Chart, and UserDefinedFormulaFunction (optional, default to FormulaFunction)
* @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 ItemPreviewListV1
* @throws ApiException if fails to make API call
*/
public ItemPreviewListV1 getFormulaFunctions(String type, Integer offset, Integer limit) throws ApiException {
ApiClient.ApiResponse localVarResponse = getFormulaFunctionsWithHttpInfo(type, offset, limit);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a collection of Formula Functions
*
* @param type The type of Formula Functions that should be included. Valid options are FormulaFunction, AggregatingFormulaFunction, Chart, and UserDefinedFormulaFunction (optional, default to FormulaFunction)
* @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 getFormulaFunctionsWithHttpInfo(String type, Integer offset, Integer limit) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getFormulaFunctionsWithHeadersAndHttpInfo(type, offset, limit, localVarHeaderParams);
}
/**
* Get a collection of Formula Functions
*
* @param type The type of Formula Functions that should be included. Valid options are FormulaFunction, AggregatingFormulaFunction, Chart, and UserDefinedFormulaFunction (optional, default to FormulaFunction)
* @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 getFormulaFunctionsWithHeadersAndHttpInfo(String type, Integer offset, Integer limit, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
localVarHeaderParams.putAll(customHeaders);
return getFormulaFunctionsInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getFormulaFunctionsInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/formulas/functions";
// 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 a Formula Function
*
* @param id ID of the function (required)
* @return CalculatedItemOutputV1
* @throws ApiException if fails to make API call
*/
public CalculatedItemOutputV1 getFunction(String id) throws ApiException {
ApiClient.ApiResponse localVarResponse = getFunctionWithHttpInfo(id);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a Formula Function
*
* @param id ID of the function (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getFunctionWithHttpInfo(String id) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getFunctionWithHeadersAndHttpInfo(id, localVarHeaderParams);
}
/**
* Get a Formula Function
*
* @param id ID of the function (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getFunctionWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getFunctionInternal(id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getFunctionInternal(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 getFunction");
}
// create path and map variables
String localVarPath = "/formulas/functions/{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
}
/**
* Get a Formula Item
*
* @param id ID of the item (required)
* @return FormulaItemOutputV1
* @throws ApiException if fails to make API call
*/
public FormulaItemOutputV1 getItem(String id) throws ApiException {
ApiClient.ApiResponse localVarResponse = getItemWithHttpInfo(id);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a Formula Item
*
* @param id ID of the item (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getItemWithHttpInfo(String id) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getItemWithHeadersAndHttpInfo(id, localVarHeaderParams);
}
/**
* Get a Formula Item
*
* @param id ID of the item (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getItemWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getItemInternal(id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getItemInternal(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 getItem");
}
// create path and map variables
String localVarPath = "/formulas/items/{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
}
/**
* Get details of a specific package
*
* @param packageName The name of the package (required)
* @return FormulaPackageOutputV1
* @throws ApiException if fails to make API call
*/
public FormulaPackageOutputV1 getPackage(String packageName) throws ApiException {
ApiClient.ApiResponse localVarResponse = getPackageWithHttpInfo(packageName);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get details of a specific package
*
* @param packageName The name of the package (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getPackageWithHttpInfo(String packageName) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getPackageWithHeadersAndHttpInfo(packageName, localVarHeaderParams);
}
/**
* Get details of a specific package
*
* @param packageName The name of the package (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getPackageWithHeadersAndHttpInfo(String packageName, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getPackageInternal(packageName, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getPackageInternal(String packageName, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'packageName' is set
if (packageName == null) {
throw new ApiException(400, "Missing the required path parameter 'packageName' when calling getPackage");
}
// create path and map variables
String localVarPath = "/formulas/packages/{packageName}"
.replaceAll("\\{" + "packageName" + "\\}", apiClient.escapeString(packageName.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 a collection of packages
*
* @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 ItemPreviewListV1
* @throws ApiException if fails to make API call
*/
public ItemPreviewListV1 getPackages(Integer offset, Integer limit) throws ApiException {
ApiClient.ApiResponse localVarResponse = getPackagesWithHttpInfo(offset, limit);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a collection of packages
*
* @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 getPackagesWithHttpInfo(Integer offset, Integer limit) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getPackagesWithHeadersAndHttpInfo(offset, limit, localVarHeaderParams);
}
/**
* Get a collection of packages
*
* @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 getPackagesWithHeadersAndHttpInfo(Integer offset, Integer limit, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap