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.
package io.logicdrop.openapi.jersey.api;
import io.logicdrop.openapi.jersey.ApiException;
import io.logicdrop.openapi.jersey.ApiClient;
import io.logicdrop.openapi.jersey.ApiResponse;
import io.logicdrop.openapi.jersey.Configuration;
import io.logicdrop.openapi.jersey.Pair;
import javax.ws.rs.core.GenericType;
import io.logicdrop.openapi.models.EmailMessage;
import io.logicdrop.openapi.models.EmailResult;
import io.logicdrop.openapi.models.EmailWithAttachment;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class EmailServicesApi {
private ApiClient apiClient;
public EmailServicesApi() {
this(Configuration.getDefaultApiClient());
}
public EmailServicesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Send email
* Send an email
* @param client Client name (required)
* @param emailMessage Email payload (required)
* @return EmailResult
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Email result
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public EmailResult sendEmail(String client, EmailMessage emailMessage) throws ApiException {
return sendEmailWithHttpInfo(client, emailMessage).getData();
}
/**
* Send email
* Send an email
* @param client Client name (required)
* @param emailMessage Email payload (required)
* @return ApiResponse<EmailResult>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Email result
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ApiResponse sendEmailWithHttpInfo(String client, EmailMessage emailMessage) throws ApiException {
Object localVarPostBody = emailMessage;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling sendEmail");
}
// verify the required parameter 'emailMessage' is set
if (emailMessage == null) {
throw new ApiException(400, "Missing the required parameter 'emailMessage' when calling sendEmail");
}
// create path and map variables
String localVarPath = "/email/{client}"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("EmailServicesApi.sendEmail", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Send email with attachments
* Send an email with an attachment
* @param client Client name (required)
* @param emailWithAttachment Email with attachment (required)
* @return EmailResult
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Email result
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public EmailResult sendWithAttachment(String client, EmailWithAttachment emailWithAttachment) throws ApiException {
return sendWithAttachmentWithHttpInfo(client, emailWithAttachment).getData();
}
/**
* Send email with attachments
* Send an email with an attachment
* @param client Client name (required)
* @param emailWithAttachment Email with attachment (required)
* @return ApiResponse<EmailResult>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Email result
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not found
-
500
Backend Error
-
*/
public ApiResponse sendWithAttachmentWithHttpInfo(String client, EmailWithAttachment emailWithAttachment) throws ApiException {
Object localVarPostBody = emailWithAttachment;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling sendWithAttachment");
}
// verify the required parameter 'emailWithAttachment' is set
if (emailWithAttachment == null) {
throw new ApiException(400, "Missing the required parameter 'emailWithAttachment' when calling sendWithAttachment");
}
// create path and map variables
String localVarPath = "/email/{client}/send"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("EmailServicesApi.sendWithAttachment", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}