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.ContainerForProjectFeatures;
import software.tnb.jira.validation.generated.model.ProjectFeatureState;
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 ProjectFeaturesApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public ProjectFeaturesApi() {
this(Configuration.getDefaultApiClient());
}
public ProjectFeaturesApi(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 getFeaturesForProject
* @param projectIdOrKey The ID or (case-sensitive) key of the project. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the required permissions.
-
404
Returned if the project is not found.
-
*/
public okhttp3.Call getFeaturesForProjectCall(String projectIdOrKey, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/rest/api/3/project/{projectIdOrKey}/features"
.replace("{" + "projectIdOrKey" + "}", localVarApiClient.escapeString(projectIdOrKey.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getFeaturesForProjectValidateBeforeCall(String projectIdOrKey, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'projectIdOrKey' is set
if (projectIdOrKey == null) {
throw new ApiException("Missing the required parameter 'projectIdOrKey' when calling getFeaturesForProject(Async)");
}
return getFeaturesForProjectCall(projectIdOrKey, _callback);
}
/**
* Get project features
* Returns the list of features for a project.
* @param projectIdOrKey The ID or (case-sensitive) key of the project. (required)
* @return ContainerForProjectFeatures
* @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 required permissions.
-
404
Returned if the project is not found.
-
*/
public ContainerForProjectFeatures getFeaturesForProject(String projectIdOrKey) throws ApiException {
ApiResponse localVarResp = getFeaturesForProjectWithHttpInfo(projectIdOrKey);
return localVarResp.getData();
}
/**
* Get project features
* Returns the list of features for a project.
* @param projectIdOrKey The ID or (case-sensitive) key of the project. (required)
* @return ApiResponse<ContainerForProjectFeatures>
* @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 required permissions.
-
404
Returned if the project is not found.
-
*/
public ApiResponse getFeaturesForProjectWithHttpInfo(String projectIdOrKey) throws ApiException {
okhttp3.Call localVarCall = getFeaturesForProjectValidateBeforeCall(projectIdOrKey, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get project features (asynchronously)
* Returns the list of features for a project.
* @param projectIdOrKey The ID or (case-sensitive) key of the project. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the required permissions.
-
404
Returned if the project is not found.
-
*/
public okhttp3.Call getFeaturesForProjectAsync(String projectIdOrKey, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getFeaturesForProjectValidateBeforeCall(projectIdOrKey, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for toggleFeatureForProject
* @param projectIdOrKey The ID or (case-sensitive) key of the project. (required)
* @param featureKey The key of the feature. (required)
* @param projectFeatureState Details of the feature state change. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the required permissions.
-
404
Returned if the project or project feature is not found.
-
*/
public okhttp3.Call toggleFeatureForProjectCall(String projectIdOrKey, String featureKey, ProjectFeatureState projectFeatureState, 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 = projectFeatureState;
// create path and map variables
String localVarPath = "/rest/api/3/project/{projectIdOrKey}/features/{featureKey}"
.replace("{" + "projectIdOrKey" + "}", localVarApiClient.escapeString(projectIdOrKey.toString()))
.replace("{" + "featureKey" + "}", localVarApiClient.escapeString(featureKey.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call toggleFeatureForProjectValidateBeforeCall(String projectIdOrKey, String featureKey, ProjectFeatureState projectFeatureState, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'projectIdOrKey' is set
if (projectIdOrKey == null) {
throw new ApiException("Missing the required parameter 'projectIdOrKey' when calling toggleFeatureForProject(Async)");
}
// verify the required parameter 'featureKey' is set
if (featureKey == null) {
throw new ApiException("Missing the required parameter 'featureKey' when calling toggleFeatureForProject(Async)");
}
// verify the required parameter 'projectFeatureState' is set
if (projectFeatureState == null) {
throw new ApiException("Missing the required parameter 'projectFeatureState' when calling toggleFeatureForProject(Async)");
}
return toggleFeatureForProjectCall(projectIdOrKey, featureKey, projectFeatureState, _callback);
}
/**
* Set project feature state
* Sets the state of a project feature.
* @param projectIdOrKey The ID or (case-sensitive) key of the project. (required)
* @param featureKey The key of the feature. (required)
* @param projectFeatureState Details of the feature state change. (required)
* @return ContainerForProjectFeatures
* @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 required permissions.
-
404
Returned if the project or project feature is not found.
-
*/
public ContainerForProjectFeatures toggleFeatureForProject(String projectIdOrKey, String featureKey, ProjectFeatureState projectFeatureState) throws ApiException {
ApiResponse localVarResp = toggleFeatureForProjectWithHttpInfo(projectIdOrKey, featureKey, projectFeatureState);
return localVarResp.getData();
}
/**
* Set project feature state
* Sets the state of a project feature.
* @param projectIdOrKey The ID or (case-sensitive) key of the project. (required)
* @param featureKey The key of the feature. (required)
* @param projectFeatureState Details of the feature state change. (required)
* @return ApiResponse<ContainerForProjectFeatures>
* @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 required permissions.
-
404
Returned if the project or project feature is not found.
-
*/
public ApiResponse toggleFeatureForProjectWithHttpInfo(String projectIdOrKey, String featureKey, ProjectFeatureState projectFeatureState) throws ApiException {
okhttp3.Call localVarCall = toggleFeatureForProjectValidateBeforeCall(projectIdOrKey, featureKey, projectFeatureState, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Set project feature state (asynchronously)
* Sets the state of a project feature.
* @param projectIdOrKey The ID or (case-sensitive) key of the project. (required)
* @param featureKey The key of the feature. (required)
* @param projectFeatureState Details of the feature state change. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
400
Returned if the request is not valid.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the required permissions.
-
404
Returned if the project or project feature is not found.
-
*/
public okhttp3.Call toggleFeatureForProjectAsync(String projectIdOrKey, String featureKey, ProjectFeatureState projectFeatureState, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = toggleFeatureForProjectValidateBeforeCall(projectIdOrKey, featureKey, projectFeatureState, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}