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

software.tnb.jira.validation.generated.api.FilterSharingApi 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.DefaultShareScope;
import software.tnb.jira.validation.generated.model.SharePermission;
import software.tnb.jira.validation.generated.model.SharePermissionInputBean;

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

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

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

    public FilterSharingApi(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 addSharePermission
     * @param id The ID of the filter. (required)
     * @param sharePermissionInputBean  (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 object is invalid. For example, it contains an invalid type, the ID does not match the type, or the project or group is not found. * the user does not own the filter. * the user does not have the required permissions. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the user does not have permission to view the filter. -
*/ public okhttp3.Call addSharePermissionCall(Long id, SharePermissionInputBean sharePermissionInputBean, 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 = sharePermissionInputBean; // create path and map variables String localVarPath = "/rest/api/3/filter/{id}/permission" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addSharePermissionValidateBeforeCall(Long id, SharePermissionInputBean sharePermissionInputBean, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling addSharePermission(Async)"); } // verify the required parameter 'sharePermissionInputBean' is set if (sharePermissionInputBean == null) { throw new ApiException("Missing the required parameter 'sharePermissionInputBean' when calling addSharePermission(Async)"); } return addSharePermissionCall(id, sharePermissionInputBean, _callback); } /** * Add share permission * Add a share permissions to a filter. If you add a global share permission (one for all logged-in users or the public) it will overwrite all share permissions for the filter. Be aware that this operation uses different objects for updating share permissions compared to [Update filter](#api-rest-api-3-filter-id-put). **[Permissions](#permissions) required:** *Share dashboards and filters* [global permission](https://confluence.atlassian.com/x/x4dKLg) and the user must own the filter. * @param id The ID of the filter. (required) * @param sharePermissionInputBean (required) * @return List<SharePermission> * @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 object is invalid. For example, it contains an invalid type, the ID does not match the type, or the project or group is not found. * the user does not own the filter. * the user does not have the required permissions. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the user does not have permission to view the filter. -
*/ public List addSharePermission(Long id, SharePermissionInputBean sharePermissionInputBean) throws ApiException { ApiResponse> localVarResp = addSharePermissionWithHttpInfo(id, sharePermissionInputBean); return localVarResp.getData(); } /** * Add share permission * Add a share permissions to a filter. If you add a global share permission (one for all logged-in users or the public) it will overwrite all share permissions for the filter. Be aware that this operation uses different objects for updating share permissions compared to [Update filter](#api-rest-api-3-filter-id-put). **[Permissions](#permissions) required:** *Share dashboards and filters* [global permission](https://confluence.atlassian.com/x/x4dKLg) and the user must own the filter. * @param id The ID of the filter. (required) * @param sharePermissionInputBean (required) * @return ApiResponse<List<SharePermission>> * @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 object is invalid. For example, it contains an invalid type, the ID does not match the type, or the project or group is not found. * the user does not own the filter. * the user does not have the required permissions. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the user does not have permission to view the filter. -
*/ public ApiResponse> addSharePermissionWithHttpInfo(Long id, SharePermissionInputBean sharePermissionInputBean) throws ApiException { okhttp3.Call localVarCall = addSharePermissionValidateBeforeCall(id, sharePermissionInputBean, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add share permission (asynchronously) * Add a share permissions to a filter. If you add a global share permission (one for all logged-in users or the public) it will overwrite all share permissions for the filter. Be aware that this operation uses different objects for updating share permissions compared to [Update filter](#api-rest-api-3-filter-id-put). **[Permissions](#permissions) required:** *Share dashboards and filters* [global permission](https://confluence.atlassian.com/x/x4dKLg) and the user must own the filter. * @param id The ID of the filter. (required) * @param sharePermissionInputBean (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 object is invalid. For example, it contains an invalid type, the ID does not match the type, or the project or group is not found. * the user does not own the filter. * the user does not have the required permissions. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the user does not have permission to view the filter. -
*/ public okhttp3.Call addSharePermissionAsync(Long id, SharePermissionInputBean sharePermissionInputBean, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = addSharePermissionValidateBeforeCall(id, sharePermissionInputBean, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteSharePermission * @param id The ID of the filter. (required) * @param permissionId The ID of the share permission. (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. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the user does not own the filter. -
*/ public okhttp3.Call deleteSharePermissionCall(Long id, Long permissionId, 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/filter/{id}/permission/{permissionId}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) .replace("{" + "permissionId" + "}", localVarApiClient.escapeString(permissionId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { }; 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 deleteSharePermissionValidateBeforeCall(Long id, Long permissionId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteSharePermission(Async)"); } // verify the required parameter 'permissionId' is set if (permissionId == null) { throw new ApiException("Missing the required parameter 'permissionId' when calling deleteSharePermission(Async)"); } return deleteSharePermissionCall(id, permissionId, _callback); } /** * Delete share permission * Deletes a share permission from a filter. **[Permissions](#permissions) required:** Permission to access Jira and the user must own the filter. * @param id The ID of the filter. (required) * @param permissionId The ID of the share permission. (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. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the user does not own the filter. -
*/ public void deleteSharePermission(Long id, Long permissionId) throws ApiException { deleteSharePermissionWithHttpInfo(id, permissionId); } /** * Delete share permission * Deletes a share permission from a filter. **[Permissions](#permissions) required:** Permission to access Jira and the user must own the filter. * @param id The ID of the filter. (required) * @param permissionId The ID of the share permission. (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. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the user does not own the filter. -
*/ public ApiResponse deleteSharePermissionWithHttpInfo(Long id, Long permissionId) throws ApiException { okhttp3.Call localVarCall = deleteSharePermissionValidateBeforeCall(id, permissionId, null); return localVarApiClient.execute(localVarCall); } /** * Delete share permission (asynchronously) * Deletes a share permission from a filter. **[Permissions](#permissions) required:** Permission to access Jira and the user must own the filter. * @param id The ID of the filter. (required) * @param permissionId The ID of the share permission. (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. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the user does not own the filter. -
*/ public okhttp3.Call deleteSharePermissionAsync(Long id, Long permissionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteSharePermissionValidateBeforeCall(id, permissionId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getDefaultShareScope * @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. -
*/ public okhttp3.Call getDefaultShareScopeCall(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/filter/defaultShareScope"; 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 getDefaultShareScopeValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getDefaultShareScopeCall(_callback); } /** * Get default share scope * Returns the default sharing settings for new filters and dashboards for a user. **[Permissions](#permissions) required:** Permission to access Jira. * @return DefaultShareScope * @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. -
*/ public DefaultShareScope getDefaultShareScope() throws ApiException { ApiResponse localVarResp = getDefaultShareScopeWithHttpInfo(); return localVarResp.getData(); } /** * Get default share scope * Returns the default sharing settings for new filters and dashboards for a user. **[Permissions](#permissions) required:** Permission to access Jira. * @return ApiResponse<DefaultShareScope> * @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. -
*/ public ApiResponse getDefaultShareScopeWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getDefaultShareScopeValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get default share scope (asynchronously) * Returns the default sharing settings for new filters and dashboards for a user. **[Permissions](#permissions) required:** Permission to access Jira. * @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. -
*/ public okhttp3.Call getDefaultShareScopeAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDefaultShareScopeValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSharePermission * @param id The ID of the filter. (required) * @param permissionId The ID of the share permission. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the permission is not found. * the user does not have permission to view the filter. -
*/ public okhttp3.Call getSharePermissionCall(Long id, Long permissionId, 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/filter/{id}/permission/{permissionId}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) .replace("{" + "permissionId" + "}", localVarApiClient.escapeString(permissionId.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 getSharePermissionValidateBeforeCall(Long id, Long permissionId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getSharePermission(Async)"); } // verify the required parameter 'permissionId' is set if (permissionId == null) { throw new ApiException("Missing the required parameter 'permissionId' when calling getSharePermission(Async)"); } return getSharePermissionCall(id, permissionId, _callback); } /** * Get share permission * Returns a share permission for a filter. A filter can be shared with groups, projects, all logged-in users, or the public. Sharing with all logged-in users or the public is known as a global share permission. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None, however, a share permission is only returned for: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public. * @param id The ID of the filter. (required) * @param permissionId The ID of the share permission. (required) * @return SharePermission * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the permission is not found. * the user does not have permission to view the filter. -
*/ public SharePermission getSharePermission(Long id, Long permissionId) throws ApiException { ApiResponse localVarResp = getSharePermissionWithHttpInfo(id, permissionId); return localVarResp.getData(); } /** * Get share permission * Returns a share permission for a filter. A filter can be shared with groups, projects, all logged-in users, or the public. Sharing with all logged-in users or the public is known as a global share permission. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None, however, a share permission is only returned for: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public. * @param id The ID of the filter. (required) * @param permissionId The ID of the share permission. (required) * @return ApiResponse<SharePermission> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the permission is not found. * the user does not have permission to view the filter. -
*/ public ApiResponse getSharePermissionWithHttpInfo(Long id, Long permissionId) throws ApiException { okhttp3.Call localVarCall = getSharePermissionValidateBeforeCall(id, permissionId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get share permission (asynchronously) * Returns a share permission for a filter. A filter can be shared with groups, projects, all logged-in users, or the public. Sharing with all logged-in users or the public is known as a global share permission. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None, however, a share permission is only returned for: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public. * @param id The ID of the filter. (required) * @param permissionId The ID of the share permission. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the permission is not found. * the user does not have permission to view the filter. -
*/ public okhttp3.Call getSharePermissionAsync(Long id, Long permissionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSharePermissionValidateBeforeCall(id, permissionId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSharePermissions * @param id The ID of the filter. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the user does not have permission to view the filter. -
*/ public okhttp3.Call getSharePermissionsCall(Long id, 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/filter/{id}/permission" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.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 getSharePermissionsValidateBeforeCall(Long id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getSharePermissions(Async)"); } return getSharePermissionsCall(id, _callback); } /** * Get share permissions * Returns the share permissions for a filter. A filter can be shared with groups, projects, all logged-in users, or the public. Sharing with all logged-in users or the public is known as a global share permission. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None, however, share permissions are only returned for: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public. * @param id The ID of the filter. (required) * @return List<SharePermission> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the user does not have permission to view the filter. -
*/ public List getSharePermissions(Long id) throws ApiException { ApiResponse> localVarResp = getSharePermissionsWithHttpInfo(id); return localVarResp.getData(); } /** * Get share permissions * Returns the share permissions for a filter. A filter can be shared with groups, projects, all logged-in users, or the public. Sharing with all logged-in users or the public is known as a global share permission. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None, however, share permissions are only returned for: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public. * @param id The ID of the filter. (required) * @return ApiResponse<List<SharePermission>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the user does not have permission to view the filter. -
*/ public ApiResponse> getSharePermissionsWithHttpInfo(Long id) throws ApiException { okhttp3.Call localVarCall = getSharePermissionsValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get share permissions (asynchronously) * Returns the share permissions for a filter. A filter can be shared with groups, projects, all logged-in users, or the public. Sharing with all logged-in users or the public is known as a global share permission. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None, however, share permissions are only returned for: * filters owned by the user. * filters shared with a group that the user is a member of. * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for. * filters shared with a public project. * filters shared with the public. * @param id The ID of the filter. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the filter is not found. * the user does not have permission to view the filter. -
*/ public okhttp3.Call getSharePermissionsAsync(Long id, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getSharePermissionsValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for setDefaultShareScope * @param defaultShareScope (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 an invalid scope is set. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call setDefaultShareScopeCall(DefaultShareScope defaultShareScope, 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 = defaultShareScope; // create path and map variables String localVarPath = "/rest/api/3/filter/defaultShareScope"; 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 setDefaultShareScopeValidateBeforeCall(DefaultShareScope defaultShareScope, final ApiCallback _callback) throws ApiException { // verify the required parameter 'defaultShareScope' is set if (defaultShareScope == null) { throw new ApiException("Missing the required parameter 'defaultShareScope' when calling setDefaultShareScope(Async)"); } return setDefaultShareScopeCall(defaultShareScope, _callback); } /** * Set default share scope * Sets the default sharing for new filters and dashboards for a user. **[Permissions](#permissions) required:** Permission to access Jira. * @param defaultShareScope (required) * @return DefaultShareScope * @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 scope is set. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public DefaultShareScope setDefaultShareScope(DefaultShareScope defaultShareScope) throws ApiException { ApiResponse localVarResp = setDefaultShareScopeWithHttpInfo(defaultShareScope); return localVarResp.getData(); } /** * Set default share scope * Sets the default sharing for new filters and dashboards for a user. **[Permissions](#permissions) required:** Permission to access Jira. * @param defaultShareScope (required) * @return ApiResponse<DefaultShareScope> * @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 scope is set. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public ApiResponse setDefaultShareScopeWithHttpInfo(DefaultShareScope defaultShareScope) throws ApiException { okhttp3.Call localVarCall = setDefaultShareScopeValidateBeforeCall(defaultShareScope, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Set default share scope (asynchronously) * Sets the default sharing for new filters and dashboards for a user. **[Permissions](#permissions) required:** Permission to access Jira. * @param defaultShareScope (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 an invalid scope is set. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call setDefaultShareScopeAsync(DefaultShareScope defaultShareScope, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = setDefaultShareScopeValidateBeforeCall(defaultShareScope, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy