@@ -21241,6 +21241,152 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
2124121241 return call;
2124221242 }
2124321243
21244+ @SuppressWarnings("rawtypes")
21245+ private com.squareup.okhttp.Call translateNodeIdValidateBeforeCall(TranslateNodeIdRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
21246+ return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
21247+ }
21248+
21249+ /**
21250+ * Translate a node id to a node path.
21251+ * @param request Request object
21252+ * @return TranslateNodeIdResponse
21253+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
21254+ * @throws IOException If fail to serialize the request body object
21255+ */
21256+ public TranslateNodeIdResponse translateNodeId(TranslateNodeIdRequest request) throws ApiException, MessagingException, IOException {
21257+ try {
21258+ ApiResponse< TranslateNodeIdResponse > resp = translateNodeIdWithHttpInfo(request);
21259+ return resp.getData();
21260+ }
21261+ catch (ApiException ex) {
21262+ if (ex.getCode() == apiClient.getNotAuthCode()) {
21263+ apiClient.requestToken();
21264+ ApiResponse< TranslateNodeIdResponse > resp = translateNodeIdWithHttpInfo(request);
21265+ return resp.getData();
21266+ }
21267+ throw ex;
21268+ }
21269+ }
21270+
21271+ /**
21272+ * Translate a node id to a node path.
21273+ * @param request Request object
21274+ * @return ApiResponse< TranslateNodeIdResponse >;
21275+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
21276+ * @throws IOException If fail to serialize the request body object
21277+ */
21278+ private ApiResponse< TranslateNodeIdResponse > translateNodeIdWithHttpInfo(TranslateNodeIdRequest request) throws ApiException, MessagingException, IOException {
21279+ com.squareup.okhttp.Call call = translateNodeIdValidateBeforeCall(request, null, null);
21280+ return apiClient.execute(call, request);
21281+ }
21282+
21283+ /**
21284+ * Translate a node id to a node path. (asynchronously)
21285+ * @param request Request object
21286+ * @param callback The callback to be executed when the API call finishes
21287+ * @return The request call
21288+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
21289+ * @throws IOException If fail to serialize the request body object
21290+ */
21291+ public com.squareup.okhttp.Call translateNodeIdAsync(TranslateNodeIdRequest request, final ApiCallback< TranslateNodeIdResponse > callback) throws ApiException, MessagingException, IOException {
21292+
21293+ ProgressResponseBody.ProgressListener progressListener = null;
21294+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
21295+
21296+ if (callback != null) {
21297+ progressListener = new ProgressResponseBody.ProgressListener() {
21298+ @Override
21299+ public void update(long bytesRead, long contentLength, boolean done) {
21300+ callback.onDownloadProgress(bytesRead, contentLength, done);
21301+ }
21302+ };
21303+
21304+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
21305+ @Override
21306+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
21307+ callback.onUploadProgress(bytesWritten, contentLength, done);
21308+ }
21309+ };
21310+ }
21311+
21312+ com.squareup.okhttp.Call call = translateNodeIdValidateBeforeCall(request, progressListener, progressRequestListener);
21313+ apiClient.executeAsync(call, request, callback);
21314+ return call;
21315+ }
21316+
21317+ @SuppressWarnings("rawtypes")
21318+ private com.squareup.okhttp.Call translateNodeIdOnlineValidateBeforeCall(TranslateNodeIdOnlineRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
21319+ return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
21320+ }
21321+
21322+ /**
21323+ * Translate a node id to a node path.
21324+ * @param request Request object
21325+ * @return TranslateNodeIdResponse
21326+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
21327+ * @throws IOException If fail to serialize the request body object
21328+ */
21329+ public TranslateNodeIdResponse translateNodeIdOnline(TranslateNodeIdOnlineRequest request) throws ApiException, MessagingException, IOException {
21330+ try {
21331+ ApiResponse< TranslateNodeIdResponse > resp = translateNodeIdOnlineWithHttpInfo(request);
21332+ return resp.getData();
21333+ }
21334+ catch (ApiException ex) {
21335+ if (ex.getCode() == apiClient.getNotAuthCode()) {
21336+ apiClient.requestToken();
21337+ ApiResponse< TranslateNodeIdResponse > resp = translateNodeIdOnlineWithHttpInfo(request);
21338+ return resp.getData();
21339+ }
21340+ throw ex;
21341+ }
21342+ }
21343+
21344+ /**
21345+ * Translate a node id to a node path.
21346+ * @param request Request object
21347+ * @return ApiResponse< TranslateNodeIdResponse >;
21348+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
21349+ * @throws IOException If fail to serialize the request body object
21350+ */
21351+ private ApiResponse< TranslateNodeIdResponse > translateNodeIdOnlineWithHttpInfo(TranslateNodeIdOnlineRequest request) throws ApiException, MessagingException, IOException {
21352+ com.squareup.okhttp.Call call = translateNodeIdOnlineValidateBeforeCall(request, null, null);
21353+ return apiClient.execute(call, request);
21354+ }
21355+
21356+ /**
21357+ * Translate a node id to a node path. (asynchronously)
21358+ * @param request Request object
21359+ * @param callback The callback to be executed when the API call finishes
21360+ * @return The request call
21361+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
21362+ * @throws IOException If fail to serialize the request body object
21363+ */
21364+ public com.squareup.okhttp.Call translateNodeIdOnlineAsync(TranslateNodeIdOnlineRequest request, final ApiCallback< TranslateNodeIdResponse > callback) throws ApiException, MessagingException, IOException {
21365+
21366+ ProgressResponseBody.ProgressListener progressListener = null;
21367+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
21368+
21369+ if (callback != null) {
21370+ progressListener = new ProgressResponseBody.ProgressListener() {
21371+ @Override
21372+ public void update(long bytesRead, long contentLength, boolean done) {
21373+ callback.onDownloadProgress(bytesRead, contentLength, done);
21374+ }
21375+ };
21376+
21377+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
21378+ @Override
21379+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
21380+ callback.onUploadProgress(bytesWritten, contentLength, done);
21381+ }
21382+ };
21383+ }
21384+
21385+ com.squareup.okhttp.Call call = translateNodeIdOnlineValidateBeforeCall(request, progressListener, progressRequestListener);
21386+ apiClient.executeAsync(call, request, callback);
21387+ return call;
21388+ }
21389+
2124421390 @SuppressWarnings("rawtypes")
2124521391 private com.squareup.okhttp.Call unprotectDocumentValidateBeforeCall(UnprotectDocumentRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
2124621392 return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
0 commit comments