class JobManagementSpringResource {

    @ApiOperation("Update an existing job's capacity. Optional attributes min / max / desired are supported.")
    @PutMapping(path = "/jobs/{jobId}/capacityAttributes")
    public ResponseEntity<Void> setCapacityWithOptionalAttributes(@PathVariable("jobId") String jobId,
                                                                  @RequestBody JobCapacityWithOptionalAttributes capacity,
                                                                  CallMetadataAuthentication authentication) {
        JobCapacityUpdateWithOptionalAttributes jobCapacityUpdateWithOptionalAttributes = JobCapacityUpdateWithOptionalAttributes.newBuilder()
                .setJobId(jobId)
                .setJobCapacityWithOptionalAttributes(capacity)
                .build();
        return Responses.fromCompletable(
                jobServiceGateway.updateJobCapacityWithOptionalAttributes(jobCapacityUpdateWithOptionalAttributes, authentication.getCallMetadata()),
                HttpStatus.OK
        );
    }

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

}