Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Object Attributes #1198

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
import org.gitlab4j.models.utils.JacksonJson;
import org.gitlab4j.models.utils.JacksonJsonEnumHelper;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.*;

public class AbstractEpic<E extends AbstractEpic<E>> extends AbstractMinimalEpic<E> implements Serializable {
private static final long serialVersionUID = 1L;
Expand All @@ -38,23 +35,117 @@ public String toString() {
}
}

/**
* The internal identifier of the parent epic.
*/
@JsonProperty("parent_iid")
private Long parentIid;

/**
* The description of the epic.
*/
@JsonProperty("description")
private String description;

/**
* The state of the epic (e.g., open, closed).
*/
@JsonProperty("state")
private EpicState state;

/**
* The web URL of the epic.
*/
@JsonProperty("web_url")
private String webUrl;

/**
* The references associated with the epic.
*/
@JsonProperty("references")
private References references;

/**
* The author of the epic.
*/
@JsonProperty("author")
private Author author;

/**
* The list of labels associated with the epic.
*/
@JsonProperty("labels")
private List<String> labels;

/**
* The start date of the epic.
* Expected in format "yyyy-MM-dd".
*/
@JsonProperty("start_date")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
private Date startDate;

/**
* The due date of the epic.
* Expected in format "yyyy-MM-dd".
*/
@JsonProperty("due_date")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
private Date dueDate;

/**
* The end date of the epic.
* Expected in format "yyyy-MM-dd".
*/
@JsonProperty("end_date")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
private Date endDate;

/**
* The date when the epic was created.
* Expected in ISO 8601 format (2019-03-15T08:00:00Z).
*/
@JsonProperty("created_at")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX")
private Date createdAt;

/**
* The date when the epic was last updated.
* Expected in ISO 8601 format (2019-03-15T08:00:00Z).
*/
@JsonProperty("updated_at")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX")
private Date updatedAt;

/**
* The date when the epic was closed.
* Expected in ISO 8601 format (2019-03-15T08:00:00Z).
*/
@JsonProperty("closed_at")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX")
private Date closedAt;

/**
* The number of downvotes for the epic.
*/
@JsonProperty("downvotes")
private Integer downvotes;

/**
* The number of upvotes for the epic.
*/
@JsonProperty("upvotes")
private Integer upvotes;

/**
* The color associated with the epic.
*/
@JsonProperty("color")
private String color;

/**
* The links associated with the epic.
*/
@JsonProperty("_links")
private Map<String, String> links;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,46 @@
import org.gitlab4j.models.utils.JacksonJson;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class AbstractGroup<G extends AbstractGroup<G>> implements Serializable {
private static final long serialVersionUID = 1L;

/**
* The unique identifier of the group.
*/
@JsonProperty("id")
private Long id;

/**
* The name of the group.
*/
@JsonProperty("name")
private String name;

/**
* The avatar URL associated with the group.
*/
@JsonProperty("avatar_url")
private String avatarUrl;

/**
* The web URL of the group.
*/
@JsonProperty("web_url")
private String webUrl;

/**
* The full name of the group.
*/
@JsonProperty("full_name")
private String fullName;

/**
* The full path of the group.
*/
@JsonProperty("full_path")
private String fullPath;

public Long getId() {
Expand Down
Loading
Loading