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

com.dominodatalab.api.rest.WorkspaceApi 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 java.math.BigDecimal;
import com.dominodatalab.api.model.DominoApiErrorResponse;
import com.dominodatalab.api.model.DominoComputeclusterApiComputeClusterDetails;
import com.dominodatalab.api.model.DominoComputeclusterApiDefaultComputeClusterSettings;
import com.dominodatalab.api.model.DominoComputegridComputeClusterFileSyncResponse;
import com.dominodatalab.api.model.DominoComputegridComputeClusterFileSyncStatusResponse;
import com.dominodatalab.api.model.DominoComputegridComputeClusterStatus;
import com.dominodatalab.api.model.DominoComputegridExecutionCheckpoint;
import com.dominodatalab.api.model.DominoComputegridLogSet;
import com.dominodatalab.api.model.DominoComputegridResourceUsage;
import com.dominodatalab.api.model.DominoExecutorApiCheckoutBranchRequest;
import com.dominodatalab.api.model.DominoExecutorApiCheckoutBranchResponseDto;
import com.dominodatalab.api.model.DominoExecutorApiListBranchesRequest;
import com.dominodatalab.api.model.DominoExecutorApiListBranchesResponseDto;
import com.dominodatalab.api.model.DominoProjectsApiWritableProjectMounts;
import com.dominodatalab.api.model.DominoProvenanceApiProvenanceCheckpointDto;
import com.dominodatalab.api.model.DominoWorkspaceApiGitCancelMergeConflictResolutionRequest;
import com.dominodatalab.api.model.DominoWorkspaceApiGitCommitAndPushReposResponseDto;
import com.dominodatalab.api.model.DominoWorkspaceApiGitCommitAndPushRequest;
import com.dominodatalab.api.model.DominoWorkspaceApiGitCommitReposResponseDto;
import com.dominodatalab.api.model.DominoWorkspaceApiGitCommitRequest;
import com.dominodatalab.api.model.DominoWorkspaceApiGitContinueMergeConflictResolutionRequest;
import com.dominodatalab.api.model.DominoWorkspaceApiGitContinueMergeConflictResolutionResponseDto;
import com.dominodatalab.api.model.DominoWorkspaceApiGitForcePushResolutionRequest;
import com.dominodatalab.api.model.DominoWorkspaceApiGitHardResetResolutionRequest;
import com.dominodatalab.api.model.DominoWorkspaceApiGitMergeConflictResolutionResponseDto;
import com.dominodatalab.api.model.DominoWorkspaceApiGitPullReposRequest;
import com.dominodatalab.api.model.DominoWorkspaceApiGitPullReposResponseDto;
import com.dominodatalab.api.model.DominoWorkspaceApiGitStageCurrentLocalFileRequest;
import com.dominodatalab.api.model.DominoWorkspaceApiGitStageFileResponseDto;
import com.dominodatalab.api.model.DominoWorkspaceApiGitStageLocalCommitFileRequest;
import com.dominodatalab.api.model.DominoWorkspaceApiGitStageRemoteCommitFileRequest;
import com.dominodatalab.api.model.DominoWorkspaceApiWorkspaceAdminPageDataDto;
import com.dominodatalab.api.model.DominoWorkspaceApiWorkspaceAdminPageSummaryDto;
import com.dominodatalab.api.model.DominoWorkspaceApiWorkspaceDto;
import com.dominodatalab.api.model.DominoWorkspaceApiWorkspaceExecutionInfoDto;
import com.dominodatalab.api.model.DominoWorkspaceApiWorkspaceGlobalSettingsDto;
import com.dominodatalab.api.model.DominoWorkspaceApiWorkspacePageDto;
import com.dominodatalab.api.model.DominoWorkspaceApiWorkspaceQuotaStatusDto;
import com.dominodatalab.api.model.DominoWorkspaceApiWorkspaceRepositoryState;
import com.dominodatalab.api.model.DominoWorkspaceApiWorkspaceSessionDto;
import com.dominodatalab.api.model.DominoWorkspaceApiWorkspaceSessionProvenanceDto;
import com.dominodatalab.api.model.DominoWorkspaceWebCreateWorkspaceRequest;
import com.dominodatalab.api.model.DominoWorkspaceWebFetchCheckpointForCommitsRequest;
import com.dominodatalab.api.model.DominoWorkspaceWebReproduceWorkspaceRequest;
import com.dominodatalab.api.model.DominoWorkspaceWebStopClassicWorkspaceRequest;
import com.dominodatalab.api.model.DominoWorkspaceWebUpdateWorkspaceRequest;
import com.dominodatalab.api.model.DominoWorkspaceWebUpdateWorkspaceTitleRequest;
import com.dominodatalab.api.model.DominoWorkspaceWebWorkspaceEvents;

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 WorkspaceApi {
  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 WorkspaceApi() {
    this(new ApiClient());
  }

  public WorkspaceApi(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;
  }

  /**
   * Cancel an existing merge conflict
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitCancelMergeConflictResolutionRequest list of repositories that are in conflict (required)
   * @return DominoWorkspaceApiGitMergeConflictResolutionResponseDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiGitMergeConflictResolutionResponseDto cancelMergeConflictResolution(String workspaceId, DominoWorkspaceApiGitCancelMergeConflictResolutionRequest dominoWorkspaceApiGitCancelMergeConflictResolutionRequest) throws ApiException {
    ApiResponse localVarResponse = cancelMergeConflictResolutionWithHttpInfo(workspaceId, dominoWorkspaceApiGitCancelMergeConflictResolutionRequest);
    return localVarResponse.getData();
  }

  /**
   * Cancel an existing merge conflict
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitCancelMergeConflictResolutionRequest list of repositories that are in conflict (required)
   * @return ApiResponse<DominoWorkspaceApiGitMergeConflictResolutionResponseDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse cancelMergeConflictResolutionWithHttpInfo(String workspaceId, DominoWorkspaceApiGitCancelMergeConflictResolutionRequest dominoWorkspaceApiGitCancelMergeConflictResolutionRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = cancelMergeConflictResolutionRequestBuilder(workspaceId, dominoWorkspaceApiGitCancelMergeConflictResolutionRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("cancelMergeConflictResolution", 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 cancelMergeConflictResolutionRequestBuilder(String workspaceId, DominoWorkspaceApiGitCancelMergeConflictResolutionRequest dominoWorkspaceApiGitCancelMergeConflictResolutionRequest) throws ApiException {
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling cancelMergeConflictResolution");
    }
    // verify the required parameter 'dominoWorkspaceApiGitCancelMergeConflictResolutionRequest' is set
    if (dominoWorkspaceApiGitCancelMergeConflictResolutionRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceApiGitCancelMergeConflictResolutionRequest' when calling cancelMergeConflictResolution");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceId}/cancelMergeResolution"
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceApiGitCancelMergeConflictResolutionRequest);
      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;
  }
  /**
   * checkout branch of a git repository
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoExecutorApiCheckoutBranchRequest repository and which branch to checkout to (required)
   * @return DominoExecutorApiCheckoutBranchResponseDto
   * @throws ApiException if fails to make API call
   */
  public DominoExecutorApiCheckoutBranchResponseDto checkoutBranch(String workspaceId, DominoExecutorApiCheckoutBranchRequest dominoExecutorApiCheckoutBranchRequest) throws ApiException {
    ApiResponse localVarResponse = checkoutBranchWithHttpInfo(workspaceId, dominoExecutorApiCheckoutBranchRequest);
    return localVarResponse.getData();
  }

  /**
   * checkout branch of a git repository
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoExecutorApiCheckoutBranchRequest repository and which branch to checkout to (required)
   * @return ApiResponse<DominoExecutorApiCheckoutBranchResponseDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse checkoutBranchWithHttpInfo(String workspaceId, DominoExecutorApiCheckoutBranchRequest dominoExecutorApiCheckoutBranchRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = checkoutBranchRequestBuilder(workspaceId, dominoExecutorApiCheckoutBranchRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("checkoutBranch", 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 checkoutBranchRequestBuilder(String workspaceId, DominoExecutorApiCheckoutBranchRequest dominoExecutorApiCheckoutBranchRequest) throws ApiException {
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling checkoutBranch");
    }
    // verify the required parameter 'dominoExecutorApiCheckoutBranchRequest' is set
    if (dominoExecutorApiCheckoutBranchRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoExecutorApiCheckoutBranchRequest' when calling checkoutBranch");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceId}/checkoutBranch"
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoExecutorApiCheckoutBranchRequest);
      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;
  }
  /**
   * Commit and Push for enhanced merge conflicts
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitCommitAndPushRequest list of repositories that should be committed and pushed (required)
   * @return DominoWorkspaceApiGitCommitAndPushReposResponseDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiGitCommitAndPushReposResponseDto commitAndPushReposEnhanced(String workspaceId, DominoWorkspaceApiGitCommitAndPushRequest dominoWorkspaceApiGitCommitAndPushRequest) throws ApiException {
    ApiResponse localVarResponse = commitAndPushReposEnhancedWithHttpInfo(workspaceId, dominoWorkspaceApiGitCommitAndPushRequest);
    return localVarResponse.getData();
  }

  /**
   * Commit and Push for enhanced merge conflicts
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitCommitAndPushRequest list of repositories that should be committed and pushed (required)
   * @return ApiResponse<DominoWorkspaceApiGitCommitAndPushReposResponseDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse commitAndPushReposEnhancedWithHttpInfo(String workspaceId, DominoWorkspaceApiGitCommitAndPushRequest dominoWorkspaceApiGitCommitAndPushRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = commitAndPushReposEnhancedRequestBuilder(workspaceId, dominoWorkspaceApiGitCommitAndPushRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("commitAndPushReposEnhanced", 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 commitAndPushReposEnhancedRequestBuilder(String workspaceId, DominoWorkspaceApiGitCommitAndPushRequest dominoWorkspaceApiGitCommitAndPushRequest) throws ApiException {
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling commitAndPushReposEnhanced");
    }
    // verify the required parameter 'dominoWorkspaceApiGitCommitAndPushRequest' is set
    if (dominoWorkspaceApiGitCommitAndPushRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceApiGitCommitAndPushRequest' when calling commitAndPushReposEnhanced");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceId}/commitAndPushReposEnhanced"
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceApiGitCommitAndPushRequest);
      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;
  }
  /**
   * Commit repos
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitCommitRequest list of repositories that should be committed (required)
   * @return DominoWorkspaceApiGitCommitReposResponseDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiGitCommitReposResponseDto commitRepos(String workspaceId, DominoWorkspaceApiGitCommitRequest dominoWorkspaceApiGitCommitRequest) throws ApiException {
    ApiResponse localVarResponse = commitReposWithHttpInfo(workspaceId, dominoWorkspaceApiGitCommitRequest);
    return localVarResponse.getData();
  }

  /**
   * Commit repos
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitCommitRequest list of repositories that should be committed (required)
   * @return ApiResponse<DominoWorkspaceApiGitCommitReposResponseDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse commitReposWithHttpInfo(String workspaceId, DominoWorkspaceApiGitCommitRequest dominoWorkspaceApiGitCommitRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = commitReposRequestBuilder(workspaceId, dominoWorkspaceApiGitCommitRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("commitRepos", 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 commitReposRequestBuilder(String workspaceId, DominoWorkspaceApiGitCommitRequest dominoWorkspaceApiGitCommitRequest) throws ApiException {
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling commitRepos");
    }
    // verify the required parameter 'dominoWorkspaceApiGitCommitRequest' is set
    if (dominoWorkspaceApiGitCommitRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceApiGitCommitRequest' when calling commitRepos");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceId}/commitRepos"
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceApiGitCommitRequest);
      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;
  }
  /**
   * Continue merge conflict resolution
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitContinueMergeConflictResolutionRequest Repository to continue rebase for along with a commit message (required)
   * @return DominoWorkspaceApiGitContinueMergeConflictResolutionResponseDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiGitContinueMergeConflictResolutionResponseDto continueMergeConflictResolution(String workspaceId, DominoWorkspaceApiGitContinueMergeConflictResolutionRequest dominoWorkspaceApiGitContinueMergeConflictResolutionRequest) throws ApiException {
    ApiResponse localVarResponse = continueMergeConflictResolutionWithHttpInfo(workspaceId, dominoWorkspaceApiGitContinueMergeConflictResolutionRequest);
    return localVarResponse.getData();
  }

  /**
   * Continue merge conflict resolution
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitContinueMergeConflictResolutionRequest Repository to continue rebase for along with a commit message (required)
   * @return ApiResponse<DominoWorkspaceApiGitContinueMergeConflictResolutionResponseDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse continueMergeConflictResolutionWithHttpInfo(String workspaceId, DominoWorkspaceApiGitContinueMergeConflictResolutionRequest dominoWorkspaceApiGitContinueMergeConflictResolutionRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = continueMergeConflictResolutionRequestBuilder(workspaceId, dominoWorkspaceApiGitContinueMergeConflictResolutionRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("continueMergeConflictResolution", 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 continueMergeConflictResolutionRequestBuilder(String workspaceId, DominoWorkspaceApiGitContinueMergeConflictResolutionRequest dominoWorkspaceApiGitContinueMergeConflictResolutionRequest) throws ApiException {
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling continueMergeConflictResolution");
    }
    // verify the required parameter 'dominoWorkspaceApiGitContinueMergeConflictResolutionRequest' is set
    if (dominoWorkspaceApiGitContinueMergeConflictResolutionRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceApiGitContinueMergeConflictResolutionRequest' when calling continueMergeConflictResolution");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceId}/continueMergeResolution"
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceApiGitContinueMergeConflictResolutionRequest);
      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;
  }
  /**
   * Create workspace
   * 
   * @param projectId Id of the project (required)
   * @param dominoWorkspaceWebCreateWorkspaceRequest Create workspace request (required)
   * @return DominoWorkspaceApiWorkspaceDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceDto createAndStartWorkspace(String projectId, DominoWorkspaceWebCreateWorkspaceRequest dominoWorkspaceWebCreateWorkspaceRequest) throws ApiException {
    ApiResponse localVarResponse = createAndStartWorkspaceWithHttpInfo(projectId, dominoWorkspaceWebCreateWorkspaceRequest);
    return localVarResponse.getData();
  }

  /**
   * Create workspace
   * 
   * @param projectId Id of the project (required)
   * @param dominoWorkspaceWebCreateWorkspaceRequest Create workspace request (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspaceDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse createAndStartWorkspaceWithHttpInfo(String projectId, DominoWorkspaceWebCreateWorkspaceRequest dominoWorkspaceWebCreateWorkspaceRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = createAndStartWorkspaceRequestBuilder(projectId, dominoWorkspaceWebCreateWorkspaceRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("createAndStartWorkspace", 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 createAndStartWorkspaceRequestBuilder(String projectId, DominoWorkspaceWebCreateWorkspaceRequest dominoWorkspaceWebCreateWorkspaceRequest) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling createAndStartWorkspace");
    }
    // verify the required parameter 'dominoWorkspaceWebCreateWorkspaceRequest' is set
    if (dominoWorkspaceWebCreateWorkspaceRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceWebCreateWorkspaceRequest' when calling createAndStartWorkspace");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/workspace"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceWebCreateWorkspaceRequest);
      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;
  }
  /**
   * Delete workspace
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @return DominoWorkspaceApiWorkspaceDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceDto deleteWorkspace(String projectId, String workspaceId) throws ApiException {
    ApiResponse localVarResponse = deleteWorkspaceWithHttpInfo(projectId, workspaceId);
    return localVarResponse.getData();
  }

  /**
   * Delete workspace
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspaceDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse deleteWorkspaceWithHttpInfo(String projectId, String workspaceId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = deleteWorkspaceRequestBuilder(projectId, workspaceId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("deleteWorkspace", 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 deleteWorkspaceRequestBuilder(String projectId, String workspaceId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling deleteWorkspace");
    }
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling deleteWorkspace");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/workspace/{workspaceId}"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    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;
  }
  /**
   * Get deleted workspaces for project
   * 
   * @param projectId project id (required)
   * @param offset offset (required)
   * @param limit max length returned (required)
   * @return DominoWorkspaceApiWorkspacePageDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspacePageDto deletedWorkspaces(String projectId, Integer offset, Integer limit) throws ApiException {
    ApiResponse localVarResponse = deletedWorkspacesWithHttpInfo(projectId, offset, limit);
    return localVarResponse.getData();
  }

  /**
   * Get deleted workspaces for project
   * 
   * @param projectId project id (required)
   * @param offset offset (required)
   * @param limit max length returned (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspacePageDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse deletedWorkspacesWithHttpInfo(String projectId, Integer offset, Integer limit) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = deletedWorkspacesRequestBuilder(projectId, offset, limit);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("deletedWorkspaces", 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 deletedWorkspacesRequestBuilder(String projectId, Integer offset, Integer limit) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling deletedWorkspaces");
    }
    // verify the required parameter 'offset' is set
    if (offset == null) {
      throw new ApiException(400, "Missing the required parameter 'offset' when calling deletedWorkspaces");
    }
    // verify the required parameter 'limit' is set
    if (limit == null) {
      throw new ApiException(400, "Missing the required parameter 'limit' when calling deletedWorkspaces");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/deleted"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "offset";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset));
    localVarQueryParameterBaseName = "limit";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit));

    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;
  }
  /**
   * Force push branch to resolve merge conflict
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitForcePushResolutionRequest list of repositories that are in conflict (required)
   * @return DominoWorkspaceApiGitMergeConflictResolutionResponseDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiGitMergeConflictResolutionResponseDto forcePushResolution(String workspaceId, DominoWorkspaceApiGitForcePushResolutionRequest dominoWorkspaceApiGitForcePushResolutionRequest) throws ApiException {
    ApiResponse localVarResponse = forcePushResolutionWithHttpInfo(workspaceId, dominoWorkspaceApiGitForcePushResolutionRequest);
    return localVarResponse.getData();
  }

  /**
   * Force push branch to resolve merge conflict
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitForcePushResolutionRequest list of repositories that are in conflict (required)
   * @return ApiResponse<DominoWorkspaceApiGitMergeConflictResolutionResponseDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse forcePushResolutionWithHttpInfo(String workspaceId, DominoWorkspaceApiGitForcePushResolutionRequest dominoWorkspaceApiGitForcePushResolutionRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = forcePushResolutionRequestBuilder(workspaceId, dominoWorkspaceApiGitForcePushResolutionRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("forcePushResolution", 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 forcePushResolutionRequestBuilder(String workspaceId, DominoWorkspaceApiGitForcePushResolutionRequest dominoWorkspaceApiGitForcePushResolutionRequest) throws ApiException {
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling forcePushResolution");
    }
    // verify the required parameter 'dominoWorkspaceApiGitForcePushResolutionRequest' is set
    if (dominoWorkspaceApiGitForcePushResolutionRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceApiGitForcePushResolutionRequest' when calling forcePushResolution");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceId}/forcePushResolution"
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceApiGitForcePushResolutionRequest);
      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;
  }
  /**
   * Get all workspace admin dashboard entries
   * 
   * @param offset The number of items to skip relative to the checkpoint project before starting to collect the page. If no checkpoint project is provided, will skip relative to the first project of the first user. Can be negative.  (optional, default to 0)
   * @param limit The size of the page to return. (optional, default to 50)
   * @param searchString Filters projects by owner name and project name substrings (optional)
   * @param sortBy A column name to sort over. (optional)
   * @param sortOrder order of sort (optional)
   * @return DominoWorkspaceApiWorkspaceAdminPageDataDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceAdminPageDataDto getAdminDashboardRowData(Integer offset, Integer limit, String searchString, Object sortBy, String sortOrder) throws ApiException {
    ApiResponse localVarResponse = getAdminDashboardRowDataWithHttpInfo(offset, limit, searchString, sortBy, sortOrder);
    return localVarResponse.getData();
  }

  /**
   * Get all workspace admin dashboard entries
   * 
   * @param offset The number of items to skip relative to the checkpoint project before starting to collect the page. If no checkpoint project is provided, will skip relative to the first project of the first user. Can be negative.  (optional, default to 0)
   * @param limit The size of the page to return. (optional, default to 50)
   * @param searchString Filters projects by owner name and project name substrings (optional)
   * @param sortBy A column name to sort over. (optional)
   * @param sortOrder order of sort (optional)
   * @return ApiResponse<DominoWorkspaceApiWorkspaceAdminPageDataDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getAdminDashboardRowDataWithHttpInfo(Integer offset, Integer limit, String searchString, Object sortBy, String sortOrder) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getAdminDashboardRowDataRequestBuilder(offset, limit, searchString, sortBy, sortOrder);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getAdminDashboardRowData", 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 getAdminDashboardRowDataRequestBuilder(Integer offset, Integer limit, String searchString, Object sortBy, String sortOrder) throws ApiException {

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/adminDashboardRowData";

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "offset";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset));
    localVarQueryParameterBaseName = "limit";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit));
    localVarQueryParameterBaseName = "searchString";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("searchString", searchString));
    localVarQueryParameterBaseName = "sortBy";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("sortBy", sortBy));
    localVarQueryParameterBaseName = "sortOrder";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder));

    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;
  }
  /**
   * Get checkpoint for commitId
   * 
   * @param projectId Id of the project (required)
   * @param dominoWorkspaceWebFetchCheckpointForCommitsRequest Fetch checkpoint for commits request (required)
   * @return DominoProvenanceApiProvenanceCheckpointDto
   * @throws ApiException if fails to make API call
   */
  public DominoProvenanceApiProvenanceCheckpointDto getCheckpointForCommits(String projectId, DominoWorkspaceWebFetchCheckpointForCommitsRequest dominoWorkspaceWebFetchCheckpointForCommitsRequest) throws ApiException {
    ApiResponse localVarResponse = getCheckpointForCommitsWithHttpInfo(projectId, dominoWorkspaceWebFetchCheckpointForCommitsRequest);
    return localVarResponse.getData();
  }

  /**
   * Get checkpoint for commitId
   * 
   * @param projectId Id of the project (required)
   * @param dominoWorkspaceWebFetchCheckpointForCommitsRequest Fetch checkpoint for commits request (required)
   * @return ApiResponse<DominoProvenanceApiProvenanceCheckpointDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getCheckpointForCommitsWithHttpInfo(String projectId, DominoWorkspaceWebFetchCheckpointForCommitsRequest dominoWorkspaceWebFetchCheckpointForCommitsRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getCheckpointForCommitsRequestBuilder(projectId, dominoWorkspaceWebFetchCheckpointForCommitsRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getCheckpointForCommits", 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 getCheckpointForCommitsRequestBuilder(String projectId, DominoWorkspaceWebFetchCheckpointForCommitsRequest dominoWorkspaceWebFetchCheckpointForCommitsRequest) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getCheckpointForCommits");
    }
    // verify the required parameter 'dominoWorkspaceWebFetchCheckpointForCommitsRequest' is set
    if (dominoWorkspaceWebFetchCheckpointForCommitsRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceWebFetchCheckpointForCommitsRequest' when calling getCheckpointForCommits");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/getCheckpointForCommitIds"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceWebFetchCheckpointForCommitsRequest);
      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;
  }
  /**
   * Get each checkpoint name and their individual status for an execution
   * 
   * @param projectId ID of the Project (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return List<DominoComputegridExecutionCheckpoint>
   * @throws ApiException if fails to make API call
   */
  public List getExecutionCheckpointStatuses(String projectId, String workspaceSessionId) throws ApiException {
    ApiResponse> localVarResponse = getExecutionCheckpointStatusesWithHttpInfo(projectId, workspaceSessionId);
    return localVarResponse.getData();
  }

  /**
   * Get each checkpoint name and their individual status for an execution
   * 
   * @param projectId ID of the Project (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return ApiResponse<List<DominoComputegridExecutionCheckpoint>>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse> getExecutionCheckpointStatusesWithHttpInfo(String projectId, String workspaceSessionId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getExecutionCheckpointStatusesRequestBuilder(projectId, workspaceSessionId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getExecutionCheckpointStatuses", 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 getExecutionCheckpointStatusesRequestBuilder(String projectId, String workspaceSessionId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getExecutionCheckpointStatuses");
    }
    // verify the required parameter 'workspaceSessionId' is set
    if (workspaceSessionId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceSessionId' when calling getExecutionCheckpointStatuses");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceSessionId}/executionCheckpointStatuses"
        .replace("{workspaceSessionId}", ApiClient.urlEncode(workspaceSessionId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "projectId";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("projectId", projectId));

    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;
  }
  /**
   * Get the global workspace settings
   * 
   * @return DominoWorkspaceApiWorkspaceGlobalSettingsDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceGlobalSettingsDto getGlobalSettings() throws ApiException {
    ApiResponse localVarResponse = getGlobalSettingsWithHttpInfo();
    return localVarResponse.getData();
  }

  /**
   * Get the global workspace settings
   * 
   * @return ApiResponse<DominoWorkspaceApiWorkspaceGlobalSettingsDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getGlobalSettingsWithHttpInfo() throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getGlobalSettingsRequestBuilder();
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getGlobalSettings", 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 getGlobalSettingsRequestBuilder() throws ApiException {

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/getGlobalSettings";

    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 the logs of a workspace
   * 
   * @param projectId ID of the project with the workspace (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @param limit Max number of log lines to fetch. Will be overridden by the configuration's limit if this value exceeds the configuration's limit, or if this value is not provided. (optional, default to 10000)
   * @param offset The index of the current body of logs to start fetching from. 0 by default and typically won't be used for a timestamp-based offset log fetching strategy. (optional, default to 0)
   * @param latestTimeNano The epoch time in nanoseconds to start fetching from, such as \"1543538813745986325\". \"0\" by default and will typically be used for a timestamp-based offset log fetching strategy. (optional, default to 0)
   * @return DominoComputegridLogSet
   * @throws ApiException if fails to make API call
   */
  public DominoComputegridLogSet getLogs(String projectId, String workspaceSessionId, Integer limit, Integer offset, String latestTimeNano) throws ApiException {
    ApiResponse localVarResponse = getLogsWithHttpInfo(projectId, workspaceSessionId, limit, offset, latestTimeNano);
    return localVarResponse.getData();
  }

  /**
   * Get the logs of a workspace
   * 
   * @param projectId ID of the project with the workspace (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @param limit Max number of log lines to fetch. Will be overridden by the configuration's limit if this value exceeds the configuration's limit, or if this value is not provided. (optional, default to 10000)
   * @param offset The index of the current body of logs to start fetching from. 0 by default and typically won't be used for a timestamp-based offset log fetching strategy. (optional, default to 0)
   * @param latestTimeNano The epoch time in nanoseconds to start fetching from, such as \"1543538813745986325\". \"0\" by default and will typically be used for a timestamp-based offset log fetching strategy. (optional, default to 0)
   * @return ApiResponse<DominoComputegridLogSet>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getLogsWithHttpInfo(String projectId, String workspaceSessionId, Integer limit, Integer offset, String latestTimeNano) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getLogsRequestBuilder(projectId, workspaceSessionId, limit, offset, latestTimeNano);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getLogs", 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 getLogsRequestBuilder(String projectId, String workspaceSessionId, Integer limit, Integer offset, String latestTimeNano) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getLogs");
    }
    // verify the required parameter 'workspaceSessionId' is set
    if (workspaceSessionId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceSessionId' when calling getLogs");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{projectId}/{workspaceSessionId}/logs"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{workspaceSessionId}", ApiClient.urlEncode(workspaceSessionId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "limit";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit));
    localVarQueryParameterBaseName = "offset";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset));
    localVarQueryParameterBaseName = "latestTimeNano";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("latestTimeNano", latestTimeNano));

    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;
  }
  /**
   * Get the project snapshots for a workspace session
   * 
   * @param projectId ID of the Project (required)
   * @param executionId ID of the execution corresponding to a workspace session (required)
   * @param offset The number of items to skip.  Can not be negative. (optional, default to 0)
   * @param limit The size of the page to return. (optional, default to 50)
   * @param sortBy A column name to sort over - createdAt, dfsBranch, executionStart, mainGitBranch - default is 'createdAt'. (optional)
   * @param sortOrder order of sort.  default is 'desc'. (optional)
   * @return DominoWorkspaceApiWorkspaceSessionProvenanceDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceSessionProvenanceDto getProvenanceCheckpointsForExecution(String projectId, String executionId, Integer offset, Integer limit, Object sortBy, String sortOrder) throws ApiException {
    ApiResponse localVarResponse = getProvenanceCheckpointsForExecutionWithHttpInfo(projectId, executionId, offset, limit, sortBy, sortOrder);
    return localVarResponse.getData();
  }

  /**
   * Get the project snapshots for a workspace session
   * 
   * @param projectId ID of the Project (required)
   * @param executionId ID of the execution corresponding to a workspace session (required)
   * @param offset The number of items to skip.  Can not be negative. (optional, default to 0)
   * @param limit The size of the page to return. (optional, default to 50)
   * @param sortBy A column name to sort over - createdAt, dfsBranch, executionStart, mainGitBranch - default is 'createdAt'. (optional)
   * @param sortOrder order of sort.  default is 'desc'. (optional)
   * @return ApiResponse<DominoWorkspaceApiWorkspaceSessionProvenanceDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getProvenanceCheckpointsForExecutionWithHttpInfo(String projectId, String executionId, Integer offset, Integer limit, Object sortBy, String sortOrder) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getProvenanceCheckpointsForExecutionRequestBuilder(projectId, executionId, offset, limit, sortBy, sortOrder);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getProvenanceCheckpointsForExecution", 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 getProvenanceCheckpointsForExecutionRequestBuilder(String projectId, String executionId, Integer offset, Integer limit, Object sortBy, String sortOrder) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getProvenanceCheckpointsForExecution");
    }
    // verify the required parameter 'executionId' is set
    if (executionId == null) {
      throw new ApiException(400, "Missing the required parameter 'executionId' when calling getProvenanceCheckpointsForExecution");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{executionId}/provenanceCheckpoints"
        .replace("{executionId}", ApiClient.urlEncode(executionId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "projectId";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("projectId", projectId));
    localVarQueryParameterBaseName = "offset";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset));
    localVarQueryParameterBaseName = "limit";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit));
    localVarQueryParameterBaseName = "sortBy";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("sortBy", sortBy));
    localVarQueryParameterBaseName = "sortOrder";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder));

    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;
  }
  /**
   * Get all provenance checkpoints for a workspace
   * 
   * @param projectId ID of the project containing the workspace (required)
   * @param workspaceId ID of the workspace (required)
   * @param offset The number of items to skip.  Can not be negative.  (optional, default to 0)
   * @param limit The size of the page to return. (optional, default to 50)
   * @param sortBy A column name to sort over - createdAt, dfsBranch, executionStart, mainGitBranch - default is 'createdAt'. (optional)
   * @param sortOrder order of sort.  default is 'desc'. (optional)
   * @return List<DominoProvenanceApiProvenanceCheckpointDto>
   * @throws ApiException if fails to make API call
   */
  public List getProvenanceCheckpointsForWorkspace(String projectId, String workspaceId, Integer offset, Integer limit, Object sortBy, String sortOrder) throws ApiException {
    ApiResponse> localVarResponse = getProvenanceCheckpointsForWorkspaceWithHttpInfo(projectId, workspaceId, offset, limit, sortBy, sortOrder);
    return localVarResponse.getData();
  }

  /**
   * Get all provenance checkpoints for a workspace
   * 
   * @param projectId ID of the project containing the workspace (required)
   * @param workspaceId ID of the workspace (required)
   * @param offset The number of items to skip.  Can not be negative.  (optional, default to 0)
   * @param limit The size of the page to return. (optional, default to 50)
   * @param sortBy A column name to sort over - createdAt, dfsBranch, executionStart, mainGitBranch - default is 'createdAt'. (optional)
   * @param sortOrder order of sort.  default is 'desc'. (optional)
   * @return ApiResponse<List<DominoProvenanceApiProvenanceCheckpointDto>>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse> getProvenanceCheckpointsForWorkspaceWithHttpInfo(String projectId, String workspaceId, Integer offset, Integer limit, Object sortBy, String sortOrder) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getProvenanceCheckpointsForWorkspaceRequestBuilder(projectId, workspaceId, offset, limit, sortBy, sortOrder);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getProvenanceCheckpointsForWorkspace", 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 getProvenanceCheckpointsForWorkspaceRequestBuilder(String projectId, String workspaceId, Integer offset, Integer limit, Object sortBy, String sortOrder) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getProvenanceCheckpointsForWorkspace");
    }
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling getProvenanceCheckpointsForWorkspace");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/workspaceId/{workspaceId}/provenanceCheckpoints"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "offset";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset));
    localVarQueryParameterBaseName = "limit";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit));
    localVarQueryParameterBaseName = "sortBy";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("sortBy", sortBy));
    localVarQueryParameterBaseName = "sortOrder";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder));

    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;
  }
  /**
   * Get the number of provisioned workspaces for project
   * 
   * @param projectId Id of the project (required)
   * @return BigDecimal
   * @throws ApiException if fails to make API call
   */
  public BigDecimal getProvisionedWorkspaceCount(String projectId) throws ApiException {
    ApiResponse localVarResponse = getProvisionedWorkspaceCountWithHttpInfo(projectId);
    return localVarResponse.getData();
  }

  /**
   * Get the number of provisioned workspaces for project
   * 
   * @param projectId Id of the project (required)
   * @return ApiResponse<BigDecimal>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getProvisionedWorkspaceCountWithHttpInfo(String projectId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getProvisionedWorkspaceCountRequestBuilder(projectId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getProvisionedWorkspaceCount", 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 getProvisionedWorkspaceCountRequestBuilder(String projectId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getProvisionedWorkspaceCount");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{projectId}/getProvisionedWorkspaceCount"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()));

    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 the logs of a workspace
   * 
   * @param projectId ID of the project with the workspace (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @param limit Max number of log lines to fetch. Will be overridden by the configuration's limit if this value exceeds the configuration's limit, or if this value is not provided. (optional, default to 10000)
   * @param offset The index of the current body of logs to start fetching from. 0 by default and typically won't be used for a timestamp-based offset log fetching strategy. (optional, default to 0)
   * @param latestTimeNano The epoch time in nanoseconds to start fetching from, such as \"1543538813745986325\". \"0\" by default and will typically be used for a timestamp-based offset log fetching strategy. (optional, default to 0)
   * @return DominoComputegridLogSet
   * @throws ApiException if fails to make API call
   */
  public DominoComputegridLogSet getRealTimeLogs(String projectId, String workspaceSessionId, Integer limit, Integer offset, String latestTimeNano) throws ApiException {
    ApiResponse localVarResponse = getRealTimeLogsWithHttpInfo(projectId, workspaceSessionId, limit, offset, latestTimeNano);
    return localVarResponse.getData();
  }

  /**
   * Get the logs of a workspace
   * 
   * @param projectId ID of the project with the workspace (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @param limit Max number of log lines to fetch. Will be overridden by the configuration's limit if this value exceeds the configuration's limit, or if this value is not provided. (optional, default to 10000)
   * @param offset The index of the current body of logs to start fetching from. 0 by default and typically won't be used for a timestamp-based offset log fetching strategy. (optional, default to 0)
   * @param latestTimeNano The epoch time in nanoseconds to start fetching from, such as \"1543538813745986325\". \"0\" by default and will typically be used for a timestamp-based offset log fetching strategy. (optional, default to 0)
   * @return ApiResponse<DominoComputegridLogSet>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getRealTimeLogsWithHttpInfo(String projectId, String workspaceSessionId, Integer limit, Integer offset, String latestTimeNano) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getRealTimeLogsRequestBuilder(projectId, workspaceSessionId, limit, offset, latestTimeNano);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getRealTimeLogs", 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 getRealTimeLogsRequestBuilder(String projectId, String workspaceSessionId, Integer limit, Integer offset, String latestTimeNano) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getRealTimeLogs");
    }
    // verify the required parameter 'workspaceSessionId' is set
    if (workspaceSessionId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceSessionId' when calling getRealTimeLogs");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{projectId}/{workspaceSessionId}/realTimeLogs"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{workspaceSessionId}", ApiClient.urlEncode(workspaceSessionId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "limit";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit));
    localVarQueryParameterBaseName = "offset";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset));
    localVarQueryParameterBaseName = "latestTimeNano";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("latestTimeNano", latestTimeNano));

    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;
  }
  /**
   * Get running classic workspaces for project
   * 
   * @param projectId project id (required)
   * @param offset offset (required)
   * @param limit max length returned (required)
   * @return DominoWorkspaceApiWorkspacePageDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspacePageDto getRunningClassicWorkspaces(String projectId, Integer offset, Integer limit) throws ApiException {
    ApiResponse localVarResponse = getRunningClassicWorkspacesWithHttpInfo(projectId, offset, limit);
    return localVarResponse.getData();
  }

  /**
   * Get running classic workspaces for project
   * 
   * @param projectId project id (required)
   * @param offset offset (required)
   * @param limit max length returned (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspacePageDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getRunningClassicWorkspacesWithHttpInfo(String projectId, Integer offset, Integer limit) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getRunningClassicWorkspacesRequestBuilder(projectId, offset, limit);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getRunningClassicWorkspaces", 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 getRunningClassicWorkspacesRequestBuilder(String projectId, Integer offset, Integer limit) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getRunningClassicWorkspaces");
    }
    // verify the required parameter 'offset' is set
    if (offset == null) {
      throw new ApiException(400, "Missing the required parameter 'offset' when calling getRunningClassicWorkspaces");
    }
    // verify the required parameter 'limit' is set
    if (limit == null) {
      throw new ApiException(400, "Missing the required parameter 'limit' when calling getRunningClassicWorkspaces");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/runningClassicWorkspaces"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "offset";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset));
    localVarQueryParameterBaseName = "limit";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit));

    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;
  }
  /**
   * Get running classic workspaces owned by a user in a project
   * 
   * @param projectId project id (required)
   * @param ownerId workspace owner id (required)
   * @param offset offset (required)
   * @param limit max length returned (required)
   * @return DominoWorkspaceApiWorkspacePageDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspacePageDto getRunningClassicWorkspacesForOwner(String projectId, String ownerId, Integer offset, Integer limit) throws ApiException {
    ApiResponse localVarResponse = getRunningClassicWorkspacesForOwnerWithHttpInfo(projectId, ownerId, offset, limit);
    return localVarResponse.getData();
  }

  /**
   * Get running classic workspaces owned by a user in a project
   * 
   * @param projectId project id (required)
   * @param ownerId workspace owner id (required)
   * @param offset offset (required)
   * @param limit max length returned (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspacePageDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getRunningClassicWorkspacesForOwnerWithHttpInfo(String projectId, String ownerId, Integer offset, Integer limit) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getRunningClassicWorkspacesForOwnerRequestBuilder(projectId, ownerId, offset, limit);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getRunningClassicWorkspacesForOwner", 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 getRunningClassicWorkspacesForOwnerRequestBuilder(String projectId, String ownerId, Integer offset, Integer limit) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getRunningClassicWorkspacesForOwner");
    }
    // verify the required parameter 'ownerId' is set
    if (ownerId == null) {
      throw new ApiException(400, "Missing the required parameter 'ownerId' when calling getRunningClassicWorkspacesForOwner");
    }
    // verify the required parameter 'offset' is set
    if (offset == null) {
      throw new ApiException(400, "Missing the required parameter 'offset' when calling getRunningClassicWorkspacesForOwner");
    }
    // verify the required parameter 'limit' is set
    if (limit == null) {
      throw new ApiException(400, "Missing the required parameter 'limit' when calling getRunningClassicWorkspacesForOwner");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/ownerRunningClassicWorkspaces"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "ownerId";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("ownerId", ownerId));
    localVarQueryParameterBaseName = "offset";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset));
    localVarQueryParameterBaseName = "limit";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit));

    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;
  }
  /**
   * Get workspace
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @return DominoWorkspaceApiWorkspaceDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceDto getWorkspace(String projectId, String workspaceId) throws ApiException {
    ApiResponse localVarResponse = getWorkspaceWithHttpInfo(projectId, workspaceId);
    return localVarResponse.getData();
  }

  /**
   * Get workspace
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspaceDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getWorkspaceWithHttpInfo(String projectId, String workspaceId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getWorkspaceRequestBuilder(projectId, workspaceId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getWorkspace", 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 getWorkspaceRequestBuilder(String projectId, String workspaceId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getWorkspace");
    }
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling getWorkspace");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/workspace/{workspaceId}"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    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 workspace admin dashboard summary data
   * 
   * @return DominoWorkspaceApiWorkspaceAdminPageSummaryDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceAdminPageSummaryDto getWorkspaceAdminSummary() throws ApiException {
    ApiResponse localVarResponse = getWorkspaceAdminSummaryWithHttpInfo();
    return localVarResponse.getData();
  }

  /**
   * Get workspace admin dashboard summary data
   * 
   * @return ApiResponse<DominoWorkspaceApiWorkspaceAdminPageSummaryDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getWorkspaceAdminSummaryWithHttpInfo() throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getWorkspaceAdminSummaryRequestBuilder();
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getWorkspaceAdminSummary", 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 getWorkspaceAdminSummaryRequestBuilder() throws ApiException {

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/adminDashboardSummary";

    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 the details about the compute cluster for a workspace session
   * 
   * @param projectId ID of the Project (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return DominoComputeclusterApiComputeClusterDetails
   * @throws ApiException if fails to make API call
   */
  public DominoComputeclusterApiComputeClusterDetails getWorkspaceComputeClusterDetails(String projectId, String workspaceSessionId) throws ApiException {
    ApiResponse localVarResponse = getWorkspaceComputeClusterDetailsWithHttpInfo(projectId, workspaceSessionId);
    return localVarResponse.getData();
  }

  /**
   * Get the details about the compute cluster for a workspace session
   * 
   * @param projectId ID of the Project (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return ApiResponse<DominoComputeclusterApiComputeClusterDetails>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getWorkspaceComputeClusterDetailsWithHttpInfo(String projectId, String workspaceSessionId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getWorkspaceComputeClusterDetailsRequestBuilder(projectId, workspaceSessionId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getWorkspaceComputeClusterDetails", 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 getWorkspaceComputeClusterDetailsRequestBuilder(String projectId, String workspaceSessionId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getWorkspaceComputeClusterDetails");
    }
    // verify the required parameter 'workspaceSessionId' is set
    if (workspaceSessionId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceSessionId' when calling getWorkspaceComputeClusterDetails");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceSessionId}/computeClusterDetails"
        .replace("{workspaceSessionId}", ApiClient.urlEncode(workspaceSessionId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "projectId";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("projectId", projectId));

    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;
  }
  /**
   * Get status of compute cluster file sync
   * 
   * @param projectId ID of the Project (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return DominoComputegridComputeClusterFileSyncStatusResponse
   * @throws ApiException if fails to make API call
   */
  public DominoComputegridComputeClusterFileSyncStatusResponse getWorkspaceComputeClusterFileSyncStatus(String projectId, String workspaceSessionId) throws ApiException {
    ApiResponse localVarResponse = getWorkspaceComputeClusterFileSyncStatusWithHttpInfo(projectId, workspaceSessionId);
    return localVarResponse.getData();
  }

  /**
   * Get status of compute cluster file sync
   * 
   * @param projectId ID of the Project (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return ApiResponse<DominoComputegridComputeClusterFileSyncStatusResponse>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getWorkspaceComputeClusterFileSyncStatusWithHttpInfo(String projectId, String workspaceSessionId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getWorkspaceComputeClusterFileSyncStatusRequestBuilder(projectId, workspaceSessionId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getWorkspaceComputeClusterFileSyncStatus", 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 getWorkspaceComputeClusterFileSyncStatusRequestBuilder(String projectId, String workspaceSessionId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getWorkspaceComputeClusterFileSyncStatus");
    }
    // verify the required parameter 'workspaceSessionId' is set
    if (workspaceSessionId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceSessionId' when calling getWorkspaceComputeClusterFileSyncStatus");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceSessionId}/computeClusterFileSyncStatus"
        .replace("{workspaceSessionId}", ApiClient.urlEncode(workspaceSessionId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "projectId";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("projectId", projectId));

    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;
  }
  /**
   * Get the host and port for a compute cluster's webUi
   * 
   * @param executionId ID of the execution (required)
   * @param clusterType name of the cluster to connect to (required)
   * @return String
   * @throws ApiException if fails to make API call
   */
  public String getWorkspaceComputeClusterHostAndPort(String executionId, Object clusterType) throws ApiException {
    ApiResponse localVarResponse = getWorkspaceComputeClusterHostAndPortWithHttpInfo(executionId, clusterType);
    return localVarResponse.getData();
  }

  /**
   * Get the host and port for a compute cluster's webUi
   * 
   * @param executionId ID of the execution (required)
   * @param clusterType name of the cluster to connect to (required)
   * @return ApiResponse<String>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getWorkspaceComputeClusterHostAndPortWithHttpInfo(String executionId, Object clusterType) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getWorkspaceComputeClusterHostAndPortRequestBuilder(executionId, clusterType);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getWorkspaceComputeClusterHostAndPort", 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 getWorkspaceComputeClusterHostAndPortRequestBuilder(String executionId, Object clusterType) throws ApiException {
    // verify the required parameter 'executionId' is set
    if (executionId == null) {
      throw new ApiException(400, "Missing the required parameter 'executionId' when calling getWorkspaceComputeClusterHostAndPort");
    }
    // verify the required parameter 'clusterType' is set
    if (clusterType == null) {
      throw new ApiException(400, "Missing the required parameter 'clusterType' when calling getWorkspaceComputeClusterHostAndPort");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{executionId}/{clusterType}/hostAndPort"
        .replace("{executionId}", ApiClient.urlEncode(executionId.toString()))
        .replace("{clusterType}", ApiClient.urlEncode(clusterType.toString()));

    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 the status of the compute cluster for a workspace session
   * 
   * @param projectId ID of the Project (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return DominoComputegridComputeClusterStatus
   * @throws ApiException if fails to make API call
   */
  public DominoComputegridComputeClusterStatus getWorkspaceComputeClusterStatus(String projectId, String workspaceSessionId) throws ApiException {
    ApiResponse localVarResponse = getWorkspaceComputeClusterStatusWithHttpInfo(projectId, workspaceSessionId);
    return localVarResponse.getData();
  }

  /**
   * Get the status of the compute cluster for a workspace session
   * 
   * @param projectId ID of the Project (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return ApiResponse<DominoComputegridComputeClusterStatus>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getWorkspaceComputeClusterStatusWithHttpInfo(String projectId, String workspaceSessionId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getWorkspaceComputeClusterStatusRequestBuilder(projectId, workspaceSessionId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getWorkspaceComputeClusterStatus", 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 getWorkspaceComputeClusterStatusRequestBuilder(String projectId, String workspaceSessionId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getWorkspaceComputeClusterStatus");
    }
    // verify the required parameter 'workspaceSessionId' is set
    if (workspaceSessionId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceSessionId' when calling getWorkspaceComputeClusterStatus");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceSessionId}/computeClusterStatus"
        .replace("{workspaceSessionId}", ApiClient.urlEncode(workspaceSessionId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "projectId";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("projectId", projectId));

    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;
  }
  /**
   * Get the default compute settings for workspaces
   * 
   * @param projectId ID of the project (required)
   * @param clusterType Type of the cluster to get settings for (required)
   * @return DominoComputeclusterApiDefaultComputeClusterSettings
   * @throws ApiException if fails to make API call
   */
  public DominoComputeclusterApiDefaultComputeClusterSettings getWorkspaceDefaultComputeClusterSettings(String projectId, Object clusterType) throws ApiException {
    ApiResponse localVarResponse = getWorkspaceDefaultComputeClusterSettingsWithHttpInfo(projectId, clusterType);
    return localVarResponse.getData();
  }

  /**
   * Get the default compute settings for workspaces
   * 
   * @param projectId ID of the project (required)
   * @param clusterType Type of the cluster to get settings for (required)
   * @return ApiResponse<DominoComputeclusterApiDefaultComputeClusterSettings>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getWorkspaceDefaultComputeClusterSettingsWithHttpInfo(String projectId, Object clusterType) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getWorkspaceDefaultComputeClusterSettingsRequestBuilder(projectId, clusterType);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getWorkspaceDefaultComputeClusterSettings", 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 getWorkspaceDefaultComputeClusterSettingsRequestBuilder(String projectId, Object clusterType) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getWorkspaceDefaultComputeClusterSettings");
    }
    // verify the required parameter 'clusterType' is set
    if (clusterType == null) {
      throw new ApiException(400, "Missing the required parameter 'clusterType' when calling getWorkspaceDefaultComputeClusterSettings");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{projectId}/{clusterType}/defaultComputeClusterSettings"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{clusterType}", ApiClient.urlEncode(clusterType.toString()));

    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 workspace execution info
   * 
   * @param executionId Id of the project (required)
   * @param ownerName name of owner of this workspace (required)
   * @param projectName name of project for this workspace is in (required)
   * @return DominoWorkspaceApiWorkspaceExecutionInfoDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceExecutionInfoDto getWorkspaceExecutionInfo(String executionId, String ownerName, String projectName) throws ApiException {
    ApiResponse localVarResponse = getWorkspaceExecutionInfoWithHttpInfo(executionId, ownerName, projectName);
    return localVarResponse.getData();
  }

  /**
   * Get workspace execution info
   * 
   * @param executionId Id of the project (required)
   * @param ownerName name of owner of this workspace (required)
   * @param projectName name of project for this workspace is in (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspaceExecutionInfoDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getWorkspaceExecutionInfoWithHttpInfo(String executionId, String ownerName, String projectName) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getWorkspaceExecutionInfoRequestBuilder(executionId, ownerName, 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("getWorkspaceExecutionInfo", 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 getWorkspaceExecutionInfoRequestBuilder(String executionId, String ownerName, String projectName) throws ApiException {
    // verify the required parameter 'executionId' is set
    if (executionId == null) {
      throw new ApiException(400, "Missing the required parameter 'executionId' when calling getWorkspaceExecutionInfo");
    }
    // verify the required parameter 'ownerName' is set
    if (ownerName == null) {
      throw new ApiException(400, "Missing the required parameter 'ownerName' when calling getWorkspaceExecutionInfo");
    }
    // verify the required parameter 'projectName' is set
    if (projectName == null) {
      throw new ApiException(400, "Missing the required parameter 'projectName' when calling getWorkspaceExecutionInfo");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{executionId}/getSessionByExecutionId"
        .replace("{executionId}", ApiClient.urlEncode(executionId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "ownerName";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("ownerName", ownerName));
    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;
  }
  /**
   * Get the status of a workspace's repositories
   * 
   * @param projectId ID of the Project (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return List<DominoWorkspaceApiWorkspaceRepositoryState>
   * @throws ApiException if fails to make API call
   */
  public List getWorkspaceRepositoryStatus(String projectId, String workspaceSessionId) throws ApiException {
    ApiResponse> localVarResponse = getWorkspaceRepositoryStatusWithHttpInfo(projectId, workspaceSessionId);
    return localVarResponse.getData();
  }

  /**
   * Get the status of a workspace's repositories
   * 
   * @param projectId ID of the Project (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return ApiResponse<List<DominoWorkspaceApiWorkspaceRepositoryState>>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse> getWorkspaceRepositoryStatusWithHttpInfo(String projectId, String workspaceSessionId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getWorkspaceRepositoryStatusRequestBuilder(projectId, workspaceSessionId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getWorkspaceRepositoryStatus", 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 getWorkspaceRepositoryStatusRequestBuilder(String projectId, String workspaceSessionId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getWorkspaceRepositoryStatus");
    }
    // verify the required parameter 'workspaceSessionId' is set
    if (workspaceSessionId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceSessionId' when calling getWorkspaceRepositoryStatus");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceSessionId}/resourceStatuses"
        .replace("{workspaceSessionId}", ApiClient.urlEncode(workspaceSessionId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "projectId";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("projectId", projectId));

    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;
  }
  /**
   * Get workspace session
   * 
   * @param projectId Id of the project (required)
   * @param workspaceSessionId workspace session id (required)
   * @return DominoWorkspaceApiWorkspaceSessionDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceSessionDto getWorkspaceSession(String projectId, String workspaceSessionId) throws ApiException {
    ApiResponse localVarResponse = getWorkspaceSessionWithHttpInfo(projectId, workspaceSessionId);
    return localVarResponse.getData();
  }

  /**
   * Get workspace session
   * 
   * @param projectId Id of the project (required)
   * @param workspaceSessionId workspace session id (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspaceSessionDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getWorkspaceSessionWithHttpInfo(String projectId, String workspaceSessionId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getWorkspaceSessionRequestBuilder(projectId, workspaceSessionId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getWorkspaceSession", 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 getWorkspaceSessionRequestBuilder(String projectId, String workspaceSessionId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getWorkspaceSession");
    }
    // verify the required parameter 'workspaceSessionId' is set
    if (workspaceSessionId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceSessionId' when calling getWorkspaceSession");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/sessions/{workspaceSessionId}"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{workspaceSessionId}", ApiClient.urlEncode(workspaceSessionId.toString()));

    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 resource usage for a workspace session
   * 
   * @param projectId projectId associated with the workspace (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return DominoComputegridResourceUsage
   * @throws ApiException if fails to make API call
   */
  public DominoComputegridResourceUsage getWorkspaceSessionResourceUsage(String projectId, String workspaceSessionId) throws ApiException {
    ApiResponse localVarResponse = getWorkspaceSessionResourceUsageWithHttpInfo(projectId, workspaceSessionId);
    return localVarResponse.getData();
  }

  /**
   * Get resource usage for a workspace session
   * 
   * @param projectId projectId associated with the workspace (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return ApiResponse<DominoComputegridResourceUsage>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getWorkspaceSessionResourceUsageWithHttpInfo(String projectId, String workspaceSessionId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = getWorkspaceSessionResourceUsageRequestBuilder(projectId, workspaceSessionId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("getWorkspaceSessionResourceUsage", 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 getWorkspaceSessionResourceUsageRequestBuilder(String projectId, String workspaceSessionId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling getWorkspaceSessionResourceUsage");
    }
    // verify the required parameter 'workspaceSessionId' is set
    if (workspaceSessionId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceSessionId' when calling getWorkspaceSessionResourceUsage");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceSessionId}/usage"
        .replace("{workspaceSessionId}", ApiClient.urlEncode(workspaceSessionId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "projectId";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("projectId", projectId));

    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;
  }
  /**
   * Hard reset to remote tracking branch to resolve merge conflict
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitHardResetResolutionRequest list of repositories that are in conflict (required)
   * @return DominoWorkspaceApiGitMergeConflictResolutionResponseDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiGitMergeConflictResolutionResponseDto hardResetResolution(String workspaceId, DominoWorkspaceApiGitHardResetResolutionRequest dominoWorkspaceApiGitHardResetResolutionRequest) throws ApiException {
    ApiResponse localVarResponse = hardResetResolutionWithHttpInfo(workspaceId, dominoWorkspaceApiGitHardResetResolutionRequest);
    return localVarResponse.getData();
  }

  /**
   * Hard reset to remote tracking branch to resolve merge conflict
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitHardResetResolutionRequest list of repositories that are in conflict (required)
   * @return ApiResponse<DominoWorkspaceApiGitMergeConflictResolutionResponseDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse hardResetResolutionWithHttpInfo(String workspaceId, DominoWorkspaceApiGitHardResetResolutionRequest dominoWorkspaceApiGitHardResetResolutionRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = hardResetResolutionRequestBuilder(workspaceId, dominoWorkspaceApiGitHardResetResolutionRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("hardResetResolution", 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 hardResetResolutionRequestBuilder(String workspaceId, DominoWorkspaceApiGitHardResetResolutionRequest dominoWorkspaceApiGitHardResetResolutionRequest) throws ApiException {
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling hardResetResolution");
    }
    // verify the required parameter 'dominoWorkspaceApiGitHardResetResolutionRequest' is set
    if (dominoWorkspaceApiGitHardResetResolutionRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceApiGitHardResetResolutionRequest' when calling hardResetResolution");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceId}/hardResetResolution"
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceApiGitHardResetResolutionRequest);
      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;
  }
  /**
   * List branches of a git repository
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoExecutorApiListBranchesRequest query to filter the list of branches by (required)
   * @return DominoExecutorApiListBranchesResponseDto
   * @throws ApiException if fails to make API call
   */
  public DominoExecutorApiListBranchesResponseDto listBranches(String workspaceId, DominoExecutorApiListBranchesRequest dominoExecutorApiListBranchesRequest) throws ApiException {
    ApiResponse localVarResponse = listBranchesWithHttpInfo(workspaceId, dominoExecutorApiListBranchesRequest);
    return localVarResponse.getData();
  }

  /**
   * List branches of a git repository
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoExecutorApiListBranchesRequest query to filter the list of branches by (required)
   * @return ApiResponse<DominoExecutorApiListBranchesResponseDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse listBranchesWithHttpInfo(String workspaceId, DominoExecutorApiListBranchesRequest dominoExecutorApiListBranchesRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = listBranchesRequestBuilder(workspaceId, dominoExecutorApiListBranchesRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("listBranches", 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 listBranchesRequestBuilder(String workspaceId, DominoExecutorApiListBranchesRequest dominoExecutorApiListBranchesRequest) throws ApiException {
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling listBranches");
    }
    // verify the required parameter 'dominoExecutorApiListBranchesRequest' is set
    if (dominoExecutorApiListBranchesRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoExecutorApiListBranchesRequest' when calling listBranches");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceId}/listBranches"
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoExecutorApiListBranchesRequest);
      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;
  }
  /**
   * A hack, which allows types for pusher service to be generated for consumption by the frontend. Should be deleted when we fix how we use swagger.
   * 
   * @return DominoWorkspaceWebWorkspaceEvents
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceWebWorkspaceEvents listWorkspaceEvents() throws ApiException {
    ApiResponse localVarResponse = listWorkspaceEventsWithHttpInfo();
    return localVarResponse.getData();
  }

  /**
   * A hack, which allows types for pusher service to be generated for consumption by the frontend. Should be deleted when we fix how we use swagger.
   * 
   * @return ApiResponse<DominoWorkspaceWebWorkspaceEvents>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse listWorkspaceEventsWithHttpInfo() throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = listWorkspaceEventsRequestBuilder();
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("listWorkspaceEvents", 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 listWorkspaceEventsRequestBuilder() throws ApiException {

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/events";

    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;
  }
  /**
   * List workspace sessions
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @param offset offset (optional, default to 0)
   * @param limit limit (optional, default to 5)
   * @return List<DominoWorkspaceApiWorkspaceSessionDto>
   * @throws ApiException if fails to make API call
   */
  public List listWorkspaceSessions(String projectId, String workspaceId, Integer offset, Integer limit) throws ApiException {
    ApiResponse> localVarResponse = listWorkspaceSessionsWithHttpInfo(projectId, workspaceId, offset, limit);
    return localVarResponse.getData();
  }

  /**
   * List workspace sessions
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @param offset offset (optional, default to 0)
   * @param limit limit (optional, default to 5)
   * @return ApiResponse<List<DominoWorkspaceApiWorkspaceSessionDto>>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse> listWorkspaceSessionsWithHttpInfo(String projectId, String workspaceId, Integer offset, Integer limit) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = listWorkspaceSessionsRequestBuilder(projectId, workspaceId, offset, limit);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("listWorkspaceSessions", 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 listWorkspaceSessionsRequestBuilder(String projectId, String workspaceId, Integer offset, Integer limit) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling listWorkspaceSessions");
    }
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling listWorkspaceSessions");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/workspace/{workspaceId}/sessions"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "offset";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset));
    localVarQueryParameterBaseName = "limit";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit));

    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;
  }
  /**
   * For the frontend to get info on workspace's writable mounts (e.g. imported git repos)
   * 
   * @param projectId project id (required)
   * @param workspaceId workspace id (required)
   * @return DominoProjectsApiWritableProjectMounts
   * @throws ApiException if fails to make API call
   */
  public DominoProjectsApiWritableProjectMounts listWritableProjectMounts(String projectId, String workspaceId) throws ApiException {
    ApiResponse localVarResponse = listWritableProjectMountsWithHttpInfo(projectId, workspaceId);
    return localVarResponse.getData();
  }

  /**
   * For the frontend to get info on workspace's writable mounts (e.g. imported git repos)
   * 
   * @param projectId project id (required)
   * @param workspaceId workspace id (required)
   * @return ApiResponse<DominoProjectsApiWritableProjectMounts>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse listWritableProjectMountsWithHttpInfo(String projectId, String workspaceId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = listWritableProjectMountsRequestBuilder(projectId, workspaceId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("listWritableProjectMounts", 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 listWritableProjectMountsRequestBuilder(String projectId, String workspaceId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling listWritableProjectMounts");
    }
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling listWritableProjectMounts");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/workspace/{workspaceId}/getWritableProjectMounts"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    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 all provisioned (i.e. not deleted) workspaces for project by owner
   * 
   * @param projectId project id (required)
   * @param ownerId owner id (required)
   * @param offset offset (required)
   * @param limit max length returned (required)
   * @return DominoWorkspaceApiWorkspacePageDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspacePageDto ownerProvisionedWorkspaces(String projectId, String ownerId, Integer offset, Integer limit) throws ApiException {
    ApiResponse localVarResponse = ownerProvisionedWorkspacesWithHttpInfo(projectId, ownerId, offset, limit);
    return localVarResponse.getData();
  }

  /**
   * Get all provisioned (i.e. not deleted) workspaces for project by owner
   * 
   * @param projectId project id (required)
   * @param ownerId owner id (required)
   * @param offset offset (required)
   * @param limit max length returned (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspacePageDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse ownerProvisionedWorkspacesWithHttpInfo(String projectId, String ownerId, Integer offset, Integer limit) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = ownerProvisionedWorkspacesRequestBuilder(projectId, ownerId, offset, limit);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("ownerProvisionedWorkspaces", 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 ownerProvisionedWorkspacesRequestBuilder(String projectId, String ownerId, Integer offset, Integer limit) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling ownerProvisionedWorkspaces");
    }
    // verify the required parameter 'ownerId' is set
    if (ownerId == null) {
      throw new ApiException(400, "Missing the required parameter 'ownerId' when calling ownerProvisionedWorkspaces");
    }
    // verify the required parameter 'offset' is set
    if (offset == null) {
      throw new ApiException(400, "Missing the required parameter 'offset' when calling ownerProvisionedWorkspaces");
    }
    // verify the required parameter 'limit' is set
    if (limit == null) {
      throw new ApiException(400, "Missing the required parameter 'limit' when calling ownerProvisionedWorkspaces");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/owner/{ownerId}"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{ownerId}", ApiClient.urlEncode(ownerId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "offset";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset));
    localVarQueryParameterBaseName = "limit";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit));

    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;
  }
  /**
   * Get all provisioned (i.e. not deleted) workspaces for project
   * 
   * @param projectId project id (required)
   * @param offset offset (required)
   * @param limit max length returned (required)
   * @return DominoWorkspaceApiWorkspacePageDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspacePageDto provisionedWorkspaces(String projectId, Integer offset, Integer limit) throws ApiException {
    ApiResponse localVarResponse = provisionedWorkspacesWithHttpInfo(projectId, offset, limit);
    return localVarResponse.getData();
  }

  /**
   * Get all provisioned (i.e. not deleted) workspaces for project
   * 
   * @param projectId project id (required)
   * @param offset offset (required)
   * @param limit max length returned (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspacePageDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse provisionedWorkspacesWithHttpInfo(String projectId, Integer offset, Integer limit) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = provisionedWorkspacesRequestBuilder(projectId, offset, limit);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("provisionedWorkspaces", 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 provisionedWorkspacesRequestBuilder(String projectId, Integer offset, Integer limit) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling provisionedWorkspaces");
    }
    // verify the required parameter 'offset' is set
    if (offset == null) {
      throw new ApiException(400, "Missing the required parameter 'offset' when calling provisionedWorkspaces");
    }
    // verify the required parameter 'limit' is set
    if (limit == null) {
      throw new ApiException(400, "Missing the required parameter 'limit' when calling provisionedWorkspaces");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/workspace"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "offset";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset));
    localVarQueryParameterBaseName = "limit";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit));

    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;
  }
  /**
   * Pull repos with enhanced merge conflict resolution
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitPullReposRequest list of repositories that should be pulled (required)
   * @return DominoWorkspaceApiGitPullReposResponseDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiGitPullReposResponseDto pullReposEnhanced(String workspaceId, DominoWorkspaceApiGitPullReposRequest dominoWorkspaceApiGitPullReposRequest) throws ApiException {
    ApiResponse localVarResponse = pullReposEnhancedWithHttpInfo(workspaceId, dominoWorkspaceApiGitPullReposRequest);
    return localVarResponse.getData();
  }

  /**
   * Pull repos with enhanced merge conflict resolution
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitPullReposRequest list of repositories that should be pulled (required)
   * @return ApiResponse<DominoWorkspaceApiGitPullReposResponseDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse pullReposEnhancedWithHttpInfo(String workspaceId, DominoWorkspaceApiGitPullReposRequest dominoWorkspaceApiGitPullReposRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = pullReposEnhancedRequestBuilder(workspaceId, dominoWorkspaceApiGitPullReposRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("pullReposEnhanced", 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 pullReposEnhancedRequestBuilder(String workspaceId, DominoWorkspaceApiGitPullReposRequest dominoWorkspaceApiGitPullReposRequest) throws ApiException {
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling pullReposEnhanced");
    }
    // verify the required parameter 'dominoWorkspaceApiGitPullReposRequest' is set
    if (dominoWorkspaceApiGitPullReposRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceApiGitPullReposRequest' when calling pullReposEnhanced");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceId}/pullReposEnhanced"
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceApiGitPullReposRequest);
      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;
  }
  /**
   * Get status of workspace quota
   * 
   * @param projectId project id (required)
   * @param ownerId owner id (required)
   * @return DominoWorkspaceApiWorkspaceQuotaStatusDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceQuotaStatusDto quotaStatus(String projectId, String ownerId) throws ApiException {
    ApiResponse localVarResponse = quotaStatusWithHttpInfo(projectId, ownerId);
    return localVarResponse.getData();
  }

  /**
   * Get status of workspace quota
   * 
   * @param projectId project id (required)
   * @param ownerId owner id (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspaceQuotaStatusDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse quotaStatusWithHttpInfo(String projectId, String ownerId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = quotaStatusRequestBuilder(projectId, ownerId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("quotaStatus", 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 quotaStatusRequestBuilder(String projectId, String ownerId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling quotaStatus");
    }
    // verify the required parameter 'ownerId' is set
    if (ownerId == null) {
      throw new ApiException(400, "Missing the required parameter 'ownerId' when calling quotaStatus");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/owner/{ownerId}/quota"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{ownerId}", ApiClient.urlEncode(ownerId.toString()));

    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;
  }
  /**
   * Reproduce workspace
   * 
   * @param projectId Id of the project (required)
   * @param dominoWorkspaceWebReproduceWorkspaceRequest Reproduce workspace request (required)
   * @return DominoWorkspaceApiWorkspaceDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceDto reproduceAndStartWorkspace(String projectId, DominoWorkspaceWebReproduceWorkspaceRequest dominoWorkspaceWebReproduceWorkspaceRequest) throws ApiException {
    ApiResponse localVarResponse = reproduceAndStartWorkspaceWithHttpInfo(projectId, dominoWorkspaceWebReproduceWorkspaceRequest);
    return localVarResponse.getData();
  }

  /**
   * Reproduce workspace
   * 
   * @param projectId Id of the project (required)
   * @param dominoWorkspaceWebReproduceWorkspaceRequest Reproduce workspace request (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspaceDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse reproduceAndStartWorkspaceWithHttpInfo(String projectId, DominoWorkspaceWebReproduceWorkspaceRequest dominoWorkspaceWebReproduceWorkspaceRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = reproduceAndStartWorkspaceRequestBuilder(projectId, dominoWorkspaceWebReproduceWorkspaceRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("reproduceAndStartWorkspace", 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 reproduceAndStartWorkspaceRequestBuilder(String projectId, DominoWorkspaceWebReproduceWorkspaceRequest dominoWorkspaceWebReproduceWorkspaceRequest) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling reproduceAndStartWorkspace");
    }
    // verify the required parameter 'dominoWorkspaceWebReproduceWorkspaceRequest' is set
    if (dominoWorkspaceWebReproduceWorkspaceRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceWebReproduceWorkspaceRequest' when calling reproduceAndStartWorkspace");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/reproduceWorkspace"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceWebReproduceWorkspaceRequest);
      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;
  }
  /**
   * Git add (stage) a file using the current local version during merge conflict resolution
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitStageCurrentLocalFileRequest repo and file path of file to stage (required)
   * @return DominoWorkspaceApiGitStageFileResponseDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiGitStageFileResponseDto stageFileBasedOnCurrentLocalState(String workspaceId, DominoWorkspaceApiGitStageCurrentLocalFileRequest dominoWorkspaceApiGitStageCurrentLocalFileRequest) throws ApiException {
    ApiResponse localVarResponse = stageFileBasedOnCurrentLocalStateWithHttpInfo(workspaceId, dominoWorkspaceApiGitStageCurrentLocalFileRequest);
    return localVarResponse.getData();
  }

  /**
   * Git add (stage) a file using the current local version during merge conflict resolution
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitStageCurrentLocalFileRequest repo and file path of file to stage (required)
   * @return ApiResponse<DominoWorkspaceApiGitStageFileResponseDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse stageFileBasedOnCurrentLocalStateWithHttpInfo(String workspaceId, DominoWorkspaceApiGitStageCurrentLocalFileRequest dominoWorkspaceApiGitStageCurrentLocalFileRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = stageFileBasedOnCurrentLocalStateRequestBuilder(workspaceId, dominoWorkspaceApiGitStageCurrentLocalFileRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("stageFileBasedOnCurrentLocalState", 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 stageFileBasedOnCurrentLocalStateRequestBuilder(String workspaceId, DominoWorkspaceApiGitStageCurrentLocalFileRequest dominoWorkspaceApiGitStageCurrentLocalFileRequest) throws ApiException {
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling stageFileBasedOnCurrentLocalState");
    }
    // verify the required parameter 'dominoWorkspaceApiGitStageCurrentLocalFileRequest' is set
    if (dominoWorkspaceApiGitStageCurrentLocalFileRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceApiGitStageCurrentLocalFileRequest' when calling stageFileBasedOnCurrentLocalState");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceId}/stageFileBasedOnCurrentLocalState"
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceApiGitStageCurrentLocalFileRequest);
      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;
  }
  /**
   * Git add (stage) a file using the last local commit during merge conflict resolution
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitStageLocalCommitFileRequest repo and file path of file to stage (required)
   * @return DominoWorkspaceApiGitStageFileResponseDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiGitStageFileResponseDto stageFileBasedOnLocalCommit(String workspaceId, DominoWorkspaceApiGitStageLocalCommitFileRequest dominoWorkspaceApiGitStageLocalCommitFileRequest) throws ApiException {
    ApiResponse localVarResponse = stageFileBasedOnLocalCommitWithHttpInfo(workspaceId, dominoWorkspaceApiGitStageLocalCommitFileRequest);
    return localVarResponse.getData();
  }

  /**
   * Git add (stage) a file using the last local commit during merge conflict resolution
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitStageLocalCommitFileRequest repo and file path of file to stage (required)
   * @return ApiResponse<DominoWorkspaceApiGitStageFileResponseDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse stageFileBasedOnLocalCommitWithHttpInfo(String workspaceId, DominoWorkspaceApiGitStageLocalCommitFileRequest dominoWorkspaceApiGitStageLocalCommitFileRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = stageFileBasedOnLocalCommitRequestBuilder(workspaceId, dominoWorkspaceApiGitStageLocalCommitFileRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("stageFileBasedOnLocalCommit", 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 stageFileBasedOnLocalCommitRequestBuilder(String workspaceId, DominoWorkspaceApiGitStageLocalCommitFileRequest dominoWorkspaceApiGitStageLocalCommitFileRequest) throws ApiException {
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling stageFileBasedOnLocalCommit");
    }
    // verify the required parameter 'dominoWorkspaceApiGitStageLocalCommitFileRequest' is set
    if (dominoWorkspaceApiGitStageLocalCommitFileRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceApiGitStageLocalCommitFileRequest' when calling stageFileBasedOnLocalCommit");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceId}/stageFileBasedOnLocalCommit"
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceApiGitStageLocalCommitFileRequest);
      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;
  }
  /**
   * Git add (stage) a file using the last remote commit during merge conflict resolution
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitStageRemoteCommitFileRequest repo and file path of file to stage (required)
   * @return DominoWorkspaceApiGitStageFileResponseDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiGitStageFileResponseDto stageFileBasedOnRemoteCommit(String workspaceId, DominoWorkspaceApiGitStageRemoteCommitFileRequest dominoWorkspaceApiGitStageRemoteCommitFileRequest) throws ApiException {
    ApiResponse localVarResponse = stageFileBasedOnRemoteCommitWithHttpInfo(workspaceId, dominoWorkspaceApiGitStageRemoteCommitFileRequest);
    return localVarResponse.getData();
  }

  /**
   * Git add (stage) a file using the last remote commit during merge conflict resolution
   * 
   * @param workspaceId Id of the Workspace (required)
   * @param dominoWorkspaceApiGitStageRemoteCommitFileRequest repo and file path of file to stage (required)
   * @return ApiResponse<DominoWorkspaceApiGitStageFileResponseDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse stageFileBasedOnRemoteCommitWithHttpInfo(String workspaceId, DominoWorkspaceApiGitStageRemoteCommitFileRequest dominoWorkspaceApiGitStageRemoteCommitFileRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = stageFileBasedOnRemoteCommitRequestBuilder(workspaceId, dominoWorkspaceApiGitStageRemoteCommitFileRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("stageFileBasedOnRemoteCommit", 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 stageFileBasedOnRemoteCommitRequestBuilder(String workspaceId, DominoWorkspaceApiGitStageRemoteCommitFileRequest dominoWorkspaceApiGitStageRemoteCommitFileRequest) throws ApiException {
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling stageFileBasedOnRemoteCommit");
    }
    // verify the required parameter 'dominoWorkspaceApiGitStageRemoteCommitFileRequest' is set
    if (dominoWorkspaceApiGitStageRemoteCommitFileRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceApiGitStageRemoteCommitFileRequest' when calling stageFileBasedOnRemoteCommit");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceId}/stageFileBasedOnRemoteCommit"
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceApiGitStageRemoteCommitFileRequest);
      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;
  }
  /**
   * Start workspace session
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @param externalVolumeMounts external volume mount id's (required)
   * @return DominoWorkspaceApiWorkspaceSessionDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceSessionDto startWorkspaceSession(String projectId, String workspaceId, List externalVolumeMounts) throws ApiException {
    ApiResponse localVarResponse = startWorkspaceSessionWithHttpInfo(projectId, workspaceId, externalVolumeMounts);
    return localVarResponse.getData();
  }

  /**
   * Start workspace session
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @param externalVolumeMounts external volume mount id's (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspaceSessionDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse startWorkspaceSessionWithHttpInfo(String projectId, String workspaceId, List externalVolumeMounts) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = startWorkspaceSessionRequestBuilder(projectId, workspaceId, externalVolumeMounts);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("startWorkspaceSession", 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 startWorkspaceSessionRequestBuilder(String projectId, String workspaceId, List externalVolumeMounts) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling startWorkspaceSession");
    }
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling startWorkspaceSession");
    }
    // verify the required parameter 'externalVolumeMounts' is set
    if (externalVolumeMounts == null) {
      throw new ApiException(400, "Missing the required parameter 'externalVolumeMounts' when calling startWorkspaceSession");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/workspace/{workspaceId}/sessions"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "externalVolumeMounts";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "externalVolumeMounts", externalVolumeMounts));

    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("POST", HttpRequest.BodyPublishers.noBody());
    if (memberVarReadTimeout != null) {
      localVarRequestBuilder.timeout(memberVarReadTimeout);
    }
    if (memberVarInterceptor != null) {
      memberVarInterceptor.accept(localVarRequestBuilder);
    }
    return localVarRequestBuilder;
  }
  /**
   * Stop a Classic Workspace and throw away all changes
   * 
   * @param dominoWorkspaceWebStopClassicWorkspaceRequest  (required)
   * @return String
   * @throws ApiException if fails to make API call
   */
  public String stopClassicWorkspaceDiscardChanges(DominoWorkspaceWebStopClassicWorkspaceRequest dominoWorkspaceWebStopClassicWorkspaceRequest) throws ApiException {
    ApiResponse localVarResponse = stopClassicWorkspaceDiscardChangesWithHttpInfo(dominoWorkspaceWebStopClassicWorkspaceRequest);
    return localVarResponse.getData();
  }

  /**
   * Stop a Classic Workspace and throw away all changes
   * 
   * @param dominoWorkspaceWebStopClassicWorkspaceRequest  (required)
   * @return ApiResponse<String>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse stopClassicWorkspaceDiscardChangesWithHttpInfo(DominoWorkspaceWebStopClassicWorkspaceRequest dominoWorkspaceWebStopClassicWorkspaceRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = stopClassicWorkspaceDiscardChangesRequestBuilder(dominoWorkspaceWebStopClassicWorkspaceRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("stopClassicWorkspaceDiscardChanges", 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 stopClassicWorkspaceDiscardChangesRequestBuilder(DominoWorkspaceWebStopClassicWorkspaceRequest dominoWorkspaceWebStopClassicWorkspaceRequest) throws ApiException {
    // verify the required parameter 'dominoWorkspaceWebStopClassicWorkspaceRequest' is set
    if (dominoWorkspaceWebStopClassicWorkspaceRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceWebStopClassicWorkspaceRequest' when calling stopClassicWorkspaceDiscardChanges");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/stop/discard";

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceWebStopClassicWorkspaceRequest);
      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;
  }
  /**
   * Stop a Classic Workspace and save all changes
   * 
   * @param dominoWorkspaceWebStopClassicWorkspaceRequest  (required)
   * @return String
   * @throws ApiException if fails to make API call
   */
  public String stopClassicWorkspaceSaveChanges(DominoWorkspaceWebStopClassicWorkspaceRequest dominoWorkspaceWebStopClassicWorkspaceRequest) throws ApiException {
    ApiResponse localVarResponse = stopClassicWorkspaceSaveChangesWithHttpInfo(dominoWorkspaceWebStopClassicWorkspaceRequest);
    return localVarResponse.getData();
  }

  /**
   * Stop a Classic Workspace and save all changes
   * 
   * @param dominoWorkspaceWebStopClassicWorkspaceRequest  (required)
   * @return ApiResponse<String>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse stopClassicWorkspaceSaveChangesWithHttpInfo(DominoWorkspaceWebStopClassicWorkspaceRequest dominoWorkspaceWebStopClassicWorkspaceRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = stopClassicWorkspaceSaveChangesRequestBuilder(dominoWorkspaceWebStopClassicWorkspaceRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("stopClassicWorkspaceSaveChanges", 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 stopClassicWorkspaceSaveChangesRequestBuilder(DominoWorkspaceWebStopClassicWorkspaceRequest dominoWorkspaceWebStopClassicWorkspaceRequest) throws ApiException {
    // verify the required parameter 'dominoWorkspaceWebStopClassicWorkspaceRequest' is set
    if (dominoWorkspaceWebStopClassicWorkspaceRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceWebStopClassicWorkspaceRequest' when calling stopClassicWorkspaceSaveChanges");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/stop/save";

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceWebStopClassicWorkspaceRequest);
      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;
  }
  /**
   * Stop workspace session
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @return DominoWorkspaceApiWorkspaceSessionDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceSessionDto stopWorkspaceSession(String projectId, String workspaceId) throws ApiException {
    ApiResponse localVarResponse = stopWorkspaceSessionWithHttpInfo(projectId, workspaceId);
    return localVarResponse.getData();
  }

  /**
   * Stop workspace session
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspaceSessionDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse stopWorkspaceSessionWithHttpInfo(String projectId, String workspaceId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = stopWorkspaceSessionRequestBuilder(projectId, workspaceId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("stopWorkspaceSession", 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 stopWorkspaceSessionRequestBuilder(String projectId, String workspaceId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling stopWorkspaceSession");
    }
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling stopWorkspaceSession");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/workspace/{workspaceId}/stop"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Accept", "application/json");

    localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody());
    if (memberVarReadTimeout != null) {
      localVarRequestBuilder.timeout(memberVarReadTimeout);
    }
    if (memberVarInterceptor != null) {
      memberVarInterceptor.accept(localVarRequestBuilder);
    }
    return localVarRequestBuilder;
  }
  /**
   * Start compute cluster file sync
   * 
   * @param projectId ID of the Project (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return DominoComputegridComputeClusterFileSyncResponse
   * @throws ApiException if fails to make API call
   */
  public DominoComputegridComputeClusterFileSyncResponse syncWorkspaceFilesToComputeCluster(String projectId, String workspaceSessionId) throws ApiException {
    ApiResponse localVarResponse = syncWorkspaceFilesToComputeClusterWithHttpInfo(projectId, workspaceSessionId);
    return localVarResponse.getData();
  }

  /**
   * Start compute cluster file sync
   * 
   * @param projectId ID of the Project (required)
   * @param workspaceSessionId ID of the workspace session (required)
   * @return ApiResponse<DominoComputegridComputeClusterFileSyncResponse>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse syncWorkspaceFilesToComputeClusterWithHttpInfo(String projectId, String workspaceSessionId) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = syncWorkspaceFilesToComputeClusterRequestBuilder(projectId, workspaceSessionId);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("syncWorkspaceFilesToComputeCluster", 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 syncWorkspaceFilesToComputeClusterRequestBuilder(String projectId, String workspaceSessionId) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling syncWorkspaceFilesToComputeCluster");
    }
    // verify the required parameter 'workspaceSessionId' is set
    if (workspaceSessionId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceSessionId' when calling syncWorkspaceFilesToComputeCluster");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/{workspaceSessionId}/computeClusterFileSync"
        .replace("{workspaceSessionId}", ApiClient.urlEncode(workspaceSessionId.toString()));

    List localVarQueryParams = new ArrayList<>();
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    localVarQueryParameterBaseName = "projectId";
    localVarQueryParams.addAll(ApiClient.parameterToPairs("projectId", projectId));

    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("POST", HttpRequest.BodyPublishers.noBody());
    if (memberVarReadTimeout != null) {
      localVarRequestBuilder.timeout(memberVarReadTimeout);
    }
    if (memberVarInterceptor != null) {
      memberVarInterceptor.accept(localVarRequestBuilder);
    }
    return localVarRequestBuilder;
  }
  /**
   * Update workspace title
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @param dominoWorkspaceWebUpdateWorkspaceTitleRequest Update workspace title request (required)
   * @return DominoWorkspaceApiWorkspaceDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceDto updateProjectWorkspaceTitle(String projectId, String workspaceId, DominoWorkspaceWebUpdateWorkspaceTitleRequest dominoWorkspaceWebUpdateWorkspaceTitleRequest) throws ApiException {
    ApiResponse localVarResponse = updateProjectWorkspaceTitleWithHttpInfo(projectId, workspaceId, dominoWorkspaceWebUpdateWorkspaceTitleRequest);
    return localVarResponse.getData();
  }

  /**
   * Update workspace title
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @param dominoWorkspaceWebUpdateWorkspaceTitleRequest Update workspace title request (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspaceDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse updateProjectWorkspaceTitleWithHttpInfo(String projectId, String workspaceId, DominoWorkspaceWebUpdateWorkspaceTitleRequest dominoWorkspaceWebUpdateWorkspaceTitleRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = updateProjectWorkspaceTitleRequestBuilder(projectId, workspaceId, dominoWorkspaceWebUpdateWorkspaceTitleRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("updateProjectWorkspaceTitle", 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 updateProjectWorkspaceTitleRequestBuilder(String projectId, String workspaceId, DominoWorkspaceWebUpdateWorkspaceTitleRequest dominoWorkspaceWebUpdateWorkspaceTitleRequest) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling updateProjectWorkspaceTitle");
    }
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling updateProjectWorkspaceTitle");
    }
    // verify the required parameter 'dominoWorkspaceWebUpdateWorkspaceTitleRequest' is set
    if (dominoWorkspaceWebUpdateWorkspaceTitleRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceWebUpdateWorkspaceTitleRequest' when calling updateProjectWorkspaceTitle");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/workspace/{workspaceId}/updateTitle"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceWebUpdateWorkspaceTitleRequest);
      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;
  }
  /**
   * Update workspace
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @param dominoWorkspaceWebUpdateWorkspaceRequest Update workspace request (required)
   * @return DominoWorkspaceApiWorkspaceDto
   * @throws ApiException if fails to make API call
   */
  public DominoWorkspaceApiWorkspaceDto updateWorkspaceConfigTemplate(String projectId, String workspaceId, DominoWorkspaceWebUpdateWorkspaceRequest dominoWorkspaceWebUpdateWorkspaceRequest) throws ApiException {
    ApiResponse localVarResponse = updateWorkspaceConfigTemplateWithHttpInfo(projectId, workspaceId, dominoWorkspaceWebUpdateWorkspaceRequest);
    return localVarResponse.getData();
  }

  /**
   * Update workspace
   * 
   * @param projectId Id of the project (required)
   * @param workspaceId workspace id (required)
   * @param dominoWorkspaceWebUpdateWorkspaceRequest Update workspace request (required)
   * @return ApiResponse<DominoWorkspaceApiWorkspaceDto>
   * @throws ApiException if fails to make API call
   */
  public ApiResponse updateWorkspaceConfigTemplateWithHttpInfo(String projectId, String workspaceId, DominoWorkspaceWebUpdateWorkspaceRequest dominoWorkspaceWebUpdateWorkspaceRequest) throws ApiException {
    HttpRequest.Builder localVarRequestBuilder = updateWorkspaceConfigTemplateRequestBuilder(projectId, workspaceId, dominoWorkspaceWebUpdateWorkspaceRequest);
    try {
      HttpResponse localVarResponse = memberVarHttpClient.send(
          localVarRequestBuilder.build(),
          HttpResponse.BodyHandlers.ofInputStream());
      if (memberVarResponseInterceptor != null) {
        memberVarResponseInterceptor.accept(localVarResponse);
      }
      try {
        if (localVarResponse.statusCode()/ 100 != 2) {
          throw getApiException("updateWorkspaceConfigTemplate", 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 updateWorkspaceConfigTemplateRequestBuilder(String projectId, String workspaceId, DominoWorkspaceWebUpdateWorkspaceRequest dominoWorkspaceWebUpdateWorkspaceRequest) throws ApiException {
    // verify the required parameter 'projectId' is set
    if (projectId == null) {
      throw new ApiException(400, "Missing the required parameter 'projectId' when calling updateWorkspaceConfigTemplate");
    }
    // verify the required parameter 'workspaceId' is set
    if (workspaceId == null) {
      throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling updateWorkspaceConfigTemplate");
    }
    // verify the required parameter 'dominoWorkspaceWebUpdateWorkspaceRequest' is set
    if (dominoWorkspaceWebUpdateWorkspaceRequest == null) {
      throw new ApiException(400, "Missing the required parameter 'dominoWorkspaceWebUpdateWorkspaceRequest' when calling updateWorkspaceConfigTemplate");
    }

    HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();

    String localVarPath = "/workspace/project/{projectId}/workspace/{workspaceId}"
        .replace("{projectId}", ApiClient.urlEncode(projectId.toString()))
        .replace("{workspaceId}", ApiClient.urlEncode(workspaceId.toString()));

    localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));

    localVarRequestBuilder.header("Content-Type", "application/json");
    localVarRequestBuilder.header("Accept", "application/json");

    try {
      byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(dominoWorkspaceWebUpdateWorkspaceRequest);
      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