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

software.tnb.jira.validation.generated.api.GroupsApi 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.AddGroupBean;
import software.tnb.jira.validation.generated.model.FoundGroups;
import software.tnb.jira.validation.generated.model.Group;
import software.tnb.jira.validation.generated.model.PageBeanGroupDetails;
import software.tnb.jira.validation.generated.model.PageBeanUserDetails;
import java.util.Set;
import software.tnb.jira.validation.generated.model.UpdateUserToGroupBean;

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

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

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

    public GroupsApi(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 addUserToGroup
     * @param requestBody The user to add to the group. (required)
     * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group.   The name of the group. This parameter cannot be used with the `groupId` parameter. (optional)
     * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (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
201 Returned if the request is successful. -
400 Returned if: * `groupname` is not provided. * `accountId` is missing. -
401 Returned if the authentication credentials are incorrect or missing from the request. -
403 Returned if the calling user does not have the necessary permission. -
404 Returned if the group or user are not found. -
*/ public okhttp3.Call addUserToGroupCall(Map requestBody, String groupname, String groupId, 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/group/user"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (groupname != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupname", groupname)); } if (groupId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupId", groupId)); } 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 addUserToGroupValidateBeforeCall(Map requestBody, String groupname, String groupId, 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 addUserToGroup(Async)"); } return addUserToGroupCall(requestBody, groupname, groupId, _callback); } /** * Add user to group * Adds a user to a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)). * @param requestBody The user to add to the group. (required) * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @return Group * @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: * `groupname` is not provided. * `accountId` is missing. -
401 Returned if the authentication credentials are incorrect or missing from the request. -
403 Returned if the calling user does not have the necessary permission. -
404 Returned if the group or user are not found. -
*/ public Group addUserToGroup(Map requestBody, String groupname, String groupId) throws ApiException { ApiResponse localVarResp = addUserToGroupWithHttpInfo(requestBody, groupname, groupId); return localVarResp.getData(); } /** * Add user to group * Adds a user to a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)). * @param requestBody The user to add to the group. (required) * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @return ApiResponse<Group> * @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: * `groupname` is not provided. * `accountId` is missing. -
401 Returned if the authentication credentials are incorrect or missing from the request. -
403 Returned if the calling user does not have the necessary permission. -
404 Returned if the group or user are not found. -
*/ public ApiResponse addUserToGroupWithHttpInfo(Map requestBody, String groupname, String groupId) throws ApiException { okhttp3.Call localVarCall = addUserToGroupValidateBeforeCall(requestBody, groupname, groupId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add user to group (asynchronously) * Adds a user to a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)). * @param requestBody The user to add to the group. (required) * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (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
201 Returned if the request is successful. -
400 Returned if: * `groupname` is not provided. * `accountId` is missing. -
401 Returned if the authentication credentials are incorrect or missing from the request. -
403 Returned if the calling user does not have the necessary permission. -
404 Returned if the group or user are not found. -
*/ public okhttp3.Call addUserToGroupAsync(Map requestBody, String groupname, String groupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addUserToGroupValidateBeforeCall(requestBody, groupname, groupId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for bulkGetGroups * @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 groupId The ID of a group. To specify multiple IDs, pass multiple `groupId` parameters. For example, `groupId=5b10a2844c20165700ede21g&groupId=5b10ac8d82e05b22cc7d4ef5`. (optional) * @param groupName The name of a group. To specify multiple names, pass multiple `groupName` parameters. For example, `groupName=administrators&groupName=jira-software-users`. (optional) * @param accessType The access level of a group. Valid values: 'site-admin', 'admin', 'user'. (optional) * @param applicationKey The application key of the product user groups to search for. Valid values: 'jira-servicedesk', 'jira-software', 'jira-product-discovery', 'jira-core'. (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 not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
500 Returned if the group with the given access level can't be retrieved. -
*/ public okhttp3.Call bulkGetGroupsCall(Long startAt, Integer maxResults, Set groupId, Set groupName, String accessType, String applicationKey, 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/group/bulk"; 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 (groupId != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "groupId", groupId)); } if (groupName != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "groupName", groupName)); } if (accessType != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("accessType", accessType)); } if (applicationKey != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("applicationKey", applicationKey)); } 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 bulkGetGroupsValidateBeforeCall(Long startAt, Integer maxResults, Set groupId, Set groupName, String accessType, String applicationKey, final ApiCallback _callback) throws ApiException { return bulkGetGroupsCall(startAt, maxResults, groupId, groupName, accessType, applicationKey, _callback); } /** * Bulk get groups * Returns a [paginated](#pagination) list of groups. **[Permissions](#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 50) * @param groupId The ID of a group. To specify multiple IDs, pass multiple `groupId` parameters. For example, `groupId=5b10a2844c20165700ede21g&groupId=5b10ac8d82e05b22cc7d4ef5`. (optional) * @param groupName The name of a group. To specify multiple names, pass multiple `groupName` parameters. For example, `groupName=administrators&groupName=jira-software-users`. (optional) * @param accessType The access level of a group. Valid values: 'site-admin', 'admin', 'user'. (optional) * @param applicationKey The application key of the product user groups to search for. Valid values: 'jira-servicedesk', 'jira-software', 'jira-product-discovery', 'jira-core'. (optional) * @return PageBeanGroupDetails * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
500 Returned if the group with the given access level can't be retrieved. -
*/ public PageBeanGroupDetails bulkGetGroups(Long startAt, Integer maxResults, Set groupId, Set groupName, String accessType, String applicationKey) throws ApiException { ApiResponse localVarResp = bulkGetGroupsWithHttpInfo(startAt, maxResults, groupId, groupName, accessType, applicationKey); return localVarResp.getData(); } /** * Bulk get groups * Returns a [paginated](#pagination) list of groups. **[Permissions](#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 50) * @param groupId The ID of a group. To specify multiple IDs, pass multiple `groupId` parameters. For example, `groupId=5b10a2844c20165700ede21g&groupId=5b10ac8d82e05b22cc7d4ef5`. (optional) * @param groupName The name of a group. To specify multiple names, pass multiple `groupName` parameters. For example, `groupName=administrators&groupName=jira-software-users`. (optional) * @param accessType The access level of a group. Valid values: 'site-admin', 'admin', 'user'. (optional) * @param applicationKey The application key of the product user groups to search for. Valid values: 'jira-servicedesk', 'jira-software', 'jira-product-discovery', 'jira-core'. (optional) * @return ApiResponse<PageBeanGroupDetails> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
500 Returned if the group with the given access level can't be retrieved. -
*/ public ApiResponse bulkGetGroupsWithHttpInfo(Long startAt, Integer maxResults, Set groupId, Set groupName, String accessType, String applicationKey) throws ApiException { okhttp3.Call localVarCall = bulkGetGroupsValidateBeforeCall(startAt, maxResults, groupId, groupName, accessType, applicationKey, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Bulk get groups (asynchronously) * Returns a [paginated](#pagination) list of groups. **[Permissions](#permissions) required:** *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 50) * @param groupId The ID of a group. To specify multiple IDs, pass multiple `groupId` parameters. For example, `groupId=5b10a2844c20165700ede21g&groupId=5b10ac8d82e05b22cc7d4ef5`. (optional) * @param groupName The name of a group. To specify multiple names, pass multiple `groupName` parameters. For example, `groupName=administrators&groupName=jira-software-users`. (optional) * @param accessType The access level of a group. Valid values: 'site-admin', 'admin', 'user'. (optional) * @param applicationKey The application key of the product user groups to search for. Valid values: 'jira-servicedesk', 'jira-software', 'jira-product-discovery', 'jira-core'. (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 not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
500 Returned if the group with the given access level can't be retrieved. -
*/ public okhttp3.Call bulkGetGroupsAsync(Long startAt, Integer maxResults, Set groupId, Set groupName, String accessType, String applicationKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = bulkGetGroupsValidateBeforeCall(startAt, maxResults, groupId, groupName, accessType, applicationKey, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createGroup * @param requestBody The name of the group. (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 group name is not specified or the group name is in use. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
*/ public okhttp3.Call createGroupCall(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/group"; 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 createGroupValidateBeforeCall(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 createGroup(Async)"); } return createGroupCall(requestBody, _callback); } /** * Create group * Creates a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)). * @param requestBody The name of the group. (required) * @return Group * @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 group name is not specified or the group name is in use. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
*/ public Group createGroup(Map requestBody) throws ApiException { ApiResponse localVarResp = createGroupWithHttpInfo(requestBody); return localVarResp.getData(); } /** * Create group * Creates a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)). * @param requestBody The name of the group. (required) * @return ApiResponse<Group> * @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 group name is not specified or the group name is in use. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
*/ public ApiResponse createGroupWithHttpInfo(Map requestBody) throws ApiException { okhttp3.Call localVarCall = createGroupValidateBeforeCall(requestBody, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create group (asynchronously) * Creates a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)). * @param requestBody The name of the group. (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 group name is not specified or the group name is in use. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
*/ public okhttp3.Call createGroupAsync(Map requestBody, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createGroupValidateBeforeCall(requestBody, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for findGroups * @param accountId This parameter is deprecated, setting it does not affect the results. To find groups containing a particular user, use [Get user groups](#api-rest-api-3-user-groups-get). (optional) * @param query The string to find in group names. (optional) * @param exclude As a group's name can change, use of `excludeGroupIds` is recommended to identify a group. A group to exclude from the result. To exclude multiple groups, provide an ampersand-separated list. For example, `exclude=group1&exclude=group2`. This parameter cannot be used with the `excludeGroupIds` parameter. (optional) * @param excludeId A group ID to exclude from the result. To exclude multiple groups, provide an ampersand-separated list. For example, `excludeId=group1-id&excludeId=group2-id`. This parameter cannot be used with the `excludeGroups` parameter. (optional) * @param maxResults The maximum number of groups to return. The maximum number of groups that can be returned is limited by the system property `jira.ajax.autocomplete.limit`. (optional) * @param caseInsensitive Whether the search for groups should be case insensitive. (optional) * @param userName This parameter is no longer available. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (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. -
*/ public okhttp3.Call findGroupsCall(String accountId, String query, List exclude, List excludeId, Integer maxResults, Boolean caseInsensitive, String userName, 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/groups/picker"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (accountId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("accountId", accountId)); } if (query != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); } if (exclude != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "exclude", exclude)); } if (excludeId != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "excludeId", excludeId)); } if (maxResults != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxResults", maxResults)); } if (caseInsensitive != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("caseInsensitive", caseInsensitive)); } if (userName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("userName", userName)); } 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 findGroupsValidateBeforeCall(String accountId, String query, List exclude, List excludeId, Integer maxResults, Boolean caseInsensitive, String userName, final ApiCallback _callback) throws ApiException { return findGroupsCall(accountId, query, exclude, excludeId, maxResults, caseInsensitive, userName, _callback); } /** * Find groups * Returns a list of groups whose names contain a query string. A list of group names can be provided to exclude groups from the results. The primary use case for this resource is to populate a group picker suggestions list. To this end, the returned object includes the `html` field where the matched query term is highlighted in the group name with the HTML strong tag. Also, the groups list is wrapped in a response object that contains a header for use in the picker, specifically *Showing X of Y matching groups*. The list returns with the groups sorted. If no groups match the list criteria, an empty list is returned. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg). Anonymous calls and calls by users without the required permission return an empty list. *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). Without this permission, calls where query is not an exact match to an existing group will return an empty list. * @param accountId This parameter is deprecated, setting it does not affect the results. To find groups containing a particular user, use [Get user groups](#api-rest-api-3-user-groups-get). (optional) * @param query The string to find in group names. (optional) * @param exclude As a group's name can change, use of `excludeGroupIds` is recommended to identify a group. A group to exclude from the result. To exclude multiple groups, provide an ampersand-separated list. For example, `exclude=group1&exclude=group2`. This parameter cannot be used with the `excludeGroupIds` parameter. (optional) * @param excludeId A group ID to exclude from the result. To exclude multiple groups, provide an ampersand-separated list. For example, `excludeId=group1-id&excludeId=group2-id`. This parameter cannot be used with the `excludeGroups` parameter. (optional) * @param maxResults The maximum number of groups to return. The maximum number of groups that can be returned is limited by the system property `jira.ajax.autocomplete.limit`. (optional) * @param caseInsensitive Whether the search for groups should be case insensitive. (optional) * @param userName This parameter is no longer available. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional) * @return FoundGroups * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
*/ public FoundGroups findGroups(String accountId, String query, List exclude, List excludeId, Integer maxResults, Boolean caseInsensitive, String userName) throws ApiException { ApiResponse localVarResp = findGroupsWithHttpInfo(accountId, query, exclude, excludeId, maxResults, caseInsensitive, userName); return localVarResp.getData(); } /** * Find groups * Returns a list of groups whose names contain a query string. A list of group names can be provided to exclude groups from the results. The primary use case for this resource is to populate a group picker suggestions list. To this end, the returned object includes the `html` field where the matched query term is highlighted in the group name with the HTML strong tag. Also, the groups list is wrapped in a response object that contains a header for use in the picker, specifically *Showing X of Y matching groups*. The list returns with the groups sorted. If no groups match the list criteria, an empty list is returned. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg). Anonymous calls and calls by users without the required permission return an empty list. *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). Without this permission, calls where query is not an exact match to an existing group will return an empty list. * @param accountId This parameter is deprecated, setting it does not affect the results. To find groups containing a particular user, use [Get user groups](#api-rest-api-3-user-groups-get). (optional) * @param query The string to find in group names. (optional) * @param exclude As a group's name can change, use of `excludeGroupIds` is recommended to identify a group. A group to exclude from the result. To exclude multiple groups, provide an ampersand-separated list. For example, `exclude=group1&exclude=group2`. This parameter cannot be used with the `excludeGroupIds` parameter. (optional) * @param excludeId A group ID to exclude from the result. To exclude multiple groups, provide an ampersand-separated list. For example, `excludeId=group1-id&excludeId=group2-id`. This parameter cannot be used with the `excludeGroups` parameter. (optional) * @param maxResults The maximum number of groups to return. The maximum number of groups that can be returned is limited by the system property `jira.ajax.autocomplete.limit`. (optional) * @param caseInsensitive Whether the search for groups should be case insensitive. (optional) * @param userName This parameter is no longer available. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional) * @return ApiResponse<FoundGroups> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
*/ public ApiResponse findGroupsWithHttpInfo(String accountId, String query, List exclude, List excludeId, Integer maxResults, Boolean caseInsensitive, String userName) throws ApiException { okhttp3.Call localVarCall = findGroupsValidateBeforeCall(accountId, query, exclude, excludeId, maxResults, caseInsensitive, userName, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Find groups (asynchronously) * Returns a list of groups whose names contain a query string. A list of group names can be provided to exclude groups from the results. The primary use case for this resource is to populate a group picker suggestions list. To this end, the returned object includes the `html` field where the matched query term is highlighted in the group name with the HTML strong tag. Also, the groups list is wrapped in a response object that contains a header for use in the picker, specifically *Showing X of Y matching groups*. The list returns with the groups sorted. If no groups match the list criteria, an empty list is returned. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg). Anonymous calls and calls by users without the required permission return an empty list. *Browse users and groups* [global permission](https://confluence.atlassian.com/x/x4dKLg). Without this permission, calls where query is not an exact match to an existing group will return an empty list. * @param accountId This parameter is deprecated, setting it does not affect the results. To find groups containing a particular user, use [Get user groups](#api-rest-api-3-user-groups-get). (optional) * @param query The string to find in group names. (optional) * @param exclude As a group's name can change, use of `excludeGroupIds` is recommended to identify a group. A group to exclude from the result. To exclude multiple groups, provide an ampersand-separated list. For example, `exclude=group1&exclude=group2`. This parameter cannot be used with the `excludeGroupIds` parameter. (optional) * @param excludeId A group ID to exclude from the result. To exclude multiple groups, provide an ampersand-separated list. For example, `excludeId=group1-id&excludeId=group2-id`. This parameter cannot be used with the `excludeGroups` parameter. (optional) * @param maxResults The maximum number of groups to return. The maximum number of groups that can be returned is limited by the system property `jira.ajax.autocomplete.limit`. (optional) * @param caseInsensitive Whether the search for groups should be case insensitive. (optional) * @param userName This parameter is no longer available. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (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. -
*/ public okhttp3.Call findGroupsAsync(String accountId, String query, List exclude, List excludeId, Integer maxResults, Boolean caseInsensitive, String userName, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = findGroupsValidateBeforeCall(accountId, query, exclude, excludeId, maxResults, caseInsensitive, userName, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getGroup * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param expand List of fields to expand. (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 group name is not specified. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the calling user does not have the Administer Jira global permission. -
404 Returned if the group is not found. -
* @deprecated */ @Deprecated public okhttp3.Call getGroupCall(String groupname, String groupId, 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/group"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (groupname != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupname", groupname)); } if (groupId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupId", groupId)); } 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 getGroupValidateBeforeCall(String groupname, String groupId, String expand, final ApiCallback _callback) throws ApiException { return getGroupCall(groupname, groupId, expand, _callback); } /** * Get group * This operation is deprecated, use [`group/member`](#api-rest-api-3-group-member-get). Returns all users in a group. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param expand List of fields to expand. (optional) * @return Group * @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 group name is not specified. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the calling user does not have the Administer Jira global permission. -
404 Returned if the group is not found. -
* @deprecated */ @Deprecated public Group getGroup(String groupname, String groupId, String expand) throws ApiException { ApiResponse localVarResp = getGroupWithHttpInfo(groupname, groupId, expand); return localVarResp.getData(); } /** * Get group * This operation is deprecated, use [`group/member`](#api-rest-api-3-group-member-get). Returns all users in a group. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param expand List of fields to expand. (optional) * @return ApiResponse<Group> * @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 group name is not specified. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the calling user does not have the Administer Jira global permission. -
404 Returned if the group is not found. -
* @deprecated */ @Deprecated public ApiResponse getGroupWithHttpInfo(String groupname, String groupId, String expand) throws ApiException { okhttp3.Call localVarCall = getGroupValidateBeforeCall(groupname, groupId, expand, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get group (asynchronously) * This operation is deprecated, use [`group/member`](#api-rest-api-3-group-member-get). Returns all users in a group. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param expand List of fields to expand. (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 group name is not specified. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the calling user does not have the Administer Jira global permission. -
404 Returned if the group is not found. -
* @deprecated */ @Deprecated public okhttp3.Call getGroupAsync(String groupname, String groupId, String expand, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupValidateBeforeCall(groupname, groupId, expand, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getUsersFromGroup * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param includeInactiveUsers Include inactive users. (optional, default to false) * @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 _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 group name is not specified. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the calling user does not have the Administer Jira global permission. -
404 Returned if the group is not found. -
*/ public okhttp3.Call getUsersFromGroupCall(String groupname, String groupId, Boolean includeInactiveUsers, Long startAt, Integer maxResults, 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/group/member"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (groupname != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupname", groupname)); } if (groupId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupId", groupId)); } if (includeInactiveUsers != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeInactiveUsers", includeInactiveUsers)); } if (startAt != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAt", startAt)); } if (maxResults != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxResults", maxResults)); } 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 getUsersFromGroupValidateBeforeCall(String groupname, String groupId, Boolean includeInactiveUsers, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { return getUsersFromGroupCall(groupname, groupId, includeInactiveUsers, startAt, maxResults, _callback); } /** * Get users from group * Returns a [paginated](#pagination) list of all users in a group. Note that users are ordered by username, however the username is not returned in the results due to privacy reasons. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param includeInactiveUsers Include inactive users. (optional, default to false) * @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) * @return PageBeanUserDetails * @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 group name is not specified. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the calling user does not have the Administer Jira global permission. -
404 Returned if the group is not found. -
*/ public PageBeanUserDetails getUsersFromGroup(String groupname, String groupId, Boolean includeInactiveUsers, Long startAt, Integer maxResults) throws ApiException { ApiResponse localVarResp = getUsersFromGroupWithHttpInfo(groupname, groupId, includeInactiveUsers, startAt, maxResults); return localVarResp.getData(); } /** * Get users from group * Returns a [paginated](#pagination) list of all users in a group. Note that users are ordered by username, however the username is not returned in the results due to privacy reasons. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param includeInactiveUsers Include inactive users. (optional, default to false) * @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) * @return ApiResponse<PageBeanUserDetails> * @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 group name is not specified. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the calling user does not have the Administer Jira global permission. -
404 Returned if the group is not found. -
*/ public ApiResponse getUsersFromGroupWithHttpInfo(String groupname, String groupId, Boolean includeInactiveUsers, Long startAt, Integer maxResults) throws ApiException { okhttp3.Call localVarCall = getUsersFromGroupValidateBeforeCall(groupname, groupId, includeInactiveUsers, startAt, maxResults, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get users from group (asynchronously) * Returns a [paginated](#pagination) list of all users in a group. Note that users are ordered by username, however the username is not returned in the results due to privacy reasons. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param includeInactiveUsers Include inactive users. (optional, default to false) * @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 _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 group name is not specified. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the calling user does not have the Administer Jira global permission. -
404 Returned if the group is not found. -
*/ public okhttp3.Call getUsersFromGroupAsync(String groupname, String groupId, Boolean includeInactiveUsers, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUsersFromGroupValidateBeforeCall(groupname, groupId, includeInactiveUsers, startAt, maxResults, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for removeGroup * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param swapGroup As a group's name can change, use of `swapGroupId` is recommended to identify a group. The group to transfer restrictions to. Only comments and worklogs are transferred. If restrictions are not transferred, comments and worklogs are inaccessible after the deletion. This parameter cannot be used with the `swapGroupId` parameter. (optional) * @param swapGroupId The ID of the group to transfer restrictions to. Only comments and worklogs are transferred. If restrictions are not transferred, comments and worklogs are inaccessible after the deletion. This parameter cannot be used with the `swapGroup` parameter. (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 group name is not specified. -
401 Returned if the authentication credentials are incorrect or missing from the request. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the group is not found. -
*/ public okhttp3.Call removeGroupCall(String groupname, String groupId, String swapGroup, String swapGroupId, 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/group"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (groupname != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupname", groupname)); } if (groupId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupId", groupId)); } if (swapGroup != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("swapGroup", swapGroup)); } if (swapGroupId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("swapGroupId", swapGroupId)); } 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 removeGroupValidateBeforeCall(String groupname, String groupId, String swapGroup, String swapGroupId, final ApiCallback _callback) throws ApiException { return removeGroupCall(groupname, groupId, swapGroup, swapGroupId, _callback); } /** * Remove group * Deletes a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* strategic [group](https://confluence.atlassian.com/x/24xjL)). * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param swapGroup As a group's name can change, use of `swapGroupId` is recommended to identify a group. The group to transfer restrictions to. Only comments and worklogs are transferred. If restrictions are not transferred, comments and worklogs are inaccessible after the deletion. This parameter cannot be used with the `swapGroupId` parameter. (optional) * @param swapGroupId The ID of the group to transfer restrictions to. Only comments and worklogs are transferred. If restrictions are not transferred, comments and worklogs are inaccessible after the deletion. This parameter cannot be used with the `swapGroup` parameter. (optional) * @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 group name is not specified. -
401 Returned if the authentication credentials are incorrect or missing from the request. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the group is not found. -
*/ public void removeGroup(String groupname, String groupId, String swapGroup, String swapGroupId) throws ApiException { removeGroupWithHttpInfo(groupname, groupId, swapGroup, swapGroupId); } /** * Remove group * Deletes a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* strategic [group](https://confluence.atlassian.com/x/24xjL)). * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param swapGroup As a group's name can change, use of `swapGroupId` is recommended to identify a group. The group to transfer restrictions to. Only comments and worklogs are transferred. If restrictions are not transferred, comments and worklogs are inaccessible after the deletion. This parameter cannot be used with the `swapGroupId` parameter. (optional) * @param swapGroupId The ID of the group to transfer restrictions to. Only comments and worklogs are transferred. If restrictions are not transferred, comments and worklogs are inaccessible after the deletion. This parameter cannot be used with the `swapGroup` parameter. (optional) * @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
200 Returned if the request is successful. -
400 Returned if the group name is not specified. -
401 Returned if the authentication credentials are incorrect or missing from the request. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the group is not found. -
*/ public ApiResponse removeGroupWithHttpInfo(String groupname, String groupId, String swapGroup, String swapGroupId) throws ApiException { okhttp3.Call localVarCall = removeGroupValidateBeforeCall(groupname, groupId, swapGroup, swapGroupId, null); return localVarApiClient.execute(localVarCall); } /** * Remove group (asynchronously) * Deletes a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* strategic [group](https://confluence.atlassian.com/x/24xjL)). * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param swapGroup As a group's name can change, use of `swapGroupId` is recommended to identify a group. The group to transfer restrictions to. Only comments and worklogs are transferred. If restrictions are not transferred, comments and worklogs are inaccessible after the deletion. This parameter cannot be used with the `swapGroupId` parameter. (optional) * @param swapGroupId The ID of the group to transfer restrictions to. Only comments and worklogs are transferred. If restrictions are not transferred, comments and worklogs are inaccessible after the deletion. This parameter cannot be used with the `swapGroup` parameter. (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 group name is not specified. -
401 Returned if the authentication credentials are incorrect or missing from the request. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the group is not found. -
*/ public okhttp3.Call removeGroupAsync(String groupname, String groupId, String swapGroup, String swapGroupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = removeGroupValidateBeforeCall(groupname, groupId, swapGroup, swapGroupId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for removeUserFromGroup * @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (required) * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param username This parameter is no longer available. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (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: * `groupName` is missing. * `accountId` is missing. -
401 Returned if the authentication credentials are incorrect or missing from the request. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the group or user are not found. -
*/ public okhttp3.Call removeUserFromGroupCall(String accountId, String groupname, String groupId, String username, 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/group/user"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (groupname != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupname", groupname)); } if (groupId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupId", groupId)); } if (username != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username)); } if (accountId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("accountId", accountId)); } 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 removeUserFromGroupValidateBeforeCall(String accountId, String groupname, String groupId, String username, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling removeUserFromGroup(Async)"); } return removeUserFromGroupCall(accountId, groupname, groupId, username, _callback); } /** * Remove user from group * Removes a user from a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)). * @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (required) * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param username This parameter is no longer available. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional) * @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: * `groupName` is missing. * `accountId` is missing. -
401 Returned if the authentication credentials are incorrect or missing from the request. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the group or user are not found. -
*/ public void removeUserFromGroup(String accountId, String groupname, String groupId, String username) throws ApiException { removeUserFromGroupWithHttpInfo(accountId, groupname, groupId, username); } /** * Remove user from group * Removes a user from a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)). * @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (required) * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param username This parameter is no longer available. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional) * @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
200 Returned if the request is successful. -
400 Returned if: * `groupName` is missing. * `accountId` is missing. -
401 Returned if the authentication credentials are incorrect or missing from the request. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the group or user are not found. -
*/ public ApiResponse removeUserFromGroupWithHttpInfo(String accountId, String groupname, String groupId, String username) throws ApiException { okhttp3.Call localVarCall = removeUserFromGroupValidateBeforeCall(accountId, groupname, groupId, username, null); return localVarApiClient.execute(localVarCall); } /** * Remove user from group (asynchronously) * Removes a user from a group. **[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)). * @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (required) * @param groupname As a group's name can change, use of `groupId` is recommended to identify a group. The name of the group. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId The ID of the group. This parameter cannot be used with the `groupName` parameter. (optional) * @param username This parameter is no longer available. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (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: * `groupName` is missing. * `accountId` is missing. -
401 Returned if the authentication credentials are incorrect or missing from the request. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the group or user are not found. -
*/ public okhttp3.Call removeUserFromGroupAsync(String accountId, String groupname, String groupId, String username, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = removeUserFromGroupValidateBeforeCall(accountId, groupname, groupId, username, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy