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

nl.reinkrul.nuts.didman.SearchApi 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.InlineResponseDefault;
import nl.reinkrul.nuts.didman.OrganizationSearchResult;

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

public class SearchApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for searchOrganizations
     * @param query Query used for searching the organization by name. The query is matched to the organization's name in a SQL's \"LIKE\" fashion: it matches partial strings and also names that sound like the given query, using a phonetic transformation algorithm.  (required)
     * @param didServiceType Filters organizations by service of the given type in the organizations' DID document (optional). (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 Organizations resulting from the search. -
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 searchOrganizationsCall(String query, String didServiceType, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/internal/didman/v1/search/organizations"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (query != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); } if (didServiceType != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("didServiceType", didServiceType)); } 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 searchOrganizationsValidateBeforeCall(String query, String didServiceType, final ApiCallback _callback) throws ApiException { // verify the required parameter 'query' is set if (query == null) { throw new ApiException("Missing the required parameter 'query' when calling searchOrganizations(Async)"); } okhttp3.Call localVarCall = searchOrganizationsCall(query, didServiceType, _callback); return localVarCall; } /** * * * @param query Query used for searching the organization by name. The query is matched to the organization's name in a SQL's \"LIKE\" fashion: it matches partial strings and also names that sound like the given query, using a phonetic transformation algorithm. (required) * @param didServiceType Filters organizations by service of the given type in the organizations' DID document (optional). (optional) * @return List<OrganizationSearchResult> * @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 Organizations resulting from the search. -
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 searchOrganizations(String query, String didServiceType) throws ApiException { ApiResponse> localVarResp = searchOrganizationsWithHttpInfo(query, didServiceType); return localVarResp.getData(); } /** * * * @param query Query used for searching the organization by name. The query is matched to the organization's name in a SQL's \"LIKE\" fashion: it matches partial strings and also names that sound like the given query, using a phonetic transformation algorithm. (required) * @param didServiceType Filters organizations by service of the given type in the organizations' DID document (optional). (optional) * @return ApiResponse<List<OrganizationSearchResult>> * @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 Organizations resulting from the search. -
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> searchOrganizationsWithHttpInfo(String query, String didServiceType) throws ApiException { okhttp3.Call localVarCall = searchOrganizationsValidateBeforeCall(query, didServiceType, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * * @param query Query used for searching the organization by name. The query is matched to the organization's name in a SQL's \"LIKE\" fashion: it matches partial strings and also names that sound like the given query, using a phonetic transformation algorithm. (required) * @param didServiceType Filters organizations by service of the given type in the organizations' DID document (optional). (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 Organizations resulting from the search. -
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 searchOrganizationsAsync(String query, String didServiceType, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchOrganizationsValidateBeforeCall(query, didServiceType, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy