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 com.fasterxml.jackson.annotation.JsonIgnore;
21
22 import java.io.Serializable;
23 import java.util.UUID;
24
25
26
27
28
29
30
31 public interface Resource<D extends Serializable> extends Pointer, HasMetadata {
32
33
34
35 @JsonIgnore
36 Pointer toPointer();
37
38 @JsonIgnore
39 @Override
40 default String getKind() {
41 return getMetadata().getKind();
42 }
43
44 @JsonIgnore
45 @Override
46 default String getApiVersion() {
47 return getMetadata().getApiVersion();
48 }
49
50 @JsonIgnore
51 @Override
52 default String getNameSpace() {
53 return getMetadata().getNameSpace();
54 }
55
56 @JsonIgnore
57 @Override
58 default String getName() {
59 return getMetadata().getName();
60 }
61
62 @JsonIgnore
63 default UUID getUid() {
64 return getMetadata().getUid();
65 }
66
67 @JsonIgnore
68 default Integer getGeneration() {
69 return getMetadata().getGeneration();
70 }
71
72 @JsonIgnore
73 String getSelfLink();
74
75 Resource<D> increaseGeneration();
76
77 D getSpec();
78
79 Status getStatus();
80 }