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.PermissionGrant;
import software.tnb.jira.validation.generated.model.PermissionGrants;
import software.tnb.jira.validation.generated.model.PermissionScheme;
import software.tnb.jira.validation.generated.model.PermissionSchemes;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class PermissionSchemesApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public PermissionSchemesApi() {
this(Configuration.getDefaultApiClient());
}
public PermissionSchemesApi(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 createPermissionGrant
* @param schemeId The ID of the permission scheme in which to create a new permission grant. (required)
* @param permissionGrant The permission grant to create. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: * `permissions` Returns all permission grants for each permission scheme. * `user` Returns information about the user who is granted the permission. * `group` Returns information about the group that is granted the permission. * `projectRole` Returns information about the project role granted the permission. * `field` Returns information about the custom field granted the permission. * `all` Returns all expandable information. (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
201
Returned if the scheme permission is created.
-
400
Returned if the value for expand is invalid or the same permission grant is present.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public okhttp3.Call createPermissionGrantCall(Long schemeId, PermissionGrant permissionGrant, 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 = permissionGrant;
// create path and map variables
String localVarPath = "/rest/api/3/permissionscheme/{schemeId}/permission"
.replace("{" + "schemeId" + "}", localVarApiClient.escapeString(schemeId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createPermissionGrantValidateBeforeCall(Long schemeId, PermissionGrant permissionGrant, String expand, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'schemeId' is set
if (schemeId == null) {
throw new ApiException("Missing the required parameter 'schemeId' when calling createPermissionGrant(Async)");
}
// verify the required parameter 'permissionGrant' is set
if (permissionGrant == null) {
throw new ApiException("Missing the required parameter 'permissionGrant' when calling createPermissionGrant(Async)");
}
return createPermissionGrantCall(schemeId, permissionGrant, expand, _callback);
}
/**
* Create permission grant
* Creates a permission grant in a permission scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param schemeId The ID of the permission scheme in which to create a new permission grant. (required)
* @param permissionGrant The permission grant to create. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: * `permissions` Returns all permission grants for each permission scheme. * `user` Returns information about the user who is granted the permission. * `group` Returns information about the group that is granted the permission. * `projectRole` Returns information about the project role granted the permission. * `field` Returns information about the custom field granted the permission. * `all` Returns all expandable information. (optional)
* @return PermissionGrant
* @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 scheme permission is created.
-
400
Returned if the value for expand is invalid or the same permission grant is present.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public PermissionGrant createPermissionGrant(Long schemeId, PermissionGrant permissionGrant, String expand) throws ApiException {
ApiResponse localVarResp = createPermissionGrantWithHttpInfo(schemeId, permissionGrant, expand);
return localVarResp.getData();
}
/**
* Create permission grant
* Creates a permission grant in a permission scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param schemeId The ID of the permission scheme in which to create a new permission grant. (required)
* @param permissionGrant The permission grant to create. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: * `permissions` Returns all permission grants for each permission scheme. * `user` Returns information about the user who is granted the permission. * `group` Returns information about the group that is granted the permission. * `projectRole` Returns information about the project role granted the permission. * `field` Returns information about the custom field granted the permission. * `all` Returns all expandable information. (optional)
* @return ApiResponse<PermissionGrant>
* @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 scheme permission is created.
-
400
Returned if the value for expand is invalid or the same permission grant is present.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public ApiResponse createPermissionGrantWithHttpInfo(Long schemeId, PermissionGrant permissionGrant, String expand) throws ApiException {
okhttp3.Call localVarCall = createPermissionGrantValidateBeforeCall(schemeId, permissionGrant, expand, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create permission grant (asynchronously)
* Creates a permission grant in a permission scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param schemeId The ID of the permission scheme in which to create a new permission grant. (required)
* @param permissionGrant The permission grant to create. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: * `permissions` Returns all permission grants for each permission scheme. * `user` Returns information about the user who is granted the permission. * `group` Returns information about the group that is granted the permission. * `projectRole` Returns information about the project role granted the permission. * `field` Returns information about the custom field granted the permission. * `all` Returns all expandable information. (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
201
Returned if the scheme permission is created.
-
400
Returned if the value for expand is invalid or the same permission grant is present.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public okhttp3.Call createPermissionGrantAsync(Long schemeId, PermissionGrant permissionGrant, String expand, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createPermissionGrantValidateBeforeCall(schemeId, permissionGrant, expand, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for createPermissionScheme
* @param requestBody The permission scheme to create. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always 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
201
Returned if the permission scheme is created.
-
400
Returned if the request is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or the feature is not available in the Jira plan.
-
*/
public okhttp3.Call createPermissionSchemeCall(Map requestBody, 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 = requestBody;
// create path and map variables
String localVarPath = "/rest/api/3/permissionscheme";
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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createPermissionSchemeValidateBeforeCall(Map requestBody, String expand, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'requestBody' is set
if (requestBody == null) {
throw new ApiException("Missing the required parameter 'requestBody' when calling createPermissionScheme(Async)");
}
return createPermissionSchemeCall(requestBody, expand, _callback);
}
/**
* Create permission scheme
* Creates a new permission scheme. You can create a permission scheme with or without defining a set of permission grants. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param requestBody The permission scheme to create. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always 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
201
Returned if the permission scheme is created.
-
400
Returned if the request is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or the feature is not available in the Jira plan.
-
*/
public PermissionScheme createPermissionScheme(Map requestBody, String expand) throws ApiException {
ApiResponse localVarResp = createPermissionSchemeWithHttpInfo(requestBody, expand);
return localVarResp.getData();
}
/**
* Create permission scheme
* Creates a new permission scheme. You can create a permission scheme with or without defining a set of permission grants. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param requestBody The permission scheme to create. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always 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
201
Returned if the permission scheme is created.
-
400
Returned if the request is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or the feature is not available in the Jira plan.
-
*/
public ApiResponse createPermissionSchemeWithHttpInfo(Map requestBody, String expand) throws ApiException {
okhttp3.Call localVarCall = createPermissionSchemeValidateBeforeCall(requestBody, expand, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create permission scheme (asynchronously)
* Creates a new permission scheme. You can create a permission scheme with or without defining a set of permission grants. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param requestBody The permission scheme to create. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always 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
201
Returned if the permission scheme is created.
-
400
Returned if the request is invalid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or the feature is not available in the Jira plan.
-
*/
public okhttp3.Call createPermissionSchemeAsync(Map requestBody, String expand, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createPermissionSchemeValidateBeforeCall(requestBody, expand, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deletePermissionScheme
* @param schemeId The ID of the permission scheme being deleted. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the permission scheme is deleted.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
404
Returned if the permission scheme is not found.
-
*/
public okhttp3.Call deletePermissionSchemeCall(Long schemeId, 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/permissionscheme/{schemeId}"
.replace("{" + "schemeId" + "}", localVarApiClient.escapeString(schemeId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deletePermissionSchemeValidateBeforeCall(Long schemeId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'schemeId' is set
if (schemeId == null) {
throw new ApiException("Missing the required parameter 'schemeId' when calling deletePermissionScheme(Async)");
}
return deletePermissionSchemeCall(schemeId, _callback);
}
/**
* Delete permission scheme
* Deletes a permission scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param schemeId The ID of the permission scheme being deleted. (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the permission scheme is deleted.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
404
Returned if the permission scheme is not found.
-
*/
public void deletePermissionScheme(Long schemeId) throws ApiException {
deletePermissionSchemeWithHttpInfo(schemeId);
}
/**
* Delete permission scheme
* Deletes a permission scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param schemeId The ID of the permission scheme being deleted. (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the permission scheme is deleted.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
404
Returned if the permission scheme is not found.
-
*/
public ApiResponse deletePermissionSchemeWithHttpInfo(Long schemeId) throws ApiException {
okhttp3.Call localVarCall = deletePermissionSchemeValidateBeforeCall(schemeId, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete permission scheme (asynchronously)
* Deletes a permission scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param schemeId The ID of the permission scheme being deleted. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the permission scheme is deleted.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
404
Returned if the permission scheme is not found.
-
*/
public okhttp3.Call deletePermissionSchemeAsync(Long schemeId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deletePermissionSchemeValidateBeforeCall(schemeId, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for deletePermissionSchemeEntity
* @param schemeId The ID of the permission scheme to delete the permission grant from. (required)
* @param permissionId The ID of the permission grant to delete. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the permission grant is deleted.
-
400
Returned if permission grant with the provided ID is not found.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public okhttp3.Call deletePermissionSchemeEntityCall(Long schemeId, Long permissionId, 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/permissionscheme/{schemeId}/permission/{permissionId}"
.replace("{" + "schemeId" + "}", localVarApiClient.escapeString(schemeId.toString()))
.replace("{" + "permissionId" + "}", localVarApiClient.escapeString(permissionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deletePermissionSchemeEntityValidateBeforeCall(Long schemeId, Long permissionId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'schemeId' is set
if (schemeId == null) {
throw new ApiException("Missing the required parameter 'schemeId' when calling deletePermissionSchemeEntity(Async)");
}
// verify the required parameter 'permissionId' is set
if (permissionId == null) {
throw new ApiException("Missing the required parameter 'permissionId' when calling deletePermissionSchemeEntity(Async)");
}
return deletePermissionSchemeEntityCall(schemeId, permissionId, _callback);
}
/**
* Delete permission scheme grant
* Deletes a permission grant from a permission scheme. See [About permission schemes and grants](../api-group-permission-schemes/#about-permission-schemes-and-grants) for more details. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param schemeId The ID of the permission scheme to delete the permission grant from. (required)
* @param permissionId The ID of the permission grant to delete. (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the permission grant is deleted.
-
400
Returned if permission grant with the provided ID is not found.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public void deletePermissionSchemeEntity(Long schemeId, Long permissionId) throws ApiException {
deletePermissionSchemeEntityWithHttpInfo(schemeId, permissionId);
}
/**
* Delete permission scheme grant
* Deletes a permission grant from a permission scheme. See [About permission schemes and grants](../api-group-permission-schemes/#about-permission-schemes-and-grants) for more details. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param schemeId The ID of the permission scheme to delete the permission grant from. (required)
* @param permissionId The ID of the permission grant to delete. (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the permission grant is deleted.
-
400
Returned if permission grant with the provided ID is not found.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public ApiResponse deletePermissionSchemeEntityWithHttpInfo(Long schemeId, Long permissionId) throws ApiException {
okhttp3.Call localVarCall = deletePermissionSchemeEntityValidateBeforeCall(schemeId, permissionId, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete permission scheme grant (asynchronously)
* Deletes a permission grant from a permission scheme. See [About permission schemes and grants](../api-group-permission-schemes/#about-permission-schemes-and-grants) for more details. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param schemeId The ID of the permission scheme to delete the permission grant from. (required)
* @param permissionId The ID of the permission grant to delete. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the permission grant is deleted.
-
400
Returned if permission grant with the provided ID is not found.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public okhttp3.Call deletePermissionSchemeEntityAsync(Long schemeId, Long permissionId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deletePermissionSchemeEntityValidateBeforeCall(schemeId, permissionId, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for getAllPermissionSchemes
* @param expand Use expand 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.
-
*/
public okhttp3.Call getAllPermissionSchemesCall(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/permissionscheme";
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 getAllPermissionSchemesValidateBeforeCall(String expand, final ApiCallback _callback) throws ApiException {
return getAllPermissionSchemesCall(expand, _callback);
}
/**
* Get all permission schemes
* Returns all permission schemes. ### About permission schemes and grants ### A permission scheme is a collection of permission grants. A permission grant consists of a `holder` and a `permission`. #### Holder object #### The `holder` object contains information about the user or group being granted the permission. For example, the *Administer projects* permission is granted to a group named *Teams in space administrators*. In this case, the type is `\"type\": \"group\"`, and the parameter is the group name, `\"parameter\": \"Teams in space administrators\"` and the value is group ID, `\"value\": \"ca85fac0-d974-40ca-a615-7af99c48d24f\"`. The `holder` object is defined by the following properties: * `type` Identifies the user or group (see the list of types below). * `parameter` As a group's name can change, use of `value` is recommended. The value of this property depends on the `type`. For example, if the `type` is a group, then you need to specify the group name. * `value` The value of this property depends on the `type`. If the `type` is a group, then you need to specify the group ID. For other `type` it has the same value as `parameter` The following `types` are available. The expected values for `parameter` and `value` are given in parentheses (some types may not have a `parameter` or `value`): * `anyone` Grant for anonymous users. * `applicationRole` Grant for users with access to the specified application (application name, application name). See [Update product access settings](https://confluence.atlassian.com/x/3YxjL) for more information. * `assignee` Grant for the user currently assigned to an issue. * `group` Grant for the specified group (`parameter` : group name, `value` : group ID). * `groupCustomField` Grant for a user in the group selected in the specified custom field (`parameter` : custom field ID, `value` : custom field ID). * `projectLead` Grant for a project lead. * `projectRole` Grant for the specified project role (`parameter` :project role ID, `value` : project role ID). * `reporter` Grant for the user who reported the issue. * `sd.customer.portal.only` Jira Service Desk only. Grants customers permission to access the customer portal but not Jira. See [Customizing Jira Service Desk permissions](https://confluence.atlassian.com/x/24dKLg) for more information. * `user` Grant for the specified user (`parameter` : user ID - historically this was the userkey but that is deprecated and the account ID should be used, `value` : user ID). * `userCustomField` Grant for a user selected in the specified custom field (`parameter` : custom field ID, `value` : custom field ID). #### Built-in permissions #### The [built-in Jira permissions](https://confluence.atlassian.com/x/yodKLg) are listed below. Apps can also define custom permissions. See the [project permission](https://developer.atlassian.com/cloud/jira/platform/modules/project-permission/) and [global permission](https://developer.atlassian.com/cloud/jira/platform/modules/global-permission/) module documentation for more information. **Project permissions** * `ADMINISTER_PROJECTS` * `BROWSE_PROJECTS` * `MANAGE_SPRINTS_PERMISSION` (Jira Software only) * `SERVICEDESK_AGENT` (Jira Service Desk only) * `VIEW_DEV_TOOLS` (Jira Software only) * `VIEW_READONLY_WORKFLOW` **Issue permissions** * `ASSIGNABLE_USER` * `ASSIGN_ISSUES` * `CLOSE_ISSUES` * `CREATE_ISSUES` * `DELETE_ISSUES` * `EDIT_ISSUES` * `LINK_ISSUES` * `MODIFY_REPORTER` * `MOVE_ISSUES` * `RESOLVE_ISSUES` * `SCHEDULE_ISSUES` * `SET_ISSUE_SECURITY` * `TRANSITION_ISSUES` **Voters and watchers permissions** * `MANAGE_WATCHERS` * `VIEW_VOTERS_AND_WATCHERS` **Comments permissions** * `ADD_COMMENTS` * `DELETE_ALL_COMMENTS` * `DELETE_OWN_COMMENTS` * `EDIT_ALL_COMMENTS` * `EDIT_OWN_COMMENTS` **Attachments permissions** * `CREATE_ATTACHMENTS` * `DELETE_ALL_ATTACHMENTS` * `DELETE_OWN_ATTACHMENTS` **Time tracking permissions** * `DELETE_ALL_WORKLOGS` * `DELETE_OWN_WORKLOGS` * `EDIT_ALL_WORKLOGS` * `EDIT_OWN_WORKLOGS` * `WORK_ON_ISSUES` **[Permissions](#permissions) required:** Permission to access Jira.
* @param expand Use expand 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 PermissionSchemes
* @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.
-
*/
public PermissionSchemes getAllPermissionSchemes(String expand) throws ApiException {
ApiResponse localVarResp = getAllPermissionSchemesWithHttpInfo(expand);
return localVarResp.getData();
}
/**
* Get all permission schemes
* Returns all permission schemes. ### About permission schemes and grants ### A permission scheme is a collection of permission grants. A permission grant consists of a `holder` and a `permission`. #### Holder object #### The `holder` object contains information about the user or group being granted the permission. For example, the *Administer projects* permission is granted to a group named *Teams in space administrators*. In this case, the type is `\"type\": \"group\"`, and the parameter is the group name, `\"parameter\": \"Teams in space administrators\"` and the value is group ID, `\"value\": \"ca85fac0-d974-40ca-a615-7af99c48d24f\"`. The `holder` object is defined by the following properties: * `type` Identifies the user or group (see the list of types below). * `parameter` As a group's name can change, use of `value` is recommended. The value of this property depends on the `type`. For example, if the `type` is a group, then you need to specify the group name. * `value` The value of this property depends on the `type`. If the `type` is a group, then you need to specify the group ID. For other `type` it has the same value as `parameter` The following `types` are available. The expected values for `parameter` and `value` are given in parentheses (some types may not have a `parameter` or `value`): * `anyone` Grant for anonymous users. * `applicationRole` Grant for users with access to the specified application (application name, application name). See [Update product access settings](https://confluence.atlassian.com/x/3YxjL) for more information. * `assignee` Grant for the user currently assigned to an issue. * `group` Grant for the specified group (`parameter` : group name, `value` : group ID). * `groupCustomField` Grant for a user in the group selected in the specified custom field (`parameter` : custom field ID, `value` : custom field ID). * `projectLead` Grant for a project lead. * `projectRole` Grant for the specified project role (`parameter` :project role ID, `value` : project role ID). * `reporter` Grant for the user who reported the issue. * `sd.customer.portal.only` Jira Service Desk only. Grants customers permission to access the customer portal but not Jira. See [Customizing Jira Service Desk permissions](https://confluence.atlassian.com/x/24dKLg) for more information. * `user` Grant for the specified user (`parameter` : user ID - historically this was the userkey but that is deprecated and the account ID should be used, `value` : user ID). * `userCustomField` Grant for a user selected in the specified custom field (`parameter` : custom field ID, `value` : custom field ID). #### Built-in permissions #### The [built-in Jira permissions](https://confluence.atlassian.com/x/yodKLg) are listed below. Apps can also define custom permissions. See the [project permission](https://developer.atlassian.com/cloud/jira/platform/modules/project-permission/) and [global permission](https://developer.atlassian.com/cloud/jira/platform/modules/global-permission/) module documentation for more information. **Project permissions** * `ADMINISTER_PROJECTS` * `BROWSE_PROJECTS` * `MANAGE_SPRINTS_PERMISSION` (Jira Software only) * `SERVICEDESK_AGENT` (Jira Service Desk only) * `VIEW_DEV_TOOLS` (Jira Software only) * `VIEW_READONLY_WORKFLOW` **Issue permissions** * `ASSIGNABLE_USER` * `ASSIGN_ISSUES` * `CLOSE_ISSUES` * `CREATE_ISSUES` * `DELETE_ISSUES` * `EDIT_ISSUES` * `LINK_ISSUES` * `MODIFY_REPORTER` * `MOVE_ISSUES` * `RESOLVE_ISSUES` * `SCHEDULE_ISSUES` * `SET_ISSUE_SECURITY` * `TRANSITION_ISSUES` **Voters and watchers permissions** * `MANAGE_WATCHERS` * `VIEW_VOTERS_AND_WATCHERS` **Comments permissions** * `ADD_COMMENTS` * `DELETE_ALL_COMMENTS` * `DELETE_OWN_COMMENTS` * `EDIT_ALL_COMMENTS` * `EDIT_OWN_COMMENTS` **Attachments permissions** * `CREATE_ATTACHMENTS` * `DELETE_ALL_ATTACHMENTS` * `DELETE_OWN_ATTACHMENTS` **Time tracking permissions** * `DELETE_ALL_WORKLOGS` * `DELETE_OWN_WORKLOGS` * `EDIT_ALL_WORKLOGS` * `EDIT_OWN_WORKLOGS` * `WORK_ON_ISSUES` **[Permissions](#permissions) required:** Permission to access Jira.
* @param expand Use expand 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<PermissionSchemes>
* @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.
-
*/
public ApiResponse getAllPermissionSchemesWithHttpInfo(String expand) throws ApiException {
okhttp3.Call localVarCall = getAllPermissionSchemesValidateBeforeCall(expand, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get all permission schemes (asynchronously)
* Returns all permission schemes. ### About permission schemes and grants ### A permission scheme is a collection of permission grants. A permission grant consists of a `holder` and a `permission`. #### Holder object #### The `holder` object contains information about the user or group being granted the permission. For example, the *Administer projects* permission is granted to a group named *Teams in space administrators*. In this case, the type is `\"type\": \"group\"`, and the parameter is the group name, `\"parameter\": \"Teams in space administrators\"` and the value is group ID, `\"value\": \"ca85fac0-d974-40ca-a615-7af99c48d24f\"`. The `holder` object is defined by the following properties: * `type` Identifies the user or group (see the list of types below). * `parameter` As a group's name can change, use of `value` is recommended. The value of this property depends on the `type`. For example, if the `type` is a group, then you need to specify the group name. * `value` The value of this property depends on the `type`. If the `type` is a group, then you need to specify the group ID. For other `type` it has the same value as `parameter` The following `types` are available. The expected values for `parameter` and `value` are given in parentheses (some types may not have a `parameter` or `value`): * `anyone` Grant for anonymous users. * `applicationRole` Grant for users with access to the specified application (application name, application name). See [Update product access settings](https://confluence.atlassian.com/x/3YxjL) for more information. * `assignee` Grant for the user currently assigned to an issue. * `group` Grant for the specified group (`parameter` : group name, `value` : group ID). * `groupCustomField` Grant for a user in the group selected in the specified custom field (`parameter` : custom field ID, `value` : custom field ID). * `projectLead` Grant for a project lead. * `projectRole` Grant for the specified project role (`parameter` :project role ID, `value` : project role ID). * `reporter` Grant for the user who reported the issue. * `sd.customer.portal.only` Jira Service Desk only. Grants customers permission to access the customer portal but not Jira. See [Customizing Jira Service Desk permissions](https://confluence.atlassian.com/x/24dKLg) for more information. * `user` Grant for the specified user (`parameter` : user ID - historically this was the userkey but that is deprecated and the account ID should be used, `value` : user ID). * `userCustomField` Grant for a user selected in the specified custom field (`parameter` : custom field ID, `value` : custom field ID). #### Built-in permissions #### The [built-in Jira permissions](https://confluence.atlassian.com/x/yodKLg) are listed below. Apps can also define custom permissions. See the [project permission](https://developer.atlassian.com/cloud/jira/platform/modules/project-permission/) and [global permission](https://developer.atlassian.com/cloud/jira/platform/modules/global-permission/) module documentation for more information. **Project permissions** * `ADMINISTER_PROJECTS` * `BROWSE_PROJECTS` * `MANAGE_SPRINTS_PERMISSION` (Jira Software only) * `SERVICEDESK_AGENT` (Jira Service Desk only) * `VIEW_DEV_TOOLS` (Jira Software only) * `VIEW_READONLY_WORKFLOW` **Issue permissions** * `ASSIGNABLE_USER` * `ASSIGN_ISSUES` * `CLOSE_ISSUES` * `CREATE_ISSUES` * `DELETE_ISSUES` * `EDIT_ISSUES` * `LINK_ISSUES` * `MODIFY_REPORTER` * `MOVE_ISSUES` * `RESOLVE_ISSUES` * `SCHEDULE_ISSUES` * `SET_ISSUE_SECURITY` * `TRANSITION_ISSUES` **Voters and watchers permissions** * `MANAGE_WATCHERS` * `VIEW_VOTERS_AND_WATCHERS` **Comments permissions** * `ADD_COMMENTS` * `DELETE_ALL_COMMENTS` * `DELETE_OWN_COMMENTS` * `EDIT_ALL_COMMENTS` * `EDIT_OWN_COMMENTS` **Attachments permissions** * `CREATE_ATTACHMENTS` * `DELETE_ALL_ATTACHMENTS` * `DELETE_OWN_ATTACHMENTS` **Time tracking permissions** * `DELETE_ALL_WORKLOGS` * `DELETE_OWN_WORKLOGS` * `EDIT_ALL_WORKLOGS` * `EDIT_OWN_WORKLOGS` * `WORK_ON_ISSUES` **[Permissions](#permissions) required:** Permission to access Jira.
* @param expand Use expand 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.
-
*/
public okhttp3.Call getAllPermissionSchemesAsync(String expand, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getAllPermissionSchemesValidateBeforeCall(expand, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getPermissionScheme
* @param schemeId The ID of the permission scheme to return. (required)
* @param expand Use expand 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.
-
404
Returned if the permission scheme is not found or the user does not have the necessary permission.
-
*/
public okhttp3.Call getPermissionSchemeCall(Long schemeId, 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/permissionscheme/{schemeId}"
.replace("{" + "schemeId" + "}", localVarApiClient.escapeString(schemeId.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 getPermissionSchemeValidateBeforeCall(Long schemeId, String expand, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'schemeId' is set
if (schemeId == null) {
throw new ApiException("Missing the required parameter 'schemeId' when calling getPermissionScheme(Async)");
}
return getPermissionSchemeCall(schemeId, expand, _callback);
}
/**
* Get permission scheme
* Returns a permission scheme. **[Permissions](#permissions) required:** Permission to access Jira.
* @param schemeId The ID of the permission scheme to return. (required)
* @param expand Use expand 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.
-
404
Returned if the permission scheme is not found or the user does not have the necessary permission.
-
*/
public PermissionScheme getPermissionScheme(Long schemeId, String expand) throws ApiException {
ApiResponse localVarResp = getPermissionSchemeWithHttpInfo(schemeId, expand);
return localVarResp.getData();
}
/**
* Get permission scheme
* Returns a permission scheme. **[Permissions](#permissions) required:** Permission to access Jira.
* @param schemeId The ID of the permission scheme to return. (required)
* @param expand Use expand 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.
-
404
Returned if the permission scheme is not found or the user does not have the necessary permission.
-
*/
public ApiResponse getPermissionSchemeWithHttpInfo(Long schemeId, String expand) throws ApiException {
okhttp3.Call localVarCall = getPermissionSchemeValidateBeforeCall(schemeId, expand, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get permission scheme (asynchronously)
* Returns a permission scheme. **[Permissions](#permissions) required:** Permission to access Jira.
* @param schemeId The ID of the permission scheme to return. (required)
* @param expand Use expand 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.
-
404
Returned if the permission scheme is not found or the user does not have the necessary permission.
-
*/
public okhttp3.Call getPermissionSchemeAsync(Long schemeId, String expand, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPermissionSchemeValidateBeforeCall(schemeId, expand, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getPermissionSchemeGrant
* @param schemeId The ID of the permission scheme. (required)
* @param permissionId The ID of the permission grant. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always 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.
-
404
Returned if the permission scheme or permission grant is not found or the user does not have the necessary permission.
-
*/
public okhttp3.Call getPermissionSchemeGrantCall(Long schemeId, Long permissionId, 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/permissionscheme/{schemeId}/permission/{permissionId}"
.replace("{" + "schemeId" + "}", localVarApiClient.escapeString(schemeId.toString()))
.replace("{" + "permissionId" + "}", localVarApiClient.escapeString(permissionId.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 getPermissionSchemeGrantValidateBeforeCall(Long schemeId, Long permissionId, String expand, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'schemeId' is set
if (schemeId == null) {
throw new ApiException("Missing the required parameter 'schemeId' when calling getPermissionSchemeGrant(Async)");
}
// verify the required parameter 'permissionId' is set
if (permissionId == null) {
throw new ApiException("Missing the required parameter 'permissionId' when calling getPermissionSchemeGrant(Async)");
}
return getPermissionSchemeGrantCall(schemeId, permissionId, expand, _callback);
}
/**
* Get permission scheme grant
* Returns a permission grant. **[Permissions](#permissions) required:** Permission to access Jira.
* @param schemeId The ID of the permission scheme. (required)
* @param permissionId The ID of the permission grant. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always 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 PermissionGrant
* @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 permission scheme or permission grant is not found or the user does not have the necessary permission.
-
*/
public PermissionGrant getPermissionSchemeGrant(Long schemeId, Long permissionId, String expand) throws ApiException {
ApiResponse localVarResp = getPermissionSchemeGrantWithHttpInfo(schemeId, permissionId, expand);
return localVarResp.getData();
}
/**
* Get permission scheme grant
* Returns a permission grant. **[Permissions](#permissions) required:** Permission to access Jira.
* @param schemeId The ID of the permission scheme. (required)
* @param permissionId The ID of the permission grant. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always 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<PermissionGrant>
* @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 permission scheme or permission grant is not found or the user does not have the necessary permission.
-
*/
public ApiResponse getPermissionSchemeGrantWithHttpInfo(Long schemeId, Long permissionId, String expand) throws ApiException {
okhttp3.Call localVarCall = getPermissionSchemeGrantValidateBeforeCall(schemeId, permissionId, expand, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get permission scheme grant (asynchronously)
* Returns a permission grant. **[Permissions](#permissions) required:** Permission to access Jira.
* @param schemeId The ID of the permission scheme. (required)
* @param permissionId The ID of the permission grant. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always 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.
-
404
Returned if the permission scheme or permission grant is not found or the user does not have the necessary permission.
-
*/
public okhttp3.Call getPermissionSchemeGrantAsync(Long schemeId, Long permissionId, String expand, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPermissionSchemeGrantValidateBeforeCall(schemeId, permissionId, expand, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getPermissionSchemeGrants
* @param schemeId The ID of the permission scheme. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: * `permissions` Returns all permission grants for each permission scheme. * `user` Returns information about the user who is granted the permission. * `group` Returns information about the group that is granted the permission. * `projectRole` Returns information about the project role granted the permission. * `field` Returns information about the custom field granted the permission. * `all` Returns all expandable information. (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 permission schemes is not found or the user does not have the necessary permission.
-
*/
public okhttp3.Call getPermissionSchemeGrantsCall(Long schemeId, 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/permissionscheme/{schemeId}/permission"
.replace("{" + "schemeId" + "}", localVarApiClient.escapeString(schemeId.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 getPermissionSchemeGrantsValidateBeforeCall(Long schemeId, String expand, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'schemeId' is set
if (schemeId == null) {
throw new ApiException("Missing the required parameter 'schemeId' when calling getPermissionSchemeGrants(Async)");
}
return getPermissionSchemeGrantsCall(schemeId, expand, _callback);
}
/**
* Get permission scheme grants
* Returns all permission grants for a permission scheme. **[Permissions](#permissions) required:** Permission to access Jira.
* @param schemeId The ID of the permission scheme. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: * `permissions` Returns all permission grants for each permission scheme. * `user` Returns information about the user who is granted the permission. * `group` Returns information about the group that is granted the permission. * `projectRole` Returns information about the project role granted the permission. * `field` Returns information about the custom field granted the permission. * `all` Returns all expandable information. (optional)
* @return PermissionGrants
* @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 permission schemes is not found or the user does not have the necessary permission.
-
*/
public PermissionGrants getPermissionSchemeGrants(Long schemeId, String expand) throws ApiException {
ApiResponse localVarResp = getPermissionSchemeGrantsWithHttpInfo(schemeId, expand);
return localVarResp.getData();
}
/**
* Get permission scheme grants
* Returns all permission grants for a permission scheme. **[Permissions](#permissions) required:** Permission to access Jira.
* @param schemeId The ID of the permission scheme. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: * `permissions` Returns all permission grants for each permission scheme. * `user` Returns information about the user who is granted the permission. * `group` Returns information about the group that is granted the permission. * `projectRole` Returns information about the project role granted the permission. * `field` Returns information about the custom field granted the permission. * `all` Returns all expandable information. (optional)
* @return ApiResponse<PermissionGrants>
* @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 permission schemes is not found or the user does not have the necessary permission.
-
*/
public ApiResponse getPermissionSchemeGrantsWithHttpInfo(Long schemeId, String expand) throws ApiException {
okhttp3.Call localVarCall = getPermissionSchemeGrantsValidateBeforeCall(schemeId, expand, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get permission scheme grants (asynchronously)
* Returns all permission grants for a permission scheme. **[Permissions](#permissions) required:** Permission to access Jira.
* @param schemeId The ID of the permission scheme. (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: * `permissions` Returns all permission grants for each permission scheme. * `user` Returns information about the user who is granted the permission. * `group` Returns information about the group that is granted the permission. * `projectRole` Returns information about the project role granted the permission. * `field` Returns information about the custom field granted the permission. * `all` Returns all expandable information. (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 permission schemes is not found or the user does not have the necessary permission.
-
*/
public okhttp3.Call getPermissionSchemeGrantsAsync(Long schemeId, String expand, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPermissionSchemeGrantsValidateBeforeCall(schemeId, expand, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updatePermissionScheme
* @param schemeId The ID of the permission scheme to update. (required)
* @param requestBody (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always 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 scheme is updated.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if: * the user does not have the necessary permission to update permission schemes. * the Jira instance is Jira Core Free or Jira Software Free. Permission schemes cannot be updated on free plans.
-
404
Returned if the permission scheme is not found.
-
*/
public okhttp3.Call updatePermissionSchemeCall(Long schemeId, Map requestBody, 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 = requestBody;
// create path and map variables
String localVarPath = "/rest/api/3/permissionscheme/{schemeId}"
.replace("{" + "schemeId" + "}", localVarApiClient.escapeString(schemeId.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 updatePermissionSchemeValidateBeforeCall(Long schemeId, Map requestBody, String expand, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'schemeId' is set
if (schemeId == null) {
throw new ApiException("Missing the required parameter 'schemeId' when calling updatePermissionScheme(Async)");
}
// verify the required parameter 'requestBody' is set
if (requestBody == null) {
throw new ApiException("Missing the required parameter 'requestBody' when calling updatePermissionScheme(Async)");
}
return updatePermissionSchemeCall(schemeId, requestBody, expand, _callback);
}
/**
* Update permission scheme
* Updates a permission scheme. Below are some important things to note when using this resource: * If a permissions list is present in the request, then it is set in the permission scheme, overwriting *all existing* grants. * If you want to update only the name and description, then do not send a permissions list in the request. * Sending an empty list will remove all permission grants from the permission scheme. If you want to add or delete a permission grant instead of updating the whole list, see [Create permission grant](#api-rest-api-3-permissionscheme-schemeId-permission-post) or [Delete permission scheme entity](#api-rest-api-3-permissionscheme-schemeId-permission-permissionId-delete). See [About permission schemes and grants](../api-group-permission-schemes/#about-permission-schemes-and-grants) for more details. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param schemeId The ID of the permission scheme to update. (required)
* @param requestBody (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always 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 scheme is updated.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if: * the user does not have the necessary permission to update permission schemes. * the Jira instance is Jira Core Free or Jira Software Free. Permission schemes cannot be updated on free plans.
-
404
Returned if the permission scheme is not found.
-
*/
public PermissionScheme updatePermissionScheme(Long schemeId, Map requestBody, String expand) throws ApiException {
ApiResponse localVarResp = updatePermissionSchemeWithHttpInfo(schemeId, requestBody, expand);
return localVarResp.getData();
}
/**
* Update permission scheme
* Updates a permission scheme. Below are some important things to note when using this resource: * If a permissions list is present in the request, then it is set in the permission scheme, overwriting *all existing* grants. * If you want to update only the name and description, then do not send a permissions list in the request. * Sending an empty list will remove all permission grants from the permission scheme. If you want to add or delete a permission grant instead of updating the whole list, see [Create permission grant](#api-rest-api-3-permissionscheme-schemeId-permission-post) or [Delete permission scheme entity](#api-rest-api-3-permissionscheme-schemeId-permission-permissionId-delete). See [About permission schemes and grants](../api-group-permission-schemes/#about-permission-schemes-and-grants) for more details. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param schemeId The ID of the permission scheme to update. (required)
* @param requestBody (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always 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 scheme is updated.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if: * the user does not have the necessary permission to update permission schemes. * the Jira instance is Jira Core Free or Jira Software Free. Permission schemes cannot be updated on free plans.
-
404
Returned if the permission scheme is not found.
-
*/
public ApiResponse updatePermissionSchemeWithHttpInfo(Long schemeId, Map requestBody, String expand) throws ApiException {
okhttp3.Call localVarCall = updatePermissionSchemeValidateBeforeCall(schemeId, requestBody, expand, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Update permission scheme (asynchronously)
* Updates a permission scheme. Below are some important things to note when using this resource: * If a permissions list is present in the request, then it is set in the permission scheme, overwriting *all existing* grants. * If you want to update only the name and description, then do not send a permissions list in the request. * Sending an empty list will remove all permission grants from the permission scheme. If you want to add or delete a permission grant instead of updating the whole list, see [Create permission grant](#api-rest-api-3-permissionscheme-schemeId-permission-post) or [Delete permission scheme entity](#api-rest-api-3-permissionscheme-schemeId-permission-permissionId-delete). See [About permission schemes and grants](../api-group-permission-schemes/#about-permission-schemes-and-grants) for more details. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param schemeId The ID of the permission scheme to update. (required)
* @param requestBody (required)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always 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 scheme is updated.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if: * the user does not have the necessary permission to update permission schemes. * the Jira instance is Jira Core Free or Jira Software Free. Permission schemes cannot be updated on free plans.
-
404
Returned if the permission scheme is not found.
-
*/
public okhttp3.Call updatePermissionSchemeAsync(Long schemeId, Map requestBody, String expand, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updatePermissionSchemeValidateBeforeCall(schemeId, requestBody, expand, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}