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

com.konfigthis.carbonai.client.api.UsersApiGenerated Maven / Gradle / Ivy

Go to download

Connect external data to LLMs, no matter the source. This library was generated by https://konfigthis.com

There is a newer version: 0.1.51
Show newest version
/*
 * Carbon
 * Connect external data to LLMs, no matter the source.
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by Konfig (https://konfigthis.com).
 * Do not edit the class manually.
 */


package com.konfigthis.carbonai.client.api;

import com.konfigthis.carbonai.client.ApiCallback;
import com.konfigthis.carbonai.client.ApiClient;
import com.konfigthis.carbonai.client.ApiException;
import com.konfigthis.carbonai.client.ApiResponse;
import com.konfigthis.carbonai.client.Configuration;
import com.konfigthis.carbonai.client.Pair;
import com.konfigthis.carbonai.client.ProgressRequestBody;
import com.konfigthis.carbonai.client.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.konfigthis.carbonai.client.model.DeleteUsersInput;
import com.konfigthis.carbonai.client.model.GenericSuccessResponse;
import com.konfigthis.carbonai.client.model.ListUsersFilters;
import com.konfigthis.carbonai.client.model.ListUsersOrderByTypes;
import com.konfigthis.carbonai.client.model.ListUsersRequest;
import com.konfigthis.carbonai.client.model.ModifyUserConfigurationInput;
import com.konfigthis.carbonai.client.model.OrderDirV2;
import com.konfigthis.carbonai.client.model.Pagination;
import com.konfigthis.carbonai.client.model.UpdateUsersInput;
import com.konfigthis.carbonai.client.model.UserListResponse;
import com.konfigthis.carbonai.client.model.UserRequestContent;
import com.konfigthis.carbonai.client.model.UserResponse;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;

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

    public UsersApiGenerated() throws IllegalArgumentException {
        this(Configuration.getDefaultApiClient());
    }

    public UsersApiGenerated(ApiClient apiClient) throws IllegalArgumentException {
        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;
    }

    private okhttp3.Call deleteCall(DeleteUsersInput deleteUsersInput, 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 = deleteUsersInput;

        // create path and map variables
        String localVarPath = "/delete_users";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        Map localVarCookieParams = new HashMap();
        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "apiKey" };
        return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call deleteValidateBeforeCall(DeleteUsersInput deleteUsersInput, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'deleteUsersInput' is set
        if (deleteUsersInput == null) {
            throw new ApiException("Missing the required parameter 'deleteUsersInput' when calling delete(Async)");
        }

        return deleteCall(deleteUsersInput, _callback);

    }


    private ApiResponse deleteWithHttpInfo(DeleteUsersInput deleteUsersInput) throws ApiException {
        okhttp3.Call localVarCall = deleteValidateBeforeCall(deleteUsersInput, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call deleteAsync(DeleteUsersInput deleteUsersInput, final ApiCallback _callback) throws ApiException {

        okhttp3.Call localVarCall = deleteValidateBeforeCall(deleteUsersInput, _callback);
        Type localVarReturnType = new TypeToken(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public abstract class DeleteRequestBuilderGenerated {
        final List customerIds;

        public DeleteRequestBuilderGenerated(List customerIds) {
            this.customerIds = customerIds;
        }

        /**
         * Build call for delete
         * @param _callback ApiCallback API callback
         * @return Call to execute
         * @throws ApiException If fail to serialize the request body object
         * @http.response.details
         
Status Code Description Response Headers
200 Successful Response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { DeleteUsersInput deleteUsersInput = buildBodyParams(); return deleteCall(deleteUsersInput, _callback); } private DeleteUsersInput buildBodyParams() { DeleteUsersInput deleteUsersInput = new DeleteUsersInput(); deleteUsersInput.customerIds(this.customerIds); return deleteUsersInput; } /** * Execute delete request * @return GenericSuccessResponse * @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 Successful Response -
*/ public GenericSuccessResponse execute() throws ApiException { DeleteUsersInput deleteUsersInput = buildBodyParams(); ApiResponse localVarResp = deleteWithHttpInfo(deleteUsersInput); return localVarResp.getResponseBody(); } /** * Execute delete request with HTTP info returned * @return ApiResponse<GenericSuccessResponse> * @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 Successful Response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { DeleteUsersInput deleteUsersInput = buildBodyParams(); return deleteWithHttpInfo(deleteUsersInput); } /** * Execute delete request (asynchronously) * @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 Successful Response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { DeleteUsersInput deleteUsersInput = buildBodyParams(); return deleteAsync(deleteUsersInput, _callback); } } /** * Delete Users * * @param deleteUsersInput (required) * @return DeleteRequestBuilder * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public UsersApi.DeleteRequestBuilder delete(List customerIds) throws IllegalArgumentException { if (customerIds == null) throw new IllegalArgumentException("\"customerIds\" is required but got null"); return ((UsersApi) this).new DeleteRequestBuilder(customerIds); } private okhttp3.Call getCall(UserRequestContent userRequestContent, 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 = userRequestContent; // create path and map variables String localVarPath = "/user"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "apiKey" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getValidateBeforeCall(UserRequestContent userRequestContent, final ApiCallback _callback) throws ApiException { // verify the required parameter 'userRequestContent' is set if (userRequestContent == null) { throw new ApiException("Missing the required parameter 'userRequestContent' when calling get(Async)"); } return getCall(userRequestContent, _callback); } private ApiResponse getWithHttpInfo(UserRequestContent userRequestContent) throws ApiException { okhttp3.Call localVarCall = getValidateBeforeCall(userRequestContent, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getAsync(UserRequestContent userRequestContent, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getValidateBeforeCall(userRequestContent, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public abstract class GetRequestBuilderGenerated { final String customerId; public GetRequestBuilderGenerated(String customerId) { this.customerId = customerId; } /** * Build call for get * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { UserRequestContent userRequestContent = buildBodyParams(); return getCall(userRequestContent, _callback); } private UserRequestContent buildBodyParams() { UserRequestContent userRequestContent = new UserRequestContent(); userRequestContent.customerId(this.customerId); return userRequestContent; } /** * Execute get request * @return UserResponse * @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 Successful Response -
*/ public UserResponse execute() throws ApiException { UserRequestContent userRequestContent = buildBodyParams(); ApiResponse localVarResp = getWithHttpInfo(userRequestContent); return localVarResp.getResponseBody(); } /** * Execute get request with HTTP info returned * @return ApiResponse<UserResponse> * @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 Successful Response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { UserRequestContent userRequestContent = buildBodyParams(); return getWithHttpInfo(userRequestContent); } /** * Execute get request (asynchronously) * @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 Successful Response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { UserRequestContent userRequestContent = buildBodyParams(); return getAsync(userRequestContent, _callback); } } /** * User Endpoint * * @param userRequestContent (required) * @return GetRequestBuilder * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public UsersApi.GetRequestBuilder get(String customerId) throws IllegalArgumentException { if (customerId == null) throw new IllegalArgumentException("\"customerId\" is required but got null"); return ((UsersApi) this).new GetRequestBuilder(customerId); } private okhttp3.Call listCall(ListUsersRequest listUsersRequest, 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 = listUsersRequest; // create path and map variables String localVarPath = "/list_users"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "apiKey" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listValidateBeforeCall(ListUsersRequest listUsersRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'listUsersRequest' is set if (listUsersRequest == null) { throw new ApiException("Missing the required parameter 'listUsersRequest' when calling list(Async)"); } return listCall(listUsersRequest, _callback); } private ApiResponse listWithHttpInfo(ListUsersRequest listUsersRequest) throws ApiException { okhttp3.Call localVarCall = listValidateBeforeCall(listUsersRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listAsync(ListUsersRequest listUsersRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listValidateBeforeCall(listUsersRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public abstract class ListRequestBuilderGenerated { Pagination pagination; ListUsersFilters filters; ListUsersOrderByTypes orderBy; OrderDirV2 orderDir; Boolean includeCount; public ListRequestBuilderGenerated() { } /** * Set pagination * @param pagination (optional) * @return UsersApi.ListRequestBuilder */ public UsersApi.ListRequestBuilder pagination(Pagination pagination) { this.pagination = pagination; return (UsersApi.ListRequestBuilder) this; } /** * Set filters * @param filters (optional) * @return UsersApi.ListRequestBuilder */ public UsersApi.ListRequestBuilder filters(ListUsersFilters filters) { this.filters = filters; return (UsersApi.ListRequestBuilder) this; } /** * Set orderBy * @param orderBy (optional) * @return UsersApi.ListRequestBuilder */ public UsersApi.ListRequestBuilder orderBy(ListUsersOrderByTypes orderBy) { this.orderBy = orderBy; return (UsersApi.ListRequestBuilder) this; } /** * Set orderDir * @param orderDir (optional) * @return UsersApi.ListRequestBuilder */ public UsersApi.ListRequestBuilder orderDir(OrderDirV2 orderDir) { this.orderDir = orderDir; return (UsersApi.ListRequestBuilder) this; } /** * Set includeCount * @param includeCount (optional, default to false) * @return UsersApi.ListRequestBuilder */ public UsersApi.ListRequestBuilder includeCount(Boolean includeCount) { this.includeCount = includeCount; return (UsersApi.ListRequestBuilder) this; } /** * Build call for list * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { ListUsersRequest listUsersRequest = buildBodyParams(); return listCall(listUsersRequest, _callback); } private ListUsersRequest buildBodyParams() { ListUsersRequest listUsersRequest = new ListUsersRequest(); listUsersRequest.pagination(this.pagination); listUsersRequest.filters(this.filters); listUsersRequest.orderBy(this.orderBy); listUsersRequest.orderDir(this.orderDir); listUsersRequest.includeCount(this.includeCount); return listUsersRequest; } /** * Execute list request * @return UserListResponse * @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 Successful Response -
*/ public UserListResponse execute() throws ApiException { ListUsersRequest listUsersRequest = buildBodyParams(); ApiResponse localVarResp = listWithHttpInfo(listUsersRequest); return localVarResp.getResponseBody(); } /** * Execute list request with HTTP info returned * @return ApiResponse<UserListResponse> * @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 Successful Response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { ListUsersRequest listUsersRequest = buildBodyParams(); return listWithHttpInfo(listUsersRequest); } /** * Execute list request (asynchronously) * @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 Successful Response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { ListUsersRequest listUsersRequest = buildBodyParams(); return listAsync(listUsersRequest, _callback); } } /** * List Users Endpoint * List users within an organization * @param listUsersRequest (required) * @return ListRequestBuilder * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public UsersApi.ListRequestBuilder list() throws IllegalArgumentException { return ((UsersApi) this).new ListRequestBuilder(); } private okhttp3.Call toggleUserFeaturesCall(ModifyUserConfigurationInput modifyUserConfigurationInput, 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 = modifyUserConfigurationInput; // create path and map variables String localVarPath = "/modify_user_configuration"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "accessToken", "apiKey", "customerId" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call toggleUserFeaturesValidateBeforeCall(ModifyUserConfigurationInput modifyUserConfigurationInput, final ApiCallback _callback) throws ApiException { // verify the required parameter 'modifyUserConfigurationInput' is set if (modifyUserConfigurationInput == null) { throw new ApiException("Missing the required parameter 'modifyUserConfigurationInput' when calling toggleUserFeatures(Async)"); } return toggleUserFeaturesCall(modifyUserConfigurationInput, _callback); } private ApiResponse toggleUserFeaturesWithHttpInfo(ModifyUserConfigurationInput modifyUserConfigurationInput) throws ApiException { okhttp3.Call localVarCall = toggleUserFeaturesValidateBeforeCall(modifyUserConfigurationInput, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call toggleUserFeaturesAsync(ModifyUserConfigurationInput modifyUserConfigurationInput, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = toggleUserFeaturesValidateBeforeCall(modifyUserConfigurationInput, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public abstract class ToggleUserFeaturesRequestBuilderGenerated { final String configurationKeyName; final Object value; public ToggleUserFeaturesRequestBuilderGenerated(String configurationKeyName, Object value) { this.configurationKeyName = configurationKeyName; this.value = value; } /** * Build call for toggleUserFeatures * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Successful Response -
* @deprecated */ @Deprecated public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { ModifyUserConfigurationInput modifyUserConfigurationInput = buildBodyParams(); return toggleUserFeaturesCall(modifyUserConfigurationInput, _callback); } private ModifyUserConfigurationInput buildBodyParams() { ModifyUserConfigurationInput modifyUserConfigurationInput = new ModifyUserConfigurationInput(); modifyUserConfigurationInput.configurationKeyName(this.configurationKeyName); modifyUserConfigurationInput.value(this.value); return modifyUserConfigurationInput; } /** * Execute toggleUserFeatures request * @return GenericSuccessResponse * @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 Successful Response -
* @deprecated */ @Deprecated public GenericSuccessResponse execute() throws ApiException { ModifyUserConfigurationInput modifyUserConfigurationInput = buildBodyParams(); ApiResponse localVarResp = toggleUserFeaturesWithHttpInfo(modifyUserConfigurationInput); return localVarResp.getResponseBody(); } /** * Execute toggleUserFeatures request with HTTP info returned * @return ApiResponse<GenericSuccessResponse> * @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 Successful Response -
* @deprecated */ @Deprecated public ApiResponse executeWithHttpInfo() throws ApiException { ModifyUserConfigurationInput modifyUserConfigurationInput = buildBodyParams(); return toggleUserFeaturesWithHttpInfo(modifyUserConfigurationInput); } /** * Execute toggleUserFeatures request (asynchronously) * @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 Successful Response -
* @deprecated */ @Deprecated public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { ModifyUserConfigurationInput modifyUserConfigurationInput = buildBodyParams(); return toggleUserFeaturesAsync(modifyUserConfigurationInput, _callback); } } /** * Toggle User Features * * @param modifyUserConfigurationInput (required) * @return ToggleUserFeaturesRequestBuilder * @http.response.details
Status Code Description Response Headers
200 Successful Response -
* @deprecated */ @Deprecated public UsersApi.ToggleUserFeaturesRequestBuilder toggleUserFeatures(String configurationKeyName, Object value) throws IllegalArgumentException { if (configurationKeyName == null) throw new IllegalArgumentException("\"configurationKeyName\" is required but got null"); if (value == null) throw new IllegalArgumentException("\"value\" is required but got null"); return ((UsersApi) this).new ToggleUserFeaturesRequestBuilder(configurationKeyName, value); } private okhttp3.Call updateUsersCall(UpdateUsersInput updateUsersInput, 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 = updateUsersInput; // create path and map variables String localVarPath = "/update_users"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "apiKey" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateUsersValidateBeforeCall(UpdateUsersInput updateUsersInput, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateUsersInput' is set if (updateUsersInput == null) { throw new ApiException("Missing the required parameter 'updateUsersInput' when calling updateUsers(Async)"); } return updateUsersCall(updateUsersInput, _callback); } private ApiResponse updateUsersWithHttpInfo(UpdateUsersInput updateUsersInput) throws ApiException { okhttp3.Call localVarCall = updateUsersValidateBeforeCall(updateUsersInput, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call updateUsersAsync(UpdateUsersInput updateUsersInput, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateUsersValidateBeforeCall(updateUsersInput, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public abstract class UpdateUsersRequestBuilderGenerated { final List customerIds; Object autoSyncEnabledSources; Integer maxFiles; Integer maxFilesPerUpload; public UpdateUsersRequestBuilderGenerated(List customerIds) { this.customerIds = customerIds; } /** * Set autoSyncEnabledSources * @param autoSyncEnabledSources (optional) * @return UsersApi.UpdateUsersRequestBuilder */ public UsersApi.UpdateUsersRequestBuilder autoSyncEnabledSources(Object autoSyncEnabledSources) { this.autoSyncEnabledSources = autoSyncEnabledSources; return (UsersApi.UpdateUsersRequestBuilder) this; } /** * Set maxFiles * @param maxFiles Custom file upload limit for the user over *all* user's files across all uploads. If set, then the user will not be allowed to upload more files than this limit. If not set, or if set to -1, then the user will have no limit. (optional) * @return UsersApi.UpdateUsersRequestBuilder */ public UsersApi.UpdateUsersRequestBuilder maxFiles(Integer maxFiles) { this.maxFiles = maxFiles; return (UsersApi.UpdateUsersRequestBuilder) this; } /** * Set maxFilesPerUpload * @param maxFilesPerUpload Custom file upload limit for the user across a single upload. If set, then the user will not be allowed to upload more files than this limit in a single upload. If not set, or if set to -1, then the user will have no limit. (optional) * @return UsersApi.UpdateUsersRequestBuilder */ public UsersApi.UpdateUsersRequestBuilder maxFilesPerUpload(Integer maxFilesPerUpload) { this.maxFilesPerUpload = maxFilesPerUpload; return (UsersApi.UpdateUsersRequestBuilder) this; } /** * Build call for updateUsers * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { UpdateUsersInput updateUsersInput = buildBodyParams(); return updateUsersCall(updateUsersInput, _callback); } private UpdateUsersInput buildBodyParams() { UpdateUsersInput updateUsersInput = new UpdateUsersInput(); updateUsersInput.autoSyncEnabledSources(this.autoSyncEnabledSources); updateUsersInput.maxFiles(this.maxFiles); updateUsersInput.maxFilesPerUpload(this.maxFilesPerUpload); updateUsersInput.customerIds(this.customerIds); return updateUsersInput; } /** * Execute updateUsers request * @return GenericSuccessResponse * @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 Successful Response -
*/ public GenericSuccessResponse execute() throws ApiException { UpdateUsersInput updateUsersInput = buildBodyParams(); ApiResponse localVarResp = updateUsersWithHttpInfo(updateUsersInput); return localVarResp.getResponseBody(); } /** * Execute updateUsers request with HTTP info returned * @return ApiResponse<GenericSuccessResponse> * @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 Successful Response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { UpdateUsersInput updateUsersInput = buildBodyParams(); return updateUsersWithHttpInfo(updateUsersInput); } /** * Execute updateUsers request (asynchronously) * @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 Successful Response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { UpdateUsersInput updateUsersInput = buildBodyParams(); return updateUsersAsync(updateUsersInput, _callback); } } /** * Update Users * * @param updateUsersInput (required) * @return UpdateUsersRequestBuilder * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public UsersApi.UpdateUsersRequestBuilder updateUsers(List customerIds) throws IllegalArgumentException { if (customerIds == null) throw new IllegalArgumentException("\"customerIds\" is required but got null"); return ((UsersApi) this).new UpdateUsersRequestBuilder(customerIds); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy