@@ -17962,18 +17962,93 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
1796217962 return call;
1796317963 }
1796417964
17965+ @SuppressWarnings("rawtypes")
17966+ private com.squareup.okhttp.Call insertWatermarkValidateBeforeCall(InsertWatermarkRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
17967+ return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
17968+ }
17969+
17970+ /**
17971+ * Insert a watermark to the document.
17972+ * @param request Request object
17973+ * @return DocumentResponse
17974+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
17975+ * @throws IOException If fail to serialize the request body object
17976+ */
17977+ public DocumentResponse insertWatermark(InsertWatermarkRequest request) throws ApiException, MessagingException, IOException {
17978+ try {
17979+ ApiResponse< DocumentResponse > resp = insertWatermarkWithHttpInfo(request);
17980+ return resp.getData();
17981+ }
17982+ catch (ApiException ex) {
17983+ if (ex.getCode() == apiClient.getNotAuthCode()) {
17984+ apiClient.requestToken();
17985+ ApiResponse< DocumentResponse > resp = insertWatermarkWithHttpInfo(request);
17986+ return resp.getData();
17987+ }
17988+ throw ex;
17989+ }
17990+ }
17991+
17992+ /**
17993+ * Insert a watermark to the document.
17994+ * @param request Request object
17995+ * @return ApiResponse< DocumentResponse >;
17996+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
17997+ * @throws IOException If fail to serialize the request body object
17998+ */
17999+ private ApiResponse< DocumentResponse > insertWatermarkWithHttpInfo(InsertWatermarkRequest request) throws ApiException, MessagingException, IOException {
18000+ com.squareup.okhttp.Call call = insertWatermarkValidateBeforeCall(request, null, null);
18001+ return apiClient.execute(call, request);
18002+ }
18003+
18004+ /**
18005+ * Insert a watermark to the document. (asynchronously)
18006+ * @param request Request object
18007+ * @param callback The callback to be executed when the API call finishes
18008+ * @return The request call
18009+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
18010+ * @throws IOException If fail to serialize the request body object
18011+ */
18012+ public com.squareup.okhttp.Call insertWatermarkAsync(InsertWatermarkRequest request, final ApiCallback< DocumentResponse > callback) throws ApiException, MessagingException, IOException {
18013+
18014+ ProgressResponseBody.ProgressListener progressListener = null;
18015+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
18016+
18017+ if (callback != null) {
18018+ progressListener = new ProgressResponseBody.ProgressListener() {
18019+ @Override
18020+ public void update(long bytesRead, long contentLength, boolean done) {
18021+ callback.onDownloadProgress(bytesRead, contentLength, done);
18022+ }
18023+ };
18024+
18025+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
18026+ @Override
18027+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
18028+ callback.onUploadProgress(bytesWritten, contentLength, done);
18029+ }
18030+ };
18031+ }
18032+
18033+ com.squareup.okhttp.Call call = insertWatermarkValidateBeforeCall(request, progressListener, progressRequestListener);
18034+ apiClient.executeAsync(call, request, callback);
18035+ return call;
18036+ }
18037+
1796518038 @SuppressWarnings("rawtypes")
1796618039 private com.squareup.okhttp.Call insertWatermarkImageValidateBeforeCall(InsertWatermarkImageRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
1796718040 return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
1796818041 }
1796918042
1797018043 /**
1797118044 * Inserts a new watermark image to the document.
18045+ * @deprecated This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead.
1797218046 * @param request Request object
1797318047 * @return DocumentResponse
1797418048 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1797518049 * @throws IOException If fail to serialize the request body object
1797618050 */
18051+ @Deprecated
1797718052 public DocumentResponse insertWatermarkImage(InsertWatermarkImageRequest request) throws ApiException, MessagingException, IOException {
1797818053 try {
1797918054 ApiResponse< DocumentResponse > resp = insertWatermarkImageWithHttpInfo(request);
@@ -18042,11 +18117,13 @@ private com.squareup.okhttp.Call insertWatermarkImageOnlineValidateBeforeCall(In
1804218117
1804318118 /**
1804418119 * Inserts a new watermark image to the document.
18120+ * @deprecated This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead.
1804518121 * @param request Request object
1804618122 * @return InsertWatermarkImageOnlineResponse
1804718123 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1804818124 * @throws IOException If fail to serialize the request body object
1804918125 */
18126+ @Deprecated
1805018127 public InsertWatermarkImageOnlineResponse insertWatermarkImageOnline(InsertWatermarkImageOnlineRequest request) throws ApiException, MessagingException, IOException {
1805118128 try {
1805218129 ApiResponse< InsertWatermarkImageOnlineResponse > resp = insertWatermarkImageOnlineWithHttpInfo(request);
@@ -18108,18 +18185,93 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
1810818185 return call;
1810918186 }
1811018187
18188+ @SuppressWarnings("rawtypes")
18189+ private com.squareup.okhttp.Call insertWatermarkOnlineValidateBeforeCall(InsertWatermarkOnlineRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
18190+ return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
18191+ }
18192+
18193+ /**
18194+ * Insert a watermark to the document.
18195+ * @param request Request object
18196+ * @return InsertWatermarkOnlineResponse
18197+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
18198+ * @throws IOException If fail to serialize the request body object
18199+ */
18200+ public InsertWatermarkOnlineResponse insertWatermarkOnline(InsertWatermarkOnlineRequest request) throws ApiException, MessagingException, IOException {
18201+ try {
18202+ ApiResponse< InsertWatermarkOnlineResponse > resp = insertWatermarkOnlineWithHttpInfo(request);
18203+ return resp.getData();
18204+ }
18205+ catch (ApiException ex) {
18206+ if (ex.getCode() == apiClient.getNotAuthCode()) {
18207+ apiClient.requestToken();
18208+ ApiResponse< InsertWatermarkOnlineResponse > resp = insertWatermarkOnlineWithHttpInfo(request);
18209+ return resp.getData();
18210+ }
18211+ throw ex;
18212+ }
18213+ }
18214+
18215+ /**
18216+ * Insert a watermark to the document.
18217+ * @param request Request object
18218+ * @return ApiResponse< InsertWatermarkOnlineResponse >;
18219+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
18220+ * @throws IOException If fail to serialize the request body object
18221+ */
18222+ private ApiResponse< InsertWatermarkOnlineResponse > insertWatermarkOnlineWithHttpInfo(InsertWatermarkOnlineRequest request) throws ApiException, MessagingException, IOException {
18223+ com.squareup.okhttp.Call call = insertWatermarkOnlineValidateBeforeCall(request, null, null);
18224+ return apiClient.execute(call, request);
18225+ }
18226+
18227+ /**
18228+ * Insert a watermark to the document. (asynchronously)
18229+ * @param request Request object
18230+ * @param callback The callback to be executed when the API call finishes
18231+ * @return The request call
18232+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
18233+ * @throws IOException If fail to serialize the request body object
18234+ */
18235+ public com.squareup.okhttp.Call insertWatermarkOnlineAsync(InsertWatermarkOnlineRequest request, final ApiCallback< InsertWatermarkOnlineResponse > callback) throws ApiException, MessagingException, IOException {
18236+
18237+ ProgressResponseBody.ProgressListener progressListener = null;
18238+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
18239+
18240+ if (callback != null) {
18241+ progressListener = new ProgressResponseBody.ProgressListener() {
18242+ @Override
18243+ public void update(long bytesRead, long contentLength, boolean done) {
18244+ callback.onDownloadProgress(bytesRead, contentLength, done);
18245+ }
18246+ };
18247+
18248+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
18249+ @Override
18250+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
18251+ callback.onUploadProgress(bytesWritten, contentLength, done);
18252+ }
18253+ };
18254+ }
18255+
18256+ com.squareup.okhttp.Call call = insertWatermarkOnlineValidateBeforeCall(request, progressListener, progressRequestListener);
18257+ apiClient.executeAsync(call, request, callback);
18258+ return call;
18259+ }
18260+
1811118261 @SuppressWarnings("rawtypes")
1811218262 private com.squareup.okhttp.Call insertWatermarkTextValidateBeforeCall(InsertWatermarkTextRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
1811318263 return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
1811418264 }
1811518265
1811618266 /**
1811718267 * Inserts a new watermark text to the document.
18268+ * @deprecated This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead.
1811818269 * @param request Request object
1811918270 * @return DocumentResponse
1812018271 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1812118272 * @throws IOException If fail to serialize the request body object
1812218273 */
18274+ @Deprecated
1812318275 public DocumentResponse insertWatermarkText(InsertWatermarkTextRequest request) throws ApiException, MessagingException, IOException {
1812418276 try {
1812518277 ApiResponse< DocumentResponse > resp = insertWatermarkTextWithHttpInfo(request);
@@ -18188,11 +18340,13 @@ private com.squareup.okhttp.Call insertWatermarkTextOnlineValidateBeforeCall(Ins
1818818340
1818918341 /**
1819018342 * Inserts a new watermark text to the document.
18343+ * @deprecated This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead.
1819118344 * @param request Request object
1819218345 * @return InsertWatermarkTextOnlineResponse
1819318346 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1819418347 * @throws IOException If fail to serialize the request body object
1819518348 */
18349+ @Deprecated
1819618350 public InsertWatermarkTextOnlineResponse insertWatermarkTextOnline(InsertWatermarkTextOnlineRequest request) throws ApiException, MessagingException, IOException {
1819718351 try {
1819818352 ApiResponse< InsertWatermarkTextOnlineResponse > resp = insertWatermarkTextOnlineWithHttpInfo(request);
0 commit comments