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

com.docusign.monitor.api.DataSetApi Maven / Gradle / Ivy

Go to download

The official DocuSign Monitor Java client provides libraries for Java application integration with DocuSign Monitor for real estate and mortgage workflows. It is recommended that you use this version of the library for new development.

The newest version!
package com.docusign.monitor.api;

import com.docusign.monitor.client.ApiClient;
import com.docusign.monitor.client.ApiException;
import com.docusign.monitor.client.ApiResponse;
import com.docusign.monitor.client.Configuration;
import com.docusign.monitor.client.Pair;
import com.docusign.monitor.model.*;
import jakarta.ws.rs.core.GenericType;

/** DataSetApi class. */
public class DataSetApi {
  private ApiClient apiClient;

  /** DataSetApi. */
  public DataSetApi() {
    this(Configuration.getDefaultApiClient());
  }

  /** DataSetApi. */
  public DataSetApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  /**
   * getApiClient Method.
   *
   * @return ApiClient
   */
  public ApiClient getApiClient() {
    return apiClient;
  }

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

  /// 
  /// Gets customer event data for an organization. Gets customer event data for the organization
  // that owns the integration key.  The results for this endpoint are paginated by event timestamp.
  // Use the `cursor` parameter to specify where the query begins in the dataset. Use the
  // `limit` parameter to set the number of records returned.
  /// 

  /** GetStreamOptions Class. */
  public class GetStreamOptions {
    private String cursor = null;
    private Integer limit = null;

    /** setCursor method. */
    public void setCursor(String cursor) {
      this.cursor = cursor;
    }

    /**
     * getCursor method.
     *
     * @return String
     */
    public String getCursor() {
      return this.cursor;
    }

    /** setLimit method. */
    public void setLimit(Integer limit) {
      this.limit = limit;
    }

    /**
     * getLimit method.
     *
     * @return Integer
     */
    public Integer getLimit() {
      return this.limit;
    }
  }

  /**
   * Gets customer event data for an organization.. Gets customer event data for the organization
   * that owns the integration key. The results for this endpoint are paginated by event timestamp.
   * Use the `cursor` parameter to specify where the query begins in the dataset. Use the
   * `limit` parameter to set the number of records returned.
   *
   * @param version Must be `2`. (required)
   * @param dataSetName Must be `monitor`. (required)
   * @return CursoredResult
   */
  public CursoredResult getStream(String version, String dataSetName) throws ApiException {
    return getStream(version, dataSetName, null);
  }

  /**
   * Gets customer event data for an organization.. Gets customer event data for the organization
   * that owns the integration key. The results for this endpoint are paginated by event timestamp.
   * Use the `cursor` parameter to specify where the query begins in the dataset. Use the
   * `limit` parameter to set the number of records returned.
   *
   * @param version Must be `2`. (required)
   * @param dataSetName Must be `monitor`. (required)
   * @param options for modifying the method behavior.
   * @return CursoredResult
   * @throws ApiException if fails to make API call
   */
  public CursoredResult getStream(
      String version, String dataSetName, DataSetApi.GetStreamOptions options) throws ApiException {
    ApiResponse localVarResponse =
        getStreamWithHttpInfo(version, dataSetName, options);
    return localVarResponse.getData();
  }

  /**
   * Gets customer event data for an organization. Gets customer event data for the organization
   * that owns the integration key. The results for this endpoint are paginated by event timestamp.
   * Use the `cursor` parameter to specify where the query begins in the dataset. Use the
   * `limit` parameter to set the number of records returned.
   *
   * @param version Must be `2`. (required)
   * @param dataSetName Must be `monitor`. (required)
   * @param options for modifying the method behavior.
   * @return CursoredResult
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getStreamWithHttpInfo(
      String version, String dataSetName, DataSetApi.GetStreamOptions options) throws ApiException {
    Object localVarPostBody = "{}";

    // verify the required parameter 'version' is set
    if (version == null) {
      throw new ApiException(
          400, "Missing the required parameter 'version' when calling getStream");
    }

    // verify the required parameter 'dataSetName' is set
    if (dataSetName == null) {
      throw new ApiException(
          400, "Missing the required parameter 'dataSetName' when calling getStream");
    }

    // create path and map variables
    String localVarPath =
        "/api/v{version}/datasets/{dataSetName}/stream"
            .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString()))
            .replaceAll(
                "\\{" + "dataSetName" + "\\}", apiClient.escapeString(dataSetName.toString()));

    // query params
    java.util.List localVarQueryParams = new java.util.ArrayList();
    java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
    java.util.Map localVarHeaderParams = new java.util.HashMap();
    java.util.Map localVarFormParams = new java.util.HashMap();

    if (options != null) {
      localVarQueryParams.addAll(apiClient.parameterToPair("cursor", options.cursor));
    }
    if (options != null) {
      localVarQueryParams.addAll(apiClient.parameterToPair("limit", options.limit));
    }

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

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

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

    GenericType localVarReturnType = new GenericType() {};
    CursoredResult localVarResponse =
        apiClient.invokeAPI(
            localVarPath,
            "GET",
            localVarQueryParams,
            localVarCollectionQueryParams,
            localVarPostBody,
            localVarHeaderParams,
            localVarFormParams,
            localVarAccept,
            localVarContentType,
            localVarAuthNames,
            localVarReturnType);
    return new ApiResponse(
        apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy