Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* MailSlurp API
* MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
*
* The version of the OpenAPI document: 6.5.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.mailslurp.apis;
import com.mailslurp.clients.ApiCallback;
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.ApiResponse;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.Pair;
import com.mailslurp.clients.ProgressRequestBody;
import com.mailslurp.clients.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.mailslurp.models.ImapServerFetchResult;
import com.mailslurp.models.ImapServerGetResult;
import com.mailslurp.models.ImapServerListOptions;
import com.mailslurp.models.ImapServerListResult;
import com.mailslurp.models.ImapServerMailboxResult;
import com.mailslurp.models.ImapServerSearchOptions;
import com.mailslurp.models.ImapServerSearchResult;
import com.mailslurp.models.ImapServerStatusOptions;
import com.mailslurp.models.ImapServerStatusResult;
import com.mailslurp.models.ImapUpdateFlagsOptions;
import java.util.UUID;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ImapControllerApi {
private ApiClient localVarApiClient;
public ImapControllerApi() {
this(Configuration.getDefaultApiClient());
}
public ImapControllerApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for imapServerFetch
* @param seqNum (required)
* @param inboxId Inbox ID to search (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call imapServerFetchCall(Long seqNum, UUID inboxId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/imap/server/fetch";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (inboxId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("inboxId", inboxId));
}
if (seqNum != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("seqNum", seqNum));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call imapServerFetchValidateBeforeCall(Long seqNum, UUID inboxId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'seqNum' is set
if (seqNum == null) {
throw new ApiException("Missing the required parameter 'seqNum' when calling imapServerFetch(Async)");
}
okhttp3.Call localVarCall = imapServerFetchCall(seqNum, inboxId, _callback);
return localVarCall;
}
/**
* Fetch message in an inbox
*
* @param seqNum (required)
* @param inboxId Inbox ID to search (optional)
* @return ImapServerFetchResult
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ImapServerFetchResult imapServerFetch(Long seqNum, UUID inboxId) throws ApiException {
ApiResponse localVarResp = imapServerFetchWithHttpInfo(seqNum, inboxId);
return localVarResp.getData();
}
/**
* Fetch message in an inbox
*
* @param seqNum (required)
* @param inboxId Inbox ID to search (optional)
* @return ApiResponse<ImapServerFetchResult>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse imapServerFetchWithHttpInfo(Long seqNum, UUID inboxId) throws ApiException {
okhttp3.Call localVarCall = imapServerFetchValidateBeforeCall(seqNum, inboxId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Fetch message in an inbox (asynchronously)
*
* @param seqNum (required)
* @param inboxId Inbox ID to search (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call imapServerFetchAsync(Long seqNum, UUID inboxId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = imapServerFetchValidateBeforeCall(seqNum, inboxId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for imapServerGet
* @param emailId Email ID to get (required)
* @param inboxId Inbox ID to search (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call imapServerGetCall(UUID emailId, UUID inboxId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/imap/server/get";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (emailId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("emailId", emailId));
}
if (inboxId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("inboxId", inboxId));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call imapServerGetValidateBeforeCall(UUID emailId, UUID inboxId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'emailId' is set
if (emailId == null) {
throw new ApiException("Missing the required parameter 'emailId' when calling imapServerGet(Async)");
}
okhttp3.Call localVarCall = imapServerGetCall(emailId, inboxId, _callback);
return localVarCall;
}
/**
* Get a message by email ID
*
* @param emailId Email ID to get (required)
* @param inboxId Inbox ID to search (optional)
* @return ImapServerGetResult
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ImapServerGetResult imapServerGet(UUID emailId, UUID inboxId) throws ApiException {
ApiResponse localVarResp = imapServerGetWithHttpInfo(emailId, inboxId);
return localVarResp.getData();
}
/**
* Get a message by email ID
*
* @param emailId Email ID to get (required)
* @param inboxId Inbox ID to search (optional)
* @return ApiResponse<ImapServerGetResult>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse imapServerGetWithHttpInfo(UUID emailId, UUID inboxId) throws ApiException {
okhttp3.Call localVarCall = imapServerGetValidateBeforeCall(emailId, inboxId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get a message by email ID (asynchronously)
*
* @param emailId Email ID to get (required)
* @param inboxId Inbox ID to search (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call imapServerGetAsync(UUID emailId, UUID inboxId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = imapServerGetValidateBeforeCall(emailId, inboxId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for imapServerList
* @param imapServerListOptions (required)
* @param inboxId Inbox ID to list (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call imapServerListCall(ImapServerListOptions imapServerListOptions, UUID inboxId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = imapServerListOptions;
// create path and map variables
String localVarPath = "/imap/server/list";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (inboxId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("inboxId", inboxId));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call imapServerListValidateBeforeCall(ImapServerListOptions imapServerListOptions, UUID inboxId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'imapServerListOptions' is set
if (imapServerListOptions == null) {
throw new ApiException("Missing the required parameter 'imapServerListOptions' when calling imapServerList(Async)");
}
okhttp3.Call localVarCall = imapServerListCall(imapServerListOptions, inboxId, _callback);
return localVarCall;
}
/**
* List messages in an inbox
*
* @param imapServerListOptions (required)
* @param inboxId Inbox ID to list (optional)
* @return ImapServerListResult
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ImapServerListResult imapServerList(ImapServerListOptions imapServerListOptions, UUID inboxId) throws ApiException {
ApiResponse localVarResp = imapServerListWithHttpInfo(imapServerListOptions, inboxId);
return localVarResp.getData();
}
/**
* List messages in an inbox
*
* @param imapServerListOptions (required)
* @param inboxId Inbox ID to list (optional)
* @return ApiResponse<ImapServerListResult>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse imapServerListWithHttpInfo(ImapServerListOptions imapServerListOptions, UUID inboxId) throws ApiException {
okhttp3.Call localVarCall = imapServerListValidateBeforeCall(imapServerListOptions, inboxId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* List messages in an inbox (asynchronously)
*
* @param imapServerListOptions (required)
* @param inboxId Inbox ID to list (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call imapServerListAsync(ImapServerListOptions imapServerListOptions, UUID inboxId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = imapServerListValidateBeforeCall(imapServerListOptions, inboxId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for imapServerMailbox
* @param name Inbox email address to create (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call imapServerMailboxCall(String name, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/imap/server/mailbox";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (name != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call imapServerMailboxValidateBeforeCall(String name, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling imapServerMailbox(Async)");
}
okhttp3.Call localVarCall = imapServerMailboxCall(name, _callback);
return localVarCall;
}
/**
* Create a new mailbox if possible
*
* @param name Inbox email address to create (required)
* @return ImapServerMailboxResult
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ImapServerMailboxResult imapServerMailbox(String name) throws ApiException {
ApiResponse localVarResp = imapServerMailboxWithHttpInfo(name);
return localVarResp.getData();
}
/**
* Create a new mailbox if possible
*
* @param name Inbox email address to create (required)
* @return ApiResponse<ImapServerMailboxResult>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse imapServerMailboxWithHttpInfo(String name) throws ApiException {
okhttp3.Call localVarCall = imapServerMailboxValidateBeforeCall(name, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create a new mailbox if possible (asynchronously)
*
* @param name Inbox email address to create (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call imapServerMailboxAsync(String name, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = imapServerMailboxValidateBeforeCall(name, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for imapServerSearch
* @param imapServerSearchOptions (required)
* @param inboxId Inbox ID to search (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call imapServerSearchCall(ImapServerSearchOptions imapServerSearchOptions, UUID inboxId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = imapServerSearchOptions;
// create path and map variables
String localVarPath = "/imap/server/search";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (inboxId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("inboxId", inboxId));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call imapServerSearchValidateBeforeCall(ImapServerSearchOptions imapServerSearchOptions, UUID inboxId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'imapServerSearchOptions' is set
if (imapServerSearchOptions == null) {
throw new ApiException("Missing the required parameter 'imapServerSearchOptions' when calling imapServerSearch(Async)");
}
okhttp3.Call localVarCall = imapServerSearchCall(imapServerSearchOptions, inboxId, _callback);
return localVarCall;
}
/**
* Search messages in an inbox
*
* @param imapServerSearchOptions (required)
* @param inboxId Inbox ID to search (optional)
* @return ImapServerSearchResult
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ImapServerSearchResult imapServerSearch(ImapServerSearchOptions imapServerSearchOptions, UUID inboxId) throws ApiException {
ApiResponse localVarResp = imapServerSearchWithHttpInfo(imapServerSearchOptions, inboxId);
return localVarResp.getData();
}
/**
* Search messages in an inbox
*
* @param imapServerSearchOptions (required)
* @param inboxId Inbox ID to search (optional)
* @return ApiResponse<ImapServerSearchResult>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse imapServerSearchWithHttpInfo(ImapServerSearchOptions imapServerSearchOptions, UUID inboxId) throws ApiException {
okhttp3.Call localVarCall = imapServerSearchValidateBeforeCall(imapServerSearchOptions, inboxId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Search messages in an inbox (asynchronously)
*
* @param imapServerSearchOptions (required)
* @param inboxId Inbox ID to search (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call imapServerSearchAsync(ImapServerSearchOptions imapServerSearchOptions, UUID inboxId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = imapServerSearchValidateBeforeCall(imapServerSearchOptions, inboxId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for imapServerStatus
* @param imapServerStatusOptions (required)
* @param inboxId Inbox ID to list (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call imapServerStatusCall(ImapServerStatusOptions imapServerStatusOptions, UUID inboxId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = imapServerStatusOptions;
// create path and map variables
String localVarPath = "/imap/server/status";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (inboxId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("inboxId", inboxId));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call imapServerStatusValidateBeforeCall(ImapServerStatusOptions imapServerStatusOptions, UUID inboxId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'imapServerStatusOptions' is set
if (imapServerStatusOptions == null) {
throw new ApiException("Missing the required parameter 'imapServerStatusOptions' when calling imapServerStatus(Async)");
}
okhttp3.Call localVarCall = imapServerStatusCall(imapServerStatusOptions, inboxId, _callback);
return localVarCall;
}
/**
* Get status for mailbox
*
* @param imapServerStatusOptions (required)
* @param inboxId Inbox ID to list (optional)
* @return ImapServerStatusResult
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ImapServerStatusResult imapServerStatus(ImapServerStatusOptions imapServerStatusOptions, UUID inboxId) throws ApiException {
ApiResponse localVarResp = imapServerStatusWithHttpInfo(imapServerStatusOptions, inboxId);
return localVarResp.getData();
}
/**
* Get status for mailbox
*
* @param imapServerStatusOptions (required)
* @param inboxId Inbox ID to list (optional)
* @return ApiResponse<ImapServerStatusResult>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse imapServerStatusWithHttpInfo(ImapServerStatusOptions imapServerStatusOptions, UUID inboxId) throws ApiException {
okhttp3.Call localVarCall = imapServerStatusValidateBeforeCall(imapServerStatusOptions, inboxId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get status for mailbox (asynchronously)
*
* @param imapServerStatusOptions (required)
* @param inboxId Inbox ID to list (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call imapServerStatusAsync(ImapServerStatusOptions imapServerStatusOptions, UUID inboxId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = imapServerStatusValidateBeforeCall(imapServerStatusOptions, inboxId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for imapServerUpdateFlags
* @param imapUpdateFlagsOptions (required)
* @param inboxId (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
*/
public okhttp3.Call imapServerUpdateFlagsCall(ImapUpdateFlagsOptions imapUpdateFlagsOptions, UUID inboxId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = imapUpdateFlagsOptions;
// create path and map variables
String localVarPath = "/imap/server/update-flags";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (inboxId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("inboxId", inboxId));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call imapServerUpdateFlagsValidateBeforeCall(ImapUpdateFlagsOptions imapUpdateFlagsOptions, UUID inboxId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'imapUpdateFlagsOptions' is set
if (imapUpdateFlagsOptions == null) {
throw new ApiException("Missing the required parameter 'imapUpdateFlagsOptions' when calling imapServerUpdateFlags(Async)");
}
okhttp3.Call localVarCall = imapServerUpdateFlagsCall(imapUpdateFlagsOptions, inboxId, _callback);
return localVarCall;
}
/**
*
* Update message flags
* @param imapUpdateFlagsOptions (required)
* @param inboxId (optional)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
*/
public void imapServerUpdateFlags(ImapUpdateFlagsOptions imapUpdateFlagsOptions, UUID inboxId) throws ApiException {
imapServerUpdateFlagsWithHttpInfo(imapUpdateFlagsOptions, inboxId);
}
/**
*
* Update message flags
* @param imapUpdateFlagsOptions (required)
* @param inboxId (optional)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
*/
public ApiResponse imapServerUpdateFlagsWithHttpInfo(ImapUpdateFlagsOptions imapUpdateFlagsOptions, UUID inboxId) throws ApiException {
okhttp3.Call localVarCall = imapServerUpdateFlagsValidateBeforeCall(imapUpdateFlagsOptions, inboxId, null);
return localVarApiClient.execute(localVarCall);
}
/**
* (asynchronously)
* Update message flags
* @param imapUpdateFlagsOptions (required)
* @param inboxId (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details