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

nl.reinkrul.nuts.didman.ServicesApi Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
/*
 * 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.CompoundService;
import nl.reinkrul.nuts.didman.CompoundServiceProperties;
import nl.reinkrul.nuts.didman.Endpoint;
import nl.reinkrul.nuts.didman.EndpointProperties;
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 ServicesApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for addCompoundService
     * @param did URL encoded DID. (required)
     * @param compoundServiceProperties  (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 compound service has been added 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 addCompoundServiceCall(String did, CompoundServiceProperties compoundServiceProperties, final ApiCallback _callback) throws ApiException { Object localVarPostBody = compoundServiceProperties; // create path and map variables String localVarPath = "/internal/didman/v1/did/{did}/compoundservice" .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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addCompoundServiceValidateBeforeCall(String did, CompoundServiceProperties compoundServiceProperties, 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 addCompoundService(Async)"); } // verify the required parameter 'compoundServiceProperties' is set if (compoundServiceProperties == null) { throw new ApiException("Missing the required parameter 'compoundServiceProperties' when calling addCompoundService(Async)"); } okhttp3.Call localVarCall = addCompoundServiceCall(did, compoundServiceProperties, _callback); return localVarCall; } /** * Add a compound service to a DID Document. * Add a service to a DID Document that references one or more endpoints using a map. The keys of the map indicate the service name/type, the values contain the references to the endpoints. The endpoints may be in the same or in another DID Document, but they must be resolvable when the service is created. The references must follow the format for service references as specified by Nuts RFC006. This API will also check if an endpoint with the same type already exists. This API is not meant to add endpoints. error returns: * 400 - incorrect input * 404 - unknown DID * 409 - a service with the same type already exists * @param did URL encoded DID. (required) * @param compoundServiceProperties (required) * @return CompoundService * @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 compound service has been added 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 CompoundService addCompoundService(String did, CompoundServiceProperties compoundServiceProperties) throws ApiException { ApiResponse localVarResp = addCompoundServiceWithHttpInfo(did, compoundServiceProperties); return localVarResp.getData(); } /** * Add a compound service to a DID Document. * Add a service to a DID Document that references one or more endpoints using a map. The keys of the map indicate the service name/type, the values contain the references to the endpoints. The endpoints may be in the same or in another DID Document, but they must be resolvable when the service is created. The references must follow the format for service references as specified by Nuts RFC006. This API will also check if an endpoint with the same type already exists. This API is not meant to add endpoints. error returns: * 400 - incorrect input * 404 - unknown DID * 409 - a service with the same type already exists * @param did URL encoded DID. (required) * @param compoundServiceProperties (required) * @return ApiResponse<CompoundService> * @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 compound service has been added 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 addCompoundServiceWithHttpInfo(String did, CompoundServiceProperties compoundServiceProperties) throws ApiException { okhttp3.Call localVarCall = addCompoundServiceValidateBeforeCall(did, compoundServiceProperties, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add a compound service to a DID Document. (asynchronously) * Add a service to a DID Document that references one or more endpoints using a map. The keys of the map indicate the service name/type, the values contain the references to the endpoints. The endpoints may be in the same or in another DID Document, but they must be resolvable when the service is created. The references must follow the format for service references as specified by Nuts RFC006. This API will also check if an endpoint with the same type already exists. This API is not meant to add endpoints. error returns: * 400 - incorrect input * 404 - unknown DID * 409 - a service with the same type already exists * @param did URL encoded DID. (required) * @param compoundServiceProperties (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 compound service has been added 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 addCompoundServiceAsync(String did, CompoundServiceProperties compoundServiceProperties, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addCompoundServiceValidateBeforeCall(did, compoundServiceProperties, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for addEndpoint * @param did URL encoded DID. (required) * @param endpointProperties (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 service which has been added 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 addEndpointCall(String did, EndpointProperties endpointProperties, final ApiCallback _callback) throws ApiException { Object localVarPostBody = endpointProperties; // create path and map variables String localVarPath = "/internal/didman/v1/did/{did}/endpoint" .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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addEndpointValidateBeforeCall(String did, EndpointProperties endpointProperties, 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 addEndpoint(Async)"); } // verify the required parameter 'endpointProperties' is set if (endpointProperties == null) { throw new ApiException("Missing the required parameter 'endpointProperties' when calling addEndpoint(Async)"); } okhttp3.Call localVarCall = addEndpointCall(did, endpointProperties, _callback); return localVarCall; } /** * Add a service endpoint or a reference to a service. * To distinguish from compound services, this type of service will be called an endpoint. In the Nuts specs this type of service is called a concrete service. Add an endpoint with a type and URL to a DID Service in a Document. The API will convert it to a DID service with the serviceEndpoint set to a URL. This API will also check if an endpoint with the same type already exists. This API is not meant to add compound services. The URL can either be an Endpoint or a reference to another service. error returns: * 400 - incorrect input * 404 - unknown DID * 409 - a service with the same type already exists * @param did URL encoded DID. (required) * @param endpointProperties (required) * @return Endpoint * @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 service which has been added 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 Endpoint addEndpoint(String did, EndpointProperties endpointProperties) throws ApiException { ApiResponse localVarResp = addEndpointWithHttpInfo(did, endpointProperties); return localVarResp.getData(); } /** * Add a service endpoint or a reference to a service. * To distinguish from compound services, this type of service will be called an endpoint. In the Nuts specs this type of service is called a concrete service. Add an endpoint with a type and URL to a DID Service in a Document. The API will convert it to a DID service with the serviceEndpoint set to a URL. This API will also check if an endpoint with the same type already exists. This API is not meant to add compound services. The URL can either be an Endpoint or a reference to another service. error returns: * 400 - incorrect input * 404 - unknown DID * 409 - a service with the same type already exists * @param did URL encoded DID. (required) * @param endpointProperties (required) * @return ApiResponse<Endpoint> * @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 service which has been added 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 addEndpointWithHttpInfo(String did, EndpointProperties endpointProperties) throws ApiException { okhttp3.Call localVarCall = addEndpointValidateBeforeCall(did, endpointProperties, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add a service endpoint or a reference to a service. (asynchronously) * To distinguish from compound services, this type of service will be called an endpoint. In the Nuts specs this type of service is called a concrete service. Add an endpoint with a type and URL to a DID Service in a Document. The API will convert it to a DID service with the serviceEndpoint set to a URL. This API will also check if an endpoint with the same type already exists. This API is not meant to add compound services. The URL can either be an Endpoint or a reference to another service. error returns: * 400 - incorrect input * 404 - unknown DID * 409 - a service with the same type already exists * @param did URL encoded DID. (required) * @param endpointProperties (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 service which has been added 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 addEndpointAsync(String did, EndpointProperties endpointProperties, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addEndpointValidateBeforeCall(did, endpointProperties, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteEndpointsByType * @param did URL encoded DID. (required) * @param type Type of the service (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 All existing endpoints with with this type were succesfully 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 deleteEndpointsByTypeCall(String did, String type, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/internal/didman/v1/did/{did}/endpoint/{type}" .replaceAll("\\{" + "did" + "\\}", localVarApiClient.escapeString(did.toString())) .replaceAll("\\{" + "type" + "\\}", localVarApiClient.escapeString(type.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 deleteEndpointsByTypeValidateBeforeCall(String did, String type, 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 deleteEndpointsByType(Async)"); } // verify the required parameter 'type' is set if (type == null) { throw new ApiException("Missing the required parameter 'type' when calling deleteEndpointsByType(Async)"); } okhttp3.Call localVarCall = deleteEndpointsByTypeCall(did, type, _callback); return localVarCall; } /** * * Delete all endpoints with the provided type from the DID Document. error returns: * 400 - malformatted input, like the DID or the endpoint type. * 404 - DID or service with this type not found. * 409 - the service is referenced by other services * @param did URL encoded DID. (required) * @param type Type of the service (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 All existing endpoints with with this type were succesfully 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 deleteEndpointsByType(String did, String type) throws ApiException { deleteEndpointsByTypeWithHttpInfo(did, type); } /** * * Delete all endpoints with the provided type from the DID Document. error returns: * 400 - malformatted input, like the DID or the endpoint type. * 404 - DID or service with this type not found. * 409 - the service is referenced by other services * @param did URL encoded DID. (required) * @param type Type of the service (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 All existing endpoints with with this type were succesfully 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 deleteEndpointsByTypeWithHttpInfo(String did, String type) throws ApiException { okhttp3.Call localVarCall = deleteEndpointsByTypeValidateBeforeCall(did, type, null); return localVarApiClient.execute(localVarCall); } /** * (asynchronously) * Delete all endpoints with the provided type from the DID Document. error returns: * 400 - malformatted input, like the DID or the endpoint type. * 404 - DID or service with this type not found. * 409 - the service is referenced by other services * @param did URL encoded DID. (required) * @param type Type of the service (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 All existing endpoints with with this type were succesfully 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 deleteEndpointsByTypeAsync(String did, String type, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteEndpointsByTypeValidateBeforeCall(did, type, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteService * @param id URL encoded service ID. (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 The service has been removed -
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 deleteServiceCall(String id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/internal/didman/v1/service/{id}" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.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 deleteServiceValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteService(Async)"); } okhttp3.Call localVarCall = deleteServiceCall(id, _callback); return localVarCall; } /** * Remove a service from a DID Document. * Remove a service from a DID Document. error returns: * 400 - incorrect input * 404 - unknown DID * 409 - the service is referenced by other services * @param id URL encoded service ID. (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 The service has been removed -
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 deleteService(String id) throws ApiException { deleteServiceWithHttpInfo(id); } /** * Remove a service from a DID Document. * Remove a service from a DID Document. error returns: * 400 - incorrect input * 404 - unknown DID * 409 - the service is referenced by other services * @param id URL encoded service ID. (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 The service has been removed -
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 deleteServiceWithHttpInfo(String id) throws ApiException { okhttp3.Call localVarCall = deleteServiceValidateBeforeCall(id, null); return localVarApiClient.execute(localVarCall); } /** * Remove a service from a DID Document. (asynchronously) * Remove a service from a DID Document. error returns: * 400 - incorrect input * 404 - unknown DID * 409 - the service is referenced by other services * @param id URL encoded service ID. (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 The service has been removed -
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 deleteServiceAsync(String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteServiceValidateBeforeCall(id, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getCompoundServiceEndpoint * @param did URL encoded DID. (required) * @param compoundServiceType Service type of the compound service containing the endpoint to be resolved. (required) * @param endpointType Entry in the compound service to be resolved as endpoint. (required) * @param resolve Whether to resolve references. When true and the given endpoint is a reference it returns the endpoint of the referenced service. If false it returns the reference itself. Defaults to true. (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 The endpoint of the given type and compound service is returned. It returns JSON by default, text if requested through the accept header (text/plain) -
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 getCompoundServiceEndpointCall(String did, String compoundServiceType, String endpointType, Boolean resolve, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/internal/didman/v1/did/{did}/compoundservice/{compoundServiceType}/endpoint/{endpointType}" .replaceAll("\\{" + "did" + "\\}", localVarApiClient.escapeString(did.toString())) .replaceAll("\\{" + "compoundServiceType" + "\\}", localVarApiClient.escapeString(compoundServiceType.toString())) .replaceAll("\\{" + "endpointType" + "\\}", localVarApiClient.escapeString(endpointType.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (resolve != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resolve", resolve)); } final String[] localVarAccepts = { "text/plain", "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 getCompoundServiceEndpointValidateBeforeCall(String did, String compoundServiceType, String endpointType, Boolean resolve, 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 getCompoundServiceEndpoint(Async)"); } // verify the required parameter 'compoundServiceType' is set if (compoundServiceType == null) { throw new ApiException("Missing the required parameter 'compoundServiceType' when calling getCompoundServiceEndpoint(Async)"); } // verify the required parameter 'endpointType' is set if (endpointType == null) { throw new ApiException("Missing the required parameter 'endpointType' when calling getCompoundServiceEndpoint(Async)"); } okhttp3.Call localVarCall = getCompoundServiceEndpointCall(did, compoundServiceType, endpointType, resolve, _callback); return localVarCall; } /** * Retrieves the endpoint with the specified endpointType from the specified compound service. * Retrieves the endpoint with the specified endpointType from the specified compound service. It returns the serviceEndpoint of the specified service (which must be an absolute URL endpoint). error responses: * 400 - incorrect input (e.g. the given service type isn't a compound service) * 404 - unknown DID, compound service or endpoint * 406 - service references are nested too deep or reference is invalid in other ways * @param did URL encoded DID. (required) * @param compoundServiceType Service type of the compound service containing the endpoint to be resolved. (required) * @param endpointType Entry in the compound service to be resolved as endpoint. (required) * @param resolve Whether to resolve references. When true and the given endpoint is a reference it returns the endpoint of the referenced service. If false it returns the reference itself. Defaults to true. (optional) * @return String * @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 endpoint of the given type and compound service is returned. It returns JSON by default, text if requested through the accept header (text/plain) -
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 String getCompoundServiceEndpoint(String did, String compoundServiceType, String endpointType, Boolean resolve) throws ApiException { ApiResponse localVarResp = getCompoundServiceEndpointWithHttpInfo(did, compoundServiceType, endpointType, resolve); return localVarResp.getData(); } /** * Retrieves the endpoint with the specified endpointType from the specified compound service. * Retrieves the endpoint with the specified endpointType from the specified compound service. It returns the serviceEndpoint of the specified service (which must be an absolute URL endpoint). error responses: * 400 - incorrect input (e.g. the given service type isn't a compound service) * 404 - unknown DID, compound service or endpoint * 406 - service references are nested too deep or reference is invalid in other ways * @param did URL encoded DID. (required) * @param compoundServiceType Service type of the compound service containing the endpoint to be resolved. (required) * @param endpointType Entry in the compound service to be resolved as endpoint. (required) * @param resolve Whether to resolve references. When true and the given endpoint is a reference it returns the endpoint of the referenced service. If false it returns the reference itself. Defaults to true. (optional) * @return ApiResponse<String> * @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 endpoint of the given type and compound service is returned. It returns JSON by default, text if requested through the accept header (text/plain) -
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 getCompoundServiceEndpointWithHttpInfo(String did, String compoundServiceType, String endpointType, Boolean resolve) throws ApiException { okhttp3.Call localVarCall = getCompoundServiceEndpointValidateBeforeCall(did, compoundServiceType, endpointType, resolve, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Retrieves the endpoint with the specified endpointType from the specified compound service. (asynchronously) * Retrieves the endpoint with the specified endpointType from the specified compound service. It returns the serviceEndpoint of the specified service (which must be an absolute URL endpoint). error responses: * 400 - incorrect input (e.g. the given service type isn't a compound service) * 404 - unknown DID, compound service or endpoint * 406 - service references are nested too deep or reference is invalid in other ways * @param did URL encoded DID. (required) * @param compoundServiceType Service type of the compound service containing the endpoint to be resolved. (required) * @param endpointType Entry in the compound service to be resolved as endpoint. (required) * @param resolve Whether to resolve references. When true and the given endpoint is a reference it returns the endpoint of the referenced service. If false it returns the reference itself. Defaults to true. (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 The endpoint of the given type and compound service is returned. It returns JSON by default, text if requested through the accept header (text/plain) -
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 getCompoundServiceEndpointAsync(String did, String compoundServiceType, String endpointType, Boolean resolve, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCompoundServiceEndpointValidateBeforeCall(did, compoundServiceType, endpointType, resolve, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getCompoundServices * @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 list of compound services on the DID document. It excludes special compound services like ContactInformation. -
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 getCompoundServicesCall(String did, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/internal/didman/v1/did/{did}/compoundservice" .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 getCompoundServicesValidateBeforeCall(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 getCompoundServices(Async)"); } okhttp3.Call localVarCall = getCompoundServicesCall(did, _callback); return localVarCall; } /** * Get a list of compound services for a DID document. error responses: * 400 - incorrect input * 404 - unknown DID * * @param did URL encoded DID. (required) * @return List<CompoundService> * @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 list of compound services on the DID document. It excludes special compound services like ContactInformation. -
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 getCompoundServices(String did) throws ApiException { ApiResponse> localVarResp = getCompoundServicesWithHttpInfo(did); return localVarResp.getData(); } /** * Get a list of compound services for a DID document. error responses: * 400 - incorrect input * 404 - unknown DID * * @param did URL encoded DID. (required) * @return ApiResponse<List<CompoundService>> * @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 list of compound services on the DID document. It excludes special compound services like ContactInformation. -
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> getCompoundServicesWithHttpInfo(String did) throws ApiException { okhttp3.Call localVarCall = getCompoundServicesValidateBeforeCall(did, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get a list of compound services for a DID document. error responses: * 400 - incorrect input * 404 - unknown DID (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 list of compound services on the DID document. It excludes special compound services like ContactInformation. -
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 getCompoundServicesAsync(String did, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getCompoundServicesValidateBeforeCall(did, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy