class AlertDefineController {

    @Autowired
    private AlertDefineService alertDefineService;

    @PostMapping
    @Operation(summary = "New Alarm Definition", description = "Added an alarm definition")
    public ResponseEntity<Message<Void>> addNewAlertDefine(@Valid @RequestBody AlertDefine alertDefine) {
        // Verify request data
        alertDefineService.validate(alertDefine, false);
        alertDefineService.addAlertDefine(alertDefine);
        return ResponseEntity.ok(Message.success("Add success"));
    }

    @PutMapping
    @Operation(summary = "Modifying an Alarm Definition", description = "Modify an existing alarm definition")
    public ResponseEntity<Message<Void>> modifyAlertDefine(@Valid @RequestBody AlertDefine alertDefine) {
        // Verify request data
        alertDefineService.validate(alertDefine, true);
        alertDefineService.modifyAlertDefine(alertDefine);
        return ResponseEntity.ok(Message.success("Modify success"));
    }

    @GetMapping(path = "/{id}")
    @Operation(summary = "Querying Alarm Definitions",
            description = "You can obtain alarm definition information based on the alarm definition ID")
    public ResponseEntity<Message<AlertDefine>> getAlertDefine(
            @Parameter(description = "Alarm Definition ID", example = "6565463543") @PathVariable("id") long id) {
        // Obtaining Monitoring Information
        AlertDefine alertDefine = alertDefineService.getAlertDefine(id);
        if (alertDefine == null) {
            return ResponseEntity.ok(Message.fail(MONITOR_NOT_EXIST_CODE, "AlertDefine not exist."));
        } else {
            return ResponseEntity.ok(Message.success(alertDefine));
        }
    }

    @DeleteMapping(path = "/{id}")
    @Operation(summary = "Deleting an Alarm Definition",
            description = "If the alarm definition does not exist, the alarm is deleted successfully")
    public ResponseEntity<Message<Void>> deleteAlertDefine(
            @Parameter(description = "Alarm Definition ID", example = "6565463543") @PathVariable("id") long id) {
        // If the alarm definition does not exist or is deleted successfully, the deletion succeeds
        alertDefineService.deleteAlertDefine(id);
        return ResponseEntity.ok(Message.success("Delete success"));
    }

    @PostMapping(path = "/{alertDefineId}/monitors")
    @Operation(summary = "Application alarm definition is associated with monitoring",
            description = "Applies the association between specified alarm definitions and monitoring")
    public ResponseEntity<Message<Void>> applyAlertDefineMonitorsBind(
            @Parameter(description = "Alarm Definition ID", example = "6565463543") @PathVariable("alertDefineId") long alertDefineId,
            @RequestBody List<AlertDefineMonitorBind> alertDefineMonitorBinds) {
        alertDefineService.applyBindAlertDefineMonitors(alertDefineId, alertDefineMonitorBinds);
        return ResponseEntity.ok(Message.success("Apply success"));
    }

    @GetMapping(path = "/{alertDefineId}/monitors")
    @Operation(summary = "Application alarm definition is associated with monitoring",
            description = "Applies the association between specified alarm definitions and monitoring")
    public ResponseEntity<Message<List<AlertDefineMonitorBind>>> getAlertDefineMonitorsBind(
            @Parameter(description = "Alarm Definition ID", example = "6565463543") @PathVariable("alertDefineId") long alertDefineId) {<FILL_FUNCTION_BODY>}

}

        List<AlertDefineMonitorBind> defineBinds = alertDefineService.getBindAlertDefineMonitors(alertDefineId);
        defineBinds = defineBinds.stream().filter(item -> item.getMonitor() != null).collect(Collectors.toList());
        return ResponseEntity.ok(Message.success(defineBinds));
    
<no_super_class>