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

software.tnb.jira.validation.generated.api.WorkflowSchemesApi 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.DefaultWorkflow;
import software.tnb.jira.validation.generated.model.IssueTypeWorkflowMapping;
import software.tnb.jira.validation.generated.model.IssueTypesWorkflowMapping;
import software.tnb.jira.validation.generated.model.PageBeanWorkflowScheme;
import software.tnb.jira.validation.generated.model.WorkflowScheme;

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

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

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

    public WorkflowSchemesApi(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 createWorkflowScheme
     * @param workflowScheme  (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 is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
*/ public okhttp3.Call createWorkflowSchemeCall(WorkflowScheme workflowScheme, 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 = workflowScheme; // create path and map variables String localVarPath = "/rest/api/3/workflowscheme"; 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 createWorkflowSchemeValidateBeforeCall(WorkflowScheme workflowScheme, final ApiCallback _callback) throws ApiException { // verify the required parameter 'workflowScheme' is set if (workflowScheme == null) { throw new ApiException("Missing the required parameter 'workflowScheme' when calling createWorkflowScheme(Async)"); } return createWorkflowSchemeCall(workflowScheme, _callback); } /** * Create workflow scheme * Creates a workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param workflowScheme (required) * @return WorkflowScheme * @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 is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
*/ public WorkflowScheme createWorkflowScheme(WorkflowScheme workflowScheme) throws ApiException { ApiResponse localVarResp = createWorkflowSchemeWithHttpInfo(workflowScheme); return localVarResp.getData(); } /** * Create workflow scheme * Creates a workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param workflowScheme (required) * @return ApiResponse<WorkflowScheme> * @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 is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
*/ public ApiResponse createWorkflowSchemeWithHttpInfo(WorkflowScheme workflowScheme) throws ApiException { okhttp3.Call localVarCall = createWorkflowSchemeValidateBeforeCall(workflowScheme, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create workflow scheme (asynchronously) * Creates a workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param workflowScheme (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 is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
*/ public okhttp3.Call createWorkflowSchemeAsync(WorkflowScheme workflowScheme, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createWorkflowSchemeValidateBeforeCall(workflowScheme, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteDefaultWorkflow * @param id The ID of the workflow scheme. (required) * @param updateDraftIfNeeded Set to true to create or update the draft of a workflow scheme and delete the mapping from the draft, when the workflow scheme cannot be edited. Defaults to `false`. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the workflow scheme cannot be edited and `updateDraftIfNeeded` is not `true`. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public okhttp3.Call deleteDefaultWorkflowCall(Long id, Boolean updateDraftIfNeeded, 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/workflowscheme/{id}/default" .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 (updateDraftIfNeeded != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("updateDraftIfNeeded", updateDraftIfNeeded)); } 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 deleteDefaultWorkflowValidateBeforeCall(Long id, Boolean updateDraftIfNeeded, 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 deleteDefaultWorkflow(Async)"); } return deleteDefaultWorkflowCall(id, updateDraftIfNeeded, _callback); } /** * Delete default workflow * Resets the default workflow for a workflow scheme. That is, the default workflow is set to Jira's system workflow (the *jira* workflow). Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` and a draft workflow scheme is created or updated with the default workflow reset. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param updateDraftIfNeeded Set to true to create or update the draft of a workflow scheme and delete the mapping from the draft, when the workflow scheme cannot be edited. Defaults to `false`. (optional) * @return WorkflowScheme * @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. -
400 Returned if the workflow scheme cannot be edited and `updateDraftIfNeeded` is not `true`. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public WorkflowScheme deleteDefaultWorkflow(Long id, Boolean updateDraftIfNeeded) throws ApiException { ApiResponse localVarResp = deleteDefaultWorkflowWithHttpInfo(id, updateDraftIfNeeded); return localVarResp.getData(); } /** * Delete default workflow * Resets the default workflow for a workflow scheme. That is, the default workflow is set to Jira's system workflow (the *jira* workflow). Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` and a draft workflow scheme is created or updated with the default workflow reset. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param updateDraftIfNeeded Set to true to create or update the draft of a workflow scheme and delete the mapping from the draft, when the workflow scheme cannot be edited. Defaults to `false`. (optional) * @return ApiResponse<WorkflowScheme> * @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. -
400 Returned if the workflow scheme cannot be edited and `updateDraftIfNeeded` is not `true`. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public ApiResponse deleteDefaultWorkflowWithHttpInfo(Long id, Boolean updateDraftIfNeeded) throws ApiException { okhttp3.Call localVarCall = deleteDefaultWorkflowValidateBeforeCall(id, updateDraftIfNeeded, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete default workflow (asynchronously) * Resets the default workflow for a workflow scheme. That is, the default workflow is set to Jira's system workflow (the *jira* workflow). Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` and a draft workflow scheme is created or updated with the default workflow reset. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param updateDraftIfNeeded Set to true to create or update the draft of a workflow scheme and delete the mapping from the draft, when the workflow scheme cannot be edited. Defaults to `false`. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the workflow scheme cannot be edited and `updateDraftIfNeeded` is not `true`. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public okhttp3.Call deleteDefaultWorkflowAsync(Long id, Boolean updateDraftIfNeeded, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteDefaultWorkflowValidateBeforeCall(id, updateDraftIfNeeded, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteWorkflowMapping * @param id The ID of the workflow scheme. (required) * @param workflowName The name of the workflow. (required) * @param updateDraftIfNeeded Set to true to create or update the draft of a workflow scheme and delete the mapping from the draft, when the workflow scheme cannot be edited. Defaults to `false`. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the workflow cannot be edited and `updateDraftIfNeeded` is not true. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if any of the following is true: * The workflow scheme is not found. * The workflow is not found. * The workflow is not specified. -
*/ public okhttp3.Call deleteWorkflowMappingCall(Long id, String workflowName, Boolean updateDraftIfNeeded, 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/workflowscheme/{id}/workflow" .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 (workflowName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("workflowName", workflowName)); } if (updateDraftIfNeeded != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("updateDraftIfNeeded", updateDraftIfNeeded)); } final String[] localVarAccepts = { }; 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 deleteWorkflowMappingValidateBeforeCall(Long id, String workflowName, Boolean updateDraftIfNeeded, 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 deleteWorkflowMapping(Async)"); } // verify the required parameter 'workflowName' is set if (workflowName == null) { throw new ApiException("Missing the required parameter 'workflowName' when calling deleteWorkflowMapping(Async)"); } return deleteWorkflowMappingCall(id, workflowName, updateDraftIfNeeded, _callback); } /** * Delete issue types for workflow in workflow scheme * Deletes the workflow-issue type mapping for a workflow in a workflow scheme. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` and a draft workflow scheme is created or updated with the workflow-issue type mapping deleted. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param workflowName The name of the workflow. (required) * @param updateDraftIfNeeded Set to true to create or update the draft of a workflow scheme and delete the mapping from the draft, when the workflow scheme cannot be edited. Defaults to `false`. (optional) * @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. -
400 Returned if the workflow cannot be edited and `updateDraftIfNeeded` is not true. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if any of the following is true: * The workflow scheme is not found. * The workflow is not found. * The workflow is not specified. -
*/ public void deleteWorkflowMapping(Long id, String workflowName, Boolean updateDraftIfNeeded) throws ApiException { deleteWorkflowMappingWithHttpInfo(id, workflowName, updateDraftIfNeeded); } /** * Delete issue types for workflow in workflow scheme * Deletes the workflow-issue type mapping for a workflow in a workflow scheme. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` and a draft workflow scheme is created or updated with the workflow-issue type mapping deleted. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param workflowName The name of the workflow. (required) * @param updateDraftIfNeeded Set to true to create or update the draft of a workflow scheme and delete the mapping from the draft, when the workflow scheme cannot be edited. Defaults to `false`. (optional) * @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
200 Returned if the request is successful. -
400 Returned if the workflow cannot be edited and `updateDraftIfNeeded` is not true. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if any of the following is true: * The workflow scheme is not found. * The workflow is not found. * The workflow is not specified. -
*/ public ApiResponse deleteWorkflowMappingWithHttpInfo(Long id, String workflowName, Boolean updateDraftIfNeeded) throws ApiException { okhttp3.Call localVarCall = deleteWorkflowMappingValidateBeforeCall(id, workflowName, updateDraftIfNeeded, null); return localVarApiClient.execute(localVarCall); } /** * Delete issue types for workflow in workflow scheme (asynchronously) * Deletes the workflow-issue type mapping for a workflow in a workflow scheme. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` and a draft workflow scheme is created or updated with the workflow-issue type mapping deleted. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param workflowName The name of the workflow. (required) * @param updateDraftIfNeeded Set to true to create or update the draft of a workflow scheme and delete the mapping from the draft, when the workflow scheme cannot be edited. Defaults to `false`. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the workflow cannot be edited and `updateDraftIfNeeded` is not true. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if any of the following is true: * The workflow scheme is not found. * The workflow is not found. * The workflow is not specified. -
*/ public okhttp3.Call deleteWorkflowMappingAsync(Long id, String workflowName, Boolean updateDraftIfNeeded, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteWorkflowMappingValidateBeforeCall(id, workflowName, updateDraftIfNeeded, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteWorkflowScheme * @param id The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. (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 scheme is active. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public okhttp3.Call deleteWorkflowSchemeCall(Long 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/workflowscheme/{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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteWorkflowSchemeValidateBeforeCall(Long 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 deleteWorkflowScheme(Async)"); } return deleteWorkflowSchemeCall(id, _callback); } /** * Delete workflow scheme * Deletes a workflow scheme. Note that a workflow scheme cannot be deleted if it is active (that is, being used by at least one project). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. (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 scheme is active. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public Object deleteWorkflowScheme(Long id) throws ApiException { ApiResponse localVarResp = deleteWorkflowSchemeWithHttpInfo(id); return localVarResp.getData(); } /** * Delete workflow scheme * Deletes a workflow scheme. Note that a workflow scheme cannot be deleted if it is active (that is, being used by at least one project). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. (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 scheme is active. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public ApiResponse deleteWorkflowSchemeWithHttpInfo(Long id) throws ApiException { okhttp3.Call localVarCall = deleteWorkflowSchemeValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete workflow scheme (asynchronously) * Deletes a workflow scheme. Note that a workflow scheme cannot be deleted if it is active (that is, being used by at least one project). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. (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 scheme is active. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public okhttp3.Call deleteWorkflowSchemeAsync(Long id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteWorkflowSchemeValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteWorkflowSchemeIssueType * @param id The ID of the workflow scheme. (required) * @param issueType The ID of the issue type. (required) * @param updateDraftIfNeeded Set to true to create or update the draft of a workflow scheme and update the mapping in the draft, when the workflow scheme cannot be edited. Defaults to `false`. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the workflow cannot be edited and `updateDraftIfNeeded` is false. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme or issue type is not found. -
*/ public okhttp3.Call deleteWorkflowSchemeIssueTypeCall(Long id, String issueType, Boolean updateDraftIfNeeded, 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/workflowscheme/{id}/issuetype/{issueType}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) .replace("{" + "issueType" + "}", localVarApiClient.escapeString(issueType.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (updateDraftIfNeeded != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("updateDraftIfNeeded", updateDraftIfNeeded)); } 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 deleteWorkflowSchemeIssueTypeValidateBeforeCall(Long id, String issueType, Boolean updateDraftIfNeeded, 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 deleteWorkflowSchemeIssueType(Async)"); } // verify the required parameter 'issueType' is set if (issueType == null) { throw new ApiException("Missing the required parameter 'issueType' when calling deleteWorkflowSchemeIssueType(Async)"); } return deleteWorkflowSchemeIssueTypeCall(id, issueType, updateDraftIfNeeded, _callback); } /** * Delete workflow for issue type in workflow scheme * Deletes the issue type-workflow mapping for an issue type in a workflow scheme. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` and a draft workflow scheme is created or updated with the issue type-workflow mapping deleted. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param issueType The ID of the issue type. (required) * @param updateDraftIfNeeded Set to true to create or update the draft of a workflow scheme and update the mapping in the draft, when the workflow scheme cannot be edited. Defaults to `false`. (optional) * @return WorkflowScheme * @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. -
400 Returned if the workflow cannot be edited and `updateDraftIfNeeded` is false. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme or issue type is not found. -
*/ public WorkflowScheme deleteWorkflowSchemeIssueType(Long id, String issueType, Boolean updateDraftIfNeeded) throws ApiException { ApiResponse localVarResp = deleteWorkflowSchemeIssueTypeWithHttpInfo(id, issueType, updateDraftIfNeeded); return localVarResp.getData(); } /** * Delete workflow for issue type in workflow scheme * Deletes the issue type-workflow mapping for an issue type in a workflow scheme. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` and a draft workflow scheme is created or updated with the issue type-workflow mapping deleted. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param issueType The ID of the issue type. (required) * @param updateDraftIfNeeded Set to true to create or update the draft of a workflow scheme and update the mapping in the draft, when the workflow scheme cannot be edited. Defaults to `false`. (optional) * @return ApiResponse<WorkflowScheme> * @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. -
400 Returned if the workflow cannot be edited and `updateDraftIfNeeded` is false. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme or issue type is not found. -
*/ public ApiResponse deleteWorkflowSchemeIssueTypeWithHttpInfo(Long id, String issueType, Boolean updateDraftIfNeeded) throws ApiException { okhttp3.Call localVarCall = deleteWorkflowSchemeIssueTypeValidateBeforeCall(id, issueType, updateDraftIfNeeded, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete workflow for issue type in workflow scheme (asynchronously) * Deletes the issue type-workflow mapping for an issue type in a workflow scheme. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` and a draft workflow scheme is created or updated with the issue type-workflow mapping deleted. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param issueType The ID of the issue type. (required) * @param updateDraftIfNeeded Set to true to create or update the draft of a workflow scheme and update the mapping in the draft, when the workflow scheme cannot be edited. Defaults to `false`. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the workflow cannot be edited and `updateDraftIfNeeded` is false. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme or issue type is not found. -
*/ public okhttp3.Call deleteWorkflowSchemeIssueTypeAsync(Long id, String issueType, Boolean updateDraftIfNeeded, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteWorkflowSchemeIssueTypeValidateBeforeCall(id, issueType, updateDraftIfNeeded, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getAllWorkflowSchemes * @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 _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. -
403 Returned if the user does not have the necessary permission. -
*/ public okhttp3.Call getAllWorkflowSchemesCall(Long startAt, Integer maxResults, 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/workflowscheme"; 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)); } 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 getAllWorkflowSchemesValidateBeforeCall(Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { return getAllWorkflowSchemesCall(startAt, maxResults, _callback); } /** * Get all workflow schemes * Returns a [paginated](#pagination) list of all workflow schemes, not including draft workflow schemes. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @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) * @return PageBeanWorkflowScheme * @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. -
403 Returned if the user does not have the necessary permission. -
*/ public PageBeanWorkflowScheme getAllWorkflowSchemes(Long startAt, Integer maxResults) throws ApiException { ApiResponse localVarResp = getAllWorkflowSchemesWithHttpInfo(startAt, maxResults); return localVarResp.getData(); } /** * Get all workflow schemes * Returns a [paginated](#pagination) list of all workflow schemes, not including draft workflow schemes. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @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) * @return ApiResponse<PageBeanWorkflowScheme> * @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. -
403 Returned if the user does not have the necessary permission. -
*/ public ApiResponse getAllWorkflowSchemesWithHttpInfo(Long startAt, Integer maxResults) throws ApiException { okhttp3.Call localVarCall = getAllWorkflowSchemesValidateBeforeCall(startAt, maxResults, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get all workflow schemes (asynchronously) * Returns a [paginated](#pagination) list of all workflow schemes, not including draft workflow schemes. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @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 _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. -
403 Returned if the user does not have the necessary permission. -
*/ public okhttp3.Call getAllWorkflowSchemesAsync(Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAllWorkflowSchemesValidateBeforeCall(startAt, maxResults, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDefaultWorkflow * @param id The ID of the workflow scheme. (required) * @param returnDraftIfExists Set to `true` to return the default workflow for the workflow scheme's draft rather than scheme itself. If the workflow scheme does not have a draft, then the default workflow for the workflow scheme 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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public okhttp3.Call getDefaultWorkflowCall(Long id, Boolean returnDraftIfExists, 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/workflowscheme/{id}/default" .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 (returnDraftIfExists != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnDraftIfExists", returnDraftIfExists)); } 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 getDefaultWorkflowValidateBeforeCall(Long id, Boolean returnDraftIfExists, 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 getDefaultWorkflow(Async)"); } return getDefaultWorkflowCall(id, returnDraftIfExists, _callback); } /** * Get default workflow * Returns the default workflow for a workflow scheme. The default workflow is the workflow that is assigned any issue types that have not been mapped to any other workflow. The default workflow has *All Unassigned Issue Types* listed in its issue types for the workflow scheme in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param returnDraftIfExists Set to `true` to return the default workflow for the workflow scheme's draft rather than scheme itself. If the workflow scheme does not have a draft, then the default workflow for the workflow scheme is returned. (optional, default to false) * @return DefaultWorkflow * @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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public DefaultWorkflow getDefaultWorkflow(Long id, Boolean returnDraftIfExists) throws ApiException { ApiResponse localVarResp = getDefaultWorkflowWithHttpInfo(id, returnDraftIfExists); return localVarResp.getData(); } /** * Get default workflow * Returns the default workflow for a workflow scheme. The default workflow is the workflow that is assigned any issue types that have not been mapped to any other workflow. The default workflow has *All Unassigned Issue Types* listed in its issue types for the workflow scheme in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param returnDraftIfExists Set to `true` to return the default workflow for the workflow scheme's draft rather than scheme itself. If the workflow scheme does not have a draft, then the default workflow for the workflow scheme is returned. (optional, default to false) * @return ApiResponse<DefaultWorkflow> * @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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public ApiResponse getDefaultWorkflowWithHttpInfo(Long id, Boolean returnDraftIfExists) throws ApiException { okhttp3.Call localVarCall = getDefaultWorkflowValidateBeforeCall(id, returnDraftIfExists, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get default workflow (asynchronously) * Returns the default workflow for a workflow scheme. The default workflow is the workflow that is assigned any issue types that have not been mapped to any other workflow. The default workflow has *All Unassigned Issue Types* listed in its issue types for the workflow scheme in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param returnDraftIfExists Set to `true` to return the default workflow for the workflow scheme's draft rather than scheme itself. If the workflow scheme does not have a draft, then the default workflow for the workflow scheme 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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public okhttp3.Call getDefaultWorkflowAsync(Long id, Boolean returnDraftIfExists, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDefaultWorkflowValidateBeforeCall(id, returnDraftIfExists, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getWorkflow * @param id The ID of the workflow scheme. (required) * @param workflowName The name of a workflow in the scheme. Limits the results to the workflow-issue type mapping for the specified workflow. (optional) * @param returnDraftIfExists Returns the mapping from the workflow scheme's draft rather than the workflow scheme, if set to true. If no draft exists, the mapping from the workflow scheme 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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if either the workflow scheme or workflow is not found. -
*/ public okhttp3.Call getWorkflowCall(Long id, String workflowName, Boolean returnDraftIfExists, 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/workflowscheme/{id}/workflow" .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 (workflowName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("workflowName", workflowName)); } if (returnDraftIfExists != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnDraftIfExists", returnDraftIfExists)); } 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 getWorkflowValidateBeforeCall(Long id, String workflowName, Boolean returnDraftIfExists, 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 getWorkflow(Async)"); } return getWorkflowCall(id, workflowName, returnDraftIfExists, _callback); } /** * Get issue types for workflows in workflow scheme * Returns the workflow-issue type mappings for a workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param workflowName The name of a workflow in the scheme. Limits the results to the workflow-issue type mapping for the specified workflow. (optional) * @param returnDraftIfExists Returns the mapping from the workflow scheme's draft rather than the workflow scheme, if set to true. If no draft exists, the mapping from the workflow scheme is returned. (optional, default to false) * @return IssueTypesWorkflowMapping * @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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if either the workflow scheme or workflow is not found. -
*/ public IssueTypesWorkflowMapping getWorkflow(Long id, String workflowName, Boolean returnDraftIfExists) throws ApiException { ApiResponse localVarResp = getWorkflowWithHttpInfo(id, workflowName, returnDraftIfExists); return localVarResp.getData(); } /** * Get issue types for workflows in workflow scheme * Returns the workflow-issue type mappings for a workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param workflowName The name of a workflow in the scheme. Limits the results to the workflow-issue type mapping for the specified workflow. (optional) * @param returnDraftIfExists Returns the mapping from the workflow scheme's draft rather than the workflow scheme, if set to true. If no draft exists, the mapping from the workflow scheme is returned. (optional, default to false) * @return ApiResponse<IssueTypesWorkflowMapping> * @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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if either the workflow scheme or workflow is not found. -
*/ public ApiResponse getWorkflowWithHttpInfo(Long id, String workflowName, Boolean returnDraftIfExists) throws ApiException { okhttp3.Call localVarCall = getWorkflowValidateBeforeCall(id, workflowName, returnDraftIfExists, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get issue types for workflows in workflow scheme (asynchronously) * Returns the workflow-issue type mappings for a workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param workflowName The name of a workflow in the scheme. Limits the results to the workflow-issue type mapping for the specified workflow. (optional) * @param returnDraftIfExists Returns the mapping from the workflow scheme's draft rather than the workflow scheme, if set to true. If no draft exists, the mapping from the workflow scheme 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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if either the workflow scheme or workflow is not found. -
*/ public okhttp3.Call getWorkflowAsync(Long id, String workflowName, Boolean returnDraftIfExists, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWorkflowValidateBeforeCall(id, workflowName, returnDraftIfExists, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getWorkflowScheme * @param id The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. (required) * @param returnDraftIfExists Returns the workflow scheme's draft rather than scheme itself, if set to true. If the workflow scheme does not have a draft, then the workflow scheme 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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public okhttp3.Call getWorkflowSchemeCall(Long id, Boolean returnDraftIfExists, 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/workflowscheme/{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 (returnDraftIfExists != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnDraftIfExists", returnDraftIfExists)); } 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 getWorkflowSchemeValidateBeforeCall(Long id, Boolean returnDraftIfExists, 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 getWorkflowScheme(Async)"); } return getWorkflowSchemeCall(id, returnDraftIfExists, _callback); } /** * Get workflow scheme * Returns a workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. (required) * @param returnDraftIfExists Returns the workflow scheme's draft rather than scheme itself, if set to true. If the workflow scheme does not have a draft, then the workflow scheme is returned. (optional, default to false) * @return WorkflowScheme * @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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public WorkflowScheme getWorkflowScheme(Long id, Boolean returnDraftIfExists) throws ApiException { ApiResponse localVarResp = getWorkflowSchemeWithHttpInfo(id, returnDraftIfExists); return localVarResp.getData(); } /** * Get workflow scheme * Returns a workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. (required) * @param returnDraftIfExists Returns the workflow scheme's draft rather than scheme itself, if set to true. If the workflow scheme does not have a draft, then the workflow scheme is returned. (optional, default to false) * @return ApiResponse<WorkflowScheme> * @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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public ApiResponse getWorkflowSchemeWithHttpInfo(Long id, Boolean returnDraftIfExists) throws ApiException { okhttp3.Call localVarCall = getWorkflowSchemeValidateBeforeCall(id, returnDraftIfExists, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get workflow scheme (asynchronously) * Returns a workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. (required) * @param returnDraftIfExists Returns the workflow scheme's draft rather than scheme itself, if set to true. If the workflow scheme does not have a draft, then the workflow scheme 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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public okhttp3.Call getWorkflowSchemeAsync(Long id, Boolean returnDraftIfExists, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWorkflowSchemeValidateBeforeCall(id, returnDraftIfExists, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getWorkflowSchemeIssueType * @param id The ID of the workflow scheme. (required) * @param issueType The ID of the issue type. (required) * @param returnDraftIfExists Returns the mapping from the workflow scheme's draft rather than the workflow scheme, if set to true. If no draft exists, the mapping from the workflow scheme 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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme or issue type is not found. -
*/ public okhttp3.Call getWorkflowSchemeIssueTypeCall(Long id, String issueType, Boolean returnDraftIfExists, 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/workflowscheme/{id}/issuetype/{issueType}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) .replace("{" + "issueType" + "}", localVarApiClient.escapeString(issueType.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (returnDraftIfExists != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnDraftIfExists", returnDraftIfExists)); } 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 getWorkflowSchemeIssueTypeValidateBeforeCall(Long id, String issueType, Boolean returnDraftIfExists, 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 getWorkflowSchemeIssueType(Async)"); } // verify the required parameter 'issueType' is set if (issueType == null) { throw new ApiException("Missing the required parameter 'issueType' when calling getWorkflowSchemeIssueType(Async)"); } return getWorkflowSchemeIssueTypeCall(id, issueType, returnDraftIfExists, _callback); } /** * Get workflow for issue type in workflow scheme * Returns the issue type-workflow mapping for an issue type in a workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param issueType The ID of the issue type. (required) * @param returnDraftIfExists Returns the mapping from the workflow scheme's draft rather than the workflow scheme, if set to true. If no draft exists, the mapping from the workflow scheme is returned. (optional, default to false) * @return IssueTypeWorkflowMapping * @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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme or issue type is not found. -
*/ public IssueTypeWorkflowMapping getWorkflowSchemeIssueType(Long id, String issueType, Boolean returnDraftIfExists) throws ApiException { ApiResponse localVarResp = getWorkflowSchemeIssueTypeWithHttpInfo(id, issueType, returnDraftIfExists); return localVarResp.getData(); } /** * Get workflow for issue type in workflow scheme * Returns the issue type-workflow mapping for an issue type in a workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param issueType The ID of the issue type. (required) * @param returnDraftIfExists Returns the mapping from the workflow scheme's draft rather than the workflow scheme, if set to true. If no draft exists, the mapping from the workflow scheme is returned. (optional, default to false) * @return ApiResponse<IssueTypeWorkflowMapping> * @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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme or issue type is not found. -
*/ public ApiResponse getWorkflowSchemeIssueTypeWithHttpInfo(Long id, String issueType, Boolean returnDraftIfExists) throws ApiException { okhttp3.Call localVarCall = getWorkflowSchemeIssueTypeValidateBeforeCall(id, issueType, returnDraftIfExists, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get workflow for issue type in workflow scheme (asynchronously) * Returns the issue type-workflow mapping for an issue type in a workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param issueType The ID of the issue type. (required) * @param returnDraftIfExists Returns the mapping from the workflow scheme's draft rather than the workflow scheme, if set to true. If no draft exists, the mapping from the workflow scheme 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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme or issue type is not found. -
*/ public okhttp3.Call getWorkflowSchemeIssueTypeAsync(Long id, String issueType, Boolean returnDraftIfExists, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWorkflowSchemeIssueTypeValidateBeforeCall(id, issueType, returnDraftIfExists, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for setWorkflowSchemeIssueType * @param id The ID of the workflow scheme. (required) * @param issueType The ID of the issue type. (required) * @param issueTypeWorkflowMapping The issue type-project mapping. (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. -
400 Returned if the workflow cannot be edited and `updateDraftIfNeeded` is false. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme or issue type is not found. -
*/ public okhttp3.Call setWorkflowSchemeIssueTypeCall(Long id, String issueType, IssueTypeWorkflowMapping issueTypeWorkflowMapping, 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 = issueTypeWorkflowMapping; // create path and map variables String localVarPath = "/rest/api/3/workflowscheme/{id}/issuetype/{issueType}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) .replace("{" + "issueType" + "}", localVarApiClient.escapeString(issueType.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 setWorkflowSchemeIssueTypeValidateBeforeCall(Long id, String issueType, IssueTypeWorkflowMapping issueTypeWorkflowMapping, 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 setWorkflowSchemeIssueType(Async)"); } // verify the required parameter 'issueType' is set if (issueType == null) { throw new ApiException("Missing the required parameter 'issueType' when calling setWorkflowSchemeIssueType(Async)"); } // verify the required parameter 'issueTypeWorkflowMapping' is set if (issueTypeWorkflowMapping == null) { throw new ApiException("Missing the required parameter 'issueTypeWorkflowMapping' when calling setWorkflowSchemeIssueType(Async)"); } return setWorkflowSchemeIssueTypeCall(id, issueType, issueTypeWorkflowMapping, _callback); } /** * Set workflow for issue type in workflow scheme * Sets the workflow for an issue type in a workflow scheme. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` in the request body and a draft workflow scheme is created or updated with the new issue type-workflow mapping. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param issueType The ID of the issue type. (required) * @param issueTypeWorkflowMapping The issue type-project mapping. (required) * @return WorkflowScheme * @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. -
400 Returned if the workflow cannot be edited and `updateDraftIfNeeded` is false. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme or issue type is not found. -
*/ public WorkflowScheme setWorkflowSchemeIssueType(Long id, String issueType, IssueTypeWorkflowMapping issueTypeWorkflowMapping) throws ApiException { ApiResponse localVarResp = setWorkflowSchemeIssueTypeWithHttpInfo(id, issueType, issueTypeWorkflowMapping); return localVarResp.getData(); } /** * Set workflow for issue type in workflow scheme * Sets the workflow for an issue type in a workflow scheme. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` in the request body and a draft workflow scheme is created or updated with the new issue type-workflow mapping. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param issueType The ID of the issue type. (required) * @param issueTypeWorkflowMapping The issue type-project mapping. (required) * @return ApiResponse<WorkflowScheme> * @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. -
400 Returned if the workflow cannot be edited and `updateDraftIfNeeded` is false. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme or issue type is not found. -
*/ public ApiResponse setWorkflowSchemeIssueTypeWithHttpInfo(Long id, String issueType, IssueTypeWorkflowMapping issueTypeWorkflowMapping) throws ApiException { okhttp3.Call localVarCall = setWorkflowSchemeIssueTypeValidateBeforeCall(id, issueType, issueTypeWorkflowMapping, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Set workflow for issue type in workflow scheme (asynchronously) * Sets the workflow for an issue type in a workflow scheme. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` in the request body and a draft workflow scheme is created or updated with the new issue type-workflow mapping. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param issueType The ID of the issue type. (required) * @param issueTypeWorkflowMapping The issue type-project mapping. (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. -
400 Returned if the workflow cannot be edited and `updateDraftIfNeeded` is false. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme or issue type is not found. -
*/ public okhttp3.Call setWorkflowSchemeIssueTypeAsync(Long id, String issueType, IssueTypeWorkflowMapping issueTypeWorkflowMapping, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = setWorkflowSchemeIssueTypeValidateBeforeCall(id, issueType, issueTypeWorkflowMapping, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateDefaultWorkflow * @param id The ID of the workflow scheme. (required) * @param defaultWorkflow The new default workflow. (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. -
400 Returned if the workflow scheme cannot be edited and `updateDraftIfNeeded` is not `true`. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public okhttp3.Call updateDefaultWorkflowCall(Long id, DefaultWorkflow defaultWorkflow, 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 = defaultWorkflow; // create path and map variables String localVarPath = "/rest/api/3/workflowscheme/{id}/default" .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 updateDefaultWorkflowValidateBeforeCall(Long id, DefaultWorkflow defaultWorkflow, 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 updateDefaultWorkflow(Async)"); } // verify the required parameter 'defaultWorkflow' is set if (defaultWorkflow == null) { throw new ApiException("Missing the required parameter 'defaultWorkflow' when calling updateDefaultWorkflow(Async)"); } return updateDefaultWorkflowCall(id, defaultWorkflow, _callback); } /** * Update default workflow * Sets the default workflow for a workflow scheme. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` in the request object and a draft workflow scheme is created or updated with the new default workflow. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param defaultWorkflow The new default workflow. (required) * @return WorkflowScheme * @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. -
400 Returned if the workflow scheme cannot be edited and `updateDraftIfNeeded` is not `true`. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public WorkflowScheme updateDefaultWorkflow(Long id, DefaultWorkflow defaultWorkflow) throws ApiException { ApiResponse localVarResp = updateDefaultWorkflowWithHttpInfo(id, defaultWorkflow); return localVarResp.getData(); } /** * Update default workflow * Sets the default workflow for a workflow scheme. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` in the request object and a draft workflow scheme is created or updated with the new default workflow. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param defaultWorkflow The new default workflow. (required) * @return ApiResponse<WorkflowScheme> * @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. -
400 Returned if the workflow scheme cannot be edited and `updateDraftIfNeeded` is not `true`. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public ApiResponse updateDefaultWorkflowWithHttpInfo(Long id, DefaultWorkflow defaultWorkflow) throws ApiException { okhttp3.Call localVarCall = updateDefaultWorkflowValidateBeforeCall(id, defaultWorkflow, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update default workflow (asynchronously) * Sets the default workflow for a workflow scheme. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` in the request object and a draft workflow scheme is created or updated with the new default workflow. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param defaultWorkflow The new default workflow. (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. -
400 Returned if the workflow scheme cannot be edited and `updateDraftIfNeeded` is not `true`. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public okhttp3.Call updateDefaultWorkflowAsync(Long id, DefaultWorkflow defaultWorkflow, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateDefaultWorkflowValidateBeforeCall(id, defaultWorkflow, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateWorkflowMapping * @param id The ID of the workflow scheme. (required) * @param workflowName The name of the workflow. (required) * @param issueTypesWorkflowMapping (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. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if any of the following is true: * The workflow scheme is not found. * The workflow is not found. * The workflow is not specified. -
*/ public okhttp3.Call updateWorkflowMappingCall(Long id, String workflowName, IssueTypesWorkflowMapping issueTypesWorkflowMapping, 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 = issueTypesWorkflowMapping; // create path and map variables String localVarPath = "/rest/api/3/workflowscheme/{id}/workflow" .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 (workflowName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("workflowName", workflowName)); } 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 updateWorkflowMappingValidateBeforeCall(Long id, String workflowName, IssueTypesWorkflowMapping issueTypesWorkflowMapping, 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 updateWorkflowMapping(Async)"); } // verify the required parameter 'workflowName' is set if (workflowName == null) { throw new ApiException("Missing the required parameter 'workflowName' when calling updateWorkflowMapping(Async)"); } // verify the required parameter 'issueTypesWorkflowMapping' is set if (issueTypesWorkflowMapping == null) { throw new ApiException("Missing the required parameter 'issueTypesWorkflowMapping' when calling updateWorkflowMapping(Async)"); } return updateWorkflowMappingCall(id, workflowName, issueTypesWorkflowMapping, _callback); } /** * Set issue types for workflow in workflow scheme * Sets the issue types for a workflow in a workflow scheme. The workflow can also be set as the default workflow for the workflow scheme. Unmapped issues types are mapped to the default workflow. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` in the request body and a draft workflow scheme is created or updated with the new workflow-issue types mappings. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param workflowName The name of the workflow. (required) * @param issueTypesWorkflowMapping (required) * @return WorkflowScheme * @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. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if any of the following is true: * The workflow scheme is not found. * The workflow is not found. * The workflow is not specified. -
*/ public WorkflowScheme updateWorkflowMapping(Long id, String workflowName, IssueTypesWorkflowMapping issueTypesWorkflowMapping) throws ApiException { ApiResponse localVarResp = updateWorkflowMappingWithHttpInfo(id, workflowName, issueTypesWorkflowMapping); return localVarResp.getData(); } /** * Set issue types for workflow in workflow scheme * Sets the issue types for a workflow in a workflow scheme. The workflow can also be set as the default workflow for the workflow scheme. Unmapped issues types are mapped to the default workflow. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` in the request body and a draft workflow scheme is created or updated with the new workflow-issue types mappings. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param workflowName The name of the workflow. (required) * @param issueTypesWorkflowMapping (required) * @return ApiResponse<WorkflowScheme> * @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. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if any of the following is true: * The workflow scheme is not found. * The workflow is not found. * The workflow is not specified. -
*/ public ApiResponse updateWorkflowMappingWithHttpInfo(Long id, String workflowName, IssueTypesWorkflowMapping issueTypesWorkflowMapping) throws ApiException { okhttp3.Call localVarCall = updateWorkflowMappingValidateBeforeCall(id, workflowName, issueTypesWorkflowMapping, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Set issue types for workflow in workflow scheme (asynchronously) * Sets the issue types for a workflow in a workflow scheme. The workflow can also be set as the default workflow for the workflow scheme. Unmapped issues types are mapped to the default workflow. Note that active workflow schemes cannot be edited. If the workflow scheme is active, set `updateDraftIfNeeded` to `true` in the request body and a draft workflow scheme is created or updated with the new workflow-issue types mappings. The draft workflow scheme can be published in Jira. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. (required) * @param workflowName The name of the workflow. (required) * @param issueTypesWorkflowMapping (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. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if any of the following is true: * The workflow scheme is not found. * The workflow is not found. * The workflow is not specified. -
*/ public okhttp3.Call updateWorkflowMappingAsync(Long id, String workflowName, IssueTypesWorkflowMapping issueTypesWorkflowMapping, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateWorkflowMappingValidateBeforeCall(id, workflowName, issueTypesWorkflowMapping, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateWorkflowScheme * @param id The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. (required) * @param workflowScheme (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. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public okhttp3.Call updateWorkflowSchemeCall(Long id, WorkflowScheme workflowScheme, 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 = workflowScheme; // create path and map variables String localVarPath = "/rest/api/3/workflowscheme/{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 updateWorkflowSchemeValidateBeforeCall(Long id, WorkflowScheme workflowScheme, 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 updateWorkflowScheme(Async)"); } // verify the required parameter 'workflowScheme' is set if (workflowScheme == null) { throw new ApiException("Missing the required parameter 'workflowScheme' when calling updateWorkflowScheme(Async)"); } return updateWorkflowSchemeCall(id, workflowScheme, _callback); } /** * Update workflow scheme * Updates a workflow scheme, including the name, default workflow, issue type to project mappings, and more. If the workflow scheme is active (that is, being used by at least one project), then a draft workflow scheme is created or updated instead, provided that `updateDraftIfNeeded` is set to `true`. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. (required) * @param workflowScheme (required) * @return WorkflowScheme * @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. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public WorkflowScheme updateWorkflowScheme(Long id, WorkflowScheme workflowScheme) throws ApiException { ApiResponse localVarResp = updateWorkflowSchemeWithHttpInfo(id, workflowScheme); return localVarResp.getData(); } /** * Update workflow scheme * Updates a workflow scheme, including the name, default workflow, issue type to project mappings, and more. If the workflow scheme is active (that is, being used by at least one project), then a draft workflow scheme is created or updated instead, provided that `updateDraftIfNeeded` is set to `true`. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. (required) * @param workflowScheme (required) * @return ApiResponse<WorkflowScheme> * @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. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public ApiResponse updateWorkflowSchemeWithHttpInfo(Long id, WorkflowScheme workflowScheme) throws ApiException { okhttp3.Call localVarCall = updateWorkflowSchemeValidateBeforeCall(id, workflowScheme, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update workflow scheme (asynchronously) * Updates a workflow scheme, including the name, default workflow, issue type to project mappings, and more. If the workflow scheme is active (that is, being used by at least one project), then a draft workflow scheme is created or updated instead, provided that `updateDraftIfNeeded` is set to `true`. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. (required) * @param workflowScheme (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. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the workflow scheme is not found. -
*/ public okhttp3.Call updateWorkflowSchemeAsync(Long id, WorkflowScheme workflowScheme, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateWorkflowSchemeValidateBeforeCall(id, workflowScheme, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }