All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
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.
io.logicdrop.openapi.jersey.api.OfficeServicesApi Maven / Gradle / Ivy
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 java.io.File;
import io.logicdrop.openapi.models.FileResult;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class OfficeServicesApi {
private ApiClient apiClient;
public OfficeServicesApi() {
this(Configuration.getDefaultApiClient());
}
public OfficeServicesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Upload documents
* Upload documents
* @param client Client name (required)
* @param project Project name (required)
* @param source Source (required)
* @param to Target extensions (required)
* @param unique Unique filename (optional)
* @param file File (optional)
* @return List<FileResult>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 The converted files -
400 Bad request -
401 Unauthorized -
403 Forbidden -
409 Version Conflict -
500 Backend Error -
*/
public List uploadDocuments(String client, String project, String source, String to, String unique, File file) throws ApiException {
return uploadDocumentsWithHttpInfo(client, project, source, to, unique, file).getData();
}
/**
* Upload documents
* Upload documents
* @param client Client name (required)
* @param project Project name (required)
* @param source Source (required)
* @param to Target extensions (required)
* @param unique Unique filename (optional)
* @param file File (optional)
* @return ApiResponse<List<FileResult>>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 The converted files -
400 Bad request -
401 Unauthorized -
403 Forbidden -
409 Version Conflict -
500 Backend Error -
*/
public ApiResponse> uploadDocumentsWithHttpInfo(String client, String project, String source, String to, String unique, File file) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling uploadDocuments");
}
// verify the required parameter 'project' is set
if (project == null) {
throw new ApiException(400, "Missing the required parameter 'project' when calling uploadDocuments");
}
// verify the required parameter 'source' is set
if (source == null) {
throw new ApiException(400, "Missing the required parameter 'source' when calling uploadDocuments");
}
// verify the required parameter 'to' is set
if (to == null) {
throw new ApiException(400, "Missing the required parameter 'to' when calling uploadDocuments");
}
// create path and map variables
String localVarPath = "/office/{client}/{project}/documents/upload"
.replaceAll("\\{" + "client" + "\\}", apiClient.escapeString(client.toString()))
.replaceAll("\\{" + "project" + "\\}", apiClient.escapeString(project.toString()))
.replaceAll("\\{" + "source" + "\\}", apiClient.escapeString(source.toString()))
.replaceAll("\\{" + "to" + "\\}", apiClient.escapeString(to.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "unique", unique));
if (file != null)
localVarFormParams.put("file", file);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"multipart/form-data"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api", "jwt", "oauth2" };
GenericType> localVarReturnType = new GenericType>() {};
return apiClient.invokeAPI("OfficeServicesApi.uploadDocuments", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}