class JobManagementSpringResource {

    @ApiOperation("Update attributes of a job")
    @PutMapping(path = "/jobs/{jobId}/attributes")
    public ResponseEntity<Void> updateJobAttributes(@PathVariable("jobId") String jobId,
                                                    @RequestBody JobAttributesUpdate request,
                                                    CallMetadataAuthentication authentication) {
        JobAttributesUpdate sanitizedRequest;
        if (request.getJobId().isEmpty()) {
            sanitizedRequest = request.toBuilder().setJobId(jobId).build();
        } else {
            if (!jobId.equals(request.getJobId())) {
                return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
            }
            sanitizedRequest = request;
        }
        return Responses.fromVoidMono(
                jobServiceGateway.updateJobAttributes(sanitizedRequest, authentication.getCallMetadata()),
                HttpStatus.OK
        );
    }

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

}