class CreateRobotAction extends AdminAction {
    private static final Logger LOG = LoggerFactory.getLogger(CreateRobotAction.class);

    @Override
    public boolean isTransactionAction() {
        return true;
    }

    @Override
    public boolean action(Request request, Response response) {<FILL_FUNCTION_BODY>}
}

        if (request.getNettyRequest() instanceof FullHttpRequest) {
            InputCreateRobot inputCreateRobot = getRequestBody(request.getNettyRequest(), InputCreateRobot.class);
            if (inputCreateRobot != null
                && !StringUtil.isNullOrEmpty(inputCreateRobot.getName())) {

                if(StringUtil.isNullOrEmpty(inputCreateRobot.getUserId())) {
                    inputCreateRobot.setUserId(messagesStore.getShortUUID());
                }

                WFCMessage.User newUser = inputCreateRobot.toUser();
                try {
                    messagesStore.addUserInfo(newUser);
                } catch (Exception e) {
                    e.printStackTrace();
                    Utility.printExecption(LOG, e, IMExceptionEvent.EventType.ADMIN_API_Exception);
                    response.setStatus(HttpResponseStatus.OK);
                    RestResult result = RestResult.resultOf(ErrorCode.ERROR_CODE_SERVER_ERROR, e.getMessage());
                    response.setContent(gson.toJson(result));
                    return true;
                }

                if (StringUtil.isNullOrEmpty(inputCreateRobot.getOwner())) {
                    inputCreateRobot.setOwner(inputCreateRobot.getUserId());
                }

                if (StringUtil.isNullOrEmpty(inputCreateRobot.getSecret())) {
                    inputCreateRobot.setSecret(UUIDGenerator.getUUID());
                }
                messagesStore.addRobot(inputCreateRobot.toRobot());
                setResponseContent(RestResult.ok(new OutputCreateRobot(inputCreateRobot.getUserId(), inputCreateRobot.getSecret())), response);
            } else {
                setResponseContent(RestResult.resultOf(ErrorCode.INVALID_PARAMETER), response);
            }

        }
        return true;
    
<methods>public non-sealed void <init>() ,public static java.lang.String getSecretKey() ,public cn.wildfirechat.common.ErrorCode preAction(com.xiaoleilu.loServer.handler.Request, com.xiaoleilu.loServer.handler.Response) ,public static void setNoCheckTime(java.lang.String) ,public static void setSecretKey(java.lang.String) <variables>private static final org.slf4j.Logger LOG,private static boolean NO_CHECK_TIME,private static java.lang.String SECRET_KEY