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

com.dropbox.sign.api.ApiAppApi Maven / Gradle / Ivy

Go to download

Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds!

The newest version!
package com.dropbox.sign.api;

import com.dropbox.sign.ApiException;
import com.dropbox.sign.ApiClient;
import com.dropbox.sign.ApiResponse;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.Pair;

import jakarta.ws.rs.core.GenericType;

import com.dropbox.sign.model.ApiAppCreateRequest;
import com.dropbox.sign.model.ApiAppGetResponse;
import com.dropbox.sign.model.ApiAppListResponse;
import com.dropbox.sign.model.ApiAppUpdateRequest;
import com.dropbox.sign.model.ErrorResponse;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0")
public class ApiAppApi {
  private ApiClient apiClient;

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

  public ApiAppApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  /**
   * Get the API client
   *
   * @return API client
   */
  public ApiClient getApiClient() {
    return apiClient;
  }

  /**
   * Set the API client
   *
   * @param apiClient an instance of API client
   */
  public void setApiClient(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  /**
   * Create API App.
   * Creates a new API App.
   * @param apiAppCreateRequest  (required)
   * @return ApiAppGetResponse
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiAppGetResponse apiAppCreate(ApiAppCreateRequest apiAppCreateRequest) throws ApiException { return apiAppCreateWithHttpInfo(apiAppCreateRequest).getData(); } /** * Create API App. * Creates a new API App. * @param apiAppCreateRequest (required) * @return ApiResponse<ApiAppGetResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse apiAppCreateWithHttpInfo(ApiAppCreateRequest apiAppCreateRequest) throws ApiException { // Check required parameters if (apiAppCreateRequest == null) { throw new ApiException(400, "Missing the required parameter 'apiAppCreateRequest' when calling apiAppCreate"); } String localVarAccept = apiClient.selectHeaderAccept("application/json"); Map localVarFormParams = new LinkedHashMap<>(); localVarFormParams = apiAppCreateRequest.createFormData(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType("application/json", "multipart/form-data"); String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI( "ApiAppApi.apiAppCreate", "/api_app", "POST", new ArrayList<>(), isFileTypeFound ? null : apiAppCreateRequest, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false ); } /** * Delete API App. * Deletes an API App. Can only be invoked for apps you own. * @param clientId The client id of the API App to delete. (required) * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public void apiAppDelete(String clientId) throws ApiException { apiAppDeleteWithHttpInfo(clientId); } /** * Delete API App. * Deletes an API App. Can only be invoked for apps you own. * @param clientId The client id of the API App to delete. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse apiAppDeleteWithHttpInfo(String clientId) throws ApiException { // Check required parameters if (clientId == null) { throw new ApiException(400, "Missing the required parameter 'clientId' when calling apiAppDelete"); } // Path parameters String localVarPath = "/api_app/{client_id}" .replaceAll("\\{client_id}", apiClient.escapeString(clientId.toString())); String localVarAccept = apiClient.selectHeaderAccept("application/json"); Map localVarFormParams = new LinkedHashMap<>(); localVarFormParams = new HashMap(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(); String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; return apiClient.invokeAPI( "ApiAppApi.apiAppDelete", localVarPath, "DELETE", new ArrayList<>(), null, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null, false ); } /** * Get API App. * Returns an object with information about an API App. * @param clientId The client id of the API App to retrieve. (required) * @return ApiAppGetResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiAppGetResponse apiAppGet(String clientId) throws ApiException { return apiAppGetWithHttpInfo(clientId).getData(); } /** * Get API App. * Returns an object with information about an API App. * @param clientId The client id of the API App to retrieve. (required) * @return ApiResponse<ApiAppGetResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse apiAppGetWithHttpInfo(String clientId) throws ApiException { // Check required parameters if (clientId == null) { throw new ApiException(400, "Missing the required parameter 'clientId' when calling apiAppGet"); } // Path parameters String localVarPath = "/api_app/{client_id}" .replaceAll("\\{client_id}", apiClient.escapeString(clientId.toString())); String localVarAccept = apiClient.selectHeaderAccept("application/json"); Map localVarFormParams = new LinkedHashMap<>(); localVarFormParams = new HashMap(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(); String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI( "ApiAppApi.apiAppGet", localVarPath, "GET", new ArrayList<>(), null, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false ); } /** * List API Apps. * Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. * @param page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * @return ApiAppListResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiAppListResponse apiAppList(Integer page, Integer pageSize) throws ApiException { return apiAppListWithHttpInfo(page, pageSize).getData(); } /** * @see ApiAppApi#apiAppList(Integer, Integer) */ public ApiAppListResponse apiAppList() throws ApiException { Integer page = 1; Integer pageSize = 20; return apiAppListWithHttpInfo(page, pageSize).getData(); } /** * @see ApiAppApi#apiAppListWithHttpInfo(Integer, Integer) */ public ApiResponse apiAppListWithHttpInfo() throws ApiException { Integer page = 1; Integer pageSize = 20; return apiAppListWithHttpInfo(page, pageSize); } /** * @see ApiAppApi#apiAppList(Integer, Integer) */ public ApiAppListResponse apiAppList(Integer page) throws ApiException { Integer pageSize = 20; return apiAppListWithHttpInfo(page, pageSize).getData(); } /** * @see ApiAppApi#apiAppListWithHttpInfo(Integer, Integer) */ public ApiResponse apiAppListWithHttpInfo(Integer page) throws ApiException { Integer pageSize = 20; return apiAppListWithHttpInfo(page, pageSize); } /** * List API Apps. * Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. * @param page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * @return ApiResponse<ApiAppListResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse apiAppListWithHttpInfo(Integer page, Integer pageSize) throws ApiException { if (page == null) { page = 1; } if (pageSize == null) { pageSize = 20; } // Query parameters List localVarQueryParams = new ArrayList<>( apiClient.parameterToPairs("", "page", page) ); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); String localVarAccept = apiClient.selectHeaderAccept("application/json"); Map localVarFormParams = new LinkedHashMap<>(); localVarFormParams = new HashMap(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(); String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI( "ApiAppApi.apiAppList", "/api_app/list", "GET", localVarQueryParams, null, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false ); } /** * Update API App. * Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string. * @param clientId The client id of the API App to update. (required) * @param apiAppUpdateRequest (required) * @return ApiAppGetResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiAppGetResponse apiAppUpdate(String clientId, ApiAppUpdateRequest apiAppUpdateRequest) throws ApiException { return apiAppUpdateWithHttpInfo(clientId, apiAppUpdateRequest).getData(); } /** * Update API App. * Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string. * @param clientId The client id of the API App to update. (required) * @param apiAppUpdateRequest (required) * @return ApiResponse<ApiAppGetResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse apiAppUpdateWithHttpInfo(String clientId, ApiAppUpdateRequest apiAppUpdateRequest) throws ApiException { // Check required parameters if (clientId == null) { throw new ApiException(400, "Missing the required parameter 'clientId' when calling apiAppUpdate"); } if (apiAppUpdateRequest == null) { throw new ApiException(400, "Missing the required parameter 'apiAppUpdateRequest' when calling apiAppUpdate"); } // Path parameters String localVarPath = "/api_app/{client_id}" .replaceAll("\\{client_id}", apiClient.escapeString(clientId.toString())); String localVarAccept = apiClient.selectHeaderAccept("application/json"); Map localVarFormParams = new LinkedHashMap<>(); localVarFormParams = apiAppUpdateRequest.createFormData(); boolean isFileTypeFound = !localVarFormParams.isEmpty(); String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType("application/json", "multipart/form-data"); String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI( "ApiAppApi.apiAppUpdate", localVarPath, "PUT", new ArrayList<>(), isFileTypeFound ? null : apiAppUpdateRequest, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false ); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy