class JobManagementSpringResource {

    @ApiOperation("Update an existing job's capacity")
    @PutMapping(path = "/jobs/{jobId}/instances")
    public ResponseEntity<Void> setInstances(@PathVariable("jobId") String jobId,
                                             @RequestBody Capacity capacity,
                                             CallMetadataAuthentication authentication) {
        JobCapacityUpdate jobCapacityUpdate = JobCapacityUpdate.newBuilder()
                .setJobId(jobId)
                .setCapacity(capacity)
                .build();
        return Responses.fromCompletable(
                jobServiceGateway.updateJobCapacity(jobCapacityUpdate, authentication.getCallMetadata()),
                HttpStatus.OK
        );
    }

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

}