All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.tnb.jira.validation.generated.api.ProjectTypesApi Maven / Gradle / Ivy

The newest version!
/*
 * 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.ProjectType;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ProjectTypesApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public ProjectTypesApi() {
        this(Configuration.getDefaultApiClient());
    }

    public ProjectTypesApi(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 getAccessibleProjectTypeByKey
     * @param projectTypeKey The key of the project type. (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 or missing. -
404 Returned if the project type is not accessible to the user. -
*/ public okhttp3.Call getAccessibleProjectTypeByKeyCall(String projectTypeKey, 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/type/{projectTypeKey}/accessible" .replace("{" + "projectTypeKey" + "}", localVarApiClient.escapeString(projectTypeKey.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 getAccessibleProjectTypeByKeyValidateBeforeCall(String projectTypeKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectTypeKey' is set if (projectTypeKey == null) { throw new ApiException("Missing the required parameter 'projectTypeKey' when calling getAccessibleProjectTypeByKey(Async)"); } return getAccessibleProjectTypeByKeyCall(projectTypeKey, _callback); } /** * Get accessible project type by key * Returns a [project type](https://confluence.atlassian.com/x/Var1Nw) if it is accessible to the user. **[Permissions](#permissions) required:** Permission to access Jira. * @param projectTypeKey The key of the project type. (required) * @return ProjectType * @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 project type is not accessible to the user. -
*/ public ProjectType getAccessibleProjectTypeByKey(String projectTypeKey) throws ApiException { ApiResponse localVarResp = getAccessibleProjectTypeByKeyWithHttpInfo(projectTypeKey); return localVarResp.getData(); } /** * Get accessible project type by key * Returns a [project type](https://confluence.atlassian.com/x/Var1Nw) if it is accessible to the user. **[Permissions](#permissions) required:** Permission to access Jira. * @param projectTypeKey The key of the project type. (required) * @return ApiResponse<ProjectType> * @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 project type is not accessible to the user. -
*/ public ApiResponse getAccessibleProjectTypeByKeyWithHttpInfo(String projectTypeKey) throws ApiException { okhttp3.Call localVarCall = getAccessibleProjectTypeByKeyValidateBeforeCall(projectTypeKey, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get accessible project type by key (asynchronously) * Returns a [project type](https://confluence.atlassian.com/x/Var1Nw) if it is accessible to the user. **[Permissions](#permissions) required:** Permission to access Jira. * @param projectTypeKey The key of the project type. (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 or missing. -
404 Returned if the project type is not accessible to the user. -
*/ public okhttp3.Call getAccessibleProjectTypeByKeyAsync(String projectTypeKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAccessibleProjectTypeByKeyValidateBeforeCall(projectTypeKey, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getAllAccessibleProjectTypes * @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. -
*/ public okhttp3.Call getAllAccessibleProjectTypesCall(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/type/accessible"; 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 getAllAccessibleProjectTypesValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getAllAccessibleProjectTypesCall(_callback); } /** * Get licensed project types * Returns all [project types](https://confluence.atlassian.com/x/Var1Nw) with a valid license. * @return List<ProjectType> * @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. -
*/ public List getAllAccessibleProjectTypes() throws ApiException { ApiResponse> localVarResp = getAllAccessibleProjectTypesWithHttpInfo(); return localVarResp.getData(); } /** * Get licensed project types * Returns all [project types](https://confluence.atlassian.com/x/Var1Nw) with a valid license. * @return ApiResponse<List<ProjectType>> * @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. -
*/ public ApiResponse> getAllAccessibleProjectTypesWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getAllAccessibleProjectTypesValidateBeforeCall(null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get licensed project types (asynchronously) * Returns all [project types](https://confluence.atlassian.com/x/Var1Nw) with a valid license. * @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. -
*/ public okhttp3.Call getAllAccessibleProjectTypesAsync(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getAllAccessibleProjectTypesValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getAllProjectTypes * @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. -
*/ public okhttp3.Call getAllProjectTypesCall(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/type"; 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 getAllProjectTypesValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getAllProjectTypesCall(_callback); } /** * Get all project types * Returns all [project types](https://confluence.atlassian.com/x/Var1Nw), whether or not the instance has a valid license for each type. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @return List<ProjectType> * @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. -
*/ public List getAllProjectTypes() throws ApiException { ApiResponse> localVarResp = getAllProjectTypesWithHttpInfo(); return localVarResp.getData(); } /** * Get all project types * Returns all [project types](https://confluence.atlassian.com/x/Var1Nw), whether or not the instance has a valid license for each type. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @return ApiResponse<List<ProjectType>> * @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. -
*/ public ApiResponse> getAllProjectTypesWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getAllProjectTypesValidateBeforeCall(null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get all project types (asynchronously) * Returns all [project types](https://confluence.atlassian.com/x/Var1Nw), whether or not the instance has a valid license for each type. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @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. -
*/ public okhttp3.Call getAllProjectTypesAsync(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getAllProjectTypesValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getProjectTypeByKey * @param projectTypeKey The key of the project type. (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 project type is not found. -
*/ public okhttp3.Call getProjectTypeByKeyCall(String projectTypeKey, 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/type/{projectTypeKey}" .replace("{" + "projectTypeKey" + "}", localVarApiClient.escapeString(projectTypeKey.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 getProjectTypeByKeyValidateBeforeCall(String projectTypeKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectTypeKey' is set if (projectTypeKey == null) { throw new ApiException("Missing the required parameter 'projectTypeKey' when calling getProjectTypeByKey(Async)"); } return getProjectTypeByKeyCall(projectTypeKey, _callback); } /** * Get project type by key * Returns a [project type](https://confluence.atlassian.com/x/Var1Nw). This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param projectTypeKey The key of the project type. (required) * @return ProjectType * @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 project type is not found. -
*/ public ProjectType getProjectTypeByKey(String projectTypeKey) throws ApiException { ApiResponse localVarResp = getProjectTypeByKeyWithHttpInfo(projectTypeKey); return localVarResp.getData(); } /** * Get project type by key * Returns a [project type](https://confluence.atlassian.com/x/Var1Nw). This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param projectTypeKey The key of the project type. (required) * @return ApiResponse<ProjectType> * @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 project type is not found. -
*/ public ApiResponse getProjectTypeByKeyWithHttpInfo(String projectTypeKey) throws ApiException { okhttp3.Call localVarCall = getProjectTypeByKeyValidateBeforeCall(projectTypeKey, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get project type by key (asynchronously) * Returns a [project type](https://confluence.atlassian.com/x/Var1Nw). This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param projectTypeKey The key of the project type. (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 project type is not found. -
*/ public okhttp3.Call getProjectTypeByKeyAsync(String projectTypeKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getProjectTypeByKeyValidateBeforeCall(projectTypeKey, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy