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

com.unblu.webapi.jersey.v4.api.ConversationHistoryApi Maven / Gradle / Ivy

There is a newer version: 8.8.2
Show newest version
package com.unblu.webapi.jersey.v4.api;

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

import com.unblu.webapi.jersey.v4.invoker.ApiClient;
import com.unblu.webapi.jersey.v4.invoker.ApiException;
import com.unblu.webapi.jersey.v4.invoker.ApiResponse;
import com.unblu.webapi.jersey.v4.invoker.Configuration;
import com.unblu.webapi.jersey.v4.invoker.Pair;
import com.unblu.webapi.model.v4.ConversationHistoryData;
import com.unblu.webapi.model.v4.ConversationHistoryDataResult;
import com.unblu.webapi.model.v4.ConversationHistoryQuery;
import com.unblu.webapi.model.v4.ConversationRecordingHistoryDataList;
import com.unblu.webapi.model.v4.ExpandFields;
import com.unblu.webapi.model.v4.MessageExportQuery;
import com.unblu.webapi.model.v4.MessageExportResult;

import jakarta.ws.rs.core.GenericType;

public class ConversationHistoryApi {
	private ApiClient apiClient;

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

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

	public ApiClient getApiClient() {
		return apiClient;
	}

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

	/**
	 * exportMessageLog Export messages belonging to a specific conversation<br>
	 * 
	 * @param conversationId id of the conversation (required)
	 * @param messageExportQuery (required)
	 * @return MessageExportResult
	 * @throws ApiException if fails to make API call
	 */
	public MessageExportResult conversationHistoryExportMessageLog(String conversationId, MessageExportQuery messageExportQuery) throws ApiException {
		return conversationHistoryExportMessageLogWithHttpInfo(conversationId, messageExportQuery).getData();
	}

	/**
	 * exportMessageLog Export messages belonging to a specific conversation<br>
	 * 
	 * @param conversationId id of the conversation (required)
	 * @param messageExportQuery (required)
	 * @return ApiResponse<MessageExportResult>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse conversationHistoryExportMessageLogWithHttpInfo(String conversationId, MessageExportQuery messageExportQuery) throws ApiException {
		Object localVarPostBody = messageExportQuery;

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

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

		// create path and map variables
		String localVarPath = "/conversationhistory/{conversationId}/exportMessageLog"
				.replaceAll("\\{" + "conversationId" + "\\}", apiClient.escapeString(conversationId.toString()));

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

		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[] { "basicAuth" };

		GenericType localVarReturnType = new GenericType() {
		};
		return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
	}

	/**
	 * getConversationRecordings Gets the list of conversation recordings belonging to a specific conversation<br>
	 * 
	 * @param conversationId ID of the conversation (required)
	 * @return ConversationRecordingHistoryDataList
	 * @throws ApiException if fails to make API call
	 */
	public ConversationRecordingHistoryDataList conversationHistoryGetConversationRecordings(String conversationId) throws ApiException {
		return conversationHistoryGetConversationRecordingsWithHttpInfo(conversationId).getData();
	}

	/**
	 * getConversationRecordings Gets the list of conversation recordings belonging to a specific conversation<br>
	 * 
	 * @param conversationId ID of the conversation (required)
	 * @return ApiResponse<ConversationRecordingHistoryDataList>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse conversationHistoryGetConversationRecordingsWithHttpInfo(String conversationId) throws ApiException {
		Object localVarPostBody = new HashMap<>();

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

		// create path and map variables
		String localVarPath = "/conversationhistory/{conversationId}/getConversationRecordings"
				.replaceAll("\\{" + "conversationId" + "\\}", apiClient.escapeString(conversationId.toString()));

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

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

		final String[] localVarContentTypes = {

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

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

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

	/**
	 * read Returns the conversation history data for a given conversation.<br>
	 * 
	 * @param conversationId id of the conversation (required)
	 * @param expand (optional)
	 * @return ConversationHistoryData
	 * @throws ApiException if fails to make API call
	 */
	public ConversationHistoryData conversationHistoryRead(String conversationId, List expand) throws ApiException {
		return conversationHistoryReadWithHttpInfo(conversationId, expand).getData();
	}

	/**
	 * read Returns the conversation history data for a given conversation.<br>
	 * 
	 * @param conversationId id of the conversation (required)
	 * @param expand (optional)
	 * @return ApiResponse<ConversationHistoryData>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse conversationHistoryReadWithHttpInfo(String conversationId, List expand) throws ApiException {
		Object localVarPostBody = new HashMap<>();

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

		// create path and map variables
		String localVarPath = "/conversationhistory/{conversationId}/read"
				.replaceAll("\\{" + "conversationId" + "\\}", apiClient.escapeString(conversationId.toString()));

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

		localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "expand", expand));

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

		final String[] localVarContentTypes = {

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

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

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

	/**
	 * search Generic conversation history search.<br>
	 * 
	 * @param conversationHistoryQuery The Conversation history query. (required)
	 * @param expand (optional)
	 * @return ConversationHistoryDataResult
	 * @throws ApiException if fails to make API call
	 */
	public ConversationHistoryDataResult conversationHistorySearch(ConversationHistoryQuery conversationHistoryQuery, List expand) throws ApiException {
		return conversationHistorySearchWithHttpInfo(conversationHistoryQuery, expand).getData();
	}

	/**
	 * search Generic conversation history search.<br>
	 * 
	 * @param conversationHistoryQuery The Conversation history query. (required)
	 * @param expand (optional)
	 * @return ApiResponse<ConversationHistoryDataResult>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse conversationHistorySearchWithHttpInfo(ConversationHistoryQuery conversationHistoryQuery, List expand) throws ApiException {
		Object localVarPostBody = conversationHistoryQuery;

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

		// create path and map variables
		String localVarPath = "/conversationhistory/search";

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

		localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "expand", expand));

		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[] { "basicAuth" };

		GenericType localVarReturnType = new GenericType() {
		};
		return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy