Skip to content

Commit 5211cde

Browse files
committed
Initial commit (#325).
1 parent ec84b49 commit 5211cde

File tree

2 files changed

+183
-0
lines changed

2 files changed

+183
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package org.gitlab4j.api.webhook;
2+
3+
import java.util.Date;
4+
import java.util.List;
5+
import java.util.Map;
6+
7+
import javax.xml.bind.annotation.XmlAccessType;
8+
import javax.xml.bind.annotation.XmlAccessorType;
9+
10+
import org.gitlab4j.api.utils.JacksonJson;
11+
12+
@XmlAccessorType(XmlAccessType.FIELD)
13+
public class EventChanges {
14+
15+
private List<Integer> updatedById;
16+
private List<Date> updatedAt;
17+
private Map<String, List<EventLabel>> labels;
18+
19+
public List<Integer> getUpdatedById() {
20+
return updatedById;
21+
}
22+
23+
public void setUpdatedById(List<Integer> updatedById) {
24+
this.updatedById = updatedById;
25+
}
26+
27+
public List<Date> getUpdatedAt() {
28+
return updatedAt;
29+
}
30+
31+
public void setUpdatedAt(List<Date> updatedAt) {
32+
this.updatedAt = updatedAt;
33+
}
34+
35+
public Map<String, List<EventLabel>> getLabels() {
36+
return labels;
37+
}
38+
39+
public void setLabels(Map<String, List<EventLabel>> labels) {
40+
this.labels = labels;
41+
}
42+
43+
@Override
44+
public String toString() {
45+
return (JacksonJson.toJsonString(this));
46+
}
47+
}
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
package org.gitlab4j.api.webhook;
2+
3+
import java.util.Date;
4+
5+
import javax.xml.bind.annotation.XmlAccessType;
6+
import javax.xml.bind.annotation.XmlAccessorType;
7+
import javax.xml.bind.annotation.XmlRootElement;
8+
9+
import org.gitlab4j.api.utils.JacksonJson;
10+
import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
11+
12+
import com.fasterxml.jackson.annotation.JsonCreator;
13+
import com.fasterxml.jackson.annotation.JsonValue;
14+
15+
@XmlRootElement
16+
@XmlAccessorType(XmlAccessType.FIELD)
17+
public class EventLabel {
18+
19+
public enum LabelType {
20+
21+
PROJECT_LABEL;
22+
23+
private static JacksonJsonEnumHelper<LabelType> enumHelper = new JacksonJsonEnumHelper<>(LabelType.class, true, true);
24+
25+
@JsonCreator
26+
public static LabelType forValue(String value) {
27+
return enumHelper.forValue(value);
28+
}
29+
30+
@JsonValue
31+
public String toValue() {
32+
return (enumHelper.toString(this));
33+
}
34+
35+
@Override
36+
public String toString() {
37+
return (enumHelper.toString(this));
38+
}
39+
}
40+
41+
private Integer id;
42+
private String title;
43+
private String color;
44+
private Integer projectId;
45+
private Date createdAt;
46+
private Date updatedAt;
47+
private Boolean template;
48+
private String description;
49+
private LabelType type;
50+
private Integer groupId;
51+
52+
public Integer getId() {
53+
return id;
54+
}
55+
56+
public void setId(Integer id) {
57+
this.id = id;
58+
}
59+
60+
public String getTitle() {
61+
return title;
62+
}
63+
64+
public void setTitle(String title) {
65+
this.title = title;
66+
}
67+
68+
public String getColor() {
69+
return color;
70+
}
71+
72+
public void setColor(String color) {
73+
this.color = color;
74+
}
75+
76+
public Integer getProjectId() {
77+
return projectId;
78+
}
79+
80+
public void setProjectId(Integer projectId) {
81+
this.projectId = projectId;
82+
}
83+
84+
public Date getCreatedAt() {
85+
return createdAt;
86+
}
87+
88+
public void setCreatedAt(Date createdAt) {
89+
this.createdAt = createdAt;
90+
}
91+
92+
public Date getUpdatedAt() {
93+
return updatedAt;
94+
}
95+
96+
public void setUpdatedAt(Date updatedAt) {
97+
this.updatedAt = updatedAt;
98+
}
99+
100+
public Boolean getTemplate() {
101+
return template;
102+
}
103+
104+
public void setTemplate(Boolean template) {
105+
this.template = template;
106+
}
107+
108+
public String getDescription() {
109+
return description;
110+
}
111+
112+
public void setDescription(String description) {
113+
this.description = description;
114+
}
115+
116+
public LabelType getType() {
117+
return type;
118+
}
119+
120+
public void setType(LabelType type) {
121+
this.type = type;
122+
}
123+
124+
public Integer getGroupId() {
125+
return groupId;
126+
}
127+
128+
public void setGroupId(Integer groupId) {
129+
this.groupId = groupId;
130+
}
131+
132+
@Override
133+
public String toString() {
134+
return (JacksonJson.toJsonString(this));
135+
}
136+
}

0 commit comments

Comments
 (0)