@@ -7740,6 +7740,243 @@ def put_resource_with_http_info(self, request, **kwargs): # noqa: E501
77407740 collection_formats=collection_formats)
77417741
77427742
7743+ def clear_leveling(self, request, **kwargs): # noqa: E501
7744+ """Clears leveling delays that was previously added to the project during resource leveling. If request body is empty, all leveling delays will be cleared. # noqa: E501
7745+
7746+ This method makes a synchronous HTTP request by default. To make an
7747+ asynchronous HTTP request, please pass is_async=True
7748+
7749+ :param is_async bool
7750+ :param name str : The name of the file (required)
7751+ :param task_uids list[int] : The array containing task uids for which leveling delay should be cleared. If not specified, all leveling delays will be cleared.
7752+ :param file_name str : The name of the project document to save changes to. If this parameter is omitted then the changes will be saved to the source project document.
7753+ :param folder str : The folder storage
7754+ :param storage str : The document storage.
7755+ :return: AsposeResponse
7756+ If the method is called asynchronously,
7757+ returns the request thread.
7758+ """
7759+ kwargs['_return_http_data_only'] = True
7760+ try:
7761+ if kwargs.get('is_async'):
7762+ return self.clear_leveling_with_http_info(request, **kwargs) # noqa: E501
7763+ (data) = self.clear_leveling_with_http_info(request, **kwargs) # noqa: E501
7764+ return data
7765+ except ApiException as e:
7766+ if e.status == 401:
7767+ self.__request_token()
7768+ if kwargs.get('is_async'):
7769+ return self.clear_leveling_with_http_info(request, **kwargs) # noqa: E501
7770+ (data) = self.clear_leveling_with_http_info(request, **kwargs) # noqa: E501
7771+ return data
7772+
7773+ def clear_leveling_with_http_info(self, request, **kwargs): # noqa: E501
7774+ """Clears leveling delays that was previously added to the project during resource leveling. If request body is empty, all leveling delays will be cleared. # noqa: E501
7775+
7776+ This method makes a synchronous HTTP request by default. To make an
7777+ asynchronous HTTP request, please pass is_async=True
7778+
7779+ :param is_async bool
7780+ :param request clear_leveling_request object with parameters
7781+ :return: AsposeResponse
7782+ If the method is called asynchronously,
7783+ returns the request thread.
7784+ """
7785+
7786+ params = locals()
7787+ params['is_async'] = ''
7788+ params['_return_http_data_only'] = False
7789+ params['_preload_content'] = True
7790+ params['_request_timeout'] = ''
7791+ for key, val in six.iteritems(params['kwargs']):
7792+ if key not in params:
7793+ raise TypeError(
7794+ "Got an unexpected keyword argument '%s'"
7795+ " to method clear_leveling" % key
7796+ )
7797+ params[key] = val
7798+ del params['kwargs']
7799+ # verify the required parameter 'name' is set
7800+ if request.name is None:
7801+ raise ValueError("Missing the required parameter `name` when calling `clear_leveling`") # noqa: E501
7802+
7803+ collection_formats = {}
7804+ path = '/tasks/{name}/resourceLevel'
7805+ path_params = {}
7806+ if request.name is not None:
7807+ path_params[self.__downcase_first_letter('name')] = request.name # noqa: E501
7808+
7809+ query_params = []
7810+ if '{' + self.__downcase_first_letter('fileName') + '}' in path:
7811+ path = path.replace('{' + self.__downcase_first_letter('fileName' + '}'), request.file_name if request.file_name is not None else '')
7812+ else:
7813+ if request.file_name is not None:
7814+ query_params.append((self.__downcase_first_letter('fileName'), request.file_name)) # noqa: E501
7815+ if '{' + self.__downcase_first_letter('folder') + '}' in path:
7816+ path = path.replace('{' + self.__downcase_first_letter('folder' + '}'), request.folder if request.folder is not None else '')
7817+ else:
7818+ if request.folder is not None:
7819+ query_params.append((self.__downcase_first_letter('folder'), request.folder)) # noqa: E501
7820+ if '{' + self.__downcase_first_letter('storage') + '}' in path:
7821+ path = path.replace('{' + self.__downcase_first_letter('storage' + '}'), request.storage if request.storage is not None else '')
7822+ else:
7823+ if request.storage is not None:
7824+ query_params.append((self.__downcase_first_letter('storage'), request.storage)) # noqa: E501
7825+
7826+ header_params = {}
7827+
7828+ form_params = []
7829+ local_var_files = []
7830+
7831+ body_params = None
7832+ if request.task_uids is not None:
7833+ body_params = request.task_uids
7834+ # HTTP header `Accept`
7835+ header_params['Accept'] = self.api_client.select_header_accept(
7836+ ['application/json']) # noqa: E501
7837+
7838+ # HTTP header `Content-Type`
7839+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
7840+ ['application/json']) # noqa: E501
7841+
7842+ # Authentication setting
7843+ auth_settings = ['JWT'] # noqa: E501
7844+
7845+ return self.api_client.call_api(
7846+ path, 'DELETE',
7847+ path_params,
7848+ query_params,
7849+ header_params,
7850+ body=body_params,
7851+ post_params=form_params,
7852+ files=local_var_files,
7853+ response_type='AsposeResponse', # noqa: E501
7854+ auth_settings=auth_settings,
7855+ is_async=params.get('is_async'),
7856+ _return_http_data_only=params.get('_return_http_data_only'),
7857+ _preload_content=params.get('_preload_content', True),
7858+ _request_timeout=params.get('_request_timeout'),
7859+ collection_formats=collection_formats)
7860+
7861+ def level_tasks(self, request, **kwargs): # noqa: E501
7862+ """Levels tasks for project’s resources. If request body is empty, all project's resources with default leveling options will be leveled. # noqa: E501
7863+
7864+ This method makes a synchronous HTTP request by default. To make an
7865+ asynchronous HTTP request, please pass is_async=True
7866+
7867+ :param is_async bool
7868+ :param name str : The name of the file (required)
7869+ :param options LevelingOptions : Options which specifies how to level resources. If not specified, default leveling options will be used.
7870+ :param file_name str : The name of the project document to save changes to. If this parameter is omitted then the changes will be saved to the source project document.
7871+ :param folder str : The folder storage
7872+ :param storage str : The document storage.
7873+ :return: LevelingResponse
7874+ If the method is called asynchronously,
7875+ returns the request thread.
7876+ """
7877+ kwargs['_return_http_data_only'] = True
7878+ try:
7879+ if kwargs.get('is_async'):
7880+ return self.level_tasks_with_http_info(request, **kwargs) # noqa: E501
7881+ (data) = self.level_tasks_with_http_info(request, **kwargs) # noqa: E501
7882+ return data
7883+ except ApiException as e:
7884+ if e.status == 401:
7885+ self.__request_token()
7886+ if kwargs.get('is_async'):
7887+ return self.level_tasks_with_http_info(request, **kwargs) # noqa: E501
7888+ (data) = self.level_tasks_with_http_info(request, **kwargs) # noqa: E501
7889+ return data
7890+
7891+ def level_tasks_with_http_info(self, request, **kwargs): # noqa: E501
7892+ """Levels tasks for project’s resources. If request body is empty, all project's resources with default leveling options will be leveled. # noqa: E501
7893+
7894+ This method makes a synchronous HTTP request by default. To make an
7895+ asynchronous HTTP request, please pass is_async=True
7896+
7897+ :param is_async bool
7898+ :param request level_tasks_request object with parameters
7899+ :return: LevelingResponse
7900+ If the method is called asynchronously,
7901+ returns the request thread.
7902+ """
7903+
7904+ params = locals()
7905+ params['is_async'] = ''
7906+ params['_return_http_data_only'] = False
7907+ params['_preload_content'] = True
7908+ params['_request_timeout'] = ''
7909+ for key, val in six.iteritems(params['kwargs']):
7910+ if key not in params:
7911+ raise TypeError(
7912+ "Got an unexpected keyword argument '%s'"
7913+ " to method level_tasks" % key
7914+ )
7915+ params[key] = val
7916+ del params['kwargs']
7917+ # verify the required parameter 'name' is set
7918+ if request.name is None:
7919+ raise ValueError("Missing the required parameter `name` when calling `level_tasks`") # noqa: E501
7920+
7921+ collection_formats = {}
7922+ path = '/tasks/{name}/resourceLevel'
7923+ path_params = {}
7924+ if request.name is not None:
7925+ path_params[self.__downcase_first_letter('name')] = request.name # noqa: E501
7926+
7927+ query_params = []
7928+ if '{' + self.__downcase_first_letter('fileName') + '}' in path:
7929+ path = path.replace('{' + self.__downcase_first_letter('fileName' + '}'), request.file_name if request.file_name is not None else '')
7930+ else:
7931+ if request.file_name is not None:
7932+ query_params.append((self.__downcase_first_letter('fileName'), request.file_name)) # noqa: E501
7933+ if '{' + self.__downcase_first_letter('folder') + '}' in path:
7934+ path = path.replace('{' + self.__downcase_first_letter('folder' + '}'), request.folder if request.folder is not None else '')
7935+ else:
7936+ if request.folder is not None:
7937+ query_params.append((self.__downcase_first_letter('folder'), request.folder)) # noqa: E501
7938+ if '{' + self.__downcase_first_letter('storage') + '}' in path:
7939+ path = path.replace('{' + self.__downcase_first_letter('storage' + '}'), request.storage if request.storage is not None else '')
7940+ else:
7941+ if request.storage is not None:
7942+ query_params.append((self.__downcase_first_letter('storage'), request.storage)) # noqa: E501
7943+
7944+ header_params = {}
7945+
7946+ form_params = []
7947+ local_var_files = []
7948+
7949+ body_params = None
7950+ if request.options is not None:
7951+ body_params = request.options
7952+ # HTTP header `Accept`
7953+ header_params['Accept'] = self.api_client.select_header_accept(
7954+ ['application/json']) # noqa: E501
7955+
7956+ # HTTP header `Content-Type`
7957+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
7958+ ['application/json']) # noqa: E501
7959+
7960+ # Authentication setting
7961+ auth_settings = ['JWT'] # noqa: E501
7962+
7963+ return self.api_client.call_api(
7964+ path, 'PUT',
7965+ path_params,
7966+ query_params,
7967+ header_params,
7968+ body=body_params,
7969+ post_params=form_params,
7970+ files=local_var_files,
7971+ response_type='LevelingResponse', # noqa: E501
7972+ auth_settings=auth_settings,
7973+ is_async=params.get('is_async'),
7974+ _return_http_data_only=params.get('_return_http_data_only'),
7975+ _preload_content=params.get('_preload_content', True),
7976+ _request_timeout=params.get('_request_timeout'),
7977+ collection_formats=collection_formats)
7978+
7979+
77437980 def get_risk_analysis_report(self, request, **kwargs): # noqa: E501
77447981 """Performs a risk analysys using Monte Carlo simulation and creates a risk analysis report. # noqa: E501
77457982
0 commit comments