org.symphonyoss.symphony.agent.api.SystemApi Maven / Gradle / Ivy
package org.symphonyoss.symphony.agent.api;
import org.symphonyoss.symphony.agent.invoker.ApiException;
import org.symphonyoss.symphony.agent.invoker.ApiClient;
import org.symphonyoss.symphony.agent.invoker.Configuration;
import org.symphonyoss.symphony.agent.invoker.Pair;
import javax.ws.rs.core.GenericType;
import org.symphonyoss.symphony.agent.model.V1HealthCheckResponse;
import org.symphonyoss.symphony.agent.model.V2HealthCheckResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-10-14T03:33:40.723-04:00")
public class SystemApi {
private ApiClient apiClient;
public SystemApi() {
this(Configuration.getDefaultApiClient());
}
public SystemApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Checks the health of the Agent.
* Used to validate the configuration of the agent. Makes a request to the HealthCheck on the Symphony cloud. Makes a request to the HealthCheck on the Key Manager service.
* @return V1HealthCheckResponse
* @throws ApiException if fails to make API call
*/
public V1HealthCheckResponse v1HealthCheckGet() throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v1/HealthCheck".replaceAll("\\{format\\}","json");
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Checks the health of the Agent.
* Used to validate the configuration of the agent. Makes a request to the HealthCheck on the Symphony cloud. Makes a request to the HealthCheck on the Key Manager service. Encryts and decrypts a message inside either agent or user SbeSession with wall thread id.
* @param sessionToken Session authentication token. (optional)
* @param keyManagerToken Key Manager authentication token. (optional)
* @return V2HealthCheckResponse
* @throws ApiException if fails to make API call
*/
public V2HealthCheckResponse v2HealthCheckGet(String sessionToken, String keyManagerToken) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/HealthCheck".replaceAll("\\{format\\}","json");
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
if (sessionToken != null)
localVarHeaderParams.put("sessionToken", apiClient.parameterToString(sessionToken));
if (keyManagerToken != null)
localVarHeaderParams.put("keyManagerToken", apiClient.parameterToString(keyManagerToken));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}