forked from gitlab4j/gitlab4j-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIteration.java
165 lines (126 loc) · 3.36 KB
/
Iteration.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
package org.gitlab4j.api.models;
import java.io.Serializable;
import java.util.Date;
import org.gitlab4j.models.utils.JacksonJson;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
public class Iteration implements Serializable {
private static final long serialVersionUID = 1L;
public enum IterationState {
UPCOMMING(1),
CURRENT(2),
CLOSED(3);
private int value;
IterationState(int value) {
this.value = value;
}
@JsonCreator
public static IterationState fromIntValue(int value) {
for (IterationState it : values()) {
if (it.value == value) {
return it;
}
}
throw new IllegalArgumentException("No enum found for value: " + value);
}
@JsonValue
public int toIntValue() {
return this.value;
}
@Override
public String toString() {
return name();
}
}
private Long id;
private Long iid;
private Long sequence;
private Long groupId;
private String title;
private String description;
private IterationState state;
private Date createdAt;
private Date updatedAt;
@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date startDate;
@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date dueDate;
private String webUrl;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getIid() {
return iid;
}
public void setIid(Long iid) {
this.iid = iid;
}
public Long getSequence() {
return sequence;
}
public void setSequence(Long sequence) {
this.sequence = sequence;
}
public Long getGroupId() {
return groupId;
}
public void setGroupId(Long groupId) {
this.groupId = groupId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public IterationState getState() {
return state;
}
public void setState(IterationState state) {
this.state = state;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
public String getWebUrl() {
return webUrl;
}
public void setWebUrl(String webUrl) {
this.webUrl = webUrl;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}