class WhiteIpListAPI extends API {

    private static final Logger LOG = Log.logger(WhiteIpListAPI.class);

    @GET
    @Timed
    @Produces(APPLICATION_JSON_WITH_CHARSET)
    @RolesAllowed("admin")
    @Operation(summary = "list white ips")
    public Map<String, Object> list(@Context GraphManager manager) {
        LOG.debug("List white ips");
        AuthManager authManager = manager.authManager();
        Set<String> whiteIpList = authManager.listWhiteIPs();
        return ImmutableMap.of("whiteIpList", whiteIpList);
    }

    @POST
    @Timed
    @StatusFilter.Status(StatusFilter.Status.ACCEPTED)
    @Consumes(APPLICATION_JSON)
    @Produces(APPLICATION_JSON_WITH_CHARSET)
    @RolesAllowed("admin")
    @Operation(summary = "update white ip list")
    public Map<String, Object> updateWhiteIPs(@Context GraphManager manager,
                                              Map<String, Object> actionMap) {<FILL_FUNCTION_BODY>}

    @PUT
    @Timed
    @Produces(APPLICATION_JSON_WITH_CHARSET)
    @RolesAllowed("admin")
    @Operation(summary = "enable/disable the white ip list")
    public Map<String, Object> updateStatus(@Context GraphManager manager,
                                            @QueryParam("status") String status) {
        LOG.debug("Enable or disable white ip list");
        E.checkArgument("true".equals(status) ||
                        "false".equals(status),
                        "Invalid status, valid status is 'true' or 'false'");
        boolean open = Boolean.parseBoolean(status);
        manager.authManager().enabledWhiteIpList(open);
        Map<String, Object> map = new HashMap<>();
        map.put("WhiteIpListOpen", open);
        return map;
    }

    private boolean checkIp(String ipStr) {
        String ip = "^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\."
                    + "(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\."
                    + "(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\."
                    + "(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)$";
        Pattern pattern = Pattern.compile(ip);
        Matcher matcher = pattern.matcher(ipStr);
        return matcher.matches();
    }
}

        E.checkArgument(actionMap != null,
                        "Missing argument: actionMap");
        Set<String> whiteIpList = manager.authManager().listWhiteIPs();
        Object ipListRaw = actionMap.get("ips");
        E.checkArgument(ipListRaw instanceof List,
                        "Invalid ips type '%s', must be list", ipListRaw.getClass());
        List<String> ipList = (List<String>) ipListRaw;
        Object actionRaw = actionMap.get("action");
        E.checkArgument(actionRaw != null,
                        "Missing argument: action");
        E.checkArgument(actionRaw instanceof String,
                        "Invalid action type '%s', must be string",
                        actionRaw.getClass());
        String action = (String) actionRaw;
        E.checkArgument(StringUtils.isNotEmpty(action),
                        "Missing argument: action");
        Set<String> existedIPs = new HashSet<>();
        Set<String> loadedIPs = new HashSet<>();
        Set<String> illegalIPs = new HashSet<>();
        Map<String, Object> result = new HashMap<>();
        for (String ip : ipList) {
            if (whiteIpList.contains(ip)) {
                existedIPs.add(ip);
                continue;
            }
            if ("load".equals(action)) {
                boolean rightIp = checkIp(ip) ? loadedIPs.add(ip) : illegalIPs.add(ip);
            }
        }
        switch (action) {
            case "load":
                LOG.debug("Load to white ip list");
                result.put("existed_ips", existedIPs);
                result.put("added_ips", loadedIPs);
                if (!illegalIPs.isEmpty()) {
                    result.put("illegal_ips", illegalIPs);
                }
                whiteIpList.addAll(loadedIPs);
                break;
            case "remove":
                LOG.debug("Remove from white ip list");
                result.put("removed_ips", existedIPs);
                result.put("non_existed_ips", loadedIPs);
                whiteIpList.removeAll(existedIPs);
                break;
            default:
                throw new AssertionError(String.format("Invalid action '%s', " +
                                                       "supported action is " +
                                                       "'load' or 'remove'",
                                                       action));
        }
        manager.authManager().setWhiteIPs(whiteIpList);
        return result;
    
<methods>public non-sealed void <init>() ,public static boolean checkAndParseAction(java.lang.String) ,public static R commit(org.apache.hugegraph.HugeGraph, Callable<R>) ,public static void commit(org.apache.hugegraph.HugeGraph, java.lang.Runnable) ,public static org.apache.hugegraph.HugeGraph graph(org.apache.hugegraph.core.GraphManager, java.lang.String) ,public static org.apache.hugegraph.HugeGraph graph4admin(org.apache.hugegraph.core.GraphManager, java.lang.String) ,public static java.lang.Object[] properties(Map<java.lang.String,java.lang.Object>) <variables>public static final java.lang.String ACTION_APPEND,public static final java.lang.String ACTION_CLEAR,public static final java.lang.String ACTION_ELIMINATE,public static final java.lang.String APPLICATION_JSON,public static final java.lang.String APPLICATION_JSON_WITH_CHARSET,public static final java.lang.String APPLICATION_TEXT_WITH_CHARSET,public static final java.lang.String CHARSET,private static final Meter EXPECTED_ERROR_METER,private static final Meter ILLEGAL_ARG_ERROR_METER,public static final java.lang.String JSON,protected static final Logger LOG,private static final Meter SUCCEED_METER,public static final java.lang.String TEXT_PLAIN,private static final Meter UNKNOWN_ERROR_METER