1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package de.kaiserpfalzedv.commons.api.resources;
19
20 import java.io.Serializable;
21 import java.util.List;
22
23 import org.eclipse.microprofile.openapi.annotations.media.Schema;
24
25 import jakarta.validation.constraints.Max;
26 import jakarta.validation.constraints.Min;
27 import jakarta.validation.constraints.Size;
28
29
30
31
32
33
34
35 public interface Status extends Serializable, Cloneable {
36
37
38
39
40
41
42
43 Status addHistory(String status, String message);
44
45 @Schema(
46 name = "observedGeneration",
47 description = "The generation of this resource which is observed.",
48 required = true,
49 example = "0",
50 defaultValue = "0",
51 minimum = "0",
52 maxItems = Integer.MAX_VALUE
53 )
54 @Min(value = 0, message = "The generation must be at least 0.")
55 @Max(value = Integer.MAX_VALUE, message = "The generation must not be bigger than " + Integer.MAX_VALUE + ".")
56 Integer getObservedGeneration();
57
58 @Schema(
59 name = "history",
60 description = "A list of changes of the resource status.",
61 nullable = true,
62 minItems = 0
63 )
64 @Size
65 List<? extends History> getHistory();
66 }