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 DID Manager API spec
* API specification for DID management helper APIs. The goal of this API is to help administrative interfaces to manage DIDs.
*
* 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.didman;
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.didman.ContactInformation;
import nl.reinkrul.nuts.didman.InlineResponseDefault;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ContactInfoApi {
private ApiClient localVarApiClient;
public ContactInfoApi() {
this(Configuration.getDefaultApiClient());
}
public ContactInfoApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for getContactInformation
* @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
The actual Contact Information of 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 getContactInformationCall(String did, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/internal/didman/v1/did/{did}/contactinfo"
.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", "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 getContactInformationValidateBeforeCall(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 getContactInformation(Async)");
}
okhttp3.Call localVarCall = getContactInformationCall(did, _callback);
return localVarCall;
}
/**
*
*
* @param did URL encoded DID. (required)
* @return ContactInformation
* @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
The actual Contact Information of 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 ContactInformation getContactInformation(String did) throws ApiException {
ApiResponse localVarResp = getContactInformationWithHttpInfo(did);
return localVarResp.getData();
}
/**
*
*
* @param did URL encoded DID. (required)
* @return ApiResponse<ContactInformation>
* @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
The actual Contact Information of 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 getContactInformationWithHttpInfo(String did) throws ApiException {
okhttp3.Call localVarCall = getContactInformationValidateBeforeCall(did, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
*
* @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
The actual Contact Information of 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 getContactInformationAsync(String did, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getContactInformationValidateBeforeCall(did, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateContactInformation
* @param did URL encoded DID. (required)
* @param contactInformation (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
The given type and URL have been added as service to 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 updateContactInformationCall(String did, ContactInformation contactInformation, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = contactInformation;
// create path and map variables
String localVarPath = "/internal/didman/v1/did/{did}/contactinfo"
.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", "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 updateContactInformationValidateBeforeCall(String did, ContactInformation contactInformation, 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 updateContactInformation(Async)");
}
// verify the required parameter 'contactInformation' is set
if (contactInformation == null) {
throw new ApiException("Missing the required parameter 'contactInformation' when calling updateContactInformation(Async)");
}
okhttp3.Call localVarCall = updateContactInformationCall(did, contactInformation, _callback);
return localVarCall;
}
/**
* Add a predetermined DID Service with real life contact information
* In case of emergency or support questions a service provider operating a nuts node should provide contact inforamtion such as an emergency phone number and support email address. There is at most one contact-information service per DID.
* @param did URL encoded DID. (required)
* @param contactInformation (required)
* @return ContactInformation
* @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
The given type and URL have been added as service to 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 ContactInformation updateContactInformation(String did, ContactInformation contactInformation) throws ApiException {
ApiResponse localVarResp = updateContactInformationWithHttpInfo(did, contactInformation);
return localVarResp.getData();
}
/**
* Add a predetermined DID Service with real life contact information
* In case of emergency or support questions a service provider operating a nuts node should provide contact inforamtion such as an emergency phone number and support email address. There is at most one contact-information service per DID.
* @param did URL encoded DID. (required)
* @param contactInformation (required)
* @return ApiResponse<ContactInformation>
* @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
The given type and URL have been added as service to 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 updateContactInformationWithHttpInfo(String did, ContactInformation contactInformation) throws ApiException {
okhttp3.Call localVarCall = updateContactInformationValidateBeforeCall(did, contactInformation, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Add a predetermined DID Service with real life contact information (asynchronously)
* In case of emergency or support questions a service provider operating a nuts node should provide contact inforamtion such as an emergency phone number and support email address. There is at most one contact-information service per DID.
* @param did URL encoded DID. (required)
* @param contactInformation (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
The given type and URL have been added as service to 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 updateContactInformationAsync(String did, ContactInformation contactInformation, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateContactInformationValidateBeforeCall(did, contactInformation, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}