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

software.tnb.jira.validation.generated.api.JqlApi 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.AutoCompleteSuggestions;
import software.tnb.jira.validation.generated.model.ConvertedJQLQueries;
import software.tnb.jira.validation.generated.model.ErrorCollection;
import software.tnb.jira.validation.generated.model.JQLPersonalDataMigrationRequest;
import software.tnb.jira.validation.generated.model.JQLReferenceData;
import software.tnb.jira.validation.generated.model.JqlQueriesToParse;
import software.tnb.jira.validation.generated.model.JqlQueriesToSanitize;
import software.tnb.jira.validation.generated.model.ParsedJqlQueries;
import software.tnb.jira.validation.generated.model.SanitizedJqlQueries;
import software.tnb.jira.validation.generated.model.SearchAutoCompleteFilter;

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

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

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

    public JqlApi(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 getAutoComplete
     * @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 getAutoCompleteCall(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/jql/autocompletedata"; 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 getAutoCompleteValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getAutoCompleteCall(_callback); } /** * Get field reference data (GET) * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. To filter visible field details by project or collapse non-unique fields by field type then [Get field reference data (POST)](#api-rest-api-3-jql-autocompletedata-post) can be used. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @return JQLReferenceData * @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 JQLReferenceData getAutoComplete() throws ApiException { ApiResponse localVarResp = getAutoCompleteWithHttpInfo(); return localVarResp.getData(); } /** * Get field reference data (GET) * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. To filter visible field details by project or collapse non-unique fields by field type then [Get field reference data (POST)](#api-rest-api-3-jql-autocompletedata-post) can be used. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @return ApiResponse<JQLReferenceData> * @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 getAutoCompleteWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getAutoCompleteValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get field reference data (GET) (asynchronously) * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. To filter visible field details by project or collapse non-unique fields by field type then [Get field reference data (POST)](#api-rest-api-3-jql-autocompletedata-post) can be used. 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 getAutoCompleteAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAutoCompleteValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getAutoCompletePost * @param searchAutoCompleteFilter (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. -
*/ public okhttp3.Call getAutoCompletePostCall(SearchAutoCompleteFilter searchAutoCompleteFilter, 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 = searchAutoCompleteFilter; // create path and map variables String localVarPath = "/rest/api/3/jql/autocompletedata"; 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 getAutoCompletePostValidateBeforeCall(SearchAutoCompleteFilter searchAutoCompleteFilter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchAutoCompleteFilter' is set if (searchAutoCompleteFilter == null) { throw new ApiException("Missing the required parameter 'searchAutoCompleteFilter' when calling getAutoCompletePost(Async)"); } return getAutoCompletePostCall(searchAutoCompleteFilter, _callback); } /** * Get field reference data (POST) * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. This operation can filter the custom fields returned by project. Invalid project IDs in `projectIds` are ignored. System fields are always returned. It can also return the collapsed field for custom fields. Collapsed fields enable searches to be performed across all fields with the same name and of the same field type. For example, the collapsed field `Component - Component[Dropdown]` enables dropdown fields `Component - cf[10061]` and `Component - cf[10062]` to be searched simultaneously. **[Permissions](#permissions) required:** None. * @param searchAutoCompleteFilter (required) * @return JQLReferenceData * @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. -
*/ public JQLReferenceData getAutoCompletePost(SearchAutoCompleteFilter searchAutoCompleteFilter) throws ApiException { ApiResponse localVarResp = getAutoCompletePostWithHttpInfo(searchAutoCompleteFilter); return localVarResp.getData(); } /** * Get field reference data (POST) * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. This operation can filter the custom fields returned by project. Invalid project IDs in `projectIds` are ignored. System fields are always returned. It can also return the collapsed field for custom fields. Collapsed fields enable searches to be performed across all fields with the same name and of the same field type. For example, the collapsed field `Component - Component[Dropdown]` enables dropdown fields `Component - cf[10061]` and `Component - cf[10062]` to be searched simultaneously. **[Permissions](#permissions) required:** None. * @param searchAutoCompleteFilter (required) * @return ApiResponse<JQLReferenceData> * @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. -
*/ public ApiResponse getAutoCompletePostWithHttpInfo(SearchAutoCompleteFilter searchAutoCompleteFilter) throws ApiException { okhttp3.Call localVarCall = getAutoCompletePostValidateBeforeCall(searchAutoCompleteFilter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get field reference data (POST) (asynchronously) * Returns reference data for JQL searches. This is a downloadable version of the documentation provided in [Advanced searching - fields reference](https://confluence.atlassian.com/x/gwORLQ) and [Advanced searching - functions reference](https://confluence.atlassian.com/x/hgORLQ), along with a list of JQL-reserved words. Use this information to assist with the programmatic creation of JQL queries or the validation of queries built in a custom query builder. This operation can filter the custom fields returned by project. Invalid project IDs in `projectIds` are ignored. System fields are always returned. It can also return the collapsed field for custom fields. Collapsed fields enable searches to be performed across all fields with the same name and of the same field type. For example, the collapsed field `Component - Component[Dropdown]` enables dropdown fields `Component - cf[10061]` and `Component - cf[10062]` to be searched simultaneously. **[Permissions](#permissions) required:** None. * @param searchAutoCompleteFilter (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. -
*/ public okhttp3.Call getAutoCompletePostAsync(SearchAutoCompleteFilter searchAutoCompleteFilter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAutoCompletePostValidateBeforeCall(searchAutoCompleteFilter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getFieldAutoCompleteForQueryString * @param fieldName The name of the field. (optional) * @param fieldValue The partial field item name entered by the user. (optional) * @param predicateName The name of the [ CHANGED operator predicate](https://confluence.atlassian.com/x/hQORLQ#Advancedsearching-operatorsreference-CHANGEDCHANGED) for which the suggestions are generated. The valid predicate operators are *by*, *from*, and *to*. (optional) * @param predicateValue The partial predicate item name entered by the user. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if an invalid combination of parameters is passed. -
401 Returned if the authentication credentials are incorrect. -
*/ public okhttp3.Call getFieldAutoCompleteForQueryStringCall(String fieldName, String fieldValue, String predicateName, String predicateValue, 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/jql/autocompletedata/suggestions"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (fieldName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldName", fieldName)); } if (fieldValue != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValue", fieldValue)); } if (predicateName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("predicateName", predicateName)); } if (predicateValue != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("predicateValue", predicateValue)); } 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 getFieldAutoCompleteForQueryStringValidateBeforeCall(String fieldName, String fieldValue, String predicateName, String predicateValue, final ApiCallback _callback) throws ApiException { return getFieldAutoCompleteForQueryStringCall(fieldName, fieldValue, predicateName, predicateValue, _callback); } /** * Get field auto complete suggestions * Returns the JQL search auto complete suggestions for a field. Suggestions can be obtained by providing: * `fieldName` to get a list of all values for the field. * `fieldName` and `fieldValue` to get a list of values containing the text in `fieldValue`. * `fieldName` and `predicateName` to get a list of all predicate values for the field. * `fieldName`, `predicateName`, and `predicateValue` to get a list of predicate values containing the text in `predicateValue`. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param fieldName The name of the field. (optional) * @param fieldValue The partial field item name entered by the user. (optional) * @param predicateName The name of the [ CHANGED operator predicate](https://confluence.atlassian.com/x/hQORLQ#Advancedsearching-operatorsreference-CHANGEDCHANGED) for which the suggestions are generated. The valid predicate operators are *by*, *from*, and *to*. (optional) * @param predicateValue The partial predicate item name entered by the user. (optional) * @return AutoCompleteSuggestions * @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 an invalid combination of parameters is passed. -
401 Returned if the authentication credentials are incorrect. -
*/ public AutoCompleteSuggestions getFieldAutoCompleteForQueryString(String fieldName, String fieldValue, String predicateName, String predicateValue) throws ApiException { ApiResponse localVarResp = getFieldAutoCompleteForQueryStringWithHttpInfo(fieldName, fieldValue, predicateName, predicateValue); return localVarResp.getData(); } /** * Get field auto complete suggestions * Returns the JQL search auto complete suggestions for a field. Suggestions can be obtained by providing: * `fieldName` to get a list of all values for the field. * `fieldName` and `fieldValue` to get a list of values containing the text in `fieldValue`. * `fieldName` and `predicateName` to get a list of all predicate values for the field. * `fieldName`, `predicateName`, and `predicateValue` to get a list of predicate values containing the text in `predicateValue`. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param fieldName The name of the field. (optional) * @param fieldValue The partial field item name entered by the user. (optional) * @param predicateName The name of the [ CHANGED operator predicate](https://confluence.atlassian.com/x/hQORLQ#Advancedsearching-operatorsreference-CHANGEDCHANGED) for which the suggestions are generated. The valid predicate operators are *by*, *from*, and *to*. (optional) * @param predicateValue The partial predicate item name entered by the user. (optional) * @return ApiResponse<AutoCompleteSuggestions> * @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 an invalid combination of parameters is passed. -
401 Returned if the authentication credentials are incorrect. -
*/ public ApiResponse getFieldAutoCompleteForQueryStringWithHttpInfo(String fieldName, String fieldValue, String predicateName, String predicateValue) throws ApiException { okhttp3.Call localVarCall = getFieldAutoCompleteForQueryStringValidateBeforeCall(fieldName, fieldValue, predicateName, predicateValue, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get field auto complete suggestions (asynchronously) * Returns the JQL search auto complete suggestions for a field. Suggestions can be obtained by providing: * `fieldName` to get a list of all values for the field. * `fieldName` and `fieldValue` to get a list of values containing the text in `fieldValue`. * `fieldName` and `predicateName` to get a list of all predicate values for the field. * `fieldName`, `predicateName`, and `predicateValue` to get a list of predicate values containing the text in `predicateValue`. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param fieldName The name of the field. (optional) * @param fieldValue The partial field item name entered by the user. (optional) * @param predicateName The name of the [ CHANGED operator predicate](https://confluence.atlassian.com/x/hQORLQ#Advancedsearching-operatorsreference-CHANGEDCHANGED) for which the suggestions are generated. The valid predicate operators are *by*, *from*, and *to*. (optional) * @param predicateValue The partial predicate item name entered by the user. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if an invalid combination of parameters is passed. -
401 Returned if the authentication credentials are incorrect. -
*/ public okhttp3.Call getFieldAutoCompleteForQueryStringAsync(String fieldName, String fieldValue, String predicateName, String predicateValue, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFieldAutoCompleteForQueryStringValidateBeforeCall(fieldName, fieldValue, predicateName, predicateValue, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for migrateQueries * @param jqLPersonalDataMigrationRequest (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. Note that the JQL queries are returned in the same order that they were passed. -
400 Returned if at least one of the queries cannot be converted. For example, the JQL has invalid operators or invalid keywords, or the users in the query cannot be found. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call migrateQueriesCall(JQLPersonalDataMigrationRequest jqLPersonalDataMigrationRequest, 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 = jqLPersonalDataMigrationRequest; // create path and map variables String localVarPath = "/rest/api/3/jql/pdcleaner"; 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 migrateQueriesValidateBeforeCall(JQLPersonalDataMigrationRequest jqLPersonalDataMigrationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'jqLPersonalDataMigrationRequest' is set if (jqLPersonalDataMigrationRequest == null) { throw new ApiException("Missing the required parameter 'jqLPersonalDataMigrationRequest' when calling migrateQueries(Async)"); } return migrateQueriesCall(jqLPersonalDataMigrationRequest, _callback); } /** * Convert user identifiers to account IDs in JQL queries * Converts one or more JQL queries with user identifiers (username or user key) to equivalent JQL queries with account IDs. You may wish to use this operation if your system stores JQL queries and you want to make them GDPR-compliant. For more information about GDPR-related changes, see the [migration guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/). **[Permissions](#permissions) required:** Permission to access Jira. * @param jqLPersonalDataMigrationRequest (required) * @return ConvertedJQLQueries * @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. Note that the JQL queries are returned in the same order that they were passed. -
400 Returned if at least one of the queries cannot be converted. For example, the JQL has invalid operators or invalid keywords, or the users in the query cannot be found. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public ConvertedJQLQueries migrateQueries(JQLPersonalDataMigrationRequest jqLPersonalDataMigrationRequest) throws ApiException { ApiResponse localVarResp = migrateQueriesWithHttpInfo(jqLPersonalDataMigrationRequest); return localVarResp.getData(); } /** * Convert user identifiers to account IDs in JQL queries * Converts one or more JQL queries with user identifiers (username or user key) to equivalent JQL queries with account IDs. You may wish to use this operation if your system stores JQL queries and you want to make them GDPR-compliant. For more information about GDPR-related changes, see the [migration guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/). **[Permissions](#permissions) required:** Permission to access Jira. * @param jqLPersonalDataMigrationRequest (required) * @return ApiResponse<ConvertedJQLQueries> * @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. Note that the JQL queries are returned in the same order that they were passed. -
400 Returned if at least one of the queries cannot be converted. For example, the JQL has invalid operators or invalid keywords, or the users in the query cannot be found. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public ApiResponse migrateQueriesWithHttpInfo(JQLPersonalDataMigrationRequest jqLPersonalDataMigrationRequest) throws ApiException { okhttp3.Call localVarCall = migrateQueriesValidateBeforeCall(jqLPersonalDataMigrationRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Convert user identifiers to account IDs in JQL queries (asynchronously) * Converts one or more JQL queries with user identifiers (username or user key) to equivalent JQL queries with account IDs. You may wish to use this operation if your system stores JQL queries and you want to make them GDPR-compliant. For more information about GDPR-related changes, see the [migration guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/). **[Permissions](#permissions) required:** Permission to access Jira. * @param jqLPersonalDataMigrationRequest (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. Note that the JQL queries are returned in the same order that they were passed. -
400 Returned if at least one of the queries cannot be converted. For example, the JQL has invalid operators or invalid keywords, or the users in the query cannot be found. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call migrateQueriesAsync(JQLPersonalDataMigrationRequest jqLPersonalDataMigrationRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = migrateQueriesValidateBeforeCall(jqLPersonalDataMigrationRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for parseJqlQueries * @param jqlQueriesToParse (required) * @param validation How to validate the JQL query and treat the validation results. Validation options include: * `strict` Returns all errors. If validation fails, the query structure is not returned. * `warn` Returns all errors. If validation fails but the JQL query is correctly formed, the query structure is returned. * `none` No validation is performed. If JQL query is correctly formed, the query structure is returned. (optional, default to strict) * @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 invalid. -
401 Returned if the authentication credentials are incorrect. -
*/ public okhttp3.Call parseJqlQueriesCall(JqlQueriesToParse jqlQueriesToParse, String validation, 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 = jqlQueriesToParse; // create path and map variables String localVarPath = "/rest/api/3/jql/parse"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (validation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("validation", validation)); } 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 parseJqlQueriesValidateBeforeCall(JqlQueriesToParse jqlQueriesToParse, String validation, final ApiCallback _callback) throws ApiException { // verify the required parameter 'jqlQueriesToParse' is set if (jqlQueriesToParse == null) { throw new ApiException("Missing the required parameter 'jqlQueriesToParse' when calling parseJqlQueries(Async)"); } return parseJqlQueriesCall(jqlQueriesToParse, validation, _callback); } /** * Parse JQL query * Parses and validates JQL queries. Validation is performed in context of the current user. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param jqlQueriesToParse (required) * @param validation How to validate the JQL query and treat the validation results. Validation options include: * `strict` Returns all errors. If validation fails, the query structure is not returned. * `warn` Returns all errors. If validation fails but the JQL query is correctly formed, the query structure is returned. * `none` No validation is performed. If JQL query is correctly formed, the query structure is returned. (optional, default to strict) * @return ParsedJqlQueries * @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 invalid. -
401 Returned if the authentication credentials are incorrect. -
*/ public ParsedJqlQueries parseJqlQueries(JqlQueriesToParse jqlQueriesToParse, String validation) throws ApiException { ApiResponse localVarResp = parseJqlQueriesWithHttpInfo(jqlQueriesToParse, validation); return localVarResp.getData(); } /** * Parse JQL query * Parses and validates JQL queries. Validation is performed in context of the current user. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param jqlQueriesToParse (required) * @param validation How to validate the JQL query and treat the validation results. Validation options include: * `strict` Returns all errors. If validation fails, the query structure is not returned. * `warn` Returns all errors. If validation fails but the JQL query is correctly formed, the query structure is returned. * `none` No validation is performed. If JQL query is correctly formed, the query structure is returned. (optional, default to strict) * @return ApiResponse<ParsedJqlQueries> * @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 invalid. -
401 Returned if the authentication credentials are incorrect. -
*/ public ApiResponse parseJqlQueriesWithHttpInfo(JqlQueriesToParse jqlQueriesToParse, String validation) throws ApiException { okhttp3.Call localVarCall = parseJqlQueriesValidateBeforeCall(jqlQueriesToParse, validation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Parse JQL query (asynchronously) * Parses and validates JQL queries. Validation is performed in context of the current user. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param jqlQueriesToParse (required) * @param validation How to validate the JQL query and treat the validation results. Validation options include: * `strict` Returns all errors. If validation fails, the query structure is not returned. * `warn` Returns all errors. If validation fails but the JQL query is correctly formed, the query structure is returned. * `none` No validation is performed. If JQL query is correctly formed, the query structure is returned. (optional, default to strict) * @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 invalid. -
401 Returned if the authentication credentials are incorrect. -
*/ public okhttp3.Call parseJqlQueriesAsync(JqlQueriesToParse jqlQueriesToParse, String validation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = parseJqlQueriesValidateBeforeCall(jqlQueriesToParse, validation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for sanitiseJqlQueries * @param jqlQueriesToSanitize (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 invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
*/ public okhttp3.Call sanitiseJqlQueriesCall(JqlQueriesToSanitize jqlQueriesToSanitize, 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 = jqlQueriesToSanitize; // create path and map variables String localVarPath = "/rest/api/3/jql/sanitize"; 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 sanitiseJqlQueriesValidateBeforeCall(JqlQueriesToSanitize jqlQueriesToSanitize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'jqlQueriesToSanitize' is set if (jqlQueriesToSanitize == null) { throw new ApiException("Missing the required parameter 'jqlQueriesToSanitize' when calling sanitiseJqlQueries(Async)"); } return sanitiseJqlQueriesCall(jqlQueriesToSanitize, _callback); } /** * Sanitize JQL queries * Sanitizes one or more JQL queries by converting readable details into IDs where a user doesn't have permission to view the entity. For example, if the query contains the clause *project = 'Secret project'*, and a user does not have browse permission for the project \"Secret project\", the sanitized query replaces the clause with *project = 12345\"* (where 12345 is the ID of the project). If a user has the required permission, the clause is not sanitized. If the account ID is null, sanitizing is performed for an anonymous user. Note that sanitization doesn't make the queries GDPR-compliant, because it doesn't remove user identifiers (username or user key). If you need to make queries GDPR-compliant, use [Convert user identifiers to account IDs in JQL queries](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jql/#api-rest-api-3-jql-sanitize-post). Before sanitization each JQL query is parsed. The queries are returned in the same order that they were passed. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param jqlQueriesToSanitize (required) * @return SanitizedJqlQueries * @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 invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
*/ public SanitizedJqlQueries sanitiseJqlQueries(JqlQueriesToSanitize jqlQueriesToSanitize) throws ApiException { ApiResponse localVarResp = sanitiseJqlQueriesWithHttpInfo(jqlQueriesToSanitize); return localVarResp.getData(); } /** * Sanitize JQL queries * Sanitizes one or more JQL queries by converting readable details into IDs where a user doesn't have permission to view the entity. For example, if the query contains the clause *project = 'Secret project'*, and a user does not have browse permission for the project \"Secret project\", the sanitized query replaces the clause with *project = 12345\"* (where 12345 is the ID of the project). If a user has the required permission, the clause is not sanitized. If the account ID is null, sanitizing is performed for an anonymous user. Note that sanitization doesn't make the queries GDPR-compliant, because it doesn't remove user identifiers (username or user key). If you need to make queries GDPR-compliant, use [Convert user identifiers to account IDs in JQL queries](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jql/#api-rest-api-3-jql-sanitize-post). Before sanitization each JQL query is parsed. The queries are returned in the same order that they were passed. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param jqlQueriesToSanitize (required) * @return ApiResponse<SanitizedJqlQueries> * @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 invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
*/ public ApiResponse sanitiseJqlQueriesWithHttpInfo(JqlQueriesToSanitize jqlQueriesToSanitize) throws ApiException { okhttp3.Call localVarCall = sanitiseJqlQueriesValidateBeforeCall(jqlQueriesToSanitize, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Sanitize JQL queries (asynchronously) * Sanitizes one or more JQL queries by converting readable details into IDs where a user doesn't have permission to view the entity. For example, if the query contains the clause *project = 'Secret project'*, and a user does not have browse permission for the project \"Secret project\", the sanitized query replaces the clause with *project = 12345\"* (where 12345 is the ID of the project). If a user has the required permission, the clause is not sanitized. If the account ID is null, sanitizing is performed for an anonymous user. Note that sanitization doesn't make the queries GDPR-compliant, because it doesn't remove user identifiers (username or user key). If you need to make queries GDPR-compliant, use [Convert user identifiers to account IDs in JQL queries](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jql/#api-rest-api-3-jql-sanitize-post). Before sanitization each JQL query is parsed. The queries are returned in the same order that they were passed. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param jqlQueriesToSanitize (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 invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
*/ public okhttp3.Call sanitiseJqlQueriesAsync(JqlQueriesToSanitize jqlQueriesToSanitize, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = sanitiseJqlQueriesValidateBeforeCall(jqlQueriesToSanitize, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy