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

software.xdev.sessionize.api.SessionsApi Maven / Gradle / Ivy

There is a newer version: 1.2.4
Show newest version
/*
 * Sessionize JSON-REST API
 * Sessionize JSON-REST API documentation by XDEV Software
 *
 * The version of the OpenAPI document: 2.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 software.xdev.sessionize.api;

import com.fasterxml.jackson.core.type.TypeReference;

import software.xdev.sessionize.client.ApiException;
import software.xdev.sessionize.client.ApiClient;
import software.xdev.sessionize.client.Configuration;
import software.xdev.sessionize.client.Pair;

import software.xdev.sessionize.model.SessionGroup;


import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringJoiner;

public class SessionsApi {


  private ApiClient apiClient;

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

  public SessionsApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  public ApiClient getApiClient() {
    return apiClient;
  }

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

  /**
   * 
   * 
   * @param endpointId  (required)
   * @return List<SessionGroup>
   * @throws ApiException if fails to make API call
   */
  public List getAllSessions(String endpointId) throws ApiException {
    return this.getAllSessions(endpointId, Collections.emptyMap());
  }


  /**
   * 
   * 
   * @param endpointId  (required)
   * @param additionalHeaders additionalHeaders for this call
   * @return List<SessionGroup>
   * @throws ApiException if fails to make API call
   */
  public List getAllSessions(String endpointId, Map additionalHeaders) throws ApiException {
    Object localVarPostBody = null;
    
    // verify the required parameter 'endpointId' is set
    if (endpointId == null) {
      throw new ApiException(400, "Missing the required parameter 'endpointId' when calling getAllSessions");
    }
    
    // create path and map variables
    String localVarPath = "/api/v2/{endpointId}/view/Sessions"
      .replaceAll("\\{" + "endpointId" + "\\}", apiClient.escapeString(endpointId.toString()));

    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    List localVarQueryParams = new ArrayList();
    List localVarCollectionQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarCookieParams = new HashMap();
    Map localVarFormParams = new HashMap();

    
    localVarHeaderParams.putAll(additionalHeaders);

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

    final String[] localVarContentTypes = {
      
    };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

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

    TypeReference> localVarReturnType = new TypeReference>() {};
    return apiClient.invokeAPI(
        localVarPath,
        "GET",
        localVarQueryParams,
        localVarCollectionQueryParams,
        localVarQueryStringJoiner.toString(),
        localVarPostBody,
        localVarHeaderParams,
        localVarCookieParams,
        localVarFormParams,
        localVarAccept,
        localVarContentType,
        localVarAuthNames,
        localVarReturnType
    );
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy