forked from gitlab4j/gitlab4j-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJob.java
More file actions
379 lines (298 loc) · 7.86 KB
/
Job.java
File metadata and controls
379 lines (298 loc) · 7.86 KB
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
package org.gitlab4j.api.models;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.gitlab4j.models.utils.JacksonJson;
public class Job implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private Commit commit;
private String coverage;
private Date createdAt;
private Date finishedAt;
private Date erasedAt;
private Date artifactsExpireAt;
private String name;
private Pipeline pipeline;
private String ref;
private Runner runner;
private User user;
private Date startedAt;
private ArtifactsFile artifactsFile;
private List<Artifact> artifacts;
private Boolean tag;
private List<String> tagList;
private String webUrl;
private String stage;
private JobStatus status;
private String failureReason;
private String when;
private Boolean manual;
private Boolean allowFailure;
private Float duration;
private Float queuedDuration;
private Project project;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Commit getCommit() {
return commit;
}
public void setCommit(Commit commit) {
this.commit = commit;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getFinishedAt() {
return finishedAt;
}
public void setFinishedAt(Date finishedAt) {
this.finishedAt = finishedAt;
}
/**
* When someone deletes job using
* <a href="https://docs.gitlab.com/ee/api/jobs.html#erase-a-job">job erase api</a>, you can
* detect it using this field. Normally erasing job does mean only that job artifacts and
* a job logs gets removed. Job metadata (started_at, duration, ....) stays in place.
*
* You can use this attribute to filter out such jobs, that have erased at non-null if you need
* to.
*/
public Date getErasedAt() {
return erasedAt;
}
public void setErasedAt(Date erasedAt) {
this.erasedAt = erasedAt;
}
public Date getArtifactsExpireAt() {
return artifactsExpireAt;
}
public void setArtifactsExpireAt(Date artifactsExpireAt) {
this.artifactsExpireAt = artifactsExpireAt;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Pipeline getPipeline() {
return pipeline;
}
public void setPipeline(Pipeline pipeline) {
this.pipeline = pipeline;
}
public String getRef() {
return ref;
}
public void setRef(String ref) {
this.ref = ref;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public Date getStartedAt() {
return startedAt;
}
public void setStartedAt(Date startedAt) {
this.startedAt = startedAt;
}
public Boolean getTag() {
return tag;
}
public void setTag(Boolean tag) {
this.tag = tag;
}
public List<String> getTagList() {
return tagList;
}
public void setTagList(List<String> tagList) {
this.tagList = tagList;
}
public String getWebUrl() {
return webUrl;
}
public void setWebUrl(String webUrl) {
this.webUrl = webUrl;
}
public String getStage() {
return stage;
}
public void setStage(String stage) {
this.stage = stage;
}
public JobStatus getStatus() {
return status;
}
public void setStatus(JobStatus status) {
this.status = status;
}
public String getFailureReason() {
return this.failureReason;
}
public void setFailureReason(String failureReason) {
this.failureReason = failureReason;
}
public String getCoverage() {
return coverage;
}
public void setCoverage(String coverage) {
this.coverage = coverage;
}
public ArtifactsFile getArtifactsFile() {
return artifactsFile;
}
public void setArtifactsFile(ArtifactsFile artifactsFile) {
this.artifactsFile = artifactsFile;
}
public List<Artifact> getArtifacts() {
return artifacts;
}
public void setArtifacts(List<Artifact> artifacts) {
this.artifacts = artifacts;
}
public Runner getRunner() {
return runner;
}
public void setRunner(Runner runner) {
this.runner = runner;
}
public String getWhen() {
return when;
}
public void setWhen(String when) {
this.when = when;
}
public Boolean getManual() {
return manual;
}
public void setManual(Boolean manual) {
this.manual = manual;
}
public Boolean getAllowFailure() {
return allowFailure;
}
public void setAllowFailure(Boolean allowFailure) {
this.allowFailure = allowFailure;
}
public Float getDuration() {
return duration;
}
public void setDuration(Float duration) {
this.duration = duration;
}
public Float getQueuedDuration() {
return queuedDuration;
}
public void setQueuedDuration(Float queuedDuration) {
this.queuedDuration = queuedDuration;
}
public Project getProject() {
return project;
}
public void setProject(Project project) {
this.project = project;
}
public Job withId(Long id) {
this.id = id;
return this;
}
public Job withCommit(Commit commit) {
this.commit = commit;
return this;
}
public Job withCoverage(String coverage) {
this.coverage = coverage;
return this;
}
public Job withCreatedAt(Date createdAt) {
this.createdAt = createdAt;
return this;
}
public Job withFinishedAt(Date finishedAt) {
this.finishedAt = finishedAt;
return this;
}
public Job withErasedAt(Date erasedAt) {
this.erasedAt = erasedAt;
return this;
}
public Job withName(String name) {
this.name = name;
return this;
}
public Job withPipeline(Pipeline pipeline) {
this.pipeline = pipeline;
return this;
}
public Job withRef(String ref) {
this.ref = ref;
return this;
}
public Job withRunner(Runner runner) {
this.runner = runner;
return this;
}
public Job withUser(User user) {
this.user = user;
return this;
}
public Job withStartedAt(Date startedAt) {
this.startedAt = startedAt;
return this;
}
public Job withArtifactsFile(ArtifactsFile artifactsFile) {
this.artifactsFile = artifactsFile;
return this;
}
public Job withTag(Boolean tag) {
this.tag = tag;
return this;
}
public Job withStage(String stage) {
this.stage = stage;
return this;
}
public Job withStatus(JobStatus status) {
this.status = status;
return this;
}
public Job withWhen(String when) {
this.when = when;
return this;
}
public Job withManual(Boolean manual) {
this.manual = manual;
return this;
}
public Job withAllowFailure(Boolean allowFailure) {
this.allowFailure = allowFailure;
return this;
}
public Job withDuration(Float duration) {
this.duration = duration;
return this;
}
public Job withQueuedDuration(Float queuedDuration) {
this.queuedDuration = queuedDuration;
return this;
}
public Job withProject(Project project) {
this.project = project;
return this;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}