@@ -145,22 +145,25 @@ private com.squareup.okhttp.Call convertDocumentValidateBeforeCall(ConvertDocume
145145 * Converts specified input document to format specified in the convertSettings with specified options
146146 *
147147 * @param request The request model
148+ * @return List<StoredConvertedResult>
148149 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
149150 */
150- public void convertDocument (ConvertDocumentRequest request ) throws ApiException {
151- convertDocumentWithHttpInfo (request );
151+ public List <StoredConvertedResult > convertDocument (ConvertDocumentRequest request ) throws ApiException {
152+ ApiResponse <List <StoredConvertedResult >> resp = convertDocumentWithHttpInfo (request );
153+ return resp .getData ();
152154 }
153155
154156 /**
155157 * Converts specified input document to format specified in the convertSettings with specified options
156158 *
157159 * @param request The request model
158- * @return ApiResponse<Void >
160+ * @return ApiResponse<List<StoredConvertedResult> >
159161 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
160162 */
161- public ApiResponse <Void > convertDocumentWithHttpInfo (ConvertDocumentRequest request ) throws ApiException {
163+ public ApiResponse <List < StoredConvertedResult > > convertDocumentWithHttpInfo (ConvertDocumentRequest request ) throws ApiException {
162164 com .squareup .okhttp .Call call = convertDocumentValidateBeforeCall (request , null , null );
163- return apiClient .execute (call );
165+ Type localVarReturnType = new TypeToken <List <StoredConvertedResult >>(){}.getType ();
166+ return apiClient .execute (call , localVarReturnType );
164167 }
165168
166169 /**
@@ -196,6 +199,129 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
196199 apiClient .executeAsync (call , callback );
197200 return call ;
198201 }
202+
203+ /**
204+ * Build call for convertDocumentDownload
205+ * @param request The request model
206+ * @param progressListener Progress listener
207+ * @param progressRequestListener Progress request listener
208+ * @return Call to execute
209+ * @throws ApiException If fail to serialize the request body object
210+ */
211+ public com .squareup .okhttp .Call convertDocumentDownloadCall (ConvertDocumentRequest request , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
212+ Object localVarPostBody = request .getconvertSettings ();
213+
214+ // create path and map variables
215+ String localVarPath = "/conversion" ;
216+
217+ List <Pair > localVarQueryParams = new ArrayList <Pair >();
218+ List <Pair > localVarCollectionQueryParams = new ArrayList <Pair >();
219+
220+ Map <String , String > localVarHeaderParams = new HashMap <String , String >();
221+
222+ Map <String , Object > localVarFormParams = new HashMap <String , Object >();
223+
224+ final String [] localVarAccepts = {
225+ "application/json"
226+ };
227+ final String localVarAccept = apiClient .selectHeaderAccept (localVarAccepts );
228+ if (localVarAccept != null ) localVarHeaderParams .put ("Accept" , localVarAccept );
229+
230+ final String [] localVarContentTypes = {
231+ "application/json"
232+ };
233+ final String localVarContentType = apiClient .selectHeaderContentType (localVarContentTypes );
234+ localVarHeaderParams .put ("Content-Type" , localVarContentType );
235+
236+ if (progressListener != null ) {
237+ apiClient .getHttpClient ().networkInterceptors ().add (new com .squareup .okhttp .Interceptor () {
238+ @ Override
239+ public com .squareup .okhttp .Response intercept (com .squareup .okhttp .Interceptor .Chain chain ) throws IOException {
240+ com .squareup .okhttp .Response originalResponse = chain .proceed (chain .request ());
241+ return originalResponse .newBuilder ()
242+ .body (new ProgressResponseBody (originalResponse .body (), progressListener ))
243+ .build ();
244+ }
245+ });
246+ }
247+
248+ String [] localVarAuthNames = new String [] { "JWT" };
249+ return apiClient .buildCall (localVarPath , "POST" , localVarQueryParams , localVarCollectionQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAuthNames , progressRequestListener );
250+ }
251+
252+ @ SuppressWarnings ("rawtypes" )
253+ private com .squareup .okhttp .Call convertDocumentDownloadValidateBeforeCall (ConvertDocumentRequest request , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
254+
255+ // verify the required parameter 'convertSettings' is set
256+ if (request .getconvertSettings () == null ) {
257+ throw new ApiException ("Missing the required parameter 'convertSettings' when calling convertDocument(Async)" );
258+ }
259+
260+
261+ com .squareup .okhttp .Call call = convertDocumentDownloadCall (request , progressListener , progressRequestListener );
262+ return call ;
263+
264+ }
265+
266+ /**
267+ * Converts specified input document to format specified in the convertSettings with specified options and download
268+ *
269+ * @param request The request model
270+ * @return File
271+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
272+ */
273+ public File convertDocumentDownload (ConvertDocumentRequest request ) throws ApiException {
274+ ApiResponse <File > resp = convertDocumentDownloadWithHttpInfo (request );
275+ return resp .getData ();
276+ }
277+
278+ /**
279+ * Converts specified input document to format specified in the convertSettings with specified options and download
280+ *
281+ * @param request The request model
282+ * @return ApiResponse<File>
283+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
284+ */
285+ public ApiResponse <File > convertDocumentDownloadWithHttpInfo (ConvertDocumentRequest request ) throws ApiException {
286+ com .squareup .okhttp .Call call = convertDocumentDownloadValidateBeforeCall (request , null , null );
287+ Type localVarReturnType = new TypeToken <File >(){}.getType ();
288+ return apiClient .execute (call , localVarReturnType );
289+ }
290+
291+ /**
292+ * Converts specified input document to format specified in the convertSettings with specified options (asynchronously) and download
293+ *
294+ * @param request The request model
295+ * @param callback The callback to be executed when the API call finishes
296+ * @return The request call
297+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
298+ */
299+ public com .squareup .okhttp .Call convertDocumentDownloadAsync (ConvertDocumentRequest request , final ApiCallback <Void > callback ) throws ApiException {
300+
301+ ProgressResponseBody .ProgressListener progressListener = null ;
302+ ProgressRequestBody .ProgressRequestListener progressRequestListener = null ;
303+
304+ if (callback != null ) {
305+ progressListener = new ProgressResponseBody .ProgressListener () {
306+ @ Override
307+ public void update (long bytesRead , long contentLength , boolean done ) {
308+ callback .onDownloadProgress (bytesRead , contentLength , done );
309+ }
310+ };
311+
312+ progressRequestListener = new ProgressRequestBody .ProgressRequestListener () {
313+ @ Override
314+ public void onRequestProgress (long bytesWritten , long contentLength , boolean done ) {
315+ callback .onUploadProgress (bytesWritten , contentLength , done );
316+ }
317+ };
318+ }
319+
320+ com .squareup .okhttp .Call call = convertDocumentDownloadValidateBeforeCall (request , progressListener , progressRequestListener );
321+ apiClient .executeAsync (call , callback );
322+ return call ;
323+ }
324+
199325 /**
200326 * Build call for getSupportedConversionTypes
201327 * @param request The request model
@@ -214,8 +340,8 @@ public com.squareup.okhttp.Call getSupportedConversionTypesCall(GetSupportedConv
214340 List <Pair > localVarCollectionQueryParams = new ArrayList <Pair >();
215341 if (request .getFilePath () != null )
216342 localVarQueryParams .addAll (apiClient .parameterToPair ("filePath" , request .getFilePath ()));
217- if (request .getStorage () != null )
218- localVarQueryParams .addAll (apiClient .parameterToPair ("storage " , request .getStorage ()));
343+ if (request .getStorageName () != null )
344+ localVarQueryParams .addAll (apiClient .parameterToPair ("storageName " , request .getStorageName ()));
219345 if (request .getformat () != null )
220346 localVarQueryParams .addAll (apiClient .parameterToPair ("format" , request .getformat ()));
221347
@@ -319,5 +445,6 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
319445 apiClient .executeAsync (call , localVarReturnType , callback );
320446 return call ;
321447 }
448+
322449}
323450
0 commit comments