-
Notifications
You must be signed in to change notification settings - Fork 475
gitlab4j#1023 Add Field Iteration to Issue. #1027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jmini
merged 2 commits into
gitlab4j:main
from
Handig-Eekhoorn:heek-feature-gitlab4j-1023-iterations
Sep 19, 2023
+415
−9
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.