@@ -9317,6 +9317,147 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
93179317 apiClient.executeAsync(call, localVarReturnType, callback);
93189318 return call;
93199319 }
9320+ /**
9321+ * Build call for getPrimaveraTaskProperties
9322+ * @param request GetPrimaveraTaskProperties request with main agrs
9323+ * @param progressListener Progress listener
9324+ * @param progressRequestListener Progress request listener
9325+ * @return Call to execute
9326+ * @throws ApiException If fail to serialize the request body object
9327+ */
9328+ private com.squareup.okhttp.Call getPrimaveraTaskPropertiesCall(GetPrimaveraTaskPropertiesRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
9329+ Object localVarPostBody = null;
9330+
9331+ // create path and map variables
9332+ String localVarPath = "/tasks/{name}/tasks/{taskUid}/primaveraProperties"
9333+ .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(request.getname().toString()))
9334+ .replaceAll("\\{" + "taskUid" + "\\}", apiClient.escapeString(request.gettaskUid().toString()));
9335+
9336+ List<Pair> localVarQueryParams = new ArrayList<Pair>();
9337+ List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
9338+ localVarPath = addParameterToQuery(localVarQueryParams, localVarPath, "folder", request.getfolder());
9339+ localVarPath = addParameterToQuery(localVarQueryParams, localVarPath, "storage", request.getstorage());
9340+
9341+ Map<String, String> localVarHeaderParams = new HashMap<String, String>();
9342+
9343+ Map<String, Object> localVarFormParams = new LinkedHashMap<String, Object>();
9344+
9345+ final String[] localVarAccepts = {
9346+ "application/json"
9347+ };
9348+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
9349+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
9350+
9351+ final String[] localVarContentTypes = {
9352+ "application/json"
9353+ };
9354+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
9355+ localVarHeaderParams.put("Content-Type", localVarContentType);
9356+
9357+ if (progressListener != null) {
9358+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
9359+ @Override
9360+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
9361+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
9362+ return originalResponse.newBuilder()
9363+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
9364+ .build();
9365+ }
9366+ });
9367+ }
9368+
9369+ String[] localVarAuthNames = new String[] { "JWT" };
9370+ return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
9371+ }
9372+
9373+ @SuppressWarnings("rawtypes")
9374+ private com.squareup.okhttp.Call getPrimaveraTaskPropertiesValidateBeforeCall(GetPrimaveraTaskPropertiesRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
9375+
9376+ // verify the required parameter 'name' is set
9377+ if (request.getname() == null) {
9378+ throw new ApiException(BadRequest, "Missing the required parameter 'name' when calling getPrimaveraTaskProperties");
9379+ }
9380+
9381+ // verify the required parameter 'taskUid' is set
9382+ if (request.gettaskUid() == null) {
9383+ throw new ApiException(BadRequest, "Missing the required parameter 'taskUid' when calling getPrimaveraTaskProperties");
9384+ }
9385+
9386+
9387+ com.squareup.okhttp.Call call = getPrimaveraTaskPropertiesCall(request, progressListener, progressRequestListener);
9388+ return call;
9389+
9390+ }
9391+
9392+ /**
9393+ * Get primavera properties for a task with the specified Uid.
9394+ *
9395+ * request GetPrimaveraTaskProperties request with main agrs
9396+ * @return PrimaveraTaskPropertiesResponse
9397+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
9398+ */
9399+ public PrimaveraTaskPropertiesResponse getPrimaveraTaskProperties(GetPrimaveraTaskPropertiesRequest request) throws ApiException {
9400+ try {
9401+ ApiResponse<PrimaveraTaskPropertiesResponse> resp = getPrimaveraTaskPropertiesWithHttpInfo(request);
9402+ return resp.getData();
9403+ }
9404+ catch (ApiException ex) {
9405+ if (ex.getCode() == NotAuth) {
9406+ apiClient.requestToken();
9407+ ApiResponse<PrimaveraTaskPropertiesResponse> resp = getPrimaveraTaskPropertiesWithHttpInfo(request);
9408+ return resp.getData();
9409+ }
9410+ throw ex;
9411+ }
9412+ }
9413+
9414+ /**
9415+ * Get primavera properties for a task with the specified Uid.
9416+ *
9417+ * @param request GetPrimaveraTaskProperties request with main agrs
9418+ * @return ApiResponse<PrimaveraTaskPropertiesResponse>
9419+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
9420+ */
9421+ private ApiResponse<PrimaveraTaskPropertiesResponse> getPrimaveraTaskPropertiesWithHttpInfo(GetPrimaveraTaskPropertiesRequest request) throws ApiException {
9422+ com.squareup.okhttp.Call call = getPrimaveraTaskPropertiesValidateBeforeCall(request, null, null);
9423+ Type localVarReturnType = new TypeToken<PrimaveraTaskPropertiesResponse>() { }.getType();
9424+ return apiClient.execute(call, localVarReturnType);
9425+ }
9426+
9427+ /**
9428+ * Get primavera properties for a task with the specified Uid. (asynchronously)
9429+ *
9430+ * @param request GetPrimaveraTaskProperties request with main agrs
9431+ * @param callback The callback to be executed when the API call finishes
9432+ * @return The request call
9433+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
9434+ */
9435+ public com.squareup.okhttp.Call getPrimaveraTaskPropertiesAsync(GetPrimaveraTaskPropertiesRequest request, final ApiCallback<PrimaveraTaskPropertiesResponse> callback) throws ApiException {
9436+
9437+ ProgressResponseBody.ProgressListener progressListener = null;
9438+ ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
9439+
9440+ if (callback != null) {
9441+ progressListener = new ProgressResponseBody.ProgressListener() {
9442+ @Override
9443+ public void update(long bytesRead, long contentLength, boolean done) {
9444+ callback.onDownloadProgress(bytesRead, contentLength, done);
9445+ }
9446+ };
9447+
9448+ progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
9449+ @Override
9450+ public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
9451+ callback.onUploadProgress(bytesWritten, contentLength, done);
9452+ }
9453+ };
9454+ }
9455+
9456+ com.squareup.okhttp.Call call = getPrimaveraTaskPropertiesValidateBeforeCall(request, progressListener, progressRequestListener);
9457+ Type localVarReturnType = new TypeToken<PrimaveraTaskPropertiesResponse>() { }.getType();
9458+ apiClient.executeAsync(call, localVarReturnType, callback);
9459+ return call;
9460+ }
93209461 /**
93219462 * Build call for getTask
93229463 * @param request GetTask request with main agrs
0 commit comments