code: public static RoleBean unmarshallRole(Map<String, Object> source) {
          if (source == null) {
              return null;
          }
          RoleBean bean = new RoleBean();
          bean.setId(asString(source.get("id")));
          bean.setName(asString(source.get("name")));
          bean.setDescription(asString(source.get("description")));
          bean.setCreatedBy(asString(source.get("createdBy")));
          bean.setCreatedOn(asDate(source.get("createdOn")));
          bean.setAutoGrant(asBoolean(source.get("autoGrant")));
          @SuppressWarnings("unchecked")
          List<Object> permissions = (List<Object>) source.get("permissions");
          if (permissions != null && !permissions.isEmpty()) {
              bean.setPermissions(new HashSet<>());
              for (Object permission : permissions) {
                  bean.getPermissions().add(asEnum(permission, PermissionType.class));
              }
          }
          postMarshall(bean);
          return bean;
      }
docs: Unmarshals the given map source into a bean.
  @param source the source
  @return the role