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.ActorInputBean;
import software.tnb.jira.validation.generated.model.ActorsMap;
import software.tnb.jira.validation.generated.model.ProjectRole;
import software.tnb.jira.validation.generated.model.ProjectRoleActorsUpdateBean;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ProjectRoleActorsApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public ProjectRoleActorsApi() {
this(Configuration.getDefaultApiClient());
}
public ProjectRoleActorsApi(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 addActorUsers
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param actorsMap The groups or users to associate with the project role for this project. Provide the user account ID, group name, or group ID. As a group's name can change, use of group ID is recommended. (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. The complete list of actors for the project is returned. For example, the cURL request above adds a group, *jira-developers*. For the response below to be returned as a result of that request, the user *Mia Krystof* would have previously been added as a `user` actor for this project.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing or if the calling user lacks administrative permissions for the project.
-
404
Returned if: * the project is not found. * the user or group is not found. * the group or user is not active.
-
*/
public okhttp3.Call addActorUsersCall(String projectIdOrKey, Long id, ActorsMap actorsMap, 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 = actorsMap;
// create path and map variables
String localVarPath = "/rest/api/3/project/{projectIdOrKey}/role/{id}"
.replace("{" + "projectIdOrKey" + "}", localVarApiClient.escapeString(projectIdOrKey.toString()))
.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call addActorUsersValidateBeforeCall(String projectIdOrKey, Long id, ActorsMap actorsMap, 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 addActorUsers(Async)");
}
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling addActorUsers(Async)");
}
// verify the required parameter 'actorsMap' is set
if (actorsMap == null) {
throw new ApiException("Missing the required parameter 'actorsMap' when calling addActorUsers(Async)");
}
return addActorUsersCall(projectIdOrKey, id, actorsMap, _callback);
}
/**
* Add actors to project role
* Adds actors to a project role for the project. To replace all actors for the project, use [Set actors for project role](#api-rest-api-3-project-projectIdOrKey-role-id-put). This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param actorsMap The groups or users to associate with the project role for this project. Provide the user account ID, group name, or group ID. As a group's name can change, use of group ID is recommended. (required)
* @return ProjectRole
* @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. The complete list of actors for the project is returned. For example, the cURL request above adds a group, *jira-developers*. For the response below to be returned as a result of that request, the user *Mia Krystof* would have previously been added as a `user` actor for this project.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing or if the calling user lacks administrative permissions for the project.
-
404
Returned if: * the project is not found. * the user or group is not found. * the group or user is not active.
-
*/
public ProjectRole addActorUsers(String projectIdOrKey, Long id, ActorsMap actorsMap) throws ApiException {
ApiResponse localVarResp = addActorUsersWithHttpInfo(projectIdOrKey, id, actorsMap);
return localVarResp.getData();
}
/**
* Add actors to project role
* Adds actors to a project role for the project. To replace all actors for the project, use [Set actors for project role](#api-rest-api-3-project-projectIdOrKey-role-id-put). This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param actorsMap The groups or users to associate with the project role for this project. Provide the user account ID, group name, or group ID. As a group's name can change, use of group ID is recommended. (required)
* @return ApiResponse<ProjectRole>
* @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. The complete list of actors for the project is returned. For example, the cURL request above adds a group, *jira-developers*. For the response below to be returned as a result of that request, the user *Mia Krystof* would have previously been added as a `user` actor for this project.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing or if the calling user lacks administrative permissions for the project.
-
404
Returned if: * the project is not found. * the user or group is not found. * the group or user is not active.
-
*/
public ApiResponse addActorUsersWithHttpInfo(String projectIdOrKey, Long id, ActorsMap actorsMap) throws ApiException {
okhttp3.Call localVarCall = addActorUsersValidateBeforeCall(projectIdOrKey, id, actorsMap, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Add actors to project role (asynchronously)
* Adds actors to a project role for the project. To replace all actors for the project, use [Set actors for project role](#api-rest-api-3-project-projectIdOrKey-role-id-put). This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param actorsMap The groups or users to associate with the project role for this project. Provide the user account ID, group name, or group ID. As a group's name can change, use of group ID is recommended. (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. The complete list of actors for the project is returned. For example, the cURL request above adds a group, *jira-developers*. For the response below to be returned as a result of that request, the user *Mia Krystof* would have previously been added as a `user` actor for this project.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing or if the calling user lacks administrative permissions for the project.
-
404
Returned if: * the project is not found. * the user or group is not found. * the group or user is not active.
-
*/
public okhttp3.Call addActorUsersAsync(String projectIdOrKey, Long id, ActorsMap actorsMap, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = addActorUsersValidateBeforeCall(projectIdOrKey, id, actorsMap, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for addProjectRoleActorsToRole
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param actorInputBean (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 user does not have administrative permissions.
-
404
Returned if the project role is not found.
-
*/
public okhttp3.Call addProjectRoleActorsToRoleCall(Long id, ActorInputBean actorInputBean, 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 = actorInputBean;
// create path and map variables
String localVarPath = "/rest/api/3/role/{id}/actors"
.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call addProjectRoleActorsToRoleValidateBeforeCall(Long id, ActorInputBean actorInputBean, 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 addProjectRoleActorsToRole(Async)");
}
// verify the required parameter 'actorInputBean' is set
if (actorInputBean == null) {
throw new ApiException("Missing the required parameter 'actorInputBean' when calling addProjectRoleActorsToRole(Async)");
}
return addProjectRoleActorsToRoleCall(id, actorInputBean, _callback);
}
/**
* Add default actors to project role
* Adds [default actors](#api-rest-api-3-resolution-get) to a role. You may add groups or users, but you cannot add groups and users in the same request. Changing a project role's default actors does not affect project role members for projects already created. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param actorInputBean (required)
* @return ProjectRole
* @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 user does not have administrative permissions.
-
404
Returned if the project role is not found.
-
*/
public ProjectRole addProjectRoleActorsToRole(Long id, ActorInputBean actorInputBean) throws ApiException {
ApiResponse localVarResp = addProjectRoleActorsToRoleWithHttpInfo(id, actorInputBean);
return localVarResp.getData();
}
/**
* Add default actors to project role
* Adds [default actors](#api-rest-api-3-resolution-get) to a role. You may add groups or users, but you cannot add groups and users in the same request. Changing a project role's default actors does not affect project role members for projects already created. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param actorInputBean (required)
* @return ApiResponse<ProjectRole>
* @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 user does not have administrative permissions.
-
404
Returned if the project role is not found.
-
*/
public ApiResponse addProjectRoleActorsToRoleWithHttpInfo(Long id, ActorInputBean actorInputBean) throws ApiException {
okhttp3.Call localVarCall = addProjectRoleActorsToRoleValidateBeforeCall(id, actorInputBean, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Add default actors to project role (asynchronously)
* Adds [default actors](#api-rest-api-3-resolution-get) to a role. You may add groups or users, but you cannot add groups and users in the same request. Changing a project role's default actors does not affect project role members for projects already created. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param actorInputBean (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 user does not have administrative permissions.
-
404
Returned if the project role is not found.
-
*/
public okhttp3.Call addProjectRoleActorsToRoleAsync(Long id, ActorInputBean actorInputBean, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = addProjectRoleActorsToRoleValidateBeforeCall(id, actorInputBean, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteActor
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param user The user account ID of the user to remove from the project role. (optional)
* @param group The name of the group to remove from the project role. This parameter cannot be used with the `groupId` parameter. As a group's name can change, use of `groupId` is recommended. (optional)
* @param groupId The ID of the group to remove from the project role. This parameter cannot be used with the `group` parameter. (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.
-
400
Returned if the request is not valid.
-
404
Returned if: * the project or project role is not found. * the calling user does not have administrative permission.
-
*/
public okhttp3.Call deleteActorCall(String projectIdOrKey, Long id, String user, String group, String groupId, 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}/role/{id}"
.replace("{" + "projectIdOrKey" + "}", localVarApiClient.escapeString(projectIdOrKey.toString()))
.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 (user != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("user", user));
}
if (group != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("group", group));
}
if (groupId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupId", groupId));
}
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 deleteActorValidateBeforeCall(String projectIdOrKey, Long id, String user, String group, String groupId, 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 deleteActor(Async)");
}
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling deleteActor(Async)");
}
return deleteActorCall(projectIdOrKey, id, user, group, groupId, _callback);
}
/**
* Delete actors from project role
* Deletes actors from a project role for the project. To remove default actors from the project role, use [Delete default actors from project role](#api-rest-api-3-role-id-actors-delete). This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param user The user account ID of the user to remove from the project role. (optional)
* @param group The name of the group to remove from the project role. This parameter cannot be used with the `groupId` parameter. As a group's name can change, use of `groupId` is recommended. (optional)
* @param groupId The ID of the group to remove from the project role. This parameter cannot be used with the `group` parameter. (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.
-
400
Returned if the request is not valid.
-
404
Returned if: * the project or project role is not found. * the calling user does not have administrative permission.
-
*/
public void deleteActor(String projectIdOrKey, Long id, String user, String group, String groupId) throws ApiException {
deleteActorWithHttpInfo(projectIdOrKey, id, user, group, groupId);
}
/**
* Delete actors from project role
* Deletes actors from a project role for the project. To remove default actors from the project role, use [Delete default actors from project role](#api-rest-api-3-role-id-actors-delete). This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param user The user account ID of the user to remove from the project role. (optional)
* @param group The name of the group to remove from the project role. This parameter cannot be used with the `groupId` parameter. As a group's name can change, use of `groupId` is recommended. (optional)
* @param groupId The ID of the group to remove from the project role. This parameter cannot be used with the `group` parameter. (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.
-
400
Returned if the request is not valid.
-
404
Returned if: * the project or project role is not found. * the calling user does not have administrative permission.
-
*/
public ApiResponse deleteActorWithHttpInfo(String projectIdOrKey, Long id, String user, String group, String groupId) throws ApiException {
okhttp3.Call localVarCall = deleteActorValidateBeforeCall(projectIdOrKey, id, user, group, groupId, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete actors from project role (asynchronously)
* Deletes actors from a project role for the project. To remove default actors from the project role, use [Delete default actors from project role](#api-rest-api-3-role-id-actors-delete). This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param user The user account ID of the user to remove from the project role. (optional)
* @param group The name of the group to remove from the project role. This parameter cannot be used with the `groupId` parameter. As a group's name can change, use of `groupId` is recommended. (optional)
* @param groupId The ID of the group to remove from the project role. This parameter cannot be used with the `group` parameter. (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.
-
400
Returned if the request is not valid.
-
404
Returned if: * the project or project role is not found. * the calling user does not have administrative permission.
-
*/
public okhttp3.Call deleteActorAsync(String projectIdOrKey, Long id, String user, String group, String groupId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteActorValidateBeforeCall(projectIdOrKey, id, user, group, groupId, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for deleteProjectRoleActorsFromRole
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param user The user account ID of the user to remove as a default actor. (optional)
* @param groupId The group ID of the group to be removed as a default actor. This parameter cannot be used with the `group` parameter. (optional)
* @param group The group name of the group to be removed as a default actor.This parameter cannot be used with the `groupId` parameter. As a group's name can change, use of `groupId` is recommended. (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 the user does not have administrative permissions.
-
404
Returned if the project role is not found.
-
*/
public okhttp3.Call deleteProjectRoleActorsFromRoleCall(Long id, String user, String groupId, String group, 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/role/{id}/actors"
.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 (user != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("user", user));
}
if (groupId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupId", groupId));
}
if (group != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("group", group));
}
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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteProjectRoleActorsFromRoleValidateBeforeCall(Long id, String user, String groupId, String group, 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 deleteProjectRoleActorsFromRole(Async)");
}
return deleteProjectRoleActorsFromRoleCall(id, user, groupId, group, _callback);
}
/**
* Delete default actors from project role
* Deletes the [default actors](#api-rest-api-3-resolution-get) from a project role. You may delete a group or user, but you cannot delete a group and a user in the same request. Changing a project role's default actors does not affect project role members for projects already created. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param user The user account ID of the user to remove as a default actor. (optional)
* @param groupId The group ID of the group to be removed as a default actor. This parameter cannot be used with the `group` parameter. (optional)
* @param group The group name of the group to be removed as a default actor.This parameter cannot be used with the `groupId` parameter. As a group's name can change, use of `groupId` is recommended. (optional)
* @return ProjectRole
* @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 user does not have administrative permissions.
-
404
Returned if the project role is not found.
-
*/
public ProjectRole deleteProjectRoleActorsFromRole(Long id, String user, String groupId, String group) throws ApiException {
ApiResponse localVarResp = deleteProjectRoleActorsFromRoleWithHttpInfo(id, user, groupId, group);
return localVarResp.getData();
}
/**
* Delete default actors from project role
* Deletes the [default actors](#api-rest-api-3-resolution-get) from a project role. You may delete a group or user, but you cannot delete a group and a user in the same request. Changing a project role's default actors does not affect project role members for projects already created. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param user The user account ID of the user to remove as a default actor. (optional)
* @param groupId The group ID of the group to be removed as a default actor. This parameter cannot be used with the `group` parameter. (optional)
* @param group The group name of the group to be removed as a default actor.This parameter cannot be used with the `groupId` parameter. As a group's name can change, use of `groupId` is recommended. (optional)
* @return ApiResponse<ProjectRole>
* @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 user does not have administrative permissions.
-
404
Returned if the project role is not found.
-
*/
public ApiResponse deleteProjectRoleActorsFromRoleWithHttpInfo(Long id, String user, String groupId, String group) throws ApiException {
okhttp3.Call localVarCall = deleteProjectRoleActorsFromRoleValidateBeforeCall(id, user, groupId, group, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Delete default actors from project role (asynchronously)
* Deletes the [default actors](#api-rest-api-3-resolution-get) from a project role. You may delete a group or user, but you cannot delete a group and a user in the same request. Changing a project role's default actors does not affect project role members for projects already created. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param user The user account ID of the user to remove as a default actor. (optional)
* @param groupId The group ID of the group to be removed as a default actor. This parameter cannot be used with the `group` parameter. (optional)
* @param group The group name of the group to be removed as a default actor.This parameter cannot be used with the `groupId` parameter. As a group's name can change, use of `groupId` is recommended. (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 the user does not have administrative permissions.
-
404
Returned if the project role is not found.
-
*/
public okhttp3.Call deleteProjectRoleActorsFromRoleAsync(Long id, String user, String groupId, String group, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteProjectRoleActorsFromRoleValidateBeforeCall(id, user, groupId, group, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getProjectRoleActorsForRole
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (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 user does not have administrative permissions.
-
404
Returned if the project role is not found.
-
*/
public okhttp3.Call getProjectRoleActorsForRoleCall(Long 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/role/{id}/actors"
.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 getProjectRoleActorsForRoleValidateBeforeCall(Long 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 getProjectRoleActorsForRole(Async)");
}
return getProjectRoleActorsForRoleCall(id, _callback);
}
/**
* Get default actors for project role
* Returns the [default actors](#api-rest-api-3-resolution-get) for the project role. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @return ProjectRole
* @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 user does not have administrative permissions.
-
404
Returned if the project role is not found.
-
*/
public ProjectRole getProjectRoleActorsForRole(Long id) throws ApiException {
ApiResponse localVarResp = getProjectRoleActorsForRoleWithHttpInfo(id);
return localVarResp.getData();
}
/**
* Get default actors for project role
* Returns the [default actors](#api-rest-api-3-resolution-get) for the project role. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @return ApiResponse<ProjectRole>
* @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 user does not have administrative permissions.
-
404
Returned if the project role is not found.
-
*/
public ApiResponse getProjectRoleActorsForRoleWithHttpInfo(Long id) throws ApiException {
okhttp3.Call localVarCall = getProjectRoleActorsForRoleValidateBeforeCall(id, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get default actors for project role (asynchronously)
* Returns the [default actors](#api-rest-api-3-resolution-get) for the project role. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (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 user does not have administrative permissions.
-
404
Returned if the project role is not found.
-
*/
public okhttp3.Call getProjectRoleActorsForRoleAsync(Long id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getProjectRoleActorsForRoleValidateBeforeCall(id, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for setActors
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param projectRoleActorsUpdateBean The groups or users to associate with the project role for this project. Provide the user account ID, group name, or group ID. As a group's name can change, use of group ID is recommended. (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. The complete list of actors for the project is returned.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing or if the calling user lacks administrative permissions for the project.
-
404
Returned if: * the project is not found. * a user or group is not found. * a group or user is not active.
-
*/
public okhttp3.Call setActorsCall(String projectIdOrKey, Long id, ProjectRoleActorsUpdateBean projectRoleActorsUpdateBean, 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 = projectRoleActorsUpdateBean;
// create path and map variables
String localVarPath = "/rest/api/3/project/{projectIdOrKey}/role/{id}"
.replace("{" + "projectIdOrKey" + "}", localVarApiClient.escapeString(projectIdOrKey.toString()))
.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 setActorsValidateBeforeCall(String projectIdOrKey, Long id, ProjectRoleActorsUpdateBean projectRoleActorsUpdateBean, 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 setActors(Async)");
}
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling setActors(Async)");
}
// verify the required parameter 'projectRoleActorsUpdateBean' is set
if (projectRoleActorsUpdateBean == null) {
throw new ApiException("Missing the required parameter 'projectRoleActorsUpdateBean' when calling setActors(Async)");
}
return setActorsCall(projectIdOrKey, id, projectRoleActorsUpdateBean, _callback);
}
/**
* Set actors for project role
* Sets the actors for a project role for a project, replacing all existing actors. To add actors to the project without overwriting the existing list, use [Add actors to project role](#api-rest-api-3-project-projectIdOrKey-role-id-post). **[Permissions](#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param projectRoleActorsUpdateBean The groups or users to associate with the project role for this project. Provide the user account ID, group name, or group ID. As a group's name can change, use of group ID is recommended. (required)
* @return ProjectRole
* @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. The complete list of actors for the project is returned.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing or if the calling user lacks administrative permissions for the project.
-
404
Returned if: * the project is not found. * a user or group is not found. * a group or user is not active.
-
*/
public ProjectRole setActors(String projectIdOrKey, Long id, ProjectRoleActorsUpdateBean projectRoleActorsUpdateBean) throws ApiException {
ApiResponse localVarResp = setActorsWithHttpInfo(projectIdOrKey, id, projectRoleActorsUpdateBean);
return localVarResp.getData();
}
/**
* Set actors for project role
* Sets the actors for a project role for a project, replacing all existing actors. To add actors to the project without overwriting the existing list, use [Add actors to project role](#api-rest-api-3-project-projectIdOrKey-role-id-post). **[Permissions](#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param projectRoleActorsUpdateBean The groups or users to associate with the project role for this project. Provide the user account ID, group name, or group ID. As a group's name can change, use of group ID is recommended. (required)
* @return ApiResponse<ProjectRole>
* @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. The complete list of actors for the project is returned.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing or if the calling user lacks administrative permissions for the project.
-
404
Returned if: * the project is not found. * a user or group is not found. * a group or user is not active.
-
*/
public ApiResponse setActorsWithHttpInfo(String projectIdOrKey, Long id, ProjectRoleActorsUpdateBean projectRoleActorsUpdateBean) throws ApiException {
okhttp3.Call localVarCall = setActorsValidateBeforeCall(projectIdOrKey, id, projectRoleActorsUpdateBean, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Set actors for project role (asynchronously)
* Sets the actors for a project role for a project, replacing all existing actors. To add actors to the project without overwriting the existing list, use [Add actors to project role](#api-rest-api-3-project-projectIdOrKey-role-id-post). **[Permissions](#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param projectIdOrKey The project ID or project key (case sensitive). (required)
* @param id The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs. (required)
* @param projectRoleActorsUpdateBean The groups or users to associate with the project role for this project. Provide the user account ID, group name, or group ID. As a group's name can change, use of group ID is recommended. (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. The complete list of actors for the project is returned.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing or if the calling user lacks administrative permissions for the project.
-
404
Returned if: * the project is not found. * a user or group is not found. * a group or user is not active.
-
*/
public okhttp3.Call setActorsAsync(String projectIdOrKey, Long id, ProjectRoleActorsUpdateBean projectRoleActorsUpdateBean, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = setActorsValidateBeforeCall(projectIdOrKey, id, projectRoleActorsUpdateBean, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}