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.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
*
* @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
*
* @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
*
* @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 {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/formulas/clearCache";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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
*
* @param formula A formula to be applied to the data from the series. The formula should reference the series using the $series variable. Formulas can be used to retrieve an aggregate. Examples: return $series.min(), return $series.sum(). Ignored for numeric (non-time) series. (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
*
* @param formula A formula to be applied to the data from the series. The formula should reference the series using the $series variable. Formulas can be used to retrieve an aggregate. Examples: return $series.min(), return $series.sum(). Ignored for numeric (non-time) series. (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
*
* @param formula A formula to be applied to the data from the series. The formula should reference the series using the $series variable. Formulas can be used to retrieve an aggregate. Examples: return $series.min(), return $series.sum(). Ignored for numeric (non-time) series. (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 {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/formulas/compile";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "parameters", parameters));
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createFunction");
}
// create path and map variables
String localVarPath = "/formulas/functions";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createItem");
}
// create path and map variables
String localVarPath = "/formulas/items";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
Object localVarPostBody = null;
// verify the required parameter 'packageName' is set
if (packageName == null) {
throw new ApiException(400, "Missing the required parameter 'packageName' when calling deleteFormulaDoc");
}
// verify the required parameter 'docName' is set
if (docName == null) {
throw new ApiException(400, "Missing the required 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
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
Object localVarPostBody = null;
// verify the required parameter 'packageName' is set
if (packageName == null) {
throw new ApiException(400, "Missing the required parameter 'packageName' when calling deletePackage");
}
// create path and map variables
String localVarPath = "/formulas/packages/{packageName}"
.replaceAll("\\{" + "packageName" + "\\}", apiClient.escapeString(packageName.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/formulas/docs/constants";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType> localVarReturnType = new GenericType>() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
Object localVarPostBody = null;
// verify the required parameter 'packageName' is set
if (packageName == null) {
throw new ApiException(400, "Missing the required parameter 'packageName' when calling getFormulaDoc");
}
// verify the required parameter 'docName' is set
if (docName == null) {
throw new ApiException(400, "Missing the required 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
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/formulas/docs";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/formulas/functions";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling getFunction");
}
// create path and map variables
String localVarPath = "/formulas/functions/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling getItem");
}
// create path and map variables
String localVarPath = "/formulas/items/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
Object localVarPostBody = null;
// verify the required parameter 'packageName' is set
if (packageName == null) {
throw new ApiException(400, "Missing the required parameter 'packageName' when calling getPackage");
}
// create path and map variables
String localVarPath = "/formulas/packages/{packageName}"
.replaceAll("\\{" + "packageName" + "\\}", apiClient.escapeString(packageName.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/formulas/packages";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 or update a package of UDFs with documentation.
*
* @param body Complete package specifications to sync (required)
* @return FormulaPackageImportOutputV1
* @throws ApiException if fails to make API call
*/
public FormulaPackageImportOutputV1 importPackage(FormulaPackageImportInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = importPackageWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create or update a package of UDFs with documentation.
*
* @param body Complete package specifications to sync (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse importPackageWithHttpInfo(FormulaPackageImportInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return importPackageWithHeadersAndHttpInfo(body, localVarHeaderParams);
}
/**
* Create or update a package of UDFs with documentation.
*
* @param body Complete package specifications to sync (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse importPackageWithHeadersAndHttpInfo(FormulaPackageImportInputV1 body, Map customHeaders) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling importPackage");
}
// create path and map variables
String localVarPath = "/formulas/packages/import";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 or update the specified formula doc
*
* @param packageName The name of the package (required)
* @param docName The name of the document for the desired function or index (required)
* @param body The details of the formula doc to create or update (required)
* @return FormulaDocOutputV1
* @throws ApiException if fails to make API call
*/
public FormulaDocOutputV1 putFormulaDoc(String packageName, String docName, FormulaDocInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = putFormulaDocWithHttpInfo(packageName, docName, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create or update the specified formula doc
*
* @param packageName The name of the package (required)
* @param docName The name of the document for the desired function or index (required)
* @param body The details of the formula doc to create or update (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse putFormulaDocWithHttpInfo(String packageName, String docName, FormulaDocInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return putFormulaDocWithHeadersAndHttpInfo(packageName, docName, body, localVarHeaderParams);
}
/**
* Create or update the specified formula doc
*
* @param packageName The name of the package (required)
* @param docName The name of the document for the desired function or index (required)
* @param body The details of the formula doc to create or update (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse putFormulaDocWithHeadersAndHttpInfo(String packageName, String docName, FormulaDocInputV1 body, Map customHeaders) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'packageName' is set
if (packageName == null) {
throw new ApiException(400, "Missing the required parameter 'packageName' when calling putFormulaDoc");
}
// verify the required parameter 'docName' is set
if (docName == null) {
throw new ApiException(400, "Missing the required parameter 'docName' when calling putFormulaDoc");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling putFormulaDoc");
}
// 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
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 or update a package
*
* @param packageName The name of the package (required)
* @param body (required)
* @return FormulaPackageOutputV1
* @throws ApiException if fails to make API call
*/
public FormulaPackageOutputV1 putPackage(String packageName, FormulaPackageInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = putPackageWithHttpInfo(packageName, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create or update a package
*
* @param packageName The name of the package (required)
* @param body (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse putPackageWithHttpInfo(String packageName, FormulaPackageInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return putPackageWithHeadersAndHttpInfo(packageName, body, localVarHeaderParams);
}
/**
* Create or update a package
*
* @param packageName The name of the package (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 putPackageWithHeadersAndHttpInfo(String packageName, FormulaPackageInputV1 body, Map customHeaders) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'packageName' is set
if (packageName == null) {
throw new ApiException(400, "Missing the required parameter 'packageName' when calling putPackage");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling putPackage");
}
// create path and map variables
String localVarPath = "/formulas/packages/{packageName}"
.replaceAll("\\{" + "packageName" + "\\}", apiClient.escapeString(packageName.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
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" };
localVarHeaderParams.putAll(customHeaders);
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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
}
/**
* Run a Seeq Formula
*
* @param start A string representing the starting index of the data to be returned. The contents and whether or not it is required depends on the result type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (optional)
* @param end A string representing the ending index of the data to be returned. The contents and whether or not it is required depends on the result type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (optional)
* @param formula The formula to be applied. This or function is required. (optional)
* @param function The ID of the function item to be computed. This or formula is required. (optional)
* @param parameters Parameters for the formula. Each parameter should have a format of 'name=value' where 'name' is the variable identifier, without the leading $ sign, and 'value' is the ID of an item or one of the following parameter expressions that can be used to access the properties of other items that are parameters: $signal.property('name') to access any property on an item, $signal.parentProperty('name') can be used if an item is in a tree to to access any property on the parent, and $signal.ancestors(', ') to return a list of all the ancestors, separated by the specified separator. In all of the above examples 'signal' would need to be another parameter that references an item using an ID. (optional)
* @param fragments Formula fragments for unbound inputs the function. Each parameter should have a format of 'name=formula' where 'name' is the variable identifier, without the leading $ sign, and 'formula' is a self-contained formula fragment (optional)
* @param root Used to run a formula across assets, this is the ID of the root asset whose immediate children will be iterated. The formula must produce a table. (optional)
* @param reduceFormula Used when running a formula across assets, this is a formula that can further reduce the results of each asset result. The variable $result must be used to reference the data. Example of sorting the aggregated results: $result.sort('temperature')' (optional)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 1000)
* @param continuationToken An opaque token used to query for the next page of results. Only use if returned by a previous call. (optional)
* @param timeFormat (optional, default to Legacy)
* @return FormulaRunOutputV1
* @throws ApiException if fails to make API call
*/
public FormulaRunOutputV1 runFormula(String start, String end, String formula, String function, List parameters, List fragments, String root, String reduceFormula, Integer limit, String continuationToken, String timeFormat) throws ApiException {
ApiClient.ApiResponse localVarResponse = runFormulaWithHttpInfo(start, end, formula, function, parameters, fragments, root, reduceFormula, limit, continuationToken, timeFormat);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Run a Seeq Formula
*
* @param start A string representing the starting index of the data to be returned. The contents and whether or not it is required depends on the result type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (optional)
* @param end A string representing the ending index of the data to be returned. The contents and whether or not it is required depends on the result type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (optional)
* @param formula The formula to be applied. This or function is required. (optional)
* @param function The ID of the function item to be computed. This or formula is required. (optional)
* @param parameters Parameters for the formula. Each parameter should have a format of 'name=value' where 'name' is the variable identifier, without the leading $ sign, and 'value' is the ID of an item or one of the following parameter expressions that can be used to access the properties of other items that are parameters: $signal.property('name') to access any property on an item, $signal.parentProperty('name') can be used if an item is in a tree to to access any property on the parent, and $signal.ancestors(', ') to return a list of all the ancestors, separated by the specified separator. In all of the above examples 'signal' would need to be another parameter that references an item using an ID. (optional)
* @param fragments Formula fragments for unbound inputs the function. Each parameter should have a format of 'name=formula' where 'name' is the variable identifier, without the leading $ sign, and 'formula' is a self-contained formula fragment (optional)
* @param root Used to run a formula across assets, this is the ID of the root asset whose immediate children will be iterated. The formula must produce a table. (optional)
* @param reduceFormula Used when running a formula across assets, this is a formula that can further reduce the results of each asset result. The variable $result must be used to reference the data. Example of sorting the aggregated results: $result.sort('temperature')' (optional)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 1000)
* @param continuationToken An opaque token used to query for the next page of results. Only use if returned by a previous call. (optional)
* @param timeFormat (optional, default to Legacy)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse runFormulaWithHttpInfo(String start, String end, String formula, String function, List parameters, List fragments, String root, String reduceFormula, Integer limit, String continuationToken, String timeFormat) throws ApiException {
Map localVarHeaderParams = new HashMap();
return runFormulaWithHeadersAndHttpInfo(start, end, formula, function, parameters, fragments, root, reduceFormula, limit, continuationToken, timeFormat, localVarHeaderParams);
}
/**
* Run a Seeq Formula
*
* @param start A string representing the starting index of the data to be returned. The contents and whether or not it is required depends on the result type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (optional)
* @param end A string representing the ending index of the data to be returned. The contents and whether or not it is required depends on the result type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (optional)
* @param formula The formula to be applied. This or function is required. (optional)
* @param function The ID of the function item to be computed. This or formula is required. (optional)
* @param parameters Parameters for the formula. Each parameter should have a format of 'name=value' where 'name' is the variable identifier, without the leading $ sign, and 'value' is the ID of an item or one of the following parameter expressions that can be used to access the properties of other items that are parameters: $signal.property('name') to access any property on an item, $signal.parentProperty('name') can be used if an item is in a tree to to access any property on the parent, and $signal.ancestors(', ') to return a list of all the ancestors, separated by the specified separator. In all of the above examples 'signal' would need to be another parameter that references an item using an ID. (optional)
* @param fragments Formula fragments for unbound inputs the function. Each parameter should have a format of 'name=formula' where 'name' is the variable identifier, without the leading $ sign, and 'formula' is a self-contained formula fragment (optional)
* @param root Used to run a formula across assets, this is the ID of the root asset whose immediate children will be iterated. The formula must produce a table. (optional)
* @param reduceFormula Used when running a formula across assets, this is a formula that can further reduce the results of each asset result. The variable $result must be used to reference the data. Example of sorting the aggregated results: $result.sort('temperature')' (optional)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 1000)
* @param continuationToken An opaque token used to query for the next page of results. Only use if returned by a previous call. (optional)
* @param timeFormat (optional, default to Legacy)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse runFormulaWithHeadersAndHttpInfo(String start, String end, String formula, String function, List