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

software.tnb.jira.validation.generated.api.IssueTypesApi 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.Avatar;
import software.tnb.jira.validation.generated.model.IssueTypeCreateBean;
import software.tnb.jira.validation.generated.model.IssueTypeDetails;
import software.tnb.jira.validation.generated.model.IssueTypeUpdateBean;

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

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

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

    public IssueTypesApi(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 createIssueType
     * @param issueTypeCreateBean  (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 because: * no content is sent. * the issue type name exceeds 60 characters. * a subtask issue type is requested on an instance where subtasks are disabled. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
409 Returned if the issue type name is in use. -
*/ public okhttp3.Call createIssueTypeCall(IssueTypeCreateBean issueTypeCreateBean, 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 = issueTypeCreateBean; // create path and map variables String localVarPath = "/rest/api/3/issuetype"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createIssueTypeValidateBeforeCall(IssueTypeCreateBean issueTypeCreateBean, final ApiCallback _callback) throws ApiException { // verify the required parameter 'issueTypeCreateBean' is set if (issueTypeCreateBean == null) { throw new ApiException("Missing the required parameter 'issueTypeCreateBean' when calling createIssueType(Async)"); } return createIssueTypeCall(issueTypeCreateBean, _callback); } /** * Create issue type * Creates an issue type and adds it to the default issue type scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param issueTypeCreateBean (required) * @return IssueTypeDetails * @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 because: * no content is sent. * the issue type name exceeds 60 characters. * a subtask issue type is requested on an instance where subtasks are disabled. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
409 Returned if the issue type name is in use. -
*/ public IssueTypeDetails createIssueType(IssueTypeCreateBean issueTypeCreateBean) throws ApiException { ApiResponse localVarResp = createIssueTypeWithHttpInfo(issueTypeCreateBean); return localVarResp.getData(); } /** * Create issue type * Creates an issue type and adds it to the default issue type scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param issueTypeCreateBean (required) * @return ApiResponse<IssueTypeDetails> * @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 because: * no content is sent. * the issue type name exceeds 60 characters. * a subtask issue type is requested on an instance where subtasks are disabled. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
409 Returned if the issue type name is in use. -
*/ public ApiResponse createIssueTypeWithHttpInfo(IssueTypeCreateBean issueTypeCreateBean) throws ApiException { okhttp3.Call localVarCall = createIssueTypeValidateBeforeCall(issueTypeCreateBean, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create issue type (asynchronously) * Creates an issue type and adds it to the default issue type scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param issueTypeCreateBean (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 because: * no content is sent. * the issue type name exceeds 60 characters. * a subtask issue type is requested on an instance where subtasks are disabled. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
409 Returned if the issue type name is in use. -
*/ public okhttp3.Call createIssueTypeAsync(IssueTypeCreateBean issueTypeCreateBean, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createIssueTypeValidateBeforeCall(issueTypeCreateBean, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createIssueTypeAvatar * @param id The ID of the issue type. (required) * @param size The length of each side of the crop region. (required) * @param body (required) * @param x The X coordinate of the top-left corner of the crop region. (optional, default to 0) * @param y The Y coordinate of the top-left corner of the crop region. (optional, default to 0) * @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: * an image isn't included in the request. * the image type is unsupported. * the crop parameters extend the crop area beyond the edge of the image. * `cropSize` is missing. * the issue type ID 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 issue type is not found. -
*/ public okhttp3.Call createIssueTypeAvatarCall(String id, Integer size, Object body, Integer x, Integer y, 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 = body; // create path and map variables String localVarPath = "/rest/api/3/issuetype/{id}/avatar2" .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 (x != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("x", x)); } if (y != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("y", y)); } if (size != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); } 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 createIssueTypeAvatarValidateBeforeCall(String id, Integer size, Object body, Integer x, Integer y, 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 createIssueTypeAvatar(Async)"); } // verify the required parameter 'size' is set if (size == null) { throw new ApiException("Missing the required parameter 'size' when calling createIssueTypeAvatar(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createIssueTypeAvatar(Async)"); } return createIssueTypeAvatarCall(id, size, body, x, y, _callback); } /** * Load issue type avatar * Loads an avatar for the issue type. Specify the avatar's local file location in the body of the request. Also, include the following headers: * `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special Headers](#special-request-headers). * `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. For example: `curl --request POST \\ --user [email protected]:<api_token> \\ --header 'X-Atlassian-Token: no-check' \\ --header 'Content-Type: image/< image_type>' \\ --data-binary \"<@/path/to/file/with/your/avatar>\" \\ --url 'https://your-domain.atlassian.net/rest/api/3/issuetype/{issueTypeId}'This` The avatar is cropped to a square. If no crop parameters are specified, the square originates at the top left of the image. The length of the square's sides is set to the smaller of the height or width of the image. The cropped image is then used to create avatars of 16x16, 24x24, 32x32, and 48x48 in size. After creating the avatar, use [ Update issue type](#api-rest-api-3-issuetype-id-put) to set it as the issue type's displayed avatar. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue type. (required) * @param size The length of each side of the crop region. (required) * @param body (required) * @param x The X coordinate of the top-left corner of the crop region. (optional, default to 0) * @param y The Y coordinate of the top-left corner of the crop region. (optional, default to 0) * @return Avatar * @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: * an image isn't included in the request. * the image type is unsupported. * the crop parameters extend the crop area beyond the edge of the image. * `cropSize` is missing. * the issue type ID 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 issue type is not found. -
*/ public Avatar createIssueTypeAvatar(String id, Integer size, Object body, Integer x, Integer y) throws ApiException { ApiResponse localVarResp = createIssueTypeAvatarWithHttpInfo(id, size, body, x, y); return localVarResp.getData(); } /** * Load issue type avatar * Loads an avatar for the issue type. Specify the avatar's local file location in the body of the request. Also, include the following headers: * `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special Headers](#special-request-headers). * `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. For example: `curl --request POST \\ --user [email protected]:<api_token> \\ --header 'X-Atlassian-Token: no-check' \\ --header 'Content-Type: image/< image_type>' \\ --data-binary \"<@/path/to/file/with/your/avatar>\" \\ --url 'https://your-domain.atlassian.net/rest/api/3/issuetype/{issueTypeId}'This` The avatar is cropped to a square. If no crop parameters are specified, the square originates at the top left of the image. The length of the square's sides is set to the smaller of the height or width of the image. The cropped image is then used to create avatars of 16x16, 24x24, 32x32, and 48x48 in size. After creating the avatar, use [ Update issue type](#api-rest-api-3-issuetype-id-put) to set it as the issue type's displayed avatar. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue type. (required) * @param size The length of each side of the crop region. (required) * @param body (required) * @param x The X coordinate of the top-left corner of the crop region. (optional, default to 0) * @param y The Y coordinate of the top-left corner of the crop region. (optional, default to 0) * @return ApiResponse<Avatar> * @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: * an image isn't included in the request. * the image type is unsupported. * the crop parameters extend the crop area beyond the edge of the image. * `cropSize` is missing. * the issue type ID 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 issue type is not found. -
*/ public ApiResponse createIssueTypeAvatarWithHttpInfo(String id, Integer size, Object body, Integer x, Integer y) throws ApiException { okhttp3.Call localVarCall = createIssueTypeAvatarValidateBeforeCall(id, size, body, x, y, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Load issue type avatar (asynchronously) * Loads an avatar for the issue type. Specify the avatar's local file location in the body of the request. Also, include the following headers: * `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special Headers](#special-request-headers). * `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. For example: `curl --request POST \\ --user [email protected]:<api_token> \\ --header 'X-Atlassian-Token: no-check' \\ --header 'Content-Type: image/< image_type>' \\ --data-binary \"<@/path/to/file/with/your/avatar>\" \\ --url 'https://your-domain.atlassian.net/rest/api/3/issuetype/{issueTypeId}'This` The avatar is cropped to a square. If no crop parameters are specified, the square originates at the top left of the image. The length of the square's sides is set to the smaller of the height or width of the image. The cropped image is then used to create avatars of 16x16, 24x24, 32x32, and 48x48 in size. After creating the avatar, use [ Update issue type](#api-rest-api-3-issuetype-id-put) to set it as the issue type's displayed avatar. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue type. (required) * @param size The length of each side of the crop region. (required) * @param body (required) * @param x The X coordinate of the top-left corner of the crop region. (optional, default to 0) * @param y The Y coordinate of the top-left corner of the crop region. (optional, default to 0) * @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: * an image isn't included in the request. * the image type is unsupported. * the crop parameters extend the crop area beyond the edge of the image. * `cropSize` is missing. * the issue type ID 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 issue type is not found. -
*/ public okhttp3.Call createIssueTypeAvatarAsync(String id, Integer size, Object body, Integer x, Integer y, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createIssueTypeAvatarValidateBeforeCall(id, size, body, x, y, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteIssueType * @param id The ID of the issue type. (required) * @param alternativeIssueTypeId The ID of the replacement issue type. (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
204 Returned if the request is successful. -
400 Returned if any issues cannot be updated with the alternative issue type. -
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 issue type is in use and an alternative issue type is not specified. * the issue type or alternative issue type is not found. -
409 Returned if the issue type is in use and: * also specified as the alternative issue type. * is a *standard* issue type and the alternative issue type is a *subtask*. -
*/ public okhttp3.Call deleteIssueTypeCall(String id, String alternativeIssueTypeId, 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/issuetype/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (alternativeIssueTypeId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("alternativeIssueTypeId", alternativeIssueTypeId)); } 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 deleteIssueTypeValidateBeforeCall(String id, String alternativeIssueTypeId, 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 deleteIssueType(Async)"); } return deleteIssueTypeCall(id, alternativeIssueTypeId, _callback); } /** * Delete issue type * Deletes the issue type. If the issue type is in use, all uses are updated with the alternative issue type (`alternativeIssueTypeId`). A list of alternative issue types are obtained from the [Get alternative issue types](#api-rest-api-3-issuetype-id-alternatives-get) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue type. (required) * @param alternativeIssueTypeId The ID of the replacement issue type. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if any issues cannot be updated with the alternative issue type. -
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 issue type is in use and an alternative issue type is not specified. * the issue type or alternative issue type is not found. -
409 Returned if the issue type is in use and: * also specified as the alternative issue type. * is a *standard* issue type and the alternative issue type is a *subtask*. -
*/ public void deleteIssueType(String id, String alternativeIssueTypeId) throws ApiException { deleteIssueTypeWithHttpInfo(id, alternativeIssueTypeId); } /** * Delete issue type * Deletes the issue type. If the issue type is in use, all uses are updated with the alternative issue type (`alternativeIssueTypeId`). A list of alternative issue types are obtained from the [Get alternative issue types](#api-rest-api-3-issuetype-id-alternatives-get) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue type. (required) * @param alternativeIssueTypeId The ID of the replacement issue type. (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if any issues cannot be updated with the alternative issue type. -
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 issue type is in use and an alternative issue type is not specified. * the issue type or alternative issue type is not found. -
409 Returned if the issue type is in use and: * also specified as the alternative issue type. * is a *standard* issue type and the alternative issue type is a *subtask*. -
*/ public ApiResponse deleteIssueTypeWithHttpInfo(String id, String alternativeIssueTypeId) throws ApiException { okhttp3.Call localVarCall = deleteIssueTypeValidateBeforeCall(id, alternativeIssueTypeId, null); return localVarApiClient.execute(localVarCall); } /** * Delete issue type (asynchronously) * Deletes the issue type. If the issue type is in use, all uses are updated with the alternative issue type (`alternativeIssueTypeId`). A list of alternative issue types are obtained from the [Get alternative issue types](#api-rest-api-3-issuetype-id-alternatives-get) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue type. (required) * @param alternativeIssueTypeId The ID of the replacement issue type. (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
204 Returned if the request is successful. -
400 Returned if any issues cannot be updated with the alternative issue type. -
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 issue type is in use and an alternative issue type is not specified. * the issue type or alternative issue type is not found. -
409 Returned if the issue type is in use and: * also specified as the alternative issue type. * is a *standard* issue type and the alternative issue type is a *subtask*. -
*/ public okhttp3.Call deleteIssueTypeAsync(String id, String alternativeIssueTypeId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteIssueTypeValidateBeforeCall(id, alternativeIssueTypeId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getAlternativeIssueTypes * @param id 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. -
404 Returned if: * the issue type is not found. * the user does not have the required permissions. -
*/ public okhttp3.Call getAlternativeIssueTypesCall(String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/rest/api/3/issuetype/{id}/alternatives" .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 getAlternativeIssueTypesValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getAlternativeIssueTypes(Async)"); } return getAlternativeIssueTypesCall(id, _callback); } /** * Get alternative issue types * Returns a list of issue types that can be used to replace the issue type. The alternative issue types are those assigned to the same workflow scheme, field configuration scheme, and screen scheme. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param id The ID of the issue type. (required) * @return List<IssueTypeDetails> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue type is not found. * the user does not have the required permissions. -
*/ public List getAlternativeIssueTypes(String id) throws ApiException { ApiResponse> localVarResp = getAlternativeIssueTypesWithHttpInfo(id); return localVarResp.getData(); } /** * Get alternative issue types * Returns a list of issue types that can be used to replace the issue type. The alternative issue types are those assigned to the same workflow scheme, field configuration scheme, and screen scheme. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param id The ID of the issue type. (required) * @return ApiResponse<List<IssueTypeDetails>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue type is not found. * the user does not have the required permissions. -
*/ public ApiResponse> getAlternativeIssueTypesWithHttpInfo(String id) throws ApiException { okhttp3.Call localVarCall = getAlternativeIssueTypesValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get alternative issue types (asynchronously) * Returns a list of issue types that can be used to replace the issue type. The alternative issue types are those assigned to the same workflow scheme, field configuration scheme, and screen scheme. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param id 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. -
404 Returned if: * the issue type is not found. * the user does not have the required permissions. -
*/ public okhttp3.Call getAlternativeIssueTypesAsync(String id, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getAlternativeIssueTypesValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getIssueAllTypes * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call getIssueAllTypesCall(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/issuetype"; 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 getIssueAllTypesValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getIssueAllTypesCall(_callback); } /** * Get all issue types for user * Returns all issue types. This operation can be accessed anonymously. **[Permissions](#permissions) required:** Issue types are only returned as follows: * if the user has the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), all issue types are returned. * if the user has the *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for one or more projects, the issue types associated with the projects the user has permission to browse are returned. * @return List<IssueTypeDetails> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public List getIssueAllTypes() throws ApiException { ApiResponse> localVarResp = getIssueAllTypesWithHttpInfo(); return localVarResp.getData(); } /** * Get all issue types for user * Returns all issue types. This operation can be accessed anonymously. **[Permissions](#permissions) required:** Issue types are only returned as follows: * if the user has the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), all issue types are returned. * if the user has the *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for one or more projects, the issue types associated with the projects the user has permission to browse are returned. * @return ApiResponse<List<IssueTypeDetails>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public ApiResponse> getIssueAllTypesWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getIssueAllTypesValidateBeforeCall(null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get all issue types for user (asynchronously) * Returns all issue types. This operation can be accessed anonymously. **[Permissions](#permissions) required:** Issue types are only returned as follows: * if the user has the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), all issue types are returned. * if the user has the *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for one or more projects, the issue types associated with the projects the user has permission to browse are returned. * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call getIssueAllTypesAsync(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getIssueAllTypesValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getIssueType * @param id 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. -
400 Returned if the issue type ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue type is not found. * the user does not have the required permissions. -
*/ public okhttp3.Call getIssueTypeCall(String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/rest/api/3/issuetype/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getIssueTypeValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getIssueType(Async)"); } return getIssueTypeCall(id, _callback); } /** * Get issue type * Returns an issue type. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) in a project the issue type is associated with or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue type. (required) * @return IssueTypeDetails * @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 issue type ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue type is not found. * the user does not have the required permissions. -
*/ public IssueTypeDetails getIssueType(String id) throws ApiException { ApiResponse localVarResp = getIssueTypeWithHttpInfo(id); return localVarResp.getData(); } /** * Get issue type * Returns an issue type. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) in a project the issue type is associated with or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue type. (required) * @return ApiResponse<IssueTypeDetails> * @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 issue type ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue type is not found. * the user does not have the required permissions. -
*/ public ApiResponse getIssueTypeWithHttpInfo(String id) throws ApiException { okhttp3.Call localVarCall = getIssueTypeValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get issue type (asynchronously) * Returns an issue type. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) in a project the issue type is associated with or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id 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. -
400 Returned if the issue type ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue type is not found. * the user does not have the required permissions. -
*/ public okhttp3.Call getIssueTypeAsync(String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getIssueTypeValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getIssueTypesForProject * @param projectId The ID of the project. (required) * @param level The level of the issue type to filter by. Use: * `-1` for Subtask. * `0` for Base. * `1` for Epic. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the project is not found. * the user does not have the necessary permission. -
*/ public okhttp3.Call getIssueTypesForProjectCall(Long projectId, Integer level, 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/issuetype/project"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (projectId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("projectId", projectId)); } if (level != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("level", level)); } 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 getIssueTypesForProjectValidateBeforeCall(Long projectId, Integer level, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException("Missing the required parameter 'projectId' when calling getIssueTypesForProject(Async)"); } return getIssueTypesForProjectCall(projectId, level, _callback); } /** * Get issue types for project * Returns issue types for a project. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) in the relevant project or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param projectId The ID of the project. (required) * @param level The level of the issue type to filter by. Use: * `-1` for Subtask. * `0` for Base. * `1` for Epic. (optional) * @return List<IssueTypeDetails> * @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 not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the project is not found. * the user does not have the necessary permission. -
*/ public List getIssueTypesForProject(Long projectId, Integer level) throws ApiException { ApiResponse> localVarResp = getIssueTypesForProjectWithHttpInfo(projectId, level); return localVarResp.getData(); } /** * Get issue types for project * Returns issue types for a project. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) in the relevant project or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param projectId The ID of the project. (required) * @param level The level of the issue type to filter by. Use: * `-1` for Subtask. * `0` for Base. * `1` for Epic. (optional) * @return ApiResponse<List<IssueTypeDetails>> * @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 not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the project is not found. * the user does not have the necessary permission. -
*/ public ApiResponse> getIssueTypesForProjectWithHttpInfo(Long projectId, Integer level) throws ApiException { okhttp3.Call localVarCall = getIssueTypesForProjectValidateBeforeCall(projectId, level, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get issue types for project (asynchronously) * Returns issue types for a project. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) in the relevant project or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param projectId The ID of the project. (required) * @param level The level of the issue type to filter by. Use: * `-1` for Subtask. * `0` for Base. * `1` for Epic. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the project is not found. * the user does not have the necessary permission. -
*/ public okhttp3.Call getIssueTypesForProjectAsync(Long projectId, Integer level, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getIssueTypesForProjectValidateBeforeCall(projectId, level, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateIssueType * @param id The ID of the issue type. (required) * @param issueTypeUpdateBean (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 because: * no content is sent. * the issue type name exceeds 60 characters. * the avatar is not associated with this issue type. -
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 issue type is not found. -
409 Returned if the issue type name is in use. -
*/ public okhttp3.Call updateIssueTypeCall(String id, IssueTypeUpdateBean issueTypeUpdateBean, 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 = issueTypeUpdateBean; // create path and map variables String localVarPath = "/rest/api/3/issuetype/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateIssueTypeValidateBeforeCall(String id, IssueTypeUpdateBean issueTypeUpdateBean, 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 updateIssueType(Async)"); } // verify the required parameter 'issueTypeUpdateBean' is set if (issueTypeUpdateBean == null) { throw new ApiException("Missing the required parameter 'issueTypeUpdateBean' when calling updateIssueType(Async)"); } return updateIssueTypeCall(id, issueTypeUpdateBean, _callback); } /** * Update issue type * Updates the issue type. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue type. (required) * @param issueTypeUpdateBean (required) * @return IssueTypeDetails * @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 because: * no content is sent. * the issue type name exceeds 60 characters. * the avatar is not associated with this issue type. -
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 issue type is not found. -
409 Returned if the issue type name is in use. -
*/ public IssueTypeDetails updateIssueType(String id, IssueTypeUpdateBean issueTypeUpdateBean) throws ApiException { ApiResponse localVarResp = updateIssueTypeWithHttpInfo(id, issueTypeUpdateBean); return localVarResp.getData(); } /** * Update issue type * Updates the issue type. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue type. (required) * @param issueTypeUpdateBean (required) * @return ApiResponse<IssueTypeDetails> * @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 because: * no content is sent. * the issue type name exceeds 60 characters. * the avatar is not associated with this issue type. -
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 issue type is not found. -
409 Returned if the issue type name is in use. -
*/ public ApiResponse updateIssueTypeWithHttpInfo(String id, IssueTypeUpdateBean issueTypeUpdateBean) throws ApiException { okhttp3.Call localVarCall = updateIssueTypeValidateBeforeCall(id, issueTypeUpdateBean, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update issue type (asynchronously) * Updates the issue type. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the issue type. (required) * @param issueTypeUpdateBean (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 because: * no content is sent. * the issue type name exceeds 60 characters. * the avatar is not associated with this issue type. -
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 issue type is not found. -
409 Returned if the issue type name is in use. -
*/ public okhttp3.Call updateIssueTypeAsync(String id, IssueTypeUpdateBean issueTypeUpdateBean, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateIssueTypeValidateBeforeCall(id, issueTypeUpdateBean, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy