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

org.symphonyoss.symphony.agent.api.FirehoseApi Maven / Gradle / Ivy

The newest version!
package org.symphonyoss.symphony.agent.api;

import org.symphonyoss.symphony.agent.invoker.ApiException;
import org.symphonyoss.symphony.agent.invoker.ApiClient;
import org.symphonyoss.symphony.agent.invoker.Configuration;
import org.symphonyoss.symphony.agent.invoker.Pair;

import javax.ws.rs.core.GenericType;

import org.symphonyoss.symphony.agent.model.V2Error;
import org.symphonyoss.symphony.agent.model.V5EventList;
import org.symphonyoss.symphony.agent.model.V5Firehose;
import org.symphonyoss.symphony.agent.model.V5FirehoseReadRequest;

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

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-03-13T13:44:51.568-04:00")
public class FirehoseApi {
  private ApiClient apiClient;

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

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

  public ApiClient getApiClient() {
    return apiClient;
  }

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

  /**
   * Create a new real time stream for all events in a pod.
   * A firehose provides all user entered messages that occur within a Symphony pod beginning at the point in time that it is created.  Note that unlike a datafeed, the user calling a firehose does not need to be a member of the conversations for which it will receive messages.  A firehose can be created and accessed by a user with a \"canUseFirehose\" entitlement.  A firehose can be deleted by using the delete firehose endpoint. 
   * @param sessionToken Session authentication token. (required)
   * @param keyManagerToken Key Manager authentication token. (required)
   * @return V5Firehose
   * @throws ApiException if fails to make API call
   */
  public V5Firehose v5FirehoseCreatePost(String sessionToken, String keyManagerToken) throws ApiException {
    Object localVarPostBody = null;
    
    // verify the required parameter 'sessionToken' is set
    if (sessionToken == null) {
      throw new ApiException(400, "Missing the required parameter 'sessionToken' when calling v5FirehoseCreatePost");
    }
    
    // verify the required parameter 'keyManagerToken' is set
    if (keyManagerToken == null) {
      throw new ApiException(400, "Missing the required parameter 'keyManagerToken' when calling v5FirehoseCreatePost");
    }
    
    // create path and map variables
    String localVarPath = "/v5/firehose/create";

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    if (sessionToken != null)
      localVarHeaderParams.put("sessionToken", apiClient.parameterToString(sessionToken));
if (keyManagerToken != null)
      localVarHeaderParams.put("keyManagerToken", apiClient.parameterToString(keyManagerToken));

    
    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() {};
    return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
      }
  /**
   * Delete a firehose
   * Deletes a firehose. 
   * @param sessionToken Session authentication token. (required)
   * @param keyManagerToken Key Manager authentication token. (required)
   * @param id Unique firehose identifier (required)
   * @throws ApiException if fails to make API call
   */
  public void v5FirehoseIdDeleteDelete(String sessionToken, String keyManagerToken, String id) throws ApiException {
    Object localVarPostBody = null;
    
    // verify the required parameter 'sessionToken' is set
    if (sessionToken == null) {
      throw new ApiException(400, "Missing the required parameter 'sessionToken' when calling v5FirehoseIdDeleteDelete");
    }
    
    // verify the required parameter 'keyManagerToken' is set
    if (keyManagerToken == null) {
      throw new ApiException(400, "Missing the required parameter 'keyManagerToken' when calling v5FirehoseIdDeleteDelete");
    }
    
    // verify the required parameter 'id' is set
    if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling v5FirehoseIdDeleteDelete");
    }
    
    // create path and map variables
    String localVarPath = "/v5/firehose/{id}/delete"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    if (sessionToken != null)
      localVarHeaderParams.put("sessionToken", apiClient.parameterToString(sessionToken));
if (keyManagerToken != null)
      localVarHeaderParams.put("keyManagerToken", apiClient.parameterToString(keyManagerToken));

    
    final String[] localVarAccepts = {
      
    };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

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

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


    apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
  }
  /**
   * Read a given firehose.
   * Read messages from the given firehose. The client should use the ackId to acknowledge received messages whenever it does the next so that the server will not send the same messages again. A firehose can be read by a user with CAN_READ_FIREHOSE entitlement. 
   * @param id Firehose ID  (required)
   * @param sessionToken Session authentication token. (required)
   * @param keyManagerToken Key Manager authentication token. (required)
   * @param payload  (required)
   * @return V5EventList
   * @throws ApiException if fails to make API call
   */
  public V5EventList v5FirehoseIdReadPost(String id, String sessionToken, String keyManagerToken, V5FirehoseReadRequest payload) throws ApiException {
    Object localVarPostBody = payload;
    
    // verify the required parameter 'id' is set
    if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling v5FirehoseIdReadPost");
    }
    
    // verify the required parameter 'sessionToken' is set
    if (sessionToken == null) {
      throw new ApiException(400, "Missing the required parameter 'sessionToken' when calling v5FirehoseIdReadPost");
    }
    
    // verify the required parameter 'keyManagerToken' is set
    if (keyManagerToken == null) {
      throw new ApiException(400, "Missing the required parameter 'keyManagerToken' when calling v5FirehoseIdReadPost");
    }
    
    // verify the required parameter 'payload' is set
    if (payload == null) {
      throw new ApiException(400, "Missing the required parameter 'payload' when calling v5FirehoseIdReadPost");
    }
    
    // create path and map variables
    String localVarPath = "/v5/firehose/{id}/read"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    if (sessionToken != null)
      localVarHeaderParams.put("sessionToken", apiClient.parameterToString(sessionToken));
if (keyManagerToken != null)
      localVarHeaderParams.put("keyManagerToken", apiClient.parameterToString(keyManagerToken));

    
    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() {};
    return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
      }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy