package etunicorn.generated; import etunicorn.generated.model.UpdateConsommationByIdRequest; import etunicorn.generated.model.UpdateConsommationRequest; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; /** * No description * (Generated with springmvc-raml-parser v.0.8.9) * */ @RestController @RequestMapping("/v1/consommation") public interface ConsommationController { /** * Obtenir la liste de toutes les consommations. Nécessite CONSO_ADMIN ou CONSO_ACHETER ou CONSO_REMBOURSER * */ @RequestMapping(value = "", method = RequestMethod.GET) public ResponseEntity getConsommation(); /** * Permet de creer une nouvelle consommation. Nécessite CONSO_ADMIN * */ @RequestMapping(value = "", method = RequestMethod.POST) public ResponseEntity updateConsommation( @javax.validation.Valid @org.springframework.web.bind.annotation.RequestBody UpdateConsommationRequest updateConsommationRequest); /** * Permet de modifier une consommation. Nécessite CONSO_ADMIN * */ @RequestMapping(value = "/{consommationId}", method = RequestMethod.PUT) public ResponseEntity updateConsommationById( @PathVariable Long consommationId, @javax.validation.Valid @org.springframework.web.bind.annotation.RequestBody UpdateConsommationByIdRequest updateConsommationByIdRequest); /** * Obtenir la consommation {consommationId}. Nécessite CONSO_ADMIN ou CONSO_ACHETER ou CONSO_REMBOURSER * */ @RequestMapping(value = "/{consommationId}", method = RequestMethod.GET) public ResponseEntity getConsommationById( @PathVariable Long consommationId); /** * Permet de supprimer la consommation {consommationId}. Nécessite CONSO_ADMIN * */ @RequestMapping(value = "/{consommationId}", method = RequestMethod.DELETE) public ResponseEntity deleteConsommationById( @PathVariable Long consommationId); }