docs: public static Permission[] getPermissionsByResourceType(int givenResourceType) {
      Class<? extends Enum<? extends Permission>> clazz = PERMISSION_ENUMS.get(givenResourceType);
      if (clazz == null) {
        return Permissions.values();
      }
      return ((Permission[]) clazz.getEnumConstants());
    }