summaryrefslogtreecommitdiffstats
path: root/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApi.java
blob: 141058c24a7bea6ee77359548cb00dded3b643c9 (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
/**
 * 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 org.openslx.bwlp.sat.api.model.StatusFileserver;
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 = "status", description = "the status API")
public interface StatusApi {

    default Optional<NativeWebRequest> getRequest() {
        return Optional.empty();
    }

    /**
     * GET /status/fileserver : Get bwLehrpool-Server status
     *
     * @return Successful operation (status code 200)
     */

    @ApiOperation(value = "Get bwLehrpool-Server status", nickname = "getFileserverStatus", notes = "", response = StatusFileserver.class, tags={ "server", })
    @ApiResponses(value = { 

        @ApiResponse(code = 200, message = "Successful operation", response = StatusFileserver.class) })
    @RequestMapping(
        method = RequestMethod.GET,
        value = "/status/fileserver",
        produces = { "application/json" }
    )
    default ResponseEntity<StatusFileserver> getFileserverStatus() {
        getRequest().ifPresent(request -> {
            for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
                if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
                    String exampleString = "{ \"activeUploads\" : 0, \"activeDownloads\" : 6 }";
                    ApiUtil.setExampleResponse(request, "application/json", exampleString);
                    break;
                }
            }
        });
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);

    }

}