class JobManagementSpringResource {

    @ApiOperation("Kill task")
    @DeleteMapping(path = "/tasks/{taskId}")
    public ResponseEntity<Void> killTask(
            @PathVariable("taskId") String taskId,
            @RequestParam(name = "shrink", defaultValue = "false") boolean shrink,
            @RequestParam(name = "preventMinSizeUpdate", defaultValue = "false") boolean preventMinSizeUpdate,
            CallMetadataAuthentication authentication
    ) {
        TaskKillRequest taskKillRequest = TaskKillRequest.newBuilder()
                .setTaskId(taskId)
                .setShrink(shrink)
                .setPreventMinSizeUpdate(preventMinSizeUpdate)
                .build();
        return Responses.fromCompletable(jobServiceGateway.killTask(taskKillRequest, authentication.getCallMetadata()), HttpStatus.OK);
    }

    @Inject public  JobManagementSpringResource(JobServiceGateway jobServiceGateway, SystemLogService systemLog);

}