code: private Delta createDelta(PermissionUpdateRequest request) {
          MapDeltaBuilder builder = Deltas.mapBuilder();
  
          for (String permissionString : request.getPermitted()) {
              builder.put("perm_" + validated(permissionString), 1);
          }
          for (String permissionString : request.getRevoked()) {
              builder.remove("perm_" + validated(permissionString));
          }
          if (request.isRevokeRest()) {
              builder.removeRest();
          }
          return builder.build();
      }
docs: Returns a delta constructed from this request, or null if the request contained no changes.