Commit 372d0353 authored by timols's avatar timols

Updated response for GitlabMergeRequest

parent 71efa977
...@@ -2,6 +2,8 @@ package org.gitlab.api.models; ...@@ -2,6 +2,8 @@ package org.gitlab.api.models;
import org.codehaus.jackson.annotate.JsonProperty; import org.codehaus.jackson.annotate.JsonProperty;
import java.util.Date;
public class GitlabMergeRequest { public class GitlabMergeRequest {
public static final String URL = "/merge_requests"; public static final String URL = "/merge_requests";
...@@ -14,6 +16,12 @@ public class GitlabMergeRequest { ...@@ -14,6 +16,12 @@ public class GitlabMergeRequest {
private boolean merged; private boolean merged;
private GitlabUser author; private GitlabUser author;
private GitlabUser assignee; private GitlabUser assignee;
private GitlabMilestone milestone;
private String[] labels;
private int upvotes;
private int downvotes;
@JsonProperty("target_branch") @JsonProperty("target_branch")
private String targetBranch; private String targetBranch;
...@@ -27,9 +35,17 @@ public class GitlabMergeRequest { ...@@ -27,9 +35,17 @@ public class GitlabMergeRequest {
@JsonProperty("source_project_id") @JsonProperty("source_project_id")
private Integer sourceProjectId; private Integer sourceProjectId;
@JsonProperty("target_projectId")
private Integer targetProjectId;
@JsonProperty("milestone_id") @JsonProperty("milestone_id")
private Integer milestoneId; private Integer milestoneId;
@JsonProperty("updated_at")
private Date updatedAt;
@JsonProperty("created_at")
private Date createdAt;
public Integer getId() { public Integer getId() {
return id; return id;
...@@ -39,10 +55,12 @@ public class GitlabMergeRequest { ...@@ -39,10 +55,12 @@ public class GitlabMergeRequest {
this.id = id; this.id = id;
} }
@Deprecated
public Integer getMilestoneId() { public Integer getMilestoneId() {
return milestoneId; return milestoneId;
} }
@Deprecated
public void setMilestoneId(Integer id) { public void setMilestoneId(Integer id) {
milestoneId = id; milestoneId = id;
} }
...@@ -103,18 +121,22 @@ public class GitlabMergeRequest { ...@@ -103,18 +121,22 @@ public class GitlabMergeRequest {
description = d; description = d;
} }
@Deprecated
public boolean isClosed() { public boolean isClosed() {
return closed; return closed;
} }
@Deprecated
public void setClosed(boolean closed) { public void setClosed(boolean closed) {
this.closed = closed; this.closed = closed;
} }
@Deprecated
public boolean isMerged() { public boolean isMerged() {
return merged; return merged;
} }
@Deprecated
public void setMerged(boolean merged) { public void setMerged(boolean merged) {
this.merged = merged; this.merged = merged;
} }
...@@ -146,4 +168,60 @@ public class GitlabMergeRequest { ...@@ -146,4 +168,60 @@ public class GitlabMergeRequest {
merged = state.equals("merged"); merged = state.equals("merged");
} }
} }
public GitlabMilestone getMilestone() {
return milestone;
}
public void setMilestone(GitlabMilestone milestone) {
this.milestone = milestone;
}
public String[] getLabels() {
return labels;
}
public void setLabels(String[] labels) {
this.labels = labels;
}
public int getUpvotes() {
return upvotes;
}
public void setUpvotes(int upvotes) {
this.upvotes = upvotes;
}
public int getDownvotes() {
return downvotes;
}
public void setDownvotes(int downvotes) {
this.downvotes = downvotes;
}
public Integer getTargetProjectId() {
return targetProjectId;
}
public void setTargetProjectId(Integer targetProjectId) {
this.targetProjectId = targetProjectId;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
} }
Markdown is supported
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