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

software.tnb.jira.validation.generated.api.WorkflowSchemeDraftsApi 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.PublishDraftWorkflowScheme;
import software.tnb.jira.validation.generated.model.TaskProgressBeanObject;
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 WorkflowSchemeDraftsApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

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

    public WorkflowSchemeDraftsApi(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 createWorkflowSchemeDraftFromParent
     * @param id The ID of the active workflow scheme that the draft is created from. (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 createWorkflowSchemeDraftFromParentCall(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}/createdraft" .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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createWorkflowSchemeDraftFromParentValidateBeforeCall(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 createWorkflowSchemeDraftFromParent(Async)"); } return createWorkflowSchemeDraftFromParentCall(id, _callback); } /** * Create draft workflow scheme * Create a draft workflow scheme from an active workflow scheme, by copying the active workflow scheme. Note that an active workflow scheme can only have one draft workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the active workflow scheme that the draft is created from. (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 createWorkflowSchemeDraftFromParent(Long id) throws ApiException { ApiResponse localVarResp = createWorkflowSchemeDraftFromParentWithHttpInfo(id); return localVarResp.getData(); } /** * Create draft workflow scheme * Create a draft workflow scheme from an active workflow scheme, by copying the active workflow scheme. Note that an active workflow scheme can only have one draft workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the active workflow scheme that the draft is created from. (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 createWorkflowSchemeDraftFromParentWithHttpInfo(Long id) throws ApiException { okhttp3.Call localVarCall = createWorkflowSchemeDraftFromParentValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create draft workflow scheme (asynchronously) * Create a draft workflow scheme from an active workflow scheme, by copying the active workflow scheme. Note that an active workflow scheme can only have one draft workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the active workflow scheme that the draft is created from. (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 createWorkflowSchemeDraftFromParentAsync(Long id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createWorkflowSchemeDraftFromParentValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteDraftDefaultWorkflow * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
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 scheme does not have a draft. -
*/ public okhttp3.Call deleteDraftDefaultWorkflowCall(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}/draft/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 = { }; 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 deleteDraftDefaultWorkflowValidateBeforeCall(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 deleteDraftDefaultWorkflow(Async)"); } return deleteDraftDefaultWorkflowCall(id, _callback); } /** * Delete draft default workflow * Resets the default workflow for a workflow scheme's draft. That is, the default workflow is set to Jira's system workflow (the *jira* workflow). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (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. -
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 scheme does not have a draft. -
*/ public WorkflowScheme deleteDraftDefaultWorkflow(Long id) throws ApiException { ApiResponse localVarResp = deleteDraftDefaultWorkflowWithHttpInfo(id); return localVarResp.getData(); } /** * Delete draft default workflow * Resets the default workflow for a workflow scheme's draft. That is, the default workflow is set to Jira's system workflow (the *jira* workflow). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (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. -
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 scheme does not have a draft. -
*/ public ApiResponse deleteDraftDefaultWorkflowWithHttpInfo(Long id) throws ApiException { okhttp3.Call localVarCall = deleteDraftDefaultWorkflowValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete draft default workflow (asynchronously) * Resets the default workflow for a workflow scheme's draft. That is, the default workflow is set to Jira's system workflow (the *jira* workflow). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
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 scheme does not have a draft. -
*/ public okhttp3.Call deleteDraftDefaultWorkflowAsync(Long id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteDraftDefaultWorkflowValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteDraftWorkflowMapping * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param workflowName The name of the 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. -
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 scheme does not have a draft. * The workflow is not found. * The workflow is not specified. -
*/ public okhttp3.Call deleteDraftWorkflowMappingCall(Long id, String workflowName, 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}/draft/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 = { }; 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 deleteDraftWorkflowMappingValidateBeforeCall(Long id, String workflowName, 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 deleteDraftWorkflowMapping(Async)"); } // verify the required parameter 'workflowName' is set if (workflowName == null) { throw new ApiException("Missing the required parameter 'workflowName' when calling deleteDraftWorkflowMapping(Async)"); } return deleteDraftWorkflowMappingCall(id, workflowName, _callback); } /** * Delete issue types for workflow in draft workflow scheme * Deletes the workflow-issue type mapping for a workflow in a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param workflowName The name of the workflow. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
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 any of the following is true: * The workflow scheme is not found. * The workflow scheme does not have a draft. * The workflow is not found. * The workflow is not specified. -
*/ public void deleteDraftWorkflowMapping(Long id, String workflowName) throws ApiException { deleteDraftWorkflowMappingWithHttpInfo(id, workflowName); } /** * Delete issue types for workflow in draft workflow scheme * Deletes the workflow-issue type mapping for a workflow in a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param workflowName The name of the workflow. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
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 any of the following is true: * The workflow scheme is not found. * The workflow scheme does not have a draft. * The workflow is not found. * The workflow is not specified. -
*/ public ApiResponse deleteDraftWorkflowMappingWithHttpInfo(Long id, String workflowName) throws ApiException { okhttp3.Call localVarCall = deleteDraftWorkflowMappingValidateBeforeCall(id, workflowName, null); return localVarApiClient.execute(localVarCall); } /** * Delete issue types for workflow in draft workflow scheme (asynchronously) * Deletes the workflow-issue type mapping for a workflow in a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param workflowName The name of the 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. -
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 scheme does not have a draft. * The workflow is not found. * The workflow is not specified. -
*/ public okhttp3.Call deleteDraftWorkflowMappingAsync(Long id, String workflowName, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteDraftWorkflowMappingValidateBeforeCall(id, workflowName, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteWorkflowSchemeDraft * @param id The ID of the active workflow scheme that the draft was created from. (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. -
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 original active workflow scheme is not found. * the original active workflow scheme does not have a draft. -
*/ public okhttp3.Call deleteWorkflowSchemeDraftCall(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}/draft" .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 = { }; 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 deleteWorkflowSchemeDraftValidateBeforeCall(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 deleteWorkflowSchemeDraft(Async)"); } return deleteWorkflowSchemeDraftCall(id, _callback); } /** * Delete draft workflow scheme * Deletes a draft workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the active workflow scheme that the draft was created from. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 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 original active workflow scheme is not found. * the original active workflow scheme does not have a draft. -
*/ public void deleteWorkflowSchemeDraft(Long id) throws ApiException { deleteWorkflowSchemeDraftWithHttpInfo(id); } /** * Delete draft workflow scheme * Deletes a draft workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the active workflow scheme that the draft was created from. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 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 original active workflow scheme is not found. * the original active workflow scheme does not have a draft. -
*/ public ApiResponse deleteWorkflowSchemeDraftWithHttpInfo(Long id) throws ApiException { okhttp3.Call localVarCall = deleteWorkflowSchemeDraftValidateBeforeCall(id, null); return localVarApiClient.execute(localVarCall); } /** * Delete draft workflow scheme (asynchronously) * Deletes a draft workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the active workflow scheme that the draft was created from. (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. -
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 original active workflow scheme is not found. * the original active workflow scheme does not have a draft. -
*/ public okhttp3.Call deleteWorkflowSchemeDraftAsync(Long id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteWorkflowSchemeDraftValidateBeforeCall(id, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteWorkflowSchemeDraftIssueType * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param issueType The ID of the issue type. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
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 deleteWorkflowSchemeDraftIssueTypeCall(Long id, String issueType, 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}/draft/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 = { }; 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 deleteWorkflowSchemeDraftIssueTypeValidateBeforeCall(Long id, String issueType, 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 deleteWorkflowSchemeDraftIssueType(Async)"); } // verify the required parameter 'issueType' is set if (issueType == null) { throw new ApiException("Missing the required parameter 'issueType' when calling deleteWorkflowSchemeDraftIssueType(Async)"); } return deleteWorkflowSchemeDraftIssueTypeCall(id, issueType, _callback); } /** * Delete workflow for issue type in draft workflow scheme * Deletes the issue type-workflow mapping for an issue type in a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param issueType The ID of the issue type. (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. -
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 deleteWorkflowSchemeDraftIssueType(Long id, String issueType) throws ApiException { ApiResponse localVarResp = deleteWorkflowSchemeDraftIssueTypeWithHttpInfo(id, issueType); return localVarResp.getData(); } /** * Delete workflow for issue type in draft workflow scheme * Deletes the issue type-workflow mapping for an issue type in a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param issueType The ID of the issue type. (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. -
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 deleteWorkflowSchemeDraftIssueTypeWithHttpInfo(Long id, String issueType) throws ApiException { okhttp3.Call localVarCall = deleteWorkflowSchemeDraftIssueTypeValidateBeforeCall(id, issueType, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete workflow for issue type in draft workflow scheme (asynchronously) * Deletes the issue type-workflow mapping for an issue type in a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param issueType The ID of the issue type. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
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 deleteWorkflowSchemeDraftIssueTypeAsync(Long id, String issueType, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteWorkflowSchemeDraftIssueTypeValidateBeforeCall(id, issueType, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDraftDefaultWorkflow * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
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 scheme does not have a draft. -
*/ public okhttp3.Call getDraftDefaultWorkflowCall(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}/draft/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 = { }; 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 getDraftDefaultWorkflowValidateBeforeCall(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 getDraftDefaultWorkflow(Async)"); } return getDraftDefaultWorkflowCall(id, _callback); } /** * Get draft default workflow * Returns the default workflow for a workflow scheme's draft. 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 that the draft belongs to. (required) * @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 any of the following is true: * The workflow scheme is not found. * The workflow scheme does not have a draft. -
*/ public DefaultWorkflow getDraftDefaultWorkflow(Long id) throws ApiException { ApiResponse localVarResp = getDraftDefaultWorkflowWithHttpInfo(id); return localVarResp.getData(); } /** * Get draft default workflow * Returns the default workflow for a workflow scheme's draft. 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 that the draft belongs to. (required) * @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 any of the following is true: * The workflow scheme is not found. * The workflow scheme does not have a draft. -
*/ public ApiResponse getDraftDefaultWorkflowWithHttpInfo(Long id) throws ApiException { okhttp3.Call localVarCall = getDraftDefaultWorkflowValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get draft default workflow (asynchronously) * Returns the default workflow for a workflow scheme's draft. 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 that the draft belongs to. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
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 scheme does not have a draft. -
*/ public okhttp3.Call getDraftDefaultWorkflowAsync(Long id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDraftDefaultWorkflowValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDraftWorkflow * @param id The ID of the workflow scheme that the draft belongs to. (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 _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 (if specified) is not found. session. -
*/ public okhttp3.Call getDraftWorkflowCall(Long id, String workflowName, 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}/draft/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 = { }; 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 getDraftWorkflowValidateBeforeCall(Long id, String workflowName, 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 getDraftWorkflow(Async)"); } return getDraftWorkflowCall(id, workflowName, _callback); } /** * Get issue types for workflows in draft workflow scheme * Returns the workflow-issue type mappings for a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (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) * @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 (if specified) is not found. session. -
*/ public IssueTypesWorkflowMapping getDraftWorkflow(Long id, String workflowName) throws ApiException { ApiResponse localVarResp = getDraftWorkflowWithHttpInfo(id, workflowName); return localVarResp.getData(); } /** * Get issue types for workflows in draft workflow scheme * Returns the workflow-issue type mappings for a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (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) * @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 (if specified) is not found. session. -
*/ public ApiResponse getDraftWorkflowWithHttpInfo(Long id, String workflowName) throws ApiException { okhttp3.Call localVarCall = getDraftWorkflowValidateBeforeCall(id, workflowName, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get issue types for workflows in draft workflow scheme (asynchronously) * Returns the workflow-issue type mappings for a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (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 _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 (if specified) is not found. session. -
*/ public okhttp3.Call getDraftWorkflowAsync(Long id, String workflowName, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDraftWorkflowValidateBeforeCall(id, workflowName, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getWorkflowSchemeDraft * @param id The ID of the active workflow scheme that the draft was created from. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if: * the original active workflow scheme is not found. * the original active workflow scheme does not have a draft. -
*/ public okhttp3.Call getWorkflowSchemeDraftCall(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}/draft" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getWorkflowSchemeDraftValidateBeforeCall(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 getWorkflowSchemeDraft(Async)"); } return getWorkflowSchemeDraftCall(id, _callback); } /** * Get draft workflow scheme * Returns the draft workflow scheme for an active workflow scheme. Draft workflow schemes allow changes to be made to the active workflow schemes: When an active workflow scheme is updated, a draft copy is created. The draft is modified, then the changes in the draft are copied back to the active workflow scheme. See [Configuring workflow schemes](https://confluence.atlassian.com/x/tohKLg) for more information. Note that: * Only active workflow schemes can have draft workflow schemes. * An active workflow scheme can only have one draft workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the active workflow scheme that the draft was created from. (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. -
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 original active workflow scheme is not found. * the original active workflow scheme does not have a draft. -
*/ public WorkflowScheme getWorkflowSchemeDraft(Long id) throws ApiException { ApiResponse localVarResp = getWorkflowSchemeDraftWithHttpInfo(id); return localVarResp.getData(); } /** * Get draft workflow scheme * Returns the draft workflow scheme for an active workflow scheme. Draft workflow schemes allow changes to be made to the active workflow schemes: When an active workflow scheme is updated, a draft copy is created. The draft is modified, then the changes in the draft are copied back to the active workflow scheme. See [Configuring workflow schemes](https://confluence.atlassian.com/x/tohKLg) for more information. Note that: * Only active workflow schemes can have draft workflow schemes. * An active workflow scheme can only have one draft workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the active workflow scheme that the draft was created from. (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. -
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 original active workflow scheme is not found. * the original active workflow scheme does not have a draft. -
*/ public ApiResponse getWorkflowSchemeDraftWithHttpInfo(Long id) throws ApiException { okhttp3.Call localVarCall = getWorkflowSchemeDraftValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get draft workflow scheme (asynchronously) * Returns the draft workflow scheme for an active workflow scheme. Draft workflow schemes allow changes to be made to the active workflow schemes: When an active workflow scheme is updated, a draft copy is created. The draft is modified, then the changes in the draft are copied back to the active workflow scheme. See [Configuring workflow schemes](https://confluence.atlassian.com/x/tohKLg) for more information. Note that: * Only active workflow schemes can have draft workflow schemes. * An active workflow scheme can only have one draft workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the active workflow scheme that the draft was created from. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if: * the original active workflow scheme is not found. * the original active workflow scheme does not have a draft. -
*/ public okhttp3.Call getWorkflowSchemeDraftAsync(Long id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWorkflowSchemeDraftValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getWorkflowSchemeDraftIssueType * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param issueType The ID of the issue type. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
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 getWorkflowSchemeDraftIssueTypeCall(Long id, String issueType, 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}/draft/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 = { }; 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 getWorkflowSchemeDraftIssueTypeValidateBeforeCall(Long id, String issueType, 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 getWorkflowSchemeDraftIssueType(Async)"); } // verify the required parameter 'issueType' is set if (issueType == null) { throw new ApiException("Missing the required parameter 'issueType' when calling getWorkflowSchemeDraftIssueType(Async)"); } return getWorkflowSchemeDraftIssueTypeCall(id, issueType, _callback); } /** * Get workflow for issue type in draft workflow scheme * Returns the issue type-workflow mapping for an issue type in a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param issueType The ID of the issue type. (required) * @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 getWorkflowSchemeDraftIssueType(Long id, String issueType) throws ApiException { ApiResponse localVarResp = getWorkflowSchemeDraftIssueTypeWithHttpInfo(id, issueType); return localVarResp.getData(); } /** * Get workflow for issue type in draft workflow scheme * Returns the issue type-workflow mapping for an issue type in a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param issueType The ID of the issue type. (required) * @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 getWorkflowSchemeDraftIssueTypeWithHttpInfo(Long id, String issueType) throws ApiException { okhttp3.Call localVarCall = getWorkflowSchemeDraftIssueTypeValidateBeforeCall(id, issueType, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get workflow for issue type in draft workflow scheme (asynchronously) * Returns the issue type-workflow mapping for an issue type in a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param issueType The ID of the issue type. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
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 getWorkflowSchemeDraftIssueTypeAsync(Long id, String issueType, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWorkflowSchemeDraftIssueTypeValidateBeforeCall(id, issueType, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for publishDraftWorkflowScheme * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param publishDraftWorkflowScheme Details of the status mappings. (required) * @param validateOnly Whether the request only performs a validation. (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
204 Returned if the request is only for validation and is successful. -
303 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 these are true: * The workflow scheme is not found. * The workflow scheme does not have a draft. * A new status in the draft workflow scheme is not found. -
*/ public okhttp3.Call publishDraftWorkflowSchemeCall(Long id, PublishDraftWorkflowScheme publishDraftWorkflowScheme, Boolean validateOnly, 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 = publishDraftWorkflowScheme; // create path and map variables String localVarPath = "/rest/api/3/workflowscheme/{id}/draft/publish" .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 (validateOnly != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("validateOnly", validateOnly)); } 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 publishDraftWorkflowSchemeValidateBeforeCall(Long id, PublishDraftWorkflowScheme publishDraftWorkflowScheme, Boolean validateOnly, 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 publishDraftWorkflowScheme(Async)"); } // verify the required parameter 'publishDraftWorkflowScheme' is set if (publishDraftWorkflowScheme == null) { throw new ApiException("Missing the required parameter 'publishDraftWorkflowScheme' when calling publishDraftWorkflowScheme(Async)"); } return publishDraftWorkflowSchemeCall(id, publishDraftWorkflowScheme, validateOnly, _callback); } /** * Publish draft workflow scheme * Publishes a draft workflow scheme. Where the draft workflow includes new workflow statuses for an issue type, mappings are provided to update issues with the original workflow status to the new workflow status. This operation is [asynchronous](#async). Follow the `location` link in the response to determine the status of the task and use [Get task](#api-rest-api-3-task-taskId-get) to obtain updates. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param publishDraftWorkflowScheme Details of the status mappings. (required) * @param validateOnly Whether the request only performs a validation. (optional, default to false) * @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 only for validation and is successful. -
303 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 these are true: * The workflow scheme is not found. * The workflow scheme does not have a draft. * A new status in the draft workflow scheme is not found. -
*/ public void publishDraftWorkflowScheme(Long id, PublishDraftWorkflowScheme publishDraftWorkflowScheme, Boolean validateOnly) throws ApiException { publishDraftWorkflowSchemeWithHttpInfo(id, publishDraftWorkflowScheme, validateOnly); } /** * Publish draft workflow scheme * Publishes a draft workflow scheme. Where the draft workflow includes new workflow statuses for an issue type, mappings are provided to update issues with the original workflow status to the new workflow status. This operation is [asynchronous](#async). Follow the `location` link in the response to determine the status of the task and use [Get task](#api-rest-api-3-task-taskId-get) to obtain updates. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param publishDraftWorkflowScheme Details of the status mappings. (required) * @param validateOnly Whether the request only performs a validation. (optional, default to false) * @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
204 Returned if the request is only for validation and is successful. -
303 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 these are true: * The workflow scheme is not found. * The workflow scheme does not have a draft. * A new status in the draft workflow scheme is not found. -
*/ public ApiResponse publishDraftWorkflowSchemeWithHttpInfo(Long id, PublishDraftWorkflowScheme publishDraftWorkflowScheme, Boolean validateOnly) throws ApiException { okhttp3.Call localVarCall = publishDraftWorkflowSchemeValidateBeforeCall(id, publishDraftWorkflowScheme, validateOnly, null); return localVarApiClient.execute(localVarCall); } /** * Publish draft workflow scheme (asynchronously) * Publishes a draft workflow scheme. Where the draft workflow includes new workflow statuses for an issue type, mappings are provided to update issues with the original workflow status to the new workflow status. This operation is [asynchronous](#async). Follow the `location` link in the response to determine the status of the task and use [Get task](#api-rest-api-3-task-taskId-get) to obtain updates. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param publishDraftWorkflowScheme Details of the status mappings. (required) * @param validateOnly Whether the request only performs a validation. (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
204 Returned if the request is only for validation and is successful. -
303 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 these are true: * The workflow scheme is not found. * The workflow scheme does not have a draft. * A new status in the draft workflow scheme is not found. -
*/ public okhttp3.Call publishDraftWorkflowSchemeAsync(Long id, PublishDraftWorkflowScheme publishDraftWorkflowScheme, Boolean validateOnly, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = publishDraftWorkflowSchemeValidateBeforeCall(id, publishDraftWorkflowScheme, validateOnly, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for setWorkflowSchemeDraftIssueType * @param id The ID of the workflow scheme that the draft belongs to. (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 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 or issue type is not found. -
*/ public okhttp3.Call setWorkflowSchemeDraftIssueTypeCall(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}/draft/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 setWorkflowSchemeDraftIssueTypeValidateBeforeCall(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 setWorkflowSchemeDraftIssueType(Async)"); } // verify the required parameter 'issueType' is set if (issueType == null) { throw new ApiException("Missing the required parameter 'issueType' when calling setWorkflowSchemeDraftIssueType(Async)"); } // verify the required parameter 'issueTypeWorkflowMapping' is set if (issueTypeWorkflowMapping == null) { throw new ApiException("Missing the required parameter 'issueTypeWorkflowMapping' when calling setWorkflowSchemeDraftIssueType(Async)"); } return setWorkflowSchemeDraftIssueTypeCall(id, issueType, issueTypeWorkflowMapping, _callback); } /** * Set workflow for issue type in draft workflow scheme * Sets the workflow for an issue type in a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (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 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 or issue type is not found. -
*/ public WorkflowScheme setWorkflowSchemeDraftIssueType(Long id, String issueType, IssueTypeWorkflowMapping issueTypeWorkflowMapping) throws ApiException { ApiResponse localVarResp = setWorkflowSchemeDraftIssueTypeWithHttpInfo(id, issueType, issueTypeWorkflowMapping); return localVarResp.getData(); } /** * Set workflow for issue type in draft workflow scheme * Sets the workflow for an issue type in a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (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 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 or issue type is not found. -
*/ public ApiResponse setWorkflowSchemeDraftIssueTypeWithHttpInfo(Long id, String issueType, IssueTypeWorkflowMapping issueTypeWorkflowMapping) throws ApiException { okhttp3.Call localVarCall = setWorkflowSchemeDraftIssueTypeValidateBeforeCall(id, issueType, issueTypeWorkflowMapping, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Set workflow for issue type in draft workflow scheme (asynchronously) * Sets the workflow for an issue type in a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (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 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 or issue type is not found. -
*/ public okhttp3.Call setWorkflowSchemeDraftIssueTypeAsync(Long id, String issueType, IssueTypeWorkflowMapping issueTypeWorkflowMapping, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = setWorkflowSchemeDraftIssueTypeValidateBeforeCall(id, issueType, issueTypeWorkflowMapping, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateDraftDefaultWorkflow * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param defaultWorkflow The object for 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 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 scheme does not have a draft. -
*/ public okhttp3.Call updateDraftDefaultWorkflowCall(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}/draft/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 updateDraftDefaultWorkflowValidateBeforeCall(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 updateDraftDefaultWorkflow(Async)"); } // verify the required parameter 'defaultWorkflow' is set if (defaultWorkflow == null) { throw new ApiException("Missing the required parameter 'defaultWorkflow' when calling updateDraftDefaultWorkflow(Async)"); } return updateDraftDefaultWorkflowCall(id, defaultWorkflow, _callback); } /** * Update draft default workflow * Sets the default workflow for a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param defaultWorkflow The object for 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 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 scheme does not have a draft. -
*/ public WorkflowScheme updateDraftDefaultWorkflow(Long id, DefaultWorkflow defaultWorkflow) throws ApiException { ApiResponse localVarResp = updateDraftDefaultWorkflowWithHttpInfo(id, defaultWorkflow); return localVarResp.getData(); } /** * Update draft default workflow * Sets the default workflow for a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param defaultWorkflow The object for 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 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 scheme does not have a draft. -
*/ public ApiResponse updateDraftDefaultWorkflowWithHttpInfo(Long id, DefaultWorkflow defaultWorkflow) throws ApiException { okhttp3.Call localVarCall = updateDraftDefaultWorkflowValidateBeforeCall(id, defaultWorkflow, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update draft default workflow (asynchronously) * Sets the default workflow for a workflow scheme's draft. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (required) * @param defaultWorkflow The object for 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 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 scheme does not have a draft. -
*/ public okhttp3.Call updateDraftDefaultWorkflowAsync(Long id, DefaultWorkflow defaultWorkflow, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateDraftDefaultWorkflowValidateBeforeCall(id, defaultWorkflow, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateDraftWorkflowMapping * @param id The ID of the workflow scheme that the draft belongs to. (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 scheme does not have a draft. * The workflow is not found. * The workflow is not specified. -
*/ public okhttp3.Call updateDraftWorkflowMappingCall(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}/draft/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 updateDraftWorkflowMappingValidateBeforeCall(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 updateDraftWorkflowMapping(Async)"); } // verify the required parameter 'workflowName' is set if (workflowName == null) { throw new ApiException("Missing the required parameter 'workflowName' when calling updateDraftWorkflowMapping(Async)"); } // verify the required parameter 'issueTypesWorkflowMapping' is set if (issueTypesWorkflowMapping == null) { throw new ApiException("Missing the required parameter 'issueTypesWorkflowMapping' when calling updateDraftWorkflowMapping(Async)"); } return updateDraftWorkflowMappingCall(id, workflowName, issueTypesWorkflowMapping, _callback); } /** * Set issue types for workflow in workflow scheme * Sets the issue types for a workflow in a workflow scheme's draft. The workflow can also be set as the default workflow for the draft workflow scheme. Unmapped issues types are mapped to the default workflow. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (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 scheme does not have a draft. * The workflow is not found. * The workflow is not specified. -
*/ public WorkflowScheme updateDraftWorkflowMapping(Long id, String workflowName, IssueTypesWorkflowMapping issueTypesWorkflowMapping) throws ApiException { ApiResponse localVarResp = updateDraftWorkflowMappingWithHttpInfo(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's draft. The workflow can also be set as the default workflow for the draft workflow scheme. Unmapped issues types are mapped to the default workflow. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (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 scheme does not have a draft. * The workflow is not found. * The workflow is not specified. -
*/ public ApiResponse updateDraftWorkflowMappingWithHttpInfo(Long id, String workflowName, IssueTypesWorkflowMapping issueTypesWorkflowMapping) throws ApiException { okhttp3.Call localVarCall = updateDraftWorkflowMappingValidateBeforeCall(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's draft. The workflow can also be set as the default workflow for the draft workflow scheme. Unmapped issues types are mapped to the default workflow. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the workflow scheme that the draft belongs to. (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 scheme does not have a draft. * The workflow is not found. * The workflow is not specified. -
*/ public okhttp3.Call updateDraftWorkflowMappingAsync(Long id, String workflowName, IssueTypesWorkflowMapping issueTypesWorkflowMapping, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateDraftWorkflowMappingValidateBeforeCall(id, workflowName, issueTypesWorkflowMapping, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateWorkflowSchemeDraft * @param id The ID of the active workflow scheme that the draft was created from. (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 original active workflow scheme is not found. * the original active workflow scheme does not have a draft. -
*/ public okhttp3.Call updateWorkflowSchemeDraftCall(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}/draft" .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 updateWorkflowSchemeDraftValidateBeforeCall(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 updateWorkflowSchemeDraft(Async)"); } // verify the required parameter 'workflowScheme' is set if (workflowScheme == null) { throw new ApiException("Missing the required parameter 'workflowScheme' when calling updateWorkflowSchemeDraft(Async)"); } return updateWorkflowSchemeDraftCall(id, workflowScheme, _callback); } /** * Update draft workflow scheme * Updates a draft workflow scheme. If a draft workflow scheme does not exist for the active workflow scheme, then a draft is created. Note that an active workflow scheme can only have one draft workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the active workflow scheme that the draft was created from. (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 original active workflow scheme is not found. * the original active workflow scheme does not have a draft. -
*/ public WorkflowScheme updateWorkflowSchemeDraft(Long id, WorkflowScheme workflowScheme) throws ApiException { ApiResponse localVarResp = updateWorkflowSchemeDraftWithHttpInfo(id, workflowScheme); return localVarResp.getData(); } /** * Update draft workflow scheme * Updates a draft workflow scheme. If a draft workflow scheme does not exist for the active workflow scheme, then a draft is created. Note that an active workflow scheme can only have one draft workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the active workflow scheme that the draft was created from. (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 original active workflow scheme is not found. * the original active workflow scheme does not have a draft. -
*/ public ApiResponse updateWorkflowSchemeDraftWithHttpInfo(Long id, WorkflowScheme workflowScheme) throws ApiException { okhttp3.Call localVarCall = updateWorkflowSchemeDraftValidateBeforeCall(id, workflowScheme, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update draft workflow scheme (asynchronously) * Updates a draft workflow scheme. If a draft workflow scheme does not exist for the active workflow scheme, then a draft is created. Note that an active workflow scheme can only have one draft workflow scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the active workflow scheme that the draft was created from. (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 original active workflow scheme is not found. * the original active workflow scheme does not have a draft. -
*/ public okhttp3.Call updateWorkflowSchemeDraftAsync(Long id, WorkflowScheme workflowScheme, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateWorkflowSchemeDraftValidateBeforeCall(id, workflowScheme, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy