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.AttachmentMetaData;
import com.mailslurp.models.CanSendEmailResults;
import com.mailslurp.models.CheckEmailBodyFeatureSupportResults;
import com.mailslurp.models.CheckEmailBodyResults;
import com.mailslurp.models.CheckEmailClientSupportOptions;
import com.mailslurp.models.CheckEmailClientSupportResults;
import com.mailslurp.models.ContentMatchOptions;
import com.mailslurp.models.CountDto;
import com.mailslurp.models.DownloadAttachmentDto;
import com.mailslurp.models.Email;
import com.mailslurp.models.EmailContentMatchResult;
import com.mailslurp.models.EmailContentPartResult;
import com.mailslurp.models.EmailHtmlDto;
import com.mailslurp.models.EmailLinksResult;
import com.mailslurp.models.EmailPreview;
import com.mailslurp.models.EmailPreviewUrls;
import com.mailslurp.models.EmailScreenshotResult;
import com.mailslurp.models.EmailTextLinesResult;
import com.mailslurp.models.ForwardEmailOptions;
import com.mailslurp.models.GetEmailScreenshotOptions;
import com.mailslurp.models.GravatarUrl;
import com.mailslurp.models.ImapFlagOperationOptions;
import java.time.OffsetDateTime;
import com.mailslurp.models.PageEmailProjection;
import com.mailslurp.models.RawEmailJson;
import com.mailslurp.models.ReplyToEmailOptions;
import com.mailslurp.models.SearchEmailsOptions;
import com.mailslurp.models.SendEmailOptions;
import com.mailslurp.models.SentEmailDto;
import java.util.UUID;
import com.mailslurp.models.UnreadCount;
import com.mailslurp.models.ValidationDto;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class EmailControllerApi {
private ApiClient localVarApiClient;
public EmailControllerApi() {
this(Configuration.getDefaultApiClient());
}
public EmailControllerApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for applyImapFlagOperation
* @param emailId (required)
* @param imapFlagOperationOptions (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 applyImapFlagOperationCall(UUID emailId, ImapFlagOperationOptions imapFlagOperationOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = imapFlagOperationOptions;
// create path and map variables
String localVarPath = "/emails/{emailId}/imap-flag-operation"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
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 applyImapFlagOperationValidateBeforeCall(UUID emailId, ImapFlagOperationOptions imapFlagOperationOptions, 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 applyImapFlagOperation(Async)");
}
// verify the required parameter 'imapFlagOperationOptions' is set
if (imapFlagOperationOptions == null) {
throw new ApiException("Missing the required parameter 'imapFlagOperationOptions' when calling applyImapFlagOperation(Async)");
}
okhttp3.Call localVarCall = applyImapFlagOperationCall(emailId, imapFlagOperationOptions, _callback);
return localVarCall;
}
/**
* Set IMAP flags associated with a message. Only supports '\\Seen' flag.
* Apply RFC3501 section-2.3.2 IMAP flag operations on an email
* @param emailId (required)
* @param imapFlagOperationOptions (required)
* @return EmailPreview
* @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 EmailPreview applyImapFlagOperation(UUID emailId, ImapFlagOperationOptions imapFlagOperationOptions) throws ApiException {
ApiResponse localVarResp = applyImapFlagOperationWithHttpInfo(emailId, imapFlagOperationOptions);
return localVarResp.getData();
}
/**
* Set IMAP flags associated with a message. Only supports '\\Seen' flag.
* Apply RFC3501 section-2.3.2 IMAP flag operations on an email
* @param emailId (required)
* @param imapFlagOperationOptions (required)
* @return ApiResponse<EmailPreview>
* @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 applyImapFlagOperationWithHttpInfo(UUID emailId, ImapFlagOperationOptions imapFlagOperationOptions) throws ApiException {
okhttp3.Call localVarCall = applyImapFlagOperationValidateBeforeCall(emailId, imapFlagOperationOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Set IMAP flags associated with a message. Only supports '\\Seen' flag. (asynchronously)
* Apply RFC3501 section-2.3.2 IMAP flag operations on an email
* @param emailId (required)
* @param imapFlagOperationOptions (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 applyImapFlagOperationAsync(UUID emailId, ImapFlagOperationOptions imapFlagOperationOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = applyImapFlagOperationValidateBeforeCall(emailId, imapFlagOperationOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for canSend
* @param inboxId ID of the inbox you want to send the email from (required)
* @param sendEmailOptions (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 canSendCall(UUID inboxId, SendEmailOptions sendEmailOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = sendEmailOptions;
// create path and map variables
String localVarPath = "/emails/can-send";
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 canSendValidateBeforeCall(UUID inboxId, SendEmailOptions sendEmailOptions, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'inboxId' is set
if (inboxId == null) {
throw new ApiException("Missing the required parameter 'inboxId' when calling canSend(Async)");
}
// verify the required parameter 'sendEmailOptions' is set
if (sendEmailOptions == null) {
throw new ApiException("Missing the required parameter 'sendEmailOptions' when calling canSend(Async)");
}
okhttp3.Call localVarCall = canSendCall(inboxId, sendEmailOptions, _callback);
return localVarCall;
}
/**
* Check if email can be sent and options are valid.
* Can user send email to given recipient or is the recipient blocked
* @param inboxId ID of the inbox you want to send the email from (required)
* @param sendEmailOptions (required)
* @return CanSendEmailResults
* @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 CanSendEmailResults canSend(UUID inboxId, SendEmailOptions sendEmailOptions) throws ApiException {
ApiResponse localVarResp = canSendWithHttpInfo(inboxId, sendEmailOptions);
return localVarResp.getData();
}
/**
* Check if email can be sent and options are valid.
* Can user send email to given recipient or is the recipient blocked
* @param inboxId ID of the inbox you want to send the email from (required)
* @param sendEmailOptions (required)
* @return ApiResponse<CanSendEmailResults>
* @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 canSendWithHttpInfo(UUID inboxId, SendEmailOptions sendEmailOptions) throws ApiException {
okhttp3.Call localVarCall = canSendValidateBeforeCall(inboxId, sendEmailOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Check if email can be sent and options are valid. (asynchronously)
* Can user send email to given recipient or is the recipient blocked
* @param inboxId ID of the inbox you want to send the email from (required)
* @param sendEmailOptions (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 canSendAsync(UUID inboxId, SendEmailOptions sendEmailOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = canSendValidateBeforeCall(inboxId, sendEmailOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for checkEmailBody
* @param emailId (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 checkEmailBodyCall(UUID emailId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/emails/{emailId}/check-email-body"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
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 checkEmailBodyValidateBeforeCall(UUID emailId, 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 checkEmailBody(Async)");
}
okhttp3.Call localVarCall = checkEmailBodyCall(emailId, _callback);
return localVarCall;
}
/**
* Detect broken links, spelling, and images in email content
* Find dead links, broken images, and spelling mistakes in email body. Will call included links via HTTP so do not invoke if your links are sensitive or stateful. Any resource that returns a 4xx or 5xx response or is not reachable via HEAD or GET HTTP operations will be considered unhealthy.
* @param emailId (required)
* @return CheckEmailBodyResults
* @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 CheckEmailBodyResults checkEmailBody(UUID emailId) throws ApiException {
ApiResponse localVarResp = checkEmailBodyWithHttpInfo(emailId);
return localVarResp.getData();
}
/**
* Detect broken links, spelling, and images in email content
* Find dead links, broken images, and spelling mistakes in email body. Will call included links via HTTP so do not invoke if your links are sensitive or stateful. Any resource that returns a 4xx or 5xx response or is not reachable via HEAD or GET HTTP operations will be considered unhealthy.
* @param emailId (required)
* @return ApiResponse<CheckEmailBodyResults>
* @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 checkEmailBodyWithHttpInfo(UUID emailId) throws ApiException {
okhttp3.Call localVarCall = checkEmailBodyValidateBeforeCall(emailId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Detect broken links, spelling, and images in email content (asynchronously)
* Find dead links, broken images, and spelling mistakes in email body. Will call included links via HTTP so do not invoke if your links are sensitive or stateful. Any resource that returns a 4xx or 5xx response or is not reachable via HEAD or GET HTTP operations will be considered unhealthy.
* @param emailId (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 checkEmailBodyAsync(UUID emailId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = checkEmailBodyValidateBeforeCall(emailId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for checkEmailBodyFeatureSupport
* @param emailId (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 checkEmailBodyFeatureSupportCall(UUID emailId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/emails/{emailId}/check-email-body-feature-support"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
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 checkEmailBodyFeatureSupportValidateBeforeCall(UUID emailId, 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 checkEmailBodyFeatureSupport(Async)");
}
okhttp3.Call localVarCall = checkEmailBodyFeatureSupportCall(emailId, _callback);
return localVarCall;
}
/**
* Show which mail clients support the HTML and CSS features used in an email body.
* Detect HTML and CSS features inside an email body and return a report of email client support across different platforms and versions.
* @param emailId (required)
* @return CheckEmailBodyFeatureSupportResults
* @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 CheckEmailBodyFeatureSupportResults checkEmailBodyFeatureSupport(UUID emailId) throws ApiException {
ApiResponse localVarResp = checkEmailBodyFeatureSupportWithHttpInfo(emailId);
return localVarResp.getData();
}
/**
* Show which mail clients support the HTML and CSS features used in an email body.
* Detect HTML and CSS features inside an email body and return a report of email client support across different platforms and versions.
* @param emailId (required)
* @return ApiResponse<CheckEmailBodyFeatureSupportResults>
* @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 checkEmailBodyFeatureSupportWithHttpInfo(UUID emailId) throws ApiException {
okhttp3.Call localVarCall = checkEmailBodyFeatureSupportValidateBeforeCall(emailId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Show which mail clients support the HTML and CSS features used in an email body. (asynchronously)
* Detect HTML and CSS features inside an email body and return a report of email client support across different platforms and versions.
* @param emailId (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 checkEmailBodyFeatureSupportAsync(UUID emailId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = checkEmailBodyFeatureSupportValidateBeforeCall(emailId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for checkEmailClientSupport
* @param checkEmailClientSupportOptions (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 checkEmailClientSupportCall(CheckEmailClientSupportOptions checkEmailClientSupportOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = checkEmailClientSupportOptions;
// create path and map variables
String localVarPath = "/emails/check-email-client-support";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
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 checkEmailClientSupportValidateBeforeCall(CheckEmailClientSupportOptions checkEmailClientSupportOptions, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'checkEmailClientSupportOptions' is set
if (checkEmailClientSupportOptions == null) {
throw new ApiException("Missing the required parameter 'checkEmailClientSupportOptions' when calling checkEmailClientSupport(Async)");
}
okhttp3.Call localVarCall = checkEmailClientSupportCall(checkEmailClientSupportOptions, _callback);
return localVarCall;
}
/**
* Show which email programs and devices support the features used in an email body.
* Evaluate the features used in an email body and return a report of email client support across different platforms and versions.
* @param checkEmailClientSupportOptions (required)
* @return CheckEmailClientSupportResults
* @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 CheckEmailClientSupportResults checkEmailClientSupport(CheckEmailClientSupportOptions checkEmailClientSupportOptions) throws ApiException {
ApiResponse localVarResp = checkEmailClientSupportWithHttpInfo(checkEmailClientSupportOptions);
return localVarResp.getData();
}
/**
* Show which email programs and devices support the features used in an email body.
* Evaluate the features used in an email body and return a report of email client support across different platforms and versions.
* @param checkEmailClientSupportOptions (required)
* @return ApiResponse<CheckEmailClientSupportResults>
* @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 checkEmailClientSupportWithHttpInfo(CheckEmailClientSupportOptions checkEmailClientSupportOptions) throws ApiException {
okhttp3.Call localVarCall = checkEmailClientSupportValidateBeforeCall(checkEmailClientSupportOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Show which email programs and devices support the features used in an email body. (asynchronously)
* Evaluate the features used in an email body and return a report of email client support across different platforms and versions.
* @param checkEmailClientSupportOptions (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 checkEmailClientSupportAsync(CheckEmailClientSupportOptions checkEmailClientSupportOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = checkEmailClientSupportValidateBeforeCall(checkEmailClientSupportOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteAllEmails
* @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 deleteAllEmailsCall(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/emails";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteAllEmailsValidateBeforeCall(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteAllEmailsCall(_callback);
return localVarCall;
}
/**
* Delete all emails in all inboxes.
* Deletes all emails in your account. Be careful as emails cannot be recovered
* @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 deleteAllEmails() throws ApiException {
deleteAllEmailsWithHttpInfo();
}
/**
* Delete all emails in all inboxes.
* Deletes all emails in your account. Be careful as emails cannot be recovered
* @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 deleteAllEmailsWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = deleteAllEmailsValidateBeforeCall(null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete all emails in all inboxes. (asynchronously)
* Deletes all emails in your account. Be careful as emails cannot be recovered
* @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
204
No Content
-
*/
public okhttp3.Call deleteAllEmailsAsync(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteAllEmailsValidateBeforeCall(_callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for deleteEmail
* @param emailId ID of email to delete (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
204
No Content
-
*/
public okhttp3.Call deleteEmailCall(UUID emailId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/emails/{emailId}"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteEmailValidateBeforeCall(UUID emailId, 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 deleteEmail(Async)");
}
okhttp3.Call localVarCall = deleteEmailCall(emailId, _callback);
return localVarCall;
}
/**
* Delete an email
* Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
* @param emailId ID of email to delete (required)
* @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 deleteEmail(UUID emailId) throws ApiException {
deleteEmailWithHttpInfo(emailId);
}
/**
* Delete an email
* Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
* @param emailId ID of email to delete (required)
* @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 deleteEmailWithHttpInfo(UUID emailId) throws ApiException {
okhttp3.Call localVarCall = deleteEmailValidateBeforeCall(emailId, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete an email (asynchronously)
* Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
* @param emailId ID of email to delete (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
204
No Content
-
*/
public okhttp3.Call deleteEmailAsync(UUID emailId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteEmailValidateBeforeCall(emailId, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for downloadAttachment
* @param emailId ID of email (required)
* @param attachmentId ID of attachment (required)
* @param apiKey Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (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
0
default response
-
*/
public okhttp3.Call downloadAttachmentCall(UUID emailId, String attachmentId, String apiKey, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/emails/{emailId}/attachments/{attachmentId}"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()))
.replaceAll("\\{" + "attachmentId" + "\\}", localVarApiClient.escapeString(attachmentId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (apiKey != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("apiKey", apiKey));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/octet-stream"
};
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call downloadAttachmentValidateBeforeCall(UUID emailId, String attachmentId, String apiKey, 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 downloadAttachment(Async)");
}
// verify the required parameter 'attachmentId' is set
if (attachmentId == null) {
throw new ApiException("Missing the required parameter 'attachmentId' when calling downloadAttachment(Async)");
}
okhttp3.Call localVarCall = downloadAttachmentCall(emailId, attachmentId, apiKey, _callback);
return localVarCall;
}
/**
* Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string.
* Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
* @param emailId ID of email (required)
* @param attachmentId ID of attachment (required)
* @param apiKey Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional)
* @return byte[]
* @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
0
default response
-
*/
public byte[] downloadAttachment(UUID emailId, String attachmentId, String apiKey) throws ApiException {
ApiResponse localVarResp = downloadAttachmentWithHttpInfo(emailId, attachmentId, apiKey);
return localVarResp.getData();
}
/**
* Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string.
* Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
* @param emailId ID of email (required)
* @param attachmentId ID of attachment (required)
* @param apiKey Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional)
* @return ApiResponse<byte[]>
* @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
0
default response
-
*/
public ApiResponse downloadAttachmentWithHttpInfo(UUID emailId, String attachmentId, String apiKey) throws ApiException {
okhttp3.Call localVarCall = downloadAttachmentValidateBeforeCall(emailId, attachmentId, apiKey, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. (asynchronously)
* Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
* @param emailId ID of email (required)
* @param attachmentId ID of attachment (required)
* @param apiKey Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (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
0
default response
-
*/
public okhttp3.Call downloadAttachmentAsync(UUID emailId, String attachmentId, String apiKey, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = downloadAttachmentValidateBeforeCall(emailId, attachmentId, apiKey, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for downloadAttachmentBase64
* @param emailId ID of email (required)
* @param attachmentId ID of attachment (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 downloadAttachmentBase64Call(UUID emailId, String attachmentId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/emails/{emailId}/attachments/{attachmentId}/base64"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()))
.replaceAll("\\{" + "attachmentId" + "\\}", localVarApiClient.escapeString(attachmentId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call downloadAttachmentBase64ValidateBeforeCall(UUID emailId, String attachmentId, 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 downloadAttachmentBase64(Async)");
}
// verify the required parameter 'attachmentId' is set
if (attachmentId == null) {
throw new ApiException("Missing the required parameter 'attachmentId' when calling downloadAttachmentBase64(Async)");
}
okhttp3.Call localVarCall = downloadAttachmentBase64Call(emailId, attachmentId, _callback);
return localVarCall;
}
/**
* Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`.
* Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses.
* @param emailId ID of email (required)
* @param attachmentId ID of attachment (required)
* @return DownloadAttachmentDto
* @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 DownloadAttachmentDto downloadAttachmentBase64(UUID emailId, String attachmentId) throws ApiException {
ApiResponse localVarResp = downloadAttachmentBase64WithHttpInfo(emailId, attachmentId);
return localVarResp.getData();
}
/**
* Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`.
* Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses.
* @param emailId ID of email (required)
* @param attachmentId ID of attachment (required)
* @return ApiResponse<DownloadAttachmentDto>
* @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 downloadAttachmentBase64WithHttpInfo(UUID emailId, String attachmentId) throws ApiException {
okhttp3.Call localVarCall = downloadAttachmentBase64ValidateBeforeCall(emailId, attachmentId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. (asynchronously)
* Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses.
* @param emailId ID of email (required)
* @param attachmentId ID of attachment (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 downloadAttachmentBase64Async(UUID emailId, String attachmentId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = downloadAttachmentBase64ValidateBeforeCall(emailId, attachmentId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for downloadBody
* @param emailId ID of email (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 downloadBodyCall(UUID emailId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/emails/{emailId}/body"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain", "text/html"
};
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call downloadBodyValidateBeforeCall(UUID emailId, 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 downloadBody(Async)");
}
okhttp3.Call localVarCall = downloadBodyCall(emailId, _callback);
return localVarCall;
}
/**
* Get email body as string. Returned as `plain/text` with content type header.
* Returns the specified email body for a given email as a string
* @param emailId ID of email (required)
* @return String
* @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 String downloadBody(UUID emailId) throws ApiException {
ApiResponse localVarResp = downloadBodyWithHttpInfo(emailId);
return localVarResp.getData();
}
/**
* Get email body as string. Returned as `plain/text` with content type header.
* Returns the specified email body for a given email as a string
* @param emailId ID of email (required)
* @return ApiResponse<String>
* @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 downloadBodyWithHttpInfo(UUID emailId) throws ApiException {
okhttp3.Call localVarCall = downloadBodyValidateBeforeCall(emailId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get email body as string. Returned as `plain/text` with content type header. (asynchronously)
* Returns the specified email body for a given email as a string
* @param emailId ID of email (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 downloadBodyAsync(UUID emailId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = downloadBodyValidateBeforeCall(emailId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for downloadBodyBytes
* @param emailId ID of email (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
0
default response
-
*/
public okhttp3.Call downloadBodyBytesCall(UUID emailId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/emails/{emailId}/body-bytes"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/octet-stream"
};
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call downloadBodyBytesValidateBeforeCall(UUID emailId, 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 downloadBodyBytes(Async)");
}
okhttp3.Call localVarCall = downloadBodyBytesCall(emailId, _callback);
return localVarCall;
}
/**
* Get email body in bytes. Returned as `octet-stream` with content type header.
* Returns the specified email body for a given email as a stream / array of bytes.
* @param emailId ID of email (required)
* @return byte[]
* @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
0
default response
-
*/
public byte[] downloadBodyBytes(UUID emailId) throws ApiException {
ApiResponse localVarResp = downloadBodyBytesWithHttpInfo(emailId);
return localVarResp.getData();
}
/**
* Get email body in bytes. Returned as `octet-stream` with content type header.
* Returns the specified email body for a given email as a stream / array of bytes.
* @param emailId ID of email (required)
* @return ApiResponse<byte[]>
* @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
0
default response
-
*/
public ApiResponse downloadBodyBytesWithHttpInfo(UUID emailId) throws ApiException {
okhttp3.Call localVarCall = downloadBodyBytesValidateBeforeCall(emailId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get email body in bytes. Returned as `octet-stream` with content type header. (asynchronously)
* Returns the specified email body for a given email as a stream / array of bytes.
* @param emailId ID of email (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
0
default response
-
*/
public okhttp3.Call downloadBodyBytesAsync(UUID emailId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = downloadBodyBytesValidateBeforeCall(emailId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for forwardEmail
* @param emailId ID of email (required)
* @param forwardEmailOptions (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
201
Created
-
*/
public okhttp3.Call forwardEmailCall(UUID emailId, ForwardEmailOptions forwardEmailOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = forwardEmailOptions;
// create path and map variables
String localVarPath = "/emails/{emailId}/forward"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
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 forwardEmailValidateBeforeCall(UUID emailId, ForwardEmailOptions forwardEmailOptions, 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 forwardEmail(Async)");
}
// verify the required parameter 'forwardEmailOptions' is set
if (forwardEmailOptions == null) {
throw new ApiException("Missing the required parameter 'forwardEmailOptions' when calling forwardEmail(Async)");
}
okhttp3.Call localVarCall = forwardEmailCall(emailId, forwardEmailOptions, _callback);
return localVarCall;
}
/**
* Forward email to recipients
* Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.
* @param emailId ID of email (required)
* @param forwardEmailOptions (required)
* @return SentEmailDto
* @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
201
Created
-
*/
public SentEmailDto forwardEmail(UUID emailId, ForwardEmailOptions forwardEmailOptions) throws ApiException {
ApiResponse localVarResp = forwardEmailWithHttpInfo(emailId, forwardEmailOptions);
return localVarResp.getData();
}
/**
* Forward email to recipients
* Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.
* @param emailId ID of email (required)
* @param forwardEmailOptions (required)
* @return ApiResponse<SentEmailDto>
* @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
201
Created
-
*/
public ApiResponse forwardEmailWithHttpInfo(UUID emailId, ForwardEmailOptions forwardEmailOptions) throws ApiException {
okhttp3.Call localVarCall = forwardEmailValidateBeforeCall(emailId, forwardEmailOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Forward email to recipients (asynchronously)
* Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.
* @param emailId ID of email (required)
* @param forwardEmailOptions (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
201
Created
-
*/
public okhttp3.Call forwardEmailAsync(UUID emailId, ForwardEmailOptions forwardEmailOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = forwardEmailValidateBeforeCall(emailId, forwardEmailOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getAttachmentMetaData
* @param emailId ID of email (required)
* @param attachmentId ID of attachment (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 getAttachmentMetaDataCall(UUID emailId, String attachmentId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/emails/{emailId}/attachments/{attachmentId}/metadata"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()))
.replaceAll("\\{" + "attachmentId" + "\\}", localVarApiClient.escapeString(attachmentId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getAttachmentMetaDataValidateBeforeCall(UUID emailId, String attachmentId, 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 getAttachmentMetaData(Async)");
}
// verify the required parameter 'attachmentId' is set
if (attachmentId == null) {
throw new ApiException("Missing the required parameter 'attachmentId' when calling getAttachmentMetaData(Async)");
}
okhttp3.Call localVarCall = getAttachmentMetaDataCall(emailId, attachmentId, _callback);
return localVarCall;
}
/**
* Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods.
* Returns the metadata such as name and content-type for a given attachment and email.
* @param emailId ID of email (required)
* @param attachmentId ID of attachment (required)
* @return AttachmentMetaData
* @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 AttachmentMetaData getAttachmentMetaData(UUID emailId, String attachmentId) throws ApiException {
ApiResponse localVarResp = getAttachmentMetaDataWithHttpInfo(emailId, attachmentId);
return localVarResp.getData();
}
/**
* Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods.
* Returns the metadata such as name and content-type for a given attachment and email.
* @param emailId ID of email (required)
* @param attachmentId ID of attachment (required)
* @return ApiResponse<AttachmentMetaData>
* @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 getAttachmentMetaDataWithHttpInfo(UUID emailId, String attachmentId) throws ApiException {
okhttp3.Call localVarCall = getAttachmentMetaDataValidateBeforeCall(emailId, attachmentId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. (asynchronously)
* Returns the metadata such as name and content-type for a given attachment and email.
* @param emailId ID of email (required)
* @param attachmentId ID of attachment (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 getAttachmentMetaDataAsync(UUID emailId, String attachmentId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getAttachmentMetaDataValidateBeforeCall(emailId, attachmentId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getEmail
* @param emailId (required)
* @param decode Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional, default to false)
* @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 getEmailCall(UUID emailId, Boolean decode, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/emails/{emailId}"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (decode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("decode", decode));
}
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getEmailValidateBeforeCall(UUID emailId, Boolean decode, 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 getEmail(Async)");
}
okhttp3.Call localVarCall = getEmailCall(emailId, decode, _callback);
return localVarCall;
}
/**
* Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.
* Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
* @param emailId (required)
* @param decode Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional, default to false)
* @return Email
* @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 Email getEmail(UUID emailId, Boolean decode) throws ApiException {
ApiResponse localVarResp = getEmailWithHttpInfo(emailId, decode);
return localVarResp.getData();
}
/**
* Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.
* Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
* @param emailId (required)
* @param decode Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional, default to false)
* @return ApiResponse<Email>
* @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 getEmailWithHttpInfo(UUID emailId, Boolean decode) throws ApiException {
okhttp3.Call localVarCall = getEmailValidateBeforeCall(emailId, decode, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. (asynchronously)
* Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
* @param emailId (required)
* @param decode Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional, default to false)
* @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 getEmailAsync(UUID emailId, Boolean decode, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getEmailValidateBeforeCall(emailId, decode, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getEmailAttachments
* @param emailId ID of email (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 getEmailAttachmentsCall(UUID emailId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/emails/{emailId}/attachments"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getEmailAttachmentsValidateBeforeCall(UUID emailId, 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 getEmailAttachments(Async)");
}
okhttp3.Call localVarCall = getEmailAttachmentsCall(emailId, _callback);
return localVarCall;
}
/**
* Get all email attachment metadata. Metadata includes name and size of attachments.
* Returns an array of attachment metadata such as name and content-type for a given email if present.
* @param emailId ID of email (required)
* @return List<AttachmentMetaData>
* @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 List getEmailAttachments(UUID emailId) throws ApiException {
ApiResponse> localVarResp = getEmailAttachmentsWithHttpInfo(emailId);
return localVarResp.getData();
}
/**
* Get all email attachment metadata. Metadata includes name and size of attachments.
* Returns an array of attachment metadata such as name and content-type for a given email if present.
* @param emailId ID of email (required)
* @return ApiResponse<List<AttachmentMetaData>>
* @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> getEmailAttachmentsWithHttpInfo(UUID emailId) throws ApiException {
okhttp3.Call localVarCall = getEmailAttachmentsValidateBeforeCall(emailId, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get all email attachment metadata. Metadata includes name and size of attachments. (asynchronously)
* Returns an array of attachment metadata such as name and content-type for a given email if present.
* @param emailId ID of email (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 getEmailAttachmentsAsync(UUID emailId, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getEmailAttachmentsValidateBeforeCall(emailId, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getEmailContentMatch
* @param emailId ID of email to match against (required)
* @param contentMatchOptions (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 getEmailContentMatchCall(UUID emailId, ContentMatchOptions contentMatchOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = contentMatchOptions;
// create path and map variables
String localVarPath = "/emails/{emailId}/contentMatch"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
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 getEmailContentMatchValidateBeforeCall(UUID emailId, ContentMatchOptions contentMatchOptions, 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 getEmailContentMatch(Async)");
}
// verify the required parameter 'contentMatchOptions' is set
if (contentMatchOptions == null) {
throw new ApiException("Missing the required parameter 'contentMatchOptions' when calling getEmailContentMatch(Async)");
}
okhttp3.Call localVarCall = getEmailContentMatchCall(emailId, contentMatchOptions, _callback);
return localVarCall;
}
/**
* Get email content regex pattern match results. Runs regex against email body and returns match groups.
* Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
* @param emailId ID of email to match against (required)
* @param contentMatchOptions (required)
* @return EmailContentMatchResult
* @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 EmailContentMatchResult getEmailContentMatch(UUID emailId, ContentMatchOptions contentMatchOptions) throws ApiException {
ApiResponse localVarResp = getEmailContentMatchWithHttpInfo(emailId, contentMatchOptions);
return localVarResp.getData();
}
/**
* Get email content regex pattern match results. Runs regex against email body and returns match groups.
* Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
* @param emailId ID of email to match against (required)
* @param contentMatchOptions (required)
* @return ApiResponse<EmailContentMatchResult>
* @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 getEmailContentMatchWithHttpInfo(UUID emailId, ContentMatchOptions contentMatchOptions) throws ApiException {
okhttp3.Call localVarCall = getEmailContentMatchValidateBeforeCall(emailId, contentMatchOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get email content regex pattern match results. Runs regex against email body and returns match groups. (asynchronously)
* Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
* @param emailId ID of email to match against (required)
* @param contentMatchOptions (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 getEmailContentMatchAsync(UUID emailId, ContentMatchOptions contentMatchOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getEmailContentMatchValidateBeforeCall(emailId, contentMatchOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getEmailContentPart
* @param emailId ID of email to match against (required)
* @param contentType Content type (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 getEmailContentPartCall(UUID emailId, String contentType, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/emails/{emailId}/contentPart"
.replaceAll("\\{" + "emailId" + "\\}", localVarApiClient.escapeString(emailId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (contentType != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("contentType", contentType));
}
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getEmailContentPartValidateBeforeCall(UUID emailId, String contentType, 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 getEmailContentPart(Async)");
}
// verify the required parameter 'contentType' is set
if (contentType == null) {
throw new ApiException("Missing the required parameter 'contentType' when calling getEmailContentPart(Async)");
}
okhttp3.Call localVarCall = getEmailContentPartCall(emailId, contentType, _callback);
return localVarCall;
}
/**
* Get email content part by content type
* Get email body content parts from a multipart email message for a given content type
* @param emailId ID of email to match against (required)
* @param contentType Content type (required)
* @return EmailContentPartResult
* @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 EmailContentPartResult getEmailContentPart(UUID emailId, String contentType) throws ApiException {
ApiResponse localVarResp = getEmailContentPartWithHttpInfo(emailId, contentType);
return localVarResp.getData();
}
/**
* Get email content part by content type
* Get email body content parts from a multipart email message for a given content type
* @param emailId ID of email to match against (required)
* @param contentType Content type (required)
* @return ApiResponse<EmailContentPartResult>
* @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 getEmailContentPartWithHttpInfo(UUID emailId, String contentType) throws ApiException {
okhttp3.Call localVarCall = getEmailContentPartValidateBeforeCall(emailId, contentType, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get email content part by content type (asynchronously)
* Get email body content parts from a multipart email message for a given content type
* @param emailId ID of email to match against (required)
* @param contentType Content type (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 getEmailContentPartAsync(UUID emailId, String contentType, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getEmailContentPartValidateBeforeCall(emailId, contentType, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getEmailCount
* @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