All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.reinkrul.nuts.network.AdminApi Maven / Gradle / Ivy

/*
 * 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 java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AdminApi {
    private ApiClient localVarApiClient;

    public AdminApi() {
        this(Configuration.getDefaultApiClient());
    }

    public AdminApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    /**
     * Build call for reprocess
     * @param type the transaction content-type that must be reprocessed (optional)
     * @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
202 The request was accepted, process was started -
*/ public okhttp3.Call reprocessCall(String type, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/internal/network/v1/reprocess"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (type != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); } final String[] localVarAccepts = { }; 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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call reprocessValidateBeforeCall(String type, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = reprocessCall(type, _callback); return localVarCall; } /** * Reprocess all transactions of the given type, verify and process * Walks the DAG as subscribers do, only selects TXs of the given type. The supported type values correspond with the transaction content-types. Transactions are not verified and added to an in-memory queue. For large sets of transactions, memory usage can become high. The API returns immediately. error returns: * 400 - missing type * @param type the transaction content-type that must be reprocessed (optional) * @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
202 The request was accepted, process was started -
*/ public void reprocess(String type) throws ApiException { reprocessWithHttpInfo(type); } /** * Reprocess all transactions of the given type, verify and process * Walks the DAG as subscribers do, only selects TXs of the given type. The supported type values correspond with the transaction content-types. Transactions are not verified and added to an in-memory queue. For large sets of transactions, memory usage can become high. The API returns immediately. error returns: * 400 - missing type * @param type the transaction content-type that must be reprocessed (optional) * @return ApiResponse<Void> * @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
202 The request was accepted, process was started -
*/ public ApiResponse reprocessWithHttpInfo(String type) throws ApiException { okhttp3.Call localVarCall = reprocessValidateBeforeCall(type, null); return localVarApiClient.execute(localVarCall); } /** * Reprocess all transactions of the given type, verify and process (asynchronously) * Walks the DAG as subscribers do, only selects TXs of the given type. The supported type values correspond with the transaction content-types. Transactions are not verified and added to an in-memory queue. For large sets of transactions, memory usage can become high. The API returns immediately. error returns: * 400 - missing type * @param type the transaction content-type that must be reprocessed (optional) * @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
202 The request was accepted, process was started -
*/ public okhttp3.Call reprocessAsync(String type, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = reprocessValidateBeforeCall(type, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy