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.ComponentIssuesCount;
import software.tnb.jira.validation.generated.model.PageBeanComponentWithIssueCount;
import software.tnb.jira.validation.generated.model.ProjectComponent;
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 ProjectComponentsApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public ProjectComponentsApi() {
this(Configuration.getDefaultApiClient());
}
public ProjectComponentsApi(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 createComponent
* @param projectComponent (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 user is not found. * `name` is not provided. * `name` is over 255 characters in length. * `projectId` is not provided. * `assigneeType` is an invalid value.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to manage the project containing the component or does not have permission to administer Jira.
-
404
Returned if the project is not found or the user does not have permission to browse the project containing the component.
-
*/
public okhttp3.Call createComponentCall(ProjectComponent projectComponent, 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 = projectComponent;
// create path and map variables
String localVarPath = "/rest/api/3/component";
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 createComponentValidateBeforeCall(ProjectComponent projectComponent, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'projectComponent' is set
if (projectComponent == null) {
throw new ApiException("Missing the required parameter 'projectComponent' when calling createComponent(Async)");
}
return createComponentCall(projectComponent, _callback);
}
/**
* Create component
* Creates a component. Use components to provide containers for issues within a project. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project in which the component is created or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param projectComponent (required)
* @return ProjectComponent
* @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 user is not found. * `name` is not provided. * `name` is over 255 characters in length. * `projectId` is not provided. * `assigneeType` is an invalid value.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to manage the project containing the component or does not have permission to administer Jira.
-
404
Returned if the project is not found or the user does not have permission to browse the project containing the component.
-
*/
public ProjectComponent createComponent(ProjectComponent projectComponent) throws ApiException {
ApiResponse localVarResp = createComponentWithHttpInfo(projectComponent);
return localVarResp.getData();
}
/**
* Create component
* Creates a component. Use components to provide containers for issues within a project. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project in which the component is created or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param projectComponent (required)
* @return ApiResponse<ProjectComponent>
* @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 user is not found. * `name` is not provided. * `name` is over 255 characters in length. * `projectId` is not provided. * `assigneeType` is an invalid value.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to manage the project containing the component or does not have permission to administer Jira.
-
404
Returned if the project is not found or the user does not have permission to browse the project containing the component.
-
*/
public ApiResponse createComponentWithHttpInfo(ProjectComponent projectComponent) throws ApiException {
okhttp3.Call localVarCall = createComponentValidateBeforeCall(projectComponent, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create component (asynchronously)
* Creates a component. Use components to provide containers for issues within a project. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project in which the component is created or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param projectComponent (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 user is not found. * `name` is not provided. * `name` is over 255 characters in length. * `projectId` is not provided. * `assigneeType` is an invalid value.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to manage the project containing the component or does not have permission to administer Jira.
-
404
Returned if the project is not found or the user does not have permission to browse the project containing the component.
-
*/
public okhttp3.Call createComponentAsync(ProjectComponent projectComponent, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createComponentValidateBeforeCall(projectComponent, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteComponent
* @param id The ID of the component. (required)
* @param moveIssuesTo The ID of the component to replace the deleted component. If this value is null no replacement is made. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to manage the project containing the component or does not have permission to administer Jira.
-
404
Returned if: * the component is not found. * the replacement component is not found. * the user does not have permission to browse the project containing the component.
-
*/
public okhttp3.Call deleteComponentCall(String id, String moveIssuesTo, 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/component/{id}"
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (moveIssuesTo != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("moveIssuesTo", moveIssuesTo));
}
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 deleteComponentValidateBeforeCall(String id, String moveIssuesTo, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling deleteComponent(Async)");
}
return deleteComponentCall(id, moveIssuesTo, _callback);
}
/**
* Delete component
* Deletes a component. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the component or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the component. (required)
* @param moveIssuesTo The ID of the component to replace the deleted component. If this value is null no replacement is made. (optional)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to manage the project containing the component or does not have permission to administer Jira.
-
404
Returned if: * the component is not found. * the replacement component is not found. * the user does not have permission to browse the project containing the component.
-
*/
public void deleteComponent(String id, String moveIssuesTo) throws ApiException {
deleteComponentWithHttpInfo(id, moveIssuesTo);
}
/**
* Delete component
* Deletes a component. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the component or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the component. (required)
* @param moveIssuesTo The ID of the component to replace the deleted component. If this value is null no replacement is made. (optional)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to manage the project containing the component or does not have permission to administer Jira.
-
404
Returned if: * the component is not found. * the replacement component is not found. * the user does not have permission to browse the project containing the component.
-
*/
public ApiResponse deleteComponentWithHttpInfo(String id, String moveIssuesTo) throws ApiException {
okhttp3.Call localVarCall = deleteComponentValidateBeforeCall(id, moveIssuesTo, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete component (asynchronously)
* Deletes a component. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the component or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the component. (required)
* @param moveIssuesTo The ID of the component to replace the deleted component. If this value is null no replacement is made. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to manage the project containing the component or does not have permission to administer Jira.
-
404
Returned if: * the component is not found. * the replacement component is not found. * the user does not have permission to browse the project containing the component.
-
*/
public okhttp3.Call deleteComponentAsync(String id, String moveIssuesTo, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteComponentValidateBeforeCall(id, moveIssuesTo, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for getComponent
* @param id The ID of the component. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the component is not found or the user does not have permission to browse the project containing the component.
-
*/
public okhttp3.Call getComponentCall(String id, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/rest/api/3/component/{id}"
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getComponentValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling getComponent(Async)");
}
return getComponentCall(id, _callback);
}
/**
* Get component
* Returns a component. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for project containing the component.
* @param id The ID of the component. (required)
* @return ProjectComponent
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the component is not found or the user does not have permission to browse the project containing the component.
-
*/
public ProjectComponent getComponent(String id) throws ApiException {
ApiResponse localVarResp = getComponentWithHttpInfo(id);
return localVarResp.getData();
}
/**
* Get component
* Returns a component. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for project containing the component.
* @param id The ID of the component. (required)
* @return ApiResponse<ProjectComponent>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the component is not found or the user does not have permission to browse the project containing the component.
-
*/
public ApiResponse getComponentWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = getComponentValidateBeforeCall(id, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get component (asynchronously)
* Returns a component. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for project containing the component.
* @param id The ID of the component. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the component is not found or the user does not have permission to browse the project containing the component.
-
*/
public okhttp3.Call getComponentAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getComponentValidateBeforeCall(id, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getComponentRelatedIssues
* @param id The ID of the component. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the component is not found.
-
*/
public okhttp3.Call getComponentRelatedIssuesCall(String id, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/rest/api/3/component/{id}/relatedIssueCounts"
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getComponentRelatedIssuesValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling getComponentRelatedIssues(Async)");
}
return getComponentRelatedIssuesCall(id, _callback);
}
/**
* Get component issues count
* Returns the counts of issues assigned to the component. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None.
* @param id The ID of the component. (required)
* @return ComponentIssuesCount
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the component is not found.
-
*/
public ComponentIssuesCount getComponentRelatedIssues(String id) throws ApiException {
ApiResponse localVarResp = getComponentRelatedIssuesWithHttpInfo(id);
return localVarResp.getData();
}
/**
* Get component issues count
* Returns the counts of issues assigned to the component. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None.
* @param id The ID of the component. (required)
* @return ApiResponse<ComponentIssuesCount>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the component is not found.
-
*/
public ApiResponse getComponentRelatedIssuesWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = getComponentRelatedIssuesValidateBeforeCall(id, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get component issues count (asynchronously)
* Returns the counts of issues assigned to the component. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None.
* @param id The ID of the component. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the component is not found.
-
*/
public okhttp3.Call getComponentRelatedIssuesAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getComponentRelatedIssuesValidateBeforeCall(id, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getProjectComponents
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public okhttp3.Call getProjectComponentsCall(String projectIdOrKey, 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/project/{projectIdOrKey}/components"
.replace("{" + "projectIdOrKey" + "}", localVarApiClient.escapeString(projectIdOrKey.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 getProjectComponentsValidateBeforeCall(String projectIdOrKey, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'projectIdOrKey' is set
if (projectIdOrKey == null) {
throw new ApiException("Missing the required parameter 'projectIdOrKey' when calling getProjectComponents(Async)");
}
return getProjectComponentsCall(projectIdOrKey, _callback);
}
/**
* Get project components
* Returns all components in a project. See the [Get project components paginated](#api-rest-api-3-project-projectIdOrKey-component-get) resource if you want to get a full list of components with pagination. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project.
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @return List<ProjectComponent>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public List getProjectComponents(String projectIdOrKey) throws ApiException {
ApiResponse> localVarResp = getProjectComponentsWithHttpInfo(projectIdOrKey);
return localVarResp.getData();
}
/**
* Get project components
* Returns all components in a project. See the [Get project components paginated](#api-rest-api-3-project-projectIdOrKey-component-get) resource if you want to get a full list of components with pagination. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project.
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @return ApiResponse<List<ProjectComponent>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public ApiResponse> getProjectComponentsWithHttpInfo(String projectIdOrKey) throws ApiException {
okhttp3.Call localVarCall = getProjectComponentsValidateBeforeCall(projectIdOrKey, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get project components (asynchronously)
* Returns all components in a project. See the [Get project components paginated](#api-rest-api-3-project-projectIdOrKey-component-get) resource if you want to get a full list of components with pagination. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project.
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public okhttp3.Call getProjectComponentsAsync(String projectIdOrKey, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getProjectComponentsValidateBeforeCall(projectIdOrKey, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getProjectComponentsPaginated
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @param orderBy [Order](#ordering) the results by a field: * `description` Sorts by the component description. * `issueCount` Sorts by the count of issues associated with the component. * `lead` Sorts by the user key of the component's project lead. * `name` Sorts by component name. (optional)
* @param query Filter the results using a literal string. Components with a matching `name` or `description` are returned (case insensitive). (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public okhttp3.Call getProjectComponentsPaginatedCall(String projectIdOrKey, Long startAt, Integer maxResults, String orderBy, String query, 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/project/{projectIdOrKey}/component"
.replace("{" + "projectIdOrKey" + "}", localVarApiClient.escapeString(projectIdOrKey.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (startAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAt", startAt));
}
if (maxResults != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxResults", maxResults));
}
if (orderBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderBy", orderBy));
}
if (query != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query));
}
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 getProjectComponentsPaginatedValidateBeforeCall(String projectIdOrKey, Long startAt, Integer maxResults, String orderBy, String query, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'projectIdOrKey' is set
if (projectIdOrKey == null) {
throw new ApiException("Missing the required parameter 'projectIdOrKey' when calling getProjectComponentsPaginated(Async)");
}
return getProjectComponentsPaginatedCall(projectIdOrKey, startAt, maxResults, orderBy, query, _callback);
}
/**
* Get project components paginated
* Returns a [paginated](#pagination) list of all components in a project. See the [Get project components](#api-rest-api-3-project-projectIdOrKey-components-get) resource if you want to get a full list of versions without pagination. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project.
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @param orderBy [Order](#ordering) the results by a field: * `description` Sorts by the component description. * `issueCount` Sorts by the count of issues associated with the component. * `lead` Sorts by the user key of the component's project lead. * `name` Sorts by component name. (optional)
* @param query Filter the results using a literal string. Components with a matching `name` or `description` are returned (case insensitive). (optional)
* @return PageBeanComponentWithIssueCount
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public PageBeanComponentWithIssueCount getProjectComponentsPaginated(String projectIdOrKey, Long startAt, Integer maxResults, String orderBy, String query) throws ApiException {
ApiResponse localVarResp = getProjectComponentsPaginatedWithHttpInfo(projectIdOrKey, startAt, maxResults, orderBy, query);
return localVarResp.getData();
}
/**
* Get project components paginated
* Returns a [paginated](#pagination) list of all components in a project. See the [Get project components](#api-rest-api-3-project-projectIdOrKey-components-get) resource if you want to get a full list of versions without pagination. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project.
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @param orderBy [Order](#ordering) the results by a field: * `description` Sorts by the component description. * `issueCount` Sorts by the count of issues associated with the component. * `lead` Sorts by the user key of the component's project lead. * `name` Sorts by component name. (optional)
* @param query Filter the results using a literal string. Components with a matching `name` or `description` are returned (case insensitive). (optional)
* @return ApiResponse<PageBeanComponentWithIssueCount>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public ApiResponse getProjectComponentsPaginatedWithHttpInfo(String projectIdOrKey, Long startAt, Integer maxResults, String orderBy, String query) throws ApiException {
okhttp3.Call localVarCall = getProjectComponentsPaginatedValidateBeforeCall(projectIdOrKey, startAt, maxResults, orderBy, query, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get project components paginated (asynchronously)
* Returns a [paginated](#pagination) list of all components in a project. See the [Get project components](#api-rest-api-3-project-projectIdOrKey-components-get) resource if you want to get a full list of versions without pagination. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project.
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @param orderBy [Order](#ordering) the results by a field: * `description` Sorts by the component description. * `issueCount` Sorts by the count of issues associated with the component. * `lead` Sorts by the user key of the component's project lead. * `name` Sorts by component name. (optional)
* @param query Filter the results using a literal string. Components with a matching `name` or `description` are returned (case insensitive). (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public okhttp3.Call getProjectComponentsPaginatedAsync(String projectIdOrKey, Long startAt, Integer maxResults, String orderBy, String query, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getProjectComponentsPaginatedValidateBeforeCall(projectIdOrKey, startAt, maxResults, orderBy, query, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateComponent
* @param id The ID of the component. (required)
* @param projectComponent (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 user is not found. * `assigneeType` is an invalid value. * `name` is over 255 characters in length.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to manage the project containing the component or does not have permission to administer Jira.
-
404
Returned if the component is not found or the user does not have permission to browse the project containing the component.
-
*/
public okhttp3.Call updateComponentCall(String id, ProjectComponent projectComponent, 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 = projectComponent;
// create path and map variables
String localVarPath = "/rest/api/3/component/{id}"
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateComponentValidateBeforeCall(String id, ProjectComponent projectComponent, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling updateComponent(Async)");
}
// verify the required parameter 'projectComponent' is set
if (projectComponent == null) {
throw new ApiException("Missing the required parameter 'projectComponent' when calling updateComponent(Async)");
}
return updateComponentCall(id, projectComponent, _callback);
}
/**
* Update component
* Updates a component. Any fields included in the request are overwritten. If `leadAccountId` is an empty string (\"\") the component lead is removed. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the component or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the component. (required)
* @param projectComponent (required)
* @return ProjectComponent
* @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 user is not found. * `assigneeType` is an invalid value. * `name` is over 255 characters in length.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to manage the project containing the component or does not have permission to administer Jira.
-
404
Returned if the component is not found or the user does not have permission to browse the project containing the component.
-
*/
public ProjectComponent updateComponent(String id, ProjectComponent projectComponent) throws ApiException {
ApiResponse localVarResp = updateComponentWithHttpInfo(id, projectComponent);
return localVarResp.getData();
}
/**
* Update component
* Updates a component. Any fields included in the request are overwritten. If `leadAccountId` is an empty string (\"\") the component lead is removed. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the component or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the component. (required)
* @param projectComponent (required)
* @return ApiResponse<ProjectComponent>
* @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 user is not found. * `assigneeType` is an invalid value. * `name` is over 255 characters in length.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to manage the project containing the component or does not have permission to administer Jira.
-
404
Returned if the component is not found or the user does not have permission to browse the project containing the component.
-
*/
public ApiResponse updateComponentWithHttpInfo(String id, ProjectComponent projectComponent) throws ApiException {
okhttp3.Call localVarCall = updateComponentValidateBeforeCall(id, projectComponent, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Update component (asynchronously)
* Updates a component. Any fields included in the request are overwritten. If `leadAccountId` is an empty string (\"\") the component lead is removed. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the component or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the component. (required)
* @param projectComponent (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 user is not found. * `assigneeType` is an invalid value. * `name` is over 255 characters in length.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have permission to manage the project containing the component or does not have permission to administer Jira.
-
404
Returned if the component is not found or the user does not have permission to browse the project containing the component.
-
*/
public okhttp3.Call updateComponentAsync(String id, ProjectComponent projectComponent, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateComponentValidateBeforeCall(id, projectComponent, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}