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.TimeTrackingConfiguration;
import software.tnb.jira.validation.generated.model.TimeTrackingProvider;
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 TimeTrackingApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public TimeTrackingApi() {
this(Configuration.getDefaultApiClient());
}
public TimeTrackingApi(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 getAvailableTimeTrackingImplementations
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public okhttp3.Call getAvailableTimeTrackingImplementationsCall(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/configuration/timetracking/list";
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 getAvailableTimeTrackingImplementationsValidateBeforeCall(final ApiCallback _callback) throws ApiException {
return getAvailableTimeTrackingImplementationsCall(_callback);
}
/**
* Get all time tracking providers
* Returns all time tracking providers. By default, Jira only has one time tracking provider: *JIRA provided time tracking*. However, you can install other time tracking providers via apps from the Atlassian Marketplace. For more information on time tracking providers, see the documentation for the [ Time Tracking Provider](https://developer.atlassian.com/cloud/jira/platform/modules/time-tracking-provider/) module. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @return List<TimeTrackingProvider>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public List getAvailableTimeTrackingImplementations() throws ApiException {
ApiResponse> localVarResp = getAvailableTimeTrackingImplementationsWithHttpInfo();
return localVarResp.getData();
}
/**
* Get all time tracking providers
* Returns all time tracking providers. By default, Jira only has one time tracking provider: *JIRA provided time tracking*. However, you can install other time tracking providers via apps from the Atlassian Marketplace. For more information on time tracking providers, see the documentation for the [ Time Tracking Provider](https://developer.atlassian.com/cloud/jira/platform/modules/time-tracking-provider/) module. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @return ApiResponse<List<TimeTrackingProvider>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public ApiResponse> getAvailableTimeTrackingImplementationsWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getAvailableTimeTrackingImplementationsValidateBeforeCall(null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get all time tracking providers (asynchronously)
* Returns all time tracking providers. By default, Jira only has one time tracking provider: *JIRA provided time tracking*. However, you can install other time tracking providers via apps from the Atlassian Marketplace. For more information on time tracking providers, see the documentation for the [ Time Tracking Provider](https://developer.atlassian.com/cloud/jira/platform/modules/time-tracking-provider/) module. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public okhttp3.Call getAvailableTimeTrackingImplementationsAsync(final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getAvailableTimeTrackingImplementationsValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSelectedTimeTrackingImplementation
* @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 and time tracking is enabled.
-
204
Returned if the request is successful but time tracking is disabled.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public okhttp3.Call getSelectedTimeTrackingImplementationCall(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/configuration/timetracking";
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 getSelectedTimeTrackingImplementationValidateBeforeCall(final ApiCallback _callback) throws ApiException {
return getSelectedTimeTrackingImplementationCall(_callback);
}
/**
* Get selected time tracking provider
* Returns the time tracking provider that is currently selected. Note that if time tracking is disabled, then a successful but empty response is returned. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @return TimeTrackingProvider
* @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 and time tracking is enabled.
-
204
Returned if the request is successful but time tracking is disabled.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public TimeTrackingProvider getSelectedTimeTrackingImplementation() throws ApiException {
ApiResponse localVarResp = getSelectedTimeTrackingImplementationWithHttpInfo();
return localVarResp.getData();
}
/**
* Get selected time tracking provider
* Returns the time tracking provider that is currently selected. Note that if time tracking is disabled, then a successful but empty response is returned. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @return ApiResponse<TimeTrackingProvider>
* @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 and time tracking is enabled.
-
204
Returned if the request is successful but time tracking is disabled.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public ApiResponse getSelectedTimeTrackingImplementationWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getSelectedTimeTrackingImplementationValidateBeforeCall(null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get selected time tracking provider (asynchronously)
* Returns the time tracking provider that is currently selected. Note that if time tracking is disabled, then a successful but empty response is returned. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @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 and time tracking is enabled.
-
204
Returned if the request is successful but time tracking is disabled.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public okhttp3.Call getSelectedTimeTrackingImplementationAsync(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSelectedTimeTrackingImplementationValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSharedTimeTrackingConfiguration
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public okhttp3.Call getSharedTimeTrackingConfigurationCall(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/configuration/timetracking/options";
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 getSharedTimeTrackingConfigurationValidateBeforeCall(final ApiCallback _callback) throws ApiException {
return getSharedTimeTrackingConfigurationCall(_callback);
}
/**
* Get time tracking settings
* Returns the time tracking settings. This includes settings such as the time format, default time unit, and others. For more information, see [Configuring time tracking](https://confluence.atlassian.com/x/qoXKM). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @return TimeTrackingConfiguration
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public TimeTrackingConfiguration getSharedTimeTrackingConfiguration() throws ApiException {
ApiResponse localVarResp = getSharedTimeTrackingConfigurationWithHttpInfo();
return localVarResp.getData();
}
/**
* Get time tracking settings
* Returns the time tracking settings. This includes settings such as the time format, default time unit, and others. For more information, see [Configuring time tracking](https://confluence.atlassian.com/x/qoXKM). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @return ApiResponse<TimeTrackingConfiguration>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public ApiResponse getSharedTimeTrackingConfigurationWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getSharedTimeTrackingConfigurationValidateBeforeCall(null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get time tracking settings (asynchronously)
* Returns the time tracking settings. This includes settings such as the time format, default time unit, and others. For more information, see [Configuring time tracking](https://confluence.atlassian.com/x/qoXKM). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission.
-
*/
public okhttp3.Call getSharedTimeTrackingConfigurationAsync(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSharedTimeTrackingConfigurationValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for selectTimeTrackingImplementation
* @param timeTrackingProvider (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 request is successful.
-
400
Returned if the time tracking provider 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 selectTimeTrackingImplementationCall(TimeTrackingProvider timeTrackingProvider, 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 = timeTrackingProvider;
// create path and map variables
String localVarPath = "/rest/api/3/configuration/timetracking";
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 selectTimeTrackingImplementationValidateBeforeCall(TimeTrackingProvider timeTrackingProvider, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'timeTrackingProvider' is set
if (timeTrackingProvider == null) {
throw new ApiException("Missing the required parameter 'timeTrackingProvider' when calling selectTimeTrackingImplementation(Async)");
}
return selectTimeTrackingImplementationCall(timeTrackingProvider, _callback);
}
/**
* Select time tracking provider
* Selects a time tracking provider. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param timeTrackingProvider (required)
* @return Object
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the request is successful.
-
400
Returned if the time tracking provider 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 Object selectTimeTrackingImplementation(TimeTrackingProvider timeTrackingProvider) throws ApiException {
ApiResponse