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

com.configcat.publicapi.java.client.api.PermissionGroupsApi Maven / Gradle / Ivy

/*
 * ConfigCat Public Management API
 * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat.  **Base API URL**: https://api.configcat.com  If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger).  The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON  format.   **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead.  # OpenAPI Specification  The complete specification is publicly available in the following formats:  - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json)  You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API.  # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication).     # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers:  | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset     | The time when the current rate limit period resets.        |  When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
 *
 * The version of the OpenAPI document: v1
 * 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 com.configcat.publicapi.java.client.api;


import com.configcat.publicapi.java.client.ApiCallback;
import com.configcat.publicapi.java.client.ApiClient;
import com.configcat.publicapi.java.client.ApiException;
import com.configcat.publicapi.java.client.ApiResponse;
import com.configcat.publicapi.java.client.Configuration;
import com.configcat.publicapi.java.client.Pair;
import com.configcat.publicapi.java.client.model.CreatePermissionGroupRequest;
import com.configcat.publicapi.java.client.model.PermissionGroupModel;
import com.configcat.publicapi.java.client.model.UpdatePermissionGroupRequest;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

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

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

    public PermissionGroupsApi(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 createPermissionGroup
     *
     * @param productId The identifier of the Product. (required)
     * @param createPermissionGroupRequest (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 When the creation was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public okhttp3.Call createPermissionGroupCall( UUID productId, CreatePermissionGroupRequest createPermissionGroupRequest, 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 = createPermissionGroupRequest; // create path and map variables String localVarPath = "/v1/products/{productId}/permissions" .replace( "{" + "productId" + "}", localVarApiClient.escapeString(productId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = {"application/json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json", "text/json", "application/*+json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] {"Basic"}; return localVarApiClient.buildCall( basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createPermissionGroupValidateBeforeCall( UUID productId, CreatePermissionGroupRequest createPermissionGroupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'productId' is set if (productId == null) { throw new ApiException( "Missing the required parameter 'productId' when calling" + " createPermissionGroup(Async)"); } // verify the required parameter 'createPermissionGroupRequest' is set if (createPermissionGroupRequest == null) { throw new ApiException( "Missing the required parameter 'createPermissionGroupRequest' when calling" + " createPermissionGroup(Async)"); } return createPermissionGroupCall(productId, createPermissionGroupRequest, _callback); } /** * Create Permission Group This endpoint creates a new Permission Group in a specified Product * identified by the `productId` parameter, which can be obtained from the [List * Products](#operation/get-products) endpoint. * * @param productId The identifier of the Product. (required) * @param createPermissionGroupRequest (required) * @return PermissionGroupModel * @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 When the creation was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public PermissionGroupModel createPermissionGroup( UUID productId, CreatePermissionGroupRequest createPermissionGroupRequest) throws ApiException { ApiResponse localVarResp = createPermissionGroupWithHttpInfo(productId, createPermissionGroupRequest); return localVarResp.getData(); } /** * Create Permission Group This endpoint creates a new Permission Group in a specified Product * identified by the `productId` parameter, which can be obtained from the [List * Products](#operation/get-products) endpoint. * * @param productId The identifier of the Product. (required) * @param createPermissionGroupRequest (required) * @return ApiResponse<PermissionGroupModel> * @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 When the creation was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public ApiResponse createPermissionGroupWithHttpInfo( UUID productId, CreatePermissionGroupRequest createPermissionGroupRequest) throws ApiException { okhttp3.Call localVarCall = createPermissionGroupValidateBeforeCall( productId, createPermissionGroupRequest, null); Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create Permission Group (asynchronously) This endpoint creates a new Permission Group in a * specified Product identified by the `productId` parameter, which can be obtained * from the [List Products](#operation/get-products) endpoint. * * @param productId The identifier of the Product. (required) * @param createPermissionGroupRequest (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 When the creation was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public okhttp3.Call createPermissionGroupAsync( UUID productId, CreatePermissionGroupRequest createPermissionGroupRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createPermissionGroupValidateBeforeCall( productId, createPermissionGroupRequest, _callback); Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deletePermissionGroup * * @param permissionGroupId The identifier of the Permission 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
204 When the delete was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public okhttp3.Call deletePermissionGroupCall( Long permissionGroupId, 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 = "/v1/permissions/{permissionGroupId}" .replace( "{" + "permissionGroupId" + "}", localVarApiClient.escapeString(permissionGroupId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = {}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = {}; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] {"Basic"}; return localVarApiClient.buildCall( basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deletePermissionGroupValidateBeforeCall( Long permissionGroupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'permissionGroupId' is set if (permissionGroupId == null) { throw new ApiException( "Missing the required parameter 'permissionGroupId' when calling" + " deletePermissionGroup(Async)"); } return deletePermissionGroupCall(permissionGroupId, _callback); } /** * Delete Permission Group This endpoint removes a Permission Group identified by the * `permissionGroupId` parameter. * * @param permissionGroupId The identifier of the Permission Group. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * * * * *
Status Code Description Response Headers
204 When the delete was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public void deletePermissionGroup(Long permissionGroupId) throws ApiException { deletePermissionGroupWithHttpInfo(permissionGroupId); } /** * Delete Permission Group This endpoint removes a Permission Group identified by the * `permissionGroupId` parameter. * * @param permissionGroupId The identifier of the Permission Group. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * * * * *
Status Code Description Response Headers
204 When the delete was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public ApiResponse deletePermissionGroupWithHttpInfo(Long permissionGroupId) throws ApiException { okhttp3.Call localVarCall = deletePermissionGroupValidateBeforeCall(permissionGroupId, null); return localVarApiClient.execute(localVarCall); } /** * Delete Permission Group (asynchronously) This endpoint removes a Permission Group identified * by the `permissionGroupId` parameter. * * @param permissionGroupId The identifier of the Permission 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
204 When the delete was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public okhttp3.Call deletePermissionGroupAsync( Long permissionGroupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deletePermissionGroupValidateBeforeCall(permissionGroupId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getPermissionGroup * * @param permissionGroupId The identifier of the Permission 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
200 When everything is ok, the permission group data returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public okhttp3.Call getPermissionGroupCall(Long permissionGroupId, 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 = "/v1/permissions/{permissionGroupId}" .replace( "{" + "permissionGroupId" + "}", localVarApiClient.escapeString(permissionGroupId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = {"application/json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = {}; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] {"Basic"}; return localVarApiClient.buildCall( basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getPermissionGroupValidateBeforeCall( Long permissionGroupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'permissionGroupId' is set if (permissionGroupId == null) { throw new ApiException( "Missing the required parameter 'permissionGroupId' when calling" + " getPermissionGroup(Async)"); } return getPermissionGroupCall(permissionGroupId, _callback); } /** * Get Permission Group This endpoint returns the metadata of a Permission Group identified by * the `permissionGroupId`. * * @param permissionGroupId The identifier of the Permission Group. (required) * @return PermissionGroupModel * @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 When everything is ok, the permission group data returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public PermissionGroupModel getPermissionGroup(Long permissionGroupId) throws ApiException { ApiResponse localVarResp = getPermissionGroupWithHttpInfo(permissionGroupId); return localVarResp.getData(); } /** * Get Permission Group This endpoint returns the metadata of a Permission Group identified by * the `permissionGroupId`. * * @param permissionGroupId The identifier of the Permission Group. (required) * @return ApiResponse<PermissionGroupModel> * @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 When everything is ok, the permission group data returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public ApiResponse getPermissionGroupWithHttpInfo(Long permissionGroupId) throws ApiException { okhttp3.Call localVarCall = getPermissionGroupValidateBeforeCall(permissionGroupId, null); Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Permission Group (asynchronously) This endpoint returns the metadata of a Permission * Group identified by the `permissionGroupId`. * * @param permissionGroupId The identifier of the Permission 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
200 When everything is ok, the permission group data returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public okhttp3.Call getPermissionGroupAsync( Long permissionGroupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPermissionGroupValidateBeforeCall(permissionGroupId, _callback); Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getPermissionGroups * * @param productId The identifier of the Product. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details * * * * * * *
Status Code Description Response Headers
200 -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public okhttp3.Call getPermissionGroupsCall(UUID productId, 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 = "/v1/products/{productId}/permissions" .replace( "{" + "productId" + "}", localVarApiClient.escapeString(productId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = {"application/json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = {}; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] {"Basic"}; return localVarApiClient.buildCall( basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getPermissionGroupsValidateBeforeCall( UUID productId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'productId' is set if (productId == null) { throw new ApiException( "Missing the required parameter 'productId' when calling" + " getPermissionGroups(Async)"); } return getPermissionGroupsCall(productId, _callback); } /** * List Permission Groups This endpoint returns the list of the Permission Groups that belongs * to the given Product identified by the `productId` parameter, which can be obtained * from the [List Products](#operation/get-products) endpoint. * * @param productId The identifier of the Product. (required) * @return List<PermissionGroupModel> * @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 -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public List getPermissionGroups(UUID productId) throws ApiException { ApiResponse> localVarResp = getPermissionGroupsWithHttpInfo(productId); return localVarResp.getData(); } /** * List Permission Groups This endpoint returns the list of the Permission Groups that belongs * to the given Product identified by the `productId` parameter, which can be obtained * from the [List Products](#operation/get-products) endpoint. * * @param productId The identifier of the Product. (required) * @return ApiResponse<List<PermissionGroupModel>> * @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 -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public ApiResponse> getPermissionGroupsWithHttpInfo(UUID productId) throws ApiException { okhttp3.Call localVarCall = getPermissionGroupsValidateBeforeCall(productId, null); Type localVarReturnType = new TypeToken>() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Permission Groups (asynchronously) This endpoint returns the list of the Permission * Groups that belongs to the given Product identified by the `productId` parameter, * which can be obtained from the [List Products](#operation/get-products) endpoint. * * @param productId The identifier of the Product. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body * object * @http.response.details * * * * * * *
Status Code Description Response Headers
200 -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public okhttp3.Call getPermissionGroupsAsync( UUID productId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getPermissionGroupsValidateBeforeCall(productId, _callback); Type localVarReturnType = new TypeToken>() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updatePermissionGroup * * @param permissionGroupId The identifier of the Permission Group. (required) * @param updatePermissionGroupRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details * * * * * * *
Status Code Description Response Headers
200 -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public okhttp3.Call updatePermissionGroupCall( Long permissionGroupId, UpdatePermissionGroupRequest updatePermissionGroupRequest, 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 = updatePermissionGroupRequest; // create path and map variables String localVarPath = "/v1/permissions/{permissionGroupId}" .replace( "{" + "permissionGroupId" + "}", localVarApiClient.escapeString(permissionGroupId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = {"application/json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json", "text/json", "application/*+json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] {"Basic"}; return localVarApiClient.buildCall( basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updatePermissionGroupValidateBeforeCall( Long permissionGroupId, UpdatePermissionGroupRequest updatePermissionGroupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'permissionGroupId' is set if (permissionGroupId == null) { throw new ApiException( "Missing the required parameter 'permissionGroupId' when calling" + " updatePermissionGroup(Async)"); } // verify the required parameter 'updatePermissionGroupRequest' is set if (updatePermissionGroupRequest == null) { throw new ApiException( "Missing the required parameter 'updatePermissionGroupRequest' when calling" + " updatePermissionGroup(Async)"); } return updatePermissionGroupCall( permissionGroupId, updatePermissionGroupRequest, _callback); } /** * Update Permission Group This endpoint updates a Permission Group identified by the * `permissionGroupId` parameter. * * @param permissionGroupId The identifier of the Permission Group. (required) * @param updatePermissionGroupRequest (required) * @return PermissionGroupModel * @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 -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public PermissionGroupModel updatePermissionGroup( Long permissionGroupId, UpdatePermissionGroupRequest updatePermissionGroupRequest) throws ApiException { ApiResponse localVarResp = updatePermissionGroupWithHttpInfo(permissionGroupId, updatePermissionGroupRequest); return localVarResp.getData(); } /** * Update Permission Group This endpoint updates a Permission Group identified by the * `permissionGroupId` parameter. * * @param permissionGroupId The identifier of the Permission Group. (required) * @param updatePermissionGroupRequest (required) * @return ApiResponse<PermissionGroupModel> * @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 -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public ApiResponse updatePermissionGroupWithHttpInfo( Long permissionGroupId, UpdatePermissionGroupRequest updatePermissionGroupRequest) throws ApiException { okhttp3.Call localVarCall = updatePermissionGroupValidateBeforeCall( permissionGroupId, updatePermissionGroupRequest, null); Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Permission Group (asynchronously) This endpoint updates a Permission Group identified * by the `permissionGroupId` parameter. * * @param permissionGroupId The identifier of the Permission Group. (required) * @param updatePermissionGroupRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body * object * @http.response.details * * * * * * *
Status Code Description Response Headers
200 -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public okhttp3.Call updatePermissionGroupAsync( Long permissionGroupId, UpdatePermissionGroupRequest updatePermissionGroupRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updatePermissionGroupValidateBeforeCall( permissionGroupId, updatePermissionGroupRequest, _callback); Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy