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.AliasDto;
import com.mailslurp.models.CreateAliasOptions;
import java.time.OffsetDateTime;
import com.mailslurp.models.PageAlias;
import com.mailslurp.models.PageEmailProjection;
import com.mailslurp.models.PageThreadProjection;
import com.mailslurp.models.ReplyToAliasEmailOptions;
import com.mailslurp.models.SendEmailOptions;
import com.mailslurp.models.SentEmailDto;
import com.mailslurp.models.ThreadProjection;
import java.util.UUID;
import com.mailslurp.models.UpdateAliasOptions;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class AliasControllerApi {
private ApiClient localVarApiClient;
public AliasControllerApi() {
this(Configuration.getDefaultApiClient());
}
public AliasControllerApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for createAlias
* @param createAliasOptions (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 createAliasCall(CreateAliasOptions createAliasOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = createAliasOptions;
// create path and map variables
String localVarPath = "/aliases";
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 createAliasValidateBeforeCall(CreateAliasOptions createAliasOptions, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'createAliasOptions' is set
if (createAliasOptions == null) {
throw new ApiException("Missing the required parameter 'createAliasOptions' when calling createAlias(Async)");
}
okhttp3.Call localVarCall = createAliasCall(createAliasOptions, _callback);
return localVarCall;
}
/**
* Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active.
* Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached
* @param createAliasOptions (required)
* @return AliasDto
* @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 AliasDto createAlias(CreateAliasOptions createAliasOptions) throws ApiException {
ApiResponse localVarResp = createAliasWithHttpInfo(createAliasOptions);
return localVarResp.getData();
}
/**
* Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active.
* Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached
* @param createAliasOptions (required)
* @return ApiResponse<AliasDto>
* @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 createAliasWithHttpInfo(CreateAliasOptions createAliasOptions) throws ApiException {
okhttp3.Call localVarCall = createAliasValidateBeforeCall(createAliasOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. (asynchronously)
* Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached
* @param createAliasOptions (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 createAliasAsync(CreateAliasOptions createAliasOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createAliasValidateBeforeCall(createAliasOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteAlias
* @param aliasId (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 deleteAliasCall(UUID aliasId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/aliases/{aliasId}"
.replaceAll("\\{" + "aliasId" + "\\}", localVarApiClient.escapeString(aliasId.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 deleteAliasValidateBeforeCall(UUID aliasId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'aliasId' is set
if (aliasId == null) {
throw new ApiException("Missing the required parameter 'aliasId' when calling deleteAlias(Async)");
}
okhttp3.Call localVarCall = deleteAliasCall(aliasId, _callback);
return localVarCall;
}
/**
* Delete an email alias
*
* @param aliasId (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 deleteAlias(UUID aliasId) throws ApiException {
deleteAliasWithHttpInfo(aliasId);
}
/**
* Delete an email alias
*
* @param aliasId (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 deleteAliasWithHttpInfo(UUID aliasId) throws ApiException {
okhttp3.Call localVarCall = deleteAliasValidateBeforeCall(aliasId, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete an email alias (asynchronously)
*
* @param aliasId (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 deleteAliasAsync(UUID aliasId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteAliasValidateBeforeCall(aliasId, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for getAlias
* @param aliasId (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 getAliasCall(UUID aliasId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/aliases/{aliasId}"
.replaceAll("\\{" + "aliasId" + "\\}", localVarApiClient.escapeString(aliasId.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 getAliasValidateBeforeCall(UUID aliasId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'aliasId' is set
if (aliasId == null) {
throw new ApiException("Missing the required parameter 'aliasId' when calling getAlias(Async)");
}
okhttp3.Call localVarCall = getAliasCall(aliasId, _callback);
return localVarCall;
}
/**
* Get an email alias
* Get an email alias by ID
* @param aliasId (required)
* @return AliasDto
* @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 AliasDto getAlias(UUID aliasId) throws ApiException {
ApiResponse localVarResp = getAliasWithHttpInfo(aliasId);
return localVarResp.getData();
}
/**
* Get an email alias
* Get an email alias by ID
* @param aliasId (required)
* @return ApiResponse<AliasDto>
* @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 getAliasWithHttpInfo(UUID aliasId) throws ApiException {
okhttp3.Call localVarCall = getAliasValidateBeforeCall(aliasId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get an email alias (asynchronously)
* Get an email alias by ID
* @param aliasId (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 getAliasAsync(UUID aliasId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getAliasValidateBeforeCall(aliasId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getAliasEmails
* @param aliasId (required)
* @param page Optional page index alias email list pagination (optional, default to 0)
* @param size Optional page size alias email list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Optional filter by sent after given date time (optional)
* @param before Optional filter by sent before given date time (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 getAliasEmailsCall(UUID aliasId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/aliases/{aliasId}/emails"
.replaceAll("\\{" + "aliasId" + "\\}", localVarApiClient.escapeString(aliasId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (size != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size));
}
if (sort != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort));
}
if (since != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since));
}
if (before != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before));
}
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 getAliasEmailsValidateBeforeCall(UUID aliasId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'aliasId' is set
if (aliasId == null) {
throw new ApiException("Missing the required parameter 'aliasId' when calling getAliasEmails(Async)");
}
okhttp3.Call localVarCall = getAliasEmailsCall(aliasId, page, size, sort, since, before, _callback);
return localVarCall;
}
/**
* Get emails for an alias
* Get paginated emails for an alias by ID
* @param aliasId (required)
* @param page Optional page index alias email list pagination (optional, default to 0)
* @param size Optional page size alias email list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Optional filter by sent after given date time (optional)
* @param before Optional filter by sent before given date time (optional)
* @return PageEmailProjection
* @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 PageEmailProjection getAliasEmails(UUID aliasId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException {
ApiResponse localVarResp = getAliasEmailsWithHttpInfo(aliasId, page, size, sort, since, before);
return localVarResp.getData();
}
/**
* Get emails for an alias
* Get paginated emails for an alias by ID
* @param aliasId (required)
* @param page Optional page index alias email list pagination (optional, default to 0)
* @param size Optional page size alias email list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Optional filter by sent after given date time (optional)
* @param before Optional filter by sent before given date time (optional)
* @return ApiResponse<PageEmailProjection>
* @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 getAliasEmailsWithHttpInfo(UUID aliasId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException {
okhttp3.Call localVarCall = getAliasEmailsValidateBeforeCall(aliasId, page, size, sort, since, before, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get emails for an alias (asynchronously)
* Get paginated emails for an alias by ID
* @param aliasId (required)
* @param page Optional page index alias email list pagination (optional, default to 0)
* @param size Optional page size alias email list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Optional filter by sent after given date time (optional)
* @param before Optional filter by sent before given date time (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 getAliasEmailsAsync(UUID aliasId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getAliasEmailsValidateBeforeCall(aliasId, page, size, sort, since, before, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getAliasThreads
* @param aliasId (required)
* @param page Optional page index in thread list pagination (optional, default to 0)
* @param size Optional page size in thread list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Optional filter by sent after given date time (optional)
* @param before Optional filter by sent before given date time (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 getAliasThreadsCall(UUID aliasId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/aliases/{aliasId}/threads"
.replaceAll("\\{" + "aliasId" + "\\}", localVarApiClient.escapeString(aliasId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (size != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size));
}
if (sort != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort));
}
if (since != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since));
}
if (before != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before));
}
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 getAliasThreadsValidateBeforeCall(UUID aliasId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'aliasId' is set
if (aliasId == null) {
throw new ApiException("Missing the required parameter 'aliasId' when calling getAliasThreads(Async)");
}
okhttp3.Call localVarCall = getAliasThreadsCall(aliasId, page, size, sort, since, before, _callback);
return localVarCall;
}
/**
* Get threads created for an alias
* Returns threads created for an email alias in paginated form
* @param aliasId (required)
* @param page Optional page index in thread list pagination (optional, default to 0)
* @param size Optional page size in thread list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Optional filter by sent after given date time (optional)
* @param before Optional filter by sent before given date time (optional)
* @return PageThreadProjection
* @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 PageThreadProjection getAliasThreads(UUID aliasId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException {
ApiResponse localVarResp = getAliasThreadsWithHttpInfo(aliasId, page, size, sort, since, before);
return localVarResp.getData();
}
/**
* Get threads created for an alias
* Returns threads created for an email alias in paginated form
* @param aliasId (required)
* @param page Optional page index in thread list pagination (optional, default to 0)
* @param size Optional page size in thread list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Optional filter by sent after given date time (optional)
* @param before Optional filter by sent before given date time (optional)
* @return ApiResponse<PageThreadProjection>
* @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 getAliasThreadsWithHttpInfo(UUID aliasId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException {
okhttp3.Call localVarCall = getAliasThreadsValidateBeforeCall(aliasId, page, size, sort, since, before, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get threads created for an alias (asynchronously)
* Returns threads created for an email alias in paginated form
* @param aliasId (required)
* @param page Optional page index in thread list pagination (optional, default to 0)
* @param size Optional page size in thread list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Optional filter by sent after given date time (optional)
* @param before Optional filter by sent before given date time (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 getAliasThreadsAsync(UUID aliasId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getAliasThreadsValidateBeforeCall(aliasId, page, size, sort, since, before, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getAliases
* @param search Optional search term (optional)
* @param page Optional page index in alias list pagination (optional, default to 0)
* @param size Optional page size in alias list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Filter by created at after the given timestamp (optional)
* @param before Filter by created at before the given timestamp (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 getAliasesCall(String search, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/aliases";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (search != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("search", search));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (size != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size));
}
if (sort != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort));
}
if (since != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since));
}
if (before != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before));
}
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 getAliasesValidateBeforeCall(String search, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getAliasesCall(search, page, size, sort, since, before, _callback);
return localVarCall;
}
/**
* Get all email aliases you have created
* Get all email aliases in paginated form
* @param search Optional search term (optional)
* @param page Optional page index in alias list pagination (optional, default to 0)
* @param size Optional page size in alias list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Filter by created at after the given timestamp (optional)
* @param before Filter by created at before the given timestamp (optional)
* @return PageAlias
* @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 PageAlias getAliases(String search, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException {
ApiResponse localVarResp = getAliasesWithHttpInfo(search, page, size, sort, since, before);
return localVarResp.getData();
}
/**
* Get all email aliases you have created
* Get all email aliases in paginated form
* @param search Optional search term (optional)
* @param page Optional page index in alias list pagination (optional, default to 0)
* @param size Optional page size in alias list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Filter by created at after the given timestamp (optional)
* @param before Filter by created at before the given timestamp (optional)
* @return ApiResponse<PageAlias>
* @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 getAliasesWithHttpInfo(String search, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException {
okhttp3.Call localVarCall = getAliasesValidateBeforeCall(search, page, size, sort, since, before, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get all email aliases you have created (asynchronously)
* Get all email aliases in paginated form
* @param search Optional search term (optional)
* @param page Optional page index in alias list pagination (optional, default to 0)
* @param size Optional page size in alias list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Filter by created at after the given timestamp (optional)
* @param before Filter by created at before the given timestamp (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 getAliasesAsync(String search, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getAliasesValidateBeforeCall(search, page, size, sort, since, before, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getThread
* @param threadId (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 getThreadCall(UUID threadId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/aliases/threads/{threadId}"
.replaceAll("\\{" + "threadId" + "\\}", localVarApiClient.escapeString(threadId.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 getThreadValidateBeforeCall(UUID threadId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'threadId' is set
if (threadId == null) {
throw new ApiException("Missing the required parameter 'threadId' when calling getThread(Async)");
}
okhttp3.Call localVarCall = getThreadCall(threadId, _callback);
return localVarCall;
}
/**
* Get a thread
* Return a thread associated with an alias
* @param threadId (required)
* @return ThreadProjection
* @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 ThreadProjection getThread(UUID threadId) throws ApiException {
ApiResponse localVarResp = getThreadWithHttpInfo(threadId);
return localVarResp.getData();
}
/**
* Get a thread
* Return a thread associated with an alias
* @param threadId (required)
* @return ApiResponse<ThreadProjection>
* @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 getThreadWithHttpInfo(UUID threadId) throws ApiException {
okhttp3.Call localVarCall = getThreadValidateBeforeCall(threadId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get a thread (asynchronously)
* Return a thread associated with an alias
* @param threadId (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 getThreadAsync(UUID threadId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getThreadValidateBeforeCall(threadId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getThreadsPaginated
* @param page Optional page index in thread list pagination (optional, default to 0)
* @param size Optional page size in thread list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Optional filter by sent after given date time (optional)
* @param before Optional filter by sent before given date time (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 getThreadsPaginatedCall(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/aliases/threads";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (size != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size));
}
if (sort != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort));
}
if (since != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since));
}
if (before != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before));
}
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 getThreadsPaginatedValidateBeforeCall(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getThreadsPaginatedCall(page, size, sort, since, before, _callback);
return localVarCall;
}
/**
* Get all threads
* Returns threads created for all aliases in paginated form
* @param page Optional page index in thread list pagination (optional, default to 0)
* @param size Optional page size in thread list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Optional filter by sent after given date time (optional)
* @param before Optional filter by sent before given date time (optional)
* @return PageThreadProjection
* @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 PageThreadProjection getThreadsPaginated(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException {
ApiResponse localVarResp = getThreadsPaginatedWithHttpInfo(page, size, sort, since, before);
return localVarResp.getData();
}
/**
* Get all threads
* Returns threads created for all aliases in paginated form
* @param page Optional page index in thread list pagination (optional, default to 0)
* @param size Optional page size in thread list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Optional filter by sent after given date time (optional)
* @param before Optional filter by sent before given date time (optional)
* @return ApiResponse<PageThreadProjection>
* @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 getThreadsPaginatedWithHttpInfo(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException {
okhttp3.Call localVarCall = getThreadsPaginatedValidateBeforeCall(page, size, sort, since, before, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get all threads (asynchronously)
* Returns threads created for all aliases in paginated form
* @param page Optional page index in thread list pagination (optional, default to 0)
* @param size Optional page size in thread list pagination (optional, default to 20)
* @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC)
* @param since Optional filter by sent after given date time (optional)
* @param before Optional filter by sent before given date time (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 getThreadsPaginatedAsync(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getThreadsPaginatedValidateBeforeCall(page, size, sort, since, before, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for replyToAliasEmail
* @param aliasId ID of the alias that email belongs to (required)
* @param emailId ID of the email that should be replied to (required)
* @param replyToAliasEmailOptions (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 replyToAliasEmailCall(UUID aliasId, UUID emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = replyToAliasEmailOptions;
// create path and map variables
String localVarPath = "/aliases/{aliasId}/emails/{emailId}"
.replaceAll("\\{" + "aliasId" + "\\}", localVarApiClient.escapeString(aliasId.toString()))
.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call replyToAliasEmailValidateBeforeCall(UUID aliasId, UUID emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'aliasId' is set
if (aliasId == null) {
throw new ApiException("Missing the required parameter 'aliasId' when calling replyToAliasEmail(Async)");
}
// verify the required parameter 'emailId' is set
if (emailId == null) {
throw new ApiException("Missing the required parameter 'emailId' when calling replyToAliasEmail(Async)");
}
// verify the required parameter 'replyToAliasEmailOptions' is set
if (replyToAliasEmailOptions == null) {
throw new ApiException("Missing the required parameter 'replyToAliasEmailOptions' when calling replyToAliasEmail(Async)");
}
okhttp3.Call localVarCall = replyToAliasEmailCall(aliasId, emailId, replyToAliasEmailOptions, _callback);
return localVarCall;
}
/**
* Reply to an email
* Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
* @param aliasId ID of the alias that email belongs to (required)
* @param emailId ID of the email that should be replied to (required)
* @param replyToAliasEmailOptions (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
200
OK
-
*/
public SentEmailDto replyToAliasEmail(UUID aliasId, UUID emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions) throws ApiException {
ApiResponse localVarResp = replyToAliasEmailWithHttpInfo(aliasId, emailId, replyToAliasEmailOptions);
return localVarResp.getData();
}
/**
* Reply to an email
* Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
* @param aliasId ID of the alias that email belongs to (required)
* @param emailId ID of the email that should be replied to (required)
* @param replyToAliasEmailOptions (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
200
OK
-
*/
public ApiResponse replyToAliasEmailWithHttpInfo(UUID aliasId, UUID emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions) throws ApiException {
okhttp3.Call localVarCall = replyToAliasEmailValidateBeforeCall(aliasId, emailId, replyToAliasEmailOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Reply to an email (asynchronously)
* Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
* @param aliasId ID of the alias that email belongs to (required)
* @param emailId ID of the email that should be replied to (required)
* @param replyToAliasEmailOptions (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 replyToAliasEmailAsync(UUID aliasId, UUID emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = replyToAliasEmailValidateBeforeCall(aliasId, emailId, replyToAliasEmailOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for sendAliasEmail
* @param aliasId (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 sendAliasEmailCall(UUID aliasId, SendEmailOptions sendEmailOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = sendEmailOptions;
// create path and map variables
String localVarPath = "/aliases/{aliasId}/emails"
.replaceAll("\\{" + "aliasId" + "\\}", localVarApiClient.escapeString(aliasId.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 sendAliasEmailValidateBeforeCall(UUID aliasId, SendEmailOptions sendEmailOptions, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'aliasId' is set
if (aliasId == null) {
throw new ApiException("Missing the required parameter 'aliasId' when calling sendAliasEmail(Async)");
}
// verify the required parameter 'sendEmailOptions' is set
if (sendEmailOptions == null) {
throw new ApiException("Missing the required parameter 'sendEmailOptions' when calling sendAliasEmail(Async)");
}
okhttp3.Call localVarCall = sendAliasEmailCall(aliasId, sendEmailOptions, _callback);
return localVarCall;
}
/**
* Send an email from an alias inbox
* Send an email from an alias. Replies to the email will be forwarded to the alias masked email address
* @param aliasId (required)
* @param sendEmailOptions (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
200
OK
-
*/
public SentEmailDto sendAliasEmail(UUID aliasId, SendEmailOptions sendEmailOptions) throws ApiException {
ApiResponse localVarResp = sendAliasEmailWithHttpInfo(aliasId, sendEmailOptions);
return localVarResp.getData();
}
/**
* Send an email from an alias inbox
* Send an email from an alias. Replies to the email will be forwarded to the alias masked email address
* @param aliasId (required)
* @param sendEmailOptions (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
200
OK
-
*/
public ApiResponse sendAliasEmailWithHttpInfo(UUID aliasId, SendEmailOptions sendEmailOptions) throws ApiException {
okhttp3.Call localVarCall = sendAliasEmailValidateBeforeCall(aliasId, sendEmailOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Send an email from an alias inbox (asynchronously)
* Send an email from an alias. Replies to the email will be forwarded to the alias masked email address
* @param aliasId (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 sendAliasEmailAsync(UUID aliasId, SendEmailOptions sendEmailOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = sendAliasEmailValidateBeforeCall(aliasId, sendEmailOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateAlias
* @param aliasId (required)
* @param updateAliasOptions (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
202
Accepted
-
*/
public okhttp3.Call updateAliasCall(UUID aliasId, UpdateAliasOptions updateAliasOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = updateAliasOptions;
// create path and map variables
String localVarPath = "/aliases/{aliasId}"
.replaceAll("\\{" + "aliasId" + "\\}", localVarApiClient.escapeString(aliasId.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateAliasValidateBeforeCall(UUID aliasId, UpdateAliasOptions updateAliasOptions, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'aliasId' is set
if (aliasId == null) {
throw new ApiException("Missing the required parameter 'aliasId' when calling updateAlias(Async)");
}
// verify the required parameter 'updateAliasOptions' is set
if (updateAliasOptions == null) {
throw new ApiException("Missing the required parameter 'updateAliasOptions' when calling updateAlias(Async)");
}
okhttp3.Call localVarCall = updateAliasCall(aliasId, updateAliasOptions, _callback);
return localVarCall;
}
/**
* Update an email alias
*
* @param aliasId (required)
* @param updateAliasOptions (required)
* @return AliasDto
* @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
202
Accepted
-
*/
public AliasDto updateAlias(UUID aliasId, UpdateAliasOptions updateAliasOptions) throws ApiException {
ApiResponse localVarResp = updateAliasWithHttpInfo(aliasId, updateAliasOptions);
return localVarResp.getData();
}
/**
* Update an email alias
*
* @param aliasId (required)
* @param updateAliasOptions (required)
* @return ApiResponse<AliasDto>
* @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
202
Accepted
-
*/
public ApiResponse updateAliasWithHttpInfo(UUID aliasId, UpdateAliasOptions updateAliasOptions) throws ApiException {
okhttp3.Call localVarCall = updateAliasValidateBeforeCall(aliasId, updateAliasOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Update an email alias (asynchronously)
*
* @param aliasId (required)
* @param updateAliasOptions (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
202
Accepted
-
*/
public okhttp3.Call updateAliasAsync(UUID aliasId, UpdateAliasOptions updateAliasOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateAliasValidateBeforeCall(aliasId, updateAliasOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}