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

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

    library = self.library_manager.get(trans, self.__decode_id(trans, id, 'library'))
    if payload:
        kwd.update(payload)
    name = kwd.get('name', None)
    if (name == ''):
        raise exceptions.RequestParameterMissingException("Parameter    'name'    of    library    is    required.    You    cannot    remove    it.")
    description = kwd.get('description', None)
    synopsis = kwd.get('synopsis', None)
    updated_library = self.library_manager.update(trans, library, name, description, synopsis)
    library_dict = self.library_manager.get_library_dict(trans, updated_library)
    return library_dict
