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

com.formkiq.client.api.DocumentSharesApi Maven / Gradle / Ivy

The newest version!
/*
 * FormKiQ HTTP API Formkiq API: Document Management Platform API using JWT Authentication
 *
 * The version of the OpenAPI document: 1.12.0 Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech Do not edit the class manually.
 */


package com.formkiq.client.api;

import com.formkiq.client.invoker.ApiCallback;
import com.formkiq.client.invoker.ApiClient;
import com.formkiq.client.invoker.ApiException;
import com.formkiq.client.invoker.ApiResponse;
import com.formkiq.client.invoker.Configuration;
import com.formkiq.client.invoker.Pair;
import com.formkiq.client.invoker.ProgressRequestBody;
import com.formkiq.client.invoker.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.formkiq.client.model.AddFolderShareRequest;
import com.formkiq.client.model.AddFolderShareResponse;
import com.formkiq.client.model.DeleteShareResponse;
import com.formkiq.client.model.GetUserShares;
import com.formkiq.client.model.ValidationErrorsResponse;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;

public class DocumentSharesApi {
  private ApiClient localVarApiClient;
  private int localHostIndex;
  private String localCustomBaseUrl;

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

  public DocumentSharesApi(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 addFolderShare
   * 
   * @param indexKey Index Key Identifier (required)
   * @param addFolderShareRequest (required)
   * @param siteId Site Identifier (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 CodeDescriptionResponse Headers
201201 CREATED* Access-Control-Allow-Origin -
* * Access-Control-Allow-Methods -
* * Access-Control-Allow-Headers -
*
400400 OK-
*/ public okhttp3.Call addFolderShareCall(String indexKey, AddFolderShareRequest addFolderShareRequest, String siteId, 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 = addFolderShareRequest; // create path and map variables String localVarPath = "/shares/folders/{indexKey}".replace("{" + "indexKey" + "}", localVarApiClient.escapeString(indexKey.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (siteId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("siteId", siteId)); } 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[] {"AWS4Auth"}; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addFolderShareValidateBeforeCall(String indexKey, AddFolderShareRequest addFolderShareRequest, String siteId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'indexKey' is set if (indexKey == null) { throw new ApiException( "Missing the required parameter 'indexKey' when calling addFolderShare(Async)"); } // verify the required parameter 'addFolderShareRequest' is set if (addFolderShareRequest == null) { throw new ApiException( "Missing the required parameter 'addFolderShareRequest' when calling addFolderShare(Async)"); } return addFolderShareCall(indexKey, addFolderShareRequest, siteId, _callback); } /** * * Creates a new folder share; ONLY available with FormKiQ Enterprise * * @param indexKey Index Key Identifier (required) * @param addFolderShareRequest (required) * @param siteId Site Identifier (optional) * @return AddFolderShareResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * * * * * * * * * * * * * * *
Status CodeDescriptionResponse Headers
201201 CREATED* Access-Control-Allow-Origin -
* * Access-Control-Allow-Methods -
* * Access-Control-Allow-Headers -
*
400400 OK-
*/ public AddFolderShareResponse addFolderShare(String indexKey, AddFolderShareRequest addFolderShareRequest, String siteId) throws ApiException { ApiResponse localVarResp = addFolderShareWithHttpInfo(indexKey, addFolderShareRequest, siteId); return localVarResp.getData(); } /** * * Creates a new folder share; ONLY available with FormKiQ Enterprise * * @param indexKey Index Key Identifier (required) * @param addFolderShareRequest (required) * @param siteId Site Identifier (optional) * @return ApiResponse<AddFolderShareResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * * * * * * * * * * * * * * *
Status CodeDescriptionResponse Headers
201201 CREATED* Access-Control-Allow-Origin -
* * Access-Control-Allow-Methods -
* * Access-Control-Allow-Headers -
*
400400 OK-
*/ public ApiResponse addFolderShareWithHttpInfo(String indexKey, AddFolderShareRequest addFolderShareRequest, String siteId) throws ApiException { okhttp3.Call localVarCall = addFolderShareValidateBeforeCall(indexKey, addFolderShareRequest, siteId, null); Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) Creates a new folder share; ONLY available with FormKiQ Enterprise * * @param indexKey Index Key Identifier (required) * @param addFolderShareRequest (required) * @param siteId Site Identifier (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 CodeDescriptionResponse Headers
201201 CREATED* Access-Control-Allow-Origin -
* * Access-Control-Allow-Methods -
* * Access-Control-Allow-Headers -
*
400400 OK-
*/ public okhttp3.Call addFolderShareAsync(String indexKey, AddFolderShareRequest addFolderShareRequest, String siteId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addFolderShareValidateBeforeCall(indexKey, addFolderShareRequest, siteId, _callback); Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteShare * * @param shareKey Share Identifier (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 CodeDescriptionResponse Headers
200200 OK* Access-Control-Allow-Origin -
* * Access-Control-Allow-Methods -
* * Access-Control-Allow-Headers -
*
*/ public okhttp3.Call deleteShareCall(String shareKey, 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 = "/shares/{shareKey}".replace("{" + "shareKey" + "}", localVarApiClient.escapeString(shareKey.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[] {"AWS4Auth"}; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteShareValidateBeforeCall(String shareKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'shareKey' is set if (shareKey == null) { throw new ApiException( "Missing the required parameter 'shareKey' when calling deleteShare(Async)"); } return deleteShareCall(shareKey, _callback); } /** * * Delete a specific document share; ONLY available with FormKiQ Enterprise * * @param shareKey Share Identifier (required) * @return DeleteShareResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * * * * * * * * * *
Status CodeDescriptionResponse Headers
200200 OK* Access-Control-Allow-Origin -
* * Access-Control-Allow-Methods -
* * Access-Control-Allow-Headers -
*
*/ public DeleteShareResponse deleteShare(String shareKey) throws ApiException { ApiResponse localVarResp = deleteShareWithHttpInfo(shareKey); return localVarResp.getData(); } /** * * Delete a specific document share; ONLY available with FormKiQ Enterprise * * @param shareKey Share Identifier (required) * @return ApiResponse<DeleteShareResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * * * * * * * * * *
Status CodeDescriptionResponse Headers
200200 OK* Access-Control-Allow-Origin -
* * Access-Control-Allow-Methods -
* * Access-Control-Allow-Headers -
*
*/ public ApiResponse deleteShareWithHttpInfo(String shareKey) throws ApiException { okhttp3.Call localVarCall = deleteShareValidateBeforeCall(shareKey, null); Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) Delete a specific document share; ONLY available with FormKiQ Enterprise * * @param shareKey Share Identifier (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 CodeDescriptionResponse Headers
200200 OK* Access-Control-Allow-Origin -
* * Access-Control-Allow-Methods -
* * Access-Control-Allow-Headers -
*
*/ public okhttp3.Call deleteShareAsync(String shareKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteShareValidateBeforeCall(shareKey, _callback); Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getUserShares * * @param group Group Identifier (optional) * @param limit Limit Results (optional, default to 10) * @param next Next page of results token (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 CodeDescriptionResponse Headers
200200 OK* Access-Control-Allow-Origin -
* * Access-Control-Allow-Methods -
* * Access-Control-Allow-Headers -
*
*/ public okhttp3.Call getUserSharesCall(String group, String limit, String next, 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 = "/shares"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (group != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("group", group)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (next != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("next", next)); } 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[] {"AWS4Auth"}; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getUserSharesValidateBeforeCall(String group, String limit, String next, final ApiCallback _callback) throws ApiException { return getUserSharesCall(group, limit, next, _callback); } /** * * Get a listing of user folder/document shares; ONLY available with FormKiQ Enterprise * * @param group Group Identifier (optional) * @param limit Limit Results (optional, default to 10) * @param next Next page of results token (optional) * @return GetUserShares * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * * * * * * * * * *
Status CodeDescriptionResponse Headers
200200 OK* Access-Control-Allow-Origin -
* * Access-Control-Allow-Methods -
* * Access-Control-Allow-Headers -
*
*/ public GetUserShares getUserShares(String group, String limit, String next) throws ApiException { ApiResponse localVarResp = getUserSharesWithHttpInfo(group, limit, next); return localVarResp.getData(); } /** * * Get a listing of user folder/document shares; ONLY available with FormKiQ Enterprise * * @param group Group Identifier (optional) * @param limit Limit Results (optional, default to 10) * @param next Next page of results token (optional) * @return ApiResponse<GetUserShares> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * * * * * * * * * *
Status CodeDescriptionResponse Headers
200200 OK* Access-Control-Allow-Origin -
* * Access-Control-Allow-Methods -
* * Access-Control-Allow-Headers -
*
*/ public ApiResponse getUserSharesWithHttpInfo(String group, String limit, String next) throws ApiException { okhttp3.Call localVarCall = getUserSharesValidateBeforeCall(group, limit, next, null); Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) Get a listing of user folder/document shares; ONLY available with FormKiQ * Enterprise * * @param group Group Identifier (optional) * @param limit Limit Results (optional, default to 10) * @param next Next page of results token (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 CodeDescriptionResponse Headers
200200 OK* Access-Control-Allow-Origin -
* * Access-Control-Allow-Methods -
* * Access-Control-Allow-Headers -
*
*/ public okhttp3.Call getUserSharesAsync(String group, String limit, String next, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserSharesValidateBeforeCall(group, limit, next, _callback); Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy