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.IdBean;
import software.tnb.jira.validation.generated.model.PermissionScheme;
import software.tnb.jira.validation.generated.model.ProjectIssueSecurityLevels;
import software.tnb.jira.validation.generated.model.SecurityScheme;
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 ProjectPermissionSchemesApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public ProjectPermissionSchemesApi() {
this(Configuration.getDefaultApiClient());
}
public ProjectPermissionSchemesApi(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 assignPermissionScheme
* @param projectKeyOrId The project ID or project key (case sensitive). (required)
* @param idBean (required)
* @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: * `all` Returns all expandable information. * `field` Returns information about the custom field granted the permission. * `group` Returns information about the group that is granted the permission. * `permissions` Returns all permission grants for each permission scheme. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission. (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.
-
403
Returned if: * the user does not have the necessary permission to edit the project's configuration. * the Jira instance is Jira Core Free or Jira Software Free. Permission schemes cannot be assigned to projects on free plans.
-
404
Returned if the project or permission scheme is not found.
-
*/
public okhttp3.Call assignPermissionSchemeCall(String projectKeyOrId, IdBean idBean, String expand, 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 = idBean;
// create path and map variables
String localVarPath = "/rest/api/3/project/{projectKeyOrId}/permissionscheme"
.replace("{" + "projectKeyOrId" + "}", localVarApiClient.escapeString(projectKeyOrId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (expand != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("expand", expand));
}
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 assignPermissionSchemeValidateBeforeCall(String projectKeyOrId, IdBean idBean, String expand, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'projectKeyOrId' is set
if (projectKeyOrId == null) {
throw new ApiException("Missing the required parameter 'projectKeyOrId' when calling assignPermissionScheme(Async)");
}
// verify the required parameter 'idBean' is set
if (idBean == null) {
throw new ApiException("Missing the required parameter 'idBean' when calling assignPermissionScheme(Async)");
}
return assignPermissionSchemeCall(projectKeyOrId, idBean, expand, _callback);
}
/**
* Assign permission scheme
* Assigns a permission scheme with a project. See [Managing project permissions](https://confluence.atlassian.com/x/yodKLg) for more information about permission schemes. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg)
* @param projectKeyOrId The project ID or project key (case sensitive). (required)
* @param idBean (required)
* @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: * `all` Returns all expandable information. * `field` Returns information about the custom field granted the permission. * `group` Returns information about the group that is granted the permission. * `permissions` Returns all permission grants for each permission scheme. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission. (optional)
* @return PermissionScheme
* @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.
-
403
Returned if: * the user does not have the necessary permission to edit the project's configuration. * the Jira instance is Jira Core Free or Jira Software Free. Permission schemes cannot be assigned to projects on free plans.
-
404
Returned if the project or permission scheme is not found.
-
*/
public PermissionScheme assignPermissionScheme(String projectKeyOrId, IdBean idBean, String expand) throws ApiException {
ApiResponse localVarResp = assignPermissionSchemeWithHttpInfo(projectKeyOrId, idBean, expand);
return localVarResp.getData();
}
/**
* Assign permission scheme
* Assigns a permission scheme with a project. See [Managing project permissions](https://confluence.atlassian.com/x/yodKLg) for more information about permission schemes. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg)
* @param projectKeyOrId The project ID or project key (case sensitive). (required)
* @param idBean (required)
* @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: * `all` Returns all expandable information. * `field` Returns information about the custom field granted the permission. * `group` Returns information about the group that is granted the permission. * `permissions` Returns all permission grants for each permission scheme. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission. (optional)
* @return ApiResponse<PermissionScheme>
* @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.
-
403
Returned if: * the user does not have the necessary permission to edit the project's configuration. * the Jira instance is Jira Core Free or Jira Software Free. Permission schemes cannot be assigned to projects on free plans.
-
404
Returned if the project or permission scheme is not found.
-
*/
public ApiResponse assignPermissionSchemeWithHttpInfo(String projectKeyOrId, IdBean idBean, String expand) throws ApiException {
okhttp3.Call localVarCall = assignPermissionSchemeValidateBeforeCall(projectKeyOrId, idBean, expand, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Assign permission scheme (asynchronously)
* Assigns a permission scheme with a project. See [Managing project permissions](https://confluence.atlassian.com/x/yodKLg) for more information about permission schemes. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg)
* @param projectKeyOrId The project ID or project key (case sensitive). (required)
* @param idBean (required)
* @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: * `all` Returns all expandable information. * `field` Returns information about the custom field granted the permission. * `group` Returns information about the group that is granted the permission. * `permissions` Returns all permission grants for each permission scheme. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission. (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.
-
403
Returned if: * the user does not have the necessary permission to edit the project's configuration. * the Jira instance is Jira Core Free or Jira Software Free. Permission schemes cannot be assigned to projects on free plans.
-
404
Returned if the project or permission scheme is not found.
-
*/
public okhttp3.Call assignPermissionSchemeAsync(String projectKeyOrId, IdBean idBean, String expand, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = assignPermissionSchemeValidateBeforeCall(projectKeyOrId, idBean, expand, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getAssignedPermissionScheme
* @param projectKeyOrId The project ID or project key (case sensitive). (required)
* @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: * `all` Returns all expandable information. * `field` Returns information about the custom field granted the permission. * `group` Returns information about the group that is granted the permission. * `permissions` Returns all permission grants for each permission scheme. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission. (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.
-
403
Returned if the user does not have permission to view the project's configuration.
-
404
Returned if the project is not found or the user does not have permission to view the project.
-
*/
public okhttp3.Call getAssignedPermissionSchemeCall(String projectKeyOrId, String expand, 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/{projectKeyOrId}/permissionscheme"
.replace("{" + "projectKeyOrId" + "}", localVarApiClient.escapeString(projectKeyOrId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (expand != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("expand", expand));
}
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 getAssignedPermissionSchemeValidateBeforeCall(String projectKeyOrId, String expand, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'projectKeyOrId' is set
if (projectKeyOrId == null) {
throw new ApiException("Missing the required parameter 'projectKeyOrId' when calling getAssignedPermissionScheme(Async)");
}
return getAssignedPermissionSchemeCall(projectKeyOrId, expand, _callback);
}
/**
* Get assigned permission scheme
* Gets the [permission scheme](https://confluence.atlassian.com/x/yodKLg) associated with the project. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg).
* @param projectKeyOrId The project ID or project key (case sensitive). (required)
* @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: * `all` Returns all expandable information. * `field` Returns information about the custom field granted the permission. * `group` Returns information about the group that is granted the permission. * `permissions` Returns all permission grants for each permission scheme. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission. (optional)
* @return PermissionScheme
* @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.
-
403
Returned if the user does not have permission to view the project's configuration.
-
404
Returned if the project is not found or the user does not have permission to view the project.
-
*/
public PermissionScheme getAssignedPermissionScheme(String projectKeyOrId, String expand) throws ApiException {
ApiResponse localVarResp = getAssignedPermissionSchemeWithHttpInfo(projectKeyOrId, expand);
return localVarResp.getData();
}
/**
* Get assigned permission scheme
* Gets the [permission scheme](https://confluence.atlassian.com/x/yodKLg) associated with the project. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg).
* @param projectKeyOrId The project ID or project key (case sensitive). (required)
* @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: * `all` Returns all expandable information. * `field` Returns information about the custom field granted the permission. * `group` Returns information about the group that is granted the permission. * `permissions` Returns all permission grants for each permission scheme. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission. (optional)
* @return ApiResponse<PermissionScheme>
* @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.
-
403
Returned if the user does not have permission to view the project's configuration.
-
404
Returned if the project is not found or the user does not have permission to view the project.
-
*/
public ApiResponse getAssignedPermissionSchemeWithHttpInfo(String projectKeyOrId, String expand) throws ApiException {
okhttp3.Call localVarCall = getAssignedPermissionSchemeValidateBeforeCall(projectKeyOrId, expand, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get assigned permission scheme (asynchronously)
* Gets the [permission scheme](https://confluence.atlassian.com/x/yodKLg) associated with the project. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg).
* @param projectKeyOrId The project ID or project key (case sensitive). (required)
* @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: * `all` Returns all expandable information. * `field` Returns information about the custom field granted the permission. * `group` Returns information about the group that is granted the permission. * `permissions` Returns all permission grants for each permission scheme. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission. (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.
-
403
Returned if the user does not have permission to view the project's configuration.
-
404
Returned if the project is not found or the user does not have permission to view the project.
-
*/
public okhttp3.Call getAssignedPermissionSchemeAsync(String projectKeyOrId, String expand, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getAssignedPermissionSchemeValidateBeforeCall(projectKeyOrId, expand, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getProjectIssueSecurityScheme
* @param projectKeyOrId 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.
-
400
Returned if the request is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the project is visible to the user but the user doesn't have administrative permissions.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public okhttp3.Call getProjectIssueSecuritySchemeCall(String projectKeyOrId, 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/{projectKeyOrId}/issuesecuritylevelscheme"
.replace("{" + "projectKeyOrId" + "}", localVarApiClient.escapeString(projectKeyOrId.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 getProjectIssueSecuritySchemeValidateBeforeCall(String projectKeyOrId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'projectKeyOrId' is set
if (projectKeyOrId == null) {
throw new ApiException("Missing the required parameter 'projectKeyOrId' when calling getProjectIssueSecurityScheme(Async)");
}
return getProjectIssueSecuritySchemeCall(projectKeyOrId, _callback);
}
/**
* Get project issue security scheme
* Returns the [issue security scheme](https://confluence.atlassian.com/x/J4lKLg) associated with the project. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or the *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg).
* @param projectKeyOrId The project ID or project key (case sensitive). (required)
* @return SecurityScheme
* @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 the project is visible to the user but the user doesn't have administrative permissions.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public SecurityScheme getProjectIssueSecurityScheme(String projectKeyOrId) throws ApiException {
ApiResponse localVarResp = getProjectIssueSecuritySchemeWithHttpInfo(projectKeyOrId);
return localVarResp.getData();
}
/**
* Get project issue security scheme
* Returns the [issue security scheme](https://confluence.atlassian.com/x/J4lKLg) associated with the project. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or the *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg).
* @param projectKeyOrId The project ID or project key (case sensitive). (required)
* @return ApiResponse<SecurityScheme>
* @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 the project is visible to the user but the user doesn't have administrative permissions.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public ApiResponse getProjectIssueSecuritySchemeWithHttpInfo(String projectKeyOrId) throws ApiException {
okhttp3.Call localVarCall = getProjectIssueSecuritySchemeValidateBeforeCall(projectKeyOrId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get project issue security scheme (asynchronously)
* Returns the [issue security scheme](https://confluence.atlassian.com/x/J4lKLg) associated with the project. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or the *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg).
* @param projectKeyOrId 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.
-
400
Returned if the request is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the project is visible to the user but the user doesn't have administrative permissions.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public okhttp3.Call getProjectIssueSecuritySchemeAsync(String projectKeyOrId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getProjectIssueSecuritySchemeValidateBeforeCall(projectKeyOrId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSecurityLevelsForProject
* @param projectKeyOrId 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.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public okhttp3.Call getSecurityLevelsForProjectCall(String projectKeyOrId, 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/{projectKeyOrId}/securitylevel"
.replace("{" + "projectKeyOrId" + "}", localVarApiClient.escapeString(projectKeyOrId.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 getSecurityLevelsForProjectValidateBeforeCall(String projectKeyOrId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'projectKeyOrId' is set
if (projectKeyOrId == null) {
throw new ApiException("Missing the required parameter 'projectKeyOrId' when calling getSecurityLevelsForProject(Async)");
}
return getSecurityLevelsForProjectCall(projectKeyOrId, _callback);
}
/**
* Get project issue security levels
* Returns all [issue security](https://confluence.atlassian.com/x/J4lKLg) levels for the project that the user has access to. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [global permission](https://confluence.atlassian.com/x/x4dKLg) for the project, however, issue security levels are only returned for authenticated user with *Set Issue Security* [global permission](https://confluence.atlassian.com/x/x4dKLg) for the project.
* @param projectKeyOrId The project ID or project key (case sensitive). (required)
* @return ProjectIssueSecurityLevels
* @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.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public ProjectIssueSecurityLevels getSecurityLevelsForProject(String projectKeyOrId) throws ApiException {
ApiResponse localVarResp = getSecurityLevelsForProjectWithHttpInfo(projectKeyOrId);
return localVarResp.getData();
}
/**
* Get project issue security levels
* Returns all [issue security](https://confluence.atlassian.com/x/J4lKLg) levels for the project that the user has access to. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [global permission](https://confluence.atlassian.com/x/x4dKLg) for the project, however, issue security levels are only returned for authenticated user with *Set Issue Security* [global permission](https://confluence.atlassian.com/x/x4dKLg) for the project.
* @param projectKeyOrId The project ID or project key (case sensitive). (required)
* @return ApiResponse<ProjectIssueSecurityLevels>
* @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.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public ApiResponse getSecurityLevelsForProjectWithHttpInfo(String projectKeyOrId) throws ApiException {
okhttp3.Call localVarCall = getSecurityLevelsForProjectValidateBeforeCall(projectKeyOrId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get project issue security levels (asynchronously)
* Returns all [issue security](https://confluence.atlassian.com/x/J4lKLg) levels for the project that the user has access to. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [global permission](https://confluence.atlassian.com/x/x4dKLg) for the project, however, issue security levels are only returned for authenticated user with *Set Issue Security* [global permission](https://confluence.atlassian.com/x/x4dKLg) for the project.
* @param projectKeyOrId 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.
-
404
Returned if the project is not found or the user does not have permission to view it.
-
*/
public okhttp3.Call getSecurityLevelsForProjectAsync(String projectKeyOrId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSecurityLevelsForProjectValidateBeforeCall(projectKeyOrId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}