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

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

The 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.ConversationTemplate;
import com.unblu.webapi.model.v4.ConversationTemplateList;
import com.unblu.webapi.model.v4.ConversationTemplateQuery;
import com.unblu.webapi.model.v4.ConversationTemplateResult;
import com.unblu.webapi.model.v4.EInitialEngagementType;
import com.unblu.webapi.model.v4.ExpandFields;

import jakarta.ws.rs.core.GenericType;

public class ConversationTemplatesApi {
	private ApiClient apiClient;

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

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

	public ApiClient getApiClient() {
		return apiClient;
	}

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

	/**
	 * create Creates the given entity in the system. The ID of the entity is ignored for create operations, a new one is generated.<br>
	 * 
	 * @param conversationTemplate The entity to create (required)
	 * @param expand (optional)
	 * @return ConversationTemplate
	 * @throws ApiException if fails to make API call
	 */
	public ConversationTemplate conversationTemplatesCreate(ConversationTemplate conversationTemplate, List expand) throws ApiException {
		return conversationTemplatesCreateWithHttpInfo(conversationTemplate, expand).getData();
	}

	/**
	 * create Creates the given entity in the system. The ID of the entity is ignored for create operations, a new one is generated.<br>
	 * 
	 * @param conversationTemplate The entity to create (required)
	 * @param expand (optional)
	 * @return ApiResponse<ConversationTemplate>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse conversationTemplatesCreateWithHttpInfo(ConversationTemplate conversationTemplate, List expand) throws ApiException {
		Object localVarPostBody = conversationTemplate;

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

		// create path and map variables
		String localVarPath = "/conversationtemplates/create";

		// 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);
	}

	/**
	 * delete Deletes the template with the given ID<br>
	 * 
	 * @param templateId The ID of the template which should be deleted (required)
	 * @throws ApiException if fails to make API call
	 */
	public void conversationTemplatesDelete(String templateId) throws ApiException {

		conversationTemplatesDeleteWithHttpInfo(templateId);
	}

	/**
	 * delete Deletes the template with the given ID<br>
	 * 
	 * @param templateId The ID of the template which should be deleted (required)
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse conversationTemplatesDeleteWithHttpInfo(String templateId) throws ApiException {
		Object localVarPostBody = new HashMap<>();

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

		// create path and map variables
		String localVarPath = "/conversationtemplates/{templateId}/delete"
				.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()));

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

		final String[] localVarAccepts = {

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

		final String[] localVarContentTypes = {

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

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

		return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
	}

	/**
	 * getDefaultTemplateByEngagementType Gets the default conversation template for a given initial engagement type
	 * 
	 * @param initialEngagementType (optional)
	 * @param expand (optional)
	 * @return ConversationTemplate
	 * @throws ApiException if fails to make API call
	 */
	public ConversationTemplate conversationTemplatesGetDefaultTemplateByEngagementType(EInitialEngagementType initialEngagementType, List expand) throws ApiException {
		return conversationTemplatesGetDefaultTemplateByEngagementTypeWithHttpInfo(initialEngagementType, expand).getData();
	}

	/**
	 * getDefaultTemplateByEngagementType Gets the default conversation template for a given initial engagement type
	 * 
	 * @param initialEngagementType (optional)
	 * @param expand (optional)
	 * @return ApiResponse<ConversationTemplate>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse conversationTemplatesGetDefaultTemplateByEngagementTypeWithHttpInfo(EInitialEngagementType initialEngagementType, List expand) throws ApiException {
		Object localVarPostBody = new HashMap<>();

		// create path and map variables
		String localVarPath = "/conversationtemplates/getDefaultTemplateByEngagementType";

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

		localVarQueryParams.addAll(apiClient.parameterToPairs("", "initialEngagementType", initialEngagementType));
		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);
	}

	/**
	 * read Returns the template with the given ID<br>
	 * 
	 * @param templateId ID of the template which should be returned (required)
	 * @param expand (optional)
	 * @return ConversationTemplate
	 * @throws ApiException if fails to make API call
	 */
	public ConversationTemplate conversationTemplatesRead(String templateId, List expand) throws ApiException {
		return conversationTemplatesReadWithHttpInfo(templateId, expand).getData();
	}

	/**
	 * read Returns the template with the given ID<br>
	 * 
	 * @param templateId ID of the template which should be returned (required)
	 * @param expand (optional)
	 * @return ApiResponse<ConversationTemplate>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse conversationTemplatesReadWithHttpInfo(String templateId, List expand) throws ApiException {
		Object localVarPostBody = new HashMap<>();

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

		// create path and map variables
		String localVarPath = "/conversationtemplates/{templateId}/read"
				.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.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);
	}

	/**
	 * readMultiple Gets a list of conversation templates with the given IDs. IDs that can't be found are ignored.<br>
	 * 
	 * @param requestBody The IDs of the conversation templates to fetch (required)
	 * @param expand (optional)
	 * @return ConversationTemplateList
	 * @throws ApiException if fails to make API call
	 */
	public ConversationTemplateList conversationTemplatesReadMultiple(List requestBody, List expand) throws ApiException {
		return conversationTemplatesReadMultipleWithHttpInfo(requestBody, expand).getData();
	}

	/**
	 * readMultiple Gets a list of conversation templates with the given IDs. IDs that can't be found are ignored.<br>
	 * 
	 * @param requestBody The IDs of the conversation templates to fetch (required)
	 * @param expand (optional)
	 * @return ApiResponse<ConversationTemplateList>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse conversationTemplatesReadMultipleWithHttpInfo(List requestBody, List expand) throws ApiException {
		Object localVarPostBody = requestBody;

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

		// create path and map variables
		String localVarPath = "/conversationtemplates/readMultiple";

		// 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);
	}

	/**
	 * search Search for conversation-templates in the current account<br>
	 * 
	 * @param conversationTemplateQuery (required)
	 * @param expand (optional)
	 * @return ConversationTemplateResult
	 * @throws ApiException if fails to make API call
	 */
	public ConversationTemplateResult conversationTemplatesSearch(ConversationTemplateQuery conversationTemplateQuery, List expand) throws ApiException {
		return conversationTemplatesSearchWithHttpInfo(conversationTemplateQuery, expand).getData();
	}

	/**
	 * search Search for conversation-templates in the current account<br>
	 * 
	 * @param conversationTemplateQuery (required)
	 * @param expand (optional)
	 * @return ApiResponse<ConversationTemplateResult>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse conversationTemplatesSearchWithHttpInfo(ConversationTemplateQuery conversationTemplateQuery, List expand) throws ApiException {
		Object localVarPostBody = conversationTemplateQuery;

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

		// create path and map variables
		String localVarPath = "/conversationtemplates/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);
	}

	/**
	 * update Updates the entity in the system with the given entity.<br>
	 * 
	 * @param conversationTemplate The entity to update (required)
	 * @param expand (optional)
	 * @return ConversationTemplate
	 * @throws ApiException if fails to make API call
	 */
	public ConversationTemplate conversationTemplatesUpdate(ConversationTemplate conversationTemplate, List expand) throws ApiException {
		return conversationTemplatesUpdateWithHttpInfo(conversationTemplate, expand).getData();
	}

	/**
	 * update Updates the entity in the system with the given entity.<br>
	 * 
	 * @param conversationTemplate The entity to update (required)
	 * @param expand (optional)
	 * @return ApiResponse<ConversationTemplate>
	 * @throws ApiException if fails to make API call
	 */
	public ApiResponse conversationTemplatesUpdateWithHttpInfo(ConversationTemplate conversationTemplate, List expand) throws ApiException {
		Object localVarPostBody = conversationTemplate;

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

		// create path and map variables
		String localVarPath = "/conversationtemplates/update";

		// 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