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 defaultValue = "0",
50 minimum = "0",
51 maxItems = Integer.MAX_VALUE
52 )
53 @Min(value = 0, message = "The generation must be at least 0.")
54 @Max(value = Integer.MAX_VALUE, message = "The generation must not be bigger than " + Integer.MAX_VALUE + ".")
55 Integer getObservedGeneration();
56
57 @Schema(
58 name = "history",
59 description = "A list of changes of the resource status.",
60 nullable = true,
61 minItems = 0
62 )
63 @Size
64 <T extends History> List<T> getHistory();
65 }