22
33import java .util .Date ;
44import java .util .List ;
5+ import java .util .Map ;
56
7+ import org .gitlab4j .api .utils .JacksonJsonEnumHelper ;
68import org .gitlab4j .api .utils .JacksonJson ;
79
10+ import com .fasterxml .jackson .annotation .JsonCreator ;
11+ import com .fasterxml .jackson .annotation .JsonIgnore ;
12+ import com .fasterxml .jackson .annotation .JsonProperty ;
13+ import com .fasterxml .jackson .annotation .JsonValue ;
14+
815public class Epic {
916
17+ public enum EpicState {
18+ OPENED , CLOSED , ALL ;
19+
20+ private static JacksonJsonEnumHelper <EpicState > enumHelper = new JacksonJsonEnumHelper <>(EpicState .class );
21+
22+ @ JsonCreator
23+ public static EpicState forValue (String value ) {
24+ return enumHelper .forValue (value );
25+ }
26+
27+ @ JsonValue
28+ public String toValue () {
29+ return (enumHelper .toString (this ));
30+ }
31+
32+ public String toString () {
33+ return (enumHelper .toString (this ));
34+ }
35+ }
36+
1037 private Long id ;
1138 private Long iid ;
1239 private Long groupId ;
40+ private Long parentId ;
41+ private Long parentIid ;
1342 private String title ;
1443 private String description ;
44+ private EpicState state ;
45+ private String webUrl ;
46+ private String reference ;
47+ private References references ;
1548 private Author author ;
1649 private List <String > labels ;
1750 private Date startDate ;
51+ private Boolean startDateIsFixed ;
52+ private Date dueDate ;
53+ private Boolean dueDateIsFixed ;
54+ private Date dueDateFromInheritedSource ;
1855 private Date endDate ;
1956 private Date createdAt ;
2057 private Date updatedAt ;
58+ private Date closedAt ;
59+ private Integer downvotes ;
60+ private Integer upvotes ;
61+ private String color ;
62+ private Boolean subscribed ;
63+ @ JsonProperty ("_links" )
64+ private Map <String , String > links ;
2165
2266 public Long getId () {
2367 return id ;
@@ -43,6 +87,22 @@ public void setGroupId(Long groupId) {
4387 this .groupId = groupId ;
4488 }
4589
90+ public Long getParentId () {
91+ return parentId ;
92+ }
93+
94+ public void setParentId (Long parentId ) {
95+ this .parentId = parentId ;
96+ }
97+
98+ public Long getParentIid () {
99+ return parentIid ;
100+ }
101+
102+ public void setParentIid (Long parentIid ) {
103+ this .parentIid = parentIid ;
104+ }
105+
46106 public String getTitle () {
47107 return title ;
48108 }
@@ -69,6 +129,38 @@ public Epic withDescription(String description) {
69129 return (this );
70130 }
71131
132+ public EpicState getState () {
133+ return state ;
134+ }
135+
136+ public void setState (EpicState state ) {
137+ this .state = state ;
138+ }
139+
140+ public String getWebUrl () {
141+ return webUrl ;
142+ }
143+
144+ public void setWebUrl (String webUrl ) {
145+ this .webUrl = webUrl ;
146+ }
147+
148+ public String getReference () {
149+ return reference ;
150+ }
151+
152+ public void setReference (String reference ) {
153+ this .reference = reference ;
154+ }
155+
156+ public References getReferences () {
157+ return references ;
158+ }
159+
160+ public void setReferences (References references ) {
161+ this .references = references ;
162+ }
163+
72164 public Author getAuthor () {
73165 return author ;
74166 }
@@ -108,6 +200,38 @@ public Epic withStartDate(Date startDate) {
108200 return (this );
109201 }
110202
203+ public Boolean getStartDateIsFixed () {
204+ return startDateIsFixed ;
205+ }
206+
207+ public void setStartDateIsFixed (Boolean startDateIsFixed ) {
208+ this .startDateIsFixed = startDateIsFixed ;
209+ }
210+
211+ public Date getDueDate () {
212+ return dueDate ;
213+ }
214+
215+ public void setDueDate (Date dueDate ) {
216+ this .dueDate = dueDate ;
217+ }
218+
219+ public Boolean getDueDateIsFixed () {
220+ return dueDateIsFixed ;
221+ }
222+
223+ public void setDueDateIsFixed (Boolean dueDateIsFixed ) {
224+ this .dueDateIsFixed = dueDateIsFixed ;
225+ }
226+
227+ public Date getDueDateFromInheritedSource () {
228+ return dueDateFromInheritedSource ;
229+ }
230+
231+ public void setDueDateFromInheritedSource (Date dueDateFromInheritedSource ) {
232+ this .dueDateFromInheritedSource = dueDateFromInheritedSource ;
233+ }
234+
111235 public Date getEndDate () {
112236 return endDate ;
113237 }
@@ -137,7 +261,63 @@ public void setUpdatedAt(Date updatedAt) {
137261 this .updatedAt = updatedAt ;
138262 }
139263
140- @ Override
264+ public Date getClosedAt () {
265+ return closedAt ;
266+ }
267+
268+ public void setClosedAt (Date closedAt ) {
269+ this .closedAt = closedAt ;
270+ }
271+
272+ public Integer getDownvotes () {
273+ return downvotes ;
274+ }
275+
276+ public void setDownvotes (Integer downvotes ) {
277+ this .downvotes = downvotes ;
278+ }
279+
280+ public Integer getUpvotes () {
281+ return upvotes ;
282+ }
283+
284+ public void setUpvotes (Integer upvotes ) {
285+ this .upvotes = upvotes ;
286+ }
287+
288+ public String getColor () {
289+ return color ;
290+ }
291+
292+ public void setColor (String color ) {
293+ this .color = color ;
294+ }
295+
296+ public Boolean getSubscribed () {
297+ return subscribed ;
298+ }
299+
300+ public void setSubscribed (Boolean subscribed ) {
301+ this .subscribed = subscribed ;
302+ }
303+
304+ public Map <String , String > getLinks () {
305+ return links ;
306+ }
307+
308+ public void setLinks (Map <String , String > links ) {
309+ this .links = links ;
310+ }
311+
312+ @ JsonIgnore
313+ public String getLinkByName (String name ) {
314+ if (links == null || links .isEmpty ()) {
315+ return (null );
316+ }
317+
318+ return (links .get (name ));
319+ }
320+
141321 public String toString () {
142322 return (JacksonJson .toJsonString (this ));
143323 }
0 commit comments