public static Permission.Action toPermissionAction(AccessControlProtos.Permission.Action action) {
    switch (action) {
      case READ:
        return Permission.Action.READ;
      case WRITE:
        return Permission.Action.WRITE;
      case EXEC:
        return Permission.Action.EXEC;
      case CREATE:
        return Permission.Action.CREATE;
      case ADMIN:
        return Permission.Action.ADMIN;
    }
    throw new IllegalArgumentException("Unknown action value " + action.name());
  }
Converts a Permission.Action proto to a client Permission.Action object.
@param action the protobuf Action
@return the converted Action
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlUtil.java