'PUT /api/quotas/{encoded_quota_id}
Modifies a quota.'

@web.expose_api
@web.require_admin
def update(self, trans, id, payload, **kwd):

    try:
        self.validate_in_users_and_groups(trans, payload)
    except Exception as e:
        raise HTTPBadRequest(detail=str(e))
    quota = self.get_quota(trans, id, deleted=False)
    payload['id'] = id
    params = self.get_quota_params(payload)
    methods = []
    if (payload.get('name', None) or payload.get('description', None)):
        methods.append(self._rename_quota)
    if payload.get('amount', None):
        methods.append(self._edit_quota)
    if (payload.get('default', None) == 'no'):
        methods.append(self._unset_quota_default)
    elif payload.get('default', None):
        methods.append(self._set_quota_default)
    if (payload.get('in_users', None) or payload.get('in_groups', None)):
        methods.append(self._manage_users_and_groups_for_quota)
    messages = []
    for method in methods:
        try:
            message = method(quota, params)
        except ActionInputError as e:
            raise HTTPBadRequest(detail=str(e))
        messages.append(message)
    return ';    '.join(messages)
