Commit ba0a4ef7 authored by unknown's avatar unknown
Browse files

Initial check-in.

parents
package com.messners.gitlab.api;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class MergeRequest {
private Assignee assignee;
private Author author;
private Integer downvotes;
private Integer id;
private Integer iid;
private Integer projectId;
private String sourceBranch;
private String state;
private String targetBranch;
private String title;
private Integer upvotes;
public Assignee getAssignee () {
return this.assignee;
}
public void setAssignee (Assignee assignee) {
this.assignee = assignee;
}
public Author getAuthor () {
return this.author;
}
public void setAuthor (Author author) {
this.author = author;
}
public Integer getDownvotes () {
return this.downvotes;
}
public void setDownvotes (Integer downvotes) {
this.downvotes = downvotes;
}
public Integer getId () {
return this.id;
}
public void setId (Integer id) {
this.id = id;
}
public Integer getIid () {
return this.iid;
}
public void setIid (Integer iid) {
this.iid = iid;
}
public Integer getProjectId () {
return this.projectId;
}
public void setProjectId (Integer projectId) {
this.projectId = projectId;
}
public String getSourceBranch () {
return this.sourceBranch;
}
public void setSourceBranch (String sourceBranch) {
this.sourceBranch = sourceBranch;
}
public String getState () {
return this.state;
}
public void setState (String state) {
this.state = state;
}
public String getTargetBranch () {
return this.targetBranch;
}
public void setTargetBranch (String targetBranch) {
this.targetBranch = targetBranch;
}
public String getTitle () {
return this.title;
}
public void setTitle (String title) {
this.title = title;
}
public Integer getUpvotes () {
return this.upvotes;
}
public void setUpvotes (Integer upvotes) {
this.upvotes = upvotes;
}
}
package com.messners.gitlab.api;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class MergeRequestComment {
private Author author;
private String note;
public Author getAuthor () {
return this.author;
}
public void setAuthor (Author author) {
this.author = author;
}
public String getNote () {
return this.note;
}
public void setNote (String note) {
this.note = note;
}
}
package com.messners.gitlab.api;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Milestone {
private Date createdAt;
private String description;
private Date dueDate;
private Integer id;
private Integer iid;
private Integer projectId;
private String state;
private String title;
private Date updatedAt;
public Date getCreatedAt () {
return this.createdAt;
}
public void setCreatedAt (Date createdAt) {
this.createdAt = createdAt;
}
public String getDescription () {
return this.description;
}
public void setDescription (String description) {
this.description = description;
}
public Date getDueDate () {
return this.dueDate;
}
public void setDueDate (Date dueDate) {
this.dueDate = dueDate;
}
public Integer getId () {
return this.id;
}
public void setId (Integer id) {
this.id = id;
}
public Integer getIid () {
return this.iid;
}
public void setIid (Integer iid) {
this.iid = iid;
}
public Integer getProjectId () {
return this.projectId;
}
public void setProjectId (Integer projectId) {
this.projectId = projectId;
}
public String getState () {
return this.state;
}
public void setState (String state) {
this.state = state;
}
public String getTitle () {
return this.title;
}
public void setTitle (String title) {
this.title = title;
}
public Date getUpdatedAt () {
return this.updatedAt;
}
public void setUpdatedAt (Date updatedAt) {
this.updatedAt = updatedAt;
}
}
package com.messners.gitlab.api;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Namespace {
private Date createdAt;
private String description;
private Integer id;
private String name;
private Integer ownerId;
private String path;
private String updatedAt;
public Date getCreatedAt () {
return this.createdAt;
}
public void setCreatedAt (Date createdAt) {
this.createdAt = createdAt;
}
public String getDescription () {
return this.description;
}
public void setDescription (String description) {
this.description = description;
}
public Integer getId () {
return this.id;
}
public void setId (Integer id) {
this.id = id;
}
public String getName () {
return this.name;
}
public void setName (String name) {
this.name = name;
}
public Integer getOwnerId () {
return this.ownerId;
}
public void setOwnerId (Integer ownerId) {
this.ownerId = ownerId;
}
public String getPath () {
return this.path;
}
public void setPath (String path) {
this.path = path;
}
public String getUpdatedAt () {
return this.updatedAt;
}
public void setUpdatedAt (String updatedAt) {
this.updatedAt = updatedAt;
}
}
package com.messners.gitlab.api;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Note {
private String attachment;
private Author author;
private Date createdAt;
private Date expiresAt;
private String fileName;
private Integer id;
private String title;
private String updatedAt;
public String getAttachment () {
return this.attachment;
}
public void setAttachment (String attachment) {
this.attachment = attachment;
}
public Author getAuthor () {
return this.author;
}
public void setAuthor (Author author) {
this.author = author;
}
public Date getCreatedAt () {
return this.createdAt;
}
public void setCreatedAt (Date createdAt) {
this.createdAt = createdAt;
}
public Date getExpiresAt () {
return this.expiresAt;
}
public void setExpiresAt (Date expiresAt) {
this.expiresAt = expiresAt;
}
public String getFileName () {
return this.fileName;
}
public void setFileName (String fileName) {
this.fileName = fileName;
}
public Integer getId () {
return this.id;
}
public void setId (Integer id) {
this.id = id;
}
public String getTitle () {
return this.title;
}
public void setTitle (String title) {
this.title = title;
}
public String getUpdatedAt () {
return this.updatedAt;
}
public void setUpdatedAt (String updatedAt) {
this.updatedAt = updatedAt;
}
}
package com.messners.gitlab.api;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Owner {
private Date createdAt;
private Integer id;
private String name;
public Date getCreatedAt () {
return this.createdAt;
}
public void setCreatedAt (Date createdAt) {
this.createdAt = createdAt;
}
public Integer getId () {
return this.id;
}
public void setId (Integer id) {
this.id = id;
}
public String getName () {
return this.name;
}
public void setName (String name) {
this.name = name;
}
}
package com.messners.gitlab.api;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Project {
private Date createdAt;
private String defaultBranch;
private String description;
private String httpUrlToRepo;
private Integer id;
private boolean issuesEnabled;
private Date lastActivityAt;
private boolean mergeRequestsEnabled;
private String name;
private String nameWithNamespace;
private Namespace namespace;
private Owner owner;
private String path;
private String pathWithNamespace;
private boolean isPublic;
private boolean snippetsEnabled;
private String sshUrlToRepo;
private Integer visibilityLevel;
private boolean wallEnabled;
private String webUrl;
private boolean wikiEnabled;
public Date getCreatedAt () {
return this.createdAt;
}
public void setCreatedAt (Date createdAt) {
this.createdAt = createdAt;
}
public String getDefaultBranch () {
return this.defaultBranch;
}
public void setDefaultBranch (String defaultBranch) {
this.defaultBranch = defaultBranch;
}
public String getDescription () {
return this.description;
}
public void setDescription (String description) {
this.description = description;
}
public String getHttpUrlToRepo () {
return this.httpUrlToRepo;
}
public void setHttpUrlToRepo (String httpUrlToRepo) {
this.httpUrlToRepo = httpUrlToRepo;
}
public Integer getId () {
return this.id;
}
public void setId (Integer id) {
this.id = id;
}
public boolean getIssuesEnabled () {
return this.issuesEnabled;
}
public void setIssuesEnabled (boolean issuesEnabled) {
this.issuesEnabled = issuesEnabled;
}
public Date getLastActivityAt () {
return this.lastActivityAt;
}
public void setLastActivityAt (Date lastActivityAt) {
this.lastActivityAt = lastActivityAt;
}
public boolean getMergeRequestsEnabled () {
return this.mergeRequestsEnabled;
}
public void setMergeRequestsEnabled (boolean mergeRequestsEnabled) {
this.mergeRequestsEnabled = mergeRequestsEnabled;
}
public String getName () {
return this.name;
}
public void setName (String name) {
this.name = name;
}
public String getNameWithNamespace () {
return this.nameWithNamespace;
}
public void setNameWithNamespace (String nameWithNamespace) {
this.nameWithNamespace = nameWithNamespace;
}
public Namespace getNamespace () {
return this.namespace;
}
public void setNamespace (Namespace namespace) {
this.namespace = namespace;
}
public Owner getOwner () {
return this.owner;
}
public void setOwner (Owner owner) {
this.owner = owner;
}
public String getPath () {
return this.path;
}
public void setPath (String path) {
this.path = path;
}
public String getPathWithNamespace () {
return this.pathWithNamespace;
}
public void setPathWithNamespace (String pathWithNamespace) {
this.pathWithNamespace = pathWithNamespace;
}
public boolean getPublic () {
return this.isPublic;
}
public void setPublic (boolean isPublic) {
this.isPublic = isPublic;
}
public boolean getSnippetsEnabled () {
return this.snippetsEnabled;
}
public void setSnippetsEnabled (boolean snippetsEnabled) {
this.snippetsEnabled = snippetsEnabled;
}
public String getSshUrlToRepo () {
return this.sshUrlToRepo;
}
public void setSshUrlToRepo (String sshUrlToRepo) {
this.sshUrlToRepo = sshUrlToRepo;
}
public Integer getVisibilityLevel () {
return this.visibilityLevel;
}
public void setVisibilityLevel (Integer visibilityLevel) {
this.visibilityLevel = visibilityLevel;
}
public boolean getWallEnabled () {
return this.wallEnabled;
}
public void setWallEnabled (boolean wallEnabled) {
this.wallEnabled = wallEnabled;
}
public String getWebUrl () {
return this.webUrl;
}
public void setWebUrl (String webUrl) {
this.webUrl = webUrl;
}
public boolean getWikiEnabled () {
return this.wikiEnabled;
}
public void setWikiEnabled (boolean wikiEnabled) {
this.wikiEnabled = wikiEnabled;
}
}
package com.messners.gitlab.api;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class ProjectSnippet {
private Author author;
private Date createdAt;
private Date expiresAt;
private String fileName;
private Integer id;
private String title;
private String updatedAt;
public Author getAuthor () {
return this.author;
}
public void setAuthor (Author author) {
this.author = author;
}
public Date getCreatedAt () {
return this.createdAt;
}
public void setCreatedAt (Date createdAt) {
this.createdAt = createdAt;
}
public Date getExpiresAt () {
return this.expiresAt;
}
public void setExpiresAt (Date expiresAt) {
this.expiresAt = expiresAt;
}
public String getFileName () {
return this.fileName;
}
public void setFileName (String fileName) {
this.fileName = fileName;
}
public Integer getId () {
return this.id;
}
public void setId (Integer id) {
this.id = id;
}
public String getTitle () {
return this.title;
}
public void setTitle (String title) {
this.title = title;
}
public String getUpdatedAt () {
return this.updatedAt;
}
public void setUpdatedAt (String updatedAt) {
this.updatedAt = updatedAt;
}
}
package com.messners.gitlab.api;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Repository {
private String description;
private String homepage;
private String name;
private String url;
public String getDescription () {
return this.description;
}
public void setDescription (String description) {
this.description = description;
}
public String getHomepage () {
return this.homepage;
}
public void setHomepage (String homepage) {
this.homepage = homepage;
}
public String getName () {
return this.name;
}
public void setName (String name) {
this.name = name;
}
public String getUrl () {
return this.url;
}
public void setUrl (String url) {
this.url = url;
}
}
package com.messners.gitlab.api;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Session {
private String bio;
private boolean blocked;
private boolean canCreateGroup;
private boolean canCreateProject;
private boolean canCreateTeam;
private Date createdAt;
private boolean darkScheme;
private String email;
private Integer id;
private boolean isAdmin;
private String linkedin;
private String name;
private String privateToken;
private String skype;
private Integer themeId;
private String twitter;
private String username;
private String websiteUrl;
public String getBio () {
return this.bio;
}
public void setBio (String bio) {
this.bio = bio;
}
public boolean getBlocked () {
return this.blocked;
}
public void setBlocked (boolean blocked) {
this.blocked = blocked;
}
public boolean getCanCreateGroup () {
return this.canCreateGroup;
}
public void setCanCreateGroup (boolean canCreateGroup) {
this.canCreateGroup = canCreateGroup;
}
public boolean getCanCreateProject () {
return this.canCreateProject;
}
public void setCanCreateProject (boolean canCreateProject) {
this.canCreateProject = canCreateProject;
}
public boolean getCanCreateTeam () {
return this.canCreateTeam;
}
public void setCanCreateTeam (boolean canCreateTeam) {
this.canCreateTeam = canCreateTeam;
}
public Date getCreatedAt () {
return this.createdAt;
}
public void setCreatedAt (Date createdAt) {
this.createdAt = createdAt;
}
public boolean getDarkScheme () {
return this.darkScheme;
}
public void setDarkScheme (boolean darkScheme) {
this.darkScheme = darkScheme;
}
public String getEmail () {
return this.email;
}
public void setEmail (String email) {
this.email = email;
}
public Integer getId () {
return this.id;
}
public void setId (Integer id) {
this.id = id;
}
public boolean getIsAdmin () {
return this.isAdmin;
}
public void setIsAdmin (boolean isAdmin) {
this.isAdmin = isAdmin;
}
public String getLinkedin () {
return this.linkedin;
}
public void setLinkedin (String linkedin) {
this.linkedin = linkedin;
}
public String getName () {
return this.name;
}
public void setName (String name) {
this.name = name;
}
public String getPrivateToken () {
return this.privateToken;
}
public void setPrivateToken (String privateToken) {
this.privateToken = privateToken;
}
public String getSkype () {
return this.skype;
}
public void setSkype (String skype) {
this.skype = skype;
}
public Integer getThemeId () {
return this.themeId;
}
public void setThemeId (Integer themeId) {
this.themeId = themeId;
}
public String getTwitter () {
return this.twitter;
}
public void setTwitter (String twitter) {
this.twitter = twitter;
}
public String getUsername () {
return this.username;
}
public void setUsername (String username) {
this.username = username;
}
public String getWebsiteUrl () {
return this.websiteUrl;
}
public void setWebsiteUrl (String websiteUrl) {
this.websiteUrl = websiteUrl;
}
}
package com.messners.gitlab.api;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class SystemHook {
private String eventName;
private String name;
private String ownerEmail;
private String ownerName;
private String path;
private Integer projectId;
public String getEventName () {
return this.eventName;
}
public void setEventName (String eventName) {
this.eventName = eventName;
}
public String getName () {
return this.name;
}
public void setName (String name) {
this.name = name;
}
public String getOwnerEmail () {
return this.ownerEmail;
}
public void setOwnerEmail (String ownerEmail) {
this.ownerEmail = ownerEmail;
}
public String getOwnerName () {
return this.ownerName;
}
public void setOwnerName (String ownerName) {
this.ownerName = ownerName;
}
public String getPath () {
return this.path;
}
public void setPath (String path) {
this.path = path;
}
public Integer getProjectId () {
return this.projectId;
}
public void setProjectId (Integer projectId) {
this.projectId = projectId;
}
}
package com.messners.gitlab.api;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Tag {
private Commit commit;
private String name;
private boolean isProtected;
public Commit getCommit () {
return this.commit;
}
public void setCommit (Commit commit) {
this.commit = commit;
}
public String getName () {
return this.name;
}
public void setName (String name) {
this.name = name;
}
public boolean getProtected () {
return this.isProtected;
}
public void setProtected (boolean isProtected) {
this.isProtected = isProtected;
}
}
package com.messners.gitlab.api;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class TreeItem {
public enum Type {
TREE,
BLOB;
public String toString () {
return (name().toLowerCase());
}
}
private String id;
private String mode;
private String name;
private Type type;
public String getId () {
return this.id;
}
public void setId (String id) {
this.id = id;
}
public String getMode () {
return this.mode;
}
public void setMode (String mode) {
this.mode = mode;
}
public String getName () {
return this.name;
}
public void setName (String name) {
this.name = name;
}
public Type getType () {
return this.type;
}
public void setType (Type type) {
this.type = type;
}
}
package com.messners.gitlab.api;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class User {
private String bio;
private boolean canCreateGroup;
private Integer colorSchemeId;
private Date createdAt;
private String email;
private String externUid;
private Integer id;
private boolean isAdmin;
private String linkedin;
private String name;
private String provider;
private String skype;
private String state;
private Integer themeId;
private String twitter;
private String username;
private String websiteUrl;
public String getBio () {
return this.bio;
}
public void setBio (String bio) {
this.bio = bio;
}
public boolean getCanCreateGroup () {
return this.canCreateGroup;
}
public void setCanCreateGroup (boolean canCreateGroup) {
this.canCreateGroup = canCreateGroup;
}
public Integer getColorSchemeId () {
return this.colorSchemeId;
}
public void setColorSchemeId (Integer colorSchemeId) {
this.colorSchemeId = colorSchemeId;
}
public Date getCreatedAt () {
return this.createdAt;
}
public void setCreatedAt (Date createdAt) {
this.createdAt = createdAt;
}
public String getEmail () {
return this.email;
}
public void setEmail (String email) {
this.email = email;
}
public String getExternUid () {
return this.externUid;
}
public void setExternUid (String externUid) {
this.externUid = externUid;
}
public Integer getId () {
return this.id;
}
public void setId (Integer id) {
this.id = id;
}
public boolean getIsAdmin () {
return this.isAdmin;
}
public void setIsAdmin (boolean isAdmin) {
this.isAdmin = isAdmin;
}
public String getLinkedin () {
return this.linkedin;
}
public void setLinkedin (String linkedin) {
this.linkedin = linkedin;
}
public String getName () {
return this.name;
}
public void setName (String name) {
this.name = name;
}
public String getProvider () {
return this.provider;
}
public void setProvider (String provider) {
this.provider = provider;
}
public String getSkype () {
return this.skype;
}
public void setSkype (String skype) {
this.skype = skype;
}
public String getState () {
return this.state;
}
public void setState (String state) {
this.state = state;
}
public Integer getThemeId () {
return this.themeId;
}
public void setThemeId (Integer themeId) {
this.themeId = themeId;
}
public String getTwitter () {
return this.twitter;
}
public void setTwitter (String twitter) {
this.twitter = twitter;
}
public String getUsername () {
return this.username;
}
public void setUsername (String username) {
this.username = username;
}
public String getWebsiteUrl () {
return this.websiteUrl;
}
public void setWebsiteUrl (String websiteUrl) {
this.websiteUrl = websiteUrl;
}
}
package com.messners.gitlab.api.event;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class EventObject {
public enum ObjectKind {
MERGE_REQUEST,
ISSUE;
public String toString () {
return (name().toLowerCase());
}
}
private EventObjectAttributes objectAttributes;
private ObjectKind objectKind;
public EventObjectAttributes getObjectAttributes () {
return this.objectAttributes;
}
public void setObjectAttributes (EventObjectAttributes objectAttributes) {
this.objectAttributes = objectAttributes;
}
public ObjectKind getObjectKind () {
return this.objectKind;
}
public void setObjectKind (ObjectKind objectKind) {
this.objectKind = objectKind;
}
}
package com.messners.gitlab.api.event;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "object_attributes")
@XmlAccessorType (XmlAccessType.FIELD)
public class EventObjectAttributes {
private Integer assigneeId;
private Integer authorId;
private String branchName;
private Date createdAt;
private String description;
private Integer id;
private Integer iid;
private String mergeStatus;
private String milestoneId;
private Integer position;
private Integer projectId;
private String sourceBranch;
private Integer sourceProjectId;
private String stCommits;
private String stDiffs;
private String state;
private String targetBranch;
private Integer targetProjectId;
private String title;
private Date updatedAt;
public Integer getAssigneeId () {
return this.assigneeId;
}
public void setAssigneeId (Integer assigneeId) {
this.assigneeId = assigneeId;
}
public Integer getAuthorId () {
return this.authorId;
}
public void setAuthorId (Integer authorId) {
this.authorId = authorId;
}
public String getBranchName () {
return this.branchName;
}
public void setBranchName (String branchName) {
this.branchName = branchName;
}
public Date getCreatedAt () {
return this.createdAt;
}
public void setCreatedAt (Date createdAt) {
this.createdAt = createdAt;
}
public String getDescription () {
return this.description;
}
public void setDescription (String description) {
this.description = description;
}
public Integer getId () {
return this.id;
}
public void setId (Integer id) {
this.id = id;
}
public Integer getIid () {
return this.iid;
}
public void setIid (Integer iid) {
this.iid = iid;
}
public String getMergeStatus () {
return this.mergeStatus;
}
public void setMergeStatus (String mergeStatus) {
this.mergeStatus = mergeStatus;
}
public String getMilestoneId () {
return this.milestoneId;
}
public void setMilestoneId (String milestoneId) {
this.milestoneId = milestoneId;
}
public Integer getPosition () {
return this.position;
}
public void setPosition (Integer position) {
this.position = position;
}
public Integer getProjectId () {
return this.projectId;
}
public void setProjectId (Integer projectId) {
this.projectId = projectId;
}
public String getSourceBranch () {
return this.sourceBranch;
}
public void setSourceBranch (String sourceBranch) {
this.sourceBranch = sourceBranch;
}
public Integer getSourceProjectId () {
return this.sourceProjectId;
}
public void setSourceProjectId (Integer sourceProjectId) {
this.sourceProjectId = sourceProjectId;
}
public String getStCommits () {
return this.stCommits;
}
public void setStCommits (String stCommits) {
this.stCommits = stCommits;
}
public String getStDiffs () {
return this.stDiffs;
}
public void setStDiffs (String stDiffs) {
this.stDiffs = stDiffs;
}
public String getState () {
return this.state;
}
public void setState (String state) {
this.state = state;
}
public String getTargetBranch () {
return this.targetBranch;
}
public void setTargetBranch (String targetBranch) {
this.targetBranch = targetBranch;
}
public Integer getTargetProjectId () {
return this.targetProjectId;
}
public void setTargetProjectId (Integer targetProjectId) {
this.targetProjectId = targetProjectId;
}
public String getTitle () {
return this.title;
}
public void setTitle (String title) {
this.title = title;
}
public Date getUpdatedAt () {
return this.updatedAt;
}
public void setUpdatedAt (Date updatedAt) {
this.updatedAt = updatedAt;
}
}
package com.messners.gitlab.api.event;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.messners.gitlab.api.Commit;
import com.messners.gitlab.api.Repository;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PushEvent {
private String after;
private String before;
private List<Commit> commits;
private Number projectId;
private String ref;
private Repository repository;
private Number totalCommitsCount;
private Number userId;
private String userName;
public String getAfter () {
return this.after;
}
public void setAfter (String after) {
this.after = after;
}
public String getBefore () {
return this.before;
}
public void setBefore (String before) {
this.before = before;
}
public List<Commit> getCommits () {
return this.commits;
}
public void setCommits (List<Commit> commits) {
this.commits = commits;
}
public Number getProjectId () {
return this.projectId;
}
public void setProjectId (Number projectId) {
this.projectId = projectId;
}
public String getRef () {
return this.ref;
}
public void setRef (String ref) {
this.ref = ref;
}
public Repository getRepository () {
return this.repository;
}
public void setRepository (Repository repository) {
this.repository = repository;
}
public Number getTotalCommitsCount () {
return this.totalCommitsCount;
}
public void setTotalCommitsCount (Number totalCommitsCount) {
this.totalCommitsCount = totalCommitsCount;
}
public Number getUserId () {
return this.userId;
}
public void setUserId (Number userId) {
this.userId = userId;
}
public String getUserName () {
return this.userName;
}
public void setUserName (String userName) {
this.userName = userName;
}
}
package com.messners.gitlab.api.event;
/**
* This class defines an event listener for the event fired when
* a WebHook notification has been received from a GitLab server.
*
* @author Greg Messner <gmessner@messners.com>
*/
public interface WebHookListener extends java.util.EventListener {
/**
* This method is called when a WebHook issue notification has been received.
*
* @param event the EventObject instance containing info on the issue
*/
public void issue (EventObject event);
/**.
* This method is called when a WebHook merge request notification has been received
*
* @param event the EventObject instance containing info on the merge request
*/
public void mergeRequest (EventObject event);
/**
* This method is called when a WebHook push notification has been received.
*
* @param pushEvent the PushEvent instance
*/
public void push (PushEvent pushEvent);
}
package com.messners.gitlab.api;
import static org.junit.Assert.assertTrue;
import org.junit.BeforeClass;
import org.junit.Test;
public class TestCreateProjectAndMergeRequest {
// The following needs to be set to your test repository
private static final String TEST_HOST_URL = "https://your.gitlab.host.url";
private static final String TEST_PRIVATE_TOKEN = "YOUR PRIVATE TOKEN";
private static GitLabApi gitLabApi;
public TestCreateProjectAndMergeRequest () {
super();
}
@BeforeClass
public static void setup () {
gitLabApi = new GitLabApi(TEST_HOST_URL, TEST_PRIVATE_TOKEN);
}
@Test
public void testCreateProject () {
try {
Project newProject = new Project();
newProject.setName("test-gitlab-api-project");
Project project = gitLabApi.createProject(newProject);
assertTrue(project != null);
assertTrue(project.getName().equals(newProject.getName()));
gitLabApi.deleteProject(project);
} catch (Exception e) {
System.err.println("Check TEST_HOST_URL and TEST_PRIVATE_TOKEN, they are probably not set.");
}
}
}
package com.messners.gitlab.api;
import static org.junit.Assert.assertTrue;
import java.util.List;
import org.junit.BeforeClass;
import org.junit.Test;
public class TestGitLabApi {
// The following needs to be set to your test repository
private static final String TEST_HOST_URL = "https://your.gitlab.host.url";
private static final String TEST_PRIVATE_TOKEN = "YOUR PRIVATE TOKEN";
private static GitLabApi gitLabApi;
public TestGitLabApi () {
super();
}
@BeforeClass
public static void setup () {
gitLabApi = new GitLabApi(TEST_HOST_URL, TEST_PRIVATE_TOKEN);
}
@Test
public void testProjects () {
try {
List<Project> projects = gitLabApi.getProjects();
assertTrue(projects != null);
} catch (Exception e) {
System.err.println("Check TEST_HOST_URL and TEST_PRIVATE_TOKEN, they are probably not set.");
}
}
@Test
public void testOwnedProjects () {
try {
List<Project> projects = gitLabApi.getOwnedProjects();
assertTrue(projects != null);
} catch (Exception e) {
System.err.println("Check TEST_HOST_URL and TEST_PRIVATE_TOKEN, they are probably not set.");
}
}
@Test
public void testOwnedProjectsProject () {
try {
List<Project> projects = gitLabApi.getOwnedProjects();
assertTrue(projects != null);
Project ownedProject = projects.get(0);
assertTrue(ownedProject != null);
Project project = gitLabApi.getProject(ownedProject.getId());
assertTrue(project != null);
assertTrue(ownedProject.getId().equals(project.getId()));
} catch (Exception e) {
System.err.println("Check TEST_HOST_URL and TEST_PRIVATE_TOKEN, they are probably not set.");
}
}
}
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