10
10
import org .gitlab4j .api .models .Assignee ;
11
11
import org .gitlab4j .api .utils .JacksonJson ;
12
12
13
- public class EventChanges {
13
+ public abstract class EventChanges {
14
14
15
- private ChangeContainer <String > state ;
15
+ private ChangeContainer <Integer > authorId ;
16
+ private ChangeContainer <Date > createdAt ;
16
17
private ChangeContainer <Date > updatedAt ;
17
18
private ChangeContainer <Integer > updatedById ;
18
- private ChangeContainer <Date > dueDate ;
19
+ private ChangeContainer <String > title ;
20
+ private ChangeContainer <String > description ;
21
+ private ChangeContainer <String > state ;
19
22
private ChangeContainer <Integer > milestoneId ;
20
23
private ChangeContainer <List <EventLabel >> labels ;
21
24
private ChangeContainer <List <Assignee >> assignees ;
22
25
private ChangeContainer <Integer > totalTimeSpent ;
23
- private ChangeContainer <Boolean > confidential ;
24
- private LinkedHashMap <String , ChangeContainer <Object >> otherProperties = new LinkedHashMap <>();
26
+ private Map <String , ChangeContainer <Object >> otherProperties = new LinkedHashMap <>();
27
+
28
+ public ChangeContainer <Integer > getAuthorId () {
29
+ return authorId ;
30
+ }
31
+
32
+ public void setAuthorId (ChangeContainer <Integer > authorId ) {
33
+ this .authorId = authorId ;
34
+ }
35
+
36
+ public ChangeContainer <Date > getCreatedAt () {
37
+ return createdAt ;
38
+ }
39
+
40
+ public void setCreatedAt (ChangeContainer <Date > createdAt ) {
41
+ this .createdAt = createdAt ;
42
+ }
25
43
26
44
public ChangeContainer <Date > getUpdatedAt () {
27
45
return updatedAt ;
@@ -39,12 +57,28 @@ public void setUpdatedById(ChangeContainer<Integer> updatedById) {
39
57
this .updatedById = updatedById ;
40
58
}
41
59
42
- public ChangeContainer <Date > getDueDate () {
43
- return dueDate ;
60
+ public ChangeContainer <String > getTitle () {
61
+ return title ;
62
+ }
63
+
64
+ public void setTitle (ChangeContainer <String > title ) {
65
+ this .title = title ;
66
+ }
67
+
68
+ public ChangeContainer <String > getDescription () {
69
+ return description ;
44
70
}
45
71
46
- public void setDueDate (ChangeContainer <Date > dueDate ) {
47
- this .dueDate = dueDate ;
72
+ public void setDescription (ChangeContainer <String > description ) {
73
+ this .description = description ;
74
+ }
75
+
76
+ public ChangeContainer <String > getState () {
77
+ return state ;
78
+ }
79
+
80
+ public void setState (ChangeContainer <String > state ) {
81
+ this .state = state ;
48
82
}
49
83
50
84
public ChangeContainer <Integer > getMilestoneId () {
@@ -79,27 +113,13 @@ public void setTotalTimeSpent(ChangeContainer<Integer> totalTimeSpent) {
79
113
this .totalTimeSpent = totalTimeSpent ;
80
114
}
81
115
82
- public ChangeContainer <Boolean > getConfidential () {
83
- return confidential ;
84
- }
85
-
86
- public void setConfidential (ChangeContainer <Boolean > confidential ) {
87
- this .confidential = confidential ;
88
- }
89
-
90
- public ChangeContainer <String > getState () {
91
- return state ;
92
- }
93
-
94
- public void setState (ChangeContainer <String > state ) {
95
- this .state = state ;
96
- }
97
-
116
+ @ SuppressWarnings ("unchecked" )
98
117
public <T > ChangeContainer <T > get (String property ){
118
+
99
119
if (otherProperties .containsKey (property )){
100
120
try {
101
121
final ChangeContainer <Object > container = otherProperties .get (property );
102
- //noinspection unchecked It's duty from caller to be sure to do that
122
+ // noinspection unchecked : It's duty from caller to be sure to do that
103
123
return container != null ? (ChangeContainer <T >) container : null ;
104
124
} catch (ClassCastException e ) {
105
125
return null ;
0 commit comments