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

software.tnb.jira.validation.generated.api.IssueResolutionsApi Maven / Gradle / Ivy

The newest version!
/*
 * The Jira Cloud platform REST API
 * Jira Cloud platform REST API documentation
 *
 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT
 * 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 software.tnb.jira.validation.generated.api;

import software.tnb.jira.validation.generated.ApiCallback;
import software.tnb.jira.validation.generated.ApiClient;
import software.tnb.jira.validation.generated.ApiException;
import software.tnb.jira.validation.generated.ApiResponse;
import software.tnb.jira.validation.generated.Configuration;
import software.tnb.jira.validation.generated.Pair;
import software.tnb.jira.validation.generated.ProgressRequestBody;
import software.tnb.jira.validation.generated.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import software.tnb.jira.validation.generated.model.CreateResolutionDetails;
import software.tnb.jira.validation.generated.model.ErrorCollection;
import software.tnb.jira.validation.generated.model.PageBeanResolutionJsonBean;
import software.tnb.jira.validation.generated.model.ReorderIssueResolutionsRequest;
import software.tnb.jira.validation.generated.model.Resolution;
import software.tnb.jira.validation.generated.model.ResolutionId;
import software.tnb.jira.validation.generated.model.SetDefaultResolutionRequest;
import software.tnb.jira.validation.generated.model.TaskProgressBeanObject;
import software.tnb.jira.validation.generated.model.UpdateResolutionDetails;

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

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

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

    public IssueResolutionsApi(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 createResolution
     * @param requestBody  (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
201 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
*/ public okhttp3.Call createResolutionCall(Map 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 = "/rest/api/3/resolution"; 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[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createResolutionValidateBeforeCall(Map requestBody, final ApiCallback _callback) throws ApiException { // verify the required parameter 'requestBody' is set if (requestBody == null) { throw new ApiException("Missing the required parameter 'requestBody' when calling createResolution(Async)"); } return createResolutionCall(requestBody, _callback); } /** * Create resolution * Creates an issue resolution. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param requestBody (required) * @return ResolutionId * @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
201 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
*/ public ResolutionId createResolution(Map requestBody) throws ApiException { ApiResponse localVarResp = createResolutionWithHttpInfo(requestBody); return localVarResp.getData(); } /** * Create resolution * Creates an issue resolution. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param requestBody (required) * @return ApiResponse<ResolutionId> * @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
201 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
*/ public ApiResponse createResolutionWithHttpInfo(Map requestBody) throws ApiException { okhttp3.Call localVarCall = createResolutionValidateBeforeCall(requestBody, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create resolution (asynchronously) * Creates an issue resolution. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param requestBody (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
201 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
*/ public okhttp3.Call createResolutionAsync(Map requestBody, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createResolutionValidateBeforeCall(requestBody, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteResolution * @param id The ID of the issue resolution. (required) * @param replaceWith The ID of the issue resolution that will replace the currently selected resolution. (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
303 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
409 Returned if a task to delete the issue resolution is already running. -
*/ public okhttp3.Call deleteResolutionCall(String id, String replaceWith, 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 = "/rest/api/3/resolution/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (replaceWith != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("replaceWith", replaceWith)); } 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[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteResolutionValidateBeforeCall(String id, String replaceWith, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteResolution(Async)"); } // verify the required parameter 'replaceWith' is set if (replaceWith == null) { throw new ApiException("Missing the required parameter 'replaceWith' when calling deleteResolution(Async)"); } return deleteResolutionCall(id, replaceWith, _callback); } /** * Delete resolution * Deletes an issue resolution. This operation is [asynchronous](#async). Follow the `location` link in the response to determine the status of the task and use [Get task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue resolution. (required) * @param replaceWith The ID of the issue resolution that will replace the currently selected resolution. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
303 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
409 Returned if a task to delete the issue resolution is already running. -
*/ public void deleteResolution(String id, String replaceWith) throws ApiException { deleteResolutionWithHttpInfo(id, replaceWith); } /** * Delete resolution * Deletes an issue resolution. This operation is [asynchronous](#async). Follow the `location` link in the response to determine the status of the task and use [Get task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue resolution. (required) * @param replaceWith The ID of the issue resolution that will replace the currently selected resolution. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
303 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
409 Returned if a task to delete the issue resolution is already running. -
*/ public ApiResponse deleteResolutionWithHttpInfo(String id, String replaceWith) throws ApiException { okhttp3.Call localVarCall = deleteResolutionValidateBeforeCall(id, replaceWith, null); return localVarApiClient.execute(localVarCall); } /** * Delete resolution (asynchronously) * Deletes an issue resolution. This operation is [asynchronous](#async). Follow the `location` link in the response to determine the status of the task and use [Get task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue resolution. (required) * @param replaceWith The ID of the issue resolution that will replace the currently selected resolution. (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
303 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
409 Returned if a task to delete the issue resolution is already running. -
*/ public okhttp3.Call deleteResolutionAsync(String id, String replaceWith, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteResolutionValidateBeforeCall(id, replaceWith, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getResolution * @param id The ID of the issue resolution value. (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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the issue resolution value is not found. -
* @deprecated */ @Deprecated public okhttp3.Call getResolutionCall(String id, 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 = "/rest/api/3/resolution/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/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[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call getResolutionValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getResolution(Async)"); } return getResolutionCall(id, _callback); } /** * Get resolution * Returns an issue resolution value. **[Permissions](#permissions) required:** Permission to access Jira. * @param id The ID of the issue resolution value. (required) * @return Resolution * @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the issue resolution value is not found. -
* @deprecated */ @Deprecated public Resolution getResolution(String id) throws ApiException { ApiResponse localVarResp = getResolutionWithHttpInfo(id); return localVarResp.getData(); } /** * Get resolution * Returns an issue resolution value. **[Permissions](#permissions) required:** Permission to access Jira. * @param id The ID of the issue resolution value. (required) * @return ApiResponse<Resolution> * @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the issue resolution value is not found. -
* @deprecated */ @Deprecated public ApiResponse getResolutionWithHttpInfo(String id) throws ApiException { okhttp3.Call localVarCall = getResolutionValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get resolution (asynchronously) * Returns an issue resolution value. **[Permissions](#permissions) required:** Permission to access Jira. * @param id The ID of the issue resolution value. (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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the issue resolution value is not found. -
* @deprecated */ @Deprecated public okhttp3.Call getResolutionAsync(String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getResolutionValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getResolutions * @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
* @deprecated */ @Deprecated public okhttp3.Call getResolutionsCall(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 = "/rest/api/3/resolution"; 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[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call getResolutionsValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getResolutionsCall(_callback); } /** * Get resolutions * Returns a list of all issue resolution values. **[Permissions](#permissions) required:** Permission to access Jira. * @return List<Resolution> * @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
* @deprecated */ @Deprecated public List getResolutions() throws ApiException { ApiResponse> localVarResp = getResolutionsWithHttpInfo(); return localVarResp.getData(); } /** * Get resolutions * Returns a list of all issue resolution values. **[Permissions](#permissions) required:** Permission to access Jira. * @return ApiResponse<List<Resolution>> * @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
* @deprecated */ @Deprecated public ApiResponse> getResolutionsWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getResolutionsValidateBeforeCall(null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get resolutions (asynchronously) * Returns a list of all issue resolution values. **[Permissions](#permissions) required:** Permission to access Jira. * @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
* @deprecated */ @Deprecated public okhttp3.Call getResolutionsAsync(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getResolutionsValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for moveResolutions * @param reorderIssueResolutionsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
*/ public okhttp3.Call moveResolutionsCall(ReorderIssueResolutionsRequest reorderIssueResolutionsRequest, 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 = reorderIssueResolutionsRequest; // create path and map variables String localVarPath = "/rest/api/3/resolution/move"; 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[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call moveResolutionsValidateBeforeCall(ReorderIssueResolutionsRequest reorderIssueResolutionsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'reorderIssueResolutionsRequest' is set if (reorderIssueResolutionsRequest == null) { throw new ApiException("Missing the required parameter 'reorderIssueResolutionsRequest' when calling moveResolutions(Async)"); } return moveResolutionsCall(reorderIssueResolutionsRequest, _callback); } /** * Move resolutions * Changes the order of issue resolutions. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param reorderIssueResolutionsRequest (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
*/ public Object moveResolutions(ReorderIssueResolutionsRequest reorderIssueResolutionsRequest) throws ApiException { ApiResponse localVarResp = moveResolutionsWithHttpInfo(reorderIssueResolutionsRequest); return localVarResp.getData(); } /** * Move resolutions * Changes the order of issue resolutions. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param reorderIssueResolutionsRequest (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
*/ public ApiResponse moveResolutionsWithHttpInfo(ReorderIssueResolutionsRequest reorderIssueResolutionsRequest) throws ApiException { okhttp3.Call localVarCall = moveResolutionsValidateBeforeCall(reorderIssueResolutionsRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Move resolutions (asynchronously) * Changes the order of issue resolutions. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param reorderIssueResolutionsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
*/ public okhttp3.Call moveResolutionsAsync(ReorderIssueResolutionsRequest reorderIssueResolutionsRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = moveResolutionsValidateBeforeCall(reorderIssueResolutionsRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchResolutions * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 50) * @param id The list of resolutions IDs to be filtered out (optional) * @param onlyDefault When set to true, return default only, when IDs provided, if none of them is default, return empty page. Default value is false (optional, default to false) * @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call searchResolutionsCall(Long startAt, Integer maxResults, List id, Boolean onlyDefault, 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 = "/rest/api/3/resolution/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (startAt != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAt", startAt)); } if (maxResults != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxResults", maxResults)); } if (id != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "id", id)); } if (onlyDefault != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("onlyDefault", onlyDefault)); } 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[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call searchResolutionsValidateBeforeCall(Long startAt, Integer maxResults, List id, Boolean onlyDefault, final ApiCallback _callback) throws ApiException { return searchResolutionsCall(startAt, maxResults, id, onlyDefault, _callback); } /** * Search resolutions * Returns a [paginated](#pagination) list of resolutions. The list can contain all resolutions or a subset determined by any combination of these criteria: * a list of resolutions IDs. * whether the field configuration is a default. This returns resolutions from company-managed (classic) projects only, as there is no concept of default resolutions in team-managed projects. **[Permissions](#permissions) required:** Permission to access Jira. * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 50) * @param id The list of resolutions IDs to be filtered out (optional) * @param onlyDefault When set to true, return default only, when IDs provided, if none of them is default, return empty page. Default value is false (optional, default to false) * @return PageBeanResolutionJsonBean * @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public PageBeanResolutionJsonBean searchResolutions(Long startAt, Integer maxResults, List id, Boolean onlyDefault) throws ApiException { ApiResponse localVarResp = searchResolutionsWithHttpInfo(startAt, maxResults, id, onlyDefault); return localVarResp.getData(); } /** * Search resolutions * Returns a [paginated](#pagination) list of resolutions. The list can contain all resolutions or a subset determined by any combination of these criteria: * a list of resolutions IDs. * whether the field configuration is a default. This returns resolutions from company-managed (classic) projects only, as there is no concept of default resolutions in team-managed projects. **[Permissions](#permissions) required:** Permission to access Jira. * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 50) * @param id The list of resolutions IDs to be filtered out (optional) * @param onlyDefault When set to true, return default only, when IDs provided, if none of them is default, return empty page. Default value is false (optional, default to false) * @return ApiResponse<PageBeanResolutionJsonBean> * @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public ApiResponse searchResolutionsWithHttpInfo(Long startAt, Integer maxResults, List id, Boolean onlyDefault) throws ApiException { okhttp3.Call localVarCall = searchResolutionsValidateBeforeCall(startAt, maxResults, id, onlyDefault, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Search resolutions (asynchronously) * Returns a [paginated](#pagination) list of resolutions. The list can contain all resolutions or a subset determined by any combination of these criteria: * a list of resolutions IDs. * whether the field configuration is a default. This returns resolutions from company-managed (classic) projects only, as there is no concept of default resolutions in team-managed projects. **[Permissions](#permissions) required:** Permission to access Jira. * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 50) * @param id The list of resolutions IDs to be filtered out (optional) * @param onlyDefault When set to true, return default only, when IDs provided, if none of them is default, return empty page. Default value is false (optional, default to false) * @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call searchResolutionsAsync(Long startAt, Integer maxResults, List id, Boolean onlyDefault, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = searchResolutionsValidateBeforeCall(startAt, maxResults, id, onlyDefault, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for setDefaultResolution * @param setDefaultResolutionRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
*/ public okhttp3.Call setDefaultResolutionCall(SetDefaultResolutionRequest setDefaultResolutionRequest, 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 = setDefaultResolutionRequest; // create path and map variables String localVarPath = "/rest/api/3/resolution/default"; 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[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call setDefaultResolutionValidateBeforeCall(SetDefaultResolutionRequest setDefaultResolutionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'setDefaultResolutionRequest' is set if (setDefaultResolutionRequest == null) { throw new ApiException("Missing the required parameter 'setDefaultResolutionRequest' when calling setDefaultResolution(Async)"); } return setDefaultResolutionCall(setDefaultResolutionRequest, _callback); } /** * Set default resolution * Sets default issue resolution. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param setDefaultResolutionRequest (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
*/ public Object setDefaultResolution(SetDefaultResolutionRequest setDefaultResolutionRequest) throws ApiException { ApiResponse localVarResp = setDefaultResolutionWithHttpInfo(setDefaultResolutionRequest); return localVarResp.getData(); } /** * Set default resolution * Sets default issue resolution. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param setDefaultResolutionRequest (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
*/ public ApiResponse setDefaultResolutionWithHttpInfo(SetDefaultResolutionRequest setDefaultResolutionRequest) throws ApiException { okhttp3.Call localVarCall = setDefaultResolutionValidateBeforeCall(setDefaultResolutionRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Set default resolution (asynchronously) * Sets default issue resolution. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param setDefaultResolutionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
*/ public okhttp3.Call setDefaultResolutionAsync(SetDefaultResolutionRequest setDefaultResolutionRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = setDefaultResolutionValidateBeforeCall(setDefaultResolutionRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateResolution * @param id The ID of the issue resolution. (required) * @param requestBody (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
*/ public okhttp3.Call updateResolutionCall(String id, Map 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 = "/rest/api/3/resolution/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/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[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateResolutionValidateBeforeCall(String id, Map requestBody, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateResolution(Async)"); } // verify the required parameter 'requestBody' is set if (requestBody == null) { throw new ApiException("Missing the required parameter 'requestBody' when calling updateResolution(Async)"); } return updateResolutionCall(id, requestBody, _callback); } /** * Update resolution * Updates an issue resolution. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue resolution. (required) * @param requestBody (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
*/ public Object updateResolution(String id, Map requestBody) throws ApiException { ApiResponse localVarResp = updateResolutionWithHttpInfo(id, requestBody); return localVarResp.getData(); } /** * Update resolution * Updates an issue resolution. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue resolution. (required) * @param requestBody (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
*/ public ApiResponse updateResolutionWithHttpInfo(String id, Map requestBody) throws ApiException { okhttp3.Call localVarCall = updateResolutionValidateBeforeCall(id, requestBody, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update resolution (asynchronously) * Updates an issue resolution. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue resolution. (required) * @param requestBody (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the issue resolution isn't found. -
*/ public okhttp3.Call updateResolutionAsync(String id, Map requestBody, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateResolutionValidateBeforeCall(id, requestBody, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }