diff options
Diffstat (limited to 'dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApi.java')
-rw-r--r-- | dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApi.java | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApi.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApi.java new file mode 100644 index 00000000..cf35d745 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApi.java @@ -0,0 +1,152 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openslx.bwlp.sat.api.handler; + +import java.util.UUID; +import org.openslx.bwlp.sat.api.model.VirtualMachineImages; +import io.swagger.annotations.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +@Validated +@Api(value = "vmchooser", description = "the vmchooser API") +public interface VmchooserApi { + + default Optional<NativeWebRequest> getRequest() { + return Optional.empty(); + } + + /** + * GET /vmchooser/lecture/{uuid}/imagemeta : Get metadata of virtual mchine image for specified lecture + * + * @param uuid UUID of the lecture (required) + * @return Successful operation (status code 200) + * or Faild to retrieve metadata (status code 500) + */ + + @ApiOperation(value = "Get metadata of virtual mchine image for specified lecture", nickname = "vmchooserGetLectureImageMeta", notes = "", tags={ "vmchooser", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 500, message = "Faild to retrieve metadata") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/vmchooser/lecture/{uuid}/imagemeta", + produces = { "application/json" } + ) + default ResponseEntity<Void> vmchooserGetLectureImageMeta(@ApiParam(value = "UUID of the lecture", required = true) @PathVariable("uuid") UUID uuid + +) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /vmchooser/lecture/{uuid}/metadata : Get metadata for specified lecture + * + * @param uuid UUID of the lecture (required) + * @return Successful operation (status code 200) + * or Faild to retrieve metadata (status code 500) + */ + + @ApiOperation(value = "Get metadata for specified lecture", nickname = "vmchooserGetLectureMetadata", notes = "", tags={ "vmchooser", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 500, message = "Faild to retrieve metadata") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/vmchooser/lecture/{uuid}/metadata", + produces = { "application/gzip" } + ) + default ResponseEntity<Void> vmchooserGetLectureMetadata(@ApiParam(value = "UUID of the lecture", required = true) @PathVariable("uuid") UUID uuid + +) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /vmchooser/lecture/{uuid}/netrules : Get network rules for specified lecture + * + * @param uuid UUID of the lecture (required) + * @return Successful operation (status code 200) + * or Faild to retrieve network rules (status code 500) + */ + + @ApiOperation(value = "Get network rules for specified lecture", nickname = "vmchooserGetLectureNetRules", notes = "", tags={ "vmchooser", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 500, message = "Faild to retrieve network rules") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/vmchooser/lecture/{uuid}/netrules", + produces = { "text/plain" } + ) + default ResponseEntity<Void> vmchooserGetLectureNetRules(@ApiParam(value = "UUID of the lecture", required = true) @PathVariable("uuid") UUID uuid + +) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /vmchooser/list : List all bwLehrpool virtual machine images + * + * @param locations IDs of locations that need to be considered for the filter (optional) + * @param exams Include exam events for the filter (optional, default to false) + * @return Successful operation (status code 200) + * or Failed to retrieve list (status code 500) + */ + + @ApiOperation(value = "List all bwLehrpool virtual machine images", nickname = "vmchooserGetList", notes = "", response = VirtualMachineImages.class, tags={ "vmchooser", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation", response = VirtualMachineImages.class), + + @ApiResponse(code = 500, message = "Failed to retrieve list") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/vmchooser/list", + produces = { "application/xml" } + ) + default ResponseEntity<VirtualMachineImages> vmchooserGetList(@ApiParam(value = "IDs of locations that need to be considered for the filter") @Valid @RequestParam(value = "locations", required = false) List<Integer> locations + +,@ApiParam(value = "Include exam events for the filter", defaultValue = "false") @Valid @RequestParam(value = "exams", required = false, defaultValue = "false") Boolean exams + +) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = "<settings> </settings>"; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} |