'update( self, trans, history_id, id, payload, **kwd )
* PUT /api/histories/{history_id}/contents/{id}
updates the values for the HDA with the given ``id``
:type   history_id: str
:param  history_id: encoded id string of the HDA\'s History
:type   id:         str
:param  id:         the encoded id of the history to update
:type   payload:    dict
:param  payload:    a dictionary containing any or all the
fields in :func:`galaxy.model.HistoryDatasetAssociation.to_dict`
and/or the following:
* annotation: an annotation for the HDA
:rtype:     dict
:returns:   an error object if an error occurred or a dictionary containing
any values that were different from the original and, therefore, updated'

@expose_api_anonymous
def update(self, trans, history_id, id, payload, **kwd):

    contents_type = kwd.get('type', 'dataset')
    if (contents_type == 'dataset'):
        return self.__update_dataset(trans, history_id, id, payload, **kwd)
    elif (contents_type == 'dataset_collection'):
        return self.__update_dataset_collection(trans, history_id, id, payload, **kwd)
    else:
        return self.__handle_unknown_contents_type(trans, contents_type)
