Commit 6ac68159 authored by Greg Messner's avatar Greg Messner
Browse files

Mods to add support for marked_for_deletion_on (#554)

parent e092c96a
package org.gitlab4j.api.models; package org.gitlab4j.api.models;
import java.util.Date;
import java.util.List; import java.util.List;
import org.gitlab4j.api.utils.JacksonJson; import org.gitlab4j.api.utils.JacksonJson;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
public class Group { public class Group {
public class Statistics { public class Statistics {
...@@ -64,6 +67,9 @@ public class Group { ...@@ -64,6 +67,9 @@ public class Group {
private List<Project> projects; private List<Project> projects;
private List<Project> sharedProjects; private List<Project> sharedProjects;
@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date markedForDeletionOn;
public Integer getId() { public Integer getId() {
return this.id; return this.id;
} }
...@@ -192,6 +198,14 @@ public class Group { ...@@ -192,6 +198,14 @@ public class Group {
this.sharedProjects = sharedProjects; this.sharedProjects = sharedProjects;
} }
public Date getMarkedForDeletionOn() {
return markedForDeletionOn;
}
public void setMarkedForDeletionOn(Date markedForDeletionOn) {
this.markedForDeletionOn = markedForDeletionOn;
}
public Group withId(Integer id) { public Group withId(Integer id) {
this.id = id; this.id = id;
return this; return this;
......
...@@ -9,6 +9,7 @@ import org.gitlab4j.api.utils.JacksonJsonEnumHelper; ...@@ -9,6 +9,7 @@ import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
public class Project { public class Project {
...@@ -86,6 +87,9 @@ public class Project { ...@@ -86,6 +87,9 @@ public class Project {
private Boolean packagesEnabled; private Boolean packagesEnabled;
private Boolean emptyRepo; private Boolean emptyRepo;
@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date markedForDeletionOn;
public Integer getApprovalsBeforeMerge() { public Integer getApprovalsBeforeMerge() {
return approvalsBeforeMerge; return approvalsBeforeMerge;
} }
...@@ -647,6 +651,14 @@ public class Project { ...@@ -647,6 +651,14 @@ public class Project {
this.emptyRepo = emptyRepo; this.emptyRepo = emptyRepo;
} }
public Date getMarkedForDeletionOn() {
return markedForDeletionOn;
}
public void setMarkedForDeletionOn(Date markedForDeletionOn) {
this.markedForDeletionOn = markedForDeletionOn;
}
public static final boolean isValid(Project project) { public static final boolean isValid(Project project) {
return (project != null && project.getId() != null); return (project != null && project.getId() != null);
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
"full_path": "twitter", "full_path": "twitter",
"parent_id": 1234, "parent_id": 1234,
"shared_runners_minutes_limit": 133, "shared_runners_minutes_limit": 133,
"marked_for_deletion_on": "2016-06-17",
"statistics": { "statistics": {
"storage_size" : 212, "storage_size" : 212,
"repository_size" : 33, "repository_size" : 33,
......
...@@ -76,5 +76,6 @@ ...@@ -76,5 +76,6 @@
"wiki_size": 52428, "wiki_size": 52428,
"lfs_objects_size": 2118052893, "lfs_objects_size": 2118052893,
"job_artifacts_size": 166537174716 "job_artifacts_size": 166537174716
} },
"marked_for_deletion_on": "2016-06-17"
} }
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment