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.
/*
* Catapult REST Endpoints
* OpenAPI Specification of catapult-rest 1.1.2
*
* The version of the OpenAPI document: 0.9.4
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.nem.symbol.sdk.openapi.okhttp_gson.api;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.ApiCallback;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.ApiClient;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.ApiException;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.ApiResponse;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.Configuration;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.Pair;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.ProgressRequestBody;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.NodeHealthInfoDTO;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.NodeInfoDTO;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.NodeTimeDTO;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.ServerInfoDTO;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.StorageInfoDTO;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class NodeRoutesApi {
private ApiClient localVarApiClient;
public NodeRoutesApi() {
this(Configuration.getDefaultApiClient());
}
public NodeRoutesApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for getNodeHealth
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Both API node and database services are reachable from REST server.
-
503
Either API node or database service is unavailable or unreachable from REST server.
-
*/
public okhttp3.Call getNodeHealthCall(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/node/health";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getNodeHealthValidateBeforeCall(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getNodeHealthCall(_callback);
return localVarCall;
}
/**
* Get the node health information
* Supplies information regarding the connection and services status.
* @return NodeHealthInfoDTO
* @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
Both API node and database services are reachable from REST server.
-
503
Either API node or database service is unavailable or unreachable from REST server.
-
*/
public NodeHealthInfoDTO getNodeHealth() throws ApiException {
ApiResponse localVarResp = getNodeHealthWithHttpInfo();
return localVarResp.getData();
}
/**
* Get the node health information
* Supplies information regarding the connection and services status.
* @return ApiResponse<NodeHealthInfoDTO>
* @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
Both API node and database services are reachable from REST server.
-
503
Either API node or database service is unavailable or unreachable from REST server.
-
*/
public ApiResponse getNodeHealthWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getNodeHealthValidateBeforeCall(null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get the node health information (asynchronously)
* Supplies information regarding the connection and services status.
* @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
Both API node and database services are reachable from REST server.
-
503
Either API node or database service is unavailable or unreachable from REST server.
-
*/
public okhttp3.Call getNodeHealthAsync(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getNodeHealthValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getNodeInfo
* @param _callback Callback for upload/download progress
* @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 getNodeInfoCall(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/node/info";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getNodeInfoValidateBeforeCall(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getNodeInfoCall(_callback);
return localVarCall;
}
/**
* Get the node information
* Supplies additional information about the application running on a node.
* @return NodeInfoDTO
* @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 NodeInfoDTO getNodeInfo() throws ApiException {
ApiResponse localVarResp = getNodeInfoWithHttpInfo();
return localVarResp.getData();
}
/**
* Get the node information
* Supplies additional information about the application running on a node.
* @return ApiResponse<NodeInfoDTO>
* @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 getNodeInfoWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getNodeInfoValidateBeforeCall(null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get the node information (asynchronously)
* Supplies additional information about the application running on a node.
* @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 getNodeInfoAsync(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getNodeInfoValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getNodePeers
* @param _callback Callback for upload/download progress
* @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 getNodePeersCall(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/node/peers";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getNodePeersValidateBeforeCall(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getNodePeersCall(_callback);
return localVarCall;
}
/**
* Get peers information
* Gets the list of peers visible by the node.
* @return List<NodeInfoDTO>
* @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 List getNodePeers() throws ApiException {
ApiResponse> localVarResp = getNodePeersWithHttpInfo();
return localVarResp.getData();
}
/**
* Get peers information
* Gets the list of peers visible by the node.
* @return ApiResponse<List<NodeInfoDTO>>
* @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> getNodePeersWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getNodePeersValidateBeforeCall(null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get peers information (asynchronously)
* Gets the list of peers visible by the node.
* @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 getNodePeersAsync(final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getNodePeersValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getNodeStorage
* @param _callback Callback for upload/download progress
* @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 getNodeStorageCall(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/node/storage";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getNodeStorageValidateBeforeCall(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getNodeStorageCall(_callback);
return localVarCall;
}
/**
* Get the storage information of the node
* Returns storage information about the node.
* @return StorageInfoDTO
* @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 StorageInfoDTO getNodeStorage() throws ApiException {
ApiResponse localVarResp = getNodeStorageWithHttpInfo();
return localVarResp.getData();
}
/**
* Get the storage information of the node
* Returns storage information about the node.
* @return ApiResponse<StorageInfoDTO>
* @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 getNodeStorageWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getNodeStorageValidateBeforeCall(null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get the storage information of the node (asynchronously)
* Returns storage information about the node.
* @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 getNodeStorageAsync(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getNodeStorageValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getNodeTime
* @param _callback Callback for upload/download progress
* @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 getNodeTimeCall(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/node/time";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getNodeTimeValidateBeforeCall(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getNodeTimeCall(_callback);
return localVarCall;
}
/**
* Get the node time
* Gets the node time at the moment the reply was sent and received.
* @return NodeTimeDTO
* @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 NodeTimeDTO getNodeTime() throws ApiException {
ApiResponse localVarResp = getNodeTimeWithHttpInfo();
return localVarResp.getData();
}
/**
* Get the node time
* Gets the node time at the moment the reply was sent and received.
* @return ApiResponse<NodeTimeDTO>
* @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 getNodeTimeWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getNodeTimeValidateBeforeCall(null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get the node time (asynchronously)
* Gets the node time at the moment the reply was sent and received.
* @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 getNodeTimeAsync(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getNodeTimeValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getServerInfo
* @param _callback Callback for upload/download progress
* @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 getServerInfoCall(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/node/server";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getServerInfoValidateBeforeCall(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getServerInfoCall(_callback);
return localVarCall;
}
/**
* Get the version of the running REST component
* Returns the version of the running catapult-rest component.
* @return ServerInfoDTO
* @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 ServerInfoDTO getServerInfo() throws ApiException {
ApiResponse localVarResp = getServerInfoWithHttpInfo();
return localVarResp.getData();
}
/**
* Get the version of the running REST component
* Returns the version of the running catapult-rest component.
* @return ApiResponse<ServerInfoDTO>
* @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 getServerInfoWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getServerInfoValidateBeforeCall(null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get the version of the running REST component (asynchronously)
* Returns the version of the running catapult-rest component.
* @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 getServerInfoAsync(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getServerInfoValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}