'* PATCH /api/folders/{encoded_folder_id}
Update the folder defined by an ``encoded_folder_id`` with the data in the payload.
.. note:: Currently, only admin users can update library folders. Also the folder must not be `deleted`.
:param  id:      the encoded id of the folder
:type   id:      an encoded id string
:param  payload: (required) dictionary structure containing::
\'name\':         new folder\'s name, cannot be empty
\'description\':  new folder\'s description
:type   payload: dict
:returns:   detailed folder information
:rtype:     dict
:raises: RequestParameterMissingException'

@expose_api
def update(self, trans, encoded_folder_id, payload=None, **kwd):

    decoded_folder_id = self.folder_manager.cut_and_decode(trans, encoded_folder_id)
    folder = self.folder_manager.get(trans, decoded_folder_id)
    if payload:
        kwd.update(payload)
    name = kwd.get('name', None)
    if (not name):
        raise exceptions.RequestParameterMissingException("Parameter    'name'    of    library    folder    is    required.    You    cannot    remove    it.")
    description = kwd.get('description', None)
    updated_folder = self.folder_manager.update(trans, folder, name, description)
    folder_dict = self.folder_manager.get_folder_dict(trans, updated_folder)
    return folder_dict
