Commit 2f2d2b45 authored by Greg Messner's avatar Greg Messner
Browse files

Implemented toString() (#320).

parent 88ec32b9
......@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.gitlab4j.api.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent {
......@@ -112,4 +114,9 @@ public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent {
public void setUserId(Integer userId) {
this.userId = userId;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.gitlab4j.api.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class GroupSystemHookEvent extends AbstractSystemHookEvent {
......@@ -113,4 +115,9 @@ public class GroupSystemHookEvent extends AbstractSystemHookEvent {
public void setOldFullPath(String oldFullPath) {
this.oldFullPath = oldFullPath;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.gitlab4j.api.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class KeySystemHookEvent extends AbstractSystemHookEvent {
......@@ -67,4 +69,9 @@ public class KeySystemHookEvent extends AbstractSystemHookEvent {
public void setId(Integer id) {
this.id = id;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -7,6 +7,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.gitlab4j.api.models.Visibility;
import org.gitlab4j.api.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
......@@ -117,4 +118,9 @@ public class ProjectSystemHookEvent extends AbstractSystemHookEvent {
public void setOldPathWithNamespace(String oldPathWithNamespace) {
this.oldPathWithNamespace = oldPathWithNamespace;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -4,10 +4,17 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.gitlab4j.api.utils.JacksonJson;
import org.gitlab4j.api.webhook.AbstractPushEvent;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PushSystemHookEvent extends AbstractPushEvent implements SystemHookEvent {
public static final String PUSH_EVENT = "push";
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -4,6 +4,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.gitlab4j.api.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class RepositoryChange {
......@@ -35,4 +37,9 @@ public class RepositoryChange {
public void setRef(String ref) {
this.ref = ref;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -6,6 +6,7 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.gitlab4j.api.utils.JacksonJson;
import org.gitlab4j.api.webhook.EventProject;
@XmlRootElement
......@@ -97,4 +98,9 @@ public class RepositorySystemHookEvent extends AbstractSystemHookEvent {
public void setRefs(List<String> refs) {
this.refs = refs;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
\ No newline at end of file
......@@ -4,10 +4,17 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.gitlab4j.api.utils.JacksonJson;
import org.gitlab4j.api.webhook.AbstractPushEvent;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class TagPushSystemHookEvent extends AbstractPushEvent implements SystemHookEvent {
public static final String TAG_PUSH_EVENT = "tag_push";
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -7,6 +7,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.gitlab4j.api.models.Visibility;
import org.gitlab4j.api.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
......@@ -132,4 +133,9 @@ public class TeamMemberSystemHookEvent extends AbstractSystemHookEvent {
public void setProjectVisibility(Visibility projectVisibility) {
this.projectVisibility = projectVisibility;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.gitlab4j.api.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class UserSystemHookEvent extends AbstractSystemHookEvent {
......@@ -86,4 +88,9 @@ public class UserSystemHookEvent extends AbstractSystemHookEvent {
public void setOldUsername(String oldUsername) {
this.oldUsername = oldUsername;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -6,6 +6,7 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import org.gitlab4j.api.models.User;
import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class BuildEvent extends AbstractEvent {
......@@ -178,4 +179,9 @@ public class BuildEvent extends AbstractEvent {
public void setRepository(EventRepository repository) {
this.repository = repository;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -5,6 +5,8 @@ import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class BuildEventCommit {
......@@ -89,4 +91,9 @@ public class BuildEventCommit {
public void setFinishedAt(Date finishedAt) {
this.finishedAt = finishedAt;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -7,6 +7,7 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import org.gitlab4j.api.models.Author;
import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class EventCommit {
......@@ -83,4 +84,9 @@ public class EventCommit {
public void setRemoved(List<String> removed) {
this.removed = removed;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -5,6 +5,8 @@ import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class EventIssue {
......@@ -147,4 +149,9 @@ public class EventIssue {
public void setAction(String action) {
this.action = action;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -6,6 +6,7 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import org.gitlab4j.api.models.Assignee;
import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class EventMergeRequest {
......@@ -263,4 +264,9 @@ public class EventMergeRequest {
public void setAssignee(Assignee assignee) {
this.assignee = assignee;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
\ No newline at end of file
......@@ -4,6 +4,7 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import org.gitlab4j.api.models.AccessLevel;
import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class EventProject {
......@@ -144,4 +145,8 @@ public class EventProject {
this.httpUrl = httpUrl;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -4,6 +4,7 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import org.gitlab4j.api.models.AccessLevel;
import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class EventRepository {
......@@ -71,4 +72,9 @@ public class EventRepository {
public void setVisibility_level(AccessLevel visibility_level) {
this.visibility_level = visibility_level;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -6,6 +6,7 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import org.gitlab4j.api.models.AccessLevel;
import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class EventSnippet {
......@@ -109,4 +110,9 @@ public class EventSnippet {
public void setVisibilityLevel(AccessLevel visibilityLevel) {
this.visibilityLevel = visibilityLevel;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -5,6 +5,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import org.gitlab4j.api.models.Assignee;
import org.gitlab4j.api.models.User;
import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class IssueEvent extends AbstractEvent {
......@@ -69,4 +70,9 @@ public class IssueEvent extends AbstractEvent {
public static class ObjectAttributes extends EventIssue {
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -4,6 +4,7 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import org.gitlab4j.api.models.User;
import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class MergeRequestEvent extends AbstractEvent {
......@@ -60,4 +61,9 @@ public class MergeRequestEvent extends AbstractEvent {
@XmlAccessorType(XmlAccessType.FIELD)
public static class ObjectAttributes extends EventMergeRequest {
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
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