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.PageBeanIssueSecurityLevelMember;
import software.tnb.jira.validation.generated.model.SecurityLevel;
import java.util.Set;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class IssueSecurityLevelApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public IssueSecurityLevelApi() {
this(Configuration.getDefaultApiClient());
}
public IssueSecurityLevelApi(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 getIssueSecurityLevel
* @param id The ID of the issue security level. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect.
-
404
Returned if the issue security level is not found.
-
*/
public okhttp3.Call getIssueSecurityLevelCall(String id, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/rest/api/3/securitylevel/{id}"
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getIssueSecurityLevelValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling getIssueSecurityLevel(Async)");
}
return getIssueSecurityLevelCall(id, _callback);
}
/**
* Get issue security level
* Returns details of an issue security level. Use [Get issue security scheme](#api-rest-api-3-issuesecurityschemes-id-get) to obtain the IDs of issue security levels associated with the issue security scheme. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None.
* @param id The ID of the issue security level. (required)
* @return SecurityLevel
* @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.
-
404
Returned if the issue security level is not found.
-
*/
public SecurityLevel getIssueSecurityLevel(String id) throws ApiException {
ApiResponse localVarResp = getIssueSecurityLevelWithHttpInfo(id);
return localVarResp.getData();
}
/**
* Get issue security level
* Returns details of an issue security level. Use [Get issue security scheme](#api-rest-api-3-issuesecurityschemes-id-get) to obtain the IDs of issue security levels associated with the issue security scheme. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None.
* @param id The ID of the issue security level. (required)
* @return ApiResponse<SecurityLevel>
* @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.
-
404
Returned if the issue security level is not found.
-
*/
public ApiResponse getIssueSecurityLevelWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = getIssueSecurityLevelValidateBeforeCall(id, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get issue security level (asynchronously)
* Returns details of an issue security level. Use [Get issue security scheme](#api-rest-api-3-issuesecurityschemes-id-get) to obtain the IDs of issue security levels associated with the issue security scheme. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None.
* @param id The ID of the issue security level. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect.
-
404
Returned if the issue security level is not found.
-
*/
public okhttp3.Call getIssueSecurityLevelAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getIssueSecurityLevelValidateBeforeCall(id, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getIssueSecurityLevelMembers
* @param issueSecuritySchemeId The ID of the issue security scheme. Use the [Get issue security schemes](#api-rest-api-3-issuesecurityschemes-get) operation to get a list of issue security scheme IDs. (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @param issueSecurityLevelId The list of issue security level IDs. To include multiple issue security levels separate IDs with ampersand: `issueSecurityLevelId=10000&issueSecurityLevelId=10001`. (optional)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. 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. * `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.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
404
Returned if no issue security level members are found.
-
*/
public okhttp3.Call getIssueSecurityLevelMembersCall(Long issueSecuritySchemeId, Long startAt, Integer maxResults, Set issueSecurityLevelId, 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/issuesecurityschemes/{issueSecuritySchemeId}/members"
.replace("{" + "issueSecuritySchemeId" + "}", localVarApiClient.escapeString(issueSecuritySchemeId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (startAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAt", startAt));
}
if (maxResults != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxResults", maxResults));
}
if (issueSecurityLevelId != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "issueSecurityLevelId", issueSecurityLevelId));
}
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 getIssueSecurityLevelMembersValidateBeforeCall(Long issueSecuritySchemeId, Long startAt, Integer maxResults, Set issueSecurityLevelId, String expand, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'issueSecuritySchemeId' is set
if (issueSecuritySchemeId == null) {
throw new ApiException("Missing the required parameter 'issueSecuritySchemeId' when calling getIssueSecurityLevelMembers(Async)");
}
return getIssueSecurityLevelMembersCall(issueSecuritySchemeId, startAt, maxResults, issueSecurityLevelId, expand, _callback);
}
/**
* Get issue security level members
* Returns issue security level members. Only issue security level members in context of classic projects are returned. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param issueSecuritySchemeId The ID of the issue security scheme. Use the [Get issue security schemes](#api-rest-api-3-issuesecurityschemes-get) operation to get a list of issue security scheme IDs. (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @param issueSecurityLevelId The list of issue security level IDs. To include multiple issue security levels separate IDs with ampersand: `issueSecurityLevelId=10000&issueSecurityLevelId=10001`. (optional)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. 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. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission. (optional)
* @return PageBeanIssueSecurityLevelMember
* @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 not valid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
404
Returned if no issue security level members are found.
-
*/
public PageBeanIssueSecurityLevelMember getIssueSecurityLevelMembers(Long issueSecuritySchemeId, Long startAt, Integer maxResults, Set issueSecurityLevelId, String expand) throws ApiException {
ApiResponse localVarResp = getIssueSecurityLevelMembersWithHttpInfo(issueSecuritySchemeId, startAt, maxResults, issueSecurityLevelId, expand);
return localVarResp.getData();
}
/**
* Get issue security level members
* Returns issue security level members. Only issue security level members in context of classic projects are returned. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param issueSecuritySchemeId The ID of the issue security scheme. Use the [Get issue security schemes](#api-rest-api-3-issuesecurityschemes-get) operation to get a list of issue security scheme IDs. (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @param issueSecurityLevelId The list of issue security level IDs. To include multiple issue security levels separate IDs with ampersand: `issueSecurityLevelId=10000&issueSecurityLevelId=10001`. (optional)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. 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. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission. (optional)
* @return ApiResponse<PageBeanIssueSecurityLevelMember>
* @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 not valid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
404
Returned if no issue security level members are found.
-
*/
public ApiResponse getIssueSecurityLevelMembersWithHttpInfo(Long issueSecuritySchemeId, Long startAt, Integer maxResults, Set issueSecurityLevelId, String expand) throws ApiException {
okhttp3.Call localVarCall = getIssueSecurityLevelMembersValidateBeforeCall(issueSecuritySchemeId, startAt, maxResults, issueSecurityLevelId, expand, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get issue security level members (asynchronously)
* Returns issue security level members. Only issue security level members in context of classic projects are returned. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param issueSecuritySchemeId The ID of the issue security scheme. Use the [Get issue security schemes](#api-rest-api-3-issuesecurityschemes-get) operation to get a list of issue security scheme IDs. (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @param issueSecurityLevelId The list of issue security level IDs. To include multiple issue security levels separate IDs with ampersand: `issueSecurityLevelId=10000&issueSecurityLevelId=10001`. (optional)
* @param expand Use expand to include additional information in the response. This parameter accepts a comma-separated list. 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. * `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.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
404
Returned if no issue security level members are found.
-
*/
public okhttp3.Call getIssueSecurityLevelMembersAsync(Long issueSecuritySchemeId, Long startAt, Integer maxResults, Set issueSecurityLevelId, String expand, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getIssueSecurityLevelMembersValidateBeforeCall(issueSecuritySchemeId, startAt, maxResults, issueSecurityLevelId, expand, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}