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

com.seeq.api.DatasourcesApi 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.ConnectionsOutputV1;
import com.seeq.model.DatasourceCleanUpInputV1;
import com.seeq.model.DatasourceCleanUpOutputV1;
import com.seeq.model.DatasourceInputV1;
import com.seeq.model.DatasourceOutputListV1;
import com.seeq.model.DatasourceOutputV1;
import com.seeq.model.DatasourceStatusOutputV1;
import com.seeq.model.ItemPreviewListV1;
import com.seeq.model.JobAcceptedOutputV1;
import com.seeq.model.StatusMessageBase;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class DatasourcesApi {
    private ApiClient apiClient;
    private long retryTimeout = 5_000; // Default of 5 seconds

    public DatasourcesApi() {
        this(Configuration.getDefaultApiClient());
    }

    public DatasourcesApi(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    public void setRetryTimeout(long retryTimeout) {
        this.retryTimeout = retryTimeout;
    }

    public long getRetryTimeout() {
        return this.retryTimeout;
    }

    public ApiClient getApiClient() {
        return apiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    /**
    * Archive a datasource
    * 
    * @param id ID of the datasource to delete (required)
    * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase archiveDatasource(String id) throws ApiException {
        ApiClient.ApiResponse localVarResponse = archiveDatasourceWithHttpInfo(id);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Archive a datasource
    * 
    * @param id ID of the datasource to delete (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse archiveDatasourceWithHttpInfo(String id) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return archiveDatasourceWithHeadersAndHttpInfo(id, localVarHeaderParams);
        
    }

    /**
    * Archive a datasource
    * 
    * @param id ID of the datasource to delete (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse archiveDatasourceWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return archiveDatasourceInternal(id, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse archiveDatasourceInternal(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 archiveDatasource");
        }
        // create path and map variables
        String localVarPath = "/datasources/{id}"
          .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

        // query params
        Map localVarFormParams = new HashMap();

        
        final String[] localVarAccepts = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {
        
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

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

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    /**
    * Archive stale hosted items
    * 
    * @param id ID of the datasource to clean up (required)
    * @param body Input parameters for the Datasource clean-up process (required)
    * @return DatasourceCleanUpOutputV1
    * @throws ApiException if fails to make API call
    */
    public DatasourceCleanUpOutputV1 cleanUp(String id, DatasourceCleanUpInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = cleanUpWithHttpInfo(id, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Archive stale hosted items
    * 
    * @param id ID of the datasource to clean up (required)
    * @param body Input parameters for the Datasource clean-up process (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse cleanUpWithHttpInfo(String id, DatasourceCleanUpInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return cleanUpWithHeadersAndHttpInfo(id, body, localVarHeaderParams);
        
    }

    /**
    * Archive stale hosted items
    * 
    * @param id ID of the datasource to clean up (required)
    * @param body Input parameters for the Datasource clean-up process (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse cleanUpWithHeadersAndHttpInfo(String id, DatasourceCleanUpInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return cleanUpInternal(id, body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse cleanUpInternal(String id, DatasourceCleanUpInputV1 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 cleanUp");
        }
        // verify the required body parameter 'body' is set
        if (body == null) {
            throw new ApiException(400, "Missing the required body parameter 'body' when calling cleanUp");
        }
        // create path and map variables
        String localVarPath = "/datasources/{id}/cleanup"
          .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
    }
    /**
    * Create a datasource
    * 
    * @param body Datasource information (required)
    * @return DatasourceOutputV1
    * @throws ApiException if fails to make API call
    */
    public DatasourceOutputV1 createDatasource(DatasourceInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = createDatasourceWithHttpInfo(body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Create a datasource
    * 
    * @param body Datasource information (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse createDatasourceWithHttpInfo(DatasourceInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return createDatasourceWithHeadersAndHttpInfo(body, localVarHeaderParams);
        
    }

    /**
    * Create a datasource
    * 
    * @param body Datasource 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 createDatasourceWithHeadersAndHttpInfo(DatasourceInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return createDatasourceInternal(body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse createDatasourceInternal(DatasourceInputV1 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 createDatasource");
        }
        // create path and map variables
        String localVarPath = "/datasources";

        // 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
    }
    /**
    * Disable all connections associated with a datasource
    * 
    * @param id ID of the datasource (required)
    * @return ConnectionsOutputV1
    * @throws ApiException if fails to make API call
    */
    public ConnectionsOutputV1 disableConnections(String id) throws ApiException {
        ApiClient.ApiResponse localVarResponse = disableConnectionsWithHttpInfo(id);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Disable all connections associated with a datasource
    * 
    * @param id ID of the datasource (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse disableConnectionsWithHttpInfo(String id) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return disableConnectionsWithHeadersAndHttpInfo(id, localVarHeaderParams);
        
    }

    /**
    * Disable all connections associated with a datasource
    * 
    * @param id ID of the datasource (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse disableConnectionsWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return disableConnectionsInternal(id, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse disableConnectionsInternal(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 disableConnections");
        }
        // create path and map variables
        String localVarPath = "/datasources/{id}/disable-connections"
          .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

        // query params
        Map localVarFormParams = new HashMap();

        
        final String[] localVarAccepts = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

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

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    /**
    * Archive a datasource and all items hosted by the datasource
    * 
    * @param id ID of the datasource to archive (required)
    * @return JobAcceptedOutputV1
    * @throws ApiException if fails to make API call
    */
    public JobAcceptedOutputV1 fullyArchiveDatasource(String id) throws ApiException {
        ApiClient.ApiResponse localVarResponse = fullyArchiveDatasourceWithHttpInfo(id);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Archive a datasource and all items hosted by the datasource
    * 
    * @param id ID of the datasource to archive (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse fullyArchiveDatasourceWithHttpInfo(String id) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return fullyArchiveDatasourceWithHeadersAndHttpInfo(id, localVarHeaderParams);
        
    }

    /**
    * Archive a datasource and all items hosted by the datasource
    * 
    * @param id ID of the datasource to archive (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse fullyArchiveDatasourceWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return fullyArchiveDatasourceInternal(id, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse fullyArchiveDatasourceInternal(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 fullyArchiveDatasource");
        }
        // create path and map variables
        String localVarPath = "/datasources/{id}/archive"
          .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

        // query params
        Map localVarFormParams = new HashMap();

        
        final String[] localVarAccepts = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {
        
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

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

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    /**
    * Get a Datasource
    * 
    * @param id ID of the datasource to retrieve (required)
    * @return DatasourceOutputV1
    * @throws ApiException if fails to make API call
    */
    public DatasourceOutputV1 getDatasource(String id) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getDatasourceWithHttpInfo(id);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get a Datasource
    * 
    * @param id ID of the datasource to retrieve (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getDatasourceWithHttpInfo(String id) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getDatasourceWithHeadersAndHttpInfo(id, localVarHeaderParams);
        
    }

    /**
    * Get a Datasource
    * 
    * @param id ID of the datasource to retrieve (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getDatasourceWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return getDatasourceInternal(id, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getDatasourceInternal(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 getDatasource");
        }
        // create path and map variables
        String localVarPath = "/datasources/{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 collection of datasources
    * 
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @param datasourceId The datasource ID, an identifier that distinguishes a datasource from others of the same datasource class, 'timeseries/salt' for example, not specifying this parameter will return datasources of any ID (optional)
    * @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 includeArchived Whether archived datasources should be included (optional, default to false)
    * @return DatasourceOutputListV1
    * @throws ApiException if fails to make API call
    */
    public DatasourceOutputListV1 getDatasources(String datasourceClass, String datasourceId, Integer offset, Integer limit, Boolean includeArchived) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getDatasourcesWithHttpInfo(datasourceClass, datasourceId, offset, limit, includeArchived);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get a collection of datasources
    * 
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @param datasourceId The datasource ID, an identifier that distinguishes a datasource from others of the same datasource class, 'timeseries/salt' for example, not specifying this parameter will return datasources of any ID (optional)
    * @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 includeArchived Whether archived datasources should be included (optional, default to false)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getDatasourcesWithHttpInfo(String datasourceClass, String datasourceId, Integer offset, Integer limit, Boolean includeArchived) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getDatasourcesWithHeadersAndHttpInfo(datasourceClass, datasourceId, offset, limit, includeArchived, localVarHeaderParams);
        
    }

    /**
    * Get a collection of datasources
    * 
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @param datasourceId The datasource ID, an identifier that distinguishes a datasource from others of the same datasource class, 'timeseries/salt' for example, not specifying this parameter will return datasources of any ID (optional)
    * @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 includeArchived Whether archived datasources should be included (optional, default to false)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getDatasourcesWithHeadersAndHttpInfo(String datasourceClass, String datasourceId, Integer offset, Integer limit, Boolean includeArchived, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceClass", datasourceClass));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceId", datasourceId));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "includeArchived", includeArchived));
                localVarHeaderParams.putAll(customHeaders);
        return getDatasourcesInternal(localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getDatasourcesInternal(List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // create path and map variables
        String localVarPath = "/datasources";

        // 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 items hosted by this datasource
    * 
    * @param id ID of the datasource (required)
    * @param dataId The dataId for a specific hosted item (optional)
    * @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 getItemsHostedByDatasource(String id, String dataId, Integer offset, Integer limit) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getItemsHostedByDatasourceWithHttpInfo(id, dataId, offset, limit);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get a list of the items hosted by this datasource
    * 
    * @param id ID of the datasource (required)
    * @param dataId The dataId for a specific hosted item (optional)
    * @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 getItemsHostedByDatasourceWithHttpInfo(String id, String dataId, Integer offset, Integer limit) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getItemsHostedByDatasourceWithHeadersAndHttpInfo(id, dataId, offset, limit, localVarHeaderParams);
        
    }

    /**
    * Get a list of the items hosted by this datasource
    * 
    * @param id ID of the datasource (required)
    * @param dataId The dataId for a specific hosted item (optional)
    * @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 getItemsHostedByDatasourceWithHeadersAndHttpInfo(String id, String dataId, Integer offset, Integer limit, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "dataId", dataId));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
                localVarHeaderParams.putAll(customHeaders);
        return getItemsHostedByDatasourceInternal(id, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getItemsHostedByDatasourceInternal(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 getItemsHostedByDatasource");
        }
        // create path and map variables
        String localVarPath = "/datasources/{id}/items"
          .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 statistics describing the health of remote datasources
    * 
    * @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 DatasourceStatusOutputV1
    * @throws ApiException if fails to make API call
    */
    public DatasourceStatusOutputV1 getStatus(Integer offset, Integer limit) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getStatusWithHttpInfo(offset, limit);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get statistics describing the health of remote datasources
    * 
    * @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 getStatusWithHttpInfo(Integer offset, Integer limit) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getStatusWithHeadersAndHttpInfo(offset, limit, localVarHeaderParams);
        
    }

    /**
    * Get statistics describing the health of remote datasources
    * 
    * @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 getStatusWithHeadersAndHttpInfo(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 getStatusInternal(localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getStatusInternal(List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // create path and map variables
        String localVarPath = "/datasources/status";

        // 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
    }
    /**
    * Recount item totals for a datasource. Do not run while datasource is indexing
    * 
    * @param id ID of the datasource to recount (required)
    * @return DatasourceOutputV1
    * @throws ApiException if fails to make API call
    */
    public DatasourceOutputV1 recount(String id) throws ApiException {
        ApiClient.ApiResponse localVarResponse = recountWithHttpInfo(id);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Recount item totals for a datasource. Do not run while datasource is indexing
    * 
    * @param id ID of the datasource to recount (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse recountWithHttpInfo(String id) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return recountWithHeadersAndHttpInfo(id, localVarHeaderParams);
        
    }

    /**
    * Recount item totals for a datasource. Do not run while datasource is indexing
    * 
    * @param id ID of the datasource to recount (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse recountWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return recountInternal(id, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse recountInternal(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 recount");
        }
        // create path and map variables
        String localVarPath = "/datasources/{id}/recount"
          .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

    /**
    * Get a collection of datasources
    *
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @param datasourceId The datasource ID, an identifier that distinguishes a datasource from others of the same datasource class, 'timeseries/salt' for example, not specifying this parameter will return datasources of any ID (optional)
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional)
    * @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional)
    * @return DatasourceOutputListV1
    * @throws ApiException if fails to make API call
    */
    public DatasourceOutputListV1 getDatasources(String datasourceClass, String datasourceId, Integer offset, Integer limit) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

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

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

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

    /**
    * Get a collection of datasources
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @param datasourceId The datasource ID, an identifier that distinguishes a datasource from others of the same datasource class, 'timeseries/salt' for example, not specifying this parameter will return datasources of any ID (optional)
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (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 getDatasourcesWithHttpInfo(String datasourceClass, String datasourceId, Integer offset, Integer limit) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

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

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

        return getDatasourcesInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a collection of datasources
    *
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @param datasourceId The datasource ID, an identifier that distinguishes a datasource from others of the same datasource class, 'timeseries/salt' for example, not specifying this parameter will return datasources of any ID (optional)
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (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 getDatasourcesWithHeadersAndHttpInfo(String datasourceClass, String datasourceId, Integer offset, Integer limit, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

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

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

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


    /**
    * Get a collection of datasources
    *
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @param datasourceId The datasource ID, an identifier that distinguishes a datasource from others of the same datasource class, 'timeseries/salt' for example, not specifying this parameter will return datasources of any ID (optional)
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional)
    * @return DatasourceOutputListV1
    * @throws ApiException if fails to make API call
    */
    public DatasourceOutputListV1 getDatasources(String datasourceClass, String datasourceId, Integer offset) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

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

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

    /**
    * Get a collection of datasources
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @param datasourceId The datasource ID, an identifier that distinguishes a datasource from others of the same datasource class, 'timeseries/salt' for example, not specifying this parameter will return datasources of any ID (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 getDatasourcesWithHttpInfo(String datasourceClass, String datasourceId, Integer offset) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

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

        return getDatasourcesInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a collection of datasources
    *
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @param datasourceId The datasource ID, an identifier that distinguishes a datasource from others of the same datasource class, 'timeseries/salt' for example, not specifying this parameter will return datasources of any ID (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 getDatasourcesWithHeadersAndHttpInfo(String datasourceClass, String datasourceId, Integer offset, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

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

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


    /**
    * Get a collection of datasources
    *
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @param datasourceId The datasource ID, an identifier that distinguishes a datasource from others of the same datasource class, 'timeseries/salt' for example, not specifying this parameter will return datasources of any ID (optional)
    * @return DatasourceOutputListV1
    * @throws ApiException if fails to make API call
    */
    public DatasourceOutputListV1 getDatasources(String datasourceClass, String datasourceId) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

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

    /**
    * Get a collection of datasources
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @param datasourceId The datasource ID, an identifier that distinguishes a datasource from others of the same datasource class, 'timeseries/salt' for example, not specifying this parameter will return datasources of any ID (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getDatasourcesWithHttpInfo(String datasourceClass, String datasourceId) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

        return getDatasourcesInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a collection of datasources
    *
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @param datasourceId The datasource ID, an identifier that distinguishes a datasource from others of the same datasource class, 'timeseries/salt' for example, not specifying this parameter will return datasources of any 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 getDatasourcesWithHeadersAndHttpInfo(String datasourceClass, String datasourceId, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

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


    /**
    * Get a collection of datasources
    *
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @return DatasourceOutputListV1
    * @throws ApiException if fails to make API call
    */
    public DatasourceOutputListV1 getDatasources(String datasourceClass) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

    /**
    * Get a collection of datasources
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getDatasourcesWithHttpInfo(String datasourceClass) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

        return getDatasourcesInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a collection of datasources
    *
    * @param datasourceClass The datasource class, the name of the underlying source, 'CSV File' for example, not specifying this parameter will return datasources of any class (optional)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getDatasourcesWithHeadersAndHttpInfo(String datasourceClass, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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


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


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

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


        return getDatasourcesInternal(localVarQueryParams, localVarHeaderParams);
    }

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


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


    /**
    * Get statistics describing the health of remote datasources
    *
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional)
    * @return DatasourceStatusOutputV1
    * @throws ApiException if fails to make API call
    */
    public DatasourceStatusOutputV1 getStatus(Integer offset) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

    /**
    * Get statistics describing the health of remote datasources
    * @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 getStatusWithHttpInfo(Integer offset) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

        return getStatusInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get statistics describing the health of remote datasources
    *
    * @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 getStatusWithHeadersAndHttpInfo(Integer offset, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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


    /**
    * Get statistics describing the health of remote datasources
    *
    *
    * @return DatasourceStatusOutputV1
    * @throws ApiException if fails to make API call
    */
    public DatasourceStatusOutputV1 getStatus() throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


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

    /**
    * Get statistics describing the health of remote datasources
    *
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getStatusWithHttpInfo() throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        return getStatusInternal(localVarQueryParams, localVarHeaderParams);
    }

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


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


    /**
    * Get a list of the items hosted by this datasource
    *
    * @param id ID of the datasource (required)
    * @param dataId The dataId for a specific hosted item (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 getItemsHostedByDatasource(String id, String dataId, Integer offset) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

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

    /**
    * Get a list of the items hosted by this datasource
    * @param id ID of the datasource (required)
    * @param dataId The dataId for a specific hosted item (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 getItemsHostedByDatasourceWithHttpInfo(String id, String dataId, Integer offset) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

        return getItemsHostedByDatasourceInternal(id, localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a list of the items hosted by this datasource
    *
    * @param id ID of the datasource (required)
    * @param dataId The dataId for a specific hosted item (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 getItemsHostedByDatasourceWithHeadersAndHttpInfo(String id, String dataId, Integer offset, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

        localVarHeaderParams.putAll(customHeaders);
        return getItemsHostedByDatasourceInternal(id, localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Get a list of the items hosted by this datasource
    *
    * @param id ID of the datasource (required)
    * @param dataId The dataId for a specific hosted item (optional)
    * @return ItemPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public ItemPreviewListV1 getItemsHostedByDatasource(String id, String dataId) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

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

    /**
    * Get a list of the items hosted by this datasource
    * @param id ID of the datasource (required)
    * @param dataId The dataId for a specific hosted item (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getItemsHostedByDatasourceWithHttpInfo(String id, String dataId) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

        return getItemsHostedByDatasourceInternal(id, localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a list of the items hosted by this datasource
    *
    * @param id ID of the datasource (required)
    * @param dataId The dataId for a specific hosted item (optional)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getItemsHostedByDatasourceWithHeadersAndHttpInfo(String id, String dataId, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

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

        localVarHeaderParams.putAll(customHeaders);
        return getItemsHostedByDatasourceInternal(id, localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Get a list of the items hosted by this datasource
    *
    * @param id ID of the datasource (required)
    * @return ItemPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public ItemPreviewListV1 getItemsHostedByDatasource(String id) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


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

    /**
    * Get a list of the items hosted by this datasource
    * @param id ID of the datasource (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getItemsHostedByDatasourceWithHttpInfo(String id) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        return getItemsHostedByDatasourceInternal(id, localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a list of the items hosted by this datasource
    *
    * @param id ID of the datasource (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getItemsHostedByDatasourceWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        localVarHeaderParams.putAll(customHeaders);
        return getItemsHostedByDatasourceInternal(id, localVarQueryParams, localVarHeaderParams);
    }

// OVERLOADS END
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy