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.IssueLink;
import software.tnb.jira.validation.generated.model.LinkIssueRequestJsonBean;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class IssueLinksApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public IssueLinksApi() {
this(Configuration.getDefaultApiClient());
}
public IssueLinksApi(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 deleteIssueLink
* @param linkId The ID of the issue link. (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
200 response
-
204
Returned if the request is successful.
-
400
Returned if the issue link ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link is not found. * the user doesn't have the required permissions.
-
*/
public okhttp3.Call deleteIssueLinkCall(String linkId, 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/issueLink/{linkId}"
.replace("{" + "linkId" + "}", localVarApiClient.escapeString(linkId.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 deleteIssueLinkValidateBeforeCall(String linkId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'linkId' is set
if (linkId == null) {
throw new ApiException("Missing the required parameter 'linkId' when calling deleteIssueLink(Async)");
}
return deleteIssueLinkCall(linkId, _callback);
}
/**
* Delete issue link
* Deletes an issue link. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * Browse project [project permission](https://confluence.atlassian.com/x/yodKLg) for all the projects containing the issues in the link. * *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for at least one of the projects containing issues in the link. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, permission to view both of the issues.
* @param linkId The ID of the issue link. (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
200 response
-
204
Returned if the request is successful.
-
400
Returned if the issue link ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link is not found. * the user doesn't have the required permissions.
-
*/
public void deleteIssueLink(String linkId) throws ApiException {
deleteIssueLinkWithHttpInfo(linkId);
}
/**
* Delete issue link
* Deletes an issue link. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * Browse project [project permission](https://confluence.atlassian.com/x/yodKLg) for all the projects containing the issues in the link. * *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for at least one of the projects containing issues in the link. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, permission to view both of the issues.
* @param linkId The ID of the issue link. (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
200 response
-
204
Returned if the request is successful.
-
400
Returned if the issue link ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link is not found. * the user doesn't have the required permissions.
-
*/
public ApiResponse deleteIssueLinkWithHttpInfo(String linkId) throws ApiException {
okhttp3.Call localVarCall = deleteIssueLinkValidateBeforeCall(linkId, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete issue link (asynchronously)
* Deletes an issue link. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * Browse project [project permission](https://confluence.atlassian.com/x/yodKLg) for all the projects containing the issues in the link. * *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for at least one of the projects containing issues in the link. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, permission to view both of the issues.
* @param linkId The ID of the issue link. (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
200 response
-
204
Returned if the request is successful.
-
400
Returned if the issue link ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link is not found. * the user doesn't have the required permissions.
-
*/
public okhttp3.Call deleteIssueLinkAsync(String linkId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteIssueLinkValidateBeforeCall(linkId, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for getIssueLink
* @param linkId The ID of the issue link. (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 ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link is not found. * the user doesn't have the required permissions.
-
*/
public okhttp3.Call getIssueLinkCall(String linkId, 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/issueLink/{linkId}"
.replace("{" + "linkId" + "}", localVarApiClient.escapeString(linkId.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 getIssueLinkValidateBeforeCall(String linkId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'linkId' is set
if (linkId == null) {
throw new ApiException("Missing the required parameter 'linkId' when calling getIssueLink(Async)");
}
return getIssueLinkCall(linkId, _callback);
}
/**
* Get issue link
* Returns an issue link. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse project* [project permission](https://confluence.atlassian.com/x/yodKLg) for all the projects containing the linked issues. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, permission to view both of the issues.
* @param linkId The ID of the issue link. (required)
* @return IssueLink
* @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 ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link is not found. * the user doesn't have the required permissions.
-
*/
public IssueLink getIssueLink(String linkId) throws ApiException {
ApiResponse localVarResp = getIssueLinkWithHttpInfo(linkId);
return localVarResp.getData();
}
/**
* Get issue link
* Returns an issue link. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse project* [project permission](https://confluence.atlassian.com/x/yodKLg) for all the projects containing the linked issues. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, permission to view both of the issues.
* @param linkId The ID of the issue link. (required)
* @return ApiResponse<IssueLink>
* @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 ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link is not found. * the user doesn't have the required permissions.
-
*/
public ApiResponse getIssueLinkWithHttpInfo(String linkId) throws ApiException {
okhttp3.Call localVarCall = getIssueLinkValidateBeforeCall(linkId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get issue link (asynchronously)
* Returns an issue link. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse project* [project permission](https://confluence.atlassian.com/x/yodKLg) for all the projects containing the linked issues. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, permission to view both of the issues.
* @param linkId The ID of the issue link. (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 ID is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the issue link is not found. * the user doesn't have the required permissions.
-
*/
public okhttp3.Call getIssueLinkAsync(String linkId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getIssueLinkValidateBeforeCall(linkId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for linkIssues
* @param linkIssueRequestJsonBean The issue link request. (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 comment is not created. The response contains an error message indicating why the comment wasn't created. The issue link is also not created.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the user cannot view one or both of the issues. For example, the user doesn't have *Browse project* project permission for a project containing one of the issues. * the user does not have *link issues* project permission. * either of the link issues are not found. * the issue link type is not found.
-
*/
public okhttp3.Call linkIssuesCall(LinkIssueRequestJsonBean linkIssueRequestJsonBean, 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 = linkIssueRequestJsonBean;
// create path and map variables
String localVarPath = "/rest/api/3/issueLink";
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 linkIssuesValidateBeforeCall(LinkIssueRequestJsonBean linkIssueRequestJsonBean, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'linkIssueRequestJsonBean' is set
if (linkIssueRequestJsonBean == null) {
throw new ApiException("Missing the required parameter 'linkIssueRequestJsonBean' when calling linkIssues(Async)");
}
return linkIssuesCall(linkIssueRequestJsonBean, _callback);
}
/**
* Create issue link
* Creates a link between two issues. Use this operation to indicate a relationship between two issues and optionally add a comment to the from (outward) issue. To use this resource the site must have [Issue Linking](https://confluence.atlassian.com/x/yoXKM) enabled. This resource returns nothing on the creation of an issue link. To obtain the ID of the issue link, use `https://your-domain.atlassian.net/rest/api/3/issue/[linked issue key]?fields=issuelinks`. If the link request duplicates a link, the response indicates that the issue link was created. If the request included a comment, the comment is added. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse project* [project permission](https://confluence.atlassian.com/x/yodKLg) for all the projects containing the issues to be linked, * *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) on the project containing the from (outward) issue, * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to.
* @param linkIssueRequestJsonBean The issue link request. (required)
* @return Object
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
Returned if the request is successful.
-
400
Returned if the comment is not created. The response contains an error message indicating why the comment wasn't created. The issue link is also not created.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if: * issue linking is disabled. * the user cannot view one or both of the issues. For example, the user doesn't have *Browse project* project permission for a project containing one of the issues. * the user does not have *link issues* project permission. * either of the link issues are not found. * the issue link type is not found.
-
*/
public Object linkIssues(LinkIssueRequestJsonBean linkIssueRequestJsonBean) throws ApiException {
ApiResponse