Skip to content

Commit c4839f1

Browse files
add JsonAnnotations to missed attributes
1 parent 8267a27 commit c4839f1

File tree

4 files changed

+108
-3
lines changed

4 files changed

+108
-3
lines changed

gitlab4j-models/src/main/java/org/gitlab4j/api/models/Build.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ public class Build {
2525
private BuildStatus status;
2626

2727
@JsonProperty("created_at")
28-
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z")
28+
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
2929
private Date createdAt;
3030

3131
@JsonProperty("started_at")
32-
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z")
32+
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
3333
private Date startedAt;
3434

3535
@JsonProperty("finished_at")
36-
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss z")
36+
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
3737
private Date finishedAt;
3838

3939
@JsonProperty("duration")

gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/EventIssue.java

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,27 +57,70 @@ public class EventIssue {
5757
@JsonProperty("action")
5858
private String action;
5959

60+
@JsonProperty("assignee_ids")
6061
private List<Long> assigneeIds;
62+
63+
@JsonProperty("updated_by_id")
6164
private Long updatedById;
65+
66+
@JsonProperty("last_edited_at")
6267
private Date lastEditedAt;
68+
69+
@JsonProperty("last_edited_by_id")
6370
private Long lastEditedById;
71+
72+
@JsonProperty("relative_position")
6473
private Long relativePosition;
74+
75+
@JsonProperty("state_id")
6576
private Long stateId;
77+
78+
@JsonProperty("confidential")
6679
private Boolean confidential;
80+
81+
@JsonProperty("discussion_locked")
6782
private Boolean discussionLocked;
83+
84+
@JsonProperty("due_date")
6885
private Date dueDate;
86+
87+
@JsonProperty("moved_to_id")
6988
private Long movedToId;
89+
90+
@JsonProperty("duplicated_to_id")
7091
private Long duplicatedToId;
92+
93+
@JsonProperty("time_estimate")
7194
private Long timeEstimate;
95+
96+
@JsonProperty("total_time_spent")
7297
private Long totalTimeSpent;
98+
99+
@JsonProperty("time_change")
73100
private Long timeChange;
101+
102+
@JsonProperty("human_time_estimate")
74103
private String humanTimeEstimate;
104+
105+
@JsonProperty("human_total_time_spent")
75106
private String humanTotalTimeSpent;
107+
108+
@JsonProperty("human_time_change")
76109
private String humanTimeChange;
110+
111+
@JsonProperty("weight")
77112
private Long weight;
113+
114+
@JsonProperty("health_status")
78115
private String healthStatus;
116+
117+
@JsonProperty("type")
79118
private String type;
119+
120+
@JsonProperty("severity")
80121
private String severity;
122+
123+
@JsonProperty("labels")
81124
private List<EventLabel> labels;
82125

83126
public Long getAssigneeId() {

gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/PipelineEvent.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import org.gitlab4j.api.models.Variable;
99
import org.gitlab4j.models.utils.JacksonJson;
1010

11+
import com.fasterxml.jackson.annotation.JsonFormat;
1112
import com.fasterxml.jackson.annotation.JsonProperty;
1213

1314
public class PipelineEvent extends AbstractEvent {
@@ -104,22 +105,57 @@ public void setBuilds(List<Build> builds) {
104105

105106
public static class ObjectAttributes {
106107

108+
@JsonProperty("id")
107109
private Long id;
110+
111+
@JsonProperty("iid")
108112
private Long iid;
113+
114+
@JsonProperty("name")
109115
private String name;
116+
117+
@JsonProperty("ref")
110118
private String ref;
119+
120+
@JsonProperty("tag")
111121
private Boolean tag;
122+
123+
@JsonProperty("sha")
112124
private String sha;
125+
126+
@JsonProperty("before_sha")
113127
private String beforeSha;
128+
129+
@JsonProperty("source")
114130
private String source;
131+
132+
@JsonProperty("status")
115133
private String status;
134+
135+
@JsonProperty("detailed_status")
116136
private String detailedStatus;
137+
138+
@JsonProperty("stages")
117139
private List<String> stages;
140+
141+
@JsonProperty("created_at")
142+
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
118143
private Date createdAt;
144+
145+
@JsonProperty("finished_at")
146+
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
119147
private Date finishedAt;
148+
149+
@JsonProperty("duration")
120150
private Integer duration;
151+
152+
@JsonProperty("queued_duration")
121153
private Float queuedDuration;
154+
155+
@JsonProperty("variables")
122156
private List<Variable> variables;
157+
158+
@JsonProperty("url")
123159
private String url;
124160

125161
public Long getId() {

gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/WikiPageEvent.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,19 @@ public void setObjectAttributes(ObjectAttributes objectAttributes) {
6565

6666
public static class Wiki {
6767

68+
@JsonProperty("web_url")
6869
private String webUrl;
70+
71+
@JsonProperty("git_http_url")
6972
private String git_http_url;
73+
74+
@JsonProperty("git_ssh_url")
7075
private String git_ssh_url;
76+
77+
@JsonProperty("path_with_namespace")
7178
private String pathWithNamespace;
79+
80+
@JsonProperty("default_branch")
7281
private String defaultBranch;
7382

7483
public String getWebUrl() {
@@ -114,14 +123,31 @@ public void setDefaultBranch(String defaultBranch) {
114123

115124
public static class ObjectAttributes {
116125

126+
@JsonProperty("title")
117127
private String title;
128+
129+
@JsonProperty("content")
118130
private String content;
131+
132+
@JsonProperty("format")
119133
private String format;
134+
135+
@JsonProperty("message")
120136
private String message;
137+
138+
@JsonProperty("slug")
121139
private String slug;
140+
141+
@JsonProperty("url")
122142
private String url;
143+
144+
@JsonProperty("action")
123145
private String action;
146+
147+
@JsonProperty("diff_url")
124148
private String diffUrl;
149+
150+
@JsonProperty("version_id")
125151
private String versionId;
126152

127153
public String getTitle() {

0 commit comments

Comments
 (0)