summaryrefslogtreecommitdiffstats
path: root/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApi.java
blob: cf35d745acc8788ea8dbd809acf3809d4dc7bad5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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);

    }

}