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

Implemented toString() (#320).

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