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

com.seeq.api.AgentsApi 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.AgentInputV1;
import com.seeq.model.AgentOutputV1;
import com.seeq.model.AgentStatusV1;
import com.seeq.model.ConfiguredDirectivesOutputV1;
import com.seeq.model.ConnectionInputV1;
import com.seeq.model.ConnectionOutputV1;
import com.seeq.model.ConnectionsOutputV1;
import com.seeq.model.ConnectorInputV1;
import com.seeq.model.ConnectorOutputV1;
import com.seeq.model.ConnectorsOutputV1;
import com.seeq.model.DatasourcesStatusOutputV1;
import com.seeq.model.DirectiveInputV1;
import com.seeq.model.IndexingParametersInputV1;
import com.seeq.model.PreProvisionInputV1;
import com.seeq.model.PreProvisionOutputV1;
import com.seeq.model.ProvisionInputV1;
import com.seeq.model.RemoteAgentDirectivesOutputV1;
import com.seeq.model.RemoteAgentStatusInputV1;
import com.seeq.model.RemoteAgentStatusOutputV1;
import com.seeq.model.StatusMessageBase;
import com.seeq.model.StoreSecretInputV1;


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

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

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

    public AgentsApi(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 an agent
    * 
    * @param agentName The name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase archiveAgent(String agentName) throws ApiException {
        ApiClient.ApiResponse localVarResponse = archiveAgentWithHttpInfo(agentName);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Archive an agent
    * 
    * @param agentName The name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse archiveAgentWithHttpInfo(String agentName) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return archiveAgentWithHeadersAndHttpInfo(agentName, localVarHeaderParams);
        
    }

    /**
    * Archive an agent
    * 
    * @param agentName The name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse archiveAgentWithHeadersAndHttpInfo(String agentName, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return archiveAgentInternal(agentName, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse archiveAgentInternal(String agentName, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling archiveAgent");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.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 a connection
    * 
    * @param agentName The name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName The name of the connector. The connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @param connectionName The name of the connection. The connection name can be obtained from the 'Connections' array in the response of 'GET /agents/{agentName}/connectors/{connectorName}' (required)
    * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase archiveConnection(String agentName, String connectorName, String connectionName) throws ApiException {
        ApiClient.ApiResponse localVarResponse = archiveConnectionWithHttpInfo(agentName, connectorName, connectionName);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Archive a connection
    * 
    * @param agentName The name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName The name of the connector. The connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @param connectionName The name of the connection. The connection name can be obtained from the 'Connections' array in the response of 'GET /agents/{agentName}/connectors/{connectorName}' (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse archiveConnectionWithHttpInfo(String agentName, String connectorName, String connectionName) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return archiveConnectionWithHeadersAndHttpInfo(agentName, connectorName, connectionName, localVarHeaderParams);
        
    }

    /**
    * Archive a connection
    * 
    * @param agentName The name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName The name of the connector. The connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @param connectionName The name of the connection. The connection name can be obtained from the 'Connections' array in the response of 'GET /agents/{agentName}/connectors/{connectorName}' (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse archiveConnectionWithHeadersAndHttpInfo(String agentName, String connectorName, String connectionName, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return archiveConnectionInternal(agentName, connectorName, connectionName, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse archiveConnectionInternal(String agentName, String connectorName, String connectionName, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling archiveConnection");
        }
        // verify the required path parameter 'connectorName' is set
        if (connectorName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectorName' when calling archiveConnection");
        }
        // verify the required path parameter 'connectionName' is set
        if (connectionName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectionName' when calling archiveConnection");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}/connectors/{connectorName}/connections/{connectionName}"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()))
          .replaceAll("\\{" + "connectorName" + "\\}", apiClient.escapeString(connectorName.toString()))
          .replaceAll("\\{" + "connectionName" + "\\}", apiClient.escapeString(connectionName.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 a connector
    * 
    * @param agentName The name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName The name of the connector. The connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase archiveConnector(String agentName, String connectorName) throws ApiException {
        ApiClient.ApiResponse localVarResponse = archiveConnectorWithHttpInfo(agentName, connectorName);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Archive a connector
    * 
    * @param agentName The name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName The name of the connector. The connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse archiveConnectorWithHttpInfo(String agentName, String connectorName) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return archiveConnectorWithHeadersAndHttpInfo(agentName, connectorName, localVarHeaderParams);
        
    }

    /**
    * Archive a connector
    * 
    * @param agentName The name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName The name of the connector. The connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse archiveConnectorWithHeadersAndHttpInfo(String agentName, String connectorName, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return archiveConnectorInternal(agentName, connectorName, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse archiveConnectorInternal(String agentName, String connectorName, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling archiveConnector");
        }
        // verify the required path parameter 'connectorName' is set
        if (connectorName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectorName' when calling archiveConnector");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}/connectors/{connectorName}"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()))
          .replaceAll("\\{" + "connectorName" + "\\}", apiClient.escapeString(connectorName.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 available installers on this Seeq
    * 
    * @return ConfiguredDirectivesOutputV1
    * @throws ApiException if fails to make API call
    */
    public ConfiguredDirectivesOutputV1 configuredDirectives() throws ApiException {
        ApiClient.ApiResponse localVarResponse = configuredDirectivesWithHttpInfo();
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get a list of available installers on this Seeq
    * 
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse configuredDirectivesWithHttpInfo() throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return configuredDirectivesWithHeadersAndHttpInfo(localVarHeaderParams);
        
    }

    /**
    * Get a list of available installers on this Seeq
    * 
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse configuredDirectivesWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return configuredDirectivesInternal(localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse configuredDirectivesInternal(List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // create path and map variables
        String localVarPath = "/agents/remote-updates/configuredDirectives";

        // 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 an agent
    * 
    * @param agentName Name of the agent to create or update. For update, the name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param body Agent information (required)
    * @return AgentOutputV1
    * @throws ApiException if fails to make API call
    */
    public AgentOutputV1 createOrUpdateAgent(String agentName, AgentInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = createOrUpdateAgentWithHttpInfo(agentName, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Create or update an agent
    * 
    * @param agentName Name of the agent to create or update. For update, the name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param body Agent information (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse createOrUpdateAgentWithHttpInfo(String agentName, AgentInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return createOrUpdateAgentWithHeadersAndHttpInfo(agentName, body, localVarHeaderParams);
        
    }

    /**
    * Create or update an agent
    * 
    * @param agentName Name of the agent to create or update. For update, the name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param body Agent 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 createOrUpdateAgentWithHeadersAndHttpInfo(String agentName, AgentInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return createOrUpdateAgentInternal(agentName, body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse createOrUpdateAgentInternal(String agentName, AgentInputV1 body, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = body;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling createOrUpdateAgent");
        }
        // verify the required body parameter 'body' is set
        if (body == null) {
            throw new ApiException(400, "Missing the required body parameter 'body' when calling createOrUpdateAgent");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.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 connection
    * 
    * @param agentName Name of the agent where the connector resides. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector where the connection resides. The connector name can be obtained from the result of 'GET /agents/{agentName}/connectors' (required)
    * @param connectionName Name of the connection to create or update. For update, the connection name can be obtained from the result of 'GET /agents/{agentName}/connectors/{connectorName}/connections' (required)
    * @param body Connection information (required)
    * @return ConnectionOutputV1
    * @throws ApiException if fails to make API call
    */
    public ConnectionOutputV1 createOrUpdateConnection(String agentName, String connectorName, String connectionName, ConnectionInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = createOrUpdateConnectionWithHttpInfo(agentName, connectorName, connectionName, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Create or update a connection
    * 
    * @param agentName Name of the agent where the connector resides. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector where the connection resides. The connector name can be obtained from the result of 'GET /agents/{agentName}/connectors' (required)
    * @param connectionName Name of the connection to create or update. For update, the connection name can be obtained from the result of 'GET /agents/{agentName}/connectors/{connectorName}/connections' (required)
    * @param body Connection information (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse createOrUpdateConnectionWithHttpInfo(String agentName, String connectorName, String connectionName, ConnectionInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return createOrUpdateConnectionWithHeadersAndHttpInfo(agentName, connectorName, connectionName, body, localVarHeaderParams);
        
    }

    /**
    * Create or update a connection
    * 
    * @param agentName Name of the agent where the connector resides. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector where the connection resides. The connector name can be obtained from the result of 'GET /agents/{agentName}/connectors' (required)
    * @param connectionName Name of the connection to create or update. For update, the connection name can be obtained from the result of 'GET /agents/{agentName}/connectors/{connectorName}/connections' (required)
    * @param body Connection 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 createOrUpdateConnectionWithHeadersAndHttpInfo(String agentName, String connectorName, String connectionName, ConnectionInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return createOrUpdateConnectionInternal(agentName, connectorName, connectionName, body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse createOrUpdateConnectionInternal(String agentName, String connectorName, String connectionName, ConnectionInputV1 body, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = body;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling createOrUpdateConnection");
        }
        // verify the required path parameter 'connectorName' is set
        if (connectorName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectorName' when calling createOrUpdateConnection");
        }
        // verify the required path parameter 'connectionName' is set
        if (connectionName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectionName' when calling createOrUpdateConnection");
        }
        // verify the required body parameter 'body' is set
        if (body == null) {
            throw new ApiException(400, "Missing the required body parameter 'body' when calling createOrUpdateConnection");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}/connectors/{connectorName}/connections/{connectionName}"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()))
          .replaceAll("\\{" + "connectorName" + "\\}", apiClient.escapeString(connectorName.toString()))
          .replaceAll("\\{" + "connectionName" + "\\}", apiClient.escapeString(connectionName.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 connector
    * 
    * @param agentName Name of the agent where connector resides. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector to create or update. For update, the connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @param body Connector information (required)
    * @return ConnectorOutputV1
    * @throws ApiException if fails to make API call
    */
    public ConnectorOutputV1 createOrUpdateConnector(String agentName, String connectorName, ConnectorInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = createOrUpdateConnectorWithHttpInfo(agentName, connectorName, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Create or update a connector
    * 
    * @param agentName Name of the agent where connector resides. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector to create or update. For update, the connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @param body Connector information (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse createOrUpdateConnectorWithHttpInfo(String agentName, String connectorName, ConnectorInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return createOrUpdateConnectorWithHeadersAndHttpInfo(agentName, connectorName, body, localVarHeaderParams);
        
    }

    /**
    * Create or update a connector
    * 
    * @param agentName Name of the agent where connector resides. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector to create or update. For update, the connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @param body Connector 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 createOrUpdateConnectorWithHeadersAndHttpInfo(String agentName, String connectorName, ConnectorInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return createOrUpdateConnectorInternal(agentName, connectorName, body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse createOrUpdateConnectorInternal(String agentName, String connectorName, ConnectorInputV1 body, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = body;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling createOrUpdateConnector");
        }
        // verify the required path parameter 'connectorName' is set
        if (connectorName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectorName' when calling createOrUpdateConnector");
        }
        // verify the required body parameter 'body' is set
        if (body == null) {
            throw new ApiException(400, "Missing the required body parameter 'body' when calling createOrUpdateConnector");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}/connectors/{connectorName}"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()))
          .replaceAll("\\{" + "connectorName" + "\\}", apiClient.escapeString(connectorName.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
    }
    /**
    * Delete a stored secret for a connection
    * 
    * @param agentName Name of the agent where the connector resides. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector where the connection resides. The connector name can be obtained from the result of 'GET /agents/{agentName}/connectors' (required)
    * @param connectionName Name of the connection from which to delete secret. The connection name can be obtained from the result of 'GET /agents/{agentName}/connectors/{connectorName}/connections' (required)
    * @param secret Name of the secret to delete (required)
    * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase deleteSecretForConnection(String agentName, String connectorName, String connectionName, String secret) throws ApiException {
        ApiClient.ApiResponse localVarResponse = deleteSecretForConnectionWithHttpInfo(agentName, connectorName, connectionName, secret);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Delete a stored secret for a connection
    * 
    * @param agentName Name of the agent where the connector resides. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector where the connection resides. The connector name can be obtained from the result of 'GET /agents/{agentName}/connectors' (required)
    * @param connectionName Name of the connection from which to delete secret. The connection name can be obtained from the result of 'GET /agents/{agentName}/connectors/{connectorName}/connections' (required)
    * @param secret Name of the secret to delete (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse deleteSecretForConnectionWithHttpInfo(String agentName, String connectorName, String connectionName, String secret) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return deleteSecretForConnectionWithHeadersAndHttpInfo(agentName, connectorName, connectionName, secret, localVarHeaderParams);
        
    }

    /**
    * Delete a stored secret for a connection
    * 
    * @param agentName Name of the agent where the connector resides. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector where the connection resides. The connector name can be obtained from the result of 'GET /agents/{agentName}/connectors' (required)
    * @param connectionName Name of the connection from which to delete secret. The connection name can be obtained from the result of 'GET /agents/{agentName}/connectors/{connectorName}/connections' (required)
    * @param secret Name of the secret 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 deleteSecretForConnectionWithHeadersAndHttpInfo(String agentName, String connectorName, String connectionName, String secret, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return deleteSecretForConnectionInternal(agentName, connectorName, connectionName, secret, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse deleteSecretForConnectionInternal(String agentName, String connectorName, String connectionName, String secret, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling deleteSecretForConnection");
        }
        // verify the required path parameter 'connectorName' is set
        if (connectorName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectorName' when calling deleteSecretForConnection");
        }
        // verify the required path parameter 'connectionName' is set
        if (connectionName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectionName' when calling deleteSecretForConnection");
        }
        // verify the required path parameter 'secret' is set
        if (secret == null) {
            throw new ApiException(400, "Missing the required path parameter 'secret' when calling deleteSecretForConnection");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}/connectors/{connectorName}/connections/{connectionName}/secrets/{secret}"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()))
          .replaceAll("\\{" + "connectorName" + "\\}", apiClient.escapeString(connectorName.toString()))
          .replaceAll("\\{" + "connectionName" + "\\}", apiClient.escapeString(connectionName.toString()))
          .replaceAll("\\{" + "secret" + "\\}", apiClient.escapeString(secret.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 an agent and its configuration
    * 
    * @param agentName Name of the agent to get. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @return AgentOutputV1
    * @throws ApiException if fails to make API call
    */
    public AgentOutputV1 getAgent(String agentName) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getAgentWithHttpInfo(agentName);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get an agent and its configuration
    * 
    * @param agentName Name of the agent to get. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getAgentWithHttpInfo(String agentName) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getAgentWithHeadersAndHttpInfo(agentName, localVarHeaderParams);
        
    }

    /**
    * Get an agent and its configuration
    * 
    * @param agentName Name of the agent to get. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getAgentWithHeadersAndHttpInfo(String agentName, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return getAgentInternal(agentName, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getAgentInternal(String agentName, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling getAgent");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.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 the status of every connection in every agent that the user has access to
    * 
    * @return List<AgentStatusV1>
    * @throws ApiException if fails to make API call
    */
    public List getAgentStatus() throws ApiException {
        ApiClient.ApiResponse> localVarResponse = getAgentStatusWithHttpInfo();
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get the status of every connection in every agent that the user has access to
    * 
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse> getAgentStatusWithHttpInfo() throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getAgentStatusWithHeadersAndHttpInfo(localVarHeaderParams);
        
    }

    /**
    * Get the status of every connection in every agent that the user has access to
    * 
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse> getAgentStatusWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return getAgentStatusInternal(localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse> getAgentStatusInternal(List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // create path and map variables
        String localVarPath = "/agents/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
    }
    /**
    * Get a connection and its configuration
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector to get. The connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @param connectionName Name of the connection to get. The connection name can be obtained from the 'Connections' array in the response of 'GET /agents/{agentName}/connectors/{connectorName}' (required)
    * @return ConnectionOutputV1
    * @throws ApiException if fails to make API call
    */
    public ConnectionOutputV1 getConnection(String agentName, String connectorName, String connectionName) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getConnectionWithHttpInfo(agentName, connectorName, connectionName);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get a connection and its configuration
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector to get. The connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @param connectionName Name of the connection to get. The connection name can be obtained from the 'Connections' array in the response of 'GET /agents/{agentName}/connectors/{connectorName}' (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getConnectionWithHttpInfo(String agentName, String connectorName, String connectionName) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getConnectionWithHeadersAndHttpInfo(agentName, connectorName, connectionName, localVarHeaderParams);
        
    }

    /**
    * Get a connection and its configuration
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector to get. The connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @param connectionName Name of the connection to get. The connection name can be obtained from the 'Connections' array in the response of 'GET /agents/{agentName}/connectors/{connectorName}' (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getConnectionWithHeadersAndHttpInfo(String agentName, String connectorName, String connectionName, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return getConnectionInternal(agentName, connectorName, connectionName, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getConnectionInternal(String agentName, String connectorName, String connectionName, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling getConnection");
        }
        // verify the required path parameter 'connectorName' is set
        if (connectorName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectorName' when calling getConnection");
        }
        // verify the required path parameter 'connectionName' is set
        if (connectionName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectionName' when calling getConnection");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}/connectors/{connectorName}/connections/{connectionName}"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()))
          .replaceAll("\\{" + "connectorName" + "\\}", apiClient.escapeString(connectorName.toString()))
          .replaceAll("\\{" + "connectionName" + "\\}", apiClient.escapeString(connectionName.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
    }
    /**
    * Gets the configuration of all connections of a connector
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status/{detailsLevel} (required)
    * @param connectorName Name of the connector. The connector name can be obtained from the 'Connector' array in the response of 'GET /agents/{agentName}' (required)
    * @return ConnectionsOutputV1
    * @throws ApiException if fails to make API call
    */
    public ConnectionsOutputV1 getConnections(String agentName, String connectorName) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getConnectionsWithHttpInfo(agentName, connectorName);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Gets the configuration of all connections of a connector
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status/{detailsLevel} (required)
    * @param connectorName Name of the connector. The connector name can be obtained from the 'Connector' array in the response of 'GET /agents/{agentName}' (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getConnectionsWithHttpInfo(String agentName, String connectorName) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getConnectionsWithHeadersAndHttpInfo(agentName, connectorName, localVarHeaderParams);
        
    }

    /**
    * Gets the configuration of all connections of a connector
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status/{detailsLevel} (required)
    * @param connectorName Name of the connector. The connector name can be obtained from the 'Connector' array in the response of 'GET /agents/{agentName}' (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getConnectionsWithHeadersAndHttpInfo(String agentName, String connectorName, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return getConnectionsInternal(agentName, connectorName, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getConnectionsInternal(String agentName, String connectorName, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling getConnections");
        }
        // verify the required path parameter 'connectorName' is set
        if (connectorName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectorName' when calling getConnections");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}/connectors/{connectorName}/connections"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()))
          .replaceAll("\\{" + "connectorName" + "\\}", apiClient.escapeString(connectorName.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 connector and its configuration
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector to get. The connector name can be obtained from the 'Connectors' array in the response of 'GET / agents / {agentName}' (required)
    * @return ConnectorOutputV1
    * @throws ApiException if fails to make API call
    */
    public ConnectorOutputV1 getConnector(String agentName, String connectorName) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getConnectorWithHttpInfo(agentName, connectorName);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get a connector and its configuration
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector to get. The connector name can be obtained from the 'Connectors' array in the response of 'GET / agents / {agentName}' (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getConnectorWithHttpInfo(String agentName, String connectorName) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getConnectorWithHeadersAndHttpInfo(agentName, connectorName, localVarHeaderParams);
        
    }

    /**
    * Get a connector and its configuration
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector to get. The connector name can be obtained from the 'Connectors' array in the response of 'GET / agents / {agentName}' (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getConnectorWithHeadersAndHttpInfo(String agentName, String connectorName, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return getConnectorInternal(agentName, connectorName, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getConnectorInternal(String agentName, String connectorName, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling getConnector");
        }
        // verify the required path parameter 'connectorName' is set
        if (connectorName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectorName' when calling getConnector");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}/connectors/{connectorName}"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()))
          .replaceAll("\\{" + "connectorName" + "\\}", apiClient.escapeString(connectorName.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
    }
    /**
    * Gets the configuration of all connectors hosted by an agent
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @return ConnectorsOutputV1
    * @throws ApiException if fails to make API call
    */
    public ConnectorsOutputV1 getConnectors(String agentName) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getConnectorsWithHttpInfo(agentName);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Gets the configuration of all connectors hosted by an agent
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getConnectorsWithHttpInfo(String agentName) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getConnectorsWithHeadersAndHttpInfo(agentName, localVarHeaderParams);
        
    }

    /**
    * Gets the configuration of all connectors hosted by an agent
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getConnectorsWithHeadersAndHttpInfo(String agentName, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return getConnectorsInternal(agentName, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getConnectorsInternal(String agentName, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling getConnectors");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}/connectors"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.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 the status of every connection for every datasource that the user has access to
    * 
    * @return DatasourcesStatusOutputV1
    * @throws ApiException if fails to make API call
    */
    public DatasourcesStatusOutputV1 getDatasourcesStatus() throws ApiException {
        ApiClient.ApiResponse localVarResponse = getDatasourcesStatusWithHttpInfo();
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get the status of every connection for every datasource that the user has access to
    * 
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getDatasourcesStatusWithHttpInfo() throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getDatasourcesStatusWithHeadersAndHttpInfo(localVarHeaderParams);
        
    }

    /**
    * Get the status of every connection for every datasource that the user has access to
    * 
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getDatasourcesStatusWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return getDatasourcesStatusInternal(localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getDatasourcesStatusInternal(List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // create path and map variables
        String localVarPath = "/agents/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
    }
    /**
    * Get update directives for the remote agent
    * 
    * @param machineName Name of the remote agent machine to get update directives (required)
    * @return RemoteAgentDirectivesOutputV1
    * @throws ApiException if fails to make API call
    */
    public RemoteAgentDirectivesOutputV1 getRemoteUpdateDirectives(String machineName) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getRemoteUpdateDirectivesWithHttpInfo(machineName);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get update directives for the remote agent
    * 
    * @param machineName Name of the remote agent machine to get update directives (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getRemoteUpdateDirectivesWithHttpInfo(String machineName) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getRemoteUpdateDirectivesWithHeadersAndHttpInfo(machineName, localVarHeaderParams);
        
    }

    /**
    * Get update directives for the remote agent
    * 
    * @param machineName Name of the remote agent machine to get update directives (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getRemoteUpdateDirectivesWithHeadersAndHttpInfo(String machineName, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return getRemoteUpdateDirectivesInternal(machineName, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getRemoteUpdateDirectivesInternal(String machineName, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'machineName' is set
        if (machineName == null) {
            throw new ApiException(400, "Missing the required path parameter 'machineName' when calling getRemoteUpdateDirectives");
        }
        // create path and map variables
        String localVarPath = "/agents/remote-updates/{machineName}/directives"
          .replaceAll("\\{" + "machineName" + "\\}", apiClient.escapeString(machineName.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
    }
    /**
    * Request indexing of the given datasource.
    * 
    * @param datasourceClass Datasource class of the connection (required)
    * @param datasourceId Datasource ID of the connection (required)
    * @param body IndexingParameters (required)
    * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase index(String datasourceClass, String datasourceId, IndexingParametersInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = indexWithHttpInfo(datasourceClass, datasourceId, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Request indexing of the given datasource.
    * 
    * @param datasourceClass Datasource class of the connection (required)
    * @param datasourceId Datasource ID of the connection (required)
    * @param body IndexingParameters (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse indexWithHttpInfo(String datasourceClass, String datasourceId, IndexingParametersInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return indexWithHeadersAndHttpInfo(datasourceClass, datasourceId, body, localVarHeaderParams);
        
    }

    /**
    * Request indexing of the given datasource.
    * 
    * @param datasourceClass Datasource class of the connection (required)
    * @param datasourceId Datasource ID of the connection (required)
    * @param body IndexingParameters (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse indexWithHeadersAndHttpInfo(String datasourceClass, String datasourceId, IndexingParametersInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return indexInternal(datasourceClass, datasourceId, body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse indexInternal(String datasourceClass, String datasourceId, IndexingParametersInputV1 body, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = body;
        // verify the required path parameter 'datasourceClass' is set
        if (datasourceClass == null) {
            throw new ApiException(400, "Missing the required path parameter 'datasourceClass' when calling index");
        }
        // verify the required path parameter 'datasourceId' is set
        if (datasourceId == null) {
            throw new ApiException(400, "Missing the required path parameter 'datasourceId' when calling index");
        }
        // verify the required body parameter 'body' is set
        if (body == null) {
            throw new ApiException(400, "Missing the required body parameter 'body' when calling index");
        }
        // create path and map variables
        String localVarPath = "/agents/{datasourceClass}/{datasourceId}/index"
          .replaceAll("\\{" + "datasourceClass" + "\\}", apiClient.escapeString(datasourceClass.toString()))
          .replaceAll("\\{" + "datasourceId" + "\\}", apiClient.escapeString(datasourceId.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
    }
    /**
    * Post the status of every connection in an agent
    * 
    * @param body Connection status from a single agent (required)
    * @throws ApiException if fails to make API call
    */
    public void postAgentStatus(AgentStatusV1 body) throws ApiException {
        postAgentStatusWithHttpInfo(body);
    }
    
    /**
    * Post the status of every connection in an agent
    * 
    * @param body Connection status from a single agent (required)
    * @throws ApiException if fails to make API call
    */
    public void postAgentStatusWithHttpInfo(AgentStatusV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        
         postAgentStatusWithHeadersAndHttpInfo(body, localVarHeaderParams);
    }

    /**
    * Post the status of every connection in an agent
    * 
    * @param body Connection status from a single agent (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public void postAgentStatusWithHeadersAndHttpInfo(AgentStatusV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        postAgentStatusInternal(body, localVarQueryParams, localVarHeaderParams);
    }
    
    private void postAgentStatusInternal(AgentStatusV1 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 postAgentStatus");
        }
        // create path and map variables
        String localVarPath = "/agents/status";

        // 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 {
                apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
                return;
                // 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
    }
    /**
    * Pre-provision the user for an agent
    * 
    * @param body Agent pre-provisioning information (required)
    * @return PreProvisionOutputV1
    * @throws ApiException if fails to make API call
    */
    public PreProvisionOutputV1 preProvision(PreProvisionInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = preProvisionWithHttpInfo(body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Pre-provision the user for an agent
    * 
    * @param body Agent pre-provisioning information (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse preProvisionWithHttpInfo(PreProvisionInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return preProvisionWithHeadersAndHttpInfo(body, localVarHeaderParams);
        
    }

    /**
    * Pre-provision the user for an agent
    * 
    * @param body Agent pre-provisioning 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 preProvisionWithHeadersAndHttpInfo(PreProvisionInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return preProvisionInternal(body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse preProvisionInternal(PreProvisionInputV1 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 preProvision");
        }
        // create path and map variables
        String localVarPath = "/agents/pre-provision";

        // 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
    }
    /**
    * Finish the user provisioning for an agent.
    * 
    * @param body Provision input (required)
    * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase provision(ProvisionInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = provisionWithHttpInfo(body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Finish the user provisioning for an agent.
    * 
    * @param body Provision input (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse provisionWithHttpInfo(ProvisionInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return provisionWithHeadersAndHttpInfo(body, localVarHeaderParams);
        
    }

    /**
    * Finish the user provisioning for an agent.
    * 
    * @param body Provision input (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse provisionWithHeadersAndHttpInfo(ProvisionInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return provisionInternal(body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse provisionInternal(ProvisionInputV1 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 provision");
        }
        // create path and map variables
        String localVarPath = "/agents/provision";

        // 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
    }
    /**
    * Restart an agent
    * 
    * @param agentName Name of the agent to restart. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase restartAgent(String agentName) throws ApiException {
        ApiClient.ApiResponse localVarResponse = restartAgentWithHttpInfo(agentName);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Restart an agent
    * 
    * @param agentName Name of the agent to restart. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse restartAgentWithHttpInfo(String agentName) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return restartAgentWithHeadersAndHttpInfo(agentName, localVarHeaderParams);
        
    }

    /**
    * Restart an agent
    * 
    * @param agentName Name of the agent to restart. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse restartAgentWithHeadersAndHttpInfo(String agentName, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return restartAgentInternal(agentName, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse restartAgentInternal(String agentName, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling restartAgent");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}/restart"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.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
    }
    /**
    * Restart a connector
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector to restart. The connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase restartConnector(String agentName, String connectorName) throws ApiException {
        ApiClient.ApiResponse localVarResponse = restartConnectorWithHttpInfo(agentName, connectorName);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Restart a connector
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector to restart. The connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse restartConnectorWithHttpInfo(String agentName, String connectorName) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return restartConnectorWithHeadersAndHttpInfo(agentName, connectorName, localVarHeaderParams);
        
    }

    /**
    * Restart a connector
    * 
    * @param agentName Name of the agent. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector to restart. The connector name can be obtained from the 'Connector' array in the response of 'GET / agents / {agentName}' (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse restartConnectorWithHeadersAndHttpInfo(String agentName, String connectorName, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return restartConnectorInternal(agentName, connectorName, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse restartConnectorInternal(String agentName, String connectorName, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling restartConnector");
        }
        // verify the required path parameter 'connectorName' is set
        if (connectorName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectorName' when calling restartConnector");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}/connectors/{connectorName}/restart"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()))
          .replaceAll("\\{" + "connectorName" + "\\}", apiClient.escapeString(connectorName.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
    }
    /**
    * Store a secret for a connection
    * 
    * @param agentName Name of the agent where the connector resides. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector where the connection resides. The connector name can be obtained from the result of 'GET /agents/{agentName}/connectors' (required)
    * @param connectionName Name of the connection to which to store secret. The connection name can be obtained from the result of 'GET /agents/{agentName}/connectors/{connectorName}/connections' (required)
    * @param body Secret to store.  Key and value must not be blank and must be 256 characters or fewer (required)
    * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase storeSecretForConnection(String agentName, String connectorName, String connectionName, StoreSecretInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = storeSecretForConnectionWithHttpInfo(agentName, connectorName, connectionName, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Store a secret for a connection
    * 
    * @param agentName Name of the agent where the connector resides. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector where the connection resides. The connector name can be obtained from the result of 'GET /agents/{agentName}/connectors' (required)
    * @param connectionName Name of the connection to which to store secret. The connection name can be obtained from the result of 'GET /agents/{agentName}/connectors/{connectorName}/connections' (required)
    * @param body Secret to store.  Key and value must not be blank and must be 256 characters or fewer (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse storeSecretForConnectionWithHttpInfo(String agentName, String connectorName, String connectionName, StoreSecretInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return storeSecretForConnectionWithHeadersAndHttpInfo(agentName, connectorName, connectionName, body, localVarHeaderParams);
        
    }

    /**
    * Store a secret for a connection
    * 
    * @param agentName Name of the agent where the connector resides. The name of the agent can be obtained from the result of GET /agents/status or from the result of GET /agents/datasources-status (required)
    * @param connectorName Name of the connector where the connection resides. The connector name can be obtained from the result of 'GET /agents/{agentName}/connectors' (required)
    * @param connectionName Name of the connection to which to store secret. The connection name can be obtained from the result of 'GET /agents/{agentName}/connectors/{connectorName}/connections' (required)
    * @param body Secret to store.  Key and value must not be blank and must be 256 characters or fewer (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse storeSecretForConnectionWithHeadersAndHttpInfo(String agentName, String connectorName, String connectionName, StoreSecretInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return storeSecretForConnectionInternal(agentName, connectorName, connectionName, body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse storeSecretForConnectionInternal(String agentName, String connectorName, String connectionName, StoreSecretInputV1 body, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = body;
        // verify the required path parameter 'agentName' is set
        if (agentName == null) {
            throw new ApiException(400, "Missing the required path parameter 'agentName' when calling storeSecretForConnection");
        }
        // verify the required path parameter 'connectorName' is set
        if (connectorName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectorName' when calling storeSecretForConnection");
        }
        // verify the required path parameter 'connectionName' is set
        if (connectionName == null) {
            throw new ApiException(400, "Missing the required path parameter 'connectionName' when calling storeSecretForConnection");
        }
        // verify the required body parameter 'body' is set
        if (body == null) {
            throw new ApiException(400, "Missing the required body parameter 'body' when calling storeSecretForConnection");
        }
        // create path and map variables
        String localVarPath = "/agents/{agentName}/connectors/{connectorName}/connections/{connectionName}/secrets"
          .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()))
          .replaceAll("\\{" + "connectorName" + "\\}", apiClient.escapeString(connectorName.toString()))
          .replaceAll("\\{" + "connectionName" + "\\}", apiClient.escapeString(connectionName.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
    }
    /**
    * Writes remote update directive config option and sets last updated timestamp
    * 
    * @param body Directive info to update (required)
    * @throws ApiException if fails to make API call
    */
    public void updateDirective(DirectiveInputV1 body) throws ApiException {
        updateDirectiveWithHttpInfo(body);
    }
    
    /**
    * Writes remote update directive config option and sets last updated timestamp
    * 
    * @param body Directive info to update (required)
    * @throws ApiException if fails to make API call
    */
    public void updateDirectiveWithHttpInfo(DirectiveInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        
         updateDirectiveWithHeadersAndHttpInfo(body, localVarHeaderParams);
    }

    /**
    * Writes remote update directive config option and sets last updated timestamp
    * 
    * @param body Directive info to update (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public void updateDirectiveWithHeadersAndHttpInfo(DirectiveInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        updateDirectiveInternal(body, localVarQueryParams, localVarHeaderParams);
    }
    
    private void updateDirectiveInternal(DirectiveInputV1 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 updateDirective");
        }
        // create path and map variables
        String localVarPath = "/agents/remote-updates/updateDirective";

        // 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 {
                apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
                return;
                // 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 status of an agent-machine for remote-updates
    * 
    * @param machineName Name of the remote agent machine to create or update with new status (required)
    * @param body Remote agent status (required)
    * @return RemoteAgentStatusOutputV1
    * @throws ApiException if fails to make API call
    */
    public RemoteAgentStatusOutputV1 updateRemoteAgentStatus(String machineName, RemoteAgentStatusInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = updateRemoteAgentStatusWithHttpInfo(machineName, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Create or update status of an agent-machine for remote-updates
    * 
    * @param machineName Name of the remote agent machine to create or update with new status (required)
    * @param body Remote agent status (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse updateRemoteAgentStatusWithHttpInfo(String machineName, RemoteAgentStatusInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return updateRemoteAgentStatusWithHeadersAndHttpInfo(machineName, body, localVarHeaderParams);
        
    }

    /**
    * Create or update status of an agent-machine for remote-updates
    * 
    * @param machineName Name of the remote agent machine to create or update with new status (required)
    * @param body Remote agent status (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse updateRemoteAgentStatusWithHeadersAndHttpInfo(String machineName, RemoteAgentStatusInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return updateRemoteAgentStatusInternal(machineName, body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse updateRemoteAgentStatusInternal(String machineName, RemoteAgentStatusInputV1 body, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = body;
        // verify the required path parameter 'machineName' is set
        if (machineName == null) {
            throw new ApiException(400, "Missing the required path parameter 'machineName' when calling updateRemoteAgentStatus");
        }
        // verify the required body parameter 'body' is set
        if (body == null) {
            throw new ApiException(400, "Missing the required body parameter 'body' when calling updateRemoteAgentStatus");
        }
        // create path and map variables
        String localVarPath = "/agents/remote-updates/{machineName}/status"
          .replaceAll("\\{" + "machineName" + "\\}", apiClient.escapeString(machineName.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
    // OVERLOADS END
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy