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.ExpirationDefaults;
import com.mailslurp.models.ExpiredInboxDto;
import java.time.OffsetDateTime;
import com.mailslurp.models.PageExpiredInboxRecordProjection;
import java.util.UUID;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ExpiredControllerApi {
private ApiClient localVarApiClient;
public ExpiredControllerApi() {
this(Configuration.getDefaultApiClient());
}
public ExpiredControllerApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for getExpirationDefaults
* @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 getExpirationDefaultsCall(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/expired/defaults";
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 getExpirationDefaultsValidateBeforeCall(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getExpirationDefaultsCall(_callback);
return localVarCall;
}
/**
* Get default expiration settings
* Return default times used for inbox expiration
* @return ExpirationDefaults
* @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 ExpirationDefaults getExpirationDefaults() throws ApiException {
ApiResponse localVarResp = getExpirationDefaultsWithHttpInfo();
return localVarResp.getData();
}
/**
* Get default expiration settings
* Return default times used for inbox expiration
* @return ApiResponse<ExpirationDefaults>
* @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 getExpirationDefaultsWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getExpirationDefaultsValidateBeforeCall(null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get default expiration settings (asynchronously)
* Return default times used for inbox expiration
* @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 getExpirationDefaultsAsync(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getExpirationDefaultsValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getExpiredInboxByInboxId
* @param inboxId ID of inbox you want to retrieve (not the inbox ID) (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 getExpiredInboxByInboxIdCall(UUID inboxId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/expired/inbox/{inboxId}"
.replaceAll("\\{" + "inboxId" + "\\}", localVarApiClient.escapeString(inboxId.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 getExpiredInboxByInboxIdValidateBeforeCall(UUID inboxId, 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 getExpiredInboxByInboxId(Async)");
}
okhttp3.Call localVarCall = getExpiredInboxByInboxIdCall(inboxId, _callback);
return localVarCall;
}
/**
* Get expired inbox record for a previously existing inbox
* Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId
* @param inboxId ID of inbox you want to retrieve (not the inbox ID) (required)
* @return ExpiredInboxDto
* @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 ExpiredInboxDto getExpiredInboxByInboxId(UUID inboxId) throws ApiException {
ApiResponse localVarResp = getExpiredInboxByInboxIdWithHttpInfo(inboxId);
return localVarResp.getData();
}
/**
* Get expired inbox record for a previously existing inbox
* Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId
* @param inboxId ID of inbox you want to retrieve (not the inbox ID) (required)
* @return ApiResponse<ExpiredInboxDto>
* @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 getExpiredInboxByInboxIdWithHttpInfo(UUID inboxId) throws ApiException {
okhttp3.Call localVarCall = getExpiredInboxByInboxIdValidateBeforeCall(inboxId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get expired inbox record for a previously existing inbox (asynchronously)
* Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId
* @param inboxId ID of inbox you want to retrieve (not the inbox ID) (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 getExpiredInboxByInboxIdAsync(UUID inboxId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getExpiredInboxByInboxIdValidateBeforeCall(inboxId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getExpiredInboxRecord
* @param expiredId ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId (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 getExpiredInboxRecordCall(UUID expiredId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/expired/{expiredId}"
.replaceAll("\\{" + "expiredId" + "\\}", localVarApiClient.escapeString(expiredId.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 getExpiredInboxRecordValidateBeforeCall(UUID expiredId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'expiredId' is set
if (expiredId == null) {
throw new ApiException("Missing the required parameter 'expiredId' when calling getExpiredInboxRecord(Async)");
}
okhttp3.Call localVarCall = getExpiredInboxRecordCall(expiredId, _callback);
return localVarCall;
}
/**
* Get an expired inbox record
* Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
* @param expiredId ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId (required)
* @return ExpiredInboxDto
* @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 ExpiredInboxDto getExpiredInboxRecord(UUID expiredId) throws ApiException {
ApiResponse localVarResp = getExpiredInboxRecordWithHttpInfo(expiredId);
return localVarResp.getData();
}
/**
* Get an expired inbox record
* Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
* @param expiredId ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId (required)
* @return ApiResponse<ExpiredInboxDto>
* @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 getExpiredInboxRecordWithHttpInfo(UUID expiredId) throws ApiException {
okhttp3.Call localVarCall = getExpiredInboxRecordValidateBeforeCall(expiredId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get an expired inbox record (asynchronously)
* Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
* @param expiredId ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId (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 getExpiredInboxRecordAsync(UUID expiredId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getExpiredInboxRecordValidateBeforeCall(expiredId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getExpiredInboxes
* @param page Optional page index in inbox sent email list pagination (optional, default to 0)
* @param size Optional page size in inbox sent email 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 getExpiredInboxesCall(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 = "/expired";
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 getExpiredInboxesValidateBeforeCall(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getExpiredInboxesCall(page, size, sort, since, before, _callback);
return localVarCall;
}
/**
* List records of expired inboxes
* Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
* @param page Optional page index in inbox sent email list pagination (optional, default to 0)
* @param size Optional page size in inbox sent email 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 PageExpiredInboxRecordProjection
* @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 PageExpiredInboxRecordProjection getExpiredInboxes(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException {
ApiResponse localVarResp = getExpiredInboxesWithHttpInfo(page, size, sort, since, before);
return localVarResp.getData();
}
/**
* List records of expired inboxes
* Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
* @param page Optional page index in inbox sent email list pagination (optional, default to 0)
* @param size Optional page size in inbox sent email 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<PageExpiredInboxRecordProjection>
* @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 getExpiredInboxesWithHttpInfo(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException {
okhttp3.Call localVarCall = getExpiredInboxesValidateBeforeCall(page, size, sort, since, before, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* List records of expired inboxes (asynchronously)
* Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
* @param page Optional page index in inbox sent email list pagination (optional, default to 0)
* @param size Optional page size in inbox sent email 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 getExpiredInboxesAsync(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getExpiredInboxesValidateBeforeCall(page, size, sort, since, before, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}