async def update(self, group_name: str, service_name: str, project_name: str, task_name: str, parameters: 'models.ProjectTask', **kwargs) -> 'models.ProjectTask':
    'Create or update task.\n\n        The tasks resource is a nested, proxy-only resource representing work performed by a DMS\n        instance. The PATCH method updates an existing task, but since tasks have no mutable custom\n        properties, there is little reason to do so.\n\n        :param group_name: Name of the resource group.\n        :type group_name: str\n        :param service_name: Name of the service.\n        :type service_name: str\n        :param project_name: Name of the project.\n        :type project_name: str\n        :param task_name: Name of the Task.\n        :type task_name: str\n        :param parameters: Information about the task.\n        :type parameters: ~azure.mgmt.datamigration.models.ProjectTask\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: ProjectTask, or the result of cls(response)\n        :rtype: ~azure.mgmt.datamigration.models.ProjectTask\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    api_version = '2021-10-30-preview'
    content_type = kwargs.pop('content_type', 'application/json')
    accept = 'application/json'
    url = self.update.metadata['url']
    path_format_arguments = {'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str'), 'groupName': self._serialize.url('group_name', group_name, 'str'), 'serviceName': self._serialize.url('service_name', service_name, 'str'), 'projectName': self._serialize.url('project_name', project_name, 'str'), 'taskName': self._serialize.url('task_name', task_name, 'str')}
    url = self._client.format_url(url, **path_format_arguments)
    query_parameters = {}
    query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
    header_parameters = {}
    header_parameters['Content-Type'] = self._serialize.header('content_type', content_type, 'str')
    header_parameters['Accept'] = self._serialize.header('accept', accept, 'str')
    body_content_kwargs = {}
    body_content = self._serialize.body(parameters, 'ProjectTask')
    body_content_kwargs['content'] = body_content
    request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
    pipeline_response = (await self._client._pipeline.run(request, stream=False, **kwargs))
    response = pipeline_response.http_response
    if (response.status_code not in [200]):
        map_error(status_code=response.status_code, response=response, error_map=error_map)
        error = self._deserialize(models.ApiError, response)
        raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
    deserialized = self._deserialize('ProjectTask', pipeline_response)
    if cls:
        return cls(pipeline_response, deserialized, {})
    return deserialized
Create or update task.

The tasks resource is a nested, proxy-only resource representing work performed by a DMS
instance. The PATCH method updates an existing task, but since tasks have no mutable custom
properties, there is little reason to do so.

:param group_name: Name of the resource group.
:type group_name: str
:param service_name: Name of the service.
:type service_name: str
:param project_name: Name of the project.
:type project_name: str
:param task_name: Name of the Task.
:type task_name: str
:param parameters: Information about the task.
:type parameters: ~azure.mgmt.datamigration.models.ProjectTask
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ProjectTask, or the result of cls(response)
:rtype: ~azure.mgmt.datamigration.models.ProjectTask
:raises: ~azure.core.exceptions.HttpResponseError
async def update(self, group_name: str, service_name: str, project_name: str, task_name: str, parameters: 'models.ProjectTask', **kwargs) -> 'models.ProjectTask':
    'Create or update task.\n\n        The tasks resource is a nested, proxy-only resource representing work performed by a DMS\n        instance. The PATCH method updates an existing task, but since tasks have no mutable custom\n        properties, there is little reason to do so.\n\n        :param group_name: Name of the resource group.\n        :type group_name: str\n        :param service_name: Name of the service.\n        :type service_name: str\n        :param project_name: Name of the project.\n        :type project_name: str\n        :param task_name: Name of the Task.\n        :type task_name: str\n        :param parameters: Information about the task.\n        :type parameters: ~azure.mgmt.datamigration.models.ProjectTask\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: ProjectTask, or the result of cls(response)\n        :rtype: ~azure.mgmt.datamigration.models.ProjectTask\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    api_version = '2021-10-30-preview'
    content_type = kwargs.pop('content_type', 'application/json')
    accept = 'application/json'
    url = self.update.metadata['url']
    path_format_arguments = {'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str'), 'groupName': self._serialize.url('group_name', group_name, 'str'), 'serviceName': self._serialize.url('service_name', service_name, 'str'), 'projectName': self._serialize.url('project_name', project_name, 'str'), 'taskName': self._serialize.url('task_name', task_name, 'str')}
    url = self._client.format_url(url, **path_format_arguments)
    query_parameters = {}
    query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
    header_parameters = {}
    header_parameters['Content-Type'] = self._serialize.header('content_type', content_type, 'str')
    header_parameters['Accept'] = self._serialize.header('accept', accept, 'str')
    body_content_kwargs = {}
    body_content = self._serialize.body(parameters, 'ProjectTask')
    body_content_kwargs['content'] = body_content
    request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
    pipeline_response = (await self._client._pipeline.run(request, stream=False, **kwargs))
    response = pipeline_response.http_response
    if (response.status_code not in [200]):
        map_error(status_code=response.status_code, response=response, error_map=error_map)
        error = self._deserialize(models.ApiError, response)
        raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
    deserialized = self._deserialize('ProjectTask', pipeline_response)
    if cls:
        return cls(pipeline_response, deserialized, {})
    return deserialized