All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mailslurp.apis.ConnectorControllerApi Maven / Gradle / Ivy

Go to download

Official MailSlurp email API - create real inboxes then send and receive emails and attachments from tests and code.

The newest version!
/*
 * 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.ConnectorDto;
import com.mailslurp.models.ConnectorImapConnectionDto;
import com.mailslurp.models.ConnectorSmtpConnectionDto;
import com.mailslurp.models.ConnectorSyncEventDto;
import com.mailslurp.models.ConnectorSyncRequestResult;
import com.mailslurp.models.CreateConnectorImapConnectionOptions;
import com.mailslurp.models.CreateConnectorOptions;
import com.mailslurp.models.CreateConnectorSmtpConnectionOptions;
import java.time.OffsetDateTime;
import com.mailslurp.models.PageConnector;
import com.mailslurp.models.PageConnectorSyncEvents;
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 ConnectorControllerApi {
    private ApiClient localVarApiClient;

    public ConnectorControllerApi() {
        this(Configuration.getDefaultApiClient());
    }

    public ConnectorControllerApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    /**
     * Build call for createConnector
     * @param createConnectorOptions  (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 createConnectorCall(CreateConnectorOptions createConnectorOptions, final ApiCallback _callback) throws ApiException { Object localVarPostBody = createConnectorOptions; // create path and map variables String localVarPath = "/connectors"; 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 createConnectorValidateBeforeCall(CreateConnectorOptions createConnectorOptions, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createConnectorOptions' is set if (createConnectorOptions == null) { throw new ApiException("Missing the required parameter 'createConnectorOptions' when calling createConnector(Async)"); } okhttp3.Call localVarCall = createConnectorCall(createConnectorOptions, _callback); return localVarCall; } /** * Create an inbox connector * Sync emails between external mailboxes and MailSlurp inboxes * @param createConnectorOptions (required) * @return ConnectorDto * @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 ConnectorDto createConnector(CreateConnectorOptions createConnectorOptions) throws ApiException { ApiResponse localVarResp = createConnectorWithHttpInfo(createConnectorOptions); return localVarResp.getData(); } /** * Create an inbox connector * Sync emails between external mailboxes and MailSlurp inboxes * @param createConnectorOptions (required) * @return ApiResponse<ConnectorDto> * @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 createConnectorWithHttpInfo(CreateConnectorOptions createConnectorOptions) throws ApiException { okhttp3.Call localVarCall = createConnectorValidateBeforeCall(createConnectorOptions, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create an inbox connector (asynchronously) * Sync emails between external mailboxes and MailSlurp inboxes * @param createConnectorOptions (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 createConnectorAsync(CreateConnectorOptions createConnectorOptions, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createConnectorValidateBeforeCall(createConnectorOptions, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createConnectorImapConnection * @param id (required) * @param createConnectorImapConnectionOptions (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 createConnectorImapConnectionCall(UUID id, CreateConnectorImapConnectionOptions createConnectorImapConnectionOptions, final ApiCallback _callback) throws ApiException { Object localVarPostBody = createConnectorImapConnectionOptions; // create path and map variables String localVarPath = "/connectors/{id}/imap" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.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 createConnectorImapConnectionValidateBeforeCall(UUID id, CreateConnectorImapConnectionOptions createConnectorImapConnectionOptions, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createConnectorImapConnection(Async)"); } // verify the required parameter 'createConnectorImapConnectionOptions' is set if (createConnectorImapConnectionOptions == null) { throw new ApiException("Missing the required parameter 'createConnectorImapConnectionOptions' when calling createConnectorImapConnection(Async)"); } okhttp3.Call localVarCall = createConnectorImapConnectionCall(id, createConnectorImapConnectionOptions, _callback); return localVarCall; } /** * Create an inbox connector IMAP connection * Allows the reading of emails in an external mailbox and syncing to a MailSlurp inbox * @param id (required) * @param createConnectorImapConnectionOptions (required) * @return ConnectorImapConnectionDto * @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 ConnectorImapConnectionDto createConnectorImapConnection(UUID id, CreateConnectorImapConnectionOptions createConnectorImapConnectionOptions) throws ApiException { ApiResponse localVarResp = createConnectorImapConnectionWithHttpInfo(id, createConnectorImapConnectionOptions); return localVarResp.getData(); } /** * Create an inbox connector IMAP connection * Allows the reading of emails in an external mailbox and syncing to a MailSlurp inbox * @param id (required) * @param createConnectorImapConnectionOptions (required) * @return ApiResponse<ConnectorImapConnectionDto> * @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 createConnectorImapConnectionWithHttpInfo(UUID id, CreateConnectorImapConnectionOptions createConnectorImapConnectionOptions) throws ApiException { okhttp3.Call localVarCall = createConnectorImapConnectionValidateBeforeCall(id, createConnectorImapConnectionOptions, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create an inbox connector IMAP connection (asynchronously) * Allows the reading of emails in an external mailbox and syncing to a MailSlurp inbox * @param id (required) * @param createConnectorImapConnectionOptions (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 createConnectorImapConnectionAsync(UUID id, CreateConnectorImapConnectionOptions createConnectorImapConnectionOptions, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createConnectorImapConnectionValidateBeforeCall(id, createConnectorImapConnectionOptions, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createConnectorSmtpConnection * @param id (required) * @param createConnectorSmtpConnectionOptions (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 createConnectorSmtpConnectionCall(UUID id, CreateConnectorSmtpConnectionOptions createConnectorSmtpConnectionOptions, final ApiCallback _callback) throws ApiException { Object localVarPostBody = createConnectorSmtpConnectionOptions; // create path and map variables String localVarPath = "/connectors/{id}/smtp" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.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 createConnectorSmtpConnectionValidateBeforeCall(UUID id, CreateConnectorSmtpConnectionOptions createConnectorSmtpConnectionOptions, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling createConnectorSmtpConnection(Async)"); } // verify the required parameter 'createConnectorSmtpConnectionOptions' is set if (createConnectorSmtpConnectionOptions == null) { throw new ApiException("Missing the required parameter 'createConnectorSmtpConnectionOptions' when calling createConnectorSmtpConnection(Async)"); } okhttp3.Call localVarCall = createConnectorSmtpConnectionCall(id, createConnectorSmtpConnectionOptions, _callback); return localVarCall; } /** * Create an inbox connector SMTP connection * Allows sending via connector and email is routed to connected inbox and sent via SMTP * @param id (required) * @param createConnectorSmtpConnectionOptions (required) * @return ConnectorSmtpConnectionDto * @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 ConnectorSmtpConnectionDto createConnectorSmtpConnection(UUID id, CreateConnectorSmtpConnectionOptions createConnectorSmtpConnectionOptions) throws ApiException { ApiResponse localVarResp = createConnectorSmtpConnectionWithHttpInfo(id, createConnectorSmtpConnectionOptions); return localVarResp.getData(); } /** * Create an inbox connector SMTP connection * Allows sending via connector and email is routed to connected inbox and sent via SMTP * @param id (required) * @param createConnectorSmtpConnectionOptions (required) * @return ApiResponse<ConnectorSmtpConnectionDto> * @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 createConnectorSmtpConnectionWithHttpInfo(UUID id, CreateConnectorSmtpConnectionOptions createConnectorSmtpConnectionOptions) throws ApiException { okhttp3.Call localVarCall = createConnectorSmtpConnectionValidateBeforeCall(id, createConnectorSmtpConnectionOptions, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create an inbox connector SMTP connection (asynchronously) * Allows sending via connector and email is routed to connected inbox and sent via SMTP * @param id (required) * @param createConnectorSmtpConnectionOptions (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 createConnectorSmtpConnectionAsync(UUID id, CreateConnectorSmtpConnectionOptions createConnectorSmtpConnectionOptions, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createConnectorSmtpConnectionValidateBeforeCall(id, createConnectorSmtpConnectionOptions, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteAllConnector * @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 deleteAllConnectorCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/connectors"; 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 deleteAllConnectorValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteAllConnectorCall(_callback); return localVarCall; } /** * Delete all inbox connectors * * @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 deleteAllConnector() throws ApiException { deleteAllConnectorWithHttpInfo(); } /** * Delete all inbox connectors * * @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 deleteAllConnectorWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = deleteAllConnectorValidateBeforeCall(null); return localVarApiClient.execute(localVarCall); } /** * Delete all inbox connectors (asynchronously) * * @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 deleteAllConnectorAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteAllConnectorValidateBeforeCall(_callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteConnector * @param 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
204 No Content -
*/ public okhttp3.Call deleteConnectorCall(UUID id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/connectors/{id}" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.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 deleteConnectorValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteConnector(Async)"); } okhttp3.Call localVarCall = deleteConnectorCall(id, _callback); return localVarCall; } /** * Delete an inbox connector * * @param id (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 deleteConnector(UUID id) throws ApiException { deleteConnectorWithHttpInfo(id); } /** * Delete an inbox connector * * @param id (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 deleteConnectorWithHttpInfo(UUID id) throws ApiException { okhttp3.Call localVarCall = deleteConnectorValidateBeforeCall(id, null); return localVarApiClient.execute(localVarCall); } /** * Delete an inbox connector (asynchronously) * * @param 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
204 No Content -
*/ public okhttp3.Call deleteConnectorAsync(UUID id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteConnectorValidateBeforeCall(id, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteConnectorImapConnection * @param 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
204 No Content -
*/ public okhttp3.Call deleteConnectorImapConnectionCall(UUID id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/connectors/{id}/imap" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.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 deleteConnectorImapConnectionValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteConnectorImapConnection(Async)"); } okhttp3.Call localVarCall = deleteConnectorImapConnectionCall(id, _callback); return localVarCall; } /** * Delete an inbox connector IMAP connection * Delete IMAP connection for external inbox * @param id (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 deleteConnectorImapConnection(UUID id) throws ApiException { deleteConnectorImapConnectionWithHttpInfo(id); } /** * Delete an inbox connector IMAP connection * Delete IMAP connection for external inbox * @param id (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 deleteConnectorImapConnectionWithHttpInfo(UUID id) throws ApiException { okhttp3.Call localVarCall = deleteConnectorImapConnectionValidateBeforeCall(id, null); return localVarApiClient.execute(localVarCall); } /** * Delete an inbox connector IMAP connection (asynchronously) * Delete IMAP connection for external inbox * @param 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
204 No Content -
*/ public okhttp3.Call deleteConnectorImapConnectionAsync(UUID id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteConnectorImapConnectionValidateBeforeCall(id, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteConnectorSmtpConnection * @param 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
204 No Content -
*/ public okhttp3.Call deleteConnectorSmtpConnectionCall(UUID id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/connectors/{id}/smtp" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.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 deleteConnectorSmtpConnectionValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteConnectorSmtpConnection(Async)"); } okhttp3.Call localVarCall = deleteConnectorSmtpConnectionCall(id, _callback); return localVarCall; } /** * Delete an inbox connector SMTP connection * Delete SMTP connection for external inbox * @param id (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 deleteConnectorSmtpConnection(UUID id) throws ApiException { deleteConnectorSmtpConnectionWithHttpInfo(id); } /** * Delete an inbox connector SMTP connection * Delete SMTP connection for external inbox * @param id (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 deleteConnectorSmtpConnectionWithHttpInfo(UUID id) throws ApiException { okhttp3.Call localVarCall = deleteConnectorSmtpConnectionValidateBeforeCall(id, null); return localVarApiClient.execute(localVarCall); } /** * Delete an inbox connector SMTP connection (asynchronously) * Delete SMTP connection for external inbox * @param 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
204 No Content -
*/ public okhttp3.Call deleteConnectorSmtpConnectionAsync(UUID id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteConnectorSmtpConnectionValidateBeforeCall(id, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getAllConnectorSyncEvents * @param page Optional page index in connector list pagination (optional, default to 0) * @param size Optional page size in connector 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 getAllConnectorSyncEventsCall(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 = "/connectors/events"; 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 getAllConnectorSyncEventsValidateBeforeCall(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAllConnectorSyncEventsCall(page, size, sort, since, before, _callback); return localVarCall; } /** * Get all inbox connector sync events * * @param page Optional page index in connector list pagination (optional, default to 0) * @param size Optional page size in connector 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 PageConnectorSyncEvents * @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 PageConnectorSyncEvents getAllConnectorSyncEvents(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException { ApiResponse localVarResp = getAllConnectorSyncEventsWithHttpInfo(page, size, sort, since, before); return localVarResp.getData(); } /** * Get all inbox connector sync events * * @param page Optional page index in connector list pagination (optional, default to 0) * @param size Optional page size in connector 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<PageConnectorSyncEvents> * @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 getAllConnectorSyncEventsWithHttpInfo(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException { okhttp3.Call localVarCall = getAllConnectorSyncEventsValidateBeforeCall(page, size, sort, since, before, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get all inbox connector sync events (asynchronously) * * @param page Optional page index in connector list pagination (optional, default to 0) * @param size Optional page size in connector 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 getAllConnectorSyncEventsAsync(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAllConnectorSyncEventsValidateBeforeCall(page, size, sort, since, before, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getConnector * @param 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 getConnectorCall(UUID id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/connectors/{id}" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.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 getConnectorValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getConnector(Async)"); } okhttp3.Call localVarCall = getConnectorCall(id, _callback); return localVarCall; } /** * Get an inbox connector * * @param id (required) * @return ConnectorDto * @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 ConnectorDto getConnector(UUID id) throws ApiException { ApiResponse localVarResp = getConnectorWithHttpInfo(id); return localVarResp.getData(); } /** * Get an inbox connector * * @param id (required) * @return ApiResponse<ConnectorDto> * @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 getConnectorWithHttpInfo(UUID id) throws ApiException { okhttp3.Call localVarCall = getConnectorValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get an inbox connector (asynchronously) * * @param 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 getConnectorAsync(UUID id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getConnectorValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getConnectorSyncEvent * @param 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 getConnectorSyncEventCall(UUID id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/connectors/events/{id}" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.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 getConnectorSyncEventValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getConnectorSyncEvent(Async)"); } okhttp3.Call localVarCall = getConnectorSyncEventCall(id, _callback); return localVarCall; } /** * Get an inbox connector sync event * * @param id (required) * @return ConnectorSyncEventDto * @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 ConnectorSyncEventDto getConnectorSyncEvent(UUID id) throws ApiException { ApiResponse localVarResp = getConnectorSyncEventWithHttpInfo(id); return localVarResp.getData(); } /** * Get an inbox connector sync event * * @param id (required) * @return ApiResponse<ConnectorSyncEventDto> * @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 getConnectorSyncEventWithHttpInfo(UUID id) throws ApiException { okhttp3.Call localVarCall = getConnectorSyncEventValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get an inbox connector sync event (asynchronously) * * @param 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 getConnectorSyncEventAsync(UUID id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getConnectorSyncEventValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getConnectorSyncEvents * @param id (required) * @param page Optional page index in connector list pagination (optional, default to 0) * @param size Optional page size in connector 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 getConnectorSyncEventsCall(UUID id, 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 = "/connectors/{id}/events" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.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 getConnectorSyncEventsValidateBeforeCall(UUID id, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getConnectorSyncEvents(Async)"); } okhttp3.Call localVarCall = getConnectorSyncEventsCall(id, page, size, sort, since, before, _callback); return localVarCall; } /** * Get an inbox connector sync events * * @param id (required) * @param page Optional page index in connector list pagination (optional, default to 0) * @param size Optional page size in connector 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 PageConnectorSyncEvents * @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 PageConnectorSyncEvents getConnectorSyncEvents(UUID id, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException { ApiResponse localVarResp = getConnectorSyncEventsWithHttpInfo(id, page, size, sort, since, before); return localVarResp.getData(); } /** * Get an inbox connector sync events * * @param id (required) * @param page Optional page index in connector list pagination (optional, default to 0) * @param size Optional page size in connector 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<PageConnectorSyncEvents> * @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 getConnectorSyncEventsWithHttpInfo(UUID id, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException { okhttp3.Call localVarCall = getConnectorSyncEventsValidateBeforeCall(id, page, size, sort, since, before, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get an inbox connector sync events (asynchronously) * * @param id (required) * @param page Optional page index in connector list pagination (optional, default to 0) * @param size Optional page size in connector 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 getConnectorSyncEventsAsync(UUID id, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getConnectorSyncEventsValidateBeforeCall(id, page, size, sort, since, before, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getConnectors * @param page Optional page index in connector list pagination (optional, default to 0) * @param size Optional page size in connector 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 getConnectorsCall(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 = "/connectors"; 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 getConnectorsValidateBeforeCall(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getConnectorsCall(page, size, sort, since, before, _callback); return localVarCall; } /** * Get inbox connectors * List inbox connectors that sync external emails to MailSlurp inboxes * @param page Optional page index in connector list pagination (optional, default to 0) * @param size Optional page size in connector 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 PageConnector * @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 PageConnector getConnectors(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException { ApiResponse localVarResp = getConnectorsWithHttpInfo(page, size, sort, since, before); return localVarResp.getData(); } /** * Get inbox connectors * List inbox connectors that sync external emails to MailSlurp inboxes * @param page Optional page index in connector list pagination (optional, default to 0) * @param size Optional page size in connector 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<PageConnector> * @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 getConnectorsWithHttpInfo(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException { okhttp3.Call localVarCall = getConnectorsValidateBeforeCall(page, size, sort, since, before, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get inbox connectors (asynchronously) * List inbox connectors that sync external emails to MailSlurp inboxes * @param page Optional page index in connector list pagination (optional, default to 0) * @param size Optional page size in connector 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 getConnectorsAsync(Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getConnectorsValidateBeforeCall(page, size, sort, since, before, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for syncConnector * @param 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 syncConnectorCall(UUID id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/connectors/{id}/sync" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "*/*" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "API_KEY" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call syncConnectorValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling syncConnector(Async)"); } okhttp3.Call localVarCall = syncConnectorCall(id, _callback); return localVarCall; } /** * Sync an inbox connector * * @param id (required) * @return ConnectorSyncRequestResult * @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 ConnectorSyncRequestResult syncConnector(UUID id) throws ApiException { ApiResponse localVarResp = syncConnectorWithHttpInfo(id); return localVarResp.getData(); } /** * Sync an inbox connector * * @param id (required) * @return ApiResponse<ConnectorSyncRequestResult> * @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 syncConnectorWithHttpInfo(UUID id) throws ApiException { okhttp3.Call localVarCall = syncConnectorValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Sync an inbox connector (asynchronously) * * @param 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 syncConnectorAsync(UUID id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = syncConnectorValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateConnector * @param id (required) * @param createConnectorOptions (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 updateConnectorCall(UUID id, CreateConnectorOptions createConnectorOptions, final ApiCallback _callback) throws ApiException { Object localVarPostBody = createConnectorOptions; // create path and map variables String localVarPath = "/connectors/{id}" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.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 updateConnectorValidateBeforeCall(UUID id, CreateConnectorOptions createConnectorOptions, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateConnector(Async)"); } // verify the required parameter 'createConnectorOptions' is set if (createConnectorOptions == null) { throw new ApiException("Missing the required parameter 'createConnectorOptions' when calling updateConnector(Async)"); } okhttp3.Call localVarCall = updateConnectorCall(id, createConnectorOptions, _callback); return localVarCall; } /** * Update an inbox connector * * @param id (required) * @param createConnectorOptions (required) * @return ConnectorDto * @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 ConnectorDto updateConnector(UUID id, CreateConnectorOptions createConnectorOptions) throws ApiException { ApiResponse localVarResp = updateConnectorWithHttpInfo(id, createConnectorOptions); return localVarResp.getData(); } /** * Update an inbox connector * * @param id (required) * @param createConnectorOptions (required) * @return ApiResponse<ConnectorDto> * @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 updateConnectorWithHttpInfo(UUID id, CreateConnectorOptions createConnectorOptions) throws ApiException { okhttp3.Call localVarCall = updateConnectorValidateBeforeCall(id, createConnectorOptions, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update an inbox connector (asynchronously) * * @param id (required) * @param createConnectorOptions (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 updateConnectorAsync(UUID id, CreateConnectorOptions createConnectorOptions, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateConnectorValidateBeforeCall(id, createConnectorOptions, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy