com.dominodatalab.api.rest.UsersApi Maven / Gradle / Ivy
/*
* Domino Data Lab API v4
* This API is going to provide access to all the Domino functions available in the user interface. To authenticate your requests, include your API Key (which you can find on your account page) with the header X-Domino-Api-Key.
*
* The version of the OpenAPI document: 4.0.0
*
*
* 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.dominodatalab.api.rest;
import com.dominodatalab.api.invoker.ApiClient;
import com.dominodatalab.api.invoker.ApiException;
import com.dominodatalab.api.invoker.ApiResponse;
import com.dominodatalab.api.invoker.Pair;
import com.dominodatalab.api.model.DominoApiErrorResponse;
import com.dominodatalab.api.model.DominoCommonModelsEnvironmentVariables;
import com.dominodatalab.api.model.DominoCommonUserCreateUserRequest;
import com.dominodatalab.api.model.DominoCommonUserLiteUserResponseDTO;
import com.dominodatalab.api.model.DominoCommonUserPerson;
import com.dominodatalab.api.model.DominoCommonUserTrialStatusDTO;
import com.dominodatalab.api.model.DominoCommonUserUpdateUserUIUXStateDTO;
import com.dominodatalab.api.model.DominoCommonUserUserCreationContext;
import com.dominodatalab.api.model.DominoCommonUserUserUIUXStateDTO;
import com.dominodatalab.api.model.DominoNucleusGatewayUsersModelsProjectsDependencyGraph;
import com.dominodatalab.api.model.DominoNucleusUserResponse;
import com.dominodatalab.api.model.DominoNucleusUserUpdatePinnedProjects;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import java.io.InputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.net.http.HttpRequest;
import java.nio.channels.Channels;
import java.nio.channels.Pipe;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.util.ArrayList;
import java.util.StringJoiner;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class UsersApi {
private final HttpClient memberVarHttpClient;
private final ObjectMapper memberVarObjectMapper;
private final String memberVarBaseUri;
private final Consumer memberVarInterceptor;
private final Duration memberVarReadTimeout;
private final Consumer> memberVarResponseInterceptor;
private final Consumer> memberVarAsyncResponseInterceptor;
public UsersApi() {
this(new ApiClient());
}
public UsersApi(ApiClient apiClient) {
memberVarHttpClient = apiClient.getHttpClient();
memberVarObjectMapper = apiClient.getObjectMapper();
memberVarBaseUri = apiClient.getBaseUri();
memberVarInterceptor = apiClient.getRequestInterceptor();
memberVarReadTimeout = apiClient.getReadTimeout();
memberVarResponseInterceptor = apiClient.getResponseInterceptor();
memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor();
}
protected ApiException getApiException(String operationId, HttpResponse response) throws IOException {
String body = response.body() == null ? null : new String(response.body().readAllBytes());
String message = formatExceptionMessage(operationId, response.statusCode(), body);
return new ApiException(response.statusCode(), message, response.headers(), body);
}
private String formatExceptionMessage(String operationId, int statusCode, String body) {
if (body == null || body.isEmpty()) {
body = "[no body]";
}
return operationId + " call failed with: " + statusCode + " - " + body;
}
/**
* Create a new user
*
* @param dominoCommonUserCreateUserRequest Create user request (required)
* @throws ApiException if fails to make API call
*/
public void createUser(DominoCommonUserCreateUserRequest dominoCommonUserCreateUserRequest) throws ApiException {
createUserWithHttpInfo(dominoCommonUserCreateUserRequest);
}
/**
* Create a new user
*
* @param dominoCommonUserCreateUserRequest Create user request (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
*/
public ApiResponse createUserWithHttpInfo(DominoCommonUserCreateUserRequest dominoCommonUserCreateUserRequest) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = createUserRequestBuilder(dominoCommonUserCreateUserRequest);
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("createUser", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
null
);
} finally {
// Drain the InputStream
while (localVarResponse.body().read() != -1) {
// Ignore
}
localVarResponse.body().close();
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder createUserRequestBuilder(DominoCommonUserCreateUserRequest dominoCommonUserCreateUserRequest) throws ApiException {
// verify the required parameter 'dominoCommonUserCreateUserRequest' is set
if (dominoCommonUserCreateUserRequest == null) {
throw new ApiException(400, "Missing the required parameter 'dominoCommonUserCreateUserRequest' when calling createUser");
}
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users";
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
localVarRequestBuilder.header("Content-Type", "application/json");
localVarRequestBuilder.header("Accept", "application/json");
try {
byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoCommonUserCreateUserRequest);
localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
} catch (IOException e) {
throw new ApiException(e);
}
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* deletes all of the specified user's environment variables
*
* @return DominoCommonModelsEnvironmentVariables
* @throws ApiException if fails to make API call
*/
public DominoCommonModelsEnvironmentVariables deleteUserEnvironmentVariables() throws ApiException {
ApiResponse localVarResponse = deleteUserEnvironmentVariablesWithHttpInfo();
return localVarResponse.getData();
}
/**
* deletes all of the specified user's environment variables
*
* @return ApiResponse<DominoCommonModelsEnvironmentVariables>
* @throws ApiException if fails to make API call
*/
public ApiResponse deleteUserEnvironmentVariablesWithHttpInfo() throws ApiException {
HttpRequest.Builder localVarRequestBuilder = deleteUserEnvironmentVariablesRequestBuilder();
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("deleteUserEnvironmentVariables", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder deleteUserEnvironmentVariablesRequestBuilder() throws ApiException {
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users/environmentVariables";
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
localVarRequestBuilder.header("Accept", "application/json");
localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody());
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* extend trial period for a user
*
* @param userId Domino id of the user to whom the extension will apply (required)
* @param extensionPeriodInDays How many days to extend by (required)
* @param xDominoApiKey API Key (optional)
* @return DominoNucleusUserResponse
* @throws ApiException if fails to make API call
*/
public DominoNucleusUserResponse extendTrialPeriod(String userId, Integer extensionPeriodInDays, String xDominoApiKey) throws ApiException {
ApiResponse localVarResponse = extendTrialPeriodWithHttpInfo(userId, extensionPeriodInDays, xDominoApiKey);
return localVarResponse.getData();
}
/**
* extend trial period for a user
*
* @param userId Domino id of the user to whom the extension will apply (required)
* @param extensionPeriodInDays How many days to extend by (required)
* @param xDominoApiKey API Key (optional)
* @return ApiResponse<DominoNucleusUserResponse>
* @throws ApiException if fails to make API call
*/
public ApiResponse extendTrialPeriodWithHttpInfo(String userId, Integer extensionPeriodInDays, String xDominoApiKey) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = extendTrialPeriodRequestBuilder(userId, extensionPeriodInDays, xDominoApiKey);
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("extendTrialPeriod", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder extendTrialPeriodRequestBuilder(String userId, Integer extensionPeriodInDays, String xDominoApiKey) throws ApiException {
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling extendTrialPeriod");
}
// verify the required parameter 'extensionPeriodInDays' is set
if (extensionPeriodInDays == null) {
throw new ApiException(400, "Missing the required parameter 'extensionPeriodInDays' when calling extendTrialPeriod");
}
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users/extendTrialPeriod/{userId}/{extensionPeriodInDays}"
.replace("{userId}", ApiClient.urlEncode(userId.toString()))
.replace("{extensionPeriodInDays}", ApiClient.urlEncode(extensionPeriodInDays.toString()));
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
if (xDominoApiKey != null) {
localVarRequestBuilder.header("X-Domino-Api-Key", xDominoApiKey.toString());
}
localVarRequestBuilder.header("Accept", "application/json");
localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* retrieves the current user
*
* @return DominoCommonUserPerson
* @throws ApiException if fails to make API call
*/
public DominoCommonUserPerson getCurrentUser() throws ApiException {
ApiResponse localVarResponse = getCurrentUserWithHttpInfo();
return localVarResponse.getData();
}
/**
* retrieves the current user
*
* @return ApiResponse<DominoCommonUserPerson>
* @throws ApiException if fails to make API call
*/
public ApiResponse getCurrentUserWithHttpInfo() throws ApiException {
HttpRequest.Builder localVarRequestBuilder = getCurrentUserRequestBuilder();
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("getCurrentUser", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder getCurrentUserRequestBuilder() throws ApiException {
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users/self";
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
localVarRequestBuilder.header("Accept", "application/json");
localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* Get trial status of the current user
*
* @param xDominoApiKey API Key (optional)
* @return DominoCommonUserTrialStatusDTO
* @throws ApiException if fails to make API call
*/
public DominoCommonUserTrialStatusDTO getCurrentUserTrialStatus(String xDominoApiKey) throws ApiException {
ApiResponse localVarResponse = getCurrentUserTrialStatusWithHttpInfo(xDominoApiKey);
return localVarResponse.getData();
}
/**
* Get trial status of the current user
*
* @param xDominoApiKey API Key (optional)
* @return ApiResponse<DominoCommonUserTrialStatusDTO>
* @throws ApiException if fails to make API call
*/
public ApiResponse getCurrentUserTrialStatusWithHttpInfo(String xDominoApiKey) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = getCurrentUserTrialStatusRequestBuilder(xDominoApiKey);
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("getCurrentUserTrialStatus", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder getCurrentUserTrialStatusRequestBuilder(String xDominoApiKey) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users/trialStatus";
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
if (xDominoApiKey != null) {
localVarRequestBuilder.header("X-Domino-Api-Key", xDominoApiKey.toString());
}
localVarRequestBuilder.header("Accept", "application/json");
localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* Get server-stored UI/UX state for the current user
*
* @param xDominoApiKey API Key (optional)
* @param keys If provided, will only return state associated with the given keys. Can provide multiple keys like \"/uiuxState?keys=foo&keys=bar\" (optional)
* @return DominoCommonUserUserUIUXStateDTO
* @throws ApiException if fails to make API call
*/
public DominoCommonUserUserUIUXStateDTO getCurrentUserUIUXState(String xDominoApiKey, String keys) throws ApiException {
ApiResponse localVarResponse = getCurrentUserUIUXStateWithHttpInfo(xDominoApiKey, keys);
return localVarResponse.getData();
}
/**
* Get server-stored UI/UX state for the current user
*
* @param xDominoApiKey API Key (optional)
* @param keys If provided, will only return state associated with the given keys. Can provide multiple keys like \"/uiuxState?keys=foo&keys=bar\" (optional)
* @return ApiResponse<DominoCommonUserUserUIUXStateDTO>
* @throws ApiException if fails to make API call
*/
public ApiResponse getCurrentUserUIUXStateWithHttpInfo(String xDominoApiKey, String keys) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = getCurrentUserUIUXStateRequestBuilder(xDominoApiKey, keys);
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("getCurrentUserUIUXState", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder getCurrentUserUIUXStateRequestBuilder(String xDominoApiKey, String keys) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users/uiuxState";
List localVarQueryParams = new ArrayList<>();
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
localVarQueryParameterBaseName = "keys";
localVarQueryParams.addAll(ApiClient.parameterToPairs("keys", keys));
if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) {
StringJoiner queryJoiner = new StringJoiner("&");
localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
if (localVarQueryStringJoiner.length() != 0) {
queryJoiner.add(localVarQueryStringJoiner.toString());
}
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
} else {
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
}
if (xDominoApiKey != null) {
localVarRequestBuilder.header("X-Domino-Api-Key", xDominoApiKey.toString());
}
localVarRequestBuilder.header("Accept", "application/json");
localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* Get context needed for create user form
*
* @return DominoCommonUserUserCreationContext
* @throws ApiException if fails to make API call
*/
public DominoCommonUserUserCreationContext getUserCreationContext() throws ApiException {
ApiResponse localVarResponse = getUserCreationContextWithHttpInfo();
return localVarResponse.getData();
}
/**
* Get context needed for create user form
*
* @return ApiResponse<DominoCommonUserUserCreationContext>
* @throws ApiException if fails to make API call
*/
public ApiResponse getUserCreationContextWithHttpInfo() throws ApiException {
HttpRequest.Builder localVarRequestBuilder = getUserCreationContextRequestBuilder();
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("getUserCreationContext", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder getUserCreationContextRequestBuilder() throws ApiException {
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users/userCreationContext";
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
localVarRequestBuilder.header("Accept", "application/json");
localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* Check if the user is data lite user or not
*
* @return Boolean
* @throws ApiException if fails to make API call
*/
public Boolean isDataAnalystUser() throws ApiException {
ApiResponse localVarResponse = isDataAnalystUserWithHttpInfo();
return localVarResponse.getData();
}
/**
* Check if the user is data lite user or not
*
* @return ApiResponse<Boolean>
* @throws ApiException if fails to make API call
*/
public ApiResponse isDataAnalystUserWithHttpInfo() throws ApiException {
HttpRequest.Builder localVarRequestBuilder = isDataAnalystUserRequestBuilder();
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("isDataAnalystUser", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder isDataAnalystUserRequestBuilder() throws ApiException {
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users/isDataAnalystUser";
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
localVarRequestBuilder.header("Accept", "application/json");
localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* Check if the user is lite user or not
*
* @param xDominoApiKey API Key (optional)
* @return DominoCommonUserLiteUserResponseDTO
* @throws ApiException if fails to make API call
*/
public DominoCommonUserLiteUserResponseDTO isLiteUser(String xDominoApiKey) throws ApiException {
ApiResponse localVarResponse = isLiteUserWithHttpInfo(xDominoApiKey);
return localVarResponse.getData();
}
/**
* Check if the user is lite user or not
*
* @param xDominoApiKey API Key (optional)
* @return ApiResponse<DominoCommonUserLiteUserResponseDTO>
* @throws ApiException if fails to make API call
*/
public ApiResponse isLiteUserWithHttpInfo(String xDominoApiKey) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = isLiteUserRequestBuilder(xDominoApiKey);
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("isLiteUser", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder isLiteUserRequestBuilder(String xDominoApiKey) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users/isLiteUser";
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
if (xDominoApiKey != null) {
localVarRequestBuilder.header("X-Domino-Api-Key", xDominoApiKey.toString());
}
localVarRequestBuilder.header("Accept", "application/json");
localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* retrieves the specified user's environment variables
*
* @return DominoCommonModelsEnvironmentVariables
* @throws ApiException if fails to make API call
*/
public DominoCommonModelsEnvironmentVariables listUserEnvironmentVariables() throws ApiException {
ApiResponse localVarResponse = listUserEnvironmentVariablesWithHttpInfo();
return localVarResponse.getData();
}
/**
* retrieves the specified user's environment variables
*
* @return ApiResponse<DominoCommonModelsEnvironmentVariables>
* @throws ApiException if fails to make API call
*/
public ApiResponse listUserEnvironmentVariablesWithHttpInfo() throws ApiException {
HttpRequest.Builder localVarRequestBuilder = listUserEnvironmentVariablesRequestBuilder();
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("listUserEnvironmentVariables", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder listUserEnvironmentVariablesRequestBuilder() throws ApiException {
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users/environmentVariables";
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
localVarRequestBuilder.header("Accept", "application/json");
localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* retrieves a list of users
*
* @param userId Optional list of user identifiers to select the previously known users (optional
* @param userName Optional filter for an exact user name (optional)
* @param query Optional filter for a user name (returns usernames starting with this query) (optional)
* @param listOnlyUsers (optional)
* @return List<DominoCommonUserPerson>
* @throws ApiException if fails to make API call
*/
public List listUsers(List userId, String userName, String query, Boolean listOnlyUsers) throws ApiException {
ApiResponse> localVarResponse = listUsersWithHttpInfo(userId, userName, query, listOnlyUsers);
return localVarResponse.getData();
}
/**
* retrieves a list of users
*
* @param userId Optional list of user identifiers to select the previously known users (optional
* @param userName Optional filter for an exact user name (optional)
* @param query Optional filter for a user name (returns usernames starting with this query) (optional)
* @param listOnlyUsers (optional)
* @return ApiResponse<List<DominoCommonUserPerson>>
* @throws ApiException if fails to make API call
*/
public ApiResponse> listUsersWithHttpInfo(List userId, String userName, String query, Boolean listOnlyUsers) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = listUsersRequestBuilder(userId, userName, query, listOnlyUsers);
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("listUsers", localVarResponse);
}
return new ApiResponse>(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder listUsersRequestBuilder(List userId, String userName, String query, Boolean listOnlyUsers) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users";
List localVarQueryParams = new ArrayList<>();
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
localVarQueryParameterBaseName = "userId";
localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "userId", userId));
localVarQueryParameterBaseName = "userName";
localVarQueryParams.addAll(ApiClient.parameterToPairs("userName", userName));
localVarQueryParameterBaseName = "query";
localVarQueryParams.addAll(ApiClient.parameterToPairs("query", query));
localVarQueryParameterBaseName = "listOnlyUsers";
localVarQueryParams.addAll(ApiClient.parameterToPairs("listOnlyUsers", listOnlyUsers));
if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) {
StringJoiner queryJoiner = new StringJoiner("&");
localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
if (localVarQueryStringJoiner.length() != 0) {
queryJoiner.add(localVarQueryStringJoiner.toString());
}
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
} else {
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
}
localVarRequestBuilder.header("Accept", "application/json");
localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* Retrieves projects dependency graph for a user, and optionally for a specific project
*
* @param ownerUsername Owner username of the project, if dependency graph is being requested for a specific project. (optional)
* @param projectName Project name for which a dependency graph is being requested. When not provided, the dependency graph is for all projects for the current user. (optional)
* @return DominoNucleusGatewayUsersModelsProjectsDependencyGraph
* @throws ApiException if fails to make API call
*/
public DominoNucleusGatewayUsersModelsProjectsDependencyGraph projectsDependencyGraph(String ownerUsername, String projectName) throws ApiException {
ApiResponse localVarResponse = projectsDependencyGraphWithHttpInfo(ownerUsername, projectName);
return localVarResponse.getData();
}
/**
* Retrieves projects dependency graph for a user, and optionally for a specific project
*
* @param ownerUsername Owner username of the project, if dependency graph is being requested for a specific project. (optional)
* @param projectName Project name for which a dependency graph is being requested. When not provided, the dependency graph is for all projects for the current user. (optional)
* @return ApiResponse<DominoNucleusGatewayUsersModelsProjectsDependencyGraph>
* @throws ApiException if fails to make API call
*/
public ApiResponse projectsDependencyGraphWithHttpInfo(String ownerUsername, String projectName) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = projectsDependencyGraphRequestBuilder(ownerUsername, projectName);
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("projectsDependencyGraph", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder projectsDependencyGraphRequestBuilder(String ownerUsername, String projectName) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/gateway/users/projectsDependencyGraph";
List localVarQueryParams = new ArrayList<>();
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
localVarQueryParameterBaseName = "ownerUsername";
localVarQueryParams.addAll(ApiClient.parameterToPairs("ownerUsername", ownerUsername));
localVarQueryParameterBaseName = "projectName";
localVarQueryParams.addAll(ApiClient.parameterToPairs("projectName", projectName));
if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) {
StringJoiner queryJoiner = new StringJoiner("&");
localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
if (localVarQueryStringJoiner.length() != 0) {
queryJoiner.add(localVarQueryStringJoiner.toString());
}
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
} else {
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
}
localVarRequestBuilder.header("Accept", "application/json");
localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* extend trial period
*
* @param xDominoApiKey API Key (optional)
* @return DominoNucleusUserResponse
* @throws ApiException if fails to make API call
*/
public DominoNucleusUserResponse requestForTrialPeriodExtension(String xDominoApiKey) throws ApiException {
ApiResponse localVarResponse = requestForTrialPeriodExtensionWithHttpInfo(xDominoApiKey);
return localVarResponse.getData();
}
/**
* extend trial period
*
* @param xDominoApiKey API Key (optional)
* @return ApiResponse<DominoNucleusUserResponse>
* @throws ApiException if fails to make API call
*/
public ApiResponse requestForTrialPeriodExtensionWithHttpInfo(String xDominoApiKey) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = requestForTrialPeriodExtensionRequestBuilder(xDominoApiKey);
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("requestForTrialPeriodExtension", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder requestForTrialPeriodExtensionRequestBuilder(String xDominoApiKey) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users/requestForTrialPeriodExtension";
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
if (xDominoApiKey != null) {
localVarRequestBuilder.header("X-Domino-Api-Key", xDominoApiKey.toString());
}
localVarRequestBuilder.header("Accept", "application/json");
localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* Set server-stored UI/UX state for the current user
*
* @param dominoCommonUserUpdateUserUIUXStateDTO The user's uiux state to set. If replace=true, then will replace all of user's uiux state with the provided state. If omitted or false, then will set only the provided state. (required)
* @param xDominoApiKey API Key (optional)
* @return DominoCommonUserUserUIUXStateDTO
* @throws ApiException if fails to make API call
*/
public DominoCommonUserUserUIUXStateDTO setCurrentUserUIUXState(DominoCommonUserUpdateUserUIUXStateDTO dominoCommonUserUpdateUserUIUXStateDTO, String xDominoApiKey) throws ApiException {
ApiResponse localVarResponse = setCurrentUserUIUXStateWithHttpInfo(dominoCommonUserUpdateUserUIUXStateDTO, xDominoApiKey);
return localVarResponse.getData();
}
/**
* Set server-stored UI/UX state for the current user
*
* @param dominoCommonUserUpdateUserUIUXStateDTO The user's uiux state to set. If replace=true, then will replace all of user's uiux state with the provided state. If omitted or false, then will set only the provided state. (required)
* @param xDominoApiKey API Key (optional)
* @return ApiResponse<DominoCommonUserUserUIUXStateDTO>
* @throws ApiException if fails to make API call
*/
public ApiResponse setCurrentUserUIUXStateWithHttpInfo(DominoCommonUserUpdateUserUIUXStateDTO dominoCommonUserUpdateUserUIUXStateDTO, String xDominoApiKey) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = setCurrentUserUIUXStateRequestBuilder(dominoCommonUserUpdateUserUIUXStateDTO, xDominoApiKey);
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("setCurrentUserUIUXState", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder setCurrentUserUIUXStateRequestBuilder(DominoCommonUserUpdateUserUIUXStateDTO dominoCommonUserUpdateUserUIUXStateDTO, String xDominoApiKey) throws ApiException {
// verify the required parameter 'dominoCommonUserUpdateUserUIUXStateDTO' is set
if (dominoCommonUserUpdateUserUIUXStateDTO == null) {
throw new ApiException(400, "Missing the required parameter 'dominoCommonUserUpdateUserUIUXStateDTO' when calling setCurrentUserUIUXState");
}
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users/uiuxState";
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
if (xDominoApiKey != null) {
localVarRequestBuilder.header("X-Domino-Api-Key", xDominoApiKey.toString());
}
localVarRequestBuilder.header("Content-Type", "application/json");
localVarRequestBuilder.header("Accept", "application/json");
try {
byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoCommonUserUpdateUserUIUXStateDTO);
localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
} catch (IOException e) {
throw new ApiException(e);
}
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* set the specified user's environment variables
*
* @param requestBody The user environment variables (required)
* @return DominoCommonModelsEnvironmentVariables
* @throws ApiException if fails to make API call
*/
public DominoCommonModelsEnvironmentVariables setUserEnvironmentVariables(Map requestBody) throws ApiException {
ApiResponse localVarResponse = setUserEnvironmentVariablesWithHttpInfo(requestBody);
return localVarResponse.getData();
}
/**
* set the specified user's environment variables
*
* @param requestBody The user environment variables (required)
* @return ApiResponse<DominoCommonModelsEnvironmentVariables>
* @throws ApiException if fails to make API call
*/
public ApiResponse setUserEnvironmentVariablesWithHttpInfo(Map requestBody) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = setUserEnvironmentVariablesRequestBuilder(requestBody);
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("setUserEnvironmentVariables", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder setUserEnvironmentVariablesRequestBuilder(Map requestBody) throws ApiException {
// verify the required parameter 'requestBody' is set
if (requestBody == null) {
throw new ApiException(400, "Missing the required parameter 'requestBody' when calling setUserEnvironmentVariables");
}
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users/environmentVariables";
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
localVarRequestBuilder.header("Content-Type", "application/json");
localVarRequestBuilder.header("Accept", "application/json");
try {
byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(requestBody);
localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
} catch (IOException e) {
throw new ApiException(e);
}
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
/**
* Mark project Id as pinned or unpinned
*
* @param dominoNucleusUserUpdatePinnedProjects Update pinned projects request (required)
* @return DominoNucleusUserResponse
* @throws ApiException if fails to make API call
*/
public DominoNucleusUserResponse updatePinnedProjects(DominoNucleusUserUpdatePinnedProjects dominoNucleusUserUpdatePinnedProjects) throws ApiException {
ApiResponse localVarResponse = updatePinnedProjectsWithHttpInfo(dominoNucleusUserUpdatePinnedProjects);
return localVarResponse.getData();
}
/**
* Mark project Id as pinned or unpinned
*
* @param dominoNucleusUserUpdatePinnedProjects Update pinned projects request (required)
* @return ApiResponse<DominoNucleusUserResponse>
* @throws ApiException if fails to make API call
*/
public ApiResponse updatePinnedProjectsWithHttpInfo(DominoNucleusUserUpdatePinnedProjects dominoNucleusUserUpdatePinnedProjects) throws ApiException {
HttpRequest.Builder localVarRequestBuilder = updatePinnedProjectsRequestBuilder(dominoNucleusUserUpdatePinnedProjects);
try {
HttpResponse localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofInputStream());
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("updatePinnedProjects", localVarResponse);
}
return new ApiResponse(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream
);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ApiException(e);
}
}
private HttpRequest.Builder updatePinnedProjectsRequestBuilder(DominoNucleusUserUpdatePinnedProjects dominoNucleusUserUpdatePinnedProjects) throws ApiException {
// verify the required parameter 'dominoNucleusUserUpdatePinnedProjects' is set
if (dominoNucleusUserUpdatePinnedProjects == null) {
throw new ApiException(400, "Missing the required parameter 'dominoNucleusUserUpdatePinnedProjects' when calling updatePinnedProjects");
}
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
String localVarPath = "/users/updatePinnedProjects";
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
localVarRequestBuilder.header("Content-Type", "application/json");
localVarRequestBuilder.header("Accept", "application/json");
try {
byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoNucleusUserUpdatePinnedProjects);
localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
} catch (IOException e) {
throw new ApiException(e);
}
if (memberVarReadTimeout != null) {
localVarRequestBuilder.timeout(memberVarReadTimeout);
}
if (memberVarInterceptor != null) {
memberVarInterceptor.accept(localVarRequestBuilder);
}
return localVarRequestBuilder;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy