com.unblu.webapi.jersey.v3.api.ConversationTemplatesApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jersey-client-v3 Show documentation
Show all versions of jersey-client-v3 Show documentation
Client implemented using Jersey
package com.unblu.webapi.jersey.v3.api;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
import com.unblu.webapi.jersey.v3.invoker.ApiClient;
import com.unblu.webapi.jersey.v3.invoker.ApiException;
import com.unblu.webapi.jersey.v3.invoker.ApiResponse;
import com.unblu.webapi.jersey.v3.invoker.Configuration;
import com.unblu.webapi.jersey.v3.invoker.Pair;
import com.unblu.webapi.model.v3.ConversationTemplate;
import com.unblu.webapi.model.v3.ConversationTemplateQuery;
import com.unblu.webapi.model.v3.ConversationTemplateResult;
import com.unblu.webapi.model.v3.EInitialEngagementType;
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, String 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, String 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("", "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 entity for the given ID<br>
*
* @param id The ID of the entity which should be deleted (optional)
* @throws ApiException if fails to make API call
*/
public void conversationTemplatesDelete(String id) throws ApiException {
conversationTemplatesDeleteWithHttpInfo(id);
}
/**
* delete Deletes the entity for the given ID<br>
*
* @param id The ID of the entity which should be deleted (optional)
* @throws ApiException if fails to make API call
*/
public ApiResponse conversationTemplatesDeleteWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/conversationtemplates/delete";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
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);
}
/**
* delete Deletes the entity for the given ID<br>
*
* @param id The ID of the entity which should be deleted (optional)
* @throws ApiException if fails to make API call
* @deprecated
*/
@Deprecated
public void conversationTemplatesDeleteLegacyGet(String id) throws ApiException {
conversationTemplatesDeleteLegacyGetWithHttpInfo(id);
}
/**
* delete Deletes the entity for the given ID<br>
*
* @param id The ID of the entity which should be deleted (optional)
* @throws ApiException if fails to make API call
* @deprecated
*/
@Deprecated
public ApiResponse conversationTemplatesDeleteLegacyGetWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/conversationtemplates/delete";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
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, "GET", 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, String 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, String 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("", "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 entity for the given ID<br>
*
* @param id ID of the entity which should be returned (optional)
* @param expand (optional)
* @return ConversationTemplate
* @throws ApiException if fails to make API call
*/
public ConversationTemplate conversationTemplatesRead(String id, String expand) throws ApiException {
return conversationTemplatesReadWithHttpInfo(id, expand).getData();
}
/**
* read Returns the entity for the given ID<br>
*
* @param id ID of the entity which should be returned (optional)
* @param expand (optional)
* @return ApiResponse<ConversationTemplate>
* @throws ApiException if fails to make API call
*/
public ApiResponse conversationTemplatesReadWithHttpInfo(String id, String expand) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/conversationtemplates/read";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "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 the entities with the given IDs. IDs that can't be found are ignored<br>
*
* @param requestBody The IDs for which to fetch the entities (required)
* @param expand (optional)
* @return List<ConversationTemplate>
* @throws ApiException if fails to make API call
*/
public List conversationTemplatesReadMultiple(List requestBody, String expand) throws ApiException {
return conversationTemplatesReadMultipleWithHttpInfo(requestBody, expand).getData();
}
/**
* readMultiple Gets a list of the entities with the given IDs. IDs that can't be found are ignored<br>
*
* @param requestBody The IDs for which to fetch the entities (required)
* @param expand (optional)
* @return ApiResponse<List<ConversationTemplate>>
* @throws ApiException if fails to make API call
*/
public ApiResponse> conversationTemplatesReadMultipleWithHttpInfo(List requestBody, String 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("", "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, String 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, String 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("", "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, String 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, String 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("", "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);
}
}