@@ -2292,6 +2292,151 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
22922292 return call;
22932293 }
22942294
2295+ @SuppressWarnings("rawtypes")
2296+ private com.squareup.okhttp.Call deleteCommentsValidateBeforeCall(DeleteCommentsRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
2297+ return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
2298+ }
2299+
2300+ /**
2301+ * Removes all comments from the document.
2302+ * @param request Request object
2303+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2304+ * @throws IOException If fail to serialize the request body object
2305+ */
2306+ public void deleteComments(DeleteCommentsRequest request) throws ApiException, MessagingException, IOException {
2307+ try {
2308+ deleteCommentsWithHttpInfo(request);
2309+ }
2310+ catch (ApiException ex) {
2311+ if (ex.getCode() == apiClient.getNotAuthCode()) {
2312+ apiClient.requestToken();
2313+ deleteCommentsWithHttpInfo(request);
2314+ }
2315+ throw ex;
2316+ }
2317+ }
2318+
2319+ /**
2320+ * Removes all comments from the document.
2321+ * @param request Request object
2322+ * @return ApiResponse< void >;
2323+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2324+ * @throws IOException If fail to serialize the request body object
2325+ */
2326+ private ApiResponse< Void > deleteCommentsWithHttpInfo(DeleteCommentsRequest request) throws ApiException, MessagingException, IOException {
2327+ com.squareup.okhttp.Call call = deleteCommentsValidateBeforeCall(request, null, null);
2328+ return apiClient.execute(call);
2329+ }
2330+
2331+ /**
2332+ * Removes all comments from the document. (asynchronously)
2333+ * @param request Request object
2334+ * @param callback The callback to be executed when the API call finishes
2335+ * @return The request call
2336+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
2337+ * @throws IOException If fail to serialize the request body object
2338+ */
2339+ public com.squareup.okhttp.Call deleteCommentsAsync(DeleteCommentsRequest request, final ApiCallback< Void > callback) throws ApiException, MessagingException, IOException {
2340+
2341+ ProgressResponseBody.ProgressListener progressListener = null;
2342+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
2343+
2344+ if (callback != null) {
2345+ progressListener = new ProgressResponseBody.ProgressListener() {
2346+ @Override
2347+ public void update(long bytesRead, long contentLength, boolean done) {
2348+ callback.onDownloadProgress(bytesRead, contentLength, done);
2349+ }
2350+ };
2351+
2352+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
2353+ @Override
2354+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
2355+ callback.onUploadProgress(bytesWritten, contentLength, done);
2356+ }
2357+ };
2358+ }
2359+
2360+ com.squareup.okhttp.Call call = deleteCommentsValidateBeforeCall(request, progressListener, progressRequestListener);
2361+ apiClient.executeAsync(call, callback);
2362+ return call;
2363+ }
2364+
2365+ @SuppressWarnings("rawtypes")
2366+ private com.squareup.okhttp.Call deleteCommentsOnlineValidateBeforeCall(DeleteCommentsOnlineRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
2367+ return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
2368+ }
2369+
2370+ /**
2371+ * Removes all comments from the document.
2372+ * @param request Request object
2373+ * @return File
2374+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2375+ * @throws IOException If fail to serialize the request body object
2376+ */
2377+ public File deleteCommentsOnline(DeleteCommentsOnlineRequest request) throws ApiException, MessagingException, IOException {
2378+ try {
2379+ ApiResponse< File > resp = deleteCommentsOnlineWithHttpInfo(request);
2380+ return resp.getData();
2381+ }
2382+ catch (ApiException ex) {
2383+ if (ex.getCode() == apiClient.getNotAuthCode()) {
2384+ apiClient.requestToken();
2385+ ApiResponse< File > resp = deleteCommentsOnlineWithHttpInfo(request);
2386+ return resp.getData();
2387+ }
2388+ throw ex;
2389+ }
2390+ }
2391+
2392+ /**
2393+ * Removes all comments from the document.
2394+ * @param request Request object
2395+ * @return ApiResponse< File >;
2396+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2397+ * @throws IOException If fail to serialize the request body object
2398+ */
2399+ private ApiResponse< File > deleteCommentsOnlineWithHttpInfo(DeleteCommentsOnlineRequest request) throws ApiException, MessagingException, IOException {
2400+ com.squareup.okhttp.Call call = deleteCommentsOnlineValidateBeforeCall(request, null, null);
2401+ Response response = call.execute();
2402+ File data = request.deserializeResponse(apiClient, response);
2403+ return new ApiResponse< File >(response.code(), response.headers().toMultimap(), data);
2404+ }
2405+
2406+ /**
2407+ * Removes all comments from the document. (asynchronously)
2408+ * @param request Request object
2409+ * @param callback The callback to be executed when the API call finishes
2410+ * @return The request call
2411+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
2412+ * @throws IOException If fail to serialize the request body object
2413+ */
2414+ public com.squareup.okhttp.Call deleteCommentsOnlineAsync(DeleteCommentsOnlineRequest request, final ApiCallback< File > callback) throws ApiException, MessagingException, IOException {
2415+
2416+ ProgressResponseBody.ProgressListener progressListener = null;
2417+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
2418+
2419+ if (callback != null) {
2420+ progressListener = new ProgressResponseBody.ProgressListener() {
2421+ @Override
2422+ public void update(long bytesRead, long contentLength, boolean done) {
2423+ callback.onDownloadProgress(bytesRead, contentLength, done);
2424+ }
2425+ };
2426+
2427+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
2428+ @Override
2429+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
2430+ callback.onUploadProgress(bytesWritten, contentLength, done);
2431+ }
2432+ };
2433+ }
2434+
2435+ com.squareup.okhttp.Call call = deleteCommentsOnlineValidateBeforeCall(request, progressListener, progressRequestListener);
2436+ apiClient.executeAsync(call, request.getResponseType(), callback);
2437+ return call;
2438+ }
2439+
22952440 @SuppressWarnings("rawtypes")
22962441 private com.squareup.okhttp.Call deleteDocumentPropertyValidateBeforeCall(DeleteDocumentPropertyRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
22972442 return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
0 commit comments