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-v202410141803
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 {
    Object localVarPostBody = null;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling archiveAgent");
      }
    // create path and map variables
    String localVarPath = "/agents/{agentName}"
      .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * 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 {
    Object localVarPostBody = null;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling archiveConnection");
      }
      // verify the required parameter 'connectorName' is set
      if (connectorName == null) {
      throw new ApiException(400, "Missing the required parameter 'connectorName' when calling archiveConnection");
      }
      // verify the required parameter 'connectionName' is set
      if (connectionName == null) {
      throw new ApiException(400, "Missing the required 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
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * 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 {
    Object localVarPostBody = null;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling archiveConnector");
      }
      // verify the required parameter 'connectorName' is set
      if (connectorName == null) {
      throw new ApiException(400, "Missing the required 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
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get a list of 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 {
    Object localVarPostBody = null;
    // create path and map variables
    String localVarPath = "/agents/remote-updates/configuredDirectives";

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * 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 {
    Object localVarPostBody = body;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling createOrUpdateAgent");
      }
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling createOrUpdateAgent");
      }
    // create path and map variables
    String localVarPath = "/agents/{agentName}"
      .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Create or update a 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 {
    Object localVarPostBody = body;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling createOrUpdateConnection");
      }
      // verify the required parameter 'connectorName' is set
      if (connectorName == null) {
      throw new ApiException(400, "Missing the required parameter 'connectorName' when calling createOrUpdateConnection");
      }
      // verify the required parameter 'connectionName' is set
      if (connectionName == null) {
      throw new ApiException(400, "Missing the required parameter 'connectionName' when calling createOrUpdateConnection");
      }
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required 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
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Create or update a 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 {
    Object localVarPostBody = body;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling createOrUpdateConnector");
      }
      // verify the required parameter 'connectorName' is set
      if (connectorName == null) {
      throw new ApiException(400, "Missing the required parameter 'connectorName' when calling createOrUpdateConnector");
      }
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required 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
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * 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 {
    Object localVarPostBody = null;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling getAgent");
      }
    // create path and map variables
    String localVarPath = "/agents/{agentName}"
      .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

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

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType> localVarReturnType = new GenericType>() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get a 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 {
    Object localVarPostBody = null;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling getConnection");
      }
      // verify the required parameter 'connectorName' is set
      if (connectorName == null) {
      throw new ApiException(400, "Missing the required parameter 'connectorName' when calling getConnection");
      }
      // verify the required parameter 'connectionName' is set
      if (connectionName == null) {
      throw new ApiException(400, "Missing the required 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
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * 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 {
    Object localVarPostBody = null;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling getConnections");
      }
      // verify the required parameter 'connectorName' is set
      if (connectorName == null) {
      throw new ApiException(400, "Missing the required 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
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get a 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 {
    Object localVarPostBody = null;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling getConnector");
      }
      // verify the required parameter 'connectorName' is set
      if (connectorName == null) {
      throw new ApiException(400, "Missing the required 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
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * 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 {
    Object localVarPostBody = null;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling getConnectors");
      }
    // create path and map variables
    String localVarPath = "/agents/{agentName}/connectors"
      .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

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

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get 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 {
    Object localVarPostBody = null;
      // verify the required parameter 'machineName' is set
      if (machineName == null) {
      throw new ApiException(400, "Missing the required 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
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * 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 {
    Object localVarPostBody = body;
      // verify the required parameter 'datasourceClass' is set
      if (datasourceClass == null) {
      throw new ApiException(400, "Missing the required parameter 'datasourceClass' when calling index");
      }
      // verify the required parameter 'datasourceId' is set
      if (datasourceId == null) {
      throw new ApiException(400, "Missing the required parameter 'datasourceId' when calling index");
      }
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required 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
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * 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 {
    Object localVarPostBody = body;
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling postAgentStatus");
      }
    // create path and map variables
    String localVarPath = "/agents/status";

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
      apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
    Object localVarPostBody = body;
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling preProvision");
      }
    // create path and map variables
    String localVarPath = "/agents/pre-provision";

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * 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 {
    Object localVarPostBody = body;
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling provision");
      }
    // create path and map variables
    String localVarPath = "/agents/provision";

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * 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 {
    Object localVarPostBody = null;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling restartAgent");
      }
    // create path and map variables
    String localVarPath = "/agents/{agentName}/restart"
      .replaceAll("\\{" + "agentName" + "\\}", apiClient.escapeString(agentName.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * 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 {
    Object localVarPostBody = null;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling restartConnector");
      }
      // verify the required parameter 'connectorName' is set
      if (connectorName == null) {
      throw new ApiException(400, "Missing the required 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
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * 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 {
    Object localVarPostBody = body;
      // verify the required parameter 'agentName' is set
      if (agentName == null) {
      throw new ApiException(400, "Missing the required parameter 'agentName' when calling storeSecretForConnection");
      }
      // verify the required parameter 'connectorName' is set
      if (connectorName == null) {
      throw new ApiException(400, "Missing the required parameter 'connectorName' when calling storeSecretForConnection");
      }
      // verify the required parameter 'connectionName' is set
      if (connectionName == null) {
      throw new ApiException(400, "Missing the required parameter 'connectionName' when calling storeSecretForConnection");
      }
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required 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
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * 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 {
    Object localVarPostBody = body;
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling updateDirective");
      }
    // create path and map variables
    String localVarPath = "/agents/remote-updates/updateDirective";

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
      apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 {
    Object localVarPostBody = body;
      // verify the required parameter 'machineName' is set
      if (machineName == null) {
      throw new ApiException(400, "Missing the required parameter 'machineName' when calling updateRemoteAgentStatus");
      }
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required 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
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


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

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

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

      localVarHeaderParams.putAll(customHeaders);

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy