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

software.tnb.jira.validation.generated.api.IssuePrioritiesApi 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.CreatePriorityDetails;
import software.tnb.jira.validation.generated.model.ErrorCollection;
import software.tnb.jira.validation.generated.model.PageBeanPriority;
import software.tnb.jira.validation.generated.model.Priority;
import software.tnb.jira.validation.generated.model.PriorityId;
import software.tnb.jira.validation.generated.model.ReorderIssuePriorities;
import software.tnb.jira.validation.generated.model.SetDefaultPriorityRequest;
import software.tnb.jira.validation.generated.model.TaskProgressBeanObject;
import software.tnb.jira.validation.generated.model.UpdatePriorityDetails;

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

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

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

    public IssuePrioritiesApi(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 createPriority
     * @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 createPriorityCall(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/priority"; 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 createPriorityValidateBeforeCall(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 createPriority(Async)"); } return createPriorityCall(requestBody, _callback); } /** * Create priority * Creates an issue priority. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param requestBody (required) * @return PriorityId * @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 PriorityId createPriority(Map requestBody) throws ApiException { ApiResponse localVarResp = createPriorityWithHttpInfo(requestBody); return localVarResp.getData(); } /** * Create priority * Creates an issue priority. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param requestBody (required) * @return ApiResponse<PriorityId> * @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 createPriorityWithHttpInfo(Map requestBody) throws ApiException { okhttp3.Call localVarCall = createPriorityValidateBeforeCall(requestBody, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create priority (asynchronously) * Creates an issue priority. **[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 createPriorityAsync(Map requestBody, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createPriorityValidateBeforeCall(requestBody, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deletePriority * @param id The ID of the issue priority. (required) * @param replaceWith The ID of the issue priority 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 priority isn't found. -
409 Returned if a task to delete the issue priority is already running. -
*/ public okhttp3.Call deletePriorityCall(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/priority/{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 deletePriorityValidateBeforeCall(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 deletePriority(Async)"); } // verify the required parameter 'replaceWith' is set if (replaceWith == null) { throw new ApiException("Missing the required parameter 'replaceWith' when calling deletePriority(Async)"); } return deletePriorityCall(id, replaceWith, _callback); } /** * Delete priority * Deletes an issue priority. 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 priority. (required) * @param replaceWith The ID of the issue priority 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 priority isn't found. -
409 Returned if a task to delete the issue priority is already running. -
*/ public void deletePriority(String id, String replaceWith) throws ApiException { deletePriorityWithHttpInfo(id, replaceWith); } /** * Delete priority * Deletes an issue priority. 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 priority. (required) * @param replaceWith The ID of the issue priority 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 priority isn't found. -
409 Returned if a task to delete the issue priority is already running. -
*/ public ApiResponse deletePriorityWithHttpInfo(String id, String replaceWith) throws ApiException { okhttp3.Call localVarCall = deletePriorityValidateBeforeCall(id, replaceWith, null); return localVarApiClient.execute(localVarCall); } /** * Delete priority (asynchronously) * Deletes an issue priority. 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 priority. (required) * @param replaceWith The ID of the issue priority 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 priority isn't found. -
409 Returned if a task to delete the issue priority is already running. -
*/ public okhttp3.Call deletePriorityAsync(String id, String replaceWith, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deletePriorityValidateBeforeCall(id, replaceWith, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getPriorities * @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. -
* @deprecated */ @Deprecated public okhttp3.Call getPrioritiesCall(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/priority"; 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 getPrioritiesValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getPrioritiesCall(_callback); } /** * Get priorities * Returns the list of all issue priorities. **[Permissions](#permissions) required:** Permission to access Jira. * @return List<Priority> * @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. -
* @deprecated */ @Deprecated public List getPriorities() throws ApiException { ApiResponse> localVarResp = getPrioritiesWithHttpInfo(); return localVarResp.getData(); } /** * Get priorities * Returns the list of all issue priorities. **[Permissions](#permissions) required:** Permission to access Jira. * @return ApiResponse<List<Priority>> * @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. -
* @deprecated */ @Deprecated public ApiResponse> getPrioritiesWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getPrioritiesValidateBeforeCall(null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get priorities (asynchronously) * Returns the list of all issue priorities. **[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. -
* @deprecated */ @Deprecated public okhttp3.Call getPrioritiesAsync(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getPrioritiesValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getPriority * @param id The ID of the issue priority. (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. -
404 Returned if the issue priority isn't found. -
* @deprecated */ @Deprecated public okhttp3.Call getPriorityCall(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/priority/{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 getPriorityValidateBeforeCall(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 getPriority(Async)"); } return getPriorityCall(id, _callback); } /** * Get priority * Returns an issue priority. **[Permissions](#permissions) required:** Permission to access Jira. * @param id The ID of the issue priority. (required) * @return Priority * @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. -
404 Returned if the issue priority isn't found. -
* @deprecated */ @Deprecated public Priority getPriority(String id) throws ApiException { ApiResponse localVarResp = getPriorityWithHttpInfo(id); return localVarResp.getData(); } /** * Get priority * Returns an issue priority. **[Permissions](#permissions) required:** Permission to access Jira. * @param id The ID of the issue priority. (required) * @return ApiResponse<Priority> * @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. -
404 Returned if the issue priority isn't found. -
* @deprecated */ @Deprecated public ApiResponse getPriorityWithHttpInfo(String id) throws ApiException { okhttp3.Call localVarCall = getPriorityValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get priority (asynchronously) * Returns an issue priority. **[Permissions](#permissions) required:** Permission to access Jira. * @param id The ID of the issue priority. (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. -
404 Returned if the issue priority isn't found. -
* @deprecated */ @Deprecated public okhttp3.Call getPriorityAsync(String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPriorityValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for movePriorities * @param reorderIssuePriorities (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 priority isn't found. -
*/ public okhttp3.Call movePrioritiesCall(ReorderIssuePriorities reorderIssuePriorities, 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 = reorderIssuePriorities; // create path and map variables String localVarPath = "/rest/api/3/priority/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 movePrioritiesValidateBeforeCall(ReorderIssuePriorities reorderIssuePriorities, final ApiCallback _callback) throws ApiException { // verify the required parameter 'reorderIssuePriorities' is set if (reorderIssuePriorities == null) { throw new ApiException("Missing the required parameter 'reorderIssuePriorities' when calling movePriorities(Async)"); } return movePrioritiesCall(reorderIssuePriorities, _callback); } /** * Move priorities * Changes the order of issue priorities. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param reorderIssuePriorities (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 priority isn't found. -
*/ public Object movePriorities(ReorderIssuePriorities reorderIssuePriorities) throws ApiException { ApiResponse localVarResp = movePrioritiesWithHttpInfo(reorderIssuePriorities); return localVarResp.getData(); } /** * Move priorities * Changes the order of issue priorities. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param reorderIssuePriorities (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 priority isn't found. -
*/ public ApiResponse movePrioritiesWithHttpInfo(ReorderIssuePriorities reorderIssuePriorities) throws ApiException { okhttp3.Call localVarCall = movePrioritiesValidateBeforeCall(reorderIssuePriorities, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Move priorities (asynchronously) * Changes the order of issue priorities. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param reorderIssuePriorities (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 priority isn't found. -
*/ public okhttp3.Call movePrioritiesAsync(ReorderIssuePriorities reorderIssuePriorities, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = movePrioritiesValidateBeforeCall(reorderIssuePriorities, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for searchPriorities * @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 priority IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=2&id=3`. (optional) * @param onlyDefault Whether only the default priority is returned. (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 searchPrioritiesCall(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/priority/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 searchPrioritiesValidateBeforeCall(Long startAt, Integer maxResults, List id, Boolean onlyDefault, final ApiCallback _callback) throws ApiException { return searchPrioritiesCall(startAt, maxResults, id, onlyDefault, _callback); } /** * Search priorities * Returns a [paginated](#pagination) list of priorities. The list can contain all priorities or a subset determined by any combination of these criteria: * a list of priority IDs. Any invalid priority IDs are ignored. * whether the field configuration is a default. This returns priorities from company-managed (classic) projects only, as there is no concept of default priorities 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 priority IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=2&id=3`. (optional) * @param onlyDefault Whether only the default priority is returned. (optional, default to false) * @return PageBeanPriority * @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 PageBeanPriority searchPriorities(Long startAt, Integer maxResults, List id, Boolean onlyDefault) throws ApiException { ApiResponse localVarResp = searchPrioritiesWithHttpInfo(startAt, maxResults, id, onlyDefault); return localVarResp.getData(); } /** * Search priorities * Returns a [paginated](#pagination) list of priorities. The list can contain all priorities or a subset determined by any combination of these criteria: * a list of priority IDs. Any invalid priority IDs are ignored. * whether the field configuration is a default. This returns priorities from company-managed (classic) projects only, as there is no concept of default priorities 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 priority IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=2&id=3`. (optional) * @param onlyDefault Whether only the default priority is returned. (optional, default to false) * @return ApiResponse<PageBeanPriority> * @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 searchPrioritiesWithHttpInfo(Long startAt, Integer maxResults, List id, Boolean onlyDefault) throws ApiException { okhttp3.Call localVarCall = searchPrioritiesValidateBeforeCall(startAt, maxResults, id, onlyDefault, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Search priorities (asynchronously) * Returns a [paginated](#pagination) list of priorities. The list can contain all priorities or a subset determined by any combination of these criteria: * a list of priority IDs. Any invalid priority IDs are ignored. * whether the field configuration is a default. This returns priorities from company-managed (classic) projects only, as there is no concept of default priorities 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 priority IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=2&id=3`. (optional) * @param onlyDefault Whether only the default priority is returned. (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 searchPrioritiesAsync(Long startAt, Integer maxResults, List id, Boolean onlyDefault, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = searchPrioritiesValidateBeforeCall(startAt, maxResults, id, onlyDefault, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for setDefaultPriority * @param setDefaultPriorityRequest (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 priority isn't found. -
*/ public okhttp3.Call setDefaultPriorityCall(SetDefaultPriorityRequest setDefaultPriorityRequest, 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 = setDefaultPriorityRequest; // create path and map variables String localVarPath = "/rest/api/3/priority/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 setDefaultPriorityValidateBeforeCall(SetDefaultPriorityRequest setDefaultPriorityRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'setDefaultPriorityRequest' is set if (setDefaultPriorityRequest == null) { throw new ApiException("Missing the required parameter 'setDefaultPriorityRequest' when calling setDefaultPriority(Async)"); } return setDefaultPriorityCall(setDefaultPriorityRequest, _callback); } /** * Set default priority * Sets default issue priority. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param setDefaultPriorityRequest (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 priority isn't found. -
*/ public Object setDefaultPriority(SetDefaultPriorityRequest setDefaultPriorityRequest) throws ApiException { ApiResponse localVarResp = setDefaultPriorityWithHttpInfo(setDefaultPriorityRequest); return localVarResp.getData(); } /** * Set default priority * Sets default issue priority. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param setDefaultPriorityRequest (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 priority isn't found. -
*/ public ApiResponse setDefaultPriorityWithHttpInfo(SetDefaultPriorityRequest setDefaultPriorityRequest) throws ApiException { okhttp3.Call localVarCall = setDefaultPriorityValidateBeforeCall(setDefaultPriorityRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Set default priority (asynchronously) * Sets default issue priority. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param setDefaultPriorityRequest (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 priority isn't found. -
*/ public okhttp3.Call setDefaultPriorityAsync(SetDefaultPriorityRequest setDefaultPriorityRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = setDefaultPriorityValidateBeforeCall(setDefaultPriorityRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updatePriority * @param id The ID of the issue priority. (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 priority isn't found. -
*/ public okhttp3.Call updatePriorityCall(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/priority/{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 updatePriorityValidateBeforeCall(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 updatePriority(Async)"); } // verify the required parameter 'requestBody' is set if (requestBody == null) { throw new ApiException("Missing the required parameter 'requestBody' when calling updatePriority(Async)"); } return updatePriorityCall(id, requestBody, _callback); } /** * Update priority * Updates an issue priority. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue priority. (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 priority isn't found. -
*/ public Object updatePriority(String id, Map requestBody) throws ApiException { ApiResponse localVarResp = updatePriorityWithHttpInfo(id, requestBody); return localVarResp.getData(); } /** * Update priority * Updates an issue priority. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue priority. (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 priority isn't found. -
*/ public ApiResponse updatePriorityWithHttpInfo(String id, Map requestBody) throws ApiException { okhttp3.Call localVarCall = updatePriorityValidateBeforeCall(id, requestBody, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update priority (asynchronously) * Updates an issue priority. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue priority. (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 priority isn't found. -
*/ public okhttp3.Call updatePriorityAsync(String id, Map requestBody, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updatePriorityValidateBeforeCall(id, requestBody, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }