All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.seeq.api.FormulasApi Maven / Gradle / Ivy

There is a newer version: 66.0.0-v202407310200
Show newest version
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
    * 
    * @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 {
        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();
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
                localVarHeaderParams.putAll(customHeaders);
        return getPackagesInternal(localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getPackagesInternal(List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // create path and map variables
        String localVarPath = "/formulas/packages";

        // 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
    }
    /**
    * 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 {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return importPackageInternal(body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse importPackageInternal(FormulaPackageImportInputV1 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 importPackage");
        }
        // create path and map variables
        String localVarPath = "/formulas/packages/import";

        // 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 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 {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return putFormulaDocInternal(packageName, docName, body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse putFormulaDocInternal(String packageName, String docName, FormulaDocInputV1 body, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = body;
        // verify the required path parameter 'packageName' is set
        if (packageName == null) {
            throw new ApiException(400, "Missing the required path parameter 'packageName' when calling putFormulaDoc");
        }
        // verify the required path parameter 'docName' is set
        if (docName == null) {
            throw new ApiException(400, "Missing the required path parameter 'docName' when calling putFormulaDoc");
        }
        // verify the required body parameter 'body' is set
        if (body == null) {
            throw new ApiException(400, "Missing the required body 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
        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 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 {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return putPackageInternal(packageName, body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse putPackageInternal(String packageName, FormulaPackageInputV1 body, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = body;
        // verify the required path parameter 'packageName' is set
        if (packageName == null) {
            throw new ApiException(400, "Missing the required path parameter 'packageName' when calling putPackage");
        }
        // verify the required body parameter 'body' is set
        if (body == null) {
            throw new ApiException(400, "Missing the required body parameter 'body' when calling putPackage");
        }
        // 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 = {
        "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
    }
    /**
    * Run a Seeq Formula
    * 
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 parameters, List fragments, String root, String reduceFormula, Integer limit, String continuationToken, String timeFormat, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));
        localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "parameters", parameters));
        localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "fragments", fragments));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "root", root));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "reduceFormula", reduceFormula));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "continuationToken", continuationToken));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "timeFormat", timeFormat));
                localVarHeaderParams.putAll(customHeaders);
        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse runFormulaInternal(List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // create path and map variables
        String localVarPath = "/formulas/run";

        // 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
    }
    /**
    * Run a Seeq Formula.
    * 
    * @param body Seeq Formula information (required)
    * @return FormulaRunOutputV1
    * @throws ApiException if fails to make API call
    */
    public FormulaRunOutputV1 runFormula_0(FormulaRunInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = runFormula_0WithHttpInfo(body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Run a Seeq Formula.
    * 
    * @param body Seeq Formula information (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse runFormula_0WithHttpInfo(FormulaRunInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return runFormula_0WithHeadersAndHttpInfo(body, localVarHeaderParams);
        
    }

    /**
    * Run a Seeq Formula.
    * 
    * @param body Seeq Formula 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 runFormula_0WithHeadersAndHttpInfo(FormulaRunInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return runFormula_0Internal(body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse runFormula_0Internal(FormulaRunInputV1 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 runFormula_0");
        }
        // create path and map variables
        String localVarPath = "/formulas/run";

        // 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
    }
    /**
    * Update a function
    * 
    * @param id ID of the function to update (required)
    * @param body Function information (required)
    * @return CalculatedItemOutputV1
    * @throws ApiException if fails to make API call
    */
    public CalculatedItemOutputV1 updateFunction(String id, FunctionInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = updateFunctionWithHttpInfo(id, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Update a function
    * 
    * @param id ID of the function to update (required)
    * @param body Function information (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse updateFunctionWithHttpInfo(String id, FunctionInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return updateFunctionWithHeadersAndHttpInfo(id, body, localVarHeaderParams);
        
    }

    /**
    * Update a function
    * 
    * @param id ID of the function to update (required)
    * @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 updateFunctionWithHeadersAndHttpInfo(String id, FunctionInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return updateFunctionInternal(id, body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse updateFunctionInternal(String id, FunctionInputV1 body, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = body;
        // verify the required path parameter 'id' is set
        if (id == null) {
            throw new ApiException(400, "Missing the required path parameter 'id' when calling updateFunction");
        }
        // verify the required body parameter 'body' is set
        if (body == null) {
            throw new ApiException(400, "Missing the required body parameter 'body' when calling updateFunction");
        }
        // 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 = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "api_key" };

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    // OVERLOADS START

    /**
    * Compile a Seeq Formula. This method is deprecated.
    *
    * @param formula A formula to be applied. (optional)
    * @return FormulaCompileOutputV1
    * @throws ApiException if fails to make API call
    */
    public FormulaCompileOutputV1 compileFormula(String formula) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        ApiClient.ApiResponse localVarResponse = compileFormulaInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Compile a Seeq Formula. This method is deprecated.
    * @param formula A formula to be applied. (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse compileFormulaWithHttpInfo(String formula) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        return compileFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Compile a Seeq Formula. This method is deprecated.
    *
    * @param formula A formula to be applied. (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, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarHeaderParams.putAll(customHeaders);
        return compileFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Compile a Seeq Formula. This method is deprecated.
    *
    *
    * @return FormulaCompileOutputV1
    * @throws ApiException if fails to make API call
    */
    public FormulaCompileOutputV1 compileFormula() throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        ApiClient.ApiResponse localVarResponse = compileFormulaInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Compile a Seeq Formula. This method is deprecated.
    *
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse compileFormulaWithHttpInfo() throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        return compileFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Compile a Seeq Formula. 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 compileFormulaWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        localVarHeaderParams.putAll(customHeaders);
        return compileFormulaInternal(localVarQueryParams, 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)
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional)
    * @return ItemPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public ItemPreviewListV1 getFormulaFunctions(String type, Integer offset) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));

        ApiClient.ApiResponse localVarResponse = getFormulaFunctionsInternal(localVarQueryParams, localVarHeaderParams);
        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)
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getFormulaFunctionsWithHttpInfo(String type, Integer offset) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));

        return getFormulaFunctionsInternal(localVarQueryParams, 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)
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getFormulaFunctionsWithHeadersAndHttpInfo(String type, Integer offset, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));

        localVarHeaderParams.putAll(customHeaders);
        return getFormulaFunctionsInternal(localVarQueryParams, 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)
    * @return ItemPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public ItemPreviewListV1 getFormulaFunctions(String type) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));

        ApiClient.ApiResponse localVarResponse = getFormulaFunctionsInternal(localVarQueryParams, localVarHeaderParams);
        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)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getFormulaFunctionsWithHttpInfo(String type) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));

        return getFormulaFunctionsInternal(localVarQueryParams, 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)
    * @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, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));

        localVarHeaderParams.putAll(customHeaders);
        return getFormulaFunctionsInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Get a collection of Formula Functions
    *
    *
    * @return ItemPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public ItemPreviewListV1 getFormulaFunctions() throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        ApiClient.ApiResponse localVarResponse = getFormulaFunctionsInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Get a collection of Formula Functions
    *
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getFormulaFunctionsWithHttpInfo() throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        return getFormulaFunctionsInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a collection of Formula Functions
    *
    *
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getFormulaFunctionsWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        localVarHeaderParams.putAll(customHeaders);
        return getFormulaFunctionsInternal(localVarQueryParams, 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)
    * @return ItemPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public ItemPreviewListV1 getPackages(Integer offset) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));

        ApiClient.ApiResponse localVarResponse = getPackagesInternal(localVarQueryParams, localVarHeaderParams);
        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)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getPackagesWithHttpInfo(Integer offset) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));

        return getPackagesInternal(localVarQueryParams, 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)
    * @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, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));

        localVarHeaderParams.putAll(customHeaders);
        return getPackagesInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Get a collection of packages
    *
    *
    * @return ItemPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public ItemPreviewListV1 getPackages() throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        ApiClient.ApiResponse localVarResponse = getPackagesInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Get a collection of packages
    *
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getPackagesWithHttpInfo() throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        return getPackagesInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a collection of packages
    *
    *
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getPackagesWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        localVarHeaderParams.putAll(customHeaders);
        return getPackagesInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @param continuationToken An opaque token used to query for the next page of results. Only use if returned by a previous call. (optional)
    * @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) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "root", root));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "reduceFormula", reduceFormula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "continuationToken", continuationToken));

        ApiClient.ApiResponse localVarResponse = runFormulaInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Run a Seeq Formula
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @param continuationToken An opaque token used to query for the next page of results. Only use if returned by a previous call. (optional)
    * @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) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "root", root));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "reduceFormula", reduceFormula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "continuationToken", continuationToken));

        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @param continuationToken An opaque token used to query for the next page of results. Only use if returned by a previous call. (optional)
    * @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 parameters, List fragments, String root, String reduceFormula, Integer limit, String continuationToken, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "root", root));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "reduceFormula", reduceFormula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "continuationToken", continuationToken));

        localVarHeaderParams.putAll(customHeaders);
        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @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) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "root", root));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "reduceFormula", reduceFormula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));

        ApiClient.ApiResponse localVarResponse = runFormulaInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Run a Seeq Formula
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @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) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "root", root));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "reduceFormula", reduceFormula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));

        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @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 parameters, List fragments, String root, String reduceFormula, Integer limit, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "root", root));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "reduceFormula", reduceFormula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));

        localVarHeaderParams.putAll(customHeaders);
        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @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) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "root", root));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "reduceFormula", reduceFormula));

        ApiClient.ApiResponse localVarResponse = runFormulaInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Run a Seeq Formula
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @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) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "root", root));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "reduceFormula", reduceFormula));

        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 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 parameters, List fragments, String root, String reduceFormula, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "root", root));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "reduceFormula", reduceFormula));

        localVarHeaderParams.putAll(customHeaders);
        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @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) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "root", root));

        ApiClient.ApiResponse localVarResponse = runFormulaInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Run a Seeq Formula
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @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) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "root", root));

        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 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 parameters, List fragments, String root, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "root", root));

        localVarHeaderParams.putAll(customHeaders);
        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @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) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        ApiClient.ApiResponse localVarResponse = runFormulaInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Run a Seeq Formula
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse runFormulaWithHttpInfo(String start, String end, String formula, String function, List parameters, List fragments) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 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 parameters, List fragments, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "fragments", fragments));

        localVarHeaderParams.putAll(customHeaders);
        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @return FormulaRunOutputV1
    * @throws ApiException if fails to make API call
    */
    public FormulaRunOutputV1 runFormula(String start, String end, String formula, String function, List parameters) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        ApiClient.ApiResponse localVarResponse = runFormulaInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Run a Seeq Formula
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse runFormulaWithHttpInfo(String start, String end, String formula, String function, List parameters) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 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 parameters, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "parameters", parameters));

        localVarHeaderParams.putAll(customHeaders);
        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @return FormulaRunOutputV1
    * @throws ApiException if fails to make API call
    */
    public FormulaRunOutputV1 runFormula(String start, String end, String formula, String function) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        ApiClient.ApiResponse localVarResponse = runFormulaInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Run a Seeq Formula
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse runFormulaWithHttpInfo(String start, String end, String formula, String function) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 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, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "function", function));

        localVarHeaderParams.putAll(customHeaders);
        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param formula The formula to be applied. This or function is required. (optional)
    * @return FormulaRunOutputV1
    * @throws ApiException if fails to make API call
    */
    public FormulaRunOutputV1 runFormula(String start, String end, String formula) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        ApiClient.ApiResponse localVarResponse = runFormulaInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Run a Seeq Formula
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param formula The formula to be applied. This or function is required. (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse runFormulaWithHttpInfo(String start, String end, String formula) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param formula The formula to be applied. This or function is required. (optional)
    * @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, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "formula", formula));

        localVarHeaderParams.putAll(customHeaders);
        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @return FormulaRunOutputV1
    * @throws ApiException if fails to make API call
    */
    public FormulaRunOutputV1 runFormula(String start, String end) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        ApiClient.ApiResponse localVarResponse = runFormulaInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Run a Seeq Formula
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse runFormulaWithHttpInfo(String start, String end) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @param end A string representing the ending index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @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, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));

        localVarHeaderParams.putAll(customHeaders);
        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @return FormulaRunOutputV1
    * @throws ApiException if fails to make API call
    */
    public FormulaRunOutputV1 runFormula(String start) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        ApiClient.ApiResponse localVarResponse = runFormulaInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Run a Seeq Formula
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse runFormulaWithHttpInfo(String start) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Run a Seeq Formula
    *
    * @param start A string representing the starting index of the data to be returned as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (optional)
    * @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, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));

        localVarHeaderParams.putAll(customHeaders);
        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Run a Seeq Formula
    *
    *
    * @return FormulaRunOutputV1
    * @throws ApiException if fails to make API call
    */
    public FormulaRunOutputV1 runFormula() throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        ApiClient.ApiResponse localVarResponse = runFormulaInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Run a Seeq Formula
    *
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse runFormulaWithHttpInfo() throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Run a Seeq Formula
    *
    *
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse runFormulaWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        localVarHeaderParams.putAll(customHeaders);
        return runFormulaInternal(localVarQueryParams, localVarHeaderParams);
    }

// OVERLOADS END
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy