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

software.tnb.jira.validation.generated.api.IssueNotificationSchemesApi 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.AddNotificationsDetails;
import software.tnb.jira.validation.generated.model.CreateNotificationSchemeDetails;
import software.tnb.jira.validation.generated.model.ErrorCollection;
import software.tnb.jira.validation.generated.model.NotificationScheme;
import software.tnb.jira.validation.generated.model.NotificationSchemeId;
import software.tnb.jira.validation.generated.model.PageBeanNotificationScheme;
import java.util.Set;
import software.tnb.jira.validation.generated.model.UpdateNotificationSchemeDetails;

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

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

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

    public IssueNotificationSchemesApi(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 addNotifications
     * @param id The ID of the notification scheme. (required)
     * @param requestBody  (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 isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the notification scheme isn't found. -
*/ public okhttp3.Call addNotificationsCall(String id, Map requestBody, 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 = requestBody; // create path and map variables String localVarPath = "/rest/api/3/notificationscheme/{id}/notification" .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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addNotificationsValidateBeforeCall(String id, Map requestBody, 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 addNotifications(Async)"); } // verify the required parameter 'requestBody' is set if (requestBody == null) { throw new ApiException("Missing the required parameter 'requestBody' when calling addNotifications(Async)"); } return addNotificationsCall(id, requestBody, _callback); } /** * Add notifications * Adds notifications to a notifications scheme. You can add up to 1000 notifications per request. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the notification scheme. (required) * @param requestBody (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the notification scheme isn't found. -
*/ public Object addNotifications(String id, Map requestBody) throws ApiException { ApiResponse localVarResp = addNotificationsWithHttpInfo(id, requestBody); return localVarResp.getData(); } /** * Add notifications * Adds notifications to a notifications scheme. You can add up to 1000 notifications per request. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the notification scheme. (required) * @param requestBody (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
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the notification scheme isn't found. -
*/ public ApiResponse addNotificationsWithHttpInfo(String id, Map requestBody) throws ApiException { okhttp3.Call localVarCall = addNotificationsValidateBeforeCall(id, requestBody, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add notifications (asynchronously) * Adds notifications to a notifications scheme. You can add up to 1000 notifications per request. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the notification scheme. (required) * @param requestBody (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 isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the notification scheme isn't found. -
*/ public okhttp3.Call addNotificationsAsync(String id, Map requestBody, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addNotificationsValidateBeforeCall(id, requestBody, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createNotificationScheme * @param requestBody (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 isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
*/ public okhttp3.Call createNotificationSchemeCall(Map requestBody, 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 = requestBody; // create path and map variables String localVarPath = "/rest/api/3/notificationscheme"; 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 createNotificationSchemeValidateBeforeCall(Map requestBody, final ApiCallback _callback) throws ApiException { // verify the required parameter 'requestBody' is set if (requestBody == null) { throw new ApiException("Missing the required parameter 'requestBody' when calling createNotificationScheme(Async)"); } return createNotificationSchemeCall(requestBody, _callback); } /** * Create notification scheme * Creates a notification scheme with notifications. You can create up to 1000 notifications per request. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param requestBody (required) * @return NotificationSchemeId * @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 isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
*/ public NotificationSchemeId createNotificationScheme(Map requestBody) throws ApiException { ApiResponse localVarResp = createNotificationSchemeWithHttpInfo(requestBody); return localVarResp.getData(); } /** * Create notification scheme * Creates a notification scheme with notifications. You can create up to 1000 notifications per request. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param requestBody (required) * @return ApiResponse<NotificationSchemeId> * @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 isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
*/ public ApiResponse createNotificationSchemeWithHttpInfo(Map requestBody) throws ApiException { okhttp3.Call localVarCall = createNotificationSchemeValidateBeforeCall(requestBody, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create notification scheme (asynchronously) * Creates a notification scheme with notifications. You can create up to 1000 notifications per request. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param requestBody (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 isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
*/ public okhttp3.Call createNotificationSchemeAsync(Map requestBody, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createNotificationSchemeValidateBeforeCall(requestBody, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteNotificationScheme * @param notificationSchemeId The ID of the notification scheme. (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 isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the notification scheme isn't found. -
*/ public okhttp3.Call deleteNotificationSchemeCall(String notificationSchemeId, 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/notificationscheme/{notificationSchemeId}" .replace("{" + "notificationSchemeId" + "}", localVarApiClient.escapeString(notificationSchemeId.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 deleteNotificationSchemeValidateBeforeCall(String notificationSchemeId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'notificationSchemeId' is set if (notificationSchemeId == null) { throw new ApiException("Missing the required parameter 'notificationSchemeId' when calling deleteNotificationScheme(Async)"); } return deleteNotificationSchemeCall(notificationSchemeId, _callback); } /** * Delete notification scheme * Deletes a notification scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param notificationSchemeId The ID of the notification scheme. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the notification scheme isn't found. -
*/ public Object deleteNotificationScheme(String notificationSchemeId) throws ApiException { ApiResponse localVarResp = deleteNotificationSchemeWithHttpInfo(notificationSchemeId); return localVarResp.getData(); } /** * Delete notification scheme * Deletes a notification scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param notificationSchemeId The ID of the notification scheme. (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
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the notification scheme isn't found. -
*/ public ApiResponse deleteNotificationSchemeWithHttpInfo(String notificationSchemeId) throws ApiException { okhttp3.Call localVarCall = deleteNotificationSchemeValidateBeforeCall(notificationSchemeId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete notification scheme (asynchronously) * Deletes a notification scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param notificationSchemeId The ID of the notification scheme. (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 isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the notification scheme isn't found. -
*/ public okhttp3.Call deleteNotificationSchemeAsync(String notificationSchemeId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteNotificationSchemeValidateBeforeCall(notificationSchemeId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getNotificationScheme * @param id The ID of the notification scheme. Use [Get notification schemes paginated](#api-rest-api-3-notificationscheme-get) to get a list of notification scheme IDs. (required) * @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: * `all` Returns all expandable information * `field` Returns information about any custom fields assigned to receive an event * `group` Returns information about any groups assigned to receive an event * `notificationSchemeEvents` Returns a list of event associations. This list is returned for all expandable information * `projectRole` Returns information about any project roles assigned to receive an event * `user` Returns information about any users assigned to receive an event (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 the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the notification scheme is not found or the user does not have permission to view it. -
* @deprecated */ @Deprecated public okhttp3.Call getNotificationSchemeCall(Long id, 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/notificationscheme/{id}" .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(); 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); } @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call getNotificationSchemeValidateBeforeCall(Long id, String expand, 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 getNotificationScheme(Async)"); } return getNotificationSchemeCall(id, expand, _callback); } /** * Get notification scheme * Returns a [notification scheme](https://confluence.atlassian.com/x/8YdKLg), including the list of events and the recipients who will receive notifications for those events. Deprecated, use [Get notification schemes paginated](#api-rest-api-3-notificationscheme-get) supporting search and pagination. **[Permissions](#permissions) required:** Permission to access Jira, however, the user must have permission to administer at least one project associated with the notification scheme. * @param id The ID of the notification scheme. Use [Get notification schemes paginated](#api-rest-api-3-notificationscheme-get) to get a list of notification scheme IDs. (required) * @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: * `all` Returns all expandable information * `field` Returns information about any custom fields assigned to receive an event * `group` Returns information about any groups assigned to receive an event * `notificationSchemeEvents` Returns a list of event associations. This list is returned for all expandable information * `projectRole` Returns information about any project roles assigned to receive an event * `user` Returns information about any users assigned to receive an event (optional) * @return NotificationScheme * @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. -
404 Returned if the notification scheme is not found or the user does not have permission to view it. -
* @deprecated */ @Deprecated public NotificationScheme getNotificationScheme(Long id, String expand) throws ApiException { ApiResponse localVarResp = getNotificationSchemeWithHttpInfo(id, expand); return localVarResp.getData(); } /** * Get notification scheme * Returns a [notification scheme](https://confluence.atlassian.com/x/8YdKLg), including the list of events and the recipients who will receive notifications for those events. Deprecated, use [Get notification schemes paginated](#api-rest-api-3-notificationscheme-get) supporting search and pagination. **[Permissions](#permissions) required:** Permission to access Jira, however, the user must have permission to administer at least one project associated with the notification scheme. * @param id The ID of the notification scheme. Use [Get notification schemes paginated](#api-rest-api-3-notificationscheme-get) to get a list of notification scheme IDs. (required) * @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: * `all` Returns all expandable information * `field` Returns information about any custom fields assigned to receive an event * `group` Returns information about any groups assigned to receive an event * `notificationSchemeEvents` Returns a list of event associations. This list is returned for all expandable information * `projectRole` Returns information about any project roles assigned to receive an event * `user` Returns information about any users assigned to receive an event (optional) * @return ApiResponse<NotificationScheme> * @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. -
404 Returned if the notification scheme is not found or the user does not have permission to view it. -
* @deprecated */ @Deprecated public ApiResponse getNotificationSchemeWithHttpInfo(Long id, String expand) throws ApiException { okhttp3.Call localVarCall = getNotificationSchemeValidateBeforeCall(id, expand, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get notification scheme (asynchronously) * Returns a [notification scheme](https://confluence.atlassian.com/x/8YdKLg), including the list of events and the recipients who will receive notifications for those events. Deprecated, use [Get notification schemes paginated](#api-rest-api-3-notificationscheme-get) supporting search and pagination. **[Permissions](#permissions) required:** Permission to access Jira, however, the user must have permission to administer at least one project associated with the notification scheme. * @param id The ID of the notification scheme. Use [Get notification schemes paginated](#api-rest-api-3-notificationscheme-get) to get a list of notification scheme IDs. (required) * @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: * `all` Returns all expandable information * `field` Returns information about any custom fields assigned to receive an event * `group` Returns information about any groups assigned to receive an event * `notificationSchemeEvents` Returns a list of event associations. This list is returned for all expandable information * `projectRole` Returns information about any project roles assigned to receive an event * `user` Returns information about any users assigned to receive an event (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 the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the notification scheme is not found or the user does not have permission to view it. -
* @deprecated */ @Deprecated public okhttp3.Call getNotificationSchemeAsync(Long id, String expand, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getNotificationSchemeValidateBeforeCall(id, expand, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getNotificationSchemeToProjectMappings * @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 50) * @param notificationSchemeId The list of notifications scheme IDs to be filtered out (optional) * @param projectId The list of project IDs to be filtered out (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 search criteria are invalid, strings vs numbers for projectId, notificationSchemeId, startAt and maxResult -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call getNotificationSchemeToProjectMappingsCall(String startAt, String maxResults, Set notificationSchemeId, Set projectId, 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/notificationscheme/project"; 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 (notificationSchemeId != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "notificationSchemeId", notificationSchemeId)); } if (projectId != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "projectId", projectId)); } 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 getNotificationSchemeToProjectMappingsValidateBeforeCall(String startAt, String maxResults, Set notificationSchemeId, Set projectId, final ApiCallback _callback) throws ApiException { return getNotificationSchemeToProjectMappingsCall(startAt, maxResults, notificationSchemeId, projectId, _callback); } /** * Get projects using notification schemes paginated * Returns a [paginated](#pagination) mapping of project that have notification scheme assigned. You can provide either one or multiple notification scheme IDs or project IDs to filter by. If you don't provide any, this will return a list of all mappings. Note that only company-managed (classic) projects are supported. This is because team-managed projects don't have a concept of a default notification scheme. The mappings are ordered by projectId. **[Permissions](#permissions) required:** Permission to access Jira. * @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 50) * @param notificationSchemeId The list of notifications scheme IDs to be filtered out (optional) * @param projectId The list of project IDs to be filtered out (optional) * @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. -
400 Returned if search criteria are invalid, strings vs numbers for projectId, notificationSchemeId, startAt and maxResult -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public Object getNotificationSchemeToProjectMappings(String startAt, String maxResults, Set notificationSchemeId, Set projectId) throws ApiException { ApiResponse localVarResp = getNotificationSchemeToProjectMappingsWithHttpInfo(startAt, maxResults, notificationSchemeId, projectId); return localVarResp.getData(); } /** * Get projects using notification schemes paginated * Returns a [paginated](#pagination) mapping of project that have notification scheme assigned. You can provide either one or multiple notification scheme IDs or project IDs to filter by. If you don't provide any, this will return a list of all mappings. Note that only company-managed (classic) projects are supported. This is because team-managed projects don't have a concept of a default notification scheme. The mappings are ordered by projectId. **[Permissions](#permissions) required:** Permission to access Jira. * @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 50) * @param notificationSchemeId The list of notifications scheme IDs to be filtered out (optional) * @param projectId The list of project IDs to be filtered out (optional) * @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. -
400 Returned if search criteria are invalid, strings vs numbers for projectId, notificationSchemeId, startAt and maxResult -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public ApiResponse getNotificationSchemeToProjectMappingsWithHttpInfo(String startAt, String maxResults, Set notificationSchemeId, Set projectId) throws ApiException { okhttp3.Call localVarCall = getNotificationSchemeToProjectMappingsValidateBeforeCall(startAt, maxResults, notificationSchemeId, projectId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get projects using notification schemes paginated (asynchronously) * Returns a [paginated](#pagination) mapping of project that have notification scheme assigned. You can provide either one or multiple notification scheme IDs or project IDs to filter by. If you don't provide any, this will return a list of all mappings. Note that only company-managed (classic) projects are supported. This is because team-managed projects don't have a concept of a default notification scheme. The mappings are ordered by projectId. **[Permissions](#permissions) required:** Permission to access Jira. * @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 50) * @param notificationSchemeId The list of notifications scheme IDs to be filtered out (optional) * @param projectId The list of project IDs to be filtered out (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 search criteria are invalid, strings vs numbers for projectId, notificationSchemeId, startAt and maxResult -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call getNotificationSchemeToProjectMappingsAsync(String startAt, String maxResults, Set notificationSchemeId, Set projectId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getNotificationSchemeToProjectMappingsValidateBeforeCall(startAt, maxResults, notificationSchemeId, projectId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getNotificationSchemes * @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 50) * @param id The list of notification schemes IDs to be filtered by (optional) * @param projectId The list of projects IDs to be filtered by (optional) * @param onlyDefault When set to true, returns only the default notification scheme. If you provide project IDs not associated with the default, returns an empty page. The default value is false. (optional, default to false) * @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: * `all` Returns all expandable information * `field` Returns information about any custom fields assigned to receive an event * `group` Returns information about any groups assigned to receive an event * `notificationSchemeEvents` Returns a list of event associations. This list is returned for all expandable information * `projectRole` Returns information about any project roles assigned to receive an event * `user` Returns information about any users assigned to receive an event (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. Only returns notification schemes that the user has permission to access. An empty list is returned if the user lacks permission to access all notification schemes. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call getNotificationSchemesCall(Long startAt, Integer maxResults, Set id, Set projectId, Boolean onlyDefault, 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/notificationscheme"; 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 (projectId != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "projectId", projectId)); } if (onlyDefault != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("onlyDefault", onlyDefault)); } 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 getNotificationSchemesValidateBeforeCall(Long startAt, Integer maxResults, Set id, Set projectId, Boolean onlyDefault, String expand, final ApiCallback _callback) throws ApiException { return getNotificationSchemesCall(startAt, maxResults, id, projectId, onlyDefault, expand, _callback); } /** * Get notification schemes paginated * Returns a [paginated](#pagination) list of [notification schemes](https://confluence.atlassian.com/x/8YdKLg) ordered by the display name. *Note that you should allow for events without recipients to appear in responses.* **[Permissions](#permissions) required:** Permission to access Jira, however, the user must have permission to administer at least one project associated with a notification scheme for it to be returned. * @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 50) * @param id The list of notification schemes IDs to be filtered by (optional) * @param projectId The list of projects IDs to be filtered by (optional) * @param onlyDefault When set to true, returns only the default notification scheme. If you provide project IDs not associated with the default, returns an empty page. The default value is false. (optional, default to false) * @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: * `all` Returns all expandable information * `field` Returns information about any custom fields assigned to receive an event * `group` Returns information about any groups assigned to receive an event * `notificationSchemeEvents` Returns a list of event associations. This list is returned for all expandable information * `projectRole` Returns information about any project roles assigned to receive an event * `user` Returns information about any users assigned to receive an event (optional) * @return PageBeanNotificationScheme * @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. Only returns notification schemes that the user has permission to access. An empty list is returned if the user lacks permission to access all notification schemes. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public PageBeanNotificationScheme getNotificationSchemes(Long startAt, Integer maxResults, Set id, Set projectId, Boolean onlyDefault, String expand) throws ApiException { ApiResponse localVarResp = getNotificationSchemesWithHttpInfo(startAt, maxResults, id, projectId, onlyDefault, expand); return localVarResp.getData(); } /** * Get notification schemes paginated * Returns a [paginated](#pagination) list of [notification schemes](https://confluence.atlassian.com/x/8YdKLg) ordered by the display name. *Note that you should allow for events without recipients to appear in responses.* **[Permissions](#permissions) required:** Permission to access Jira, however, the user must have permission to administer at least one project associated with a notification scheme for it to be returned. * @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 50) * @param id The list of notification schemes IDs to be filtered by (optional) * @param projectId The list of projects IDs to be filtered by (optional) * @param onlyDefault When set to true, returns only the default notification scheme. If you provide project IDs not associated with the default, returns an empty page. The default value is false. (optional, default to false) * @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: * `all` Returns all expandable information * `field` Returns information about any custom fields assigned to receive an event * `group` Returns information about any groups assigned to receive an event * `notificationSchemeEvents` Returns a list of event associations. This list is returned for all expandable information * `projectRole` Returns information about any project roles assigned to receive an event * `user` Returns information about any users assigned to receive an event (optional) * @return ApiResponse<PageBeanNotificationScheme> * @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. Only returns notification schemes that the user has permission to access. An empty list is returned if the user lacks permission to access all notification schemes. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public ApiResponse getNotificationSchemesWithHttpInfo(Long startAt, Integer maxResults, Set id, Set projectId, Boolean onlyDefault, String expand) throws ApiException { okhttp3.Call localVarCall = getNotificationSchemesValidateBeforeCall(startAt, maxResults, id, projectId, onlyDefault, expand, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get notification schemes paginated (asynchronously) * Returns a [paginated](#pagination) list of [notification schemes](https://confluence.atlassian.com/x/8YdKLg) ordered by the display name. *Note that you should allow for events without recipients to appear in responses.* **[Permissions](#permissions) required:** Permission to access Jira, however, the user must have permission to administer at least one project associated with a notification scheme for it to be returned. * @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 50) * @param id The list of notification schemes IDs to be filtered by (optional) * @param projectId The list of projects IDs to be filtered by (optional) * @param onlyDefault When set to true, returns only the default notification scheme. If you provide project IDs not associated with the default, returns an empty page. The default value is false. (optional, default to false) * @param expand Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: * `all` Returns all expandable information * `field` Returns information about any custom fields assigned to receive an event * `group` Returns information about any groups assigned to receive an event * `notificationSchemeEvents` Returns a list of event associations. This list is returned for all expandable information * `projectRole` Returns information about any project roles assigned to receive an event * `user` Returns information about any users assigned to receive an event (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. Only returns notification schemes that the user has permission to access. An empty list is returned if the user lacks permission to access all notification schemes. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call getNotificationSchemesAsync(Long startAt, Integer maxResults, Set id, Set projectId, Boolean onlyDefault, String expand, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getNotificationSchemesValidateBeforeCall(startAt, maxResults, id, projectId, onlyDefault, expand, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for removeNotificationFromNotificationScheme * @param notificationSchemeId The ID of the notification scheme. (required) * @param notificationId The ID of the notification. (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 isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if either the notification scheme or notification isn't found. -
*/ public okhttp3.Call removeNotificationFromNotificationSchemeCall(String notificationSchemeId, String notificationId, 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/notificationscheme/{notificationSchemeId}/notification/{notificationId}" .replace("{" + "notificationSchemeId" + "}", localVarApiClient.escapeString(notificationSchemeId.toString())) .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.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 removeNotificationFromNotificationSchemeValidateBeforeCall(String notificationSchemeId, String notificationId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'notificationSchemeId' is set if (notificationSchemeId == null) { throw new ApiException("Missing the required parameter 'notificationSchemeId' when calling removeNotificationFromNotificationScheme(Async)"); } // verify the required parameter 'notificationId' is set if (notificationId == null) { throw new ApiException("Missing the required parameter 'notificationId' when calling removeNotificationFromNotificationScheme(Async)"); } return removeNotificationFromNotificationSchemeCall(notificationSchemeId, notificationId, _callback); } /** * Remove notification from notification scheme * Removes a notification from a notification scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param notificationSchemeId The ID of the notification scheme. (required) * @param notificationId The ID of the notification. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if either the notification scheme or notification isn't found. -
*/ public Object removeNotificationFromNotificationScheme(String notificationSchemeId, String notificationId) throws ApiException { ApiResponse localVarResp = removeNotificationFromNotificationSchemeWithHttpInfo(notificationSchemeId, notificationId); return localVarResp.getData(); } /** * Remove notification from notification scheme * Removes a notification from a notification scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param notificationSchemeId The ID of the notification scheme. (required) * @param notificationId The ID of the notification. (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
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if either the notification scheme or notification isn't found. -
*/ public ApiResponse removeNotificationFromNotificationSchemeWithHttpInfo(String notificationSchemeId, String notificationId) throws ApiException { okhttp3.Call localVarCall = removeNotificationFromNotificationSchemeValidateBeforeCall(notificationSchemeId, notificationId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Remove notification from notification scheme (asynchronously) * Removes a notification from a notification scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param notificationSchemeId The ID of the notification scheme. (required) * @param notificationId The ID of the notification. (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 isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if either the notification scheme or notification isn't found. -
*/ public okhttp3.Call removeNotificationFromNotificationSchemeAsync(String notificationSchemeId, String notificationId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = removeNotificationFromNotificationSchemeValidateBeforeCall(notificationSchemeId, notificationId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateNotificationScheme * @param id The ID of the notification scheme. (required) * @param requestBody (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 isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the notification scheme isn't found. -
*/ public okhttp3.Call updateNotificationSchemeCall(String id, Map requestBody, 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 = requestBody; // create path and map variables String localVarPath = "/rest/api/3/notificationscheme/{id}" .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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateNotificationSchemeValidateBeforeCall(String id, Map requestBody, 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 updateNotificationScheme(Async)"); } // verify the required parameter 'requestBody' is set if (requestBody == null) { throw new ApiException("Missing the required parameter 'requestBody' when calling updateNotificationScheme(Async)"); } return updateNotificationSchemeCall(id, requestBody, _callback); } /** * Update notification scheme * Updates a notification scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the notification scheme. (required) * @param requestBody (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the notification scheme isn't found. -
*/ public Object updateNotificationScheme(String id, Map requestBody) throws ApiException { ApiResponse localVarResp = updateNotificationSchemeWithHttpInfo(id, requestBody); return localVarResp.getData(); } /** * Update notification scheme * Updates a notification scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the notification scheme. (required) * @param requestBody (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
204 Returned if the request is successful. -
400 Returned if the request isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the notification scheme isn't found. -
*/ public ApiResponse updateNotificationSchemeWithHttpInfo(String id, Map requestBody) throws ApiException { okhttp3.Call localVarCall = updateNotificationSchemeValidateBeforeCall(id, requestBody, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update notification scheme (asynchronously) * Updates a notification scheme. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param id The ID of the notification scheme. (required) * @param requestBody (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 isn't valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user doesn't have the necessary permission. -
404 Returned if the notification scheme isn't found. -
*/ public okhttp3.Call updateNotificationSchemeAsync(String id, Map requestBody, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateNotificationSchemeValidateBeforeCall(id, requestBody, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }