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.DNSLookupOptions;
import com.mailslurp.models.DNSLookupResults;
import com.mailslurp.models.DNSLookupsOptions;
import com.mailslurp.models.DescribeDomainOptions;
import com.mailslurp.models.DescribeMailServerDomainResult;
import com.mailslurp.models.EmailVerificationResult;
import com.mailslurp.models.IPAddressResult;
import com.mailslurp.models.VerifyEmailAddressOptions;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class MailServerControllerApi {
private ApiClient localVarApiClient;
public MailServerControllerApi() {
this(Configuration.getDefaultApiClient());
}
public MailServerControllerApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for describeMailServerDomain
* @param describeDomainOptions (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 describeMailServerDomainCall(DescribeDomainOptions describeDomainOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = describeDomainOptions;
// create path and map variables
String localVarPath = "/mail-server/describe/domain";
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 describeMailServerDomainValidateBeforeCall(DescribeDomainOptions describeDomainOptions, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'describeDomainOptions' is set
if (describeDomainOptions == null) {
throw new ApiException("Missing the required parameter 'describeDomainOptions' when calling describeMailServerDomain(Async)");
}
okhttp3.Call localVarCall = describeMailServerDomainCall(describeDomainOptions, _callback);
return localVarCall;
}
/**
* Get DNS Mail Server records for a domain
*
* @param describeDomainOptions (required)
* @return DescribeMailServerDomainResult
* @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 DescribeMailServerDomainResult describeMailServerDomain(DescribeDomainOptions describeDomainOptions) throws ApiException {
ApiResponse localVarResp = describeMailServerDomainWithHttpInfo(describeDomainOptions);
return localVarResp.getData();
}
/**
* Get DNS Mail Server records for a domain
*
* @param describeDomainOptions (required)
* @return ApiResponse<DescribeMailServerDomainResult>
* @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 describeMailServerDomainWithHttpInfo(DescribeDomainOptions describeDomainOptions) throws ApiException {
okhttp3.Call localVarCall = describeMailServerDomainValidateBeforeCall(describeDomainOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get DNS Mail Server records for a domain (asynchronously)
*
* @param describeDomainOptions (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 describeMailServerDomainAsync(DescribeDomainOptions describeDomainOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = describeMailServerDomainValidateBeforeCall(describeDomainOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getDnsLookup
* @param dnSLookupOptions (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 getDnsLookupCall(DNSLookupOptions dnSLookupOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = dnSLookupOptions;
// create path and map variables
String localVarPath = "/mail-server/describe/dns-lookup";
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 getDnsLookupValidateBeforeCall(DNSLookupOptions dnSLookupOptions, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'dnSLookupOptions' is set
if (dnSLookupOptions == null) {
throw new ApiException("Missing the required parameter 'dnSLookupOptions' when calling getDnsLookup(Async)");
}
okhttp3.Call localVarCall = getDnsLookupCall(dnSLookupOptions, _callback);
return localVarCall;
}
/**
* Lookup DNS records for a domain
*
* @param dnSLookupOptions (required)
* @return DNSLookupResults
* @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 DNSLookupResults getDnsLookup(DNSLookupOptions dnSLookupOptions) throws ApiException {
ApiResponse localVarResp = getDnsLookupWithHttpInfo(dnSLookupOptions);
return localVarResp.getData();
}
/**
* Lookup DNS records for a domain
*
* @param dnSLookupOptions (required)
* @return ApiResponse<DNSLookupResults>
* @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 getDnsLookupWithHttpInfo(DNSLookupOptions dnSLookupOptions) throws ApiException {
okhttp3.Call localVarCall = getDnsLookupValidateBeforeCall(dnSLookupOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Lookup DNS records for a domain (asynchronously)
*
* @param dnSLookupOptions (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 getDnsLookupAsync(DNSLookupOptions dnSLookupOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getDnsLookupValidateBeforeCall(dnSLookupOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getDnsLookups
* @param dnSLookupsOptions (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 getDnsLookupsCall(DNSLookupsOptions dnSLookupsOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = dnSLookupsOptions;
// create path and map variables
String localVarPath = "/mail-server/describe/dns-lookups";
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 getDnsLookupsValidateBeforeCall(DNSLookupsOptions dnSLookupsOptions, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'dnSLookupsOptions' is set
if (dnSLookupsOptions == null) {
throw new ApiException("Missing the required parameter 'dnSLookupsOptions' when calling getDnsLookups(Async)");
}
okhttp3.Call localVarCall = getDnsLookupsCall(dnSLookupsOptions, _callback);
return localVarCall;
}
/**
* Lookup DNS records for multiple domains
*
* @param dnSLookupsOptions (required)
* @return DNSLookupResults
* @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 DNSLookupResults getDnsLookups(DNSLookupsOptions dnSLookupsOptions) throws ApiException {
ApiResponse localVarResp = getDnsLookupsWithHttpInfo(dnSLookupsOptions);
return localVarResp.getData();
}
/**
* Lookup DNS records for multiple domains
*
* @param dnSLookupsOptions (required)
* @return ApiResponse<DNSLookupResults>
* @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 getDnsLookupsWithHttpInfo(DNSLookupsOptions dnSLookupsOptions) throws ApiException {
okhttp3.Call localVarCall = getDnsLookupsValidateBeforeCall(dnSLookupsOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Lookup DNS records for multiple domains (asynchronously)
*
* @param dnSLookupsOptions (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 getDnsLookupsAsync(DNSLookupsOptions dnSLookupsOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getDnsLookupsValidateBeforeCall(dnSLookupsOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getIpAddress
* @param name (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 getIpAddressCall(String name, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/mail-server/describe/ip-address";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (name != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getIpAddressValidateBeforeCall(String name, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling getIpAddress(Async)");
}
okhttp3.Call localVarCall = getIpAddressCall(name, _callback);
return localVarCall;
}
/**
* Get IP address for a domain
*
* @param name (required)
* @return IPAddressResult
* @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 IPAddressResult getIpAddress(String name) throws ApiException {
ApiResponse localVarResp = getIpAddressWithHttpInfo(name);
return localVarResp.getData();
}
/**
* Get IP address for a domain
*
* @param name (required)
* @return ApiResponse<IPAddressResult>
* @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 getIpAddressWithHttpInfo(String name) throws ApiException {
okhttp3.Call localVarCall = getIpAddressValidateBeforeCall(name, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get IP address for a domain (asynchronously)
*
* @param name (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 getIpAddressAsync(String name, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getIpAddressValidateBeforeCall(name, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for verifyEmailAddress
* @param verifyEmailAddressOptions (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
-
* @deprecated
*/
@Deprecated
public okhttp3.Call verifyEmailAddressCall(VerifyEmailAddressOptions verifyEmailAddressOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = verifyEmailAddressOptions;
// create path and map variables
String localVarPath = "/mail-server/verify/email-address";
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);
}
@Deprecated
@SuppressWarnings("rawtypes")
private okhttp3.Call verifyEmailAddressValidateBeforeCall(VerifyEmailAddressOptions verifyEmailAddressOptions, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'verifyEmailAddressOptions' is set
if (verifyEmailAddressOptions == null) {
throw new ApiException("Missing the required parameter 'verifyEmailAddressOptions' when calling verifyEmailAddress(Async)");
}
okhttp3.Call localVarCall = verifyEmailAddressCall(verifyEmailAddressOptions, _callback);
return localVarCall;
}
/**
* Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server.
*
* @param verifyEmailAddressOptions (required)
* @return EmailVerificationResult
* @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
-
* @deprecated
*/
@Deprecated
public EmailVerificationResult verifyEmailAddress(VerifyEmailAddressOptions verifyEmailAddressOptions) throws ApiException {
ApiResponse localVarResp = verifyEmailAddressWithHttpInfo(verifyEmailAddressOptions);
return localVarResp.getData();
}
/**
* Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server.
*
* @param verifyEmailAddressOptions (required)
* @return ApiResponse<EmailVerificationResult>
* @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
-
* @deprecated
*/
@Deprecated
public ApiResponse verifyEmailAddressWithHttpInfo(VerifyEmailAddressOptions verifyEmailAddressOptions) throws ApiException {
okhttp3.Call localVarCall = verifyEmailAddressValidateBeforeCall(verifyEmailAddressOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. (asynchronously)
*
* @param verifyEmailAddressOptions (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
-
* @deprecated
*/
@Deprecated
public okhttp3.Call verifyEmailAddressAsync(VerifyEmailAddressOptions verifyEmailAddressOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = verifyEmailAddressValidateBeforeCall(verifyEmailAddressOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}