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

fun.freechat.client.api.AccountManagerForAdminApi Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
/*
 * FreeChat OpenAPI Definition
 * # FreeChat: Create Some Friends for Yourself with AI  English | [中文版](https://github.com/freechat-fun/freechat/blob/main/README.zh-CN.md)  ## Introduction Welcome! FreeChat aims to build a cloud-native, robust, and quickly commercializable enterprise-level AI virtual character platform.  It also serves as a prompt engineering platform.  ## Features - Primarily uses Java and emphasizes **security, robustness, scalability, traceability, and maintainability**. - Boasts **account systems and permission management**, supporting OAuth2 authentication. Introduces the \"organization\" concept and related permission constraint functions. - Extensively employs distributed technologies and caching to support **high concurrency** access. - Provides flexible character customization options, supports direct intervention in prompts, and supports **configuring multiple backends for each character**. - **Offers a comprehensive range of Open APIs**, with more than 180 interfaces and provides java/python/typescript SDKs. These interfaces enable easy construction of systems for end-users. - Supports setting **RAG** (Retrieval Augmented Generation) for characters. - Supports **long-term memory, preset memory** for characters. - Supports characters evoking **proactive chat**. - Supports setting **quota limits** for characters. - Supports characters **importing and exporting**. - Supports individual **debugging and sharing prompts**.  ## Snapshots ### On PC #### Home Page ![Home Page Snapshot](/img/snapshot_w1.jpg) #### Development View ![Development View Snapshot](/img/snapshot_w2.jpg) #### Chat View ![Chat View Snapshot](/img/snapshot_w3.jpg)  ### On Mobile ![Chat Snapshot 1](/img/snapshot_m1.jpg) ![Chat Snapshot 2](/img/snapshot_m2.jpg)
![Chat Snapshot 3](/img/snapshot_m3.jpg) ![Chat Snapshot 4](/img/snapshot_m4.jpg) ## Character Design ```mermaid flowchart TD A(Character) --> B(Profile) A --> C(Knowledge/RAG) A --> D(Album) A --> E(Backend-1) A --> F(Backend-n...) E --> G(Message Window) E --> H(Long Term Memory Settings) E --> I(Quota Limit) E --> J(Chat Prompt Task) E --> K(Greeting Prompt Task) E --> L(Moderation Settings) J --> M(Model & Parameters) J --> N(API Keys) J --> O(Prompt Refence) J --> P(Tool Specifications) O --> Q(Template) O --> R(Variables) O --> S(Version) O --> T(...) style K stroke-dasharray: 5, 5 style L stroke-dasharray: 5, 5 style P stroke-dasharray: 5, 5 ``` After setting up an unified persona and knowledge for a character, different backends can be configured. For example, different model may be adopted for different users based on cost considerations. ## How to Play ### Online Website You can visit [freechat.fun](https://www.freechat.fun) to experience FreeChat. Share your designed AI character! ### Running in a Kubernetes Cluster FreeChat is dedicated to the principles of cloud-native design. If you have a Kubernetes cluster, you can deploy FreeChat to your environment by following these steps: 1. Put the Kubernetes configuration file in the `configs/helm/` directory, named `kube-private.conf`. 2. Place the Helm configuration file in the same directory, named `values-private.yaml`. Make sure to reference the default `values.yaml` and customize the variables as needed. 3. Switch to the `scripts/` directory. 4. If needed, run `install-in.sh` to deploy `ingress-nginx` on the Kubernetes cluster. 5. If needed, run `install-cm.sh` to deploy `cert-manager` on the Kubernetes cluster, which automatically issues certificates for domains specified in `ingress.hosts`. 6. Run `install-pvc.sh` to install PersistentVolumeClaim resources. > By default, FreeChat operates files by accessing the \"local file system.\" You may want to use high-availability distributed storage in the cloud. As a cloud-native-designed system, we recommend interfacing through Kubernetes CSI to avoid individually adapting storage products for each cloud platform. Most cloud service providers offer cloud storage drivers for Kubernetes, with a series of predefined StorageClass resources. Please choose the appropriate configuration according to your actual needs and set it in Helm's `global.storageClass` option. > > *In the future, FreeChat may be refactored to use MinIO's APIs directly, as it is now installed in the Kubernetes cluster as a dependency (serving Milvus).* 7. Run `install.sh` script to install FreeChat and its dependencies. 8. FreeChat aims to provide Open API services. If you like the interactive experience of [freechat.fun](https://freechat.fun), run `install-web.sh` to deploy the front-end application. 9. Run `restart.sh` to restart the service. 10. If you modified any Helm configuration files, use `upgrade.sh` to update the corresponding Kubernetes resources. 11. To remove specific resources, run the `uninstall*.sh` script corresponding to the resource you want to uninstall. As a cloud-native application, the services FreeChat relies on are obtained and deployed to your cluster through the helm repository. If you prefer cloud services with SLA (Service Level Agreement) guarantees, simply make the relevant settings in `configs/helm/values-private.yaml`: ```yaml mysql: deployment: enabled: false url: auth: rootPassword: username: password: redis: deployment: enabled: false url: auth: password: milvus: deployment: enabled: false url: milvus: auth: token: ``` With this, FreeChat will not automatically install these services, but rather use the configuration information to connect directly. If your Kubernetes cluster does not have a standalone monitoring system, you can enable the following switch. This will install Prometheus and Grafana services in the same namespace, dedicated to monitoring the status of the services under the FreeChat application: ```yaml prometheus: deployment: enabled: true grafana: deployment: enabled: true ``` ### Running Locally You can also run FreeChat locally. Currently supported on MacOS and Linux (although only tested on MacOS). You need to install the Docker toolset and have a network that can access [Docker Hub](https://hub.docker.com/). Once ready, enter the `scripts/` directory and run `local-run.sh`, which will download and run the necessary docker containers. After a successful startup, you can access `http://localhost` via a browser to see the locally running freechat.fun. The built-in administrator username and password are \"admin:freechat\". Use `local-run.sh --help` to view the supported options of the script. Good luck! ### Running in an IDE To run FreeChat in an IDE, you need to start all dependent services first but do not need to run the container for the FreeChat application itself. You can execute the `scripts/local-deps.sh` script to start services like `MySQL`, `Redis`, `Milvus`, etc., locally. Once done, open and debug `freechat-start/src/main/java/fun/freechat/Application.java`。Make sure you have set the following startup VM options: ```shell -Dspring.config.location=classpath:/application.yml,classpath:/application-local.yml \\ -DAPP_HOME=local-data/freechat \\ -Dspring.profiles.active=local ``` ### Use SDK #### Java - **Dependency** ```xml fun.freechat freechat-sdk ${freechat-sdk.version} ``` - **Example** ```java import fun.freechat.client.ApiClient; import fun.freechat.client.ApiException; import fun.freechat.client.Configuration; import fun.freechat.client.api.AccountApi; import fun.freechat.client.auth.ApiKeyAuth; import fun.freechat.client.model.UserDetailsDTO; public class AccountClientExample { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath(\"https://freechat.fun\"); // Configure HTTP bearer authorization: bearerAuth HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication(\"bearerAuth\"); bearerAuth.setBearerToken(\"FREECHAT_TOKEN\"); AccountApi apiInstance = new AccountApi(defaultClient); try { UserDetailsDTO result = apiInstance.getUserDetails(); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); } } } ``` #### Python - **Installation** ```shell pip install freechat-sdk ``` - **Example** ```python import freechat_sdk from freechat_sdk.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://freechat.fun # See configuration.py for a list of all supported configuration parameters. configuration = freechat_sdk.Configuration( host = \"https://freechat.fun\" ) # Configure Bearer authorization: bearerAuth configuration = freechat_sdk.Configuration( access_token = os.environ[\"FREECHAT_TOKEN\"] ) # Enter a context with an instance of the API client with freechat_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = freechat_sdk.AccountApi(api_client) try: details = api_instance.get_user_details() pprint(details) except ApiException as e: print(\"Exception when calling AccountClient->get_user_details: %s\\n\" % e) ``` #### TypeScript - **Installation** ```shell npm install freechat-sdk --save ``` - **Example** Refer to [FreeChatApiContext.tsx](https://github.com/freechat-fun/freechat/blob/main/freechat-web/src/contexts/FreeChatApiProvider.tsx) ## System Dependencies | | Projects | ---- | ---- | Application Framework | [Spring Boot](https://spring.io/projects/spring-boot/) | LLM Framework | [LangChain4j](https://docs.langchain4j.dev/) | Model Providers | [OpenAI](https://platform.openai.com/), [Azure OpenAI](https://oai.azure.com/), [DashScope(Alibaba)](https://dashscope.aliyun.com/) | Database Systems | [MySQL](https://www.mysql.com/), [Redis](https://redis.io/), [Milvus](https://milvus.io/) | Monitoring & Alerting | [Prometheus](https://prometheus.io/), [Grafana](https://grafana.com/) | OpenAPI Tools | [Springdoc-openapi](https://springdoc.org/), [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator), [OpenAPI Explorer](https://github.com/Authress-Engineering/openapi-explorer) ## Collaboration ### Application Integration The FreeChat system is entirely oriented towards Open APIs. The site [freechat.fun](https://freechat.fun) is developed using its TypeScript SDK and hardly depends on private interfaces. You can use these online interfaces to develop your own applications or sites, making them fit your preferences. Currently, FreeChat is completely free with no paid plans (after all, users use their own API Key to call LLM services). ### Model Integration FreeChat aims to explore AI virtual character technology with anthropomorphic characteristics. So far, it supports model services from OpenAI GPT and Alibaba Qwen series models. However, we are more interested in supporting models that are under research and can endow AI with more personality traits. If you are researching this area and hope FreeChat supports your model, please contact us. We look forward to AI technology helping people create their own \"soul mates\" in the future. * * The version of the OpenAPI document: 1.4.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 fun.freechat.client.api; import fun.freechat.client.ApiCallback; import fun.freechat.client.ApiClient; import fun.freechat.client.ApiException; import fun.freechat.client.ApiResponse; import fun.freechat.client.Configuration; import fun.freechat.client.Pair; import fun.freechat.client.ProgressRequestBody; import fun.freechat.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; import fun.freechat.client.model.ApiTokenInfoDTO; import java.util.Set; import fun.freechat.client.model.UserBasicInfoDTO; import fun.freechat.client.model.UserDetailsDTO; import fun.freechat.client.model.UserFullDetailsDTO; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class AccountManagerForAdminApi { private ApiClient localVarApiClient; private int localHostIndex; private String localCustomBaseUrl; public AccountManagerForAdminApi() { this(Configuration.getDefaultApiClient()); } public AccountManagerForAdminApi(ApiClient apiClient) { this.localVarApiClient = apiClient; } public ApiClient getApiClient() { return localVarApiClient; } public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } public int getHostIndex() { return localHostIndex; } public void setHostIndex(int hostIndex) { this.localHostIndex = hostIndex; } public String getCustomBaseUrl() { return localCustomBaseUrl; } public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } /** * Build call for createTokenForUser * @param username Username (required) * @param duration Validity period (seconds) (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 OK -
*/ public okhttp3.Call createTokenForUserCall(String username, Long duration, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/admin/token/{username}/{duration}" .replace("{" + "username" + "}", localVarApiClient.escapeString(username.toString())) .replace("{" + "duration" + "}", localVarApiClient.escapeString(duration.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "text/plain" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createTokenForUserValidateBeforeCall(String username, Long duration, final ApiCallback _callback) throws ApiException { // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling createTokenForUser(Async)"); } // verify the required parameter 'duration' is set if (duration == null) { throw new ApiException("Missing the required parameter 'duration' when calling createTokenForUser(Async)"); } return createTokenForUserCall(username, duration, _callback); } /** * Create API Token for User. * Create an API Token for a specified user, valid for duration seconds. * @param username Username (required) * @param duration Validity period (seconds) (required) * @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 OK -
*/ public String createTokenForUser(String username, Long duration) throws ApiException { ApiResponse localVarResp = createTokenForUserWithHttpInfo(username, duration); return localVarResp.getData(); } /** * Create API Token for User. * Create an API Token for a specified user, valid for duration seconds. * @param username Username (required) * @param duration Validity period (seconds) (required) * @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 OK -
*/ public ApiResponse createTokenForUserWithHttpInfo(String username, Long duration) throws ApiException { okhttp3.Call localVarCall = createTokenForUserValidateBeforeCall(username, duration, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create API Token for User. (asynchronously) * Create an API Token for a specified user, valid for duration seconds. * @param username Username (required) * @param duration Validity period (seconds) (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 OK -
*/ public okhttp3.Call createTokenForUserAsync(String username, Long duration, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createTokenForUserValidateBeforeCall(username, duration, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createUser * @param userFullDetailsDTO User information (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 OK -
*/ public okhttp3.Call createUserCall(UserFullDetailsDTO userFullDetailsDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = userFullDetailsDTO; // create path and map variables String localVarPath = "/api/v1/admin/user"; 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" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createUserValidateBeforeCall(UserFullDetailsDTO userFullDetailsDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'userFullDetailsDTO' is set if (userFullDetailsDTO == null) { throw new ApiException("Missing the required parameter 'userFullDetailsDTO' when calling createUser(Async)"); } return createUserCall(userFullDetailsDTO, _callback); } /** * Create User * Create user. * @param userFullDetailsDTO User information (required) * @return Boolean * @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 OK -
*/ public Boolean createUser(UserFullDetailsDTO userFullDetailsDTO) throws ApiException { ApiResponse localVarResp = createUserWithHttpInfo(userFullDetailsDTO); return localVarResp.getData(); } /** * Create User * Create user. * @param userFullDetailsDTO User information (required) * @return ApiResponse<Boolean> * @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 OK -
*/ public ApiResponse createUserWithHttpInfo(UserFullDetailsDTO userFullDetailsDTO) throws ApiException { okhttp3.Call localVarCall = createUserValidateBeforeCall(userFullDetailsDTO, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create User (asynchronously) * Create user. * @param userFullDetailsDTO User information (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 OK -
*/ public okhttp3.Call createUserAsync(UserFullDetailsDTO userFullDetailsDTO, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createUserValidateBeforeCall(userFullDetailsDTO, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteTokenForUser * @param token API Token (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 OK -
*/ public okhttp3.Call deleteTokenForUserCall(String token, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/admin/token/{token}" .replace("{" + "token" + "}", localVarApiClient.escapeString(token.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" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteTokenForUserValidateBeforeCall(String token, final ApiCallback _callback) throws ApiException { // verify the required parameter 'token' is set if (token == null) { throw new ApiException("Missing the required parameter 'token' when calling deleteTokenForUser(Async)"); } return deleteTokenForUserCall(token, _callback); } /** * Delete API Token * Delete the specified API Token. * @param token API Token (required) * @return Boolean * @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 OK -
*/ public Boolean deleteTokenForUser(String token) throws ApiException { ApiResponse localVarResp = deleteTokenForUserWithHttpInfo(token); return localVarResp.getData(); } /** * Delete API Token * Delete the specified API Token. * @param token API Token (required) * @return ApiResponse<Boolean> * @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 OK -
*/ public ApiResponse deleteTokenForUserWithHttpInfo(String token) throws ApiException { okhttp3.Call localVarCall = deleteTokenForUserValidateBeforeCall(token, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete API Token (asynchronously) * Delete the specified API Token. * @param token API Token (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 OK -
*/ public okhttp3.Call deleteTokenForUserAsync(String token, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteTokenForUserValidateBeforeCall(token, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteUser * @param username Username (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 OK -
*/ public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/admin/user/{username}" .replace("{" + "username" + "}", localVarApiClient.escapeString(username.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" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteUserValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling deleteUser(Async)"); } return deleteUserCall(username, _callback); } /** * Delete User * Delete user by username. * @param username Username (required) * @return Boolean * @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 OK -
*/ public Boolean deleteUser(String username) throws ApiException { ApiResponse localVarResp = deleteUserWithHttpInfo(username); return localVarResp.getData(); } /** * Delete User * Delete user by username. * @param username Username (required) * @return ApiResponse<Boolean> * @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 OK -
*/ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete User (asynchronously) * Delete user by username. * @param username Username (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 OK -
*/ public okhttp3.Call deleteUserAsync(String username, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for disableTokenForUser * @param token API Token (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 OK -
*/ public okhttp3.Call disableTokenForUserCall(String token, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/admin/token/{token}" .replace("{" + "token" + "}", localVarApiClient.escapeString(token.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" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call disableTokenForUserValidateBeforeCall(String token, final ApiCallback _callback) throws ApiException { // verify the required parameter 'token' is set if (token == null) { throw new ApiException("Missing the required parameter 'token' when calling disableTokenForUser(Async)"); } return disableTokenForUserCall(token, _callback); } /** * Disable API Token * Disable the specified API Token. * @param token API Token (required) * @return Boolean * @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 OK -
*/ public Boolean disableTokenForUser(String token) throws ApiException { ApiResponse localVarResp = disableTokenForUserWithHttpInfo(token); return localVarResp.getData(); } /** * Disable API Token * Disable the specified API Token. * @param token API Token (required) * @return ApiResponse<Boolean> * @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 OK -
*/ public ApiResponse disableTokenForUserWithHttpInfo(String token) throws ApiException { okhttp3.Call localVarCall = disableTokenForUserValidateBeforeCall(token, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Disable API Token (asynchronously) * Disable the specified API Token. * @param token API Token (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 OK -
*/ public okhttp3.Call disableTokenForUserAsync(String token, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = disableTokenForUserValidateBeforeCall(token, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDetailsOfUser * @param username Username (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 OK -
*/ public okhttp3.Call getDetailsOfUserCall(String username, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/admin/user/{username}" .replace("{" + "username" + "}", localVarApiClient.escapeString(username.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" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getDetailsOfUserValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling getDetailsOfUser(Async)"); } return getDetailsOfUserCall(username, _callback); } /** * Get User Details * Return detailed user information. * @param username Username (required) * @return UserDetailsDTO * @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 OK -
*/ public UserDetailsDTO getDetailsOfUser(String username) throws ApiException { ApiResponse localVarResp = getDetailsOfUserWithHttpInfo(username); return localVarResp.getData(); } /** * Get User Details * Return detailed user information. * @param username Username (required) * @return ApiResponse<UserDetailsDTO> * @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 OK -
*/ public ApiResponse getDetailsOfUserWithHttpInfo(String username) throws ApiException { okhttp3.Call localVarCall = getDetailsOfUserValidateBeforeCall(username, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get User Details (asynchronously) * Return detailed user information. * @param username Username (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 OK -
*/ public okhttp3.Call getDetailsOfUserAsync(String username, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDetailsOfUserValidateBeforeCall(username, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getUserByToken * @param token API Token (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 OK -
*/ public okhttp3.Call getUserByTokenCall(String token, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/admin/tokenBy/{token}" .replace("{" + "token" + "}", localVarApiClient.escapeString(token.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" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getUserByTokenValidateBeforeCall(String token, final ApiCallback _callback) throws ApiException { // verify the required parameter 'token' is set if (token == null) { throw new ApiException("Missing the required parameter 'token' when calling getUserByToken(Async)"); } return getUserByTokenCall(token, _callback); } /** * Get User by API Token * Get the detailed user information corresponding to the API Token. * @param token API Token (required) * @return UserDetailsDTO * @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 OK -
*/ public UserDetailsDTO getUserByToken(String token) throws ApiException { ApiResponse localVarResp = getUserByTokenWithHttpInfo(token); return localVarResp.getData(); } /** * Get User by API Token * Get the detailed user information corresponding to the API Token. * @param token API Token (required) * @return ApiResponse<UserDetailsDTO> * @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 OK -
*/ public ApiResponse getUserByTokenWithHttpInfo(String token) throws ApiException { okhttp3.Call localVarCall = getUserByTokenValidateBeforeCall(token, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get User by API Token (asynchronously) * Get the detailed user information corresponding to the API Token. * @param token API Token (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 OK -
*/ public okhttp3.Call getUserByTokenAsync(String token, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserByTokenValidateBeforeCall(token, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listAuthoritiesOfUser * @param username Username (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 OK -
*/ public okhttp3.Call listAuthoritiesOfUserCall(String username, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/admin/authority/{username}" .replace("{" + "username" + "}", localVarApiClient.escapeString(username.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" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listAuthoritiesOfUserValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling listAuthoritiesOfUser(Async)"); } return listAuthoritiesOfUserCall(username, _callback); } /** * List User Permissions * List the user's permissions. * @param username Username (required) * @return Set<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 OK -
*/ public Set listAuthoritiesOfUser(String username) throws ApiException { ApiResponse> localVarResp = listAuthoritiesOfUserWithHttpInfo(username); return localVarResp.getData(); } /** * List User Permissions * List the user's permissions. * @param username Username (required) * @return ApiResponse<Set<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 OK -
*/ public ApiResponse> listAuthoritiesOfUserWithHttpInfo(String username) throws ApiException { okhttp3.Call localVarCall = listAuthoritiesOfUserValidateBeforeCall(username, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List User Permissions (asynchronously) * List the user's permissions. * @param username Username (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 OK -
*/ public okhttp3.Call listAuthoritiesOfUserAsync(String username, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listAuthoritiesOfUserValidateBeforeCall(username, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listTokensOfUser * @param username Username (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 OK -
*/ public okhttp3.Call listTokensOfUserCall(String username, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/admin/token/{username}" .replace("{" + "username" + "}", localVarApiClient.escapeString(username.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" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listTokensOfUserValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling listTokensOfUser(Async)"); } return listTokensOfUserCall(username, _callback); } /** * Get API Token of User * Get the list of API Tokens of the user. * @param username Username (required) * @return List<ApiTokenInfoDTO> * @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 OK -
*/ public List listTokensOfUser(String username) throws ApiException { ApiResponse> localVarResp = listTokensOfUserWithHttpInfo(username); return localVarResp.getData(); } /** * Get API Token of User * Get the list of API Tokens of the user. * @param username Username (required) * @return ApiResponse<List<ApiTokenInfoDTO>> * @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 OK -
*/ public ApiResponse> listTokensOfUserWithHttpInfo(String username) throws ApiException { okhttp3.Call localVarCall = listTokensOfUserValidateBeforeCall(username, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get API Token of User (asynchronously) * Get the list of API Tokens of the user. * @param username Username (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 OK -
*/ public okhttp3.Call listTokensOfUserAsync(String username, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listTokensOfUserValidateBeforeCall(username, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listUsers * @param pageSize Maximum quantity (required) * @param pageNum Current page number (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 OK -
*/ public okhttp3.Call listUsersCall(Long pageSize, Long pageNum, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/admin/users/{pageSize}/{pageNum}" .replace("{" + "pageSize" + "}", localVarApiClient.escapeString(pageSize.toString())) .replace("{" + "pageNum" + "}", localVarApiClient.escapeString(pageNum.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" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUsersValidateBeforeCall(Long pageSize, Long pageNum, final ApiCallback _callback) throws ApiException { // verify the required parameter 'pageSize' is set if (pageSize == null) { throw new ApiException("Missing the required parameter 'pageSize' when calling listUsers(Async)"); } // verify the required parameter 'pageNum' is set if (pageNum == null) { throw new ApiException("Missing the required parameter 'pageNum' when calling listUsers(Async)"); } return listUsersCall(pageSize, pageNum, _callback); } /** * List User Information * Return user information by page, return the pageNum page, up to pageSize user information. * @param pageSize Maximum quantity (required) * @param pageNum Current page number (required) * @return List<UserBasicInfoDTO> * @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 OK -
*/ public List listUsers(Long pageSize, Long pageNum) throws ApiException { ApiResponse> localVarResp = listUsersWithHttpInfo(pageSize, pageNum); return localVarResp.getData(); } /** * List User Information * Return user information by page, return the pageNum page, up to pageSize user information. * @param pageSize Maximum quantity (required) * @param pageNum Current page number (required) * @return ApiResponse<List<UserBasicInfoDTO>> * @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 OK -
*/ public ApiResponse> listUsersWithHttpInfo(Long pageSize, Long pageNum) throws ApiException { okhttp3.Call localVarCall = listUsersValidateBeforeCall(pageSize, pageNum, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List User Information (asynchronously) * Return user information by page, return the pageNum page, up to pageSize user information. * @param pageSize Maximum quantity (required) * @param pageNum Current page number (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 OK -
*/ public okhttp3.Call listUsersAsync(Long pageSize, Long pageNum, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listUsersValidateBeforeCall(pageSize, pageNum, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listUsers1 * @param pageSize Maximum quantity (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 OK -
*/ public okhttp3.Call listUsers1Call(Long pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/admin/users/{pageSize}" .replace("{" + "pageSize" + "}", localVarApiClient.escapeString(pageSize.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" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUsers1ValidateBeforeCall(Long pageSize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'pageSize' is set if (pageSize == null) { throw new ApiException("Missing the required parameter 'pageSize' when calling listUsers1(Async)"); } return listUsers1Call(pageSize, _callback); } /** * List User Information * Return user information by page, return the pageNum page, up to pageSize user information. * @param pageSize Maximum quantity (required) * @return List<UserBasicInfoDTO> * @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 OK -
*/ public List listUsers1(Long pageSize) throws ApiException { ApiResponse> localVarResp = listUsers1WithHttpInfo(pageSize); return localVarResp.getData(); } /** * List User Information * Return user information by page, return the pageNum page, up to pageSize user information. * @param pageSize Maximum quantity (required) * @return ApiResponse<List<UserBasicInfoDTO>> * @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 OK -
*/ public ApiResponse> listUsers1WithHttpInfo(Long pageSize) throws ApiException { okhttp3.Call localVarCall = listUsers1ValidateBeforeCall(pageSize, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List User Information (asynchronously) * Return user information by page, return the pageNum page, up to pageSize user information. * @param pageSize Maximum quantity (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 OK -
*/ public okhttp3.Call listUsers1Async(Long pageSize, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listUsers1ValidateBeforeCall(pageSize, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listUsers2 * @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 OK -
*/ public okhttp3.Call listUsers2Call(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/admin/users"; 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" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUsers2ValidateBeforeCall(final ApiCallback _callback) throws ApiException { return listUsers2Call(_callback); } /** * List User Information * Return user information by page, return the pageNum page, up to pageSize user information. * @return List<UserBasicInfoDTO> * @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 OK -
*/ public List listUsers2() throws ApiException { ApiResponse> localVarResp = listUsers2WithHttpInfo(); return localVarResp.getData(); } /** * List User Information * Return user information by page, return the pageNum page, up to pageSize user information. * @return ApiResponse<List<UserBasicInfoDTO>> * @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 OK -
*/ public ApiResponse> listUsers2WithHttpInfo() throws ApiException { okhttp3.Call localVarCall = listUsers2ValidateBeforeCall(null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List User Information (asynchronously) * Return user information by page, return the pageNum page, up to pageSize user information. * @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 OK -
*/ public okhttp3.Call listUsers2Async(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listUsers2ValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateAuthoritiesOfUser * @param username Username (required) * @param requestBody Permission list (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 OK -
*/ public okhttp3.Call updateAuthoritiesOfUserCall(String username, Set requestBody, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = requestBody; // create path and map variables String localVarPath = "/api/v1/admin/authority/{username}" .replace("{" + "username" + "}", localVarApiClient.escapeString(username.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" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateAuthoritiesOfUserValidateBeforeCall(String username, Set requestBody, final ApiCallback _callback) throws ApiException { // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling updateAuthoritiesOfUser(Async)"); } // verify the required parameter 'requestBody' is set if (requestBody == null) { throw new ApiException("Missing the required parameter 'requestBody' when calling updateAuthoritiesOfUser(Async)"); } return updateAuthoritiesOfUserCall(username, requestBody, _callback); } /** * Update User Permissions * Update the user's permission list. * @param username Username (required) * @param requestBody Permission list (required) * @return Boolean * @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 OK -
*/ public Boolean updateAuthoritiesOfUser(String username, Set requestBody) throws ApiException { ApiResponse localVarResp = updateAuthoritiesOfUserWithHttpInfo(username, requestBody); return localVarResp.getData(); } /** * Update User Permissions * Update the user's permission list. * @param username Username (required) * @param requestBody Permission list (required) * @return ApiResponse<Boolean> * @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 OK -
*/ public ApiResponse updateAuthoritiesOfUserWithHttpInfo(String username, Set requestBody) throws ApiException { okhttp3.Call localVarCall = updateAuthoritiesOfUserValidateBeforeCall(username, requestBody, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update User Permissions (asynchronously) * Update the user's permission list. * @param username Username (required) * @param requestBody Permission list (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 OK -
*/ public okhttp3.Call updateAuthoritiesOfUserAsync(String username, Set requestBody, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateAuthoritiesOfUserValidateBeforeCall(username, requestBody, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateUser * @param userFullDetailsDTO User information (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 OK -
*/ public okhttp3.Call updateUserCall(UserFullDetailsDTO userFullDetailsDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = userFullDetailsDTO; // create path and map variables String localVarPath = "/api/v1/admin/user"; 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" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateUserValidateBeforeCall(UserFullDetailsDTO userFullDetailsDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'userFullDetailsDTO' is set if (userFullDetailsDTO == null) { throw new ApiException("Missing the required parameter 'userFullDetailsDTO' when calling updateUser(Async)"); } return updateUserCall(userFullDetailsDTO, _callback); } /** * Update User * Update user information. * @param userFullDetailsDTO User information (required) * @return Boolean * @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 OK -
*/ public Boolean updateUser(UserFullDetailsDTO userFullDetailsDTO) throws ApiException { ApiResponse localVarResp = updateUserWithHttpInfo(userFullDetailsDTO); return localVarResp.getData(); } /** * Update User * Update user information. * @param userFullDetailsDTO User information (required) * @return ApiResponse<Boolean> * @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 OK -
*/ public ApiResponse updateUserWithHttpInfo(UserFullDetailsDTO userFullDetailsDTO) throws ApiException { okhttp3.Call localVarCall = updateUserValidateBeforeCall(userFullDetailsDTO, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update User (asynchronously) * Update user information. * @param userFullDetailsDTO User information (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 OK -
*/ public okhttp3.Call updateUserAsync(UserFullDetailsDTO userFullDetailsDTO, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateUserValidateBeforeCall(userFullDetailsDTO, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy