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.
/*
* Nuts network API spec
* API specification for RPC services available at the nuts-network
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package nl.reinkrul.nuts.network;
import nl.reinkrul.nuts.ApiCallback;
import nl.reinkrul.nuts.ApiClient;
import nl.reinkrul.nuts.ApiException;
import nl.reinkrul.nuts.ApiResponse;
import nl.reinkrul.nuts.Configuration;
import nl.reinkrul.nuts.Pair;
import nl.reinkrul.nuts.ProgressRequestBody;
import nl.reinkrul.nuts.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import nl.reinkrul.nuts.network.InlineResponseDefault;
import nl.reinkrul.nuts.network.PeerDiagnostics;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class DiagnosticsApi {
private ApiClient localVarApiClient;
public DiagnosticsApi() {
this(Configuration.getDefaultApiClient());
}
public DiagnosticsApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for getPeerDiagnostics
* @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
Successfully retrieved peers diagnostics
-
0
Default return values follow Problem Details for HTTP APIs as specified in [RFC7807](https://tools.ietf.org/html/rfc7807). Currently, return values contain the following members of a problem details object: - \"title\" (string) - A short, human-readable summary of the problem type. - \"status\" (number) - The HTTP status code generated by the origin server for this occurrence of the problem. - \"detail\" (string) - A human-readable explanation specific to this occurrence of the problem.
-
*/
public okhttp3.Call getPeerDiagnosticsCall(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/internal/network/v1/diagnostics/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", "application/problem+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 getPeerDiagnosticsValidateBeforeCall(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPeerDiagnosticsCall(_callback);
return localVarCall;
}
/**
* Gets diagnostic information about the node's peers
*
* @return Map<String, PeerDiagnostics>
* @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
Successfully retrieved peers diagnostics
-
0
Default return values follow Problem Details for HTTP APIs as specified in [RFC7807](https://tools.ietf.org/html/rfc7807). Currently, return values contain the following members of a problem details object: - \"title\" (string) - A short, human-readable summary of the problem type. - \"status\" (number) - The HTTP status code generated by the origin server for this occurrence of the problem. - \"detail\" (string) - A human-readable explanation specific to this occurrence of the problem.
-
*/
public Map getPeerDiagnostics() throws ApiException {
ApiResponse