@@ -16919,6 +16919,149 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
1691916919 return call;
1692016920 }
1692116921
16922+ @SuppressWarnings("rawtypes")
16923+ private com.squareup.okhttp.Call insertSectionValidateBeforeCall(InsertSectionRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
16924+ return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
16925+ }
16926+
16927+ /**
16928+ * Inserts a section to the document.
16929+ * @param request Request object
16930+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
16931+ * @throws IOException If fail to serialize the request body object
16932+ */
16933+ public void insertSection(InsertSectionRequest request) throws ApiException, MessagingException, IOException {
16934+ try {
16935+ insertSectionWithHttpInfo(request);
16936+ }
16937+ catch (ApiException ex) {
16938+ if (ex.getCode() == apiClient.getNotAuthCode()) {
16939+ apiClient.requestToken();
16940+ insertSectionWithHttpInfo(request);
16941+ }
16942+ throw ex;
16943+ }
16944+ }
16945+
16946+ /**
16947+ * Inserts a section to the document.
16948+ * @param request Request object
16949+ * @return ApiResponse< void >;
16950+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
16951+ * @throws IOException If fail to serialize the request body object
16952+ */
16953+ private ApiResponse< Void > insertSectionWithHttpInfo(InsertSectionRequest request) throws ApiException, MessagingException, IOException {
16954+ com.squareup.okhttp.Call call = insertSectionValidateBeforeCall(request, null, null);
16955+ return apiClient.execute(call, request);
16956+ }
16957+
16958+ /**
16959+ * Inserts a section to the document. (asynchronously)
16960+ * @param request Request object
16961+ * @param callback The callback to be executed when the API call finishes
16962+ * @return The request call
16963+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
16964+ * @throws IOException If fail to serialize the request body object
16965+ */
16966+ public com.squareup.okhttp.Call insertSectionAsync(InsertSectionRequest request, final ApiCallback< Void > callback) throws ApiException, MessagingException, IOException {
16967+
16968+ ProgressResponseBody.ProgressListener progressListener = null;
16969+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
16970+
16971+ if (callback != null) {
16972+ progressListener = new ProgressResponseBody.ProgressListener() {
16973+ @Override
16974+ public void update(long bytesRead, long contentLength, boolean done) {
16975+ callback.onDownloadProgress(bytesRead, contentLength, done);
16976+ }
16977+ };
16978+
16979+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
16980+ @Override
16981+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
16982+ callback.onUploadProgress(bytesWritten, contentLength, done);
16983+ }
16984+ };
16985+ }
16986+
16987+ com.squareup.okhttp.Call call = insertSectionValidateBeforeCall(request, progressListener, progressRequestListener);
16988+ apiClient.executeAsync(call, request, callback);
16989+ return call;
16990+ }
16991+
16992+ @SuppressWarnings("rawtypes")
16993+ private com.squareup.okhttp.Call insertSectionOnlineValidateBeforeCall(InsertSectionOnlineRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
16994+ return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
16995+ }
16996+
16997+ /**
16998+ * Inserts a section to the document.
16999+ * @param request Request object
17000+ * @return Map<String, byte[]>
17001+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
17002+ * @throws IOException If fail to serialize the request body object
17003+ */
17004+ public Map<String, byte[]> insertSectionOnline(InsertSectionOnlineRequest request) throws ApiException, MessagingException, IOException {
17005+ try {
17006+ ApiResponse< Map<String, byte[]> > resp = insertSectionOnlineWithHttpInfo(request);
17007+ return resp.getData();
17008+ }
17009+ catch (ApiException ex) {
17010+ if (ex.getCode() == apiClient.getNotAuthCode()) {
17011+ apiClient.requestToken();
17012+ ApiResponse< Map<String, byte[]> > resp = insertSectionOnlineWithHttpInfo(request);
17013+ return resp.getData();
17014+ }
17015+ throw ex;
17016+ }
17017+ }
17018+
17019+ /**
17020+ * Inserts a section to the document.
17021+ * @param request Request object
17022+ * @return ApiResponse< Map<String, byte[]> >;
17023+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
17024+ * @throws IOException If fail to serialize the request body object
17025+ */
17026+ private ApiResponse< Map<String, byte[]> > insertSectionOnlineWithHttpInfo(InsertSectionOnlineRequest request) throws ApiException, MessagingException, IOException {
17027+ com.squareup.okhttp.Call call = insertSectionOnlineValidateBeforeCall(request, null, null);
17028+ return apiClient.execute(call, request);
17029+ }
17030+
17031+ /**
17032+ * Inserts a section to the document. (asynchronously)
17033+ * @param request Request object
17034+ * @param callback The callback to be executed when the API call finishes
17035+ * @return The request call
17036+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
17037+ * @throws IOException If fail to serialize the request body object
17038+ */
17039+ public com.squareup.okhttp.Call insertSectionOnlineAsync(InsertSectionOnlineRequest request, final ApiCallback< Map<String, byte[]> > callback) throws ApiException, MessagingException, IOException {
17040+
17041+ ProgressResponseBody.ProgressListener progressListener = null;
17042+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
17043+
17044+ if (callback != null) {
17045+ progressListener = new ProgressResponseBody.ProgressListener() {
17046+ @Override
17047+ public void update(long bytesRead, long contentLength, boolean done) {
17048+ callback.onDownloadProgress(bytesRead, contentLength, done);
17049+ }
17050+ };
17051+
17052+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
17053+ @Override
17054+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
17055+ callback.onUploadProgress(bytesWritten, contentLength, done);
17056+ }
17057+ };
17058+ }
17059+
17060+ com.squareup.okhttp.Call call = insertSectionOnlineValidateBeforeCall(request, progressListener, progressRequestListener);
17061+ apiClient.executeAsync(call, request, callback);
17062+ return call;
17063+ }
17064+
1692217065 @SuppressWarnings("rawtypes")
1692317066 private com.squareup.okhttp.Call insertStructuredDocumentTagValidateBeforeCall(InsertStructuredDocumentTagRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
1692417067 return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
0 commit comments