Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.finbourne.luminesce.api.HealthCheckingEndpointApi Maven / Gradle / Ivy
/*
* FINBOURNE Luminesce Web API
*
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.finbourne.luminesce.api;
import com.finbourne.luminesce.ApiCallback;
import com.finbourne.luminesce.ApiClient;
import com.finbourne.luminesce.ApiException;
import com.finbourne.luminesce.ApiResponse;
import com.finbourne.luminesce.Configuration;
import com.finbourne.luminesce.Pair;
import com.finbourne.luminesce.ProgressRequestBody;
import com.finbourne.luminesce.ProgressResponseBody;
import com.finbourne.luminesce.extensions.ConfigurationOptions;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class HealthCheckingEndpointApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public HealthCheckingEndpointApi() {
this(Configuration.getDefaultApiClient());
}
public HealthCheckingEndpointApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public int getHostIndex() {
return localHostIndex;
}
public void setHostIndex(int hostIndex) {
this.localHostIndex = hostIndex;
}
public String getCustomBaseUrl() {
return localCustomBaseUrl;
}
public void setCustomBaseUrl(String customBaseUrl) {
this.localCustomBaseUrl = customBaseUrl;
}
private okhttp3.Call fakeNodeReclaimCall(Integer secondsUntilReclaim, final ApiCallback _callback) throws ApiException {
return fakeNodeReclaimCall(secondsUntilReclaim, _callback, new ConfigurationOptions());
}
private okhttp3.Call fakeNodeReclaimCall(Integer secondsUntilReclaim, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/fakeNodeReclaim";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (secondsUntilReclaim != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("secondsUntilReclaim", secondsUntilReclaim));
}
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fakeNodeReclaimValidateBeforeCall(Integer secondsUntilReclaim, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return fakeNodeReclaimCall(secondsUntilReclaim, _callback, opts);
}
private ApiResponse fakeNodeReclaimWithHttpInfo(Integer secondsUntilReclaim) throws ApiException {
okhttp3.Call localVarCall = fakeNodeReclaimValidateBeforeCall(secondsUntilReclaim, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse fakeNodeReclaimWithHttpInfo(Integer secondsUntilReclaim, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fakeNodeReclaimValidateBeforeCall(secondsUntilReclaim, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call fakeNodeReclaimAsync(Integer secondsUntilReclaim, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = fakeNodeReclaimValidateBeforeCall(secondsUntilReclaim, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call fakeNodeReclaimAsync(Integer secondsUntilReclaim, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = fakeNodeReclaimValidateBeforeCall(secondsUntilReclaim, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIfakeNodeReclaimRequest {
private Integer secondsUntilReclaim;
private APIfakeNodeReclaimRequest() {
}
/**
* Set secondsUntilReclaim
* @param secondsUntilReclaim the number of seconds from which to assume node termination (optional, default to 119)
* @return APIfakeNodeReclaimRequest
*/
public APIfakeNodeReclaimRequest secondsUntilReclaim(Integer secondsUntilReclaim) {
this.secondsUntilReclaim = secondsUntilReclaim;
return this;
}
/**
* Build call for fakeNodeReclaim
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code Description Response Headers
200 Success -
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return fakeNodeReclaimCall(secondsUntilReclaim, _callback);
}
/**
* Execute fakeNodeReclaim request
* @return Object
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code Description Response Headers
200 Success -
*/
public Object execute() throws ApiException {
ApiResponse localVarResp = fakeNodeReclaimWithHttpInfo(secondsUntilReclaim);
return localVarResp.getData();
}
/**
* Execute fakeNodeReclaim request. Use any specified configuration options to override any other configuration for this request only.
* @return Object
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code Description Response Headers
200 Success -
*/
public Object execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = fakeNodeReclaimWithHttpInfo(secondsUntilReclaim, opts);
return localVarResp.getData();
}
/**
* Execute fakeNodeReclaim request with HTTP info returned
* @return ApiResponse<Object>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code Description Response Headers
200 Success -
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return fakeNodeReclaimWithHttpInfo(secondsUntilReclaim);
}
/**
* Execute fakeNodeReclaim request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Object>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code Description Response Headers
200 Success -
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return fakeNodeReclaimWithHttpInfo(secondsUntilReclaim, opts);
}
/**
* Execute fakeNodeReclaim request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code Description Response Headers
200 Success -
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return fakeNodeReclaimAsync(secondsUntilReclaim, _callback);
}
/**
* Execute fakeNodeReclaim request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code Description Response Headers
200 Success -
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return fakeNodeReclaimAsync(secondsUntilReclaim, _callback, opts);
}
}
/**
* [INTERNAL] FakeNodeReclaim: Helps testing of AWS node reclaim behaviour
* An internal Method used to mark the next SIGTERM as though an Aws Node reclaim were about to take place. Simulates having received an AWS node reclaim warning, or similar.
* @return APIfakeNodeReclaimRequest
* @http.response.details
Status Code Description Response Headers
200 Success -
*/
public APIfakeNodeReclaimRequest fakeNodeReclaim() {
return new APIfakeNodeReclaimRequest();
}
}