Commit a28fc55f authored by Greg Messner's avatar Greg Messner
Browse files

Mods for GitLab 8 support.

parent 1d5d936c
...@@ -11,19 +11,29 @@ import java.util.TimeZone; ...@@ -11,19 +11,29 @@ import java.util.TimeZone;
*/ */
public class ISO8601 { public class ISO8601 {
public static final String PATTERN = "yyyy-MM-dd'T'HH:mm:ssZ"; public static final String PATTERN = "yyyy-MM-dd'T'HH:mm:ssZ";
public static final String PATTERN_MSEC = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
public static final String OUTPUT_PATTERN = "yyyy-MM-dd'T'HH:mm:ss'Z'"; public static final String OUTPUT_PATTERN = "yyyy-MM-dd'T'HH:mm:ss'Z'";
public static final String OUTPUT_MSEC_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
public static final String ALTERNATE_PATTERN = "yyyy-MM-dd HH:mm:ss"; public static final String ALTERNATE_PATTERN = "yyyy-MM-dd HH:mm:ss";
private static final SimpleDateFormat iso8601Format; private static final SimpleDateFormat iso8601Format;
private static final SimpleDateFormat iso8601MsecFormat;
private static final SimpleDateFormat iso8601OutputFormat; private static final SimpleDateFormat iso8601OutputFormat;
private static final SimpleDateFormat iso8601OutputMsecFormat;
private static final SimpleDateFormat iso8601AlternateFormat; private static final SimpleDateFormat iso8601AlternateFormat;
static { static {
iso8601Format = new SimpleDateFormat(PATTERN); iso8601Format = new SimpleDateFormat(PATTERN);
iso8601Format.setLenient(true); iso8601Format.setLenient(true);
iso8601Format.setTimeZone(TimeZone.getTimeZone("GMT")); iso8601Format.setTimeZone(TimeZone.getTimeZone("GMT"));
iso8601MsecFormat = new SimpleDateFormat(PATTERN_MSEC);
iso8601MsecFormat.setLenient(true);
iso8601MsecFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
iso8601OutputFormat = new SimpleDateFormat(OUTPUT_PATTERN); iso8601OutputFormat = new SimpleDateFormat(OUTPUT_PATTERN);
iso8601OutputFormat.setLenient(true); iso8601OutputFormat.setLenient(true);
iso8601OutputFormat.setTimeZone(TimeZone.getTimeZone("GMT")); iso8601OutputFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
iso8601OutputMsecFormat = new SimpleDateFormat(OUTPUT_MSEC_PATTERN);
iso8601OutputMsecFormat.setLenient(true);
iso8601OutputMsecFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
iso8601AlternateFormat = new SimpleDateFormat(ALTERNATE_PATTERN); iso8601AlternateFormat = new SimpleDateFormat(ALTERNATE_PATTERN);
iso8601AlternateFormat.setLenient(true); iso8601AlternateFormat.setLenient(true);
iso8601AlternateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); iso8601AlternateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
...@@ -37,6 +47,15 @@ public class ISO8601 { ...@@ -37,6 +47,15 @@ public class ISO8601 {
public static String getTimestamp() { public static String getTimestamp() {
return (iso8601Format.format(new Date())); return (iso8601Format.format(new Date()));
} }
/**
* Get a ISO8601formatted string for the current date and time.
*
* @return a ISO8601 formatted string for the current date and time
*/
public static String getTimestamp(boolean withMsec) {
return (withMsec ? iso8601MsecFormat.format(new Date()) : iso8601Format.format(new Date()));
}
/** /**
* Get a ISO8601 formatted string for the provided Calendar instance. * Get a ISO8601 formatted string for the provided Calendar instance.
...@@ -65,7 +84,10 @@ public class ISO8601 { ...@@ -65,7 +84,10 @@ public class ISO8601 {
return (null); return (null);
} }
return (iso8601OutputFormat.format(date)); long time = date.getTime();
return (time % 1000 != 0 ?
iso8601OutputMsecFormat.format(date) :
iso8601OutputFormat.format(date));
} }
/** /**
...@@ -82,10 +104,16 @@ public class ISO8601 { ...@@ -82,10 +104,16 @@ public class ISO8601 {
} }
dateTimeString = dateTimeString.trim(); dateTimeString = dateTimeString.trim();
SimpleDateFormat fmt; SimpleDateFormat fmt;
if (dateTimeString.length() > 10) { if (dateTimeString.length() > 10) {
fmt = (dateTimeString.charAt(10) == 'T' ? (dateTimeString.endsWith("Z") ? iso8601OutputFormat : iso8601Format) : iso8601AlternateFormat); if (dateTimeString.charAt(10) == 'T') {
fmt = (dateTimeString.endsWith("Z") ? (dateTimeString.charAt(dateTimeString.length() - 4) == '.' ?
iso8601OutputMsecFormat :
iso8601OutputFormat) :
iso8601Format);
} else {
fmt = iso8601AlternateFormat;
}
} else { } else {
fmt = iso8601Format; fmt = iso8601Format;
} }
......
...@@ -25,6 +25,7 @@ import com.fasterxml.jackson.databind.SerializationFeature; ...@@ -25,6 +25,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
import com.messners.gitlab.api.models.AccessLevel;
/** /**
* Jackson JSON Configuration and utility class. * Jackson JSON Configuration and utility class.
...@@ -49,6 +50,7 @@ public class JacksonJson extends JacksonJaxbJsonProvider implements ContextResol ...@@ -49,6 +50,7 @@ public class JacksonJson extends JacksonJaxbJsonProvider implements ContextResol
SimpleModule module = new SimpleModule("GitLabApiJsonModule"); SimpleModule module = new SimpleModule("GitLabApiJsonModule");
module.addSerializer(Date.class, new JsonDateSerializer()); module.addSerializer(Date.class, new JsonDateSerializer());
module.addSerializer(AccessLevel.class, new JsonAccessLevelSerializer());
objectMapper.registerModule(module); objectMapper.registerModule(module);
} }
...@@ -135,4 +137,16 @@ public class JacksonJson extends JacksonJaxbJsonProvider implements ContextResol ...@@ -135,4 +137,16 @@ public class JacksonJson extends JacksonJaxbJsonProvider implements ContextResol
gen.writeString(iso8601String); gen.writeString(iso8601String);
} }
} }
/**
* JsonSerializer for serializing AccessLevel values.
*/
public static class JsonAccessLevelSerializer extends JsonSerializer<AccessLevel> {
@Override
public void serialize(AccessLevel accessLevel, JsonGenerator gen, SerializerProvider provider) throws IOException, JsonProcessingException {
gen.writeNumber(accessLevel.value);
}
}
} }
\ No newline at end of file
package com.messners.gitlab.api; package com.messners.gitlab.api;
import com.messners.gitlab.api.models.MergeRequest; import java.util.List;
import com.messners.gitlab.api.models.MergeRequestComment;
import javax.ws.rs.core.Form; import javax.ws.rs.core.Form;
import javax.ws.rs.core.GenericType; import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import java.util.List;
import com.messners.gitlab.api.models.MergeRequest;
/** /**
* This class implements the client side API for the GitLab merge request calls. * This class implements the client side API for the GitLab merge request calls.
...@@ -127,6 +127,7 @@ public class MergeRequestApi extends AbstractApi { ...@@ -127,6 +127,7 @@ public class MergeRequestApi extends AbstractApi {
* @return the added merge request comment * @return the added merge request comment
* @throws GitLabApiException * @throws GitLabApiException
*/ */
/*
public MergeRequestComment addMergeRequestComment(Integer projectId, Integer mergeRequestId, String comments) throws GitLabApiException { public MergeRequestComment addMergeRequestComment(Integer projectId, Integer mergeRequestId, String comments) throws GitLabApiException {
Form formData = new Form(); Form formData = new Form();
...@@ -134,4 +135,5 @@ public class MergeRequestApi extends AbstractApi { ...@@ -134,4 +135,5 @@ public class MergeRequestApi extends AbstractApi {
Response response = post(Response.Status.OK, formData, "projects", projectId, "merge_request", mergeRequestId, "comments"); Response response = post(Response.Status.OK, formData, "projects", projectId, "merge_request", mergeRequestId, "comments");
return (response.readEntity(MergeRequestComment.class)); return (response.readEntity(MergeRequestComment.class));
} }
*/
} }
...@@ -179,11 +179,13 @@ public class UserApi extends AbstractApi { ...@@ -179,11 +179,13 @@ public class UserApi extends AbstractApi {
addFormParam(form, "twitter", user.getTwitter(), false); addFormParam(form, "twitter", user.getTwitter(), false);
addFormParam(form, "website_url", user.getWebsiteUrl(), false); addFormParam(form, "website_url", user.getWebsiteUrl(), false);
addFormParam(form, "projects_limit", projectsLimit, false); addFormParam(form, "projects_limit", projectsLimit, false);
addFormParam(form, "extern_uid", user.getExternUid(), false); addFormParam(form, "external", user.getExternal(), false);
addFormParam(form, "provider", user.getProvider(), false); addFormParam(form, "provider", user.getProvider(), false);
addFormParam(form, "bio", user.getBio(), false); addFormParam(form, "bio", user.getBio(), false);
addFormParam(form, "location", user.getLocation(), false);
addFormParam(form, "admin", user.getIsAdmin(), false); addFormParam(form, "admin", user.getIsAdmin(), false);
addFormParam(form, "can_create_group", user.getCanCreateGroup(), false); addFormParam(form, "can_create_group", user.getCanCreateGroup(), false);
addFormParam(form, "external", user.getExternal(), false);
return form; return form;
} }
} }
package com.messners.gitlab.api.models; package com.messners.gitlab.api.models;
import java.util.Date; import java.util.Date;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
@XmlAccessorType (XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class AbstractUser { public class AbstractUser {
private Date createdAt; private String avatarUrl;
private String bio;
private String email; private Boolean canCreateGroup;
private Integer id; private Boolean canCreateProject;
private String name; private Integer colorSchemeId;
private String state; private Date confirmedAt;
private String username; private Date createdAt;
private Boolean blocked; private Date currentSignInAt;
private String email;
public Date getCreatedAt () { private Boolean external;
return this.createdAt; private Integer id;
} private List<Identity> identities;
private Boolean isAdmin;
public void setCreatedAt (Date createdAt) { private Date lastSignInAt;
this.createdAt = createdAt; private String linkedin;
} private String location;
private String name;
public String getEmail () { private String organization;
return this.email; private Integer projectsLimit;
} private String provider;
private String skype;
public void setEmail (String email) { private String state;
this.email = email; private Integer themeId;
} private String twitter;
private Boolean twoFactorEnabled;
public Integer getId () { private String username;
return this.id; private String websiteUrl;
} private String webUrl;
public void setId (Integer id) { public String getAvatarUrl() {
this.id = id; return avatarUrl;
} }
public String getName () { public void setAvatarUrl(String avatarUrl) {
return this.name; this.avatarUrl = avatarUrl;
} }
public void setName (String name) { public String getBio() {
this.name = name; return bio;
} }
public String getState () { public void setBio(String bio) {
return this.state; this.bio = bio;
} }
public void setState (String state) { public Boolean getCanCreateGroup() {
this.state = state; return canCreateGroup;
} }
public String getUsername () { public void setCanCreateGroup(Boolean canCreateGroup) {
return this.username; this.canCreateGroup = canCreateGroup;
} }
public void setUsername (String username) { public Boolean getCanCreateProject() {
this.username = username; return canCreateProject;
} }
public Boolean getBlocked() { public void setCanCreateProject(Boolean canCreateProject) {
return blocked; this.canCreateProject = canCreateProject;
} }
public void setBlocked(Boolean blocked) { public Integer getColorSchemeId() {
this.blocked = blocked; return colorSchemeId;
} }
public void setColorSchemeId(Integer colorSchemeId) {
this.colorSchemeId = colorSchemeId;
}
public Date getConfirmedAt() {
return confirmedAt;
}
public void setConfirmedAt(Date confirmedAt) {
this.confirmedAt = confirmedAt;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getCurrentSignInAt() {
return currentSignInAt;
}
public void setCurrentSignInAt(Date currentSignInAt) {
this.currentSignInAt = currentSignInAt;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Boolean getExternal() {
return external;
}
public void setExternal(Boolean external) {
this.external = external;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public List<Identity> getIdentities() {
return identities;
}
public void setIdentities(List<Identity> identities) {
this.identities = identities;
}
public Boolean getIsAdmin() {
return isAdmin;
}
public void setIsAdmin(Boolean isAdmin) {
this.isAdmin = isAdmin;
}
public Date getLastSignInAt() {
return lastSignInAt;
}
public void setLastSignInAt(Date lastSignInAt) {
this.lastSignInAt = lastSignInAt;
}
public String getLinkedin() {
return linkedin;
}
public void setLinkedin(String linkedin) {
this.linkedin = linkedin;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getOrganization() {
return organization;
}
public void setOrganization(String organization) {
this.organization = organization;
}
public Integer getProjectsLimit() {
return projectsLimit;
}
public void setProjectsLimit(Integer projectsLimit) {
this.projectsLimit = projectsLimit;
}
public String getProvider() {
return provider;
}
public void setProvider(String provider) {
this.provider = provider;
}
public String getSkype() {
return skype;
}
public void setSkype(String skype) {
this.skype = skype;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public Integer getThemeId() {
return themeId;
}
public void setThemeId(Integer themeId) {
this.themeId = themeId;
}
public String getTwitter() {
return twitter;
}
public void setTwitter(String twitter) {
this.twitter = twitter;
}
public Boolean getTwoFactorEnabled() {
return twoFactorEnabled;
}
public void setTwoFactorEnabled(Boolean twoFactorEnabled) {
this.twoFactorEnabled = twoFactorEnabled;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getWebsiteUrl() {
return websiteUrl;
}
public void setWebsiteUrl(String websiteUrl) {
this.websiteUrl = websiteUrl;
}
public String getWebUrl() {
return webUrl;
}
public void setWebUrl(String webUrl) {
this.webUrl = webUrl;
}
} }
...@@ -6,38 +6,65 @@ import javax.xml.bind.annotation.XmlAccessorType; ...@@ -6,38 +6,65 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement @XmlRootElement
@XmlAccessorType (XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Branch { public class Branch {
private Commit commit; private Commit commit;
private String name; private Boolean developersCanMerge;
private Boolean isProtected; private Boolean developersCanPush;
private Boolean merged;
public Commit getCommit () { private String name;
return this.commit; private Boolean isProtected;
}
public Commit getCommit() {
public void setCommit (Commit commit) { return commit;
this.commit = commit; }
}
public void setCommit(Commit commit) {
public String getName () { this.commit = commit;
return this.name; }
}
public Boolean getDevelopersCanMerge() {
public void setName (String name) { return developersCanMerge;
this.name = name; }
}
public void setDevelopersCanMerge(Boolean developersCanMerge) {
public Boolean getProtected () { this.developersCanMerge = developersCanMerge;
return this.isProtected; }
}
public Boolean getDevelopersCanPush() {
public void setProtected (Boolean isProtected) { return developersCanPush;
this.isProtected = isProtected; }
}
public void setDevelopersCanPush(Boolean developersCanPush) {
public static final boolean isValid (Branch branch) { this.developersCanPush = developersCanPush;
return (branch != null && branch.getName() != null); }
}
public Boolean getMerged() {
return merged;
}
public void setMerged(Boolean merged) {
this.merged = merged;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Boolean getProtected() {
return isProtected;
}
public void setProtected(Boolean isProtected) {
this.isProtected = isProtected;
}
public static final boolean isValid(Branch branch) {
return (branch != null && branch.getName() != null);
}
} }
...@@ -12,116 +12,157 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -12,116 +12,157 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Commit { public class Commit {
private Author author; private Author author;
private Date authoredDate; private Date authoredDate;
private Date committedDate; private String authorEmail;
private String authorName;
private Committer committer; private Date committedDate;
private String id; private String committerEmail;
private String message; private String committerName;
private Date createdAt;
private List<Parent> parents; private String id;
private String message;
private String shortId; private List<String> parentIds;
private Date timestamp; private String shortId;
private CommitStats stats;
private String title; private String status;
private String tree; private Date timestamp;
private String url; private String title;
private String url;
public Author getAuthor () {
return this.author; public Author getAuthor() {
} return author;
}
public void setAuthor (Author author) {
this.author = author; public void setAuthor(Author author) {
} this.author = author;
}
public Date getAuthored_date () {
return this.authoredDate; public Date getAuthoredDate() {
} return authoredDate;
}
public void setAuthored_date (Date authoredDate) {
this.authoredDate = authoredDate; public void setAuthoredDate(Date authoredDate) {
} this.authoredDate = authoredDate;
}
public Date getCommitted_date () {
return this.committedDate; public String getAuthorEmail() {
} return authorEmail;
}
public void setCommitted_date (Date committedDate) {
this.committedDate = committedDate; public void setAuthorEmail(String authorEmail) {
} this.authorEmail = authorEmail;
}
public Committer getCommitter () {
return this.committer; public String getAuthorName() {
} return authorName;
}
public void setCommitter (Committer committer) {
this.committer = committer; public void setAuthorName(String authorName) {
} this.authorName = authorName;
}
public String getId () {
return this.id; public Date getCommittedDate() {
} return committedDate;
}
public void setId (String id) {
this.id = id; public void setCommittedDate(Date committedDate) {
} this.committedDate = committedDate;
}
public String getShortId () {
return this.shortId; public String getCommitterEmail() {
} return committerEmail;
}
public String getMessage () {
return this.message; public void setCommitterEmail(String committerEmail) {
} this.committerEmail = committerEmail;
}
public void setMessage (String message) {
this.message = message; public String getCommitterName() {
} return committerName;
}
public List<Parent> getParents () {
return this.parents; public void setCommitterName(String committerName) {
} this.committerName = committerName;
}
public void setParents (List<Parent> parents) {
this.parents = parents; public Date getCreatedAt() {
} return createdAt;
}
public void setShort_id (String short_id) {
this.shortId = short_id; public void setCreatedAt(Date createdAt) {
} this.createdAt = createdAt;
}
public Date getTimestamp () {
return this.timestamp; public String getId() {
} return id;
}
public void setTimestamp (Date timestamp) {
this.timestamp = timestamp; public void setId(String id) {
} this.id = id;
}
public String getTitle () {
return this.title; public String getMessage() {
} return message;
}
public void setTitle (String title) {
this.title = title; public void setMessage(String message) {
} this.message = message;
}
public String getTree () {
return this.tree; public List<String> getParentIds() {
} return parentIds;
}
public void setTree (String tree) {
this.tree = tree; public void setParentIds(List<String> parentIds) {
} this.parentIds = parentIds;
}
public String getUrl () {
return this.url; public String getShortId() {
} return shortId;
}
public void setUrl (String url) {
this.url = url; public void setShortId(String shortId) {
} this.shortId = shortId;
}
public CommitStats getStats() {
return stats;
}
public void setStats(CommitStats stats) {
this.stats = stats;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getTimestamp() {
return timestamp;
}
public void setTimestamp(Date timestamp) {
this.timestamp = timestamp;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
} }
package com.messners.gitlab.api.models; package com.messners.gitlab.api.models;
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 javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
...@@ -10,13 +9,13 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -10,13 +9,13 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class ErrorMessage { public class ErrorMessage {
private String message; private String message;
public String getMessage () { public String getMessage() {
return this.message; return this.message;
} }
public void setMessage (String message) { public void setMessage(String message) {
this.message = message; this.message = message;
} }
} }
...@@ -9,78 +9,94 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -9,78 +9,94 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Event { public class Event {
private String actionName; private String actionName;
private Integer authorId; private Author author;
private Integer authorId;
private EventData data; private String authorUsername;
private EventData data;
private Integer projectId; private Integer projectId;
private String targetId; private Integer targetId;
private String targetTitle; private String targetTitle;
private String targetType; private String targetType;
private String title; private String title;
public String getActionName () { public String getActionName() {
return this.actionName; return actionName;
} }
public void setActionName (String actionName) { public void setActionName(String actionName) {
this.actionName = actionName; this.actionName = actionName;
} }
public Integer getAuthorId () { public Author getAuthor() {
return this.authorId; return author;
} }
public void setAuthorId (Integer authorId) { public void setAuthor(Author author) {
this.authorId = authorId; this.author = author;
} }
public EventData getData () { public Integer getAuthorId() {
return this.data; return authorId;
} }
public void setData (EventData data) { public void setAuthorId(Integer authorId) {
this.data = data; this.authorId = authorId;
} }
public Integer getProjectId () { public String getAuthorUsername() {
return this.projectId; return authorUsername;
} }
public void setProjectId (Integer projectId) { public void setAuthorUsername(String authorUsername) {
this.projectId = projectId; this.authorUsername = authorUsername;
} }
public String getTargetId () { public EventData getData() {
return this.targetId; return data;
} }
public void setTargetId (String targetId) { public void setData(EventData data) {
this.targetId = targetId; this.data = data;
} }
public String getTargetTitle () { public Integer getProjectId() {
return this.targetTitle; return projectId;
} }
public void setTargetTitle (String targetTitle) { public void setProjectId(Integer projectId) {
this.targetTitle = targetTitle; this.projectId = projectId;
} }
public String getTargetType () { public Integer getTargetId() {
return this.targetType; return targetId;
} }
public void setTargetType (String targetType) { public void setTargetId(Integer targetId) {
this.targetType = targetType; this.targetId = targetId;
} }
public String getTitle () { public String getTargetTitle() {
return this.title; return targetTitle;
} }
public void setTitle (String title) { public void setTargetTitle(String targetTitle) {
this.title = title; this.targetTitle = targetTitle;
} }
public String getTargetType() {
return targetType;
}
public void setTargetType(String targetType) {
this.targetType = targetType;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
} }
...@@ -8,79 +8,79 @@ import javax.xml.bind.annotation.XmlAccessorType; ...@@ -8,79 +8,79 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement @XmlRootElement
@XmlAccessorType (XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class EventData { public class EventData {
private String after; private String after;
private String before; private String before;
private List<Commit> commits; private List<Commit> commits;
private String ref; private String ref;
private Repository repository; private Repository repository;
private Integer total_commits_count; private Integer totalCommitsCount;
private Integer user_id; private Integer userId;
private String user_name; private String userName;
public String getAfter () { public String getAfter() {
return this.after; return this.after;
} }
public void setAfter (String after) { public void setAfter(String after) {
this.after = after; this.after = after;
} }
public String getBefore () { public String getBefore() {
return this.before; return this.before;
} }
public void setBefore (String before) { public void setBefore(String before) {
this.before = before; this.before = before;
} }
public List<Commit> getCommits () { public List<Commit> getCommits() {
return this.commits; return this.commits;
} }
public void setCommits (List<Commit> commits) { public void setCommits(List<Commit> commits) {
this.commits = commits; this.commits = commits;
} }
public String getRef () { public String getRef() {
return this.ref; return this.ref;
} }
public void setRef (String ref) { public void setRef(String ref) {
this.ref = ref; this.ref = ref;
} }
public Repository getRepository () { public Repository getRepository() {
return this.repository; return this.repository;
} }
public void setRepository (Repository repository) { public void setRepository(Repository repository) {
this.repository = repository; this.repository = repository;
} }
public Integer getTotal_commits_count () { public Integer getTotalCommitsCount() {
return this.total_commits_count; return this.totalCommitsCount;
} }
public void setTotal_commits_count (Integer total_commits_count) { public void setTotalCommitsCount(Integer totalCommitsCount) {
this.total_commits_count = total_commits_count; this.totalCommitsCount = totalCommitsCount;
} }
public Integer getUser_id () { public Integer getUserId() {
return this.user_id; return this.userId;
} }
public void setUser_id (Integer user_id) { public void setUserId(Integer userId) {
this.user_id = user_id; this.userId = userId;
} }
public String getUser_name () { public String getUserName() {
return this.user_name; return this.userName;
} }
public void setUser_name (String user_name) { public void setUserName(String userName) {
this.user_name = user_name; this.userName = userName;
} }
} }
...@@ -10,50 +10,50 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -10,50 +10,50 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement @XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Group { public class Group {
private Integer id; private Integer id;
private String name; private String name;
private Integer ownerId; private Integer ownerId;
private String path; private String path;
private List<Project> projects; private List<Project> projects;
public Integer getId () { public Integer getId() {
return this.id; return this.id;
} }
public void setId (Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
public String getName () { public String getName() {
return this.name; return this.name;
} }
public void setName (String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public Integer getOwnerId () { public Integer getOwnerId() {
return this.ownerId; return this.ownerId;
} }
public void setOwnerId (Integer ownerId) { public void setOwnerId(Integer ownerId) {
this.ownerId = ownerId; this.ownerId = ownerId;
} }
public String getPath () { public String getPath() {
return this.path; return this.path;
} }
public void setPath (String path) { public void setPath(String path) {
this.path = path; this.path = path;
} }
public List<Project> getProjects () { public List<Project> getProjects() {
return (projects); return (projects);
} }
public void setProjects (List<Project> projects) { public void setProjects(List<Project> projects) {
this.projects = projects; this.projects = projects;
} }
} }
...@@ -11,113 +11,158 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -11,113 +11,158 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement @XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Issue { public class Issue {
private Assignee assignee; private Assignee assignee;
private Author author; private Author author;
private Date createdAt; private Boolean confidential;
private String description; private Date createdAt;
private Integer id; private String description;
private Integer iid; private Date dueDate;
private List<String> labels; private Integer id;
private Milestone milestone; private Integer iid;
private Integer project_id; private List<String> labels;
private String state; private Milestone milestone;
private String title; private Integer project_id;
private Date updatedAt; private String state;
private Boolean subscribed;
public Assignee getAssignee () { private String title;
return this.assignee; private Date updatedAt;
} private Integer userNotesCount;
private String webUrl;
public void setAssignee (Assignee assignee) {
this.assignee = assignee; public Assignee getAssignee() {
} return assignee;
}
public Author getAuthor () {
return this.author; public void setAssignee(Assignee assignee) {
} this.assignee = assignee;
}
public void setAuthor (Author author) {
this.author = author; public Author getAuthor() {
} return author;
}
public Date getCreatedAt () {
return this.createdAt; public void setAuthor(Author author) {
} this.author = author;
}
public void setCreatedAt (Date createdAt) {
this.createdAt = createdAt; public Boolean getConfidential() {
} return confidential;
}
public String getDescription () {
return this.description; public void setConfidential(Boolean confidential) {
} this.confidential = confidential;
}
public void setDescription (String description) {
this.description = description; public Date getCreatedAt() {
} return createdAt;
}
public Integer getId () {
return this.id; public void setCreatedAt(Date createdAt) {
} this.createdAt = createdAt;
}
public void setId (Integer id) {
this.id = id; public String getDescription() {
} return description;
}
public Integer getIid () {
return this.iid; public void setDescription(String description) {
} this.description = description;
}
public void setIid (Integer iid) {
this.iid = iid; public Date getDueDate() {
} return dueDate;
}
public List<String> getLabels () {
return this.labels; public void setDueDate(Date dueDate) {
} this.dueDate = dueDate;
}
public void setLabels (List<String> labels) {
this.labels = labels; public Integer getId() {
} return id;
}
public Milestone getMilestone () {
return this.milestone; public void setId(Integer id) {
} this.id = id;
}
public void setMilestone (Milestone milestone) {
this.milestone = milestone; public Integer getIid() {
} return iid;
}
public Integer getProject_id () {
return this.project_id; public void setIid(Integer iid) {
} this.iid = iid;
}
public void setProject_id (Integer project_id) {
this.project_id = project_id; public List<String> getLabels() {
} return labels;
}
public String getState () {
return this.state; public void setLabels(List<String> labels) {
} this.labels = labels;
}
public void setState (String state) {
this.state = state; public Milestone getMilestone() {
} return milestone;
}
public String getTitle () {
return this.title; public void setMilestone(Milestone milestone) {
} this.milestone = milestone;
}
public void setTitle (String title) {
this.title = title; public Integer getProject_id() {
} return project_id;
}
public Date getUpdatedAt () {
return this.updatedAt; public void setProject_id(Integer project_id) {
} this.project_id = project_id;
}
public void setUpdatedAt (Date updatedAt) {
this.updatedAt = updatedAt; public String getState() {
} return state;
}
public void setState(String state) {
this.state = state;
}
public Boolean getSubscribed() {
return subscribed;
}
public void setSubscribed(Boolean subscribed) {
this.subscribed = subscribed;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Integer getUserNotesCount() {
return userNotesCount;
}
public void setUserNotesCount(Integer userNotesCount) {
this.userNotesCount = userNotesCount;
}
public String getWebUrl() {
return webUrl;
}
public void setWebUrl(String webUrl) {
this.webUrl = webUrl;
}
} }
...@@ -8,43 +8,52 @@ import javax.xml.bind.annotation.XmlAccessorType; ...@@ -8,43 +8,52 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement @XmlRootElement
@XmlAccessorType (XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Key { public class Key {
private Date createdAt; private Date createdAt;
private Integer id; private Integer id;
private String key; private String key;
private String title; private String title;
private User user;
public Date getCreatedAt () { public Date getCreatedAt() {
return this.createdAt; return this.createdAt;
} }
public void setCreatedAt (Date createdAt) { public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt; this.createdAt = createdAt;
} }
public Integer getId () { public Integer getId() {
return this.id; return this.id;
} }
public void setId (Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
public String getKey () { public String getKey() {
return this.key; return this.key;
} }
public void setKey (String key) { public void setKey(String key) {
this.key = key; this.key = key;
} }
public String getTitle () { public String getTitle() {
return this.title; return this.title;
} }
public void setTitle (String title) { public void setTitle(String title) {
this.title = title; this.title = title;
} }
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
} }
...@@ -10,74 +10,68 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -10,74 +10,68 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement @XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Member { public class Member {
public static final int GUEST_LEVEL = 10; private AccessLevel accessLevel;
public static final int REPORTER_LEVEL = 20; private Date createdAt;
public static final int DEVELOPER_LEVEL = 30; private String email;
public static final int MASTER_LEVEL = 40; private Integer id;
public static final int OWNER_LEVEL = 50; private String name;
private String state;
private Integer accessLevel; private String username;
private Date createdAt;
private String email; public AccessLevel getAccessLevel() {
private Integer id; return this.accessLevel;
private String name; }
private String state;
private String username; public void setAccessLevel(AccessLevel accessLevel) {
this.accessLevel = accessLevel;
public Integer getAccessLevel () { }
return this.accessLevel;
} public Date getCreatedAt() {
return this.createdAt;
public void setAccessLevel (Integer accessLevel) { }
this.accessLevel = accessLevel;
} public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
public Date getCreatedAt () { }
return this.createdAt;
} public String getEmail() {
return this.email;
public void setCreatedAt (Date createdAt) { }
this.createdAt = createdAt;
} public void setEmail(String email) {
this.email = email;
public String getEmail () { }
return this.email;
} public Integer getId() {
return this.id;
public void setEmail (String email) { }
this.email = email;
} public void setId(Integer id) {
this.id = id;
public Integer getId () { }
return this.id;
} public String getName() {
return this.name;
public void setId (Integer id) { }
this.id = id;
} public void setName(String name) {
this.name = name;
public String getName () { }
return this.name;
} public String getState() {
return this.state;
public void setName (String name) { }
this.name = name;
} public void setState(String state) {
this.state = state;
public String getState () { }
return this.state;
} public String getUsername() {
return this.username;
public void setState (String state) { }
this.state = state;
} public void setUsername(String username) {
this.username = username;
public String getUsername () { }
return this.username;
}
public void setUsername (String username) {
this.username = username;
}
} }
package com.messners.gitlab.api.models; package com.messners.gitlab.api.models;
import java.util.List;
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 javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
...@@ -7,117 +9,270 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -7,117 +9,270 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement @XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class MergeRequest { public class MergeRequest {
private Assignee assignee; private Integer approvalsBeforeMerge;
private Author author; private Assignee assignee;
private Integer downvotes; private Author author;
private Integer id; private Changes changes;
private Integer iid; private String description;
private Integer projectId; private Integer downvotes;
private String sourceBranch; private Boolean forceRemoveSourceBranch;
private String state; private Integer id;
private String targetBranch; private Integer iid;
private String title; private List<String> labels;
private String description; private String mergeCommitSha;
private Integer upvotes; private String mergeStatus;
private Boolean mergeWhenBuildSucceeds;
public Assignee getAssignee () { private Milestone milestone;
return this.assignee; private Integer projectId;
} private String sha;
private Boolean shouldRemoveSourceBranch;
public void setAssignee (Assignee assignee) { private String sourceBranch;
this.assignee = assignee; private Integer sourceProjectId;
} private Boolean squash;
private String state;
public Author getAuthor () { private Boolean subscribed;
return this.author; private String targetBranch;
} private Integer targetProjectId;
private String title;
public void setAuthor (Author author) { private Integer upvotes;
this.author = author; private Integer userNotesCount;
} private String webUrl;
private Boolean workInProgress;
public Integer getDownvotes () {
return this.downvotes; public Integer getApprovalsBeforeMerge() {
} return approvalsBeforeMerge;
}
public void setDownvotes (Integer downvotes) {
this.downvotes = downvotes; public void setApprovalsBeforeMerge(Integer approvalsBeforeMerge) {
} this.approvalsBeforeMerge = approvalsBeforeMerge;
}
public Integer getId () {
return this.id; public Assignee getAssignee() {
} return assignee;
}
public void setId (Integer id) {
this.id = id; public void setAssignee(Assignee assignee) {
} this.assignee = assignee;
}
public Integer getIid () {
return this.iid; public Author getAuthor() {
} return author;
}
public void setIid (Integer iid) {
this.iid = iid; public void setAuthor(Author author) {
} this.author = author;
}
public Integer getProjectId () {
return this.projectId; public Changes getChanges() {
} return changes;
}
public void setProjectId (Integer projectId) {
this.projectId = projectId; public void setChanges(Changes changes) {
} this.changes = changes;
}
public String getSourceBranch () {
return this.sourceBranch; public String getDescription() {
} return description;
}
public void setSourceBranch (String sourceBranch) {
this.sourceBranch = sourceBranch; public void setDescription(String description) {
} this.description = description;
}
public String getState () {
return this.state; public Integer getDownvotes() {
} return downvotes;
}
public void setState (String state) {
this.state = state; public void setDownvotes(Integer downvotes) {
} this.downvotes = downvotes;
}
public String getTargetBranch () {
return this.targetBranch; public Boolean getForceRemoveSourceBranch() {
} return forceRemoveSourceBranch;
}
public void setTargetBranch (String targetBranch) {
this.targetBranch = targetBranch; public void setForceRemoveSourceBranch(Boolean forceRemoveSourceBranch) {
} this.forceRemoveSourceBranch = forceRemoveSourceBranch;
}
public String getTitle () {
return this.title; public Integer getId() {
} return id;
}
public void setTitle (String title) {
this.title = title; public void setId(Integer id) {
} this.id = id;
}
public String getDescription() {
return description; public Integer getIid() {
} return iid;
}
public void setDescription(String description) {
this.description = description; public void setIid(Integer iid) {
} this.iid = iid;
}
public Integer getUpvotes () {
return this.upvotes; public List<String> getLabels() {
} return labels;
}
public void setUpvotes (Integer upvotes) {
this.upvotes = upvotes; public void setLabels(List<String> labels) {
} this.labels = labels;
}
public static final boolean isValid (MergeRequest mergeRequest) {
return (mergeRequest != null && mergeRequest.getId() != null); public String getMergeCommitSha() {
} return mergeCommitSha;
}
public void setMergeCommitSha(String mergeCommitSha) {
this.mergeCommitSha = mergeCommitSha;
}
public String getMergeStatus() {
return mergeStatus;
}
public void setMergeStatus(String mergeStatus) {
this.mergeStatus = mergeStatus;
}
public Boolean getMergeWhenBuildSucceeds() {
return mergeWhenBuildSucceeds;
}
public void setMergeWhenBuildSucceeds(Boolean mergeWhenBuildSucceeds) {
this.mergeWhenBuildSucceeds = mergeWhenBuildSucceeds;
}
public Milestone getMilestone() {
return milestone;
}
public void setMilestone(Milestone milestone) {
this.milestone = milestone;
}
public Integer getProjectId() {
return projectId;
}
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
public String getSha() {
return sha;
}
public void setSha(String sha) {
this.sha = sha;
}
public Boolean getShouldRemoveSourceBranch() {
return shouldRemoveSourceBranch;
}
public void setShouldRemoveSourceBranch(Boolean shouldRemoveSourceBranch) {
this.shouldRemoveSourceBranch = shouldRemoveSourceBranch;
}
public String getSourceBranch() {
return sourceBranch;
}
public void setSourceBranch(String sourceBranch) {
this.sourceBranch = sourceBranch;
}
public Integer getSourceProjectId() {
return sourceProjectId;
}
public void setSourceProjectId(Integer sourceProjectId) {
this.sourceProjectId = sourceProjectId;
}
public Boolean getSquash() {
return squash;
}
public void setSquash(Boolean squash) {
this.squash = squash;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public Boolean getSubscribed() {
return subscribed;
}
public void setSubscribed(Boolean subscribed) {
this.subscribed = subscribed;
}
public String getTargetBranch() {
return targetBranch;
}
public void setTargetBranch(String targetBranch) {
this.targetBranch = targetBranch;
}
public Integer getTargetProjectId() {
return targetProjectId;
}
public void setTargetProjectId(Integer targetProjectId) {
this.targetProjectId = targetProjectId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Integer getUpvotes() {
return upvotes;
}
public void setUpvotes(Integer upvotes) {
this.upvotes = upvotes;
}
public Integer getUserNotesCount() {
return userNotesCount;
}
public void setUserNotesCount(Integer userNotesCount) {
this.userNotesCount = userNotesCount;
}
public String getWebUrl() {
return webUrl;
}
public void setWebUrl(String webUrl) {
this.webUrl = webUrl;
}
public Boolean getWorkInProgress() {
return workInProgress;
}
public void setWorkInProgress(Boolean workInProgress) {
this.workInProgress = workInProgress;
}
public static final boolean isValid(MergeRequest mergeRequest) {
return (mergeRequest != null && mergeRequest.getId() != null);
}
} }
...@@ -10,85 +10,85 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -10,85 +10,85 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Milestone { public class Milestone {
private Date createdAt; private Date createdAt;
private String description; private String description;
private Date dueDate; private Date dueDate;
private Integer id; private Integer id;
private Integer iid; private Integer iid;
private Integer projectId; private Integer projectId;
private String state; private String state;
private String title; private String title;
private Date updatedAt; private Date updatedAt;
public Date getCreatedAt () { public Date getCreatedAt() {
return this.createdAt; return this.createdAt;
} }
public void setCreatedAt (Date createdAt) { public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt; this.createdAt = createdAt;
} }
public String getDescription () { public String getDescription() {
return this.description; return this.description;
} }
public void setDescription (String description) { public void setDescription(String description) {
this.description = description; this.description = description;
} }
public Date getDueDate () { public Date getDueDate() {
return this.dueDate; return this.dueDate;
} }
public void setDueDate (Date dueDate) { public void setDueDate(Date dueDate) {
this.dueDate = dueDate; this.dueDate = dueDate;
} }
public Integer getId () { public Integer getId() {
return this.id; return this.id;
} }
public void setId (Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
public Integer getIid () { public Integer getIid() {
return this.iid; return this.iid;
} }
public void setIid (Integer iid) { public void setIid(Integer iid) {
this.iid = iid; this.iid = iid;
} }
public Integer getProjectId () { public Integer getProjectId() {
return this.projectId; return this.projectId;
} }
public void setProjectId (Integer projectId) { public void setProjectId(Integer projectId) {
this.projectId = projectId; this.projectId = projectId;
} }
public String getState () { public String getState() {
return this.state; return this.state;
} }
public void setState (String state) { public void setState(String state) {
this.state = state; this.state = state;
} }
public String getTitle () { public String getTitle() {
return this.title; return this.title;
} }
public void setTitle (String title) { public void setTitle(String title) {
this.title = title; this.title = title;
} }
public Date getUpdatedAt () { public Date getUpdatedAt() {
return this.updatedAt; return this.updatedAt;
} }
public void setUpdatedAt (Date updatedAt) { public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt; this.updatedAt = updatedAt;
} }
} }
...@@ -10,67 +10,67 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -10,67 +10,67 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Namespace { public class Namespace {
private Date createdAt; private Date createdAt;
private String description; private String description;
private Integer id; private Integer id;
private String name; private String name;
private Integer ownerId; private Integer ownerId;
private String path; private String path;
private String updatedAt; private String updatedAt;
public Date getCreatedAt () { public Date getCreatedAt() {
return this.createdAt; return this.createdAt;
} }
public void setCreatedAt (Date createdAt) { public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt; this.createdAt = createdAt;
} }
public String getDescription () { public String getDescription() {
return this.description; return this.description;
} }
public void setDescription (String description) { public void setDescription(String description) {
this.description = description; this.description = description;
} }
public Integer getId () { public Integer getId() {
return this.id; return this.id;
} }
public void setId (Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
public String getName () { public String getName() {
return this.name; return this.name;
} }
public void setName (String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public Integer getOwnerId () { public Integer getOwnerId() {
return this.ownerId; return this.ownerId;
} }
public void setOwnerId (Integer ownerId) { public void setOwnerId(Integer ownerId) {
this.ownerId = ownerId; this.ownerId = ownerId;
} }
public String getPath () { public String getPath() {
return this.path; return this.path;
} }
public void setPath (String path) { public void setPath(String path) {
this.path = path; this.path = path;
} }
public String getUpdatedAt () { public String getUpdatedAt() {
return this.updatedAt; return this.updatedAt;
} }
public void setUpdatedAt (String updatedAt) { public void setUpdatedAt(String updatedAt) {
this.updatedAt = updatedAt; this.updatedAt = updatedAt;
} }
} }
...@@ -10,76 +10,145 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -10,76 +10,145 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Note { public class Note {
private String attachment; public static enum NotableType {
private Author author; ISSUE("Issue"), MERGE_REQUEST("MergeRequest"), SNIPPET("Snippet");
private Date createdAt;
private Date expiresAt; private String name;
private String fileName;
private Integer id; NotableType(String name) {
private String title; this.name = name;
private String updatedAt; }
public String getAttachment () { @Override
return this.attachment; public String toString() {
} return (name);
}
public void setAttachment (String attachment) { }
this.attachment = attachment;
} private String attachment;
private Author author;
public Author getAuthor () { private String body;
return this.author; private Date createdAt;
} private Boolean downvote;
private Date expiresAt;
public void setAuthor (Author author) { private String fileName;
this.author = author; private Integer id;
} private Integer noteableId;
private NotableType noteableType;
public Date getCreatedAt () { private Boolean system;
return this.createdAt; private String title;
} private String updatedAt;
private Boolean upvote;
public void setCreatedAt (Date createdAt) {
this.createdAt = createdAt; public String getAttachment() {
} return attachment;
}
public Date getExpiresAt () {
return this.expiresAt; public void setAttachment(String attachment) {
} this.attachment = attachment;
}
public void setExpiresAt (Date expiresAt) {
this.expiresAt = expiresAt; public Author getAuthor() {
} return author;
}
public String getFileName () {
return this.fileName; public void setAuthor(Author author) {
} this.author = author;
}
public void setFileName (String fileName) {
this.fileName = fileName; public String getBody() {
} return body;
}
public Integer getId () {
return this.id; public void setBody(String body) {
} this.body = body;
}
public void setId (Integer id) {
this.id = id; public Date getCreatedAt() {
} return createdAt;
}
public String getTitle () {
return this.title; public void setCreatedAt(Date createdAt) {
} this.createdAt = createdAt;
}
public void setTitle (String title) {
this.title = title; public Boolean getDownvote() {
} return downvote;
}
public String getUpdatedAt () {
return this.updatedAt; public void setDownvote(Boolean downvote) {
} this.downvote = downvote;
}
public void setUpdatedAt (String updatedAt) {
this.updatedAt = updatedAt; public Date getExpiresAt() {
} return expiresAt;
}
public void setExpiresAt(Date expiresAt) {
this.expiresAt = expiresAt;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getNoteableId() {
return noteableId;
}
public void setNoteableId(Integer noteableId) {
this.noteableId = noteableId;
}
public NotableType getNoteableType() {
return noteableType;
}
public void setNoteableType(NotableType noteableType) {
this.noteableType = noteableType;
}
public Boolean getSystem() {
return system;
}
public void setSystem(Boolean system) {
this.system = system;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(String updatedAt) {
this.updatedAt = updatedAt;
}
public Boolean getUpvote() {
return upvote;
}
public void setUpvote(Boolean upvote) {
this.upvote = upvote;
}
} }
...@@ -10,31 +10,31 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -10,31 +10,31 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Owner { public class Owner {
private Date createdAt; private Date createdAt;
private Integer id; private Integer id;
private String name; private String name;
public Date getCreatedAt () { public Date getCreatedAt() {
return this.createdAt; return this.createdAt;
} }
public void setCreatedAt (Date createdAt) { public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt; this.createdAt = createdAt;
} }
public Integer getId () { public Integer getId() {
return this.id; return this.id;
} }
public void setId (Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
public String getName () { public String getName() {
return this.name; return this.name;
} }
public void setName (String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
} }
package com.messners.gitlab.api.models; package com.messners.gitlab.api.models;
import java.util.Date; import java.util.Date;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
...@@ -11,198 +11,369 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -11,198 +11,369 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement @XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class Project { public class Project {
private Date createdAt; private Boolean archived;
private String defaultBranch; private String avatarUrl;
private String description; private Boolean buildsEnabled;
private String httpUrlToRepo; private Boolean containerRegistryEnabled;
private Integer id; private Date createdAt;
private Boolean issuesEnabled; private Integer creatorId;
private Date lastActivityAt; private String defaultBranch;
private Boolean mergeRequestsEnabled; private String description;
private String name; private Integer forksCount;
private String nameWithNamespace; private Project forkedFromProject;
private Namespace namespace; private String httpUrlToRepo;
private Owner owner; private Integer id;
private String path; private Boolean issuesEnabled;
private String pathWithNamespace; private Date lastActivityAt;
private Boolean isPublic; private Boolean mergeRequestsEnabled;
private Boolean snippetsEnabled; private String name;
private String sshUrlToRepo; private Namespace namespace;
private Integer visibilityLevel; private String nameWithNamespace;
private Boolean wallEnabled; private Boolean onlyAllowMergeIfBuildSucceeds;
private String webUrl; private Boolean onlyAllowMergeIfAllDiscussionsAreResolved;
private Boolean wikiEnabled; private Integer openIssuesCount;
private Owner owner;
public Date getCreatedAt () { private String path;
return this.createdAt; private String pathWithNamespace;
} private Permissions permissions;
private Boolean isPublic;
public void setCreatedAt (Date createdAt) { private Boolean publicBuilds;
this.createdAt = createdAt; private String repositoryStorage;
} private Boolean request_access_enabled;
private String runnersToken;
public String getDefaultBranch () { private Boolean sharedRunnersEnabled;
return this.defaultBranch; private List<ProjectSharedGroup> sharedWithGroups;
} private Boolean snippetsEnabled;
private String sshUrlToRepo;
public void setDefaultBranch (String defaultBranch) { private Integer starCount;
this.defaultBranch = defaultBranch; private List<String> tagList;
} private Integer visibilityLevel;
private Boolean wallEnabled;
public String getDescription () { private String webUrl;
return this.description; private Boolean wikiEnabled;
}
public Boolean getArchived() {
public void setDescription (String description) { return archived;
this.description = description; }
}
public void setArchived(Boolean archived) {
public String getHttpUrlToRepo () { this.archived = archived;
return this.httpUrlToRepo; }
}
public String getAvatarUrl() {
public void setHttpUrlToRepo (String httpUrlToRepo) { return avatarUrl;
this.httpUrlToRepo = httpUrlToRepo; }
}
public void setAvatarUrl(String avatarUrl) {
public Integer getId () { this.avatarUrl = avatarUrl;
return this.id; }
}
public Boolean getBuildsEnabled() {
public void setId (Integer id) { return buildsEnabled;
this.id = id; }
}
public void setBuildsEnabled(Boolean buildsEnabled) {
public Boolean getIssuesEnabled () { this.buildsEnabled = buildsEnabled;
return this.issuesEnabled; }
}
public Boolean getContainerRegistryEnabled() {
public void setIssuesEnabled (Boolean issuesEnabled) { return containerRegistryEnabled;
this.issuesEnabled = issuesEnabled; }
}
public void setContainerRegistryEnabled(Boolean containerRegistryEnabled) {
public Date getLastActivityAt () { this.containerRegistryEnabled = containerRegistryEnabled;
return this.lastActivityAt; }
}
public Date getCreatedAt() {
public void setLastActivityAt (Date lastActivityAt) { return createdAt;
this.lastActivityAt = lastActivityAt; }
}
public void setCreatedAt(Date createdAt) {
public Boolean getMergeRequestsEnabled () { this.createdAt = createdAt;
return this.mergeRequestsEnabled; }
}
public Integer getCreatorId() {
public void setMergeRequestsEnabled (Boolean mergeRequestsEnabled) { return creatorId;
this.mergeRequestsEnabled = mergeRequestsEnabled; }
}
public void setCreatorId(Integer creatorId) {
public String getName () { this.creatorId = creatorId;
return this.name; }
}
public String getDefaultBranch() {
public void setName (String name) { return defaultBranch;
this.name = name; }
}
public void setDefaultBranch(String defaultBranch) {
public String getNameWithNamespace () { this.defaultBranch = defaultBranch;
return this.nameWithNamespace; }
}
public String getDescription() {
public void setNameWithNamespace (String nameWithNamespace) { return description;
this.nameWithNamespace = nameWithNamespace; }
}
public void setDescription(String description) {
public Namespace getNamespace () { this.description = description;
return this.namespace; }
}
public Integer getForksCount() {
public void setNamespace (Namespace namespace) { return forksCount;
this.namespace = namespace; }
}
public void setForksCount(Integer forksCount) {
public Owner getOwner () { this.forksCount = forksCount;
return this.owner; }
}
public Project getForkedFromProject() {
public void setOwner (Owner owner) { return forkedFromProject;
this.owner = owner; }
}
public void setForkedFromProject(Project forkedFromProject) {
public String getPath () { this.forkedFromProject = forkedFromProject;
return this.path; }
}
public String getHttpUrlToRepo() {
public void setPath (String path) { return httpUrlToRepo;
this.path = path; }
}
public void setHttpUrlToRepo(String httpUrlToRepo) {
public String getPathWithNamespace () { this.httpUrlToRepo = httpUrlToRepo;
return this.pathWithNamespace; }
}
public Integer getId() {
public void setPathWithNamespace (String pathWithNamespace) { return id;
this.pathWithNamespace = pathWithNamespace; }
}
public void setId(Integer id) {
public Boolean getPublic () { this.id = id;
return this.isPublic; }
}
public Boolean getIssuesEnabled() {
public void setPublic (Boolean isPublic) { return issuesEnabled;
this.isPublic = isPublic; }
}
public void setIssuesEnabled(Boolean issuesEnabled) {
public Boolean getSnippetsEnabled () { this.issuesEnabled = issuesEnabled;
return this.snippetsEnabled; }
}
public Date getLastActivityAt() {
public void setSnippetsEnabled (Boolean snippetsEnabled) { return lastActivityAt;
this.snippetsEnabled = snippetsEnabled; }
}
public void setLastActivityAt(Date lastActivityAt) {
public String getSshUrlToRepo () { this.lastActivityAt = lastActivityAt;
return this.sshUrlToRepo; }
}
public Boolean getMergeRequestsEnabled() {
public void setSshUrlToRepo (String sshUrlToRepo) { return mergeRequestsEnabled;
this.sshUrlToRepo = sshUrlToRepo; }
}
public void setMergeRequestsEnabled(Boolean mergeRequestsEnabled) {
public Integer getVisibilityLevel () { this.mergeRequestsEnabled = mergeRequestsEnabled;
return this.visibilityLevel; }
}
public String getName() {
public void setVisibilityLevel (Integer visibilityLevel) { return name;
this.visibilityLevel = visibilityLevel; }
}
public void setName(String name) {
public Boolean getWallEnabled () { this.name = name;
return this.wallEnabled; }
}
public Namespace getNamespace() {
public void setWallEnabled (Boolean wallEnabled) { return namespace;
this.wallEnabled = wallEnabled; }
}
public void setNamespace(Namespace namespace) {
public String getWebUrl () { this.namespace = namespace;
return this.webUrl; }
}
public String getNameWithNamespace() {
public void setWebUrl (String webUrl) { return nameWithNamespace;
this.webUrl = webUrl; }
}
public void setNameWithNamespace(String nameWithNamespace) {
public Boolean getWikiEnabled () { this.nameWithNamespace = nameWithNamespace;
return this.wikiEnabled; }
}
public Boolean getOnlyAllowMergeIfBuildSucceeds() {
public void setWikiEnabled (Boolean wikiEnabled) { return onlyAllowMergeIfBuildSucceeds;
this.wikiEnabled = wikiEnabled; }
}
public void setOnlyAllowMergeIfBuildSucceeds(Boolean onlyAllowMergeIfBuildSucceeds) {
public static final boolean isValid (Project project) { this.onlyAllowMergeIfBuildSucceeds = onlyAllowMergeIfBuildSucceeds;
return (project != null && project.getId() != null); }
}
public Boolean getOnlyAllowMergeIfAllDiscussionsAreResolved() {
return onlyAllowMergeIfAllDiscussionsAreResolved;
}
public void setOnlyAllowMergeIfAllDiscussionsAreResolved(Boolean onlyAllowMergeIfAllDiscussionsAreResolved) {
this.onlyAllowMergeIfAllDiscussionsAreResolved = onlyAllowMergeIfAllDiscussionsAreResolved;
}
public Integer getOpenIssuesCount() {
return openIssuesCount;
}
public void setOpenIssuesCount(Integer openIssuesCount) {
this.openIssuesCount = openIssuesCount;
}
public Owner getOwner() {
return owner;
}
public void setOwner(Owner owner) {
this.owner = owner;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getPathWithNamespace() {
return pathWithNamespace;
}
public void setPathWithNamespace(String pathWithNamespace) {
this.pathWithNamespace = pathWithNamespace;
}
public Permissions getPermissions() {
return permissions;
}
public void setPermissions(Permissions permissions) {
this.permissions = permissions;
}
public Boolean getPublic() {
return isPublic;
}
public void setPublic(Boolean isPublic) {
this.isPublic = isPublic;
}
public Boolean getPublicBuilds() {
return publicBuilds;
}
public void setPublicBuilds(Boolean publicBuilds) {
this.publicBuilds = publicBuilds;
}
public String getRepositoryStorage() {
return repositoryStorage;
}
public void setRepositoryStorage(String repositoryStorage) {
this.repositoryStorage = repositoryStorage;
}
public Boolean getRequest_access_enabled() {
return request_access_enabled;
}
public void setRequest_access_enabled(Boolean request_access_enabled) {
this.request_access_enabled = request_access_enabled;
}
public String getRunnersToken() {
return runnersToken;
}
public void setRunnersToken(String runnersToken) {
this.runnersToken = runnersToken;
}
public Boolean getSharedRunnersEnabled() {
return sharedRunnersEnabled;
}
public void setSharedRunnersEnabled(Boolean sharedRunnersEnabled) {
this.sharedRunnersEnabled = sharedRunnersEnabled;
}
public List<ProjectSharedGroup> getSharedWithGroups() {
return sharedWithGroups;
}
public void setSharedWithGroups(List<ProjectSharedGroup> sharedWithGroups) {
this.sharedWithGroups = sharedWithGroups;
}
public Boolean getSnippetsEnabled() {
return snippetsEnabled;
}
public void setSnippetsEnabled(Boolean snippetsEnabled) {
this.snippetsEnabled = snippetsEnabled;
}
public String getSshUrlToRepo() {
return sshUrlToRepo;
}
public void setSshUrlToRepo(String sshUrlToRepo) {
this.sshUrlToRepo = sshUrlToRepo;
}
public Integer getStarCount() {
return starCount;
}
public void setStarCount(Integer starCount) {
this.starCount = starCount;
}
public List<String> getTagList() {
return tagList;
}
public void setTagList(List<String> tagList) {
this.tagList = tagList;
}
public Integer getVisibilityLevel() {
return visibilityLevel;
}
public void setVisibilityLevel(Integer visibilityLevel) {
this.visibilityLevel = visibilityLevel;
}
public Boolean getWallEnabled() {
return wallEnabled;
}
public void setWallEnabled(Boolean wallEnabled) {
this.wallEnabled = wallEnabled;
}
public String getWebUrl() {
return webUrl;
}
public void setWebUrl(String webUrl) {
this.webUrl = webUrl;
}
public Boolean getWikiEnabled() {
return wikiEnabled;
}
public void setWikiEnabled(Boolean wikiEnabled) {
this.wikiEnabled = wikiEnabled;
}
public static final boolean isValid(Project project) {
return (project != null && project.getId() != null);
}
} }
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