class AlertSilenceController {

    @Autowired
    private AlertSilenceService alertSilenceService;

    @PostMapping
    @Operation(summary = "New Alarm Silence", description = "Added an alarm Silence")
    public ResponseEntity<Message<Void>> addNewAlertSilence(@Valid @RequestBody AlertSilence alertSilence) {
        alertSilenceService.validate(alertSilence, false);
        alertSilenceService.addAlertSilence(alertSilence);
        return ResponseEntity.ok(Message.success("Add success"));
    }

    @PutMapping
    @Operation(summary = "Modifying an Alarm Silence", description = "Modify an existing alarm Silence")
    public ResponseEntity<Message<Void>> modifyAlertSilence(@Valid @RequestBody AlertSilence alertSilence) {
        alertSilenceService.validate(alertSilence, true);
        alertSilenceService.modifyAlertSilence(alertSilence);
        return ResponseEntity.ok(Message.success("Modify success"));
    }

    @GetMapping(path = "/{id}")
    @Operation(summary = "Querying Alarm Silence",
            description = "You can obtain alarm Silence information based on the alarm Silence ID")
    public ResponseEntity<Message<AlertSilence>> getAlertSilence(
            @Parameter(description = "Alarm Silence ID", example = "6565463543") @PathVariable("id") long id) {<FILL_FUNCTION_BODY>}

}

        AlertSilence alertSilence = alertSilenceService.getAlertSilence(id);
        if (alertSilence == null) {
            return ResponseEntity.ok(Message.fail(MONITOR_NOT_EXIST_CODE, "AlertSilence not exist."));
        } else {
            return ResponseEntity.ok(Message.success(alertSilence));
        }
    
<no_super_class>