|
| 1 | +/* |
| 2 | + * Mailpit API |
| 3 | + * OpenAPI 2.0 documentation for [Mailpit](https://github.com/axllent/mailpit). |
| 4 | + * |
| 5 | + * The version of the OpenAPI document: v1 |
| 6 | + * |
| 7 | + * |
| 8 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 9 | + * https://openapi-generator.tech |
| 10 | + * Do not edit the class manually. |
| 11 | + */ |
| 12 | + |
| 13 | +package software.xdev.mailpit.api; |
| 14 | + |
| 15 | +import com.fasterxml.jackson.core.type.TypeReference; |
| 16 | + |
| 17 | +import software.xdev.mailpit.client.ApiException; |
| 18 | +import software.xdev.mailpit.client.ApiClient; |
| 19 | +import software.xdev.mailpit.client.BaseApi; |
| 20 | +import software.xdev.mailpit.client.Configuration; |
| 21 | +import software.xdev.mailpit.client.Pair; |
| 22 | + |
| 23 | +import software.xdev.mailpit.model.AppInformation; |
| 24 | +import software.xdev.mailpit.model.WebUIConfigurationResponse200Response; |
| 25 | + |
| 26 | + |
| 27 | +import java.util.ArrayList; |
| 28 | +import java.util.Collections; |
| 29 | +import java.util.HashMap; |
| 30 | +import java.util.List; |
| 31 | +import java.util.Locale; |
| 32 | +import java.util.Map; |
| 33 | +import java.util.StringJoiner; |
| 34 | + |
| 35 | +public class ApplicationApi extends BaseApi { |
| 36 | + |
| 37 | + public ApplicationApi() { |
| 38 | + super(Configuration.getDefaultApiClient()); |
| 39 | + } |
| 40 | + |
| 41 | + public ApplicationApi(ApiClient apiClient) { |
| 42 | + super(apiClient); |
| 43 | + } |
| 44 | + |
| 45 | + /** |
| 46 | + * Get application information |
| 47 | + * Returns basic runtime information, message totals and latest release version. |
| 48 | + * @return AppInformation |
| 49 | + * @throws ApiException if fails to make API call |
| 50 | + */ |
| 51 | + public AppInformation appInformation() throws ApiException { |
| 52 | + return this.appInformation(Collections.emptyMap()); |
| 53 | + } |
| 54 | + |
| 55 | + |
| 56 | + /** |
| 57 | + * Get application information |
| 58 | + * Returns basic runtime information, message totals and latest release version. |
| 59 | + * @param additionalHeaders additionalHeaders for this call |
| 60 | + * @return AppInformation |
| 61 | + * @throws ApiException if fails to make API call |
| 62 | + */ |
| 63 | + public AppInformation appInformation(Map<String, String> additionalHeaders) throws ApiException { |
| 64 | + Object localVarPostBody = null; |
| 65 | + |
| 66 | + // create path and map variables |
| 67 | + String localVarPath = "/api/v1/info"; |
| 68 | + |
| 69 | + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); |
| 70 | + String localVarQueryParameterBaseName; |
| 71 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 72 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 73 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 74 | + Map<String, String> localVarCookieParams = new HashMap<String, String>(); |
| 75 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 76 | + |
| 77 | + |
| 78 | + localVarHeaderParams.putAll(additionalHeaders); |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + final String[] localVarAccepts = { |
| 83 | + "application/json" |
| 84 | + }; |
| 85 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 86 | + |
| 87 | + final String[] localVarContentTypes = { |
| 88 | + |
| 89 | + }; |
| 90 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 91 | + |
| 92 | + String[] localVarAuthNames = new String[] { }; |
| 93 | + |
| 94 | + TypeReference<AppInformation> localVarReturnType = new TypeReference<AppInformation>() {}; |
| 95 | + return apiClient.invokeAPI( |
| 96 | + localVarPath, |
| 97 | + "GET", |
| 98 | + localVarQueryParams, |
| 99 | + localVarCollectionQueryParams, |
| 100 | + localVarQueryStringJoiner.toString(), |
| 101 | + localVarPostBody, |
| 102 | + localVarHeaderParams, |
| 103 | + localVarCookieParams, |
| 104 | + localVarFormParams, |
| 105 | + localVarAccept, |
| 106 | + localVarContentType, |
| 107 | + localVarAuthNames, |
| 108 | + localVarReturnType |
| 109 | + ); |
| 110 | + } |
| 111 | + |
| 112 | + /** |
| 113 | + * Get web UI configuration |
| 114 | + * Returns configuration settings for the web UI. Intended for web UI only! |
| 115 | + * @return WebUIConfigurationResponse200Response |
| 116 | + * @throws ApiException if fails to make API call |
| 117 | + */ |
| 118 | + public WebUIConfigurationResponse200Response webUIConfigurationResponse() throws ApiException { |
| 119 | + return this.webUIConfigurationResponse(Collections.emptyMap()); |
| 120 | + } |
| 121 | + |
| 122 | + |
| 123 | + /** |
| 124 | + * Get web UI configuration |
| 125 | + * Returns configuration settings for the web UI. Intended for web UI only! |
| 126 | + * @param additionalHeaders additionalHeaders for this call |
| 127 | + * @return WebUIConfigurationResponse200Response |
| 128 | + * @throws ApiException if fails to make API call |
| 129 | + */ |
| 130 | + public WebUIConfigurationResponse200Response webUIConfigurationResponse(Map<String, String> additionalHeaders) throws ApiException { |
| 131 | + Object localVarPostBody = null; |
| 132 | + |
| 133 | + // create path and map variables |
| 134 | + String localVarPath = "/api/v1/webui"; |
| 135 | + |
| 136 | + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); |
| 137 | + String localVarQueryParameterBaseName; |
| 138 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 139 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 140 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 141 | + Map<String, String> localVarCookieParams = new HashMap<String, String>(); |
| 142 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 143 | + |
| 144 | + |
| 145 | + localVarHeaderParams.putAll(additionalHeaders); |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + final String[] localVarAccepts = { |
| 150 | + "application/json" |
| 151 | + }; |
| 152 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 153 | + |
| 154 | + final String[] localVarContentTypes = { |
| 155 | + |
| 156 | + }; |
| 157 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 158 | + |
| 159 | + String[] localVarAuthNames = new String[] { }; |
| 160 | + |
| 161 | + TypeReference<WebUIConfigurationResponse200Response> localVarReturnType = new TypeReference<WebUIConfigurationResponse200Response>() {}; |
| 162 | + return apiClient.invokeAPI( |
| 163 | + localVarPath, |
| 164 | + "GET", |
| 165 | + localVarQueryParams, |
| 166 | + localVarCollectionQueryParams, |
| 167 | + localVarQueryStringJoiner.toString(), |
| 168 | + localVarPostBody, |
| 169 | + localVarHeaderParams, |
| 170 | + localVarCookieParams, |
| 171 | + localVarFormParams, |
| 172 | + localVarAccept, |
| 173 | + localVarContentType, |
| 174 | + localVarAuthNames, |
| 175 | + localVarReturnType |
| 176 | + ); |
| 177 | + } |
| 178 | + |
| 179 | + @Override |
| 180 | + public <T> T invokeAPI(String url, String method, Object request, TypeReference<T> returnType, Map<String, String> additionalHeaders) throws ApiException { |
| 181 | + String localVarPath = url.replace(apiClient.getBaseURL(), ""); |
| 182 | + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); |
| 183 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 184 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 185 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 186 | + Map<String, String> localVarCookieParams = new HashMap<String, String>(); |
| 187 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 188 | + |
| 189 | + localVarHeaderParams.putAll(additionalHeaders); |
| 190 | + |
| 191 | + final String[] localVarAccepts = { |
| 192 | + "application/json" |
| 193 | + }; |
| 194 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 195 | + |
| 196 | + final String[] localVarContentTypes = { |
| 197 | + |
| 198 | + }; |
| 199 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 200 | + |
| 201 | + String[] localVarAuthNames = new String[] { }; |
| 202 | + |
| 203 | + return apiClient.invokeAPI( |
| 204 | + localVarPath, |
| 205 | + method, |
| 206 | + localVarQueryParams, |
| 207 | + localVarCollectionQueryParams, |
| 208 | + localVarQueryStringJoiner.toString(), |
| 209 | + request, |
| 210 | + localVarHeaderParams, |
| 211 | + localVarCookieParams, |
| 212 | + localVarFormParams, |
| 213 | + localVarAccept, |
| 214 | + localVarContentType, |
| 215 | + localVarAuthNames, |
| 216 | + returnType |
| 217 | + ); |
| 218 | + } |
| 219 | +} |
0 commit comments