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.RemoteIssueLink;
import software.tnb.jira.validation.generated.model.RemoteIssueLinkIdentifies;
import software.tnb.jira.validation.generated.model.RemoteIssueLinkRequest;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class IssueRemoteLinksApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public IssueRemoteLinksApi() {
this(Configuration.getDefaultApiClient());
}
public IssueRemoteLinksApi(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 createOrUpdateRemoteIssueLink
* @param issueIdOrKey The ID or key of the issue. (required)
* @param requestBody (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 remote issue link is updated.
-
201
Returned if the remote issue link is created.
-
400
Returned if the request is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue is not found or the user does not have permission to view the issue.
-
*/
public okhttp3.Call createOrUpdateRemoteIssueLinkCall(String issueIdOrKey, Map requestBody, 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 = requestBody;
// create path and map variables
String localVarPath = "/rest/api/3/issue/{issueIdOrKey}/remotelink"
.replace("{" + "issueIdOrKey" + "}", localVarApiClient.escapeString(issueIdOrKey.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createOrUpdateRemoteIssueLinkValidateBeforeCall(String issueIdOrKey, Map requestBody, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'issueIdOrKey' is set
if (issueIdOrKey == null) {
throw new ApiException("Missing the required parameter 'issueIdOrKey' when calling createOrUpdateRemoteIssueLink(Async)");
}
// verify the required parameter 'requestBody' is set
if (requestBody == null) {
throw new ApiException("Missing the required parameter 'requestBody' when calling createOrUpdateRemoteIssueLink(Async)");
}
return createOrUpdateRemoteIssueLinkCall(issueIdOrKey, requestBody, _callback);
}
/**
* Create or update remote issue link
* Creates or updates a remote issue link for an issue. If a `globalId` is provided and a remote issue link with that global ID is found it is updated. Any fields without values in the request are set to null. Otherwise, the remote issue link is created. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* and *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param requestBody (required)
* @return RemoteIssueLinkIdentifies
* @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 remote issue link is updated.
-
201
Returned if the remote issue link is created.
-
400
Returned if the request is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue is not found or the user does not have permission to view the issue.
-
*/
public RemoteIssueLinkIdentifies createOrUpdateRemoteIssueLink(String issueIdOrKey, Map requestBody) throws ApiException {
ApiResponse localVarResp = createOrUpdateRemoteIssueLinkWithHttpInfo(issueIdOrKey, requestBody);
return localVarResp.getData();
}
/**
* Create or update remote issue link
* Creates or updates a remote issue link for an issue. If a `globalId` is provided and a remote issue link with that global ID is found it is updated. Any fields without values in the request are set to null. Otherwise, the remote issue link is created. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* and *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param requestBody (required)
* @return ApiResponse<RemoteIssueLinkIdentifies>
* @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 remote issue link is updated.
-
201
Returned if the remote issue link is created.
-
400
Returned if the request is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue is not found or the user does not have permission to view the issue.
-
*/
public ApiResponse createOrUpdateRemoteIssueLinkWithHttpInfo(String issueIdOrKey, Map requestBody) throws ApiException {
okhttp3.Call localVarCall = createOrUpdateRemoteIssueLinkValidateBeforeCall(issueIdOrKey, requestBody, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create or update remote issue link (asynchronously)
* Creates or updates a remote issue link for an issue. If a `globalId` is provided and a remote issue link with that global ID is found it is updated. Any fields without values in the request are set to null. Otherwise, the remote issue link is created. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* and *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param requestBody (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 remote issue link is updated.
-
201
Returned if the remote issue link is created.
-
400
Returned if the request is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue is not found or the user does not have permission to view the issue.
-
*/
public okhttp3.Call createOrUpdateRemoteIssueLinkAsync(String issueIdOrKey, Map requestBody, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createOrUpdateRemoteIssueLinkValidateBeforeCall(issueIdOrKey, requestBody, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteRemoteIssueLinkByGlobalId
* @param issueIdOrKey The ID or key of the issue. (required)
* @param globalId The global ID of a remote 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
204
Returned if the request is successful.
-
400
Returned if a global ID isn't provided.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public okhttp3.Call deleteRemoteIssueLinkByGlobalIdCall(String issueIdOrKey, String globalId, 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/issue/{issueIdOrKey}/remotelink"
.replace("{" + "issueIdOrKey" + "}", localVarApiClient.escapeString(issueIdOrKey.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (globalId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("globalId", globalId));
}
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 deleteRemoteIssueLinkByGlobalIdValidateBeforeCall(String issueIdOrKey, String globalId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'issueIdOrKey' is set
if (issueIdOrKey == null) {
throw new ApiException("Missing the required parameter 'issueIdOrKey' when calling deleteRemoteIssueLinkByGlobalId(Async)");
}
// verify the required parameter 'globalId' is set
if (globalId == null) {
throw new ApiException("Missing the required parameter 'globalId' when calling deleteRemoteIssueLinkByGlobalId(Async)");
}
return deleteRemoteIssueLinkByGlobalIdCall(issueIdOrKey, globalId, _callback);
}
/**
* Delete remote issue link by global ID
* Deletes the remote issue link from the issue using the link's global ID. Where the global ID includes reserved URL characters these must be escaped in the request. For example, pass `system=http://www.mycompany.com/support&id=1` as `system%3Dhttp%3A%2F%2Fwww.mycompany.com%2Fsupport%26id%3D1`. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* and *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is implemented, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param globalId The global ID of a remote 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
204
Returned if the request is successful.
-
400
Returned if a global ID isn't provided.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public void deleteRemoteIssueLinkByGlobalId(String issueIdOrKey, String globalId) throws ApiException {
deleteRemoteIssueLinkByGlobalIdWithHttpInfo(issueIdOrKey, globalId);
}
/**
* Delete remote issue link by global ID
* Deletes the remote issue link from the issue using the link's global ID. Where the global ID includes reserved URL characters these must be escaped in the request. For example, pass `system=http://www.mycompany.com/support&id=1` as `system%3Dhttp%3A%2F%2Fwww.mycompany.com%2Fsupport%26id%3D1`. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* and *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is implemented, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param globalId The global ID of a remote 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
204
Returned if the request is successful.
-
400
Returned if a global ID isn't provided.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public ApiResponse deleteRemoteIssueLinkByGlobalIdWithHttpInfo(String issueIdOrKey, String globalId) throws ApiException {
okhttp3.Call localVarCall = deleteRemoteIssueLinkByGlobalIdValidateBeforeCall(issueIdOrKey, globalId, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete remote issue link by global ID (asynchronously)
* Deletes the remote issue link from the issue using the link's global ID. Where the global ID includes reserved URL characters these must be escaped in the request. For example, pass `system=http://www.mycompany.com/support&id=1` as `system%3Dhttp%3A%2F%2Fwww.mycompany.com%2Fsupport%26id%3D1`. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* and *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is implemented, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param globalId The global ID of a remote 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
204
Returned if the request is successful.
-
400
Returned if a global ID isn't provided.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public okhttp3.Call deleteRemoteIssueLinkByGlobalIdAsync(String issueIdOrKey, String globalId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteRemoteIssueLinkByGlobalIdValidateBeforeCall(issueIdOrKey, globalId, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for deleteRemoteIssueLinkById
* @param issueIdOrKey The ID or key of the issue. (required)
* @param linkId The ID of a remote 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
204
Returned if the request is successful.
-
400
Returned if the link ID is invalid or the remote issue link does not belong to the issue.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public okhttp3.Call deleteRemoteIssueLinkByIdCall(String issueIdOrKey, 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/issue/{issueIdOrKey}/remotelink/{linkId}"
.replace("{" + "issueIdOrKey" + "}", localVarApiClient.escapeString(issueIdOrKey.toString()))
.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 deleteRemoteIssueLinkByIdValidateBeforeCall(String issueIdOrKey, String linkId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'issueIdOrKey' is set
if (issueIdOrKey == null) {
throw new ApiException("Missing the required parameter 'issueIdOrKey' when calling deleteRemoteIssueLinkById(Async)");
}
// verify the required parameter 'linkId' is set
if (linkId == null) {
throw new ApiException("Missing the required parameter 'linkId' when calling deleteRemoteIssueLinkById(Async)");
}
return deleteRemoteIssueLinkByIdCall(issueIdOrKey, linkId, _callback);
}
/**
* Delete remote issue link by ID
* Deletes a remote issue link from an issue. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects*, *Edit issues*, and *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param linkId The ID of a remote 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
204
Returned if the request is successful.
-
400
Returned if the link ID is invalid or the remote issue link does not belong to the issue.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public void deleteRemoteIssueLinkById(String issueIdOrKey, String linkId) throws ApiException {
deleteRemoteIssueLinkByIdWithHttpInfo(issueIdOrKey, linkId);
}
/**
* Delete remote issue link by ID
* Deletes a remote issue link from an issue. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects*, *Edit issues*, and *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param linkId The ID of a remote 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
204
Returned if the request is successful.
-
400
Returned if the link ID is invalid or the remote issue link does not belong to the issue.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public ApiResponse deleteRemoteIssueLinkByIdWithHttpInfo(String issueIdOrKey, String linkId) throws ApiException {
okhttp3.Call localVarCall = deleteRemoteIssueLinkByIdValidateBeforeCall(issueIdOrKey, linkId, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete remote issue link by ID (asynchronously)
* Deletes a remote issue link from an issue. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects*, *Edit issues*, and *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param linkId The ID of a remote 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
204
Returned if the request is successful.
-
400
Returned if the link ID is invalid or the remote issue link does not belong to the issue.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public okhttp3.Call deleteRemoteIssueLinkByIdAsync(String issueIdOrKey, String linkId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteRemoteIssueLinkByIdValidateBeforeCall(issueIdOrKey, linkId, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for getRemoteIssueLinkById
* @param issueIdOrKey The ID or key of the issue. (required)
* @param linkId The ID of the remote 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 link ID is invalid or the remote issue link does not belong to the issue.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if issue linking is disabled.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public okhttp3.Call getRemoteIssueLinkByIdCall(String issueIdOrKey, 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/issue/{issueIdOrKey}/remotelink/{linkId}"
.replace("{" + "issueIdOrKey" + "}", localVarApiClient.escapeString(issueIdOrKey.toString()))
.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 getRemoteIssueLinkByIdValidateBeforeCall(String issueIdOrKey, String linkId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'issueIdOrKey' is set
if (issueIdOrKey == null) {
throw new ApiException("Missing the required parameter 'issueIdOrKey' when calling getRemoteIssueLinkById(Async)");
}
// verify the required parameter 'linkId' is set
if (linkId == null) {
throw new ApiException("Missing the required parameter 'linkId' when calling getRemoteIssueLinkById(Async)");
}
return getRemoteIssueLinkByIdCall(issueIdOrKey, linkId, _callback);
}
/**
* Get remote issue link by ID
* Returns a remote issue link for an issue. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param linkId The ID of the remote issue link. (required)
* @return RemoteIssueLink
* @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 link ID is invalid or the remote issue link does not belong to the issue.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if issue linking is disabled.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public RemoteIssueLink getRemoteIssueLinkById(String issueIdOrKey, String linkId) throws ApiException {
ApiResponse localVarResp = getRemoteIssueLinkByIdWithHttpInfo(issueIdOrKey, linkId);
return localVarResp.getData();
}
/**
* Get remote issue link by ID
* Returns a remote issue link for an issue. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param linkId The ID of the remote issue link. (required)
* @return ApiResponse<RemoteIssueLink>
* @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 link ID is invalid or the remote issue link does not belong to the issue.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if issue linking is disabled.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public ApiResponse getRemoteIssueLinkByIdWithHttpInfo(String issueIdOrKey, String linkId) throws ApiException {
okhttp3.Call localVarCall = getRemoteIssueLinkByIdValidateBeforeCall(issueIdOrKey, linkId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get remote issue link by ID (asynchronously)
* Returns a remote issue link for an issue. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param linkId The ID of the remote 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 link ID is invalid or the remote issue link does not belong to the issue.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if issue linking is disabled.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public okhttp3.Call getRemoteIssueLinkByIdAsync(String issueIdOrKey, String linkId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getRemoteIssueLinkByIdValidateBeforeCall(issueIdOrKey, linkId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getRemoteIssueLinks
* @param issueIdOrKey The ID or key of the issue. (required)
* @param globalId The global ID of the remote issue link. (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 invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if issue linking is disabled.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public okhttp3.Call getRemoteIssueLinksCall(String issueIdOrKey, String globalId, 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/issue/{issueIdOrKey}/remotelink"
.replace("{" + "issueIdOrKey" + "}", localVarApiClient.escapeString(issueIdOrKey.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (globalId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("globalId", globalId));
}
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 getRemoteIssueLinksValidateBeforeCall(String issueIdOrKey, String globalId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'issueIdOrKey' is set
if (issueIdOrKey == null) {
throw new ApiException("Missing the required parameter 'issueIdOrKey' when calling getRemoteIssueLinks(Async)");
}
return getRemoteIssueLinksCall(issueIdOrKey, globalId, _callback);
}
/**
* Get remote issue links
* Returns the remote issue links for an issue. When a remote issue link global ID is provided the record with that global ID is returned, otherwise all remote issue links are returned. Where a global ID includes reserved URL characters these must be escaped in the request. For example, pass `system=http://www.mycompany.com/support&id=1` as `system%3Dhttp%3A%2F%2Fwww.mycompany.com%2Fsupport%26id%3D1`. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param globalId The global ID of the remote issue link. (optional)
* @return RemoteIssueLink
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
400
Returned if the request is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if issue linking is disabled.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public RemoteIssueLink getRemoteIssueLinks(String issueIdOrKey, String globalId) throws ApiException {
ApiResponse localVarResp = getRemoteIssueLinksWithHttpInfo(issueIdOrKey, globalId);
return localVarResp.getData();
}
/**
* Get remote issue links
* Returns the remote issue links for an issue. When a remote issue link global ID is provided the record with that global ID is returned, otherwise all remote issue links are returned. Where a global ID includes reserved URL characters these must be escaped in the request. For example, pass `system=http://www.mycompany.com/support&id=1` as `system%3Dhttp%3A%2F%2Fwww.mycompany.com%2Fsupport%26id%3D1`. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param globalId The global ID of the remote issue link. (optional)
* @return ApiResponse<RemoteIssueLink>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
400
Returned if the request is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if issue linking is disabled.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public ApiResponse getRemoteIssueLinksWithHttpInfo(String issueIdOrKey, String globalId) throws ApiException {
okhttp3.Call localVarCall = getRemoteIssueLinksValidateBeforeCall(issueIdOrKey, globalId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get remote issue links (asynchronously)
* Returns the remote issue links for an issue. When a remote issue link global ID is provided the record with that global ID is returned, otherwise all remote issue links are returned. Where a global ID includes reserved URL characters these must be escaped in the request. For example, pass `system=http://www.mycompany.com/support&id=1` as `system%3Dhttp%3A%2F%2Fwww.mycompany.com%2Fsupport%26id%3D1`. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param globalId The global ID of the remote issue link. (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 invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if issue linking is disabled.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public okhttp3.Call getRemoteIssueLinksAsync(String issueIdOrKey, String globalId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getRemoteIssueLinksValidateBeforeCall(issueIdOrKey, globalId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateRemoteIssueLink
* @param issueIdOrKey The ID or key of the issue. (required)
* @param linkId The ID of the remote issue link. (required)
* @param requestBody (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 link ID is invalid. * the remote issue link does not belong to the issue. * the request body is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.
-
*/
public okhttp3.Call updateRemoteIssueLinkCall(String issueIdOrKey, String linkId, Map requestBody, 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 = requestBody;
// create path and map variables
String localVarPath = "/rest/api/3/issue/{issueIdOrKey}/remotelink/{linkId}"
.replace("{" + "issueIdOrKey" + "}", localVarApiClient.escapeString(issueIdOrKey.toString()))
.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 = {
"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 updateRemoteIssueLinkValidateBeforeCall(String issueIdOrKey, String linkId, Map requestBody, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'issueIdOrKey' is set
if (issueIdOrKey == null) {
throw new ApiException("Missing the required parameter 'issueIdOrKey' when calling updateRemoteIssueLink(Async)");
}
// verify the required parameter 'linkId' is set
if (linkId == null) {
throw new ApiException("Missing the required parameter 'linkId' when calling updateRemoteIssueLink(Async)");
}
// verify the required parameter 'requestBody' is set
if (requestBody == null) {
throw new ApiException("Missing the required parameter 'requestBody' when calling updateRemoteIssueLink(Async)");
}
return updateRemoteIssueLinkCall(issueIdOrKey, linkId, requestBody, _callback);
}
/**
* Update remote issue link by ID
* Updates a remote issue link for an issue. Note: Fields without values in the request are set to null. This operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM). This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* and *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
* @param issueIdOrKey The ID or key of the issue. (required)
* @param linkId The ID of the remote issue link. (required)
* @param requestBody (required)
* @return Object
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the request is successful.
-
400
Returned if: * the link ID is invalid. * the remote issue link does not belong to the issue. * the request body is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to link issues.
-
404
Returned if the issue or remote issue link is not found or the user does not have permission to view the issue.