@@ -5751,7 +5751,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
5751
5751
* @param name Document name. (required)
5752
5752
* @param slideIndex Parent slide index. (required)
5753
5753
* @param slideType Slide type (master, layout or notes). (required)
5754
- * @param dto Shape DTO.
5754
+ * @param dto Shape DTO. (required)
5755
5755
* @param shapeToClone Optional index for clone shape instead of adding a new one.
5756
5756
* @param position Position of the new shape in the list. Default is at the end of the list.
5757
5757
* @param password Document password.
@@ -5776,6 +5776,10 @@ public com.squareup.okhttp.Call createSpecialSlideShapeCall(String name, Integer
5776
5776
if (slideType == null) {
5777
5777
throw new ApiException("Missing the required parameter 'slideType' when calling createSpecialSlideShape(Async)");
5778
5778
}
5779
+ // verify the required parameter 'dto' is set
5780
+ if (dto == null) {
5781
+ throw new ApiException("Missing the required parameter 'dto' when calling createSpecialSlideShape(Async)");
5782
+ }
5779
5783
Object postBody = dto;
5780
5784
5781
5785
// create path and map variables
@@ -5827,7 +5831,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
5827
5831
* @param name Document name. (required)
5828
5832
* @param slideIndex Parent slide index. (required)
5829
5833
* @param slideType Slide type (master, layout or notes). (required)
5830
- * @param dto Shape DTO.
5834
+ * @param dto Shape DTO. (required)
5831
5835
* @param shapeToClone Optional index for clone shape instead of adding a new one.
5832
5836
* @param position Position of the new shape in the list. Default is at the end of the list.
5833
5837
* @param password Document password.
@@ -5853,7 +5857,7 @@ public ShapeBase createSpecialSlideShape(String name, Integer slideIndex, Specia
5853
5857
* @param name Document name. (required)
5854
5858
* @param slideIndex Parent slide index. (required)
5855
5859
* @param slideType Slide type (master, layout or notes). (required)
5856
- * @param dto Shape DTO.
5860
+ * @param dto Shape DTO. (required)
5857
5861
* @param shapeToClone Optional index for clone shape instead of adding a new one.
5858
5862
* @param position Position of the new shape in the list. Default is at the end of the list.
5859
5863
* @param password Document password.
@@ -5875,7 +5879,7 @@ public ApiResponse<ShapeBase> createSpecialSlideShapeWithHttpInfo(String name, I
5875
5879
* @param name Document name. (required)
5876
5880
* @param slideIndex Parent slide index. (required)
5877
5881
* @param slideType Slide type (master, layout or notes). (required)
5878
- * @param dto Shape DTO.
5882
+ * @param dto Shape DTO. (required)
5879
5883
* @param shapeToClone Optional index for clone shape instead of adding a new one.
5880
5884
* @param position Position of the new shape in the list. Default is at the end of the list.
5881
5885
* @param password Document password.
@@ -10294,7 +10298,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
10294
10298
/**
10295
10299
* Build call for deleteProtectionOnline
10296
10300
* @param document Document data. (required)
10297
- * @param password Presentation password. (required)
10301
+ * @param password Presentation password.
10298
10302
* @param progressListener Progress listener
10299
10303
* @param progressRequestListener Progress request listener
10300
10304
* @return Call to execute
@@ -10305,10 +10309,6 @@ public com.squareup.okhttp.Call deleteProtectionOnlineCall(byte[] document, Stri
10305
10309
if (document == null) {
10306
10310
throw new ApiException("Missing the required parameter 'document' when calling deleteProtectionOnline(Async)");
10307
10311
}
10308
- // verify the required parameter 'password' is set
10309
- if (password == null) {
10310
- throw new ApiException("Missing the required parameter 'password' when calling deleteProtectionOnline(Async)");
10311
- }
10312
10312
Object postBody = null;
10313
10313
10314
10314
// create path and map variables
@@ -10355,7 +10355,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
10355
10355
* Resets all presentation protection settings.
10356
10356
*
10357
10357
* @param document Document data. (required)
10358
- * @param password Presentation password. (required)
10358
+ * @param password Presentation password.
10359
10359
* @return File
10360
10360
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
10361
10361
*/
@@ -10373,7 +10373,7 @@ public File deleteProtectionOnline(byte[] document, String password) throws ApiE
10373
10373
* Resets all presentation protection settings.
10374
10374
*
10375
10375
* @param document Document data. (required)
10376
- * @param password Presentation password. (required)
10376
+ * @param password Presentation password.
10377
10377
* @return ApiResponse<File>
10378
10378
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
10379
10379
*/
@@ -10387,7 +10387,7 @@ public ApiResponse<File> deleteProtectionOnlineWithHttpInfo(byte[] document, Str
10387
10387
* Resets all presentation protection settings. (asynchronously)
10388
10388
*
10389
10389
* @param document Document data. (required)
10390
- * @param password Presentation password. (required)
10390
+ * @param password Presentation password.
10391
10391
* @param callback The callback to be executed when the API call finishes
10392
10392
* @return The request call
10393
10393
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -29666,6 +29666,284 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
29666
29666
apiClient.executeAsync(call, returnType, callback);
29667
29667
return call;
29668
29668
}
29669
+ /**
29670
+ * Build call for replaceImage
29671
+ * @param name Document name. (required)
29672
+ * @param imageIndex Image index. (required)
29673
+ * @param image Image data.
29674
+ * @param password Document password.
29675
+ * @param folder Document folder.
29676
+ * @param storage Document storage.
29677
+ * @param progressListener Progress listener
29678
+ * @param progressRequestListener Progress request listener
29679
+ * @return Call to execute
29680
+ * @throws ApiException If fail to serialize the request body object
29681
+ */
29682
+ public com.squareup.okhttp.Call replaceImageCall(String name, Integer imageIndex, byte[] image, String password, String folder, String storage, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
29683
+ // verify the required parameter 'name' is set
29684
+ if (name == null) {
29685
+ throw new ApiException("Missing the required parameter 'name' when calling replaceImage(Async)");
29686
+ }
29687
+ // verify the required parameter 'imageIndex' is set
29688
+ if (imageIndex == null) {
29689
+ throw new ApiException("Missing the required parameter 'imageIndex' when calling replaceImage(Async)");
29690
+ }
29691
+ Object postBody = null;
29692
+
29693
+ // create path and map variables
29694
+ String methodPath = "/slides/{name}/images/{imageIndex}/replace"
29695
+ .replaceAll("\\{" + "name" + "\\}", apiClient.objectToString(name)).replaceAll("\\{" + "imageIndex" + "\\}", apiClient.objectToString(imageIndex));
29696
+
29697
+ List<Pair> queryParams = new ArrayList<Pair>();
29698
+ apiClient.addQueryParameter(queryParams, "folder", folder);
29699
+ apiClient.addQueryParameter(queryParams, "storage", storage);
29700
+
29701
+ Map<String, String> headerParams = new HashMap<String, String>();
29702
+ if (password != null)
29703
+ headerParams.put("password", apiClient.parameterToString(password));
29704
+
29705
+ Map<String, Object> formParams = new LinkedHashMap<String, Object>();
29706
+ if (image != null)
29707
+ formParams.put("image", image);
29708
+
29709
+ final String[] accepts = {
29710
+ "application/json"
29711
+ };
29712
+ final String accept = apiClient.selectHeaderAccept(accepts);
29713
+ if (accept != null) headerParams.put("Accept", accept);
29714
+
29715
+ final String[] contentTypes = {
29716
+ "multipart/form-data"
29717
+ };
29718
+ final String contentType = apiClient.selectHeaderContentType(contentTypes);
29719
+ headerParams.put("Content-Type", contentType);
29720
+
29721
+ if(progressListener != null) {
29722
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
29723
+ @Override
29724
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
29725
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
29726
+ return originalResponse.newBuilder()
29727
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
29728
+ .build();
29729
+ }
29730
+ });
29731
+ }
29732
+ return apiClient.buildCall(methodPath, "PUT", queryParams, postBody, headerParams, formParams, progressRequestListener);
29733
+ }
29734
+
29735
+ /**
29736
+ * Replaces image by the specified index.
29737
+ *
29738
+ * @param name Document name. (required)
29739
+ * @param imageIndex Image index. (required)
29740
+ * @param image Image data.
29741
+ * @param password Document password.
29742
+ * @param folder Document folder.
29743
+ * @param storage Document storage.
29744
+
29745
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
29746
+ */
29747
+ public void replaceImage(String name, Integer imageIndex, byte[] image, String password, String folder, String storage) throws ApiException {
29748
+ try {
29749
+ replaceImageWithHttpInfo(name, imageIndex, image, password, folder, storage);
29750
+ } catch (NeedRepeatRequestException e) {
29751
+ replaceImageWithHttpInfo(name, imageIndex, image, password, folder, storage);
29752
+ }
29753
+ }
29754
+
29755
+ /**
29756
+ * Replaces image by the specified index.
29757
+ *
29758
+ * @param name Document name. (required)
29759
+ * @param imageIndex Image index. (required)
29760
+ * @param image Image data.
29761
+ * @param password Document password.
29762
+ * @param folder Document folder.
29763
+ * @param storage Document storage.
29764
+ * @return ApiResponse<Void>
29765
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
29766
+ */
29767
+ public ApiResponse<Void> replaceImageWithHttpInfo(String name, Integer imageIndex, byte[] image, String password, String folder, String storage) throws ApiException {
29768
+ com.squareup.okhttp.Call call = replaceImageCall(name, imageIndex, image, password, folder, storage, null, null);
29769
+ return apiClient.execute(call);
29770
+ }
29771
+
29772
+ /**
29773
+ * Replaces image by the specified index. (asynchronously)
29774
+ *
29775
+ * @param name Document name. (required)
29776
+ * @param imageIndex Image index. (required)
29777
+ * @param image Image data.
29778
+ * @param password Document password.
29779
+ * @param folder Document folder.
29780
+ * @param storage Document storage.
29781
+ * @param callback The callback to be executed when the API call finishes
29782
+ * @return The request call
29783
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
29784
+ */
29785
+ public com.squareup.okhttp.Call replaceImageAsync(String name, Integer imageIndex, byte[] image, String password, String folder, String storage, final ApiCallback<Void> callback) throws ApiException {
29786
+
29787
+ ProgressResponseBody.ProgressListener progressListener = null;
29788
+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
29789
+
29790
+ if (callback != null) {
29791
+ progressListener = new ProgressResponseBody.ProgressListener() {
29792
+ @Override
29793
+ public void update(long bytesRead, long contentLength, boolean done) {
29794
+ callback.onDownloadProgress(bytesRead, contentLength, done);
29795
+ }
29796
+ };
29797
+
29798
+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
29799
+ @Override
29800
+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
29801
+ callback.onUploadProgress(bytesWritten, contentLength, done);
29802
+ }
29803
+ };
29804
+ }
29805
+
29806
+ com.squareup.okhttp.Call call = replaceImageCall(name, imageIndex, image, password, folder, storage, progressListener, progressRequestListener);
29807
+ apiClient.executeAsync(call, callback);
29808
+ return call;
29809
+ }
29810
+ /**
29811
+ * Build call for replaceImageOnline
29812
+ * @param document Document data. (required)
29813
+ * @param imageIndex Image index. (required)
29814
+ * @param image Image data.
29815
+ * @param password Password.
29816
+ * @param progressListener Progress listener
29817
+ * @param progressRequestListener Progress request listener
29818
+ * @return Call to execute
29819
+ * @throws ApiException If fail to serialize the request body object
29820
+ */
29821
+ public com.squareup.okhttp.Call replaceImageOnlineCall(byte[] document, Integer imageIndex, byte[] image, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
29822
+ // verify the required parameter 'document' is set
29823
+ if (document == null) {
29824
+ throw new ApiException("Missing the required parameter 'document' when calling replaceImageOnline(Async)");
29825
+ }
29826
+ // verify the required parameter 'imageIndex' is set
29827
+ if (imageIndex == null) {
29828
+ throw new ApiException("Missing the required parameter 'imageIndex' when calling replaceImageOnline(Async)");
29829
+ }
29830
+ Object postBody = null;
29831
+
29832
+ // create path and map variables
29833
+ String methodPath = "/slides/images/{imageIndex}/replace"
29834
+ .replaceAll("\\{" + "imageIndex" + "\\}", apiClient.objectToString(imageIndex));
29835
+
29836
+ List<Pair> queryParams = new ArrayList<Pair>();
29837
+
29838
+ Map<String, String> headerParams = new HashMap<String, String>();
29839
+ if (password != null)
29840
+ headerParams.put("password", apiClient.parameterToString(password));
29841
+
29842
+ Map<String, Object> formParams = new LinkedHashMap<String, Object>();
29843
+ if (document != null)
29844
+ formParams.put("document", document);
29845
+ if (image != null)
29846
+ formParams.put("image", image);
29847
+
29848
+ final String[] accepts = {
29849
+ "multipart/form-data"
29850
+ };
29851
+ final String accept = apiClient.selectHeaderAccept(accepts);
29852
+ if (accept != null) headerParams.put("Accept", accept);
29853
+
29854
+ final String[] contentTypes = {
29855
+ "multipart/form-data"
29856
+ };
29857
+ final String contentType = apiClient.selectHeaderContentType(contentTypes);
29858
+ headerParams.put("Content-Type", contentType);
29859
+
29860
+ if(progressListener != null) {
29861
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
29862
+ @Override
29863
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
29864
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
29865
+ return originalResponse.newBuilder()
29866
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
29867
+ .build();
29868
+ }
29869
+ });
29870
+ }
29871
+ return apiClient.buildCall(methodPath, "POST", queryParams, postBody, headerParams, formParams, progressRequestListener);
29872
+ }
29873
+
29874
+ /**
29875
+ * Replaces image by the specified index and returns updated document.
29876
+ *
29877
+ * @param document Document data. (required)
29878
+ * @param imageIndex Image index. (required)
29879
+ * @param image Image data.
29880
+ * @param password Password.
29881
+ * @return File
29882
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
29883
+ */
29884
+ public File replaceImageOnline(byte[] document, Integer imageIndex, byte[] image, String password) throws ApiException {
29885
+ try {
29886
+ ApiResponse<File> resp = replaceImageOnlineWithHttpInfo(document, imageIndex, image, password);
29887
+ return resp.getData();
29888
+ } catch (NeedRepeatRequestException e) {
29889
+ ApiResponse<File> resp = replaceImageOnlineWithHttpInfo(document, imageIndex, image, password);
29890
+ return resp.getData();
29891
+ }
29892
+ }
29893
+
29894
+ /**
29895
+ * Replaces image by the specified index and returns updated document.
29896
+ *
29897
+ * @param document Document data. (required)
29898
+ * @param imageIndex Image index. (required)
29899
+ * @param image Image data.
29900
+ * @param password Password.
29901
+ * @return ApiResponse<File>
29902
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
29903
+ */
29904
+ public ApiResponse<File> replaceImageOnlineWithHttpInfo(byte[] document, Integer imageIndex, byte[] image, String password) throws ApiException {
29905
+ com.squareup.okhttp.Call call = replaceImageOnlineCall(document, imageIndex, image, password, null, null);
29906
+ Type returnType = new TypeToken<File>(){}.getType();
29907
+ return apiClient.execute(call, returnType);
29908
+ }
29909
+
29910
+ /**
29911
+ * Replaces image by the specified index and returns updated document. (asynchronously)
29912
+ *
29913
+ * @param document Document data. (required)
29914
+ * @param imageIndex Image index. (required)
29915
+ * @param image Image data.
29916
+ * @param password Password.
29917
+ * @param callback The callback to be executed when the API call finishes
29918
+ * @return The request call
29919
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
29920
+ */
29921
+ public com.squareup.okhttp.Call replaceImageOnlineAsync(byte[] document, Integer imageIndex, byte[] image, String password, final ApiCallback<File> callback) throws ApiException {
29922
+
29923
+ ProgressResponseBody.ProgressListener progressListener = null;
29924
+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
29925
+
29926
+ if (callback != null) {
29927
+ progressListener = new ProgressResponseBody.ProgressListener() {
29928
+ @Override
29929
+ public void update(long bytesRead, long contentLength, boolean done) {
29930
+ callback.onDownloadProgress(bytesRead, contentLength, done);
29931
+ }
29932
+ };
29933
+
29934
+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
29935
+ @Override
29936
+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
29937
+ callback.onUploadProgress(bytesWritten, contentLength, done);
29938
+ }
29939
+ };
29940
+ }
29941
+
29942
+ com.squareup.okhttp.Call call = replaceImageOnlineCall(document, imageIndex, image, password, progressListener, progressRequestListener);
29943
+ Type returnType = new TypeToken<File>(){}.getType();
29944
+ apiClient.executeAsync(call, returnType, callback);
29945
+ return call;
29946
+ }
29669
29947
/**
29670
29948
* Build call for replacePresentationText
29671
29949
* @param name Document name. (required)
0 commit comments