com.unblu.webapi.jersey.v3.api.CannedResponsesApi 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.CannedResponse;
import com.unblu.webapi.model.v3.CannedResponseConfigurationScope;
import com.unblu.webapi.model.v3.CannedResponseQuery;
import com.unblu.webapi.model.v3.CannedResponseResult;
public class CannedResponsesApi {
private ApiClient apiClient;
public CannedResponsesApi() {
this(Configuration.getDefaultApiClient());
}
public CannedResponsesApi(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 cannedResponse The entity to create (required)
* @return CannedResponse
* @throws ApiException if fails to make API call
*/
public CannedResponse cannedResponsesCreate(CannedResponse cannedResponse) throws ApiException {
return cannedResponsesCreateWithHttpInfo(cannedResponse).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 cannedResponse The entity to create (required)
* @return ApiResponse<CannedResponse>
* @throws ApiException if fails to make API call
*/
public ApiResponse cannedResponsesCreateWithHttpInfo(CannedResponse cannedResponse) throws ApiException {
Object localVarPostBody = cannedResponse;
// verify the required parameter 'cannedResponse' is set
if (cannedResponse == null) {
throw new ApiException(400, "Missing the required parameter 'cannedResponse' when calling cannedResponsesCreate");
}
// create path and map variables
String localVarPath = "/cannedresponses/create";
// 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);
}
/**
* 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 cannedResponsesDelete(String id) throws ApiException {
cannedResponsesDeleteWithHttpInfo(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 cannedResponsesDeleteWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/cannedresponses/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 cannedResponsesDeleteLegacyGet(String id) throws ApiException {
cannedResponsesDeleteLegacyGetWithHttpInfo(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 cannedResponsesDeleteLegacyGetWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/cannedresponses/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);
}
/**
* getCannedResponsesAvailableForChat Returns all CannedResponses that are available inside chat sessions for the calling user.<br> The user may be
* allowed to edit more than the returned canned responses if he has the rights. <p> <b>Note</b>: For editing use the
* `getByOwnerTypeAndId` or `getAll` service. </p><br>
*
* @return List<CannedResponse>
* @throws ApiException if fails to make API call
*/
public List cannedResponsesGetCannedResponsesAvailableForChat() throws ApiException {
return cannedResponsesGetCannedResponsesAvailableForChatWithHttpInfo().getData();
}
/**
* getCannedResponsesAvailableForChat Returns all CannedResponses that are available inside chat sessions for the calling user.<br> The user may be
* allowed to edit more than the returned canned responses if he has the rights. <p> <b>Note</b>: For editing use the
* `getByOwnerTypeAndId` or `getAll` service. </p><br>
*
* @return ApiResponse<List<CannedResponse>>
* @throws ApiException if fails to make API call
*/
public ApiResponse> cannedResponsesGetCannedResponsesAvailableForChatWithHttpInfo() throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/cannedresponses/getCannedResponsesAvailableForChat";
// 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);
}
/**
* getWritableConfigurationScopes Returns a list of all configuration scopes for which the calling user may add, delete or edit canned responses. Depending on
* the permissions of the users, these configuration scopes can be more than the ones which are available for the user in a chat.<br>
*
* @return List<CannedResponseConfigurationScope>
* @throws ApiException if fails to make API call
*/
public List cannedResponsesGetWritableConfigurationScopes() throws ApiException {
return cannedResponsesGetWritableConfigurationScopesWithHttpInfo().getData();
}
/**
* getWritableConfigurationScopes Returns a list of all configuration scopes for which the calling user may add, delete or edit canned responses. Depending on
* the permissions of the users, these configuration scopes can be more than the ones which are available for the user in a chat.<br>
*
* @return ApiResponse<List<CannedResponseConfigurationScope>>
* @throws ApiException if fails to make API call
*/
public ApiResponse> cannedResponsesGetWritableConfigurationScopesWithHttpInfo() throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/cannedresponses/getWritableConfigurationScopes";
// 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);
}
/**
* getWritableConfigurationScopesAvailableForChat Returns all configurations scopes available for chat to the calling user that the calling user may add, delete
* and edit canned responses for. <p> <b>Note</b>: The returned scopes may be equal to or be a subset of the the scopes returned by
* `getWritableConfigurationScopes` depending on the user role.<br> </p>
*
* @return List<CannedResponseConfigurationScope>
* @throws ApiException if fails to make API call
*/
public List cannedResponsesGetWritableConfigurationScopesAvailableForChat() throws ApiException {
return cannedResponsesGetWritableConfigurationScopesAvailableForChatWithHttpInfo().getData();
}
/**
* getWritableConfigurationScopesAvailableForChat Returns all configurations scopes available for chat to the calling user that the calling user may add, delete
* and edit canned responses for. <p> <b>Note</b>: The returned scopes may be equal to or be a subset of the the scopes returned by
* `getWritableConfigurationScopes` depending on the user role.<br> </p>
*
* @return ApiResponse<List<CannedResponseConfigurationScope>>
* @throws ApiException if fails to make API call
*/
public ApiResponse> cannedResponsesGetWritableConfigurationScopesAvailableForChatWithHttpInfo() throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/cannedresponses/getWritableConfigurationScopesAvailableForChat";
// 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 canned response for the given id<br>
*
* @param id Id of the canned response which should be returned (optional)
* @return CannedResponse
* @throws ApiException if fails to make API call
*/
public CannedResponse cannedResponsesRead(String id) throws ApiException {
return cannedResponsesReadWithHttpInfo(id).getData();
}
/**
* read Returns the canned response for the given id<br>
*
* @param id Id of the canned response which should be returned (optional)
* @return ApiResponse<CannedResponse>
* @throws ApiException if fails to make API call
*/
public ApiResponse cannedResponsesReadWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/cannedresponses/read";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
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 canned responses for the given id's<br>
*
* @param requestBody The id's for which the canned responses should be fetched (required)
* @return List<CannedResponse>
* @throws ApiException if fails to make API call
*/
public List cannedResponsesReadMultiple(List requestBody) throws ApiException {
return cannedResponsesReadMultipleWithHttpInfo(requestBody).getData();
}
/**
* readMultiple Gets a list of canned responses for the given id's<br>
*
* @param requestBody The id's for which the canned responses should be fetched (required)
* @return ApiResponse<List<CannedResponse>>
* @throws ApiException if fails to make API call
*/
public ApiResponse> cannedResponsesReadMultipleWithHttpInfo(List requestBody) 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 cannedResponsesReadMultiple");
}
// create path and map variables
String localVarPath = "/cannedresponses/readMultiple";
// 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);
}
/**
* search Search for canned responses according to the policy that applies to the user making the API call<br>
*
* @param cannedResponseQuery (required)
* @return CannedResponseResult
* @throws ApiException if fails to make API call
*/
public CannedResponseResult cannedResponsesSearch(CannedResponseQuery cannedResponseQuery) throws ApiException {
return cannedResponsesSearchWithHttpInfo(cannedResponseQuery).getData();
}
/**
* search Search for canned responses according to the policy that applies to the user making the API call<br>
*
* @param cannedResponseQuery (required)
* @return ApiResponse<CannedResponseResult>
* @throws ApiException if fails to make API call
*/
public ApiResponse cannedResponsesSearchWithHttpInfo(CannedResponseQuery cannedResponseQuery) throws ApiException {
Object localVarPostBody = cannedResponseQuery;
// verify the required parameter 'cannedResponseQuery' is set
if (cannedResponseQuery == null) {
throw new ApiException(400, "Missing the required parameter 'cannedResponseQuery' when calling cannedResponsesSearch");
}
// create path and map variables
String localVarPath = "/cannedresponses/search";
// 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);
}
/**
* update Updates the entity in the system with the given entity.<br>
*
* @param cannedResponse The entity to update (required)
* @return CannedResponse
* @throws ApiException if fails to make API call
*/
public CannedResponse cannedResponsesUpdate(CannedResponse cannedResponse) throws ApiException {
return cannedResponsesUpdateWithHttpInfo(cannedResponse).getData();
}
/**
* update Updates the entity in the system with the given entity.<br>
*
* @param cannedResponse The entity to update (required)
* @return ApiResponse<CannedResponse>
* @throws ApiException if fails to make API call
*/
public ApiResponse cannedResponsesUpdateWithHttpInfo(CannedResponse cannedResponse) throws ApiException {
Object localVarPostBody = cannedResponse;
// verify the required parameter 'cannedResponse' is set
if (cannedResponse == null) {
throw new ApiException(400, "Missing the required parameter 'cannedResponse' when calling cannedResponsesUpdate");
}
// create path and map variables
String localVarPath = "/cannedresponses/update";
// 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);
}
}