-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into 6.x
# Conflicts: # src/main/java/org/gitlab4j/api/GroupApi.java
- Loading branch information
Showing
9 changed files
with
415 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
package org.gitlab4j.api.models; | ||
|
||
import java.util.Date; | ||
|
||
import org.gitlab4j.api.utils.JacksonJson; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
|
||
public class Iteration { | ||
public enum IterationState { | ||
UPCOMMING(1), CURRENT(2), CLOSED(3); | ||
|
||
private int value; | ||
|
||
IterationState(int value) { | ||
this.value = value; | ||
} | ||
|
||
@JsonCreator | ||
public static IterationState fromIntValue(int value) { | ||
for (IterationState it : values()) { | ||
if(it.value == value) { | ||
return it; | ||
} | ||
} | ||
throw new IllegalArgumentException("No enum found for value: " + value); | ||
} | ||
|
||
@JsonValue | ||
public int toIntValue() { | ||
return this.value; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return name(); | ||
} | ||
} | ||
|
||
private Long id; | ||
private Long iid; | ||
private Long sequence; | ||
private Long groupId; | ||
private String title; | ||
private String description; | ||
private IterationState state; | ||
private Date createdAt; | ||
private Date updatedAt; | ||
private Date startDate; | ||
private Date dueDate; | ||
private String webUrl; | ||
public Long getId() { | ||
return id; | ||
} | ||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
public Long getIid() { | ||
return iid; | ||
} | ||
public void setIid(Long iid) { | ||
this.iid = iid; | ||
} | ||
public Long getSequence() { | ||
return sequence; | ||
} | ||
public void setSequence(Long sequence) { | ||
this.sequence = sequence; | ||
} | ||
public Long getGroupId() { | ||
return groupId; | ||
} | ||
public void setGroupId(Long groupId) { | ||
this.groupId = groupId; | ||
} | ||
public String getTitle() { | ||
return title; | ||
} | ||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
public String getDescription() { | ||
return description; | ||
} | ||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
public IterationState getState() { | ||
return state; | ||
} | ||
public void setState(IterationState state) { | ||
this.state = state; | ||
} | ||
public Date getCreatedAt() { | ||
return createdAt; | ||
} | ||
public void setCreatedAt(Date createdAt) { | ||
this.createdAt = createdAt; | ||
} | ||
public Date getUpdatedAt() { | ||
return updatedAt; | ||
} | ||
public void setUpdatedAt(Date updatedAt) { | ||
this.updatedAt = updatedAt; | ||
} | ||
public Date getStartDate() { | ||
return startDate; | ||
} | ||
public void setStartDate(Date startDate) { | ||
this.startDate = startDate; | ||
} | ||
public Date getDueDate() { | ||
return dueDate; | ||
} | ||
public void setDueDate(Date dueDate) { | ||
this.dueDate = dueDate; | ||
} | ||
public String getWebUrl() { | ||
return webUrl; | ||
} | ||
public void setWebUrl(String webUrl) { | ||
this.webUrl = webUrl; | ||
} | ||
@Override | ||
public String toString() { | ||
return (JacksonJson.toJsonString(this)); | ||
} | ||
} |
Oops, something went wrong.