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

com.seeq.api.UserGroupsApi Maven / Gradle / Ivy

There is a newer version: 66.0.0-v202410141803
Show newest version
package com.seeq.api;

import com.seeq.ApiException;
import com.seeq.ApiClient;
import com.seeq.Configuration;
import com.seeq.model.*;
import com.seeq.Pair;

import javax.ws.rs.core.GenericType;
import javax.ws.rs.ProcessingException;

import com.seeq.model.IdentityPreviewListV1;
import com.seeq.model.ItemBatchOutputV1;
import com.seeq.model.PutUserGroupsInputV1;
import com.seeq.model.StatusMessageBase;
import com.seeq.model.UserGroupInputV1;
import com.seeq.model.UserGroupOutputV1;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class UserGroupsApi {
    private ApiClient apiClient;
    private long retryTimeout = 5_000; // Default of 5 seconds

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

    public UserGroupsApi(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    public void setRetryTimeout(long retryTimeout) {
        this.retryTimeout = retryTimeout;
    }

    public long getRetryTimeout() {
        return this.retryTimeout;
    }

    public ApiClient getApiClient() {
        return apiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    /**
    * Add a user to a user group
    * 
    * @param userGroupId ID of the user group to add user or user group to (required)
    * @param identityId ID of the user or user group to add. (required)
    * @return UserGroupOutputV1
    * @throws ApiException if fails to make API call
    */
    public UserGroupOutputV1 addIdentityToUserGroup(String userGroupId, String identityId) throws ApiException {
        ApiClient.ApiResponse localVarResponse = addIdentityToUserGroupWithHttpInfo(userGroupId, identityId);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Add a user to a user group
    * 
    * @param userGroupId ID of the user group to add user or user group to (required)
    * @param identityId ID of the user or user group to add. (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse addIdentityToUserGroupWithHttpInfo(String userGroupId, String identityId) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return addIdentityToUserGroupWithHeadersAndHttpInfo(userGroupId, identityId, localVarHeaderParams);
        
    }

    /**
    * Add a user to a user group
    * 
    * @param userGroupId ID of the user group to add user or user group to (required)
    * @param identityId ID of the user or user group to add. (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse addIdentityToUserGroupWithHeadersAndHttpInfo(String userGroupId, String identityId, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return addIdentityToUserGroupInternal(userGroupId, identityId, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse addIdentityToUserGroupInternal(String userGroupId, String identityId, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'userGroupId' is set
        if (userGroupId == null) {
            throw new ApiException(400, "Missing the required path parameter 'userGroupId' when calling addIdentityToUserGroup");
        }
        // verify the required path parameter 'identityId' is set
        if (identityId == null) {
            throw new ApiException(400, "Missing the required path parameter 'identityId' when calling addIdentityToUserGroup");
        }
        // create path and map variables
        String localVarPath = "/usergroups/{userGroupId}/{identityId}"
          .replaceAll("\\{" + "userGroupId" + "\\}", apiClient.escapeString(userGroupId.toString()))
          .replaceAll("\\{" + "identityId" + "\\}", apiClient.escapeString(identityId.toString()));

        // query params
        Map localVarFormParams = new HashMap();

        
        final String[] localVarAccepts = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "api_key" };

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    /**
    * Archive a user group
    * 
    * @param userGroupId ID of user group to archive (required)
    * @param removePermissions Whether to remove permissions associated with the group being archived (optional, default to false)
    * @return UserGroupOutputV1
    * @throws ApiException if fails to make API call
    */
    public UserGroupOutputV1 archiveUserGroup(String userGroupId, Boolean removePermissions) throws ApiException {
        ApiClient.ApiResponse localVarResponse = archiveUserGroupWithHttpInfo(userGroupId, removePermissions);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Archive a user group
    * 
    * @param userGroupId ID of user group to archive (required)
    * @param removePermissions Whether to remove permissions associated with the group being archived (optional, default to false)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse archiveUserGroupWithHttpInfo(String userGroupId, Boolean removePermissions) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return archiveUserGroupWithHeadersAndHttpInfo(userGroupId, removePermissions, localVarHeaderParams);
        
    }

    /**
    * Archive a user group
    * 
    * @param userGroupId ID of user group to archive (required)
    * @param removePermissions Whether to remove permissions associated with the group being archived (optional, default to false)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse archiveUserGroupWithHeadersAndHttpInfo(String userGroupId, Boolean removePermissions, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "removePermissions", removePermissions));
                localVarHeaderParams.putAll(customHeaders);
        return archiveUserGroupInternal(userGroupId, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse archiveUserGroupInternal(String userGroupId, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'userGroupId' is set
        if (userGroupId == null) {
            throw new ApiException(400, "Missing the required path parameter 'userGroupId' when calling archiveUserGroup");
        }
        // create path and map variables
        String localVarPath = "/usergroups/{userGroupId}/archive"
          .replaceAll("\\{" + "userGroupId" + "\\}", apiClient.escapeString(userGroupId.toString()));

        // query params
        Map localVarFormParams = new HashMap();

        
        final String[] localVarAccepts = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "api_key" };

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    /**
    * Create a user group hosted within Seeq
    * 
    * @param body User group information (required)
    * @return UserGroupOutputV1
    * @throws ApiException if fails to make API call
    */
    public UserGroupOutputV1 createUserGroup(UserGroupInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = createUserGroupWithHttpInfo(body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Create a user group hosted within Seeq
    * 
    * @param body User group information (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse createUserGroupWithHttpInfo(UserGroupInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return createUserGroupWithHeadersAndHttpInfo(body, localVarHeaderParams);
        
    }

    /**
    * Create a user group hosted within Seeq
    * 
    * @param body User group information (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse createUserGroupWithHeadersAndHttpInfo(UserGroupInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return createUserGroupInternal(body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse createUserGroupInternal(UserGroupInputV1 body, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = body;
        // verify the required body parameter 'body' is set
        if (body == null) {
            throw new ApiException(400, "Missing the required body parameter 'body' when calling createUserGroup");
        }
        // create path and map variables
        String localVarPath = "/usergroups";

        // query params
        Map localVarFormParams = new HashMap();

        
        final String[] localVarAccepts = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "api_key" };

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    /**
    * Disable a user group
    * 
    * @param userGroupId ID of user group to disable (required)
    * @param removePermissions Whether to remove permissions associated with the group being disabled (optional, default to false)
    * @return UserGroupOutputV1
    * @throws ApiException if fails to make API call
    */
    public UserGroupOutputV1 disableUserGroup(String userGroupId, Boolean removePermissions) throws ApiException {
        ApiClient.ApiResponse localVarResponse = disableUserGroupWithHttpInfo(userGroupId, removePermissions);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Disable a user group
    * 
    * @param userGroupId ID of user group to disable (required)
    * @param removePermissions Whether to remove permissions associated with the group being disabled (optional, default to false)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse disableUserGroupWithHttpInfo(String userGroupId, Boolean removePermissions) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return disableUserGroupWithHeadersAndHttpInfo(userGroupId, removePermissions, localVarHeaderParams);
        
    }

    /**
    * Disable a user group
    * 
    * @param userGroupId ID of user group to disable (required)
    * @param removePermissions Whether to remove permissions associated with the group being disabled (optional, default to false)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse disableUserGroupWithHeadersAndHttpInfo(String userGroupId, Boolean removePermissions, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "removePermissions", removePermissions));
                localVarHeaderParams.putAll(customHeaders);
        return disableUserGroupInternal(userGroupId, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse disableUserGroupInternal(String userGroupId, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'userGroupId' is set
        if (userGroupId == null) {
            throw new ApiException(400, "Missing the required path parameter 'userGroupId' when calling disableUserGroup");
        }
        // create path and map variables
        String localVarPath = "/usergroups/{userGroupId}/disable"
          .replaceAll("\\{" + "userGroupId" + "\\}", apiClient.escapeString(userGroupId.toString()));

        // query params
        Map localVarFormParams = new HashMap();

        
        final String[] localVarAccepts = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "api_key" };

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    /**
    * Get a user group
    * 
    * @param userGroupId ID of the user group to get (required)
    * @return UserGroupOutputV1
    * @throws ApiException if fails to make API call
    */
    public UserGroupOutputV1 getUserGroup(String userGroupId) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getUserGroupWithHttpInfo(userGroupId);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get a user group
    * 
    * @param userGroupId ID of the user group to get (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupWithHttpInfo(String userGroupId) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getUserGroupWithHeadersAndHttpInfo(userGroupId, localVarHeaderParams);
        
    }

    /**
    * Get a user group
    * 
    * @param userGroupId ID of the user group to get (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupWithHeadersAndHttpInfo(String userGroupId, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return getUserGroupInternal(userGroupId, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getUserGroupInternal(String userGroupId, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'userGroupId' is set
        if (userGroupId == null) {
            throw new ApiException(400, "Missing the required path parameter 'userGroupId' when calling getUserGroup");
        }
        // create path and map variables
        String localVarPath = "/usergroups/{userGroupId}"
          .replaceAll("\\{" + "userGroupId" + "\\}", apiClient.escapeString(userGroupId.toString()));

        // query params
        Map localVarFormParams = new HashMap();

        
        final String[] localVarAccepts = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {
        
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "api_key" };

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    /**
    * Get a collection of usergroups
    * 
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @param isEnabled Whether to filter users to only users who are enabled. (optional)
    * @param sortOrder A field by which to order the user groups followed by a space and 'asc' or 'desc'. Field name can be one of: name, directory (optional, default to name asc)
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
    * @param limit The pagination level, the total number of collection items that will be returned in this page of results (optional, default to 40)
    * @return IdentityPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public IdentityPreviewListV1 getUserGroups(String nameSearch, String datasourceIdSearch, Boolean isEnabled, String sortOrder, Integer offset, Integer limit) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getUserGroupsWithHttpInfo(nameSearch, datasourceIdSearch, isEnabled, sortOrder, offset, limit);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get a collection of usergroups
    * 
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @param isEnabled Whether to filter users to only users who are enabled. (optional)
    * @param sortOrder A field by which to order the user groups followed by a space and 'asc' or 'desc'. Field name can be one of: name, directory (optional, default to name asc)
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
    * @param limit The pagination level, the total number of collection items that will be returned in this page of results (optional, default to 40)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHttpInfo(String nameSearch, String datasourceIdSearch, Boolean isEnabled, String sortOrder, Integer offset, Integer limit) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return getUserGroupsWithHeadersAndHttpInfo(nameSearch, datasourceIdSearch, isEnabled, sortOrder, offset, limit, localVarHeaderParams);
        
    }

    /**
    * Get a collection of usergroups
    * 
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @param isEnabled Whether to filter users to only users who are enabled. (optional)
    * @param sortOrder A field by which to order the user groups followed by a space and 'asc' or 'desc'. Field name can be one of: name, directory (optional, default to name asc)
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
    * @param limit The pagination level, the total number of collection items that will be returned in this page of results (optional, default to 40)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHeadersAndHttpInfo(String nameSearch, String datasourceIdSearch, Boolean isEnabled, String sortOrder, Integer offset, Integer limit, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceIdSearch", datasourceIdSearch));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "isEnabled", isEnabled));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "sortOrder", sortOrder));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
        localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
                localVarHeaderParams.putAll(customHeaders);
        return getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse getUserGroupsInternal(List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // create path and map variables
        String localVarPath = "/usergroups";

        // query params
        Map localVarFormParams = new HashMap();

        
        final String[] localVarAccepts = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {
        
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "api_key" };

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    /**
    * Create or update multiple user groups
    * 
    * @param body  (required)
    * @return ItemBatchOutputV1
    * @throws ApiException if fails to make API call
    */
    public ItemBatchOutputV1 putUserGroups(PutUserGroupsInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = putUserGroupsWithHttpInfo(body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Create or update multiple user groups
    * 
    * @param body  (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse putUserGroupsWithHttpInfo(PutUserGroupsInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return putUserGroupsWithHeadersAndHttpInfo(body, localVarHeaderParams);
        
    }

    /**
    * Create or update multiple user groups
    * 
    * @param body  (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse putUserGroupsWithHeadersAndHttpInfo(PutUserGroupsInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return putUserGroupsInternal(body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse putUserGroupsInternal(PutUserGroupsInputV1 body, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = body;
        // verify the required body parameter 'body' is set
        if (body == null) {
            throw new ApiException(400, "Missing the required body parameter 'body' when calling putUserGroups");
        }
        // create path and map variables
        String localVarPath = "/usergroups/batch";

        // query params
        Map localVarFormParams = new HashMap();

        
        final String[] localVarAccepts = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "api_key" };

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    /**
    * Remove a user from a user group
    * 
    * @param userGroupId ID of the user group to remove user from (required)
    * @param identityId ID of the user or user group to remove. (required)
    * @return UserGroupOutputV1
    * @throws ApiException if fails to make API call
    */
    public UserGroupOutputV1 removeIdentityFromUserGroup(String userGroupId, String identityId) throws ApiException {
        ApiClient.ApiResponse localVarResponse = removeIdentityFromUserGroupWithHttpInfo(userGroupId, identityId);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Remove a user from a user group
    * 
    * @param userGroupId ID of the user group to remove user from (required)
    * @param identityId ID of the user or user group to remove. (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse removeIdentityFromUserGroupWithHttpInfo(String userGroupId, String identityId) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return removeIdentityFromUserGroupWithHeadersAndHttpInfo(userGroupId, identityId, localVarHeaderParams);
        
    }

    /**
    * Remove a user from a user group
    * 
    * @param userGroupId ID of the user group to remove user from (required)
    * @param identityId ID of the user or user group to remove. (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse removeIdentityFromUserGroupWithHeadersAndHttpInfo(String userGroupId, String identityId, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return removeIdentityFromUserGroupInternal(userGroupId, identityId, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse removeIdentityFromUserGroupInternal(String userGroupId, String identityId, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'userGroupId' is set
        if (userGroupId == null) {
            throw new ApiException(400, "Missing the required path parameter 'userGroupId' when calling removeIdentityFromUserGroup");
        }
        // verify the required path parameter 'identityId' is set
        if (identityId == null) {
            throw new ApiException(400, "Missing the required path parameter 'identityId' when calling removeIdentityFromUserGroup");
        }
        // create path and map variables
        String localVarPath = "/usergroups/{userGroupId}/{identityId}"
          .replaceAll("\\{" + "userGroupId" + "\\}", apiClient.escapeString(userGroupId.toString()))
          .replaceAll("\\{" + "identityId" + "\\}", apiClient.escapeString(identityId.toString()));

        // query params
        Map localVarFormParams = new HashMap();

        
        final String[] localVarAccepts = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {
        
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "api_key" };

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    /**
    * Remove a user group
    * 
    * @param userGroupId ID of the user group to remove (required)
    * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase removeUserGroup(String userGroupId) throws ApiException {
        ApiClient.ApiResponse localVarResponse = removeUserGroupWithHttpInfo(userGroupId);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Remove a user group
    * 
    * @param userGroupId ID of the user group to remove (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse removeUserGroupWithHttpInfo(String userGroupId) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return removeUserGroupWithHeadersAndHttpInfo(userGroupId, localVarHeaderParams);
        
    }

    /**
    * Remove a user group
    * 
    * @param userGroupId ID of the user group to remove (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse removeUserGroupWithHeadersAndHttpInfo(String userGroupId, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return removeUserGroupInternal(userGroupId, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse removeUserGroupInternal(String userGroupId, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = null;
        // verify the required path parameter 'userGroupId' is set
        if (userGroupId == null) {
            throw new ApiException(400, "Missing the required path parameter 'userGroupId' when calling removeUserGroup");
        }
        // create path and map variables
        String localVarPath = "/usergroups/{userGroupId}"
          .replaceAll("\\{" + "userGroupId" + "\\}", apiClient.escapeString(userGroupId.toString()));

        // query params
        Map localVarFormParams = new HashMap();

        
        final String[] localVarAccepts = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {
        
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "api_key" };

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    /**
    * Update name or description of a user group
    * 
    * @param userGroupId ID of the user group to update (required)
    * @param body New user group information (required)
    * @return UserGroupOutputV1
    * @throws ApiException if fails to make API call
    */
    public UserGroupOutputV1 updateUserGroup(String userGroupId, UserGroupInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = updateUserGroupWithHttpInfo(userGroupId, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Update name or description of a user group
    * 
    * @param userGroupId ID of the user group to update (required)
    * @param body New user group information (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse updateUserGroupWithHttpInfo(String userGroupId, UserGroupInputV1 body) throws ApiException {
        Map localVarHeaderParams = new HashMap();
        return updateUserGroupWithHeadersAndHttpInfo(userGroupId, body, localVarHeaderParams);
        
    }

    /**
    * Update name or description of a user group
    * 
    * @param userGroupId ID of the user group to update (required)
    * @param body New user group information (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse updateUserGroupWithHeadersAndHttpInfo(String userGroupId, UserGroupInputV1 body, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
                localVarHeaderParams.putAll(customHeaders);
        return updateUserGroupInternal(userGroupId, body, localVarQueryParams, localVarHeaderParams);
    }
    
    private ApiClient.ApiResponse updateUserGroupInternal(String userGroupId, UserGroupInputV1 body, List queryParams, Map headerParams) throws ApiException {
        Object localVarPostBody = body;
        // verify the required path parameter 'userGroupId' is set
        if (userGroupId == null) {
            throw new ApiException(400, "Missing the required path parameter 'userGroupId' when calling updateUserGroup");
        }
        // verify the required body parameter 'body' is set
        if (body == null) {
            throw new ApiException(400, "Missing the required body parameter 'body' when calling updateUserGroup");
        }
        // create path and map variables
        String localVarPath = "/usergroups/{userGroupId}"
          .replaceAll("\\{" + "userGroupId" + "\\}", apiClient.escapeString(userGroupId.toString()));

        // query params
        Map localVarFormParams = new HashMap();

        
        final String[] localVarAccepts = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

        final String[] localVarContentTypes = {
        "application/vnd.seeq.v1+json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

        String[] localVarAuthNames = new String[] { "api_key" };

        long apiClientInvocationTime = System.currentTimeMillis();
        while(true) {
            try {
                GenericType localVarReturnType = new GenericType() {};
                return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
                // Possible exceptions:
                // ===================
                // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
                //    during conversion of the response entity data to an instance of a particular Java type).
                // * ProcessingException - in case the request processing or subsequent I/O operation fails.
                // * WebApplicationException - in case the response status code of the response returned by the server is not
                //    successful and the specified response type is not Response.
                // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
                //    in ApiException(s)
            } catch (ApiException | ProcessingException e) {
                if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
                    long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
                    if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
                        continue;
                    }
                }
                throw e;
            }
        } // while
    }
    // OVERLOADS START

    /**
    * Get a collection of usergroups
    *
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @param isEnabled Whether to filter users to only users who are enabled. (optional)
    * @param sortOrder A field by which to order the user groups followed by a space and 'asc' or 'desc'. Field name can be one of: name, directory (optional)
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional)
    * @return IdentityPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public IdentityPreviewListV1 getUserGroups(String nameSearch, String datasourceIdSearch, Boolean isEnabled, String sortOrder, Integer offset) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceIdSearch", datasourceIdSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "isEnabled", isEnabled));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "sortOrder", sortOrder));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));

        ApiClient.ApiResponse localVarResponse = getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Get a collection of usergroups
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @param isEnabled Whether to filter users to only users who are enabled. (optional)
    * @param sortOrder A field by which to order the user groups followed by a space and 'asc' or 'desc'. Field name can be one of: name, directory (optional)
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHttpInfo(String nameSearch, String datasourceIdSearch, Boolean isEnabled, String sortOrder, Integer offset) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceIdSearch", datasourceIdSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "isEnabled", isEnabled));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "sortOrder", sortOrder));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));

        return getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a collection of usergroups
    *
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @param isEnabled Whether to filter users to only users who are enabled. (optional)
    * @param sortOrder A field by which to order the user groups followed by a space and 'asc' or 'desc'. Field name can be one of: name, directory (optional)
    * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHeadersAndHttpInfo(String nameSearch, String datasourceIdSearch, Boolean isEnabled, String sortOrder, Integer offset, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceIdSearch", datasourceIdSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "isEnabled", isEnabled));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "sortOrder", sortOrder));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));

        localVarHeaderParams.putAll(customHeaders);
        return getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Get a collection of usergroups
    *
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @param isEnabled Whether to filter users to only users who are enabled. (optional)
    * @param sortOrder A field by which to order the user groups followed by a space and 'asc' or 'desc'. Field name can be one of: name, directory (optional)
    * @return IdentityPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public IdentityPreviewListV1 getUserGroups(String nameSearch, String datasourceIdSearch, Boolean isEnabled, String sortOrder) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceIdSearch", datasourceIdSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "isEnabled", isEnabled));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "sortOrder", sortOrder));

        ApiClient.ApiResponse localVarResponse = getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Get a collection of usergroups
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @param isEnabled Whether to filter users to only users who are enabled. (optional)
    * @param sortOrder A field by which to order the user groups followed by a space and 'asc' or 'desc'. Field name can be one of: name, directory (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHttpInfo(String nameSearch, String datasourceIdSearch, Boolean isEnabled, String sortOrder) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceIdSearch", datasourceIdSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "isEnabled", isEnabled));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "sortOrder", sortOrder));

        return getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a collection of usergroups
    *
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @param isEnabled Whether to filter users to only users who are enabled. (optional)
    * @param sortOrder A field by which to order the user groups followed by a space and 'asc' or 'desc'. Field name can be one of: name, directory (optional)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHeadersAndHttpInfo(String nameSearch, String datasourceIdSearch, Boolean isEnabled, String sortOrder, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceIdSearch", datasourceIdSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "isEnabled", isEnabled));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "sortOrder", sortOrder));

        localVarHeaderParams.putAll(customHeaders);
        return getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Get a collection of usergroups
    *
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @param isEnabled Whether to filter users to only users who are enabled. (optional)
    * @return IdentityPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public IdentityPreviewListV1 getUserGroups(String nameSearch, String datasourceIdSearch, Boolean isEnabled) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceIdSearch", datasourceIdSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "isEnabled", isEnabled));

        ApiClient.ApiResponse localVarResponse = getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Get a collection of usergroups
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @param isEnabled Whether to filter users to only users who are enabled. (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHttpInfo(String nameSearch, String datasourceIdSearch, Boolean isEnabled) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceIdSearch", datasourceIdSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "isEnabled", isEnabled));

        return getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a collection of usergroups
    *
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @param isEnabled Whether to filter users to only users who are enabled. (optional)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHeadersAndHttpInfo(String nameSearch, String datasourceIdSearch, Boolean isEnabled, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceIdSearch", datasourceIdSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "isEnabled", isEnabled));

        localVarHeaderParams.putAll(customHeaders);
        return getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Get a collection of usergroups
    *
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @return IdentityPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public IdentityPreviewListV1 getUserGroups(String nameSearch, String datasourceIdSearch) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceIdSearch", datasourceIdSearch));

        ApiClient.ApiResponse localVarResponse = getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Get a collection of usergroups
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHttpInfo(String nameSearch, String datasourceIdSearch) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceIdSearch", datasourceIdSearch));

        return getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a collection of usergroups
    *
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param datasourceIdSearch Search text by which to filter user groups' directories. (optional)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHeadersAndHttpInfo(String nameSearch, String datasourceIdSearch, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasourceIdSearch", datasourceIdSearch));

        localVarHeaderParams.putAll(customHeaders);
        return getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Get a collection of usergroups
    *
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @return IdentityPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public IdentityPreviewListV1 getUserGroups(String nameSearch) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        ApiClient.ApiResponse localVarResponse = getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Get a collection of usergroups
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHttpInfo(String nameSearch) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        return getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a collection of usergroups
    *
    * @param nameSearch Search text by which to filter user groups' names. (optional)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHeadersAndHttpInfo(String nameSearch, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();

        localVarQueryParams.addAll(apiClient.parameterToPairs("", "nameSearch", nameSearch));

        localVarHeaderParams.putAll(customHeaders);
        return getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Get a collection of usergroups
    *
    *
    * @return IdentityPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public IdentityPreviewListV1 getUserGroups() throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        ApiClient.ApiResponse localVarResponse = getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Get a collection of usergroups
    *
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHttpInfo() throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        return getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Get a collection of usergroups
    *
    *
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getUserGroupsWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        localVarHeaderParams.putAll(customHeaders);
        return getUserGroupsInternal(localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Archive a user group
    *
    * @param userGroupId ID of user group to archive (required)
    * @return UserGroupOutputV1
    * @throws ApiException if fails to make API call
    */
    public UserGroupOutputV1 archiveUserGroup(String userGroupId) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        ApiClient.ApiResponse localVarResponse = archiveUserGroupInternal(userGroupId, localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Archive a user group
    * @param userGroupId ID of user group to archive (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse archiveUserGroupWithHttpInfo(String userGroupId) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        return archiveUserGroupInternal(userGroupId, localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Archive a user group
    *
    * @param userGroupId ID of user group to archive (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse archiveUserGroupWithHeadersAndHttpInfo(String userGroupId, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        localVarHeaderParams.putAll(customHeaders);
        return archiveUserGroupInternal(userGroupId, localVarQueryParams, localVarHeaderParams);
    }


    /**
    * Disable a user group
    *
    * @param userGroupId ID of user group to disable (required)
    * @return UserGroupOutputV1
    * @throws ApiException if fails to make API call
    */
    public UserGroupOutputV1 disableUserGroup(String userGroupId) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        ApiClient.ApiResponse localVarResponse = disableUserGroupInternal(userGroupId, localVarQueryParams, localVarHeaderParams);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }

    /**
    * Disable a user group
    * @param userGroupId ID of user group to disable (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse disableUserGroupWithHttpInfo(String userGroupId) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        return disableUserGroupInternal(userGroupId, localVarQueryParams, localVarHeaderParams);
    }

    /**
    * Disable a user group
    *
    * @param userGroupId ID of user group to disable (required)
    * @param customHeaders a map with custom headers for the HTTP request (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse disableUserGroupWithHeadersAndHttpInfo(String userGroupId, Map customHeaders) throws ApiException {
        List localVarQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();


        localVarHeaderParams.putAll(customHeaders);
        return disableUserGroupInternal(userGroupId, localVarQueryParams, localVarHeaderParams);
    }

// OVERLOADS END
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy