Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.IssueLinkType;
import software.tnb.jira.validation.generated.model.IssueLinkTypes;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class IssueLinkTypesApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public IssueLinkTypesApi() {
this(Configuration.getDefaultApiClient());
}
public IssueLinkTypesApi(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 createIssueLinkType
* @param issueLinkType (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.
-
404
Returned if: * issue linking is disabled. * the issue link type name is in use. * the user does not have the required permissions.
-
*/
public okhttp3.Call createIssueLinkTypeCall(IssueLinkType issueLinkType, 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 = issueLinkType;
// create path and map variables
String localVarPath = "/rest/api/3/issueLinkType";
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 createIssueLinkTypeValidateBeforeCall(IssueLinkType issueLinkType, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'issueLinkType' is set
if (issueLinkType == null) {
throw new ApiException("Missing the required parameter 'issueLinkType' when calling createIssueLinkType(Async)");
}
return createIssueLinkTypeCall(issueLinkType, _callback);
}
/**
* Create issue link type
* Creates an issue link type. Use this operation to create descriptions of the reasons why issues are linked. The issue link type consists of a name and descriptions for a link's inward and outward relationships. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param issueLinkType (required)
* @return IssueLinkType
* @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.
-
404
Returned if: * issue linking is disabled. * the issue link type name is in use. * the user does not have the required permissions.
-
*/
public IssueLinkType createIssueLinkType(IssueLinkType issueLinkType) throws ApiException {
ApiResponse localVarResp = createIssueLinkTypeWithHttpInfo(issueLinkType);
return localVarResp.getData();
}
/**
* Create issue link type
* Creates an issue link type. Use this operation to create descriptions of the reasons why issues are linked. The issue link type consists of a name and descriptions for a link's inward and outward relationships. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param issueLinkType (required)
* @return ApiResponse<IssueLinkType>
* @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.
-
404
Returned if: * issue linking is disabled. * the issue link type name is in use. * the user does not have the required permissions.
-
*/
public ApiResponse createIssueLinkTypeWithHttpInfo(IssueLinkType issueLinkType) throws ApiException {
okhttp3.Call localVarCall = createIssueLinkTypeValidateBeforeCall(issueLinkType, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create issue link type (asynchronously)
* Creates an issue link type. Use this operation to create descriptions of the reasons why issues are linked. The issue link type consists of a name and descriptions for a link's inward and outward relationships. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param issueLinkType (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.
-
404
Returned if: * issue linking is disabled. * the issue link type name is in use. * the user does not have the required permissions.
-
*/
public okhttp3.Call createIssueLinkTypeAsync(IssueLinkType issueLinkType, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createIssueLinkTypeValidateBeforeCall(issueLinkType, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteIssueLinkType
* @param issueLinkTypeId The ID of the issue link 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
204
Returned if the request is successful.
-
400
Returned if the issue link type ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link type is not found. * the user does not have the required permissions.
-
*/
public okhttp3.Call deleteIssueLinkTypeCall(String issueLinkTypeId, 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/issueLinkType/{issueLinkTypeId}"
.replace("{" + "issueLinkTypeId" + "}", localVarApiClient.escapeString(issueLinkTypeId.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 deleteIssueLinkTypeValidateBeforeCall(String issueLinkTypeId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'issueLinkTypeId' is set
if (issueLinkTypeId == null) {
throw new ApiException("Missing the required parameter 'issueLinkTypeId' when calling deleteIssueLinkType(Async)");
}
return deleteIssueLinkTypeCall(issueLinkTypeId, _callback);
}
/**
* Delete issue link type
* Deletes an issue link type. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param issueLinkTypeId The ID of the issue link type. (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.
-
400
Returned if the issue link type ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link type is not found. * the user does not have the required permissions.
-
*/
public void deleteIssueLinkType(String issueLinkTypeId) throws ApiException {
deleteIssueLinkTypeWithHttpInfo(issueLinkTypeId);
}
/**
* Delete issue link type
* Deletes an issue link type. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param issueLinkTypeId The ID of the issue link type. (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.
-
400
Returned if the issue link type ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link type is not found. * the user does not have the required permissions.
-
*/
public ApiResponse deleteIssueLinkTypeWithHttpInfo(String issueLinkTypeId) throws ApiException {
okhttp3.Call localVarCall = deleteIssueLinkTypeValidateBeforeCall(issueLinkTypeId, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete issue link type (asynchronously)
* Deletes an issue link type. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param issueLinkTypeId The ID of the issue link 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
204
Returned if the request is successful.
-
400
Returned if the issue link type ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link type is not found. * the user does not have the required permissions.
-
*/
public okhttp3.Call deleteIssueLinkTypeAsync(String issueLinkTypeId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteIssueLinkTypeValidateBeforeCall(issueLinkTypeId, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for getIssueLinkType
* @param issueLinkTypeId The ID of the issue link 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 link type ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link type is not found. * the user does not have the required permissions.
-
*/
public okhttp3.Call getIssueLinkTypeCall(String issueLinkTypeId, 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/issueLinkType/{issueLinkTypeId}"
.replace("{" + "issueLinkTypeId" + "}", localVarApiClient.escapeString(issueLinkTypeId.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 getIssueLinkTypeValidateBeforeCall(String issueLinkTypeId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'issueLinkTypeId' is set
if (issueLinkTypeId == null) {
throw new ApiException("Missing the required parameter 'issueLinkTypeId' when calling getIssueLinkType(Async)");
}
return getIssueLinkTypeCall(issueLinkTypeId, _callback);
}
/**
* Get issue link type
* Returns an issue link type. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for a project in the site.
* @param issueLinkTypeId The ID of the issue link type. (required)
* @return IssueLinkType
* @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 link type ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link type is not found. * the user does not have the required permissions.
-
*/
public IssueLinkType getIssueLinkType(String issueLinkTypeId) throws ApiException {
ApiResponse localVarResp = getIssueLinkTypeWithHttpInfo(issueLinkTypeId);
return localVarResp.getData();
}
/**
* Get issue link type
* Returns an issue link type. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for a project in the site.
* @param issueLinkTypeId The ID of the issue link type. (required)
* @return ApiResponse<IssueLinkType>
* @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 link type ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link type is not found. * the user does not have the required permissions.
-
*/
public ApiResponse getIssueLinkTypeWithHttpInfo(String issueLinkTypeId) throws ApiException {
okhttp3.Call localVarCall = getIssueLinkTypeValidateBeforeCall(issueLinkTypeId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get issue link type (asynchronously)
* Returns an issue link type. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for a project in the site.
* @param issueLinkTypeId The ID of the issue link 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 link type ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link type is not found. * the user does not have the required permissions.
-
*/
public okhttp3.Call getIssueLinkTypeAsync(String issueLinkTypeId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getIssueLinkTypeValidateBeforeCall(issueLinkTypeId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getIssueLinkTypes
* @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 issue linking is disabled.
-
*/
public okhttp3.Call getIssueLinkTypesCall(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/issueLinkType";
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 getIssueLinkTypesValidateBeforeCall(final ApiCallback _callback) throws ApiException {
return getIssueLinkTypesCall(_callback);
}
/**
* Get issue link types
* Returns a list of all issue link types. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for a project in the site.
* @return IssueLinkTypes
* @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 issue linking is disabled.
-
*/
public IssueLinkTypes getIssueLinkTypes() throws ApiException {
ApiResponse localVarResp = getIssueLinkTypesWithHttpInfo();
return localVarResp.getData();
}
/**
* Get issue link types
* Returns a list of all issue link types. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for a project in the site.
* @return ApiResponse<IssueLinkTypes>
* @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 issue linking is disabled.
-
*/
public ApiResponse getIssueLinkTypesWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getIssueLinkTypesValidateBeforeCall(null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get issue link types (asynchronously)
* Returns a list of all issue link types. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for a project in the site.
* @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 issue linking is disabled.
-
*/
public okhttp3.Call getIssueLinkTypesAsync(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getIssueLinkTypesValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateIssueLinkType
* @param issueLinkTypeId The ID of the issue link type. (required)
* @param issueLinkType (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 link type ID or the request body are invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link type is not found. * the user does not have the required permissions.
-
*/
public okhttp3.Call updateIssueLinkTypeCall(String issueLinkTypeId, IssueLinkType issueLinkType, 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 = issueLinkType;
// create path and map variables
String localVarPath = "/rest/api/3/issueLinkType/{issueLinkTypeId}"
.replace("{" + "issueLinkTypeId" + "}", localVarApiClient.escapeString(issueLinkTypeId.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 updateIssueLinkTypeValidateBeforeCall(String issueLinkTypeId, IssueLinkType issueLinkType, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'issueLinkTypeId' is set
if (issueLinkTypeId == null) {
throw new ApiException("Missing the required parameter 'issueLinkTypeId' when calling updateIssueLinkType(Async)");
}
// verify the required parameter 'issueLinkType' is set
if (issueLinkType == null) {
throw new ApiException("Missing the required parameter 'issueLinkType' when calling updateIssueLinkType(Async)");
}
return updateIssueLinkTypeCall(issueLinkTypeId, issueLinkType, _callback);
}
/**
* Update issue link type
* Updates an issue link type. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param issueLinkTypeId The ID of the issue link type. (required)
* @param issueLinkType (required)
* @return IssueLinkType
* @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 link type ID or the request body are invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link type is not found. * the user does not have the required permissions.
-
*/
public IssueLinkType updateIssueLinkType(String issueLinkTypeId, IssueLinkType issueLinkType) throws ApiException {
ApiResponse localVarResp = updateIssueLinkTypeWithHttpInfo(issueLinkTypeId, issueLinkType);
return localVarResp.getData();
}
/**
* Update issue link type
* Updates an issue link type. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param issueLinkTypeId The ID of the issue link type. (required)
* @param issueLinkType (required)
* @return ApiResponse<IssueLinkType>
* @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 link type ID or the request body are invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link type is not found. * the user does not have the required permissions.
-
*/
public ApiResponse updateIssueLinkTypeWithHttpInfo(String issueLinkTypeId, IssueLinkType issueLinkType) throws ApiException {
okhttp3.Call localVarCall = updateIssueLinkTypeValidateBeforeCall(issueLinkTypeId, issueLinkType, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Update issue link type (asynchronously)
* Updates an issue link type. To use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param issueLinkTypeId The ID of the issue link type. (required)
* @param issueLinkType (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 link type ID or the request body are invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link type is not found. * the user does not have the required permissions.
-
*/
public okhttp3.Call updateIssueLinkTypeAsync(String issueLinkTypeId, IssueLinkType issueLinkType, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateIssueLinkTypeValidateBeforeCall(issueLinkTypeId, issueLinkType, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}