class AlertGroupController extends BaseController {

    @ApiOperation(value = "createAlertgroup", notes = "CREATE_ALERT_GROUP_NOTES")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "groupName", value = "GROUP_NAME", required = true, dataType = "String"),
            @ApiImplicitParam(name = "groupType", value = "GROUP_TYPE", required = true, dataType = "AlertType"),
            @ApiImplicitParam(name = "description", value = "DESC", dataType = "String")
    })
    @PostMapping(value = "/create")
    @ResponseStatus(HttpStatus.CREATED)
    @ApiException(CREATE_ALERT_GROUP_ERROR)
    public Result createAlertgroup(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
                                   @RequestParam(value = "groupName") String groupName,
                                   @RequestParam(value = "groupType") AlertType groupType,
                                   @RequestParam(value = "description", required = false) String description) {
        logger.info("loginUser user {}, create alertgroup, groupName: {}, groupType: {}, desc: {}",
                loginUser.getUserName(), groupName, groupType, description);
        Map<String, Object> result = alertGroupService.createAlertgroup(loginUser, groupName, groupType, description);
        return returnDataList(result);
    }

}