@@ -33261,6 +33261,182 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
3326133261 apiClient.executeAsync(call, localVarReturnType, callback);
3326233262 return call;
3326333263 }
33264+ /**
33265+ * Build call for postDocumentPagesRotate
33266+ * @param name The document name. (required)
33267+ * @param rotationAngle Rotation Angle (CKW). Can be 90, 180, 270. (required)
33268+ * @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8) (required)
33269+ * @param storage The document storage. (optional)
33270+ * @param folder The document folder. (optional)
33271+ * @param password Base64 encoded password. (optional)
33272+ * @param progressListener Progress listener
33273+ * @param progressRequestListener Progress request listener
33274+ * @return Call to execute
33275+ * @throws ApiException If fail to serialize the request body object
33276+ */
33277+ public com.squareup.okhttp.Call postDocumentPagesRotateCall(String name, String rotationAngle, String pages, String storage, String folder, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
33278+ Object localVarPostBody = null;
33279+
33280+ // create path and map variables
33281+ String localVarPath = "/pdf/{name}/rotate"
33282+ .replaceAll("\\{" + "name" + "\\}", apiClient.escapePathSegmentString(name.toString()));
33283+
33284+ List<Pair> localVarQueryParams = new ArrayList<Pair>();
33285+ List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
33286+ if (rotationAngle != null)
33287+ localVarQueryParams.addAll(apiClient.parameterToPair("rotationAngle", rotationAngle));
33288+ if (pages != null)
33289+ localVarQueryParams.addAll(apiClient.parameterToPair("pages", pages));
33290+ if (storage != null)
33291+ localVarQueryParams.addAll(apiClient.parameterToPair("storage", storage));
33292+ if (folder != null)
33293+ localVarQueryParams.addAll(apiClient.parameterToPair("folder", folder));
33294+ if (password != null)
33295+ localVarQueryParams.addAll(apiClient.parameterToPair("password", password));
33296+
33297+ Map<String, String> localVarHeaderParams = new HashMap<String, String>();
33298+
33299+ Map<String, Object> localVarFormParams = new HashMap<String, Object>();
33300+
33301+ final String[] localVarAccepts = {
33302+ "application/json"
33303+ };
33304+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
33305+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
33306+
33307+ final String[] localVarContentTypes = {
33308+ "application/json"
33309+ };
33310+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
33311+ localVarHeaderParams.put("Content-Type", localVarContentType);
33312+
33313+ if(progressListener != null) {
33314+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
33315+ @Override
33316+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
33317+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
33318+ return originalResponse.newBuilder()
33319+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
33320+ .build();
33321+ }
33322+ });
33323+ }
33324+
33325+ String[] localVarAuthNames = new String[] { "JWT" };
33326+ return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
33327+ }
33328+
33329+ @SuppressWarnings("rawtypes")
33330+ private com.squareup.okhttp.Call postDocumentPagesRotateValidateBeforeCall(String name, String rotationAngle, String pages, String storage, String folder, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
33331+
33332+ // verify the required parameter 'name' is set
33333+ if (name == null) {
33334+ throw new ApiException("Missing the required parameter 'name' when calling postDocumentPagesRotate(Async)");
33335+ }
33336+
33337+ // verify the required parameter 'rotationAngle' is set
33338+ if (rotationAngle == null) {
33339+ throw new ApiException("Missing the required parameter 'rotationAngle' when calling postDocumentPagesRotate(Async)");
33340+ }
33341+
33342+ // verify the required parameter 'pages' is set
33343+ if (pages == null) {
33344+ throw new ApiException("Missing the required parameter 'pages' when calling postDocumentPagesRotate(Async)");
33345+ }
33346+
33347+
33348+ com.squareup.okhttp.Call call = postDocumentPagesRotateCall(name, rotationAngle, pages, storage, folder, password, progressListener, progressRequestListener);
33349+ return call;
33350+
33351+ }
33352+
33353+ /**
33354+ * Rotate PDF document.
33355+ *
33356+ * @param name The document name. (required)
33357+ * @param rotationAngle Rotation Angle (CKW). Can be 90, 180, 270. (required)
33358+ * @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8) (required)
33359+ * @param storage The document storage. (optional)
33360+ * @param folder The document folder. (optional)
33361+ * @param password Base64 encoded password. (optional)
33362+ * @return AsposeResponse
33363+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
33364+ */
33365+ public AsposeResponse postDocumentPagesRotate(String name, String rotationAngle, String pages, String storage, String folder, String password) throws ApiException {
33366+ try
33367+ {
33368+ ApiResponse<AsposeResponse> resp = postDocumentPagesRotateWithHttpInfo(name, rotationAngle, pages, storage, folder, password);
33369+ return resp.getData();
33370+ }
33371+ catch (ApiException ex)
33372+ {
33373+ if (ex.getCode() == 401)
33374+ {
33375+ apiClient.requestToken();
33376+ ApiResponse<AsposeResponse> resp = postDocumentPagesRotateWithHttpInfo(name, rotationAngle, pages, storage, folder, password);
33377+ return resp.getData();
33378+ }
33379+ throw ex;
33380+ }
33381+ }
33382+
33383+ /**
33384+ * Rotate PDF document.
33385+ *
33386+ * @param name The document name. (required)
33387+ * @param rotationAngle Rotation Angle (CKW). Can be 90, 180, 270. (required)
33388+ * @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8) (required)
33389+ * @param storage The document storage. (optional)
33390+ * @param folder The document folder. (optional)
33391+ * @param password Base64 encoded password. (optional)
33392+ * @return ApiResponse<AsposeResponse>
33393+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
33394+ */
33395+ public ApiResponse<AsposeResponse> postDocumentPagesRotateWithHttpInfo(String name, String rotationAngle, String pages, String storage, String folder, String password) throws ApiException {
33396+ com.squareup.okhttp.Call call = postDocumentPagesRotateValidateBeforeCall(name, rotationAngle, pages, storage, folder, password, null, null);
33397+ Type localVarReturnType = new TypeToken<AsposeResponse>(){}.getType();
33398+ return apiClient.execute(call, localVarReturnType);
33399+ }
33400+
33401+ /**
33402+ * Rotate PDF document. (asynchronously)
33403+ *
33404+ * @param name The document name. (required)
33405+ * @param rotationAngle Rotation Angle (CKW). Can be 90, 180, 270. (required)
33406+ * @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8) (required)
33407+ * @param storage The document storage. (optional)
33408+ * @param folder The document folder. (optional)
33409+ * @param password Base64 encoded password. (optional)
33410+ * @param callback The callback to be executed when the API call finishes
33411+ * @return The request call
33412+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
33413+ */
33414+ public com.squareup.okhttp.Call postDocumentPagesRotateAsync(String name, String rotationAngle, String pages, String storage, String folder, String password, final ApiCallback<AsposeResponse> callback) throws ApiException {
33415+
33416+ ProgressResponseBody.ProgressListener progressListener = null;
33417+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
33418+
33419+ if (callback != null) {
33420+ progressListener = new ProgressResponseBody.ProgressListener() {
33421+ @Override
33422+ public void update(long bytesRead, long contentLength, boolean done) {
33423+ callback.onDownloadProgress(bytesRead, contentLength, done);
33424+ }
33425+ };
33426+
33427+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
33428+ @Override
33429+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
33430+ callback.onUploadProgress(bytesWritten, contentLength, done);
33431+ }
33432+ };
33433+ }
33434+
33435+ com.squareup.okhttp.Call call = postDocumentPagesRotateValidateBeforeCall(name, rotationAngle, pages, storage, folder, password, progressListener, progressRequestListener);
33436+ Type localVarReturnType = new TypeToken<AsposeResponse>(){}.getType();
33437+ apiClient.executeAsync(call, localVarReturnType, callback);
33438+ return call;
33439+ }
3326433440 /**
3326533441 * Build call for postDocumentTextFooter
3326633442 * @param name The document name. (required)
0 commit comments