Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions src/main/java/org/gitlab4j/api/models/Branch.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,35 @@ public void setProtected(Boolean isProtected) {
public static final boolean isValid(Branch branch) {
return (branch != null && branch.getName() != null);
}


public Branch withCommit(Commit commit) {
this.commit = commit;
return this;
}

public Branch withDevelopersCanMerge(Boolean developersCanMerge) {
this.developersCanMerge = developersCanMerge;
return this;
}

public Branch withDevelopersCanPush(Boolean developersCanPush) {
this.developersCanPush = developersCanPush;
return this;
}

public Branch withDerged(Boolean merged) {
this.merged = merged;
return this;
}

public Branch withName(String name) {
this.name = name;
return this;
}

public Branch withIsProtected(Boolean isProtected) {
this.isProtected = isProtected;
return this;
}
}
86 changes: 86 additions & 0 deletions src/main/java/org/gitlab4j/api/models/Commit.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,90 @@ public String getUrl() {
public void setUrl(String url) {
this.url = url;
}


public Commit withAuthor(Author author) {
this.author = author;
return this;
}

public Commit withAuthoredDate(Date authoredDate) {
this.authoredDate = authoredDate;
return this;
}

public Commit withAuthorEmail(String authorEmail) {
this.authorEmail = authorEmail;
return this;
}

public Commit withAuthorName(String authorName) {
this.authorName = authorName;
return this;
}

public Commit withCommittedDate(Date committedDate) {
this.committedDate = committedDate;
return this;
}

public Commit withCommitterEmail(String committerEmail) {
this.committerEmail = committerEmail;
return this;
}

public Commit withCommitterName(String committerName) {
this.committerName = committerName;
return this;
}

public Commit withCreatedAt(Date createdAt) {
this.createdAt = createdAt;
return this;
}

public Commit withId(String id) {
this.id = id;
return this;
}

public Commit withMessage(String message) {
this.message = message;
return this;
}

public Commit withParentIds(List<String> parentIds) {
this.parentIds = parentIds;
return this;
}

public Commit withShorwId(String shortId) {
this.shortId = shortId;
return this;
}

public Commit withStats(CommitStats stats) {
this.stats = stats;
return this;
}

public Commit withStatus(String status) {
this.status = status;
return this;
}

public Commit withTimestamp(Date timestamp) {
this.timestamp = timestamp;
return this;
}

public Commit withTitle(String title) {
this.title = title;
return this;
}

public Commit withUrl(String url) {
this.url = url;
return this;
}
}
60 changes: 60 additions & 0 deletions src/main/java/org/gitlab4j/api/models/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,64 @@ public PushData getPushData() {
public void setPushData(PushData pushData) {
this.pushData = pushData;
}

public Event withActionName(String actionName) {
this.actionName = actionName;
return this;
}

public Event withAuthor(Author author) {
this.author = author;
return this;
}

public Event withAuthorId(Integer authorId) {
this.authorId = authorId;
return this;
}

public Event withAuthorUsername(String authorUsername) {
this.authorUsername = authorUsername;
return this;
}

public Event withData(EventData data) {
this.data = data;
return this;
}

public Event withProjectId(Integer projectId) {
this.projectId = projectId;
return this;
}

public Event withTargetId(Integer targetId) {
this.targetId = targetId;
return this;
}

public Event withTargetIid(Integer targetIid) {
this.targetIid = targetIid;
return this;
}

public Event withTargetTitle(String targetTitle) {
this.targetTitle = targetTitle;
return this;
}

public Event withTargetType(TargetType targetType) {
this.targetType = targetType;
return this;
}

public Event withTitle(String title) {
this.title = title;
return this;
}

public Event withCreatedAt(Date createdAt) {
this.createdAt = createdAt;
return this;
}
}
41 changes: 41 additions & 0 deletions src/main/java/org/gitlab4j/api/models/EventData.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,45 @@ public String getUserName() {
public void setUserName(String userName) {
this.userName = userName;
}


public EventData withAfter(String after) {
this.after = after;
return this;
}

public EventData withBefore(String before) {
this.before = before;
return this;
}

public EventData withCommits(List<Commit> commits) {
this.commits = commits;
return this;
}

public EventData withRef(String ref) {
this.ref = ref;
return this;
}

public EventData withRepository(Repository repository) {
this.repository = repository;
return this;
}

public EventData withTotalCommitsCount(Integer totalCommitsCount) {
this.totalCommitsCount = totalCommitsCount;
return this;
}

public EventData withUserId(Integer userId) {
this.userId = userId;
return this;
}

public EventData withUserName(String userName) {
this.userName = userName;
return this;
}
}
76 changes: 76 additions & 0 deletions src/main/java/org/gitlab4j/api/models/Job.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,80 @@ public Runner getRunner() {
public void setRunner(Runner runner) {
this.runner = runner;
}


public Job withId(Integer id) {
this.id = id;
return this;
}

public Job withCommit(Commit commit) {
this.commit = commit;
return this;
}

public Job withCoverage(String coverage) {
this.coverage = coverage;
return this;
}

public Job withCreatedAt(Date createdAt) {
this.createdAt = createdAt;
return this;
}

public Job withFinishedAt(Date finishedAt) {
this.finishedAt = finishedAt;
return this;
}

public Job withName(String name) {
this.name = name;
return this;
}

public Job withPipeline(Pipeline pipeline) {
this.pipeline = pipeline;
return this;
}

public Job withRef(String ref) {
this.ref = ref;
return this;
}

public Job withRunner(Runner runner) {
this.runner = runner;
return this;
}

public Job withUser(User user) {
this.user = user;
return this;
}

public Job withStartedAt(Date startedAt) {
this.startedAt = startedAt;
return this;
}

public Job withArtifactsFile(ArtifactsFile artifactsFile) {
this.artifactsFile = artifactsFile;
return this;
}

public Job withTag(Boolean tag) {
this.tag = tag;
return this;
}

public Job withStage(String stage) {
this.stage = stage;
return this;
}

public Job withStatus(JobStatus status) {
this.status = status;
return this;
}
}
16 changes: 16 additions & 0 deletions src/main/java/org/gitlab4j/api/models/ProtectedBranch.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,20 @@ public void setMergeAccessLevels(List<BranchAccessLevel> mergeAccessLevels) {
public static final boolean isValid(ProtectedBranch branch) {
return (branch != null && branch.getName() != null);
}


public ProtectedBranch withName(String name) {
this.name = name;
return this;
}

public ProtectedBranch withPushAccessLevels(List<BranchAccessLevel> pushAccessLevels) {
this.pushAccessLevels = pushAccessLevels;
return this;
}

public ProtectedBranch withMergeAccessLevels(List<BranchAccessLevel> mergeAccessLevels) {
this.mergeAccessLevels = mergeAccessLevels;
return this;
}
}
41 changes: 41 additions & 0 deletions src/main/java/org/gitlab4j/api/models/Runner.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,45 @@ public String getIpAddress() {
public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}


public Runner withId(Integer id) {
this.id = id;
return this;
}

public Runner withDescription(String description) {
this.description = description;
return this;
}

public Runner withActive(Boolean active) {
this.active = active;
return this;
}

public Runner withIsShared(Boolean isShared) {
this.isShared = isShared;
return this;
}

public Runner withName(String name) {
this.name = name;
return this;
}

public Runner withOnline(Boolean online) {
this.online = online;
return this;
}

public Runner withStatus(RunnerStatus status) {
this.status = status;
return this;
}

public Runner withIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
return this;
}
}
Loading