1010import org .gitlab4j .api .models .Assignee ;
1111import org .gitlab4j .api .utils .JacksonJson ;
1212
13- public class EventChanges {
13+ public abstract class EventChanges {
1414
15- private ChangeContainer <String > state ;
15+ private ChangeContainer <Integer > authorId ;
16+ private ChangeContainer <Date > createdAt ;
1617 private ChangeContainer <Date > updatedAt ;
1718 private ChangeContainer <Integer > updatedById ;
18- private ChangeContainer <Date > dueDate ;
19+ private ChangeContainer <String > title ;
20+ private ChangeContainer <String > description ;
21+ private ChangeContainer <String > state ;
1922 private ChangeContainer <Integer > milestoneId ;
2023 private ChangeContainer <List <EventLabel >> labels ;
2124 private ChangeContainer <List <Assignee >> assignees ;
2225 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+ }
2543
2644 public ChangeContainer <Date > getUpdatedAt () {
2745 return updatedAt ;
@@ -39,12 +57,28 @@ public void setUpdatedById(ChangeContainer<Integer> updatedById) {
3957 this .updatedById = updatedById ;
4058 }
4159
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 ;
4470 }
4571
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 ;
4882 }
4983
5084 public ChangeContainer <Integer > getMilestoneId () {
@@ -79,27 +113,13 @@ public void setTotalTimeSpent(ChangeContainer<Integer> totalTimeSpent) {
79113 this .totalTimeSpent = totalTimeSpent ;
80114 }
81115
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" )
98117 public <T > ChangeContainer <T > get (String property ){
118+
99119 if (otherProperties .containsKey (property )){
100120 try {
101121 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
103123 return container != null ? (ChangeContainer <T >) container : null ;
104124 } catch (ClassCastException e ) {
105125 return null ;
0 commit comments