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

nl.reinkrul.nuts.vdr.DidApi Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
/*
 * Nuts Verifiable Data Registry API spec
 * API specification for the Verifiable Data Registry
 *
 * The version of the OpenAPI document: 1.0.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.vdr;

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.vdr.DIDCreateRequest;
import nl.reinkrul.nuts.vdr.DIDDocument;
import nl.reinkrul.nuts.vdr.DIDResolutionResult;
import nl.reinkrul.nuts.vdr.DIDUpdateRequest;
import nl.reinkrul.nuts.vdr.InlineResponseDefault;
import nl.reinkrul.nuts.vdr.VerificationMethod;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class DidApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for addNewVerificationMethod
     * @param did URL encoded DID. (required)
     * @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 New verification method has been created and added successfully. Returns the DID document. -
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 addNewVerificationMethodCall(String did, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/internal/vdr/v1/did/{did}/verificationmethod" .replaceAll("\\{" + "did" + "\\}", localVarApiClient.escapeString(did.toString())); 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+did-document", "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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addNewVerificationMethodValidateBeforeCall(String did, final ApiCallback _callback) throws ApiException { // verify the required parameter 'did' is set if (did == null) { throw new ApiException("Missing the required parameter 'did' when calling addNewVerificationMethod(Async)"); } okhttp3.Call localVarCall = addNewVerificationMethodCall(did, _callback); return localVarCall; } /** * Creates and adds a new verificationMethod to the DID document. * It create a new private public keypair. The public key is wrapped in verificationMethod. This method is added to the DID Document. error returns: * 403 - Verification method could not be added because the DID is not managed by this node * 404 - Corresponding DID document could not be found * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @return VerificationMethod * @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 New verification method has been created and added successfully. Returns the DID document. -
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 VerificationMethod addNewVerificationMethod(String did) throws ApiException { ApiResponse localVarResp = addNewVerificationMethodWithHttpInfo(did); return localVarResp.getData(); } /** * Creates and adds a new verificationMethod to the DID document. * It create a new private public keypair. The public key is wrapped in verificationMethod. This method is added to the DID Document. error returns: * 403 - Verification method could not be added because the DID is not managed by this node * 404 - Corresponding DID document could not be found * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @return ApiResponse<VerificationMethod> * @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 New verification method has been created and added successfully. Returns the DID document. -
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 ApiResponse addNewVerificationMethodWithHttpInfo(String did) throws ApiException { okhttp3.Call localVarCall = addNewVerificationMethodValidateBeforeCall(did, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Creates and adds a new verificationMethod to the DID document. (asynchronously) * It create a new private public keypair. The public key is wrapped in verificationMethod. This method is added to the DID Document. error returns: * 403 - Verification method could not be added because the DID is not managed by this node * 404 - Corresponding DID document could not be found * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @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 New verification method has been created and added successfully. Returns the DID document. -
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 addNewVerificationMethodAsync(String did, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addNewVerificationMethodValidateBeforeCall(did, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for conflictedDIDs * @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 List of conflicting DID Documents. Empty list if there are none. -
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 conflictedDIDsCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/internal/vdr/v1/did/conflicted"; 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 conflictedDIDsValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = conflictedDIDsCall(_callback); return localVarCall; } /** * Retrieve the list of conflicted DID documents * Resolves DID documents with a conflict. It returns both the DID Document and metadata of the DID Document. error returns: * 500 - An error occurred while processing the request * @return List<DIDResolutionResult> * @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 List of conflicting DID Documents. Empty list if there are none. -
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 List conflictedDIDs() throws ApiException { ApiResponse> localVarResp = conflictedDIDsWithHttpInfo(); return localVarResp.getData(); } /** * Retrieve the list of conflicted DID documents * Resolves DID documents with a conflict. It returns both the DID Document and metadata of the DID Document. error returns: * 500 - An error occurred while processing the request * @return ApiResponse<List<DIDResolutionResult>> * @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 List of conflicting DID Documents. Empty list if there are none. -
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 ApiResponse> conflictedDIDsWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = conflictedDIDsValidateBeforeCall(null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Retrieve the list of conflicted DID documents (asynchronously) * Resolves DID documents with a conflict. It returns both the DID Document and metadata of the DID Document. error returns: * 500 - An error occurred while processing the request * @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 List of conflicting DID Documents. Empty list if there are none. -
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 conflictedDIDsAsync(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = conflictedDIDsValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createDID * @param diDCreateRequest (required) * @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 New DID has been created successfully. Returns the DID document. -
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 createDIDCall(DIDCreateRequest diDCreateRequest, final ApiCallback _callback) throws ApiException { Object localVarPostBody = diDCreateRequest; // create path and map variables String localVarPath = "/internal/vdr/v1/did"; 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+did-document", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; 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 createDIDValidateBeforeCall(DIDCreateRequest diDCreateRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'diDCreateRequest' is set if (diDCreateRequest == null) { throw new ApiException("Missing the required parameter 'diDCreateRequest' when calling createDID(Async)"); } okhttp3.Call localVarCall = createDIDCall(diDCreateRequest, _callback); return localVarCall; } /** * Creates a new Nuts DID * The DID Document will be created according to the given request. If a combination of options is not allowed, a 400 is returned. The default values for selfControl, assertionMethod and capabilityInvocation are true. The default for controllers is an empty list. All other options default to false. Only a single keypair will be generated. All enabled methods will reuse the same key pair. A seperate keypair will be generated to generate the DID if SelfControl is false. error returns: * 400 - Invalid (combination of) options * 500 - An error occurred while processing the request * @param diDCreateRequest (required) * @return DIDDocument * @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 New DID has been created successfully. Returns the DID document. -
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 DIDDocument createDID(DIDCreateRequest diDCreateRequest) throws ApiException { ApiResponse localVarResp = createDIDWithHttpInfo(diDCreateRequest); return localVarResp.getData(); } /** * Creates a new Nuts DID * The DID Document will be created according to the given request. If a combination of options is not allowed, a 400 is returned. The default values for selfControl, assertionMethod and capabilityInvocation are true. The default for controllers is an empty list. All other options default to false. Only a single keypair will be generated. All enabled methods will reuse the same key pair. A seperate keypair will be generated to generate the DID if SelfControl is false. error returns: * 400 - Invalid (combination of) options * 500 - An error occurred while processing the request * @param diDCreateRequest (required) * @return ApiResponse<DIDDocument> * @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 New DID has been created successfully. Returns the DID document. -
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 ApiResponse createDIDWithHttpInfo(DIDCreateRequest diDCreateRequest) throws ApiException { okhttp3.Call localVarCall = createDIDValidateBeforeCall(diDCreateRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Creates a new Nuts DID (asynchronously) * The DID Document will be created according to the given request. If a combination of options is not allowed, a 400 is returned. The default values for selfControl, assertionMethod and capabilityInvocation are true. The default for controllers is an empty list. All other options default to false. Only a single keypair will be generated. All enabled methods will reuse the same key pair. A seperate keypair will be generated to generate the DID if SelfControl is false. error returns: * 400 - Invalid (combination of) options * 500 - An error occurred while processing the request * @param diDCreateRequest (required) * @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 New DID has been created successfully. Returns the DID document. -
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 createDIDAsync(DIDCreateRequest diDCreateRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createDIDValidateBeforeCall(diDCreateRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deactivateDID * @param did URL encoded DID. (required) * @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 DID document has been deactivated. -
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 deactivateDIDCall(String did, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/internal/vdr/v1/did/{did}" .replaceAll("\\{" + "did" + "\\}", localVarApiClient.escapeString(did.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deactivateDIDValidateBeforeCall(String did, final ApiCallback _callback) throws ApiException { // verify the required parameter 'did' is set if (did == null) { throw new ApiException("Missing the required parameter 'did' when calling deactivateDID(Async)"); } okhttp3.Call localVarCall = deactivateDIDCall(did, _callback); return localVarCall; } /** * Deactivates a Nuts DID document according to the specification. * Updates a Nuts DID document. error returns: * 400 - DID document could not be deleted because the DID param was malformed * 403 - DID document could not be deleted because the DID is not managed by this node * 404 - Corresponding DID document could not be found * 409 - DID document could not be deactivated because the the document was already deactivated * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @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 DID document has been deactivated. -
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 void deactivateDID(String did) throws ApiException { deactivateDIDWithHttpInfo(did); } /** * Deactivates a Nuts DID document according to the specification. * Updates a Nuts DID document. error returns: * 400 - DID document could not be deleted because the DID param was malformed * 403 - DID document could not be deleted because the DID is not managed by this node * 404 - Corresponding DID document could not be found * 409 - DID document could not be deactivated because the the document was already deactivated * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @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
200 DID document has been deactivated. -
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 ApiResponse deactivateDIDWithHttpInfo(String did) throws ApiException { okhttp3.Call localVarCall = deactivateDIDValidateBeforeCall(did, null); return localVarApiClient.execute(localVarCall); } /** * Deactivates a Nuts DID document according to the specification. (asynchronously) * Updates a Nuts DID document. error returns: * 400 - DID document could not be deleted because the DID param was malformed * 403 - DID document could not be deleted because the DID is not managed by this node * 404 - Corresponding DID document could not be found * 409 - DID document could not be deactivated because the the document was already deactivated * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @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 DID document has been deactivated. -
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 deactivateDIDAsync(String did, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deactivateDIDValidateBeforeCall(did, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteVerificationMethod * @param did URL encoded DID. (required) * @param kid URL encoded DID identifying the verification method. (required) * @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
204 Verification Method was successfully deleted -
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 deleteVerificationMethodCall(String did, String kid, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/internal/vdr/v1/did/{did}/verificationmethod/{kid}" .replaceAll("\\{" + "did" + "\\}", localVarApiClient.escapeString(did.toString())) .replaceAll("\\{" + "kid" + "\\}", localVarApiClient.escapeString(kid.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteVerificationMethodValidateBeforeCall(String did, String kid, final ApiCallback _callback) throws ApiException { // verify the required parameter 'did' is set if (did == null) { throw new ApiException("Missing the required parameter 'did' when calling deleteVerificationMethod(Async)"); } // verify the required parameter 'kid' is set if (kid == null) { throw new ApiException("Missing the required parameter 'kid' when calling deleteVerificationMethod(Async)"); } okhttp3.Call localVarCall = deleteVerificationMethodCall(did, kid, _callback); return localVarCall; } /** * Delete a specific verification method * Removes the verification method from the DID Document. Revokes the public key with the corresponding key-id. Note: Other verification methods with different key-ids with the same private key will still be valid. error returns: * 403 - Verification method could not be deleted because the DID is not managed by this node * 404 - Corresponding DID document or verification method could not be found * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @param kid URL encoded DID identifying the verification method. (required) * @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
204 Verification Method was successfully deleted -
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 void deleteVerificationMethod(String did, String kid) throws ApiException { deleteVerificationMethodWithHttpInfo(did, kid); } /** * Delete a specific verification method * Removes the verification method from the DID Document. Revokes the public key with the corresponding key-id. Note: Other verification methods with different key-ids with the same private key will still be valid. error returns: * 403 - Verification method could not be deleted because the DID is not managed by this node * 404 - Corresponding DID document or verification method could not be found * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @param kid URL encoded DID identifying the verification method. (required) * @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
204 Verification Method was successfully deleted -
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 ApiResponse deleteVerificationMethodWithHttpInfo(String did, String kid) throws ApiException { okhttp3.Call localVarCall = deleteVerificationMethodValidateBeforeCall(did, kid, null); return localVarApiClient.execute(localVarCall); } /** * Delete a specific verification method (asynchronously) * Removes the verification method from the DID Document. Revokes the public key with the corresponding key-id. Note: Other verification methods with different key-ids with the same private key will still be valid. error returns: * 403 - Verification method could not be deleted because the DID is not managed by this node * 404 - Corresponding DID document or verification method could not be found * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @param kid URL encoded DID identifying the verification method. (required) * @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
204 Verification Method was successfully deleted -
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 deleteVerificationMethodAsync(String did, String kid, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteVerificationMethodValidateBeforeCall(did, kid, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getDID * @param did URL encoded DID. (required) * @param versionId If a versionId parameter is provided, the DID resolution algorithm returns a specific version of the DID document. The version is the Sha256 hash of the document. The DID parameters versionId and versionTime are mutually exclusive. See [the did resolution spec about versioning](https://w3c-ccg.github.io/did-resolution/#versioning) (optional) * @param versionTime If a versionTime parameter is provided, the DID resolution algorithm returns a specific version of the DID document. The DID parameters versionId and versionTime are mutually exclusive. See [the did resolution spec about versioning](https://w3c-ccg.github.io/did-resolution/#versioning) (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
200 DID has been found and returned. -
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 getDIDCall(String did, String versionId, String versionTime, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/internal/vdr/v1/did/{did}" .replaceAll("\\{" + "did" + "\\}", localVarApiClient.escapeString(did.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (versionId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("versionId", versionId)); } if (versionTime != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("versionTime", versionTime)); } 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 getDIDValidateBeforeCall(String did, String versionId, String versionTime, final ApiCallback _callback) throws ApiException { // verify the required parameter 'did' is set if (did == null) { throw new ApiException("Missing the required parameter 'did' when calling getDID(Async)"); } okhttp3.Call localVarCall = getDIDCall(did, versionId, versionTime, _callback); return localVarCall; } /** * Resolves a Nuts DID document * Resolves a Nuts DID document. It also resolves deactivated documents. error returns: * 400 - Returned in case of malformed DID * 404 - Corresponding DID document could not be found * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @param versionId If a versionId parameter is provided, the DID resolution algorithm returns a specific version of the DID document. The version is the Sha256 hash of the document. The DID parameters versionId and versionTime are mutually exclusive. See [the did resolution spec about versioning](https://w3c-ccg.github.io/did-resolution/#versioning) (optional) * @param versionTime If a versionTime parameter is provided, the DID resolution algorithm returns a specific version of the DID document. The DID parameters versionId and versionTime are mutually exclusive. See [the did resolution spec about versioning](https://w3c-ccg.github.io/did-resolution/#versioning) (optional) * @return DIDResolutionResult * @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 DID has been found and returned. -
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 DIDResolutionResult getDID(String did, String versionId, String versionTime) throws ApiException { ApiResponse localVarResp = getDIDWithHttpInfo(did, versionId, versionTime); return localVarResp.getData(); } /** * Resolves a Nuts DID document * Resolves a Nuts DID document. It also resolves deactivated documents. error returns: * 400 - Returned in case of malformed DID * 404 - Corresponding DID document could not be found * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @param versionId If a versionId parameter is provided, the DID resolution algorithm returns a specific version of the DID document. The version is the Sha256 hash of the document. The DID parameters versionId and versionTime are mutually exclusive. See [the did resolution spec about versioning](https://w3c-ccg.github.io/did-resolution/#versioning) (optional) * @param versionTime If a versionTime parameter is provided, the DID resolution algorithm returns a specific version of the DID document. The DID parameters versionId and versionTime are mutually exclusive. See [the did resolution spec about versioning](https://w3c-ccg.github.io/did-resolution/#versioning) (optional) * @return ApiResponse<DIDResolutionResult> * @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 DID has been found and returned. -
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 ApiResponse getDIDWithHttpInfo(String did, String versionId, String versionTime) throws ApiException { okhttp3.Call localVarCall = getDIDValidateBeforeCall(did, versionId, versionTime, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Resolves a Nuts DID document (asynchronously) * Resolves a Nuts DID document. It also resolves deactivated documents. error returns: * 400 - Returned in case of malformed DID * 404 - Corresponding DID document could not be found * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @param versionId If a versionId parameter is provided, the DID resolution algorithm returns a specific version of the DID document. The version is the Sha256 hash of the document. The DID parameters versionId and versionTime are mutually exclusive. See [the did resolution spec about versioning](https://w3c-ccg.github.io/did-resolution/#versioning) (optional) * @param versionTime If a versionTime parameter is provided, the DID resolution algorithm returns a specific version of the DID document. The DID parameters versionId and versionTime are mutually exclusive. See [the did resolution spec about versioning](https://w3c-ccg.github.io/did-resolution/#versioning) (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
200 DID has been found and returned. -
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 getDIDAsync(String did, String versionId, String versionTime, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDIDValidateBeforeCall(did, versionId, versionTime, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateDID * @param did URL encoded DID. (required) * @param diDUpdateRequest (required) * @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 DID document has been updated. -
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 updateDIDCall(String did, DIDUpdateRequest diDUpdateRequest, final ApiCallback _callback) throws ApiException { Object localVarPostBody = diDUpdateRequest; // create path and map variables String localVarPath = "/internal/vdr/v1/did/{did}" .replaceAll("\\{" + "did" + "\\}", localVarApiClient.escapeString(did.toString())); 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+did-document", "application/problem+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateDIDValidateBeforeCall(String did, DIDUpdateRequest diDUpdateRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'did' is set if (did == null) { throw new ApiException("Missing the required parameter 'did' when calling updateDID(Async)"); } // verify the required parameter 'diDUpdateRequest' is set if (diDUpdateRequest == null) { throw new ApiException("Missing the required parameter 'diDUpdateRequest' when calling updateDID(Async)"); } okhttp3.Call localVarCall = updateDIDCall(did, diDUpdateRequest, _callback); return localVarCall; } /** * Updates a Nuts DID document. * Updates a Nuts DID document. error returns: * 400 - DID document could not be updated because the DID param was malformed or the DID document is invalid * 403 - DID document could not be updated because the DID is not managed by this node * 404 - Corresponding DID document could not be found * 409 - DID document could not be updated because the document is deactivated or its controllers are deactivated * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @param diDUpdateRequest (required) * @return DIDDocument * @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 DID document has been updated. -
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 DIDDocument updateDID(String did, DIDUpdateRequest diDUpdateRequest) throws ApiException { ApiResponse localVarResp = updateDIDWithHttpInfo(did, diDUpdateRequest); return localVarResp.getData(); } /** * Updates a Nuts DID document. * Updates a Nuts DID document. error returns: * 400 - DID document could not be updated because the DID param was malformed or the DID document is invalid * 403 - DID document could not be updated because the DID is not managed by this node * 404 - Corresponding DID document could not be found * 409 - DID document could not be updated because the document is deactivated or its controllers are deactivated * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @param diDUpdateRequest (required) * @return ApiResponse<DIDDocument> * @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 DID document has been updated. -
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 ApiResponse updateDIDWithHttpInfo(String did, DIDUpdateRequest diDUpdateRequest) throws ApiException { okhttp3.Call localVarCall = updateDIDValidateBeforeCall(did, diDUpdateRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Updates a Nuts DID document. (asynchronously) * Updates a Nuts DID document. error returns: * 400 - DID document could not be updated because the DID param was malformed or the DID document is invalid * 403 - DID document could not be updated because the DID is not managed by this node * 404 - Corresponding DID document could not be found * 409 - DID document could not be updated because the document is deactivated or its controllers are deactivated * 500 - An error occurred while processing the request * @param did URL encoded DID. (required) * @param diDUpdateRequest (required) * @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 DID document has been updated. -
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 updateDIDAsync(String did, DIDUpdateRequest diDUpdateRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateDIDValidateBeforeCall(did, diDUpdateRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy