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

software.tnb.jira.validation.generated.api.ScreensApi 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.PageBeanScreen;
import software.tnb.jira.validation.generated.model.PageBeanScreenWithTab;
import software.tnb.jira.validation.generated.model.Screen;
import software.tnb.jira.validation.generated.model.ScreenDetails;
import software.tnb.jira.validation.generated.model.ScreenableField;
import java.util.Set;
import software.tnb.jira.validation.generated.model.UpdateScreenDetails;

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

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

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

    public ScreensApi(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 addFieldToDefaultScreen
     * @param fieldId The ID of the field. (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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the field it not found or the field is already present. -
*/ public okhttp3.Call addFieldToDefaultScreenCall(String fieldId, 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/screens/addToDefault/{fieldId}" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addFieldToDefaultScreenValidateBeforeCall(String fieldId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling addFieldToDefaultScreen(Async)"); } return addFieldToDefaultScreenCall(fieldId, _callback); } /** * Add field to default screen * Adds a field to the default tab of the default screen. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the field. (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
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. -
404 Returned if the field it not found or the field is already present. -
*/ public Object addFieldToDefaultScreen(String fieldId) throws ApiException { ApiResponse localVarResp = addFieldToDefaultScreenWithHttpInfo(fieldId); return localVarResp.getData(); } /** * Add field to default screen * Adds a field to the default tab of the default screen. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the field. (required) * @return ApiResponse<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
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. -
404 Returned if the field it not found or the field is already present. -
*/ public ApiResponse addFieldToDefaultScreenWithHttpInfo(String fieldId) throws ApiException { okhttp3.Call localVarCall = addFieldToDefaultScreenValidateBeforeCall(fieldId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add field to default screen (asynchronously) * Adds a field to the default tab of the default screen. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the field. (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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the field it not found or the field is already present. -
*/ public okhttp3.Call addFieldToDefaultScreenAsync(String fieldId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addFieldToDefaultScreenValidateBeforeCall(fieldId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createScreen * @param screenDetails (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
201 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. -
*/ public okhttp3.Call createScreenCall(ScreenDetails screenDetails, 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 = screenDetails; // create path and map variables String localVarPath = "/rest/api/3/screens"; 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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createScreenValidateBeforeCall(ScreenDetails screenDetails, final ApiCallback _callback) throws ApiException { // verify the required parameter 'screenDetails' is set if (screenDetails == null) { throw new ApiException("Missing the required parameter 'screenDetails' when calling createScreen(Async)"); } return createScreenCall(screenDetails, _callback); } /** * Create screen * Creates a screen with a default field tab. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param screenDetails (required) * @return Screen * @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 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. -
*/ public Screen createScreen(ScreenDetails screenDetails) throws ApiException { ApiResponse localVarResp = createScreenWithHttpInfo(screenDetails); return localVarResp.getData(); } /** * Create screen * Creates a screen with a default field tab. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param screenDetails (required) * @return ApiResponse<Screen> * @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 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. -
*/ public ApiResponse createScreenWithHttpInfo(ScreenDetails screenDetails) throws ApiException { okhttp3.Call localVarCall = createScreenValidateBeforeCall(screenDetails, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create screen (asynchronously) * Creates a screen with a default field tab. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param screenDetails (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
201 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. -
*/ public okhttp3.Call createScreenAsync(ScreenDetails screenDetails, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createScreenValidateBeforeCall(screenDetails, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteScreen * @param screenId The ID of the screen. (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 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 the screen is not found. -
*/ public okhttp3.Call deleteScreenCall(Long screenId, 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/screens/{screenId}" .replace("{" + "screenId" + "}", localVarApiClient.escapeString(screenId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteScreenValidateBeforeCall(Long screenId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'screenId' is set if (screenId == null) { throw new ApiException("Missing the required parameter 'screenId' when calling deleteScreen(Async)"); } return deleteScreenCall(screenId, _callback); } /** * Delete screen * Deletes a screen. A screen cannot be deleted if it is used in a screen scheme, workflow, or workflow draft. Only screens used in classic projects can be deleted. * @param screenId The ID of the screen. (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 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 the screen is not found. -
*/ public void deleteScreen(Long screenId) throws ApiException { deleteScreenWithHttpInfo(screenId); } /** * Delete screen * Deletes a screen. A screen cannot be deleted if it is used in a screen scheme, workflow, or workflow draft. Only screens used in classic projects can be deleted. * @param screenId The ID of the screen. (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 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 the screen is not found. -
*/ public ApiResponse deleteScreenWithHttpInfo(Long screenId) throws ApiException { okhttp3.Call localVarCall = deleteScreenValidateBeforeCall(screenId, null); return localVarApiClient.execute(localVarCall); } /** * Delete screen (asynchronously) * Deletes a screen. A screen cannot be deleted if it is used in a screen scheme, workflow, or workflow draft. Only screens used in classic projects can be deleted. * @param screenId The ID of the screen. (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 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 the screen is not found. -
*/ public okhttp3.Call deleteScreenAsync(Long screenId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteScreenValidateBeforeCall(screenId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getAvailableScreenFields * @param screenId The ID of the screen. (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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the screen is not found. -
*/ public okhttp3.Call getAvailableScreenFieldsCall(Long screenId, 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/screens/{screenId}/availableFields" .replace("{" + "screenId" + "}", localVarApiClient.escapeString(screenId.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 getAvailableScreenFieldsValidateBeforeCall(Long screenId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'screenId' is set if (screenId == null) { throw new ApiException("Missing the required parameter 'screenId' when calling getAvailableScreenFields(Async)"); } return getAvailableScreenFieldsCall(screenId, _callback); } /** * Get available screen fields * Returns the fields that can be added to a tab on a screen. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param screenId The ID of the screen. (required) * @return List<ScreenableField> * @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. -
404 Returned if the screen is not found. -
*/ public List getAvailableScreenFields(Long screenId) throws ApiException { ApiResponse> localVarResp = getAvailableScreenFieldsWithHttpInfo(screenId); return localVarResp.getData(); } /** * Get available screen fields * Returns the fields that can be added to a tab on a screen. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param screenId The ID of the screen. (required) * @return ApiResponse<List<ScreenableField>> * @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. -
404 Returned if the screen is not found. -
*/ public ApiResponse> getAvailableScreenFieldsWithHttpInfo(Long screenId) throws ApiException { okhttp3.Call localVarCall = getAvailableScreenFieldsValidateBeforeCall(screenId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get available screen fields (asynchronously) * Returns the fields that can be added to a tab on a screen. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param screenId The ID of the screen. (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. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the screen is not found. -
*/ public okhttp3.Call getAvailableScreenFieldsAsync(Long screenId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getAvailableScreenFieldsValidateBeforeCall(screenId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getScreens * @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 100) * @param id The list of screen IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=10000&id=10001`. (optional) * @param queryString String used to perform a case-insensitive partial match with screen name. (optional, default to ) * @param scope The scope filter string. To filter by multiple scope, provide an ampersand-separated list. For example, `scope=GLOBAL&scope=PROJECT`. (optional) * @param orderBy [Order](#ordering) the results by a field: * `id` Sorts by screen ID. * `name` Sorts by screen name. (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. -
403 Returned if the user does not have the necessary permission. -
*/ public okhttp3.Call getScreensCall(Long startAt, Integer maxResults, Set id, String queryString, Set scope, String orderBy, 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/screens"; 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 (id != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "id", id)); } if (queryString != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("queryString", queryString)); } if (scope != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "scope", scope)); } if (orderBy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderBy", orderBy)); } 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 getScreensValidateBeforeCall(Long startAt, Integer maxResults, Set id, String queryString, Set scope, String orderBy, final ApiCallback _callback) throws ApiException { return getScreensCall(startAt, maxResults, id, queryString, scope, orderBy, _callback); } /** * Get screens * Returns a [paginated](#pagination) list of all screens or those specified by one or more screen IDs. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @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 100) * @param id The list of screen IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=10000&id=10001`. (optional) * @param queryString String used to perform a case-insensitive partial match with screen name. (optional, default to ) * @param scope The scope filter string. To filter by multiple scope, provide an ampersand-separated list. For example, `scope=GLOBAL&scope=PROJECT`. (optional) * @param orderBy [Order](#ordering) the results by a field: * `id` Sorts by screen ID. * `name` Sorts by screen name. (optional) * @return PageBeanScreen * @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 PageBeanScreen getScreens(Long startAt, Integer maxResults, Set id, String queryString, Set scope, String orderBy) throws ApiException { ApiResponse localVarResp = getScreensWithHttpInfo(startAt, maxResults, id, queryString, scope, orderBy); return localVarResp.getData(); } /** * Get screens * Returns a [paginated](#pagination) list of all screens or those specified by one or more screen IDs. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @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 100) * @param id The list of screen IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=10000&id=10001`. (optional) * @param queryString String used to perform a case-insensitive partial match with screen name. (optional, default to ) * @param scope The scope filter string. To filter by multiple scope, provide an ampersand-separated list. For example, `scope=GLOBAL&scope=PROJECT`. (optional) * @param orderBy [Order](#ordering) the results by a field: * `id` Sorts by screen ID. * `name` Sorts by screen name. (optional) * @return ApiResponse<PageBeanScreen> * @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 getScreensWithHttpInfo(Long startAt, Integer maxResults, Set id, String queryString, Set scope, String orderBy) throws ApiException { okhttp3.Call localVarCall = getScreensValidateBeforeCall(startAt, maxResults, id, queryString, scope, orderBy, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get screens (asynchronously) * Returns a [paginated](#pagination) list of all screens or those specified by one or more screen IDs. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @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 100) * @param id The list of screen IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=10000&id=10001`. (optional) * @param queryString String used to perform a case-insensitive partial match with screen name. (optional, default to ) * @param scope The scope filter string. To filter by multiple scope, provide an ampersand-separated list. For example, `scope=GLOBAL&scope=PROJECT`. (optional) * @param orderBy [Order](#ordering) the results by a field: * `id` Sorts by screen ID. * `name` Sorts by screen name. (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. -
403 Returned if the user does not have the necessary permission. -
*/ public okhttp3.Call getScreensAsync(Long startAt, Integer maxResults, Set id, String queryString, Set scope, String orderBy, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getScreensValidateBeforeCall(startAt, maxResults, id, queryString, scope, orderBy, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getScreensForField * @param fieldId The ID of the field to return screens for. (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 100) * @param expand Use [expand](#expansion) to include additional information about screens in the response. This parameter accepts `tab` which returns details about the screen tabs the field is used in. (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. -
403 Returned if the user does not have the necessary permission. -
*/ public okhttp3.Call getScreensForFieldCall(String fieldId, Long startAt, Integer maxResults, 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/field/{fieldId}/screens" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.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 (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 getScreensForFieldValidateBeforeCall(String fieldId, Long startAt, Integer maxResults, String expand, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling getScreensForField(Async)"); } return getScreensForFieldCall(fieldId, startAt, maxResults, expand, _callback); } /** * Get screens for a field * Returns a [paginated](#pagination) list of the screens a field is used in. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the field to return screens for. (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 100) * @param expand Use [expand](#expansion) to include additional information about screens in the response. This parameter accepts `tab` which returns details about the screen tabs the field is used in. (optional) * @return PageBeanScreenWithTab * @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 PageBeanScreenWithTab getScreensForField(String fieldId, Long startAt, Integer maxResults, String expand) throws ApiException { ApiResponse localVarResp = getScreensForFieldWithHttpInfo(fieldId, startAt, maxResults, expand); return localVarResp.getData(); } /** * Get screens for a field * Returns a [paginated](#pagination) list of the screens a field is used in. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the field to return screens for. (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 100) * @param expand Use [expand](#expansion) to include additional information about screens in the response. This parameter accepts `tab` which returns details about the screen tabs the field is used in. (optional) * @return ApiResponse<PageBeanScreenWithTab> * @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 getScreensForFieldWithHttpInfo(String fieldId, Long startAt, Integer maxResults, String expand) throws ApiException { okhttp3.Call localVarCall = getScreensForFieldValidateBeforeCall(fieldId, startAt, maxResults, expand, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get screens for a field (asynchronously) * Returns a [paginated](#pagination) list of the screens a field is used in. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the field to return screens for. (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 100) * @param expand Use [expand](#expansion) to include additional information about screens in the response. This parameter accepts `tab` which returns details about the screen tabs the field is used in. (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. -
403 Returned if the user does not have the necessary permission. -
*/ public okhttp3.Call getScreensForFieldAsync(String fieldId, Long startAt, Integer maxResults, String expand, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getScreensForFieldValidateBeforeCall(fieldId, startAt, maxResults, expand, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateScreen * @param screenId The ID of the screen. (required) * @param updateScreenDetails (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 necessary permission. -
404 Returned if the screen is not found. -
*/ public okhttp3.Call updateScreenCall(Long screenId, UpdateScreenDetails updateScreenDetails, 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 = updateScreenDetails; // create path and map variables String localVarPath = "/rest/api/3/screens/{screenId}" .replace("{" + "screenId" + "}", localVarApiClient.escapeString(screenId.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 updateScreenValidateBeforeCall(Long screenId, UpdateScreenDetails updateScreenDetails, final ApiCallback _callback) throws ApiException { // verify the required parameter 'screenId' is set if (screenId == null) { throw new ApiException("Missing the required parameter 'screenId' when calling updateScreen(Async)"); } // verify the required parameter 'updateScreenDetails' is set if (updateScreenDetails == null) { throw new ApiException("Missing the required parameter 'updateScreenDetails' when calling updateScreen(Async)"); } return updateScreenCall(screenId, updateScreenDetails, _callback); } /** * Update screen * Updates a screen. Only screens used in classic projects can be updated. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param screenId The ID of the screen. (required) * @param updateScreenDetails (required) * @return Screen * @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 the screen is not found. -
*/ public Screen updateScreen(Long screenId, UpdateScreenDetails updateScreenDetails) throws ApiException { ApiResponse localVarResp = updateScreenWithHttpInfo(screenId, updateScreenDetails); return localVarResp.getData(); } /** * Update screen * Updates a screen. Only screens used in classic projects can be updated. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param screenId The ID of the screen. (required) * @param updateScreenDetails (required) * @return ApiResponse<Screen> * @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 the screen is not found. -
*/ public ApiResponse updateScreenWithHttpInfo(Long screenId, UpdateScreenDetails updateScreenDetails) throws ApiException { okhttp3.Call localVarCall = updateScreenValidateBeforeCall(screenId, updateScreenDetails, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update screen (asynchronously) * Updates a screen. Only screens used in classic projects can be updated. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param screenId The ID of the screen. (required) * @param updateScreenDetails (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 necessary permission. -
404 Returned if the screen is not found. -
*/ public okhttp3.Call updateScreenAsync(Long screenId, UpdateScreenDetails updateScreenDetails, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateScreenValidateBeforeCall(screenId, updateScreenDetails, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }